diff options
| author | Zachary Turner <zturner@google.com> | 2018-09-17 21:07:48 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2018-09-17 21:07:48 +0000 |
| commit | 4727ac23947013a1f1cdd1f8ced7002f3bc06c72 (patch) | |
| tree | 543c6c69567957835d796085961e4f9239e2a8cb /llvm/include | |
| parent | 8639c5d565cb48f56b9abeeea1e3932c0aa605f2 (diff) | |
| download | bcm5719-llvm-4727ac23947013a1f1cdd1f8ced7002f3bc06c72.tar.gz bcm5719-llvm-4727ac23947013a1f1cdd1f8ced7002f3bc06c72.zip | |
[PDB] Make the native reader support modified types.
Previously for cv-qualified types, we would just ignore them
and they would never get printed. Now we can enumerate them
and cache them like any other symbol type.
llvm-svn: 342414
Diffstat (limited to 'llvm/include')
3 files changed, 19 insertions, 8 deletions
diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h b/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h index 571bae8b8fd..2d874b33392 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeBuiltin.h @@ -21,7 +21,8 @@ class NativeSession; class NativeTypeBuiltin : public NativeRawSymbol { public: - NativeTypeBuiltin(NativeSession &PDBSession, SymIndexId Id, PDB_BuiltinType T, + NativeTypeBuiltin(NativeSession &PDBSession, SymIndexId Id, + codeview::ModifierOptions Mods, PDB_BuiltinType T, uint64_t L); ~NativeTypeBuiltin() override; @@ -37,6 +38,7 @@ public: protected: NativeSession &Session; + codeview::ModifierOptions Mods; PDB_BuiltinType Type; uint64_t Length; }; diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h b/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h index c099f83705e..35a976612cf 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/NativeTypeEnum.h @@ -18,11 +18,15 @@ namespace llvm { namespace pdb { -class NativeTypeEnum : public NativeRawSymbol, - public codeview::TypeVisitorCallbacks { +class NativeTypeEnum : public NativeRawSymbol { public: NativeTypeEnum(NativeSession &Session, SymIndexId Id, codeview::TypeIndex TI, codeview::EnumRecord Record); + + NativeTypeEnum(NativeSession &Session, SymIndexId Id, + codeview::TypeIndex ModifierTI, + codeview::ModifierRecord Modifier, + codeview::EnumRecord EnumRecord); ~NativeTypeEnum() override; void dump(raw_ostream &OS, int Indent) const override; @@ -30,11 +34,6 @@ public: std::unique_ptr<IPDBEnumSymbols> findChildren(PDB_SymType Type) const override; - Error visitKnownRecord(codeview::CVType &CVR, - codeview::EnumRecord &Record) override; - Error visitKnownMember(codeview::CVMemberRecord &CVM, - codeview::EnumeratorRecord &Record) override; - PDB_BuiltinType getBuiltinType() const override; PDB_SymType getSymTag() const override; SymIndexId getUnmodifiedTypeId() const override; @@ -43,6 +42,9 @@ public: bool hasCastOperator() const override; uint64_t getLength() const override; std::string getName() const override; + bool isConstType() const override; + bool isVolatileType() const override; + bool isUnalignedType() const override; bool isNested() const override; bool hasOverloadedOperator() const override; bool hasNestedTypes() const override; @@ -57,6 +59,7 @@ public: protected: codeview::TypeIndex Index; codeview::EnumRecord Record; + Optional<codeview::ModifierRecord> Modifiers; }; } // namespace pdb diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h b/llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h index c53b919b3c4..704f8b23fbe 100644 --- a/llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h +++ b/llvm/include/llvm/DebugInfo/PDB/Native/SymbolCache.h @@ -53,6 +53,12 @@ class SymbolCache { TI, std::move(Record), std::forward<Args>(ConstructorArgs)...); } + SymIndexId createSymbolForModifiedType(codeview::TypeIndex ModifierTI, + codeview::CVType CVT); + + SymIndexId createSimpleType(codeview::TypeIndex TI, + codeview::ModifierOptions Mods); + public: SymbolCache(NativeSession &Session, DbiStream *Dbi); |

