summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2018-10-12 17:57:07 +0000
committerFangrui Song <maskray@google.com>2018-10-12 17:57:07 +0000
commitd15d602654d62e4eaa184f02e4e88c14d2f318f3 (patch)
tree69ff075333815fb448b3733c13ec3af4bc94387a /llvm/lib/CodeGen
parent073d21fad01fe2d6f3fc8257a16b9d732339bbcc (diff)
downloadbcm5719-llvm-d15d602654d62e4eaa184f02e4e88c14d2f318f3.tar.gz
bcm5719-llvm-d15d602654d62e4eaa184f02e4e88c14d2f318f3.zip
[BPF] Use cstdint {,u}int*_t instead of linux/types.h __u32 __u16 ...
llvm-svn: 344387
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/Dwarf2BTF.cpp12
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/Dwarf2BTF.h6
2 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/Dwarf2BTF.cpp b/llvm/lib/CodeGen/AsmPrinter/Dwarf2BTF.cpp
index 5afd2c902ca..20cc61df9b6 100644
--- a/llvm/lib/CodeGen/AsmPrinter/Dwarf2BTF.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/Dwarf2BTF.cpp
@@ -200,7 +200,7 @@ Die2BTFEntryInt::Die2BTFEntryInt(const DIE &Die) : Die2BTFEntry(Die) {
auto Encoding = Die2BTFEntry::getBaseTypeEncoding(Die);
assert((Encoding != BTF_INVALID_ENCODING) &&
"Invalid Die passed to BTFTypeEntryInt()");
- __u32 IntVal = (Encoding & 0xf) << 24;
+ uint32_t IntVal = (Encoding & 0xf) << 24;
// handle BTF_INT_OFFSET in IntVal
auto V = Die.findAttribute(dwarf::DW_AT_bit_offset);
@@ -209,7 +209,7 @@ Die2BTFEntryInt::Die2BTFEntryInt(const DIE &Die) : Die2BTFEntry(Die) {
// get btf_type.size
V = Die.findAttribute(dwarf::DW_AT_byte_size);
- __u32 Size = V.getDIEInteger().getValue() & 0xffffffff;
+ uint32_t Size = V.getDIEInteger().getValue() & 0xffffffff;
// handle BTF_INT_BITS in IntVal
V = Die.findAttribute(dwarf::DW_AT_bit_size);
@@ -237,7 +237,7 @@ void Die2BTFEntryInt::completeData(class Dwarf2BTF &Dwarf2BTF) {
Die2BTFEntryEnum::Die2BTFEntryEnum(const DIE &Die) : Die2BTFEntry(Die) {
// get btf_type.size
auto V = Die.findAttribute(dwarf::DW_AT_byte_size);
- __u32 Size = V.getDIEInteger().getValue() & 0xffffffff;
+ uint32_t Size = V.getDIEInteger().getValue() & 0xffffffff;
int Vlen = 0;
for (auto &ChildDie : Die.children())
@@ -265,7 +265,7 @@ void Die2BTFEntryEnum::completeData(class Dwarf2BTF &Dwarf2BTF) {
BTFEnum.name_off = Dwarf2BTF.addBTFString(Str);
auto ChildValueV = ChildDie.findAttribute(dwarf::DW_AT_const_value);
- BTFEnum.val = (__s32)(ChildValueV.getDIEInteger().getValue());
+ BTFEnum.val = (int32_t)(ChildValueV.getDIEInteger().getValue());
EnumValues.push_back(BTFEnum);
}
@@ -308,7 +308,7 @@ void Die2BTFEntryArray::completeData(class Dwarf2BTF &Dwarf2BTF) {
Nelems = 0;
break;
}
- Nelems *= (__u32)(CountV.getDIEInteger().getValue());
+ Nelems *= (uint32_t)(CountV.getDIEInteger().getValue());
}
}
ArrayInfo.nelems = Nelems;
@@ -320,7 +320,7 @@ void Die2BTFEntryArray::completeData(class Dwarf2BTF &Dwarf2BTF) {
Die2BTFEntryStruct::Die2BTFEntryStruct(const DIE &Die) : Die2BTFEntry(Die) {
// get btf_type.size
auto V = Die.findAttribute(dwarf::DW_AT_byte_size);
- __u32 Size = V.getDIEInteger().getValue() & 0xffffffff;
+ uint32_t Size = V.getDIEInteger().getValue() & 0xffffffff;
auto Kind = Die2BTFEntry::getDieKind(Die);
int Vlen = 0;
diff --git a/llvm/lib/CodeGen/AsmPrinter/Dwarf2BTF.h b/llvm/lib/CodeGen/AsmPrinter/Dwarf2BTF.h
index a472d68ed7e..ae13847214c 100644
--- a/llvm/lib/CodeGen/AsmPrinter/Dwarf2BTF.h
+++ b/llvm/lib/CodeGen/AsmPrinter/Dwarf2BTF.h
@@ -54,7 +54,7 @@ public:
// BTF_KIND_INT
class Die2BTFEntryInt : public Die2BTFEntry {
- __u32 IntVal; // encoding, offset, bits
+ uint32_t IntVal; // encoding, offset, bits
public:
Die2BTFEntryInt(const DIE &Die);
@@ -90,7 +90,7 @@ public:
// BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO
class Die2BTFEntryFunc : public Die2BTFEntry {
- std::vector<__u32> Parameters;
+ std::vector<uint32_t> Parameters;
public:
Die2BTFEntryFunc(const DIE &Die);
@@ -109,7 +109,7 @@ public:
bool isLittleEndian() { return IsLE; }
void addDwarfCU(DwarfUnit *TheU);
void finish();
- __u32 getTypeIndex(DIE &Die) {
+ uint32_t getTypeIndex(DIE &Die) {
DIE *DiePtr = const_cast<DIE *>(&Die);
assert((DieToIdMap.find(DiePtr) != DieToIdMap.end()) &&
"Die not added to in the BTFContext");
OpenPOWER on IntegriCloud