mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
[llvm-pdbdump] Many minor fixes and improvements
A short list of some of the improvements: 1) Now supports -all command line argument, which implies many other command line arguments to simplify usage. 2) Now supports -no-compiler-generated command line argument to exclude compiler generated types. 3) Prints base class list. 4) -class-definitions implies -types. 5) Proper display of bitfields. 6) Can now distinguish between struct/class/interface/union. And a few other minor tweaks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230933 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -26,6 +26,8 @@ raw_ostream &operator<<(raw_ostream &OS, const PDB_ThunkOrdinal &Thunk);
|
||||
raw_ostream &operator<<(raw_ostream &OS, const PDB_Checksum &Checksum);
|
||||
raw_ostream &operator<<(raw_ostream &OS, const PDB_Lang &Lang);
|
||||
raw_ostream &operator<<(raw_ostream &OS, const PDB_SymType &Tag);
|
||||
raw_ostream &operator<<(raw_ostream &OS, const PDB_MemberAccess &Access);
|
||||
raw_ostream &operator<<(raw_ostream &OS, const PDB_UdtType &Type);
|
||||
raw_ostream &operator<<(raw_ostream &OS, const PDB_UniqueId &Id);
|
||||
|
||||
raw_ostream &operator<<(raw_ostream &OS, const Variant &Value);
|
||||
|
@@ -470,8 +470,31 @@ struct Variant {
|
||||
uint16_t UInt16;
|
||||
uint32_t UInt32;
|
||||
uint64_t UInt64;
|
||||
void* Pointer;
|
||||
};
|
||||
#define VARIANT_EQUAL_CASE(Enum) \
|
||||
case PDB_VariantType::Enum: \
|
||||
return Enum == Other.Enum;
|
||||
bool operator==(const Variant &Other) const {
|
||||
if (Type != Other.Type)
|
||||
return false;
|
||||
switch (Type) {
|
||||
VARIANT_EQUAL_CASE(Bool)
|
||||
VARIANT_EQUAL_CASE(Int8)
|
||||
VARIANT_EQUAL_CASE(Int16)
|
||||
VARIANT_EQUAL_CASE(Int32)
|
||||
VARIANT_EQUAL_CASE(Int64)
|
||||
VARIANT_EQUAL_CASE(Single)
|
||||
VARIANT_EQUAL_CASE(Double)
|
||||
VARIANT_EQUAL_CASE(UInt8)
|
||||
VARIANT_EQUAL_CASE(UInt16)
|
||||
VARIANT_EQUAL_CASE(UInt32)
|
||||
VARIANT_EQUAL_CASE(UInt64)
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#undef VARIANT_EQUAL_CASE
|
||||
bool operator!=(const Variant &Other) const { return !(*this == Other); }
|
||||
};
|
||||
|
||||
} // namespace llvm
|
||||
|
Reference in New Issue
Block a user