From e642985be95bdf8ecca36652b3c560b434af71cf Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Sun, 8 Feb 2015 00:29:29 +0000 Subject: [PATCH] Some cleanup for libpdb. This patch implements a few of the optional suggestions from the initial patch comitting libpdb. In particular, it implements a virtual function out of line for each of the concrete classes. A few other minor cleanups exist as well, such as using override instead of virtual, etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228516 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/DebugInfo/PDB/IPDBRawSymbol.h | 14 ++-- include/llvm/DebugInfo/PDB/PDBSymbol.h | 2 +- .../llvm/DebugInfo/PDB/PDBSymbolAnnotation.h | 4 ++ include/llvm/DebugInfo/PDB/PDBSymbolBlock.h | 4 ++ .../llvm/DebugInfo/PDB/PDBSymbolCompiland.h | 4 ++ .../DebugInfo/PDB/PDBSymbolCompilandDetails.h | 18 +++-- .../DebugInfo/PDB/PDBSymbolCompilandEnv.h | 4 ++ include/llvm/DebugInfo/PDB/PDBSymbolCustom.h | 5 +- include/llvm/DebugInfo/PDB/PDBSymbolData.h | 4 ++ include/llvm/DebugInfo/PDB/PDBSymbolExe.h | 5 ++ include/llvm/DebugInfo/PDB/PDBSymbolFunc.h | 4 ++ .../DebugInfo/PDB/PDBSymbolFuncDebugEnd.h | 4 ++ .../DebugInfo/PDB/PDBSymbolFuncDebugStart.h | 4 ++ include/llvm/DebugInfo/PDB/PDBSymbolLabel.h | 4 ++ .../DebugInfo/PDB/PDBSymbolPublicSymbol.h | 4 ++ include/llvm/DebugInfo/PDB/PDBSymbolThunk.h | 5 ++ .../llvm/DebugInfo/PDB/PDBSymbolTypeArray.h | 4 ++ .../DebugInfo/PDB/PDBSymbolTypeBaseClass.h | 4 ++ .../llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h | 4 ++ .../llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h | 4 ++ .../DebugInfo/PDB/PDBSymbolTypeDimension.h | 4 ++ .../llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h | 4 ++ .../llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h | 4 ++ .../DebugInfo/PDB/PDBSymbolTypeFunctionArg.h | 4 ++ .../DebugInfo/PDB/PDBSymbolTypeFunctionSig.h | 4 ++ .../llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h | 4 ++ .../llvm/DebugInfo/PDB/PDBSymbolTypePointer.h | 4 ++ .../llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h | 4 ++ include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h | 4 ++ .../llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h | 4 ++ .../DebugInfo/PDB/PDBSymbolTypeVTableShape.h | 4 ++ include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h | 4 ++ .../DebugInfo/PDB/PDBSymbolUsingNamespace.h | 4 ++ include/llvm/DebugInfo/PDB/PDBTypes.h | 34 ++++++++- lib/DebugInfo/PDB/CMakeLists.txt | 29 ++++++++ lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp | 71 ------------------- lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp | 20 ++++++ lib/DebugInfo/PDB/PDBSymbolBlock.cpp | 20 ++++++ lib/DebugInfo/PDB/PDBSymbolCompiland.cpp | 24 +++++++ .../PDB/PDBSymbolCompilandDetails.cpp | 21 ++++++ lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp | 6 ++ lib/DebugInfo/PDB/PDBSymbolCustom.cpp | 5 ++ lib/DebugInfo/PDB/PDBSymbolData.cpp | 17 +++++ lib/DebugInfo/PDB/PDBSymbolExe.cpp | 45 ++++++++++++ lib/DebugInfo/PDB/PDBSymbolFunc.cpp | 20 ++++++ lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp | 21 ++++++ lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp | 21 ++++++ lib/DebugInfo/PDB/PDBSymbolLabel.cpp | 20 ++++++ lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp | 21 ++++++ lib/DebugInfo/PDB/PDBSymbolThunk.cpp | 20 ++++++ lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp | 20 ++++++ lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp | 21 ++++++ lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp | 21 ++++++ lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp | 20 ++++++ lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp | 22 ++++++ lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp | 20 ++++++ lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp | 20 ++++++ .../PDB/PDBSymbolTypeFunctionArg.cpp | 21 ++++++ .../PDB/PDBSymbolTypeFunctionSig.cpp | 21 ++++++ lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp | 21 ++++++ lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp | 22 ++++++ lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp | 22 ++++++ lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp | 20 ++++++ lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp | 20 ++++++ .../PDB/PDBSymbolTypeVTableShape.cpp | 21 ++++++ lib/DebugInfo/PDB/PDBSymbolUnknown.cpp | 20 ++++++ lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp | 21 ++++++ unittests/DebugInfo/PDB/PDBApiTest.cpp | 8 +-- 68 files changed, 838 insertions(+), 95 deletions(-) create mode 100644 lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolBlock.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolCompiland.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolData.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolExe.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolFunc.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolLabel.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolThunk.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolUnknown.cpp create mode 100644 lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp diff --git a/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h b/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h index 3ec1220c8b2..960821d6ad6 100644 --- a/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h +++ b/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h @@ -14,12 +14,12 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/COFF.h" -#include "llvm/Support/raw_ostream.h" #include "PDBTypes.h" namespace llvm { +class raw_ostream; + /// IPDBRawSymbol defines an interface used to represent an arbitrary symbol. /// It exposes a monolithic interface consisting of accessors for the union of /// all properties that are valid for any symbol type. This interface is then @@ -41,14 +41,12 @@ public: findInlineFramesByRVA(uint32_t RVA) const = 0; virtual void getDataBytes(llvm::SmallVector &bytes) const = 0; + virtual void getBackEndVersion(VersionInfo &Version) const = 0; virtual PDB_MemberAccess getAccess() const = 0; virtual uint32_t getAddressOffset() const = 0; virtual uint32_t getAddressSection() const = 0; virtual uint32_t getAge() const = 0; virtual uint32_t getArrayIndexTypeId() const = 0; - virtual uint32_t getBackEndBuild() const = 0; - virtual uint32_t getBackEndMajor() const = 0; - virtual uint32_t getBackEndMinor() const = 0; virtual uint32_t getBaseDataOffset() const = 0; virtual uint32_t getBaseDataSlot() const = 0; virtual uint32_t getBaseSymbolId() const = 0; @@ -59,9 +57,7 @@ public: virtual std::string getCompilerName() const = 0; virtual uint32_t getCount() const = 0; virtual uint32_t getCountLiveRanges() const = 0; - virtual uint32_t getFrontEndBuild() const = 0; - virtual uint32_t getFrontEndMajor() const = 0; - virtual uint32_t getFrontEndMinor() const = 0; + virtual void getFrontEndVersion(VersionInfo &Version) const = 0; virtual PDB_Lang getLanguage() const = 0; virtual uint32_t getLexicalParentId() const = 0; virtual std::string getLibraryName() const = 0; @@ -117,7 +113,7 @@ public: virtual int32_t getThisAdjust() const = 0; virtual int32_t getVirtualBasePointerOffset() const = 0; virtual PDB_LocType getLocationType() const = 0; - virtual COFF::MachineTypes getMachineType() const = 0; + virtual PDB_Machine getMachineType() const = 0; virtual PDB_ThunkOrdinal getThunkOrdinal() const = 0; virtual uint64_t getLength() const = 0; virtual uint64_t getLiveRangeLength() const = 0; diff --git a/include/llvm/DebugInfo/PDB/PDBSymbol.h b/include/llvm/DebugInfo/PDB/PDBSymbol.h index 38c578e2c24..8033e476657 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbol.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbol.h @@ -13,7 +13,6 @@ #include #include "llvm/ADT/StringRef.h" -#include "llvm/Support/raw_ostream.h" #include "llvm/Support/Casting.h" #include "IPDBRawSymbol.h" @@ -27,6 +26,7 @@ namespace llvm { class IPDBRawSymbol; +class raw_ostream; /// PDBSymbol defines the base of the inheritance hierarchy for concrete symbol /// types (e.g. functions, executables, vtables, etc). All concrete symbol diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h b/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h index 9c7fca1617f..44a61054872 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h @@ -16,10 +16,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolAnnotation : public PDBSymbol { public: PDBSymbolAnnotation(std::unique_ptr AnnotationSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getAddressOffset) FORWARD_SYMBOL_METHOD(getAddressSection) FORWARD_SYMBOL_METHOD(getDataKind) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h b/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h index 8be30460ae2..becc0c3d41b 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h @@ -16,10 +16,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolBlock : public PDBSymbol { public: PDBSymbolBlock(std::unique_ptr BlockSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getAddressOffset) FORWARD_SYMBOL_METHOD(getAddressSection) FORWARD_SYMBOL_METHOD(getLength) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h b/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h index efa0e81aab5..e12e933ebbb 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h @@ -16,10 +16,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolCompiland : public PDBSymbol { public: PDBSymbolCompiland(std::unique_ptr CompilandSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(isEditAndContinueEnabled) FORWARD_SYMBOL_METHOD(getLexicalParentId) FORWARD_SYMBOL_METHOD(getLibraryName) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h b/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h index 56dfc7352e9..1b04bdbc71c 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h @@ -15,18 +15,24 @@ namespace llvm { +class raw_ostream; + class PDBSymbolCompilandDetails : public PDBSymbol { public: PDBSymbolCompilandDetails(std::unique_ptr DetailsSymbol); - FORWARD_SYMBOL_METHOD(getBackEndBuild) - FORWARD_SYMBOL_METHOD(getBackEndMajor) - FORWARD_SYMBOL_METHOD(getBackEndMinor) + void dump(llvm::raw_ostream &OS) const override; + + void getFrontEndVersion(VersionInfo &Version) const { + RawSymbol->getFrontEndVersion(Version); + } + + void getBackEndVersion(VersionInfo &Version) const { + RawSymbol->getBackEndVersion(Version); + } + FORWARD_SYMBOL_METHOD(getCompilerName) FORWARD_SYMBOL_METHOD(isEditAndContinueEnabled) - FORWARD_SYMBOL_METHOD(getFrontEndBuild) - FORWARD_SYMBOL_METHOD(getFrontEndMajor) - FORWARD_SYMBOL_METHOD(getFrontEndMinor) FORWARD_SYMBOL_METHOD(hasDebugInfo) FORWARD_SYMBOL_METHOD(hasManagedCode) FORWARD_SYMBOL_METHOD(hasSecurityChecks) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h b/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h index dd833bd01d0..c4c45ec5a60 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolCompilandEnv : public PDBSymbol { public: PDBSymbolCompilandEnv(std::unique_ptr CompilandEnvSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getLexicalParentId) FORWARD_SYMBOL_METHOD(getName) FORWARD_SYMBOL_METHOD(getSymIndexId) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h b/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h index 0d95b879ebc..e6952d8693c 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h @@ -17,6 +17,8 @@ namespace llvm { +class raw_ostream; + /// PDBSymbolCustom represents symbols that are compiler-specific and do not /// fit anywhere else in the lexical hierarchy. /// https://msdn.microsoft.com/en-us/library/d88sf09h.aspx @@ -24,8 +26,9 @@ class PDBSymbolCustom : public PDBSymbol { public: PDBSymbolCustom(std::unique_ptr CustomSymbol); - void getDataBytes(llvm::SmallVector &bytes); + void dump(llvm::raw_ostream &OS) const override; + void getDataBytes(llvm::SmallVector &bytes); FORWARD_SYMBOL_METHOD(getSymIndexId) static bool classof(const PDBSymbol *S) { diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolData.h b/include/llvm/DebugInfo/PDB/PDBSymbolData.h index 64f0f76c08e..850365730e1 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolData.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolData.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolData : public PDBSymbol { public: PDBSymbolData(std::unique_ptr DataSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getAccess) FORWARD_SYMBOL_METHOD(getAddressOffset) FORWARD_SYMBOL_METHOD(getAddressSection) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolExe.h b/include/llvm/DebugInfo/PDB/PDBSymbolExe.h index 0a3d5a7b169..79413fa7d8e 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolExe.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolExe.h @@ -6,6 +6,7 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// + #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLEXE_H #define LLVM_DEBUGINFO_PDB_PDBSYMBOLEXE_H @@ -18,10 +19,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolExe : public PDBSymbol { public: PDBSymbolExe(std::unique_ptr ExeSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getAge) FORWARD_SYMBOL_METHOD(getGuid) FORWARD_SYMBOL_METHOD(hasCTypes) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h b/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h index dac7e258118..0213ace8387 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolFunc : public PDBSymbol { public: PDBSymbolFunc(std::unique_ptr FuncSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getAccess) FORWARD_SYMBOL_METHOD(getAddressOffset) FORWARD_SYMBOL_METHOD(getAddressSection) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h b/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h index 989ce2f5a02..0155e0b7cfc 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolFuncDebugEnd : public PDBSymbol { public: PDBSymbolFuncDebugEnd(std::unique_ptr FuncDebugEndSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getAddressOffset) FORWARD_SYMBOL_METHOD(getAddressSection) FORWARD_SYMBOL_METHOD(hasCustomCallingConvention) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h b/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h index 82e0caa0d3a..35716349a83 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolFuncDebugStart : public PDBSymbol { public: PDBSymbolFuncDebugStart(std::unique_ptr FuncDebugStartSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getAddressOffset) FORWARD_SYMBOL_METHOD(getAddressSection) FORWARD_SYMBOL_METHOD(hasCustomCallingConvention) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h b/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h index 0502fa916a3..f0c44617220 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolLabel : public PDBSymbol { public: PDBSymbolLabel(std::unique_ptr LabelSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getAddressOffset) FORWARD_SYMBOL_METHOD(getAddressSection) FORWARD_SYMBOL_METHOD(hasCustomCallingConvention) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h b/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h index 30c307a3b10..5acce323221 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolPublicSymbol : public PDBSymbol { public: PDBSymbolPublicSymbol(std::unique_ptr PublicSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getAddressOffset) FORWARD_SYMBOL_METHOD(getAddressSection) FORWARD_SYMBOL_METHOD(isCode) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h b/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h index ab8c731d2d2..24392fb2174 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h @@ -6,6 +6,7 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// + #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTHUNK_H #define LLVM_DEBUGINFO_PDB_PDBSYMBOLTHUNK_H @@ -16,10 +17,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolThunk : public PDBSymbol { public: PDBSymbolThunk(std::unique_ptr ThunkSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getAccess) FORWARD_SYMBOL_METHOD(getAddressOffset) FORWARD_SYMBOL_METHOD(getAddressSection) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h index 92a02ea1811..19a5a4311d7 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolTypeArray : public PDBSymbol { public: PDBSymbolTypeArray(std::unique_ptr ArrayTypeSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getArrayIndexTypeId) FORWARD_SYMBOL_METHOD(isConstType) FORWARD_SYMBOL_METHOD(getCount) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h index faab9bee319..324175b92e7 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolTypeBaseClass : public PDBSymbol { public: PDBSymbolTypeBaseClass(std::unique_ptr BaseClassTypeSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getAccess) FORWARD_SYMBOL_METHOD(getClassParentId) FORWARD_SYMBOL_METHOD(hasConstructor) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h index 33406e0d24e..f5063ecce04 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolTypeBuiltin : public PDBSymbol { public: PDBSymbolTypeBuiltin(std::unique_ptr BuiltinTypeSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getBuiltinType) FORWARD_SYMBOL_METHOD(isConstType) FORWARD_SYMBOL_METHOD(getLength) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h index 3c79c662c55..fdf5b2b40c3 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolTypeCustom : public PDBSymbol { public: PDBSymbolTypeCustom(std::unique_ptr CustomTypeSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getOemId) FORWARD_SYMBOL_METHOD(getOemSymbolId) FORWARD_SYMBOL_METHOD(getSymIndexId) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h index 562937e45d5..8eb32fdbc94 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolTypeDimension : public PDBSymbol { public: PDBSymbolTypeDimension(std::unique_ptr DimensionTypeSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getLowerBoundId) FORWARD_SYMBOL_METHOD(getUpperBoundId) FORWARD_SYMBOL_METHOD(getSymIndexId) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h index 2a4d904828e..75030a9ca08 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolTypeEnum : public PDBSymbol { public: PDBSymbolTypeEnum(std::unique_ptr EnumTypeSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getBuiltinType) FORWARD_SYMBOL_METHOD(getClassParentId) FORWARD_SYMBOL_METHOD(hasConstructor) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h index 547e9401f9b..7194bc4ceaa 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolTypeFriend : public PDBSymbol { public: PDBSymbolTypeFriend(std::unique_ptr FriendTypeSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getClassParentId) FORWARD_SYMBOL_METHOD(getName) FORWARD_SYMBOL_METHOD(getSymIndexId) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h index 89c33ab780d..3af0984ab9e 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolTypeFunctionArg : public PDBSymbol { public: PDBSymbolTypeFunctionArg(std::unique_ptr FuncArgTypeSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getClassParentId) FORWARD_SYMBOL_METHOD(getLexicalParentId) FORWARD_SYMBOL_METHOD(getSymIndexId) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h index 69c3f203bdf..d68d8288433 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolTypeFunctionSig : public PDBSymbol { public: PDBSymbolTypeFunctionSig(std::unique_ptr FuncSigTypeSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getCallingConvention) FORWARD_SYMBOL_METHOD(getClassParentId) FORWARD_SYMBOL_METHOD(isConstType) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h index f10491ba681..10bf19092e7 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolTypeManaged : public PDBSymbol { public: PDBSymbolTypeManaged(std::unique_ptr ManagedTypeSymbol); + void dump(llvm::raw_ostream &OS) 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 ddf84138e67..ffc7b639312 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolTypePointer : public PDBSymbol { public: PDBSymbolTypePointer(std::unique_ptr PointerTypeSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(isConstType) FORWARD_SYMBOL_METHOD(getLength) FORWARD_SYMBOL_METHOD(getLexicalParentId) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h index de8d7f989dc..3d31e73fbb5 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolTypeTypedef : public PDBSymbol { public: PDBSymbolTypeTypedef(std::unique_ptr TypedefSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getBuiltinType) FORWARD_SYMBOL_METHOD(getClassParentId) FORWARD_SYMBOL_METHOD(hasConstructor) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h index 876a75692df..d26f866d74d 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolTypeUDT : public PDBSymbol { public: PDBSymbolTypeUDT(std::unique_ptr UDTSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getClassParentId) FORWARD_SYMBOL_METHOD(hasConstructor) FORWARD_SYMBOL_METHOD(isConstType) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h index 4e3aff8aaa3..1d966bf33c5 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolTypeVTable : public PDBSymbol { public: PDBSymbolTypeVTable(std::unique_ptr VtblSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getClassParentId) FORWARD_SYMBOL_METHOD(isConstType) FORWARD_SYMBOL_METHOD(getLexicalParentId) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h index b3cb8a24f33..d1fd758ed5c 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolTypeVTableShape : public PDBSymbol { public: PDBSymbolTypeVTableShape(std::unique_ptr VtblShapeSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(isConstType) FORWARD_SYMBOL_METHOD(getCount) FORWARD_SYMBOL_METHOD(getLexicalParentId) diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h b/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h index 11637d33785..7ba190076f4 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolUnknown : public PDBSymbol { public: PDBSymbolUnknown(std::unique_ptr UnknownSymbol); + void dump(llvm::raw_ostream &OS) const override; + static bool classof(const PDBSymbol *S) { return (S->getSymTag() == PDB_SymType::None || S->getSymTag() >= PDB_SymType::Max); diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h b/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h index 7f192b61a20..92d6ace8938 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h @@ -15,10 +15,14 @@ namespace llvm { +class raw_ostream; + class PDBSymbolUsingNamespace : public PDBSymbol { public: PDBSymbolUsingNamespace(std::unique_ptr UsingSymbol); + void dump(llvm::raw_ostream &OS) const override; + FORWARD_SYMBOL_METHOD(getLexicalParentId) FORWARD_SYMBOL_METHOD(getName) FORWARD_SYMBOL_METHOD(getSymIndexId) diff --git a/include/llvm/DebugInfo/PDB/PDBTypes.h b/include/llvm/DebugInfo/PDB/PDBTypes.h index d9ed672c73a..9f4e54cd40d 100644 --- a/include/llvm/DebugInfo/PDB/PDBTypes.h +++ b/include/llvm/DebugInfo/PDB/PDBTypes.h @@ -25,7 +25,7 @@ class IPDBRawSymbol; class IPDBSession; class IPDBSourceFile; -typedef IPDBEnumChildren IPDBEnumSymbols; +typedef IPDBEnumChildren IPDBEnumSymbols; typedef IPDBEnumChildren IPDBEnumSourceFiles; typedef IPDBEnumChildren IPDBEnumDataStreams; typedef IPDBEnumChildren IPDBEnumCompilands; @@ -171,6 +171,31 @@ enum class PDB_Cpu { D3D11_Shader = 0x100, }; +enum class PDB_Machine { + Invalid = 0xffff, + Unknown = 0x0, + Am33 = 0x13, + Amd64 = 0x8664, + Arm = 0x1C0, + Armnt = 0x1C4, + Ebc = 0xEBC, + I386 = 0x14C, + Ia64 = 0x200, + M32r = 0x9041, + Mips16 = 0x266, + MipsFPU = 0x366, + MipsFPU16 = 0x466, + PowerPC = 0x1F0, + PowerPCFP = 0x1F1, + R4000 = 0x166, + SH3 = 0x1A2, + SH3DSP = 0x1A3, + SH4 = 0x1A6, + SH5 = 0x1A8, + Thumb = 0x1C2, + WceMipsV2 = 0x169 +}; + /// These values correspond to the CV_call_e enumeration, and are documented /// at the following locations: /// https://msdn.microsoft.com/en-us/library/b2fc64ek.aspx @@ -345,6 +370,13 @@ enum class PDB_BuiltinType { enum class PDB_MemberAccess { Private = 1, Protected = 2, Public = 3 }; +struct VersionInfo { + uint32_t Major; + uint32_t Minor; + uint32_t Build; + uint32_t QFE; +}; + } // namespace llvm #endif diff --git a/lib/DebugInfo/PDB/CMakeLists.txt b/lib/DebugInfo/PDB/CMakeLists.txt index 5d24bdb60a4..2cb958cc5e6 100644 --- a/lib/DebugInfo/PDB/CMakeLists.txt +++ b/lib/DebugInfo/PDB/CMakeLists.txt @@ -2,6 +2,35 @@ add_llvm_library(LLVMDebugInfoPDB PDB.cpp PDBInterfaceAnchors.cpp PDBSymbol.cpp + PDBSymbolAnnotation.cpp + PDBSymbolBlock.cpp + PDBSymbolCompiland.cpp + PDBSymbolCompilandDetails.cpp PDBSymbolCompilandEnv.cpp PDBSymbolCustom.cpp + PDBSymbolData.cpp + PDBSymbolExe.cpp + PDBSymbolFunc.cpp + PDBSymbolFuncDebugEnd.cpp + PDBSymbolFuncDebugStart.cpp + PDBSymbolLabel.cpp + PDBSymbolPublicSymbol.cpp + PDBSymbolThunk.cpp + PDBSymbolTypeArray.cpp + PDBSymbolTypeBaseClass.cpp + PDBSymbolTypeBuiltin.cpp + PDBSymbolTypeCustom.cpp + PDBSymbolTypeDimension.cpp + PDBSymbolTypeEnum.cpp + PDBSymbolTypeFriend.cpp + PDBSymbolTypeFunctionArg.cpp + PDBSymbolTypeFunctionSig.cpp + PDBSymbolTypeManaged.cpp + PDBSymbolTypePointer.cpp + PDBSymbolTypeTypedef.cpp + PDBSymbolTypeUDT.cpp + PDBSymbolTypeVTable.cpp + PDBSymbolTypeVTableShape.cpp + PDBSymbolUnknown.cpp + PDBSymbolUsingNamespace.cpp ) diff --git a/lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp b/lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp index 1d6c90198df..8b430cf7103 100644 --- a/lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp +++ b/lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp @@ -17,38 +17,6 @@ #include "llvm/DebugInfo/PDB/IPDBSourceFile.h" #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h" -#include "llvm/DebugInfo/PDB/PDBSymbolAnnotation.h" -#include "llvm/DebugInfo/PDB/PDBSymbolBlock.h" -#include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h" -#include "llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h" -#include "llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h" -#include "llvm/DebugInfo/PDB/PDBSymbolCustom.h" -#include "llvm/DebugInfo/PDB/PDBSymbolData.h" -#include "llvm/DebugInfo/PDB/PDBSymbolExe.h" -#include "llvm/DebugInfo/PDB/PDBSymbolFunc.h" -#include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h" -#include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h" -#include "llvm/DebugInfo/PDB/PDBSymbolLabel.h" -#include "llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h" -#include "llvm/DebugInfo/PDB/PDBSymbolThunk.h" -#include "llvm/DebugInfo/PDB/PDBSymbolTypeArray.h" -#include "llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h" -#include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h" -#include "llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h" -#include "llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h" -#include "llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h" -#include "llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h" -#include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h" -#include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h" -#include "llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h" -#include "llvm/DebugInfo/PDB/PDBSymbolTypePointer.h" -#include "llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h" -#include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h" -#include "llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h" -#include "llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h" -#include "llvm/DebugInfo/PDB/PDBSymbolUnknown.h" -#include "llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h" - using namespace llvm; IPDBSession::~IPDBSession() {} @@ -60,42 +28,3 @@ IPDBRawSymbol::~IPDBRawSymbol() {} IPDBSourceFile::~IPDBSourceFile() {} IPDBLineNumber::~IPDBLineNumber() {} - -// All of the concrete symbol types have their methods declared inline through -// the use of a forwarding macro, so the constructor should be declared out of -// line to get the vtable in this file. -#define FORWARD_SYMBOL_CONSTRUCTOR(ClassName) \ - ClassName::ClassName(std::unique_ptr Symbol) \ - : PDBSymbol(std::move(Symbol)) {} - -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolAnnotation) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolBlock) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolCompiland) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolCompilandDetails) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolCompilandEnv) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolCustom) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolData) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolExe) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolFunc) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolFuncDebugEnd) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolFuncDebugStart) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolLabel) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolPublicSymbol) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolThunk) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeArray) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeBaseClass) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeBuiltin) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeCustom) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeDimension) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeEnum) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeFriend) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeFunctionArg) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeFunctionSig) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeManaged) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypePointer) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeTypedef) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeUDT) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeVTable) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolTypeVTableShape) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolUnknown) -FORWARD_SYMBOL_CONSTRUCTOR(PDBSymbolUsingNamespace) diff --git a/lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp b/lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp new file mode 100644 index 00000000000..7fc2af32d8c --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp @@ -0,0 +1,20 @@ +//===- PDBSymbolAnnotation.cpp - --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolAnnotation.h" + +using namespace llvm; + +PDBSymbolAnnotation::PDBSymbolAnnotation(std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolAnnotation::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolBlock.cpp b/lib/DebugInfo/PDB/PDBSymbolBlock.cpp new file mode 100644 index 00000000000..9306688a6a9 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolBlock.cpp @@ -0,0 +1,20 @@ +//===- PDBSymbolBlock.cpp - -------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolBlock.h" + +using namespace llvm; + +PDBSymbolBlock::PDBSymbolBlock(std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolBlock::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp b/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp new file mode 100644 index 00000000000..d3492418a13 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp @@ -0,0 +1,24 @@ +//===- PDBSymbolCompiland.cpp - compiland details --------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h" +#include "llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h" +#include "llvm/Support/raw_ostream.h" + +using namespace llvm; + +PDBSymbolCompiland::PDBSymbolCompiland(std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolCompiland::dump(llvm::raw_ostream &OS) const { +} diff --git a/lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp b/lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp new file mode 100644 index 00000000000..44131b92c98 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp @@ -0,0 +1,21 @@ +//===- PDBSymbolCompilandDetails.cpp - compiland details --------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h" + +using namespace llvm; + +PDBSymbolCompilandDetails::PDBSymbolCompilandDetails( + std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolCompilandDetails::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp b/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp index 762c2238926..f026dc9ba8a 100644 --- a/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp @@ -15,7 +15,13 @@ using namespace llvm; +PDBSymbolCompilandEnv::PDBSymbolCompilandEnv( + std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + std::string PDBSymbolCompilandEnv::getValue() const { // call RawSymbol->getValue() and convert the result to an std::string. return std::string(); } + +void PDBSymbolCompilandEnv::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolCustom.cpp b/lib/DebugInfo/PDB/PDBSymbolCustom.cpp index aa1a8ed6e0b..449151d8393 100644 --- a/lib/DebugInfo/PDB/PDBSymbolCustom.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolCustom.cpp @@ -15,6 +15,11 @@ using namespace llvm; +PDBSymbolCustom::PDBSymbolCustom(std::unique_ptr CustomSymbol) + : PDBSymbol(std::move(CustomSymbol)) {} + void PDBSymbolCustom::getDataBytes(llvm::SmallVector &bytes) { RawSymbol->getDataBytes(bytes); } + +void PDBSymbolCustom::dump(llvm::raw_ostream &OS) const {} \ No newline at end of file diff --git a/lib/DebugInfo/PDB/PDBSymbolData.cpp b/lib/DebugInfo/PDB/PDBSymbolData.cpp new file mode 100644 index 00000000000..5777a697c60 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolData.cpp @@ -0,0 +1,17 @@ +//===- PDBSymbolData.cpp - PDB data (e.g. variable) accessors ---*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "llvm/DebugInfo/PDB/PDBSymbolData.h" + +using namespace llvm; + +PDBSymbolData::PDBSymbolData(std::unique_ptr DataSymbol) + : PDBSymbol(std::move(DataSymbol)) {} + +void PDBSymbolData::dump(llvm::raw_ostream &OS) const {} \ No newline at end of file diff --git a/lib/DebugInfo/PDB/PDBSymbolExe.cpp b/lib/DebugInfo/PDB/PDBSymbolExe.cpp new file mode 100644 index 00000000000..cf7dc804aaa --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolExe.cpp @@ -0,0 +1,45 @@ +//===- PDBSymbolExe.cpp - ---------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolExe.h" +#include "llvm/Support/ConvertUTF.h" +#include "llvm/Support/FileSystem.h" +#include "llvm/Support/raw_ostream.h" + +#if defined(_WIN32) +#include +#endif + +using namespace llvm; + +namespace { +std::string GuidToString(PDB_UniqueId *Id) { +#if defined(_WIN32) + GUID *Guid = reinterpret_cast(Id); + OLECHAR GuidBuf[40]; + int Result = StringFromGUID2(*Guid, GuidBuf, 39); + const char *InputBytes = reinterpret_cast(GuidBuf); + std::string ResultString; + convertUTF16ToUTF8String(ArrayRef(InputBytes, Result * 2), + ResultString); + return ResultString; +#else + return std::string(); +#endif +} +} + +PDBSymbolExe::PDBSymbolExe(std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolExe::dump(llvm::raw_ostream &OS) const { +} diff --git a/lib/DebugInfo/PDB/PDBSymbolFunc.cpp b/lib/DebugInfo/PDB/PDBSymbolFunc.cpp new file mode 100644 index 00000000000..9c3441850f8 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolFunc.cpp @@ -0,0 +1,20 @@ +//===- PDBSymbolFunc.cpp - --------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolFunc.h" + +using namespace llvm; + +PDBSymbolFunc::PDBSymbolFunc(std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolFunc::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp b/lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp new file mode 100644 index 00000000000..03e60c1d1e5 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp @@ -0,0 +1,21 @@ +//===- PDBSymbolFuncDebugEnd.cpp - ------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h" + +using namespace llvm; + +PDBSymbolFuncDebugEnd::PDBSymbolFuncDebugEnd( + std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolFuncDebugEnd::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp b/lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp new file mode 100644 index 00000000000..ffa12688869 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp @@ -0,0 +1,21 @@ +//===- PDBSymbolFuncDebugStart.cpp - ----------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h" + +using namespace llvm; + +PDBSymbolFuncDebugStart::PDBSymbolFuncDebugStart( + std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolFuncDebugStart::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolLabel.cpp b/lib/DebugInfo/PDB/PDBSymbolLabel.cpp new file mode 100644 index 00000000000..490919f8def --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolLabel.cpp @@ -0,0 +1,20 @@ +//===- PDBSymbolLabel.cpp - -------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolLabel.h" + +using namespace llvm; + +PDBSymbolLabel::PDBSymbolLabel(std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolLabel::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp b/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp new file mode 100644 index 00000000000..147ac44f98f --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp @@ -0,0 +1,21 @@ +//===- PDBSymbolPublicSymbol.cpp - ------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h" + +using namespace llvm; + +PDBSymbolPublicSymbol::PDBSymbolPublicSymbol( + std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolPublicSymbol::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolThunk.cpp b/lib/DebugInfo/PDB/PDBSymbolThunk.cpp new file mode 100644 index 00000000000..76001cac927 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolThunk.cpp @@ -0,0 +1,20 @@ +//===- PDBSymbolThunk.cpp - -------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolThunk.h" + +using namespace llvm; + +PDBSymbolThunk::PDBSymbolThunk(std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolThunk::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp new file mode 100644 index 00000000000..0f565746a0a --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp @@ -0,0 +1,20 @@ +//===- PDBSymbolTypeArray.cpp - ---------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolTypeArray.h" + +using namespace llvm; + +PDBSymbolTypeArray::PDBSymbolTypeArray(std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolTypeArray::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp new file mode 100644 index 00000000000..0decf479d6c --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp @@ -0,0 +1,21 @@ +//===- PDBSymbolTypeBaseClass.cpp - -----------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h" + +using namespace llvm; + +PDBSymbolTypeBaseClass::PDBSymbolTypeBaseClass( + std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolTypeBaseClass::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp new file mode 100644 index 00000000000..715643506e9 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp @@ -0,0 +1,21 @@ +//===- PDBSymbolTypeBuiltin.cpp - ------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h" + +using namespace llvm; + +PDBSymbolTypeBuiltin::PDBSymbolTypeBuiltin( + std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolTypeBuiltin::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp new file mode 100644 index 00000000000..6afbc84e49e --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp @@ -0,0 +1,20 @@ +//===- PDBSymbolTypeCustom.cpp - --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h" + +using namespace llvm; + +PDBSymbolTypeCustom::PDBSymbolTypeCustom(std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolTypeCustom::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp new file mode 100644 index 00000000000..03d4b928d71 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp @@ -0,0 +1,22 @@ +//===- PDBSymbolTypeDimension.cpp - --------------------------------*- C++ +//-*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h" + +using namespace llvm; + +PDBSymbolTypeDimension::PDBSymbolTypeDimension( + std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolTypeDimension::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp new file mode 100644 index 00000000000..e903ffe30f3 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp @@ -0,0 +1,20 @@ +//===- PDBSymbolTypeEnum.cpp - --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h" + +using namespace llvm; + +PDBSymbolTypeEnum::PDBSymbolTypeEnum(std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolTypeEnum::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp new file mode 100644 index 00000000000..240a3c1ac25 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp @@ -0,0 +1,20 @@ +//===- PDBSymbolTypeFriend.cpp - --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h" + +using namespace llvm; + +PDBSymbolTypeFriend::PDBSymbolTypeFriend(std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolTypeFriend::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp new file mode 100644 index 00000000000..c4415b4dd00 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp @@ -0,0 +1,21 @@ +//===- PDBSymbolTypeFunctionArg.cpp - --------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h" + +using namespace llvm; + +PDBSymbolTypeFunctionArg::PDBSymbolTypeFunctionArg( + std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolTypeFunctionArg::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp new file mode 100644 index 00000000000..7ad6c5c6164 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp @@ -0,0 +1,21 @@ +//===- PDBSymbolTypeFunctionSig.cpp - --------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h" + +using namespace llvm; + +PDBSymbolTypeFunctionSig::PDBSymbolTypeFunctionSig( + std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolTypeFunctionSig::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp new file mode 100644 index 00000000000..3f372faa7ad --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp @@ -0,0 +1,21 @@ +//===- PDBSymboTypelManaged.cpp - ------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h" + +using namespace llvm; + +PDBSymbolTypeManaged::PDBSymbolTypeManaged( + std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolTypeManaged::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp b/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp new file mode 100644 index 00000000000..d7a8a638c23 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp @@ -0,0 +1,22 @@ +//===- PDBSymbolTypePointer.cpp - --------------------------------*- C++ +//-*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolTypePointer.h" + +using namespace llvm; + +PDBSymbolTypePointer::PDBSymbolTypePointer( + std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolTypePointer::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp new file mode 100644 index 00000000000..bd42efff2b7 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp @@ -0,0 +1,22 @@ +//===- PDBSymbolTypeTypedef.cpp - --------------------------------*- C++ +//-*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h" + +using namespace llvm; + +PDBSymbolTypeTypedef::PDBSymbolTypeTypedef( + std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolTypeTypedef::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp new file mode 100644 index 00000000000..d8a83af7be3 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp @@ -0,0 +1,20 @@ +//===- PDBSymbolTypeUDT.cpp - --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h" + +using namespace llvm; + +PDBSymbolTypeUDT::PDBSymbolTypeUDT(std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolTypeUDT::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp new file mode 100644 index 00000000000..bc780e16a26 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp @@ -0,0 +1,20 @@ +//===- PDBSymbolTypeVTable.cpp - --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h" + +using namespace llvm; + +PDBSymbolTypeVTable::PDBSymbolTypeVTable(std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolTypeVTable::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp new file mode 100644 index 00000000000..fb448eac7a6 --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp @@ -0,0 +1,21 @@ +//===- PDBSymbolTypeVTableShape.cpp - ---------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h" + +using namespace llvm; + +PDBSymbolTypeVTableShape::PDBSymbolTypeVTableShape( + std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolTypeVTableShape::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolUnknown.cpp b/lib/DebugInfo/PDB/PDBSymbolUnknown.cpp new file mode 100644 index 00000000000..4c296182e7d --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolUnknown.cpp @@ -0,0 +1,20 @@ +//===- PDBSymbolUnknown.cpp - -----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolUnknown.h" + +using namespace llvm; + +PDBSymbolUnknown::PDBSymbolUnknown(std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolUnknown::dump(llvm::raw_ostream &OS) const {} diff --git a/lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp b/lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp new file mode 100644 index 00000000000..73cfd5c9c9d --- /dev/null +++ b/lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp @@ -0,0 +1,21 @@ +//===- PDBSymbolUsingNamespace.cpp - ------------------- --------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include + +#include "llvm/DebugInfo/PDB/PDBSymbol.h" +#include "llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h" + +using namespace llvm; + +PDBSymbolUsingNamespace::PDBSymbolUsingNamespace( + std::unique_ptr Symbol) + : PDBSymbol(std::move(Symbol)) {} + +void PDBSymbolUsingNamespace::dump(llvm::raw_ostream &OS) const {} diff --git a/unittests/DebugInfo/PDB/PDBApiTest.cpp b/unittests/DebugInfo/PDB/PDBApiTest.cpp index 87d4197776c..5a86d4ca7a5 100644 --- a/unittests/DebugInfo/PDB/PDBApiTest.cpp +++ b/unittests/DebugInfo/PDB/PDBApiTest.cpp @@ -88,6 +88,8 @@ public: } void getDataBytes(llvm::SmallVector &bytes) const override {} + void getFrontEndVersion(VersionInfo &Version) const override {} + void getBackEndVersion(VersionInfo &Version) const override {} PDB_SymType getSymTag() const override { return Type; } @@ -96,9 +98,6 @@ public: MOCK_SYMBOL_ACCESSOR(getAddressSection) MOCK_SYMBOL_ACCESSOR(getAge) MOCK_SYMBOL_ACCESSOR(getArrayIndexTypeId) - MOCK_SYMBOL_ACCESSOR(getBackEndBuild) - MOCK_SYMBOL_ACCESSOR(getBackEndMajor) - MOCK_SYMBOL_ACCESSOR(getBackEndMinor) MOCK_SYMBOL_ACCESSOR(getBaseDataOffset) MOCK_SYMBOL_ACCESSOR(getBaseDataSlot) MOCK_SYMBOL_ACCESSOR(getBaseSymbolId) @@ -109,9 +108,6 @@ public: MOCK_SYMBOL_ACCESSOR(getCompilerName) MOCK_SYMBOL_ACCESSOR(getCount) MOCK_SYMBOL_ACCESSOR(getCountLiveRanges) - MOCK_SYMBOL_ACCESSOR(getFrontEndBuild) - MOCK_SYMBOL_ACCESSOR(getFrontEndMajor) - MOCK_SYMBOL_ACCESSOR(getFrontEndMinor) MOCK_SYMBOL_ACCESSOR(getLanguage) MOCK_SYMBOL_ACCESSOR(getLexicalParentId) MOCK_SYMBOL_ACCESSOR(getLibraryName) -- 2.34.1