summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h11
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h4
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h10
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/IPDBSession.h5
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/IPDBSourceFile.h4
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBExtras.h39
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h11
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolData.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolExe.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h4
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBTypes.h70
39 files changed, 180 insertions, 38 deletions
diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h
index 08904907f55..6336b319a4f 100644
--- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h
+++ b/llvm/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h
@@ -19,8 +19,12 @@ class DIARawSymbol : public IPDBRawSymbol {
public:
DIARawSymbol(const DIASession &PDBSession, CComPtr<IDiaSymbol> DiaSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
+ CComPtr<IDiaSymbol> getDiaSymbol() const { return Symbol; }
+
+ std::unique_ptr<IPDBEnumSymbols>
+ DIARawSymbol::findChildren(PDB_SymType Type) const override;
std::unique_ptr<IPDBEnumSymbols>
findChildren(PDB_SymType Type, StringRef Name,
PDB_NameSearchFlags Flags) const override;
@@ -54,7 +58,7 @@ public:
uint32_t getLiveRangeStartAddressOffset() const override;
uint32_t getLiveRangeStartAddressSection() const override;
uint32_t getLiveRangeStartRelativeVirtualAddress() const override;
- uint32_t getLocalBasePointerRegisterId() const override;
+ PDB_RegisterId getLocalBasePointerRegisterId() const override;
uint32_t getLowerBoundId() const override;
uint32_t getMemorySpaceKind() const override;
std::string getName() const override;
@@ -69,7 +73,7 @@ public:
uint32_t getOffsetInUdt() const override;
PDB_Cpu getPlatform() const override;
uint32_t getRank() const override;
- uint32_t getRegisterId() const override;
+ PDB_RegisterId getRegisterId() const override;
uint32_t getRegisterType() const override;
uint32_t getRelativeVirtualAddress() const override;
uint32_t getSamplerSlot() const override;
@@ -129,6 +133,7 @@ public:
bool hasInlAsm() const override;
bool hasInlineAttribute() const override;
bool hasInterruptReturn() const override;
+ bool hasFramePointer() const override;
bool hasLongJump() const override;
bool hasManagedCode() const override;
bool hasNestedTypes() const override;
diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h
index 7ee0cb02fd2..141b9b0d989 100644
--- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h
+++ b/llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h
@@ -25,6 +25,10 @@ public:
void setLoadAddress(uint64_t Address) override;
std::unique_ptr<PDBSymbolExe> getGlobalScope() const override;
std::unique_ptr<PDBSymbol> getSymbolById(uint32_t SymbolId) const override;
+
+ std::unique_ptr<IPDBEnumSourceFiles> getAllSourceFiles() const override;
+ std::unique_ptr<IPDBEnumSourceFiles> getSourceFilesForCompiland(
+ const PDBSymbolCompiland &Compiland) const override;
std::unique_ptr<IPDBSourceFile>
getSourceFileById(uint32_t FileId) const override;
diff --git a/llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h b/llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h
index 960821d6ad6..5dd103ff100 100644
--- a/llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h
+++ b/llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h
@@ -29,7 +29,10 @@ class IPDBRawSymbol {
public:
virtual ~IPDBRawSymbol();
- virtual void dump(llvm::raw_ostream &OS) const = 0;
+ virtual void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const = 0;
+
+ virtual std::unique_ptr<IPDBEnumSymbols>
+ findChildren(PDB_SymType Type) const = 0;
virtual std::unique_ptr<IPDBEnumSymbols>
findChildren(PDB_SymType Type, StringRef Name,
@@ -64,7 +67,7 @@ public:
virtual uint32_t getLiveRangeStartAddressOffset() const = 0;
virtual uint32_t getLiveRangeStartAddressSection() const = 0;
virtual uint32_t getLiveRangeStartRelativeVirtualAddress() const = 0;
- virtual uint32_t getLocalBasePointerRegisterId() const = 0;
+ virtual PDB_RegisterId getLocalBasePointerRegisterId() const = 0;
virtual uint32_t getLowerBoundId() const = 0;
virtual uint32_t getMemorySpaceKind() const = 0;
virtual std::string getName() const = 0;
@@ -79,7 +82,7 @@ public:
virtual uint32_t getOffsetInUdt() const = 0;
virtual PDB_Cpu getPlatform() const = 0;
virtual uint32_t getRank() const = 0;
- virtual uint32_t getRegisterId() const = 0;
+ virtual PDB_RegisterId getRegisterId() const = 0;
virtual uint32_t getRegisterType() const = 0;
virtual uint32_t getRelativeVirtualAddress() const = 0;
virtual uint32_t getSamplerSlot() const = 0;
@@ -136,6 +139,7 @@ public:
virtual bool hasDebugInfo() const = 0;
virtual bool hasEH() const = 0;
virtual bool hasEHa() const = 0;
+ virtual bool hasFramePointer() const = 0;
virtual bool hasInlAsm() const = 0;
virtual bool hasInlineAttribute() const = 0;
virtual bool hasInterruptReturn() const = 0;
diff --git a/llvm/include/llvm/DebugInfo/PDB/IPDBSession.h b/llvm/include/llvm/DebugInfo/PDB/IPDBSession.h
index 5f16d94f932..0e0b2c5f68e 100644
--- a/llvm/include/llvm/DebugInfo/PDB/IPDBSession.h
+++ b/llvm/include/llvm/DebugInfo/PDB/IPDBSession.h
@@ -16,6 +16,7 @@
namespace llvm {
+class PDBSymbolCompiland;
class PDBSymbolExe;
/// IPDBSession defines an interface used to provide a context for querying
@@ -28,6 +29,10 @@ public:
virtual void setLoadAddress(uint64_t Address) = 0;
virtual std::unique_ptr<PDBSymbolExe> getGlobalScope() const = 0;
virtual std::unique_ptr<PDBSymbol> getSymbolById(uint32_t SymbolId) const = 0;
+
+ virtual std::unique_ptr<IPDBEnumSourceFiles> getAllSourceFiles() const = 0;
+ virtual std::unique_ptr<IPDBEnumSourceFiles>
+ getSourceFilesForCompiland(const PDBSymbolCompiland &Compiland) const = 0;
virtual std::unique_ptr<IPDBSourceFile>
getSourceFileById(uint32_t FileId) const = 0;
diff --git a/llvm/include/llvm/DebugInfo/PDB/IPDBSourceFile.h b/llvm/include/llvm/DebugInfo/PDB/IPDBSourceFile.h
index 2b834e2d732..ae584d717e3 100644
--- a/llvm/include/llvm/DebugInfo/PDB/IPDBSourceFile.h
+++ b/llvm/include/llvm/DebugInfo/PDB/IPDBSourceFile.h
@@ -17,12 +17,16 @@
namespace llvm {
+class raw_ostream;
+
/// IPDBSourceFile defines an interface used to represent source files whose
/// information are stored in the PDB.
class IPDBSourceFile {
public:
virtual ~IPDBSourceFile();
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const;
+
virtual std::string getFileName() const = 0;
virtual uint32_t getUniqueId() const = 0;
virtual std::string getChecksum() const = 0;
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBExtras.h b/llvm/include/llvm/DebugInfo/PDB/PDBExtras.h
new file mode 100644
index 00000000000..5a768e74e54
--- /dev/null
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBExtras.h
@@ -0,0 +1,39 @@
+//===- PDBExtras.h - helper functions and classes for PDBs -------*- C++-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_PDB_PDBEXTRAS_H
+#define LLVM_DEBUGINFO_PDB_PDBEXTRAS_H
+
+#include <unordered_map>
+
+#include "PDBTypes.h"
+
+#include "llvm/Support/raw_ostream.h"
+
+namespace llvm {
+typedef std::unordered_map<PDB_SymType, int> TagStats;
+
+struct stream_indent {
+ stream_indent(int IndentWidth) : Width(IndentWidth) {}
+ int Width;
+};
+raw_ostream &operator<<(raw_ostream &OS, const stream_indent &Indent);
+
+raw_ostream &operator<<(raw_ostream &OS, const PDB_RegisterId &Reg);
+raw_ostream &operator<<(raw_ostream &OS, const PDB_LocType &Loc);
+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_UniqueId &Id);
+raw_ostream &operator<<(raw_ostream &OS, const VersionInfo &Version);
+raw_ostream &operator<<(raw_ostream &OS, const TagStats &Stats);
+}
+
+#endif
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h
index ada3ab38994..95bc7fd44ec 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h
@@ -11,11 +11,13 @@
#define LLVM_DEBUGINFO_PDB_IPDBSYMBOL_H
#include <memory>
+#include <unordered_map>
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include "IPDBRawSymbol.h"
+#include "PDBExtras.h"
#include "PDBTypes.h"
#define FORWARD_SYMBOL_METHOD(MethodName) \
@@ -48,10 +50,12 @@ 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(llvm::raw_ostream &OS) const;
+ virtual void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const = 0;
+ void defaultDump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const;
PDB_SymType getSymTag() const;
+ std::unique_ptr<IPDBEnumSymbols> findChildren(PDB_SymType Type) const;
std::unique_ptr<IPDBEnumSymbols>
findChildren(PDB_SymType Type, StringRef Name,
PDB_NameSearchFlags Flags) const;
@@ -61,7 +65,12 @@ public:
uint32_t RVA) const;
std::unique_ptr<IPDBEnumSymbols> findInlineFramesByRVA(uint32_t RVA) const;
+ const IPDBRawSymbol &getRawSymbol() const { return *RawSymbol; }
+ IPDBRawSymbol &getRawSymbol() { return *RawSymbol; }
+
protected:
+ std::unique_ptr<IPDBEnumSymbols> getChildStats(TagStats &Stats) const;
+
const IPDBSession &Session;
const std::unique_ptr<IPDBRawSymbol> RawSymbol;
};
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h
index 773c9925e70..5751dcc9dd2 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h
@@ -23,7 +23,7 @@ public:
PDBSymbolAnnotation(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getAddressOffset)
FORWARD_SYMBOL_METHOD(getAddressSection)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h
index 5e6c7e193cb..760324b8c7d 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h
@@ -23,7 +23,7 @@ public:
PDBSymbolBlock(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getAddressOffset)
FORWARD_SYMBOL_METHOD(getAddressSection)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h
index b4831aa3ac3..b342444aaf6 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h
@@ -23,7 +23,7 @@ public:
PDBSymbolCompiland(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> CompilandSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(isEditAndContinueEnabled)
FORWARD_SYMBOL_METHOD(getLexicalParentId)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h
index e498bdd5265..dcffabf34fd 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h
@@ -22,7 +22,7 @@ public:
PDBSymbolCompilandDetails(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
void getFrontEndVersion(VersionInfo &Version) const {
RawSymbol->getFrontEndVersion(Version);
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h
index 4e732882c1d..dfff3f754b6 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h
@@ -22,7 +22,7 @@ public:
PDBSymbolCompilandEnv(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getLexicalParentId)
FORWARD_SYMBOL_METHOD(getName)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h
index 3d8c1fb4d94..0c972d8ba08 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h
@@ -27,7 +27,7 @@ public:
PDBSymbolCustom(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> CustomSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
void getDataBytes(llvm::SmallVector<uint8_t, 32> &bytes);
FORWARD_SYMBOL_METHOD(getSymIndexId)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolData.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolData.h
index 22098e3bda0..e1c074e7298 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolData.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolData.h
@@ -22,7 +22,7 @@ public:
PDBSymbolData(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> DataSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getAccess)
FORWARD_SYMBOL_METHOD(getAddressOffset)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolExe.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolExe.h
index 5f03c440d3b..caac1668ae3 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolExe.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolExe.h
@@ -24,7 +24,7 @@ public:
PDBSymbolExe(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> ExeSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getAge)
FORWARD_SYMBOL_METHOD(getGuid)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h
index f101d3072d8..4b78c2f5a6c 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h
@@ -22,7 +22,7 @@ public:
PDBSymbolFunc(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> FuncSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getAccess)
FORWARD_SYMBOL_METHOD(getAddressOffset)
@@ -46,8 +46,10 @@ public:
FORWARD_SYMBOL_METHOD(isStatic)
FORWARD_SYMBOL_METHOD(getLength)
FORWARD_SYMBOL_METHOD(getLexicalParentId)
+ FORWARD_SYMBOL_METHOD(getLocalBasePointerRegisterId)
FORWARD_SYMBOL_METHOD(getLocationType)
FORWARD_SYMBOL_METHOD(getName)
+ FORWARD_SYMBOL_METHOD(hasFramePointer)
FORWARD_SYMBOL_METHOD(hasNoInlineAttribute)
FORWARD_SYMBOL_METHOD(hasNoReturnAttribute)
FORWARD_SYMBOL_METHOD(isUnreached)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h
index 945596115c0..15ce8969d47 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h
@@ -22,7 +22,7 @@ public:
PDBSymbolFuncDebugEnd(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> FuncDebugEndSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getAddressOffset)
FORWARD_SYMBOL_METHOD(getAddressSection)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h
index c3ccd2532b3..9ad6d3888f7 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h
@@ -22,7 +22,7 @@ public:
PDBSymbolFuncDebugStart(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> FuncDebugStartSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getAddressOffset)
FORWARD_SYMBOL_METHOD(getAddressSection)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h
index 114bb378ca1..d7cb6f5a6df 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h
@@ -22,7 +22,7 @@ public:
PDBSymbolLabel(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> LabelSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getAddressOffset)
FORWARD_SYMBOL_METHOD(getAddressSection)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h
index 98d4c3bd749..540cf19ac2f 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h
@@ -22,7 +22,7 @@ public:
PDBSymbolPublicSymbol(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> PublicSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getAddressOffset)
FORWARD_SYMBOL_METHOD(getAddressSection)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h
index 136b6ca997a..7a2eab204f6 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h
@@ -24,7 +24,7 @@ public:
PDBSymbolThunk(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> ThunkSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getAccess)
FORWARD_SYMBOL_METHOD(getAddressOffset)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h
index 8100ea7e292..ef81d792d3c 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h
@@ -22,7 +22,7 @@ public:
PDBSymbolTypeArray(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> ArrayTypeSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getArrayIndexTypeId)
FORWARD_SYMBOL_METHOD(isConstType)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h
index 60c3dc28083..3cc7a022653 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h
@@ -22,7 +22,7 @@ public:
PDBSymbolTypeBaseClass(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getAccess)
FORWARD_SYMBOL_METHOD(getClassParentId)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h
index ba764ddb31b..769d4474031 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h
@@ -22,7 +22,7 @@ public:
PDBSymbolTypeBuiltin(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getBuiltinType)
FORWARD_SYMBOL_METHOD(isConstType)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h
index a28a6efc2cc..7bdbc9de72a 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h
@@ -22,7 +22,7 @@ public:
PDBSymbolTypeCustom(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getOemId)
FORWARD_SYMBOL_METHOD(getOemSymbolId)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h
index 3039b877918..737fdfa6acd 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h
@@ -22,7 +22,7 @@ public:
PDBSymbolTypeDimension(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getLowerBoundId)
FORWARD_SYMBOL_METHOD(getUpperBoundId)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h
index c44c4bede90..63c16b17c46 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h
@@ -22,7 +22,7 @@ public:
PDBSymbolTypeEnum(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> EnumTypeSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getBuiltinType)
FORWARD_SYMBOL_METHOD(getClassParentId)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h
index 8e7e93e719a..0c63da7d318 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h
@@ -22,7 +22,7 @@ public:
PDBSymbolTypeFriend(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getClassParentId)
FORWARD_SYMBOL_METHOD(getName)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h
index c8f1e1dfa28..531ebda67b7 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h
@@ -22,7 +22,7 @@ public:
PDBSymbolTypeFunctionArg(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getClassParentId)
FORWARD_SYMBOL_METHOD(getLexicalParentId)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h
index d23d7876fef..91dab3ece95 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h
@@ -22,7 +22,7 @@ public:
PDBSymbolTypeFunctionSig(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getCallingConvention)
FORWARD_SYMBOL_METHOD(getClassParentId)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h
index 436f51e4500..f5d02f9a60f 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h
@@ -22,7 +22,7 @@ public:
PDBSymbolTypeManaged(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getName)
FORWARD_SYMBOL_METHOD(getSymIndexId)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h
index 2236f9a077b..3a75edde2ab 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h
@@ -22,7 +22,7 @@ public:
PDBSymbolTypePointer(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(isConstType)
FORWARD_SYMBOL_METHOD(getLength)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h
index 4cb13cb2b03..957d184b858 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h
@@ -22,7 +22,7 @@ public:
PDBSymbolTypeTypedef(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getBuiltinType)
FORWARD_SYMBOL_METHOD(getClassParentId)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h
index 7025502e13d..2c86c84c331 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h
@@ -22,7 +22,7 @@ public:
PDBSymbolTypeUDT(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> UDTSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getClassParentId)
FORWARD_SYMBOL_METHOD(hasConstructor)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h
index 0055969ae14..0c9a916e44b 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h
@@ -22,7 +22,7 @@ public:
PDBSymbolTypeVTable(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> VtblSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getClassParentId)
FORWARD_SYMBOL_METHOD(isConstType)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h
index f5d6a4aeec9..5055c8da62f 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h
@@ -22,7 +22,7 @@ public:
PDBSymbolTypeVTableShape(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> VtblShapeSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(isConstType)
FORWARD_SYMBOL_METHOD(getCount)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h
index bcdb6835448..cc8ab370235 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h
@@ -22,7 +22,7 @@ public:
PDBSymbolUnknown(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> UnknownSymbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
static bool classof(const PDBSymbol *S) {
return (S->getSymTag() == PDB_SymType::None ||
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h
index 861f81ab886..535dc8d0c3f 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h
@@ -22,7 +22,7 @@ public:
PDBSymbolUsingNamespace(const IPDBSession &PDBSession,
std::unique_ptr<IPDBRawSymbol> Symbol);
- void dump(llvm::raw_ostream &OS) const override;
+ void dump(raw_ostream &OS, int Indent, PDB_DumpLevel Level) const override;
FORWARD_SYMBOL_METHOD(getLexicalParentId)
FORWARD_SYMBOL_METHOD(getName)
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h b/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h
index 836a423dbe7..0009b02505a 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h
@@ -11,6 +11,7 @@
#define LLVM_DEBUGINFO_PDB_PDBTYPES_H
#include <stdint.h>
+#include <functional>
#include "llvm/Config/llvm-config.h"
namespace llvm {
@@ -68,6 +69,12 @@ enum class PDB_ReaderType {
DIA = 0,
};
+enum class PDB_DumpLevel {
+ Compact,
+ Normal,
+ Detailed,
+};
+
/// Defines a 128-bit unique identifier. This maps to a GUID on Windows, but
/// is abstracted here for the purposes of non-Windows platforms that don't have
/// the GUID structure defined.
@@ -365,6 +372,58 @@ enum class PDB_BuiltinType {
HResult = 31
};
+enum class PDB_RegisterId {
+ Unknown = 0,
+ VFrame = 30006,
+ AL = 1,
+ CL = 2,
+ DL = 3,
+ BL = 4,
+ AH = 5,
+ CH = 6,
+ DH = 7,
+ BH = 8,
+ AX = 9,
+ CX = 10,
+ DX = 11,
+ BX = 12,
+ SP = 13,
+ BP = 14,
+ SI = 15,
+ DI = 16,
+ EAX = 17,
+ ECX = 18,
+ EDX = 19,
+ EBX = 20,
+ ESP = 21,
+ EBP = 22,
+ ESI = 23,
+ EDI = 24,
+ ES = 25,
+ CS = 26,
+ SS = 27,
+ DS = 28,
+ FS = 29,
+ GS = 30,
+ IP = 31,
+ RAX = 328,
+ RBX = 329,
+ RCX = 330,
+ RDX = 331,
+ RSI = 332,
+ RDI = 333,
+ RBP = 334,
+ RSP = 335,
+ R8 = 336,
+ R9 = 337,
+ R10 = 338,
+ R11 = 339,
+ R12 = 340,
+ R13 = 341,
+ R14 = 342,
+ R15 = 343,
+};
+
enum class PDB_MemberAccess { Private = 1, Protected = 2, Public = 3 };
struct VersionInfo {
@@ -376,4 +435,15 @@ struct VersionInfo {
} // namespace llvm
+namespace std {
+template <> struct hash<llvm::PDB_SymType> {
+ typedef llvm::PDB_SymType argument_type;
+ typedef std::size_t result_type;
+
+ result_type operator()(const argument_type &Arg) const {
+ return std::hash<int>()(static_cast<int>(Arg));
+ }
+};
+}
+
#endif
OpenPOWER on IntegriCloud