aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/DebugInfo
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/DebugInfo')
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h14
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h5
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h2
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFFormValue.h3
-rw-r--r--include/llvm/DebugInfo/DWARF/DWARFUnit.h1
-rw-r--r--include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h2
-rw-r--r--include/llvm/DebugInfo/PDB/DIA/DIASession.h3
-rw-r--r--include/llvm/DebugInfo/PDB/PDB.h4
-rw-r--r--include/llvm/DebugInfo/PDB/PDBExtras.h3
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymDumper.h86
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbol.h3
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolBlock.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolCustom.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolData.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolExe.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolFunc.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolLabel.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolThunk.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h5
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h2
-rw-r--r--include/llvm/DebugInfo/PDB/PDBTypes.h36
43 files changed, 126 insertions, 101 deletions
diff --git a/include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h b/include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h
index bb05c30..6ab5d5c 100644
--- a/include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h
+++ b/include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h
@@ -18,18 +18,14 @@ namespace llvm {
class raw_ostream;
class DWARFAbbreviationDeclaration {
- uint32_t Code;
- uint32_t Tag;
- bool HasChildren;
-
+public:
struct AttributeSpec {
AttributeSpec(uint16_t Attr, uint16_t Form) : Attr(Attr), Form(Form) {}
uint16_t Attr;
uint16_t Form;
};
typedef SmallVector<AttributeSpec, 8> AttributeSpecVector;
- AttributeSpecVector AttributeSpecs;
-public:
+
DWARFAbbreviationDeclaration();
uint32_t getCode() const { return Code; }
@@ -53,6 +49,12 @@ public:
private:
void clear();
+
+ uint32_t Code;
+ uint32_t Tag;
+ bool HasChildren;
+
+ AttributeSpecVector AttributeSpecs;
};
}
diff --git a/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h b/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
index e34f096..47dbf5f 100644
--- a/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
+++ b/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef LLVM_LIB_DEBUGINFO_DWARFACCELERATORTABLE_H
+#define LLVM_LIB_DEBUGINFO_DWARFACCELERATORTABLE_H
+
#include "llvm/ADT/SmallVector.h"
#include "llvm/DebugInfo/DWARF/DWARFFormValue.h"
#include "llvm/DebugInfo/DWARF/DWARFRelocMap.h"
@@ -47,3 +50,5 @@ public:
};
}
+
+#endif
diff --git a/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h b/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h
index 4ee3bda..c930bd6 100644
--- a/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h
+++ b/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h
@@ -66,6 +66,8 @@ public:
void clear();
void dump(raw_ostream &OS) const;
bool extract(DataExtractor data, uint32_t *offset_ptr);
+ const std::vector<RangeListEntry> &getEntries() { return Entries; }
+
/// getAbsoluteRanges - Returns absolute address ranges defined by this range
/// list. Has to be passed base address of the compile unit referencing this
/// range list.
diff --git a/include/llvm/DebugInfo/DWARF/DWARFFormValue.h b/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
index 5bb6d1b..02f4681 100644
--- a/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
+++ b/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
@@ -63,7 +63,7 @@ public:
/// The passed DWARFUnit is allowed to be nullptr, in which
/// case no relocation processing will be performed and some
/// kind of forms that depend on Unit information are disallowed.
- /// \returns wether the extraction succeeded.
+ /// \returns whether the extraction succeeded.
bool extractValue(DataExtractor data, uint32_t *offset_ptr,
const DWARFUnit *u);
bool isInlinedCStr() const {
@@ -74,6 +74,7 @@ public:
/// DWARFFormValue has form class is suitable for representing Foo.
Optional<uint64_t> getAsReference(const DWARFUnit *U) const;
Optional<uint64_t> getAsUnsignedConstant() const;
+ Optional<int64_t> getAsSignedConstant() const;
Optional<const char *> getAsCString(const DWARFUnit *U) const;
Optional<uint64_t> getAsAddress(const DWARFUnit *U) const;
Optional<uint64_t> getAsSectionOffset() const;
diff --git a/include/llvm/DebugInfo/DWARF/DWARFUnit.h b/include/llvm/DebugInfo/DWARF/DWARFUnit.h
index 628852f..29fa4a3 100644
--- a/include/llvm/DebugInfo/DWARF/DWARFUnit.h
+++ b/include/llvm/DebugInfo/DWARF/DWARFUnit.h
@@ -10,6 +10,7 @@
#ifndef LLVM_LIB_DEBUGINFO_DWARFUNIT_H
#define LLVM_LIB_DEBUGINFO_DWARFUNIT_H
+#include "llvm/ADT/STLExtras.h"
#include "llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h"
#include "llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h"
#include "llvm/DebugInfo/DWARF/DWARFDebugRangeList.h"
diff --git a/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h b/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h
index c71f35c..9308b8e 100644
--- a/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h
+++ b/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h
@@ -24,7 +24,7 @@ public:
CComPtr<IDiaSymbol> getDiaSymbol() const { return Symbol; }
std::unique_ptr<IPDBEnumSymbols>
- DIARawSymbol::findChildren(PDB_SymType Type) const override;
+ findChildren(PDB_SymType Type) const override;
std::unique_ptr<IPDBEnumSymbols>
findChildren(PDB_SymType Type, StringRef Name,
PDB_NameSearchFlags Flags) const override;
diff --git a/include/llvm/DebugInfo/PDB/DIA/DIASession.h b/include/llvm/DebugInfo/PDB/DIA/DIASession.h
index 141b9b0..6c72c3e 100644
--- a/include/llvm/DebugInfo/PDB/DIA/DIASession.h
+++ b/include/llvm/DebugInfo/PDB/DIA/DIASession.h
@@ -19,7 +19,8 @@ class DIASession : public IPDBSession {
public:
explicit DIASession(CComPtr<IDiaSession> DiaSession);
- static DIASession *createFromPdb(StringRef Path);
+ static PDB_ErrorCode createFromPdb(StringRef Path,
+ std::unique_ptr<IPDBSession> &Session);
uint64_t getLoadAddress() const override;
void setLoadAddress(uint64_t Address) override;
diff --git a/include/llvm/DebugInfo/PDB/PDB.h b/include/llvm/DebugInfo/PDB/PDB.h
index 7193eef..67878e9 100644
--- a/include/llvm/DebugInfo/PDB/PDB.h
+++ b/include/llvm/DebugInfo/PDB/PDB.h
@@ -16,8 +16,8 @@
namespace llvm {
class StringRef;
-std::unique_ptr<IPDBSession> createPDBReader(PDB_ReaderType Type,
- StringRef Path);
+PDB_ErrorCode createPDBReader(PDB_ReaderType Type, StringRef Path,
+ std::unique_ptr<IPDBSession> &Session);
}
#endif
diff --git a/include/llvm/DebugInfo/PDB/PDBExtras.h b/include/llvm/DebugInfo/PDB/PDBExtras.h
index cbbe171..48ce1c1 100644
--- a/include/llvm/DebugInfo/PDB/PDBExtras.h
+++ b/include/llvm/DebugInfo/PDB/PDBExtras.h
@@ -26,7 +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_BuiltinType &Type);
+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);
diff --git a/include/llvm/DebugInfo/PDB/PDBSymDumper.h b/include/llvm/DebugInfo/PDB/PDBSymDumper.h
index dee601c..65110f3 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymDumper.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymDumper.h
@@ -21,61 +21,37 @@ public:
PDBSymDumper(bool ShouldRequireImpl);
virtual ~PDBSymDumper();
- virtual void dump(const PDBSymbolAnnotation &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolBlock &Symbol, raw_ostream &OS, int Indent);
- virtual void dump(const PDBSymbolCompiland &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolCompilandDetails &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolCompilandEnv &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolCustom &Symbol, raw_ostream &OS, int Indent);
- virtual void dump(const PDBSymbolData &Symbol, raw_ostream &OS, int Indent);
- virtual void dump(const PDBSymbolExe &Symbol, raw_ostream &OS, int Indent);
- virtual void dump(const PDBSymbolFunc &Symbol, raw_ostream &OS, int Indent);
- virtual void dump(const PDBSymbolFuncDebugEnd &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolFuncDebugStart &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolLabel &Symbol, raw_ostream &OS, int Indent);
- virtual void dump(const PDBSymbolPublicSymbol &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolThunk &Symbol, raw_ostream &OS, int Indent);
- virtual void dump(const PDBSymbolTypeArray &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolTypeBaseClass &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolTypeBuiltin &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolTypeCustom &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolTypeDimension &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolTypeEnum &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolTypeFriend &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolTypeFunctionArg &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolTypeFunctionSig &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolTypeManaged &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolTypePointer &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolTypeTypedef &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolTypeUDT &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolTypeVTable &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolTypeVTableShape &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolUnknown &Symbol, raw_ostream &OS,
- int Indent);
- virtual void dump(const PDBSymbolUsingNamespace &Symbol, raw_ostream &OS,
- int Indent);
+ virtual void dump(const PDBSymbolAnnotation &Symbol);
+ virtual void dump(const PDBSymbolBlock &Symbol);
+ virtual void dump(const PDBSymbolCompiland &Symbol);
+ virtual void dump(const PDBSymbolCompilandDetails &Symbol);
+ virtual void dump(const PDBSymbolCompilandEnv &Symbol);
+ virtual void dump(const PDBSymbolCustom &Symbol);
+ virtual void dump(const PDBSymbolData &Symbol);
+ virtual void dump(const PDBSymbolExe &Symbol);
+ virtual void dump(const PDBSymbolFunc &Symbol);
+ virtual void dump(const PDBSymbolFuncDebugEnd &Symbol);
+ virtual void dump(const PDBSymbolFuncDebugStart &Symbol);
+ virtual void dump(const PDBSymbolLabel &Symbol);
+ virtual void dump(const PDBSymbolPublicSymbol &Symbol);
+ virtual void dump(const PDBSymbolThunk &Symbol);
+ virtual void dump(const PDBSymbolTypeArray &Symbol);
+ virtual void dump(const PDBSymbolTypeBaseClass &Symbol);
+ virtual void dump(const PDBSymbolTypeBuiltin &Symbol);
+ virtual void dump(const PDBSymbolTypeCustom &Symbol);
+ virtual void dump(const PDBSymbolTypeDimension &Symbol);
+ virtual void dump(const PDBSymbolTypeEnum &Symbol);
+ virtual void dump(const PDBSymbolTypeFriend &Symbol);
+ virtual void dump(const PDBSymbolTypeFunctionArg &Symbol);
+ virtual void dump(const PDBSymbolTypeFunctionSig &Symbol);
+ virtual void dump(const PDBSymbolTypeManaged &Symbol);
+ virtual void dump(const PDBSymbolTypePointer &Symbol);
+ virtual void dump(const PDBSymbolTypeTypedef &Symbol);
+ virtual void dump(const PDBSymbolTypeUDT &Symbol);
+ virtual void dump(const PDBSymbolTypeVTable &Symbol);
+ virtual void dump(const PDBSymbolTypeVTableShape &Symbol);
+ virtual void dump(const PDBSymbolUnknown &Symbol);
+ virtual void dump(const PDBSymbolUsingNamespace &Symbol);
private:
bool RequireImpl;
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbol.h b/include/llvm/DebugInfo/PDB/PDBSymbol.h
index 36005eb..4360c54 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbol.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbol.h
@@ -53,8 +53,7 @@ public:
/// call dump() on the underlying RawSymbol, which allows us to discover
/// unknown properties, but individual implementations of PDBSymbol may
/// override the behavior to only dump known fields.
- virtual void dump(raw_ostream &OS, int Indent,
- PDBSymDumper &Dumper) const = 0;
+ virtual void dump(PDBSymDumper &Dumper) const = 0;
void defaultDump(raw_ostream &OS, int Indent) const;
PDB_SymType getSymTag() const;
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h b/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h
index 347e30a..c055dd7 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Annotation)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getAddressOffset)
FORWARD_SYMBOL_METHOD(getAddressSection)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h b/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h
index a0091be..2ca1250 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Block)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getAddressOffset)
FORWARD_SYMBOL_METHOD(getAddressSection)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h b/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h
index 055e444..f8c796a 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Compiland)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(isEditAndContinueEnabled)
FORWARD_SYMBOL_METHOD(getLexicalParentId)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h b/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h
index 8836828..7f29d6b 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::CompilandDetails)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
void getFrontEndVersion(VersionInfo &Version) const {
RawSymbol->getFrontEndVersion(Version);
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h b/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h
index c3502a0..7e2ea90 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::CompilandEnv)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getLexicalParentId)
FORWARD_SYMBOL_METHOD(getName)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h b/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h
index b433dde..86bfd57 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h
@@ -28,7 +28,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Custom)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
void getDataBytes(llvm::SmallVector<uint8_t, 32> &bytes);
FORWARD_SYMBOL_METHOD(getSymIndexId)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolData.h b/include/llvm/DebugInfo/PDB/PDBSymbolData.h
index 8b9a657..79cbbf0 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolData.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolData.h
@@ -26,7 +26,7 @@ public:
std::unique_ptr<PDBSymbol> getType() const;
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getAccess)
FORWARD_SYMBOL_METHOD(getAddressOffset)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolExe.h b/include/llvm/DebugInfo/PDB/PDBSymbolExe.h
index 33046f3..7c5f302 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolExe.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolExe.h
@@ -25,7 +25,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Exe)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getAge)
FORWARD_SYMBOL_METHOD(getGuid)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h b/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h
index 22ae6e0..9db41d5 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h
@@ -22,7 +22,7 @@ public:
PDBSymbolFunc(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> FuncSymbol);
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
std::unique_ptr<PDBSymbolTypeFunctionSig> getSignature() const;
std::unique_ptr<PDBSymbolTypeUDT> getClassParent() const;
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h b/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h
index bd49314..34d551c 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::FuncDebugEnd)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getAddressOffset)
FORWARD_SYMBOL_METHOD(getAddressSection)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h b/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h
index a62eada..7671be4 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::FuncDebugStart)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getAddressOffset)
FORWARD_SYMBOL_METHOD(getAddressSection)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h b/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h
index d006495..9d9903a 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Label)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getAddressOffset)
FORWARD_SYMBOL_METHOD(getAddressSection)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h b/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h
index a8de89d..70dfcb5 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::PublicSymbol)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getAddressOffset)
FORWARD_SYMBOL_METHOD(getAddressSection)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h b/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h
index 88588f1..bd5a9b2 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h
@@ -25,7 +25,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Thunk)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getAccess)
FORWARD_SYMBOL_METHOD(getAddressOffset)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h
index ca925f9..513a9ec 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h
@@ -26,7 +26,7 @@ public:
std::unique_ptr<PDBSymbol> getElementType() const;
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getArrayIndexTypeId)
FORWARD_SYMBOL_METHOD(isConstType)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h
index a3dcc02..2a9a8a0 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::BaseClass)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getAccess)
FORWARD_SYMBOL_METHOD(getClassParentId)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h
index 1cede08..69a2028 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::BuiltinType)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getBuiltinType)
FORWARD_SYMBOL_METHOD(isConstType)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h
index 90a043f..c41c489 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::CustomType)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getOemId)
FORWARD_SYMBOL_METHOD(getOemSymbolId)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h
index f871681..3f22ed8 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Dimension)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getLowerBoundId)
FORWARD_SYMBOL_METHOD(getUpperBoundId)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h
index 2479f46..3188c71 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h
@@ -24,7 +24,10 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Enum)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
+
+ std::unique_ptr<PDBSymbolTypeUDT> getClassParent() const;
+ std::unique_ptr<PDBSymbolTypeBuiltin> getUnderlyingType() const;
FORWARD_SYMBOL_METHOD(getBuiltinType)
FORWARD_SYMBOL_METHOD(getClassParentId)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h
index 964246f..4d393d7 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Friend)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getClassParentId)
FORWARD_SYMBOL_METHOD(getName)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h
index 22f1455..14f79d9 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::FunctionArg)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getClassParentId)
FORWARD_SYMBOL_METHOD(getLexicalParentId)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h
index 82bb1fd..4bb4265 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h
@@ -28,7 +28,7 @@ public:
std::unique_ptr<IPDBEnumSymbols> getArguments() const;
std::unique_ptr<PDBSymbol> getClassParent() const;
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
void dumpArgList(raw_ostream &OS) const;
FORWARD_SYMBOL_METHOD(getCallingConvention)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h
index 42f5867..cbfcec8 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::ManagedType)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getName)
FORWARD_SYMBOL_METHOD(getSymIndexId)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h
index 8b2806f..33578ba 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h
@@ -26,7 +26,7 @@ public:
std::unique_ptr<PDBSymbol> getPointeeType() const;
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(isConstType)
FORWARD_SYMBOL_METHOD(getLength)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h
index d3a9ca2..5ad83bb 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Typedef)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getBuiltinType)
FORWARD_SYMBOL_METHOD(getClassParentId)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h
index bf912b8..99cc307 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::UDT)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getClassParentId)
FORWARD_SYMBOL_METHOD(getUnmodifiedTypeId)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h
index 6b6d99b..6efc549 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::VTable)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getClassParentId)
FORWARD_SYMBOL_METHOD(isConstType)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h
index e866106..f407595 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::VTableShape)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(isConstType)
FORWARD_SYMBOL_METHOD(getCount)
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h b/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h
index 7f8c6f9..94bd2c1 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h
@@ -21,7 +21,7 @@ public:
PDBSymbolUnknown(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> UnknownSymbol);
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
static bool classof(const PDBSymbol *S) {
return (S->getSymTag() == PDB_SymType::None ||
diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h b/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h
index 59ec16b..7072f34 100644
--- a/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h
+++ b/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h
@@ -24,7 +24,7 @@ public:
DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::UsingNamespace)
- void dump(raw_ostream &OS, int Indent, PDBSymDumper &Dumper) const override;
+ void dump(PDBSymDumper &Dumper) const override;
FORWARD_SYMBOL_METHOD(getLexicalParentId)
FORWARD_SYMBOL_METHOD(getName)
diff --git a/include/llvm/DebugInfo/PDB/PDBTypes.h b/include/llvm/DebugInfo/PDB/PDBTypes.h
index 75b6475..686e08f 100644
--- a/include/llvm/DebugInfo/PDB/PDBTypes.h
+++ b/include/llvm/DebugInfo/PDB/PDBTypes.h
@@ -418,6 +418,17 @@ enum class PDB_RegisterId {
enum class PDB_MemberAccess { Private = 1, Protected = 2, Public = 3 };
+enum class PDB_ErrorCode {
+ Success,
+ NoPdbImpl,
+ InvalidPath,
+ InvalidFileFormat,
+ InvalidParameter,
+ AlreadyLoaded,
+ UnknownError,
+ NoMemory
+};
+
struct VersionInfo {
uint32_t Major;
uint32_t Minor;
@@ -459,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