From c95df94d5ddc2af854f348f47f1beb12c8ad361c Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Wed, 4 May 2016 20:32:13 +0000 Subject: [PATCH] Move pdb code into pdb namespace. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268544 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../DebugInfo/PDB/ConcreteSymbolEnumerator.h | 2 + .../llvm/DebugInfo/PDB/DIA/DIADataStream.h | 2 + .../DebugInfo/PDB/DIA/DIAEnumDebugStreams.h | 2 + .../DebugInfo/PDB/DIA/DIAEnumLineNumbers.h | 3 +- .../DebugInfo/PDB/DIA/DIAEnumSourceFiles.h | 3 +- .../llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h | 3 +- .../llvm/DebugInfo/PDB/DIA/DIALineNumber.h | 3 +- include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h | 2 + include/llvm/DebugInfo/PDB/DIA/DIASession.h | 3 +- .../llvm/DebugInfo/PDB/DIA/DIASourceFile.h | 2 + include/llvm/DebugInfo/PDB/IPDBDataStream.h | 2 + include/llvm/DebugInfo/PDB/IPDBEnumChildren.h | 2 + include/llvm/DebugInfo/PDB/IPDBLineNumber.h | 3 +- include/llvm/DebugInfo/PDB/IPDBRawSymbol.h | 4 +- include/llvm/DebugInfo/PDB/IPDBSession.h | 3 +- include/llvm/DebugInfo/PDB/IPDBSourceFile.h | 4 +- include/llvm/DebugInfo/PDB/PDB.h | 4 +- include/llvm/DebugInfo/PDB/PDBContext.h | 70 ++++++++++--------- include/llvm/DebugInfo/PDB/PDBExtras.h | 3 + include/llvm/DebugInfo/PDB/PDBSymDumper.h | 2 + include/llvm/DebugInfo/PDB/PDBSymbol.h | 8 ++- .../llvm/DebugInfo/PDB/PDBSymbolAnnotation.h | 2 + include/llvm/DebugInfo/PDB/PDBSymbolBlock.h | 3 + .../llvm/DebugInfo/PDB/PDBSymbolCompiland.h | 3 + .../DebugInfo/PDB/PDBSymbolCompilandDetails.h | 2 + .../DebugInfo/PDB/PDBSymbolCompilandEnv.h | 3 +- include/llvm/DebugInfo/PDB/PDBSymbolCustom.h | 2 + include/llvm/DebugInfo/PDB/PDBSymbolData.h | 3 + include/llvm/DebugInfo/PDB/PDBSymbolExe.h | 3 + include/llvm/DebugInfo/PDB/PDBSymbolFunc.h | 3 + .../DebugInfo/PDB/PDBSymbolFuncDebugEnd.h | 3 + .../DebugInfo/PDB/PDBSymbolFuncDebugStart.h | 2 + include/llvm/DebugInfo/PDB/PDBSymbolLabel.h | 2 + .../DebugInfo/PDB/PDBSymbolPublicSymbol.h | 2 + include/llvm/DebugInfo/PDB/PDBSymbolThunk.h | 2 + .../llvm/DebugInfo/PDB/PDBSymbolTypeArray.h | 2 + .../DebugInfo/PDB/PDBSymbolTypeBaseClass.h | 2 + .../llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h | 2 + .../llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h | 2 + .../DebugInfo/PDB/PDBSymbolTypeDimension.h | 2 + .../llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h | 2 + .../llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h | 2 + .../DebugInfo/PDB/PDBSymbolTypeFunctionArg.h | 2 + .../DebugInfo/PDB/PDBSymbolTypeFunctionSig.h | 2 + .../llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h | 2 + .../llvm/DebugInfo/PDB/PDBSymbolTypePointer.h | 2 + .../llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h | 2 + include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h | 3 +- .../llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h | 2 + .../DebugInfo/PDB/PDBSymbolTypeVTableShape.h | 2 + include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h | 2 + .../DebugInfo/PDB/PDBSymbolUsingNamespace.h | 2 + include/llvm/DebugInfo/PDB/PDBTypes.h | 10 +-- lib/DebugInfo/PDB/DIA/DIADataStream.cpp | 1 + lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp | 1 + lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp | 1 + lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp | 1 + lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp | 1 + lib/DebugInfo/PDB/DIA/DIALineNumber.cpp | 1 + lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp | 1 + lib/DebugInfo/PDB/DIA/DIASession.cpp | 1 + lib/DebugInfo/PDB/DIA/DIASourceFile.cpp | 1 + lib/DebugInfo/PDB/IPDBSourceFile.cpp | 1 + lib/DebugInfo/PDB/PDB.cpp | 13 ++-- lib/DebugInfo/PDB/PDBContext.cpp | 1 + lib/DebugInfo/PDB/PDBExtras.cpp | 40 ++++++----- lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp | 1 + lib/DebugInfo/PDB/PDBSymDumper.cpp | 1 + lib/DebugInfo/PDB/PDBSymbol.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolBlock.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolCompiland.cpp | 1 + .../PDB/PDBSymbolCompilandDetails.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp | 9 +-- lib/DebugInfo/PDB/PDBSymbolCustom.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolData.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolExe.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolFunc.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolLabel.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolThunk.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp | 1 + .../PDB/PDBSymbolTypeFunctionArg.cpp | 1 + .../PDB/PDBSymbolTypeFunctionSig.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp | 1 + .../PDB/PDBSymbolTypeVTableShape.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolUnknown.cpp | 1 + lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp | 1 + lib/DebugInfo/Symbolize/Symbolize.cpp | 1 + tools/llvm-pdbdump/BuiltinDumper.cpp | 1 + tools/llvm-pdbdump/BuiltinDumper.h | 2 + tools/llvm-pdbdump/ClassDefinitionDumper.cpp | 1 + tools/llvm-pdbdump/ClassDefinitionDumper.h | 3 +- tools/llvm-pdbdump/CompilandDumper.cpp | 1 + tools/llvm-pdbdump/CompilandDumper.h | 2 + tools/llvm-pdbdump/EnumDumper.cpp | 1 + tools/llvm-pdbdump/EnumDumper.h | 3 +- tools/llvm-pdbdump/ExternalSymbolDumper.cpp | 1 + tools/llvm-pdbdump/ExternalSymbolDumper.h | 2 + tools/llvm-pdbdump/FunctionDumper.cpp | 6 +- tools/llvm-pdbdump/FunctionDumper.h | 3 +- tools/llvm-pdbdump/LinePrinter.cpp | 3 + tools/llvm-pdbdump/LinePrinter.h | 2 + tools/llvm-pdbdump/TypeDumper.cpp | 1 + tools/llvm-pdbdump/TypeDumper.h | 4 +- tools/llvm-pdbdump/TypedefDumper.cpp | 1 + tools/llvm-pdbdump/TypedefDumper.h | 2 + tools/llvm-pdbdump/VariableDumper.cpp | 1 + tools/llvm-pdbdump/VariableDumper.h | 5 +- 121 files changed, 275 insertions(+), 87 deletions(-) diff --git a/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h b/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h index b5fa8c33414..50f5c40bcac 100644 --- a/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h +++ b/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h @@ -15,6 +15,7 @@ #include namespace llvm { +namespace pdb { template class ConcreteSymbolEnumerator : public IPDBEnumChildren { @@ -55,5 +56,6 @@ private: std::unique_ptr Enumerator; }; } +} #endif diff --git a/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h b/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h index 7b2bc146b32..930bea6060b 100644 --- a/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h +++ b/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h @@ -14,6 +14,7 @@ #include "llvm/DebugInfo/PDB/IPDBDataStream.h" namespace llvm { +namespace pdb { class DIADataStream : public IPDBDataStream { public: explicit DIADataStream(CComPtr DiaStreamData); @@ -29,5 +30,6 @@ private: CComPtr StreamData; }; } +} #endif diff --git a/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h b/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h index 375bcdd7e3b..941e16a35fa 100644 --- a/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h +++ b/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h @@ -14,6 +14,7 @@ #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" namespace llvm { +namespace pdb { class IPDBDataStream; @@ -31,5 +32,6 @@ private: CComPtr Enumerator; }; } +} #endif diff --git a/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h b/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h index 4cc85eda477..106b84cecff 100644 --- a/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h +++ b/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h @@ -14,7 +14,7 @@ #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" namespace llvm { - +namespace pdb { class IPDBLineNumber; class DIAEnumLineNumbers : public IPDBEnumChildren { @@ -31,5 +31,6 @@ private: CComPtr Enumerator; }; } +} #endif diff --git a/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h b/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h index 88625f64e49..6c00d6a5e29 100644 --- a/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h +++ b/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h @@ -14,7 +14,7 @@ #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" namespace llvm { - +namespace pdb { class DIASession; class DIAEnumSourceFiles : public IPDBEnumChildren { @@ -33,5 +33,6 @@ private: CComPtr Enumerator; }; } +} #endif diff --git a/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h b/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h index fe343f778aa..b206ff59a6a 100644 --- a/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h +++ b/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h @@ -14,7 +14,7 @@ #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" namespace llvm { - +namespace pdb { class DIASession; class DIAEnumSymbols : public IPDBEnumChildren { @@ -33,5 +33,6 @@ private: CComPtr Enumerator; }; } +} #endif diff --git a/include/llvm/DebugInfo/PDB/DIA/DIALineNumber.h b/include/llvm/DebugInfo/PDB/DIA/DIALineNumber.h index 5950a0d3835..a59e3a19c8c 100644 --- a/include/llvm/DebugInfo/PDB/DIA/DIALineNumber.h +++ b/include/llvm/DebugInfo/PDB/DIA/DIALineNumber.h @@ -14,6 +14,7 @@ #include "llvm/DebugInfo/PDB/IPDBLineNumber.h" namespace llvm { +namespace pdb { class DIALineNumber : public IPDBLineNumber { public: explicit DIALineNumber(CComPtr DiaLineNumber); @@ -35,5 +36,5 @@ private: CComPtr LineNumber; }; } - +} #endif diff --git a/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h b/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h index 9308b8e8265..63bfb3794f7 100644 --- a/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h +++ b/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h @@ -14,6 +14,7 @@ #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h" namespace llvm { +namespace pdb { class DIASession; class DIARawSymbol : public IPDBRawSymbol { public: @@ -202,5 +203,6 @@ private: CComPtr Symbol; }; } +} #endif diff --git a/include/llvm/DebugInfo/PDB/DIA/DIASession.h b/include/llvm/DebugInfo/PDB/DIA/DIASession.h index 95c35dff39c..307d8735caf 100644 --- a/include/llvm/DebugInfo/PDB/DIA/DIASession.h +++ b/include/llvm/DebugInfo/PDB/DIA/DIASession.h @@ -16,6 +16,7 @@ namespace llvm { class StringRef; +namespace pdb { class DIASession : public IPDBSession { public: explicit DIASession(CComPtr DiaSession); @@ -64,5 +65,5 @@ private: CComPtr Session; }; } - +} #endif diff --git a/include/llvm/DebugInfo/PDB/DIA/DIASourceFile.h b/include/llvm/DebugInfo/PDB/DIA/DIASourceFile.h index 66b0c7db93f..1088ea54981 100644 --- a/include/llvm/DebugInfo/PDB/DIA/DIASourceFile.h +++ b/include/llvm/DebugInfo/PDB/DIA/DIASourceFile.h @@ -14,6 +14,7 @@ #include "llvm/DebugInfo/PDB/IPDBSourceFile.h" namespace llvm { +namespace pdb { class DIASession; class DIASourceFile : public IPDBSourceFile { @@ -35,5 +36,6 @@ private: CComPtr SourceFile; }; } +} #endif diff --git a/include/llvm/DebugInfo/PDB/IPDBDataStream.h b/include/llvm/DebugInfo/PDB/IPDBDataStream.h index 808a0f3ec3a..9594dc1591a 100644 --- a/include/llvm/DebugInfo/PDB/IPDBDataStream.h +++ b/include/llvm/DebugInfo/PDB/IPDBDataStream.h @@ -15,6 +15,7 @@ #include "llvm/ADT/SmallVector.h" namespace llvm { +namespace pdb { /// IPDBDataStream defines an interface used to represent a stream consisting /// of a name and a series of records whose formats depend on the particular @@ -33,5 +34,6 @@ public: virtual IPDBDataStream *clone() const = 0; }; } +} #endif diff --git a/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h b/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h index 645ac96e23a..8e9f6f88367 100644 --- a/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h +++ b/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h @@ -14,6 +14,7 @@ #include namespace llvm { +namespace pdb { template class IPDBEnumChildren { public: @@ -29,5 +30,6 @@ public: virtual MyType *clone() const = 0; }; } +} #endif diff --git a/include/llvm/DebugInfo/PDB/IPDBLineNumber.h b/include/llvm/DebugInfo/PDB/IPDBLineNumber.h index 92cd58d8664..e20080f2fbf 100644 --- a/include/llvm/DebugInfo/PDB/IPDBLineNumber.h +++ b/include/llvm/DebugInfo/PDB/IPDBLineNumber.h @@ -13,7 +13,7 @@ #include "PDBTypes.h" namespace llvm { - +namespace pdb { class IPDBLineNumber { public: virtual ~IPDBLineNumber(); @@ -32,5 +32,6 @@ public: virtual bool isStatement() const = 0; }; } +} #endif diff --git a/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h b/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h index 139bff56fd5..b91317f7a10 100644 --- a/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h +++ b/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h @@ -16,9 +16,10 @@ #include namespace llvm { - class raw_ostream; +namespace pdb { + /// 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 @@ -206,6 +207,7 @@ public: virtual std::string getUnused() const = 0; }; +} // namespace pdb } // namespace llvm #endif diff --git a/include/llvm/DebugInfo/PDB/IPDBSession.h b/include/llvm/DebugInfo/PDB/IPDBSession.h index a79b8e26a4c..3d2c37eff2e 100644 --- a/include/llvm/DebugInfo/PDB/IPDBSession.h +++ b/include/llvm/DebugInfo/PDB/IPDBSession.h @@ -16,7 +16,7 @@ #include namespace llvm { - +namespace pdb { class PDBSymbolCompiland; class PDBSymbolExe; @@ -76,5 +76,6 @@ public: virtual std::unique_ptr getDebugStreams() const = 0; }; } +} #endif diff --git a/include/llvm/DebugInfo/PDB/IPDBSourceFile.h b/include/llvm/DebugInfo/PDB/IPDBSourceFile.h index 3e439438710..3676c4030b1 100644 --- a/include/llvm/DebugInfo/PDB/IPDBSourceFile.h +++ b/include/llvm/DebugInfo/PDB/IPDBSourceFile.h @@ -15,9 +15,10 @@ #include namespace llvm { - class raw_ostream; +namespace pdb { + /// IPDBSourceFile defines an interface used to represent source files whose /// information are stored in the PDB. class IPDBSourceFile { @@ -34,5 +35,6 @@ public: getCompilands() const = 0; }; } +} #endif diff --git a/include/llvm/DebugInfo/PDB/PDB.h b/include/llvm/DebugInfo/PDB/PDB.h index 5df3be85e38..5ac450e8308 100644 --- a/include/llvm/DebugInfo/PDB/PDB.h +++ b/include/llvm/DebugInfo/PDB/PDB.h @@ -16,11 +16,13 @@ namespace llvm { class StringRef; +namespace pdb { + PDB_ErrorCode loadDataForPDB(PDB_ReaderType Type, StringRef Path, std::unique_ptr &Session); PDB_ErrorCode loadDataForEXE(PDB_ReaderType Type, StringRef Path, std::unique_ptr &Session); } - +} #endif diff --git a/include/llvm/DebugInfo/PDB/PDBContext.h b/include/llvm/DebugInfo/PDB/PDBContext.h index 2034e3b004b..836e3924843 100644 --- a/include/llvm/DebugInfo/PDB/PDBContext.h +++ b/include/llvm/DebugInfo/PDB/PDBContext.h @@ -17,44 +17,46 @@ namespace llvm { namespace object { class COFFObjectFile; -} - -/// PDBContext -/// This data structure is the top level entity that deals with PDB debug -/// information parsing. This data structure exists only when there is a -/// need for a transparent interface to different debug information formats -/// (e.g. PDB and DWARF). More control and power over the debug information -/// access can be had by using the PDB interfaces directly. -class PDBContext : public DIContext { - - PDBContext(PDBContext &) = delete; - PDBContext &operator=(PDBContext &) = delete; - -public: - PDBContext(const object::COFFObjectFile &Object, - std::unique_ptr PDBSession); - - static bool classof(const DIContext *DICtx) { - return DICtx->getKind() == CK_PDB; } - void dump(raw_ostream &OS, DIDumpType DumpType = DIDT_All, - bool DumpEH = false) override; + namespace pdb { + /// PDBContext + /// This data structure is the top level entity that deals with PDB debug + /// information parsing. This data structure exists only when there is a + /// need for a transparent interface to different debug information formats + /// (e.g. PDB and DWARF). More control and power over the debug information + /// access can be had by using the PDB interfaces directly. + class PDBContext : public DIContext { - DILineInfo getLineInfoForAddress( - uint64_t Address, - DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override; - DILineInfoTable getLineInfoForAddressRange( - uint64_t Address, uint64_t Size, - DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override; - DIInliningInfo getInliningInfoForAddress( - uint64_t Address, - DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override; + PDBContext(PDBContext &) = delete; + PDBContext &operator=(PDBContext &) = delete; -private: - std::string getFunctionName(uint64_t Address, DINameKind NameKind) const; - std::unique_ptr Session; -}; + public: + PDBContext(const object::COFFObjectFile &Object, + std::unique_ptr PDBSession); + + static bool classof(const DIContext *DICtx) { + return DICtx->getKind() == CK_PDB; + } + + void dump(raw_ostream &OS, DIDumpType DumpType = DIDT_All, + bool DumpEH = false) override; + + DILineInfo getLineInfoForAddress( + uint64_t Address, + DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override; + DILineInfoTable getLineInfoForAddressRange( + uint64_t Address, uint64_t Size, + DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override; + DIInliningInfo getInliningInfoForAddress( + uint64_t Address, + DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override; + + private: + std::string getFunctionName(uint64_t Address, DINameKind NameKind) const; + std::unique_ptr Session; + }; + } } #endif diff --git a/include/llvm/DebugInfo/PDB/PDBExtras.h b/include/llvm/DebugInfo/PDB/PDBExtras.h index 75706491c2d..d9c8a703192 100644 --- a/include/llvm/DebugInfo/PDB/PDBExtras.h +++ b/include/llvm/DebugInfo/PDB/PDBExtras.h @@ -15,6 +15,8 @@ #include namespace llvm { + +namespace pdb { typedef std::unordered_map TagStats; raw_ostream &operator<<(raw_ostream &OS, const PDB_VariantType &Value); @@ -35,5 +37,6 @@ raw_ostream &operator<<(raw_ostream &OS, const Variant &Value); raw_ostream &operator<<(raw_ostream &OS, const VersionInfo &Version); raw_ostream &operator<<(raw_ostream &OS, const TagStats &Stats); } +} #endif diff --git a/include/llvm/DebugInfo/PDB/PDBSymDumper.h b/include/llvm/DebugInfo/PDB/PDBSymDumper.h index 65110f39366..095c33cfe8b 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymDumper.h +++ b/include/llvm/DebugInfo/PDB/PDBSymDumper.h @@ -15,6 +15,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymDumper { public: @@ -57,5 +58,6 @@ private: bool RequireImpl; }; } +} #endif diff --git a/include/llvm/DebugInfo/PDB/PDBSymbol.h b/include/llvm/DebugInfo/PDB/PDBSymbol.h index 099745adf72..bf511880654 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbol.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbol.h @@ -25,9 +25,11 @@ namespace llvm { class StringRef; -class IPDBRawSymbol; class raw_ostream; +namespace pdb { +class IPDBRawSymbol; + #define DECLARE_PDB_SYMBOL_CONCRETE_TYPE(TagValue) \ static const PDB_SymType Tag = TagValue; \ static bool classof(const PDBSymbol *S) { return S->getSymTag() == Tag; } @@ -40,7 +42,8 @@ class raw_ostream; /// https://msdn.microsoft.com/en-us/library/370hs6k4.aspx class PDBSymbol { protected: - PDBSymbol(const IPDBSession &PDBSession, std::unique_ptr Symbol); + PDBSymbol(const IPDBSession &PDBSession, + std::unique_ptr Symbol); public: static std::unique_ptr @@ -93,5 +96,6 @@ protected: }; } // namespace llvm +} #endif diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h b/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h index 2086634f4d6..3169146e5b1 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h @@ -15,6 +15,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolAnnotation : public PDBSymbol { public: @@ -33,5 +34,6 @@ public: FORWARD_SYMBOL_METHOD(getVirtualAddress) }; } +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLANNOTATION_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h b/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h index dc8aa52d9f5..d0ff62ca7c3 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h @@ -16,6 +16,8 @@ namespace llvm { class raw_ostream; +namespace pdb { + class PDBSymbolBlock : public PDBSymbol { public: PDBSymbolBlock(const IPDBSession &PDBSession, @@ -35,5 +37,6 @@ public: FORWARD_SYMBOL_METHOD(getVirtualAddress) }; } +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLBLOCK_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h b/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h index ade807f6463..f1983b3f7bf 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h @@ -17,6 +17,8 @@ namespace llvm { class raw_ostream; +namespace pdb { + class PDBSymbolCompiland : public PDBSymbol { public: PDBSymbolCompiland(const IPDBSession &PDBSession, @@ -34,5 +36,6 @@ public: std::string getSourceFileName() const; }; } +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILAND_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h b/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h index 59d7eb310e1..bb4a78f68e2 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolCompilandDetails : public PDBSymbol { public: @@ -51,5 +52,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBFUNCTION_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h b/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h index 4890f75eea3..a71a0ba2df5 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h @@ -16,7 +16,7 @@ namespace llvm { class raw_ostream; - +namespace pdb { class PDBSymbolCompilandEnv : public PDBSymbol { public: PDBSymbolCompilandEnv(const IPDBSession &PDBSession, @@ -32,5 +32,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILANDENV_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h b/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h index 5a7b8096d9c..54f08940426 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h @@ -18,6 +18,7 @@ namespace llvm { class raw_ostream; +namespace pdb { /// 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 @@ -34,5 +35,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLCUSTOM_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolData.h b/include/llvm/DebugInfo/PDB/PDBSymbolData.h index 6c42bcbe2b3..36f32ab51c1 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolData.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolData.h @@ -17,6 +17,8 @@ namespace llvm { class raw_ostream; +namespace pdb { + class PDBSymbolData : public PDBSymbol { public: PDBSymbolData(const IPDBSession &PDBSession, @@ -56,5 +58,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLDATA_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolExe.h b/include/llvm/DebugInfo/PDB/PDBSymbolExe.h index f075524b443..5b3f50d153e 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolExe.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolExe.h @@ -17,6 +17,8 @@ namespace llvm { class raw_ostream; +namespace pdb { + class PDBSymbolExe : public PDBSymbol { public: PDBSymbolExe(const IPDBSession &PDBSession, @@ -40,5 +42,6 @@ private: int Indent) const; }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLEXE_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h b/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h index 490a9754707..7170bcbe846 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h @@ -17,6 +17,8 @@ namespace llvm { class raw_ostream; +namespace pdb { + class PDBSymbolFunc : public PDBSymbol { public: PDBSymbolFunc(const IPDBSession &PDBSession, @@ -75,5 +77,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNC_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h b/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h index 7e6c2d63470..464389503be 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h @@ -17,6 +17,8 @@ namespace llvm { class raw_ostream; +namespace pdb { + class PDBSymbolFuncDebugEnd : public PDBSymbol { public: PDBSymbolFuncDebugEnd(const IPDBSession &PDBSession, @@ -44,5 +46,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNCDEBUGEND_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h b/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h index c1b1b59c211..c2e3dd39be6 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolFuncDebugStart : public PDBSymbol { public: @@ -44,5 +45,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNCDEBUGSTART_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h b/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h index 453bcdc969f..3aeae10b47b 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolLabel : public PDBSymbol { public: @@ -44,5 +45,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLLABEL_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h b/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h index 4a2efa282eb..be073444597 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolPublicSymbol : public PDBSymbol { public: @@ -42,5 +43,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLPUBLICSYMBOL_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h b/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h index fe5fb4ac06a..63f7a09fc88 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolThunk : public PDBSymbol { public: @@ -51,5 +52,6 @@ public: FORWARD_SYMBOL_METHOD(isVolatileType) }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTHUNK_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h index 42aec6ae595..57db03661fb 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolTypeArray : public PDBSymbol { public: @@ -40,5 +41,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEARRAY_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h index 1563cc78977..aaa3ab7988d 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolTypeBaseClass : public PDBSymbol { public: @@ -55,5 +56,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEBASECLASS_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h index 5986a915311..c8f59f1f140 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolTypeBuiltin : public PDBSymbol { public: @@ -35,5 +36,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEBUILTIN_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h index 7dca811201e..199b3f8b304 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolTypeCustom : public PDBSymbol { public: @@ -31,5 +32,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPECUSTOM_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h index 3c64a229c59..e635eb5bbf6 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolTypeDimension : public PDBSymbol { public: @@ -31,5 +32,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEDIMENSION_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h index 0bff97fa634..ade2887bac1 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolTypeEnum : public PDBSymbol { public: @@ -50,5 +51,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEENUM_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h index a23bb602cc5..196d149ed2a 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolTypeFriend : public PDBSymbol { public: @@ -32,5 +33,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFRIEND_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h index ea451ae76ce..5561341d7e7 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolTypeFunctionArg : public PDBSymbol { public: @@ -32,5 +33,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFUNCTIONARG_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h index 0aba6d46766..516011ff8b3 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolTypeFunctionSig : public PDBSymbol { public: @@ -45,5 +46,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFUNCTIONSIG_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h index fdc951d9acc..31cf5363dde 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolTypeManaged : public PDBSymbol { public: @@ -30,5 +31,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEMANAGED_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h index 916beebcb51..7a57272adb7 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolTypePointer : public PDBSymbol { public: @@ -38,5 +39,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEPOINTER_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h index 1c535aa4251..5ed4f8d21d9 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolTypeTypedef : public PDBSymbol { public: @@ -49,5 +50,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPETYPEDEF_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h index 396261ba23c..1874dfef34f 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h @@ -17,6 +17,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolTypeUDT : public PDBSymbol { public: PDBSymbolTypeUDT(const IPDBSession &PDBSession, @@ -45,7 +46,7 @@ public: FORWARD_SYMBOL_METHOD(getVirtualTableShapeId) FORWARD_SYMBOL_METHOD(isVolatileType) }; - +} } // namespace llvm #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEUDT_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h index a529ee98548..baf7ab79d60 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolTypeVTable : public PDBSymbol { public: @@ -35,5 +36,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEVTABLE_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h b/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h index a1699498c42..431fc1ac862 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolTypeVTableShape : public PDBSymbol { public: @@ -34,5 +35,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEVTABLESHAPE_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h b/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h index 94bd2c14079..de43e47badb 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h @@ -15,6 +15,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolUnknown : public PDBSymbol { public: @@ -30,5 +31,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLUNKNOWN_H diff --git a/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h b/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h index 7b17b5bb902..a273fe159c1 100644 --- a/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h +++ b/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h @@ -16,6 +16,7 @@ namespace llvm { class raw_ostream; +namespace pdb { class PDBSymbolUsingNamespace : public PDBSymbol { public: @@ -31,5 +32,6 @@ public: }; } // namespace llvm +} #endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLUSINGNAMESPACE_H diff --git a/include/llvm/DebugInfo/PDB/PDBTypes.h b/include/llvm/DebugInfo/PDB/PDBTypes.h index 5a8cd5170c5..d18224aaad8 100644 --- a/include/llvm/DebugInfo/PDB/PDBTypes.h +++ b/include/llvm/DebugInfo/PDB/PDBTypes.h @@ -17,6 +17,7 @@ #include namespace llvm { +namespace pdb { class PDBSymDumper; class PDBSymbol; @@ -355,9 +356,7 @@ enum PDB_VariantType { }; struct Variant { - Variant() - : Type(PDB_VariantType::Empty) { - } + Variant() : Type(PDB_VariantType::Empty) {} Variant(const Variant &Other) : Type(PDB_VariantType::Empty) { *this = Other; @@ -429,10 +428,11 @@ struct Variant { }; } // end namespace llvm +} namespace std { -template <> struct hash { - typedef llvm::PDB_SymType argument_type; +template <> struct hash { + typedef llvm::pdb::PDB_SymType argument_type; typedef std::size_t result_type; result_type operator()(const argument_type &Arg) const { diff --git a/lib/DebugInfo/PDB/DIA/DIADataStream.cpp b/lib/DebugInfo/PDB/DIA/DIADataStream.cpp index 5c545c7eb10..7eabed8cad4 100644 --- a/lib/DebugInfo/PDB/DIA/DIADataStream.cpp +++ b/lib/DebugInfo/PDB/DIA/DIADataStream.cpp @@ -12,6 +12,7 @@ #include "llvm/Support/ConvertUTF.h" using namespace llvm; +using namespace llvm::pdb; DIADataStream::DIADataStream(CComPtr DiaStreamData) : StreamData(DiaStreamData) {} diff --git a/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp b/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp index 23c6489c7e1..cae817c1b36 100644 --- a/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp +++ b/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp @@ -12,6 +12,7 @@ #include "llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h" using namespace llvm; +using namespace llvm::pdb; DIAEnumDebugStreams::DIAEnumDebugStreams( CComPtr DiaEnumerator) diff --git a/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp b/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp index 32a9af214dc..4741d9c9a84 100644 --- a/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp +++ b/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp @@ -12,6 +12,7 @@ #include "llvm/DebugInfo/PDB/DIA/DIALineNumber.h" using namespace llvm; +using namespace llvm::pdb; DIAEnumLineNumbers::DIAEnumLineNumbers( CComPtr DiaEnumerator) diff --git a/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp b/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp index 1a946100fef..ccf8c4e622c 100644 --- a/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp +++ b/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp @@ -12,6 +12,7 @@ #include "llvm/DebugInfo/PDB/DIA/DIASourceFile.h" using namespace llvm; +using namespace llvm::pdb; DIAEnumSourceFiles::DIAEnumSourceFiles( const DIASession &PDBSession, CComPtr DiaEnumerator) diff --git a/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp b/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp index 6754d9a97d7..3c211b56904 100644 --- a/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp +++ b/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp @@ -13,6 +13,7 @@ #include "llvm/DebugInfo/PDB/DIA/DIASession.h" using namespace llvm; +using namespace llvm::pdb; DIAEnumSymbols::DIAEnumSymbols(const DIASession &PDBSession, CComPtr DiaEnumerator) diff --git a/lib/DebugInfo/PDB/DIA/DIALineNumber.cpp b/lib/DebugInfo/PDB/DIA/DIALineNumber.cpp index c5577f15eb8..b19be6b595a 100644 --- a/lib/DebugInfo/PDB/DIA/DIALineNumber.cpp +++ b/lib/DebugInfo/PDB/DIA/DIALineNumber.cpp @@ -10,6 +10,7 @@ #include "llvm/DebugInfo/PDB/DIA/DIALineNumber.h" using namespace llvm; +using namespace llvm::pdb; DIALineNumber::DIALineNumber(CComPtr DiaLineNumber) : LineNumber(DiaLineNumber) {} diff --git a/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp b/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp index 0651d7364cc..1bc81d82c95 100644 --- a/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp +++ b/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp @@ -17,6 +17,7 @@ #include "llvm/Support/raw_ostream.h" using namespace llvm; +using namespace llvm::pdb; namespace { Variant VariantFromVARIANT(const VARIANT &V) { diff --git a/lib/DebugInfo/PDB/DIA/DIASession.cpp b/lib/DebugInfo/PDB/DIA/DIASession.cpp index 89a9f510980..83aebfede0b 100644 --- a/lib/DebugInfo/PDB/DIA/DIASession.cpp +++ b/lib/DebugInfo/PDB/DIA/DIASession.cpp @@ -21,6 +21,7 @@ #include using namespace llvm; +using namespace llvm::pdb; namespace { diff --git a/lib/DebugInfo/PDB/DIA/DIASourceFile.cpp b/lib/DebugInfo/PDB/DIA/DIASourceFile.cpp index 762dda6caf5..8605f55b402 100644 --- a/lib/DebugInfo/PDB/DIA/DIASourceFile.cpp +++ b/lib/DebugInfo/PDB/DIA/DIASourceFile.cpp @@ -16,6 +16,7 @@ #include "llvm/Support/ConvertUTF.h" using namespace llvm; +using namespace llvm::pdb; DIASourceFile::DIASourceFile(const DIASession &PDBSession, CComPtr DiaSourceFile) diff --git a/lib/DebugInfo/PDB/IPDBSourceFile.cpp b/lib/DebugInfo/PDB/IPDBSourceFile.cpp index 3abe59dba62..46b422f5a76 100644 --- a/lib/DebugInfo/PDB/IPDBSourceFile.cpp +++ b/lib/DebugInfo/PDB/IPDBSourceFile.cpp @@ -14,6 +14,7 @@ #include "llvm/Support/raw_ostream.h" using namespace llvm; +using namespace llvm::pdb; IPDBSourceFile::~IPDBSourceFile() {} diff --git a/lib/DebugInfo/PDB/PDB.cpp b/lib/DebugInfo/PDB/PDB.cpp index 39b4b9480a8..1c65e85345f 100644 --- a/lib/DebugInfo/PDB/PDB.cpp +++ b/lib/DebugInfo/PDB/PDB.cpp @@ -20,12 +20,13 @@ #include "llvm/DebugInfo/PDB/Raw/RawSession.h" using namespace llvm; +using namespace llvm::pdb; -PDB_ErrorCode llvm::loadDataForPDB(PDB_ReaderType Type, StringRef Path, - std::unique_ptr &Session) { +PDB_ErrorCode llvm::pdb::loadDataForPDB(PDB_ReaderType Type, StringRef Path, + std::unique_ptr &Session) { // Create the correct concrete instance type based on the value of Type. if (Type == PDB_ReaderType::Raw) - return pdb::RawSession::createFromPdb(Path, Session); + return RawSession::createFromPdb(Path, Session); #if HAVE_DIA_SDK return DIASession::createFromPdb(Path, Session); @@ -34,11 +35,11 @@ PDB_ErrorCode llvm::loadDataForPDB(PDB_ReaderType Type, StringRef Path, #endif } -PDB_ErrorCode llvm::loadDataForEXE(PDB_ReaderType Type, StringRef Path, - std::unique_ptr &Session) { +PDB_ErrorCode llvm::pdb::loadDataForEXE(PDB_ReaderType Type, StringRef Path, + std::unique_ptr &Session) { // Create the correct concrete instance type based on the value of Type. if (Type == PDB_ReaderType::Raw) - return pdb::RawSession::createFromExe(Path, Session); + return RawSession::createFromExe(Path, Session); #if HAVE_DIA_SDK return DIASession::createFromExe(Path, Session); diff --git a/lib/DebugInfo/PDB/PDBContext.cpp b/lib/DebugInfo/PDB/PDBContext.cpp index 73c56162430..773230263da 100644 --- a/lib/DebugInfo/PDB/PDBContext.cpp +++ b/lib/DebugInfo/PDB/PDBContext.cpp @@ -19,6 +19,7 @@ using namespace llvm; using namespace llvm::object; +using namespace llvm::pdb; PDBContext::PDBContext(const COFFObjectFile &Object, std::unique_ptr PDBSession) diff --git a/lib/DebugInfo/PDB/PDBExtras.cpp b/lib/DebugInfo/PDB/PDBExtras.cpp index e044d03fab9..ebad9a072a5 100644 --- a/lib/DebugInfo/PDB/PDBExtras.cpp +++ b/lib/DebugInfo/PDB/PDBExtras.cpp @@ -12,6 +12,7 @@ #include "llvm/ADT/ArrayRef.h" using namespace llvm; +using namespace llvm::pdb; #define CASE_OUTPUT_ENUM_CLASS_STR(Class, Value, Str, Stream) \ case Class::Value: \ @@ -21,7 +22,8 @@ using namespace llvm; #define CASE_OUTPUT_ENUM_CLASS_NAME(Class, Value, Stream) \ CASE_OUTPUT_ENUM_CLASS_STR(Class, Value, #Value, Stream) -raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_VariantType &Type) { +raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, + const PDB_VariantType &Type) { switch (Type) { CASE_OUTPUT_ENUM_CLASS_NAME(PDB_VariantType, Bool, OS) CASE_OUTPUT_ENUM_CLASS_NAME(PDB_VariantType, Single, OS) @@ -40,7 +42,8 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_VariantType &Type) { return OS; } -raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_CallingConv &Conv) { +raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, + const PDB_CallingConv &Conv) { OS << "__"; switch (Conv) { CASE_OUTPUT_ENUM_CLASS_STR(PDB_CallingConv, NearC , "cdecl", OS) @@ -71,7 +74,7 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_CallingConv &Conv) { return OS; } -raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_DataKind &Data) { +raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_DataKind &Data) { switch (Data) { CASE_OUTPUT_ENUM_CLASS_STR(PDB_DataKind, Unknown, "unknown", OS) CASE_OUTPUT_ENUM_CLASS_STR(PDB_DataKind, Local, "local", OS) @@ -87,7 +90,7 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_DataKind &Data) { return OS; } -raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_RegisterId &Reg) { +raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_RegisterId &Reg) { switch (Reg) { CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, AL, OS) CASE_OUTPUT_ENUM_CLASS_NAME(PDB_RegisterId, CL, OS) @@ -142,7 +145,7 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_RegisterId &Reg) { return OS; } -raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_LocType &Loc) { +raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_LocType &Loc) { switch (Loc) { CASE_OUTPUT_ENUM_CLASS_STR(PDB_LocType, Static, "static", OS) CASE_OUTPUT_ENUM_CLASS_STR(PDB_LocType, TLS, "tls", OS) @@ -160,7 +163,8 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_LocType &Loc) { return OS; } -raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_ThunkOrdinal &Thunk) { +raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, + const PDB_ThunkOrdinal &Thunk) { switch (Thunk) { CASE_OUTPUT_ENUM_CLASS_NAME(PDB_ThunkOrdinal, BranchIsland, OS) CASE_OUTPUT_ENUM_CLASS_NAME(PDB_ThunkOrdinal, Pcode, OS) @@ -173,7 +177,8 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_ThunkOrdinal &Thunk) { return OS; } -raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_Checksum &Checksum) { +raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, + const PDB_Checksum &Checksum) { switch (Checksum) { CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Checksum, None, OS) CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Checksum, MD5, OS) @@ -182,7 +187,7 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_Checksum &Checksum) { return OS; } -raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_Lang &Lang) { +raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_Lang &Lang) { switch (Lang) { CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, C, OS) CASE_OUTPUT_ENUM_CLASS_STR(PDB_Lang, Cpp, "C++", OS) @@ -205,7 +210,7 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_Lang &Lang) { return OS; } -raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_SymType &Tag) { +raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_SymType &Tag) { switch (Tag) { CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Exe, OS) CASE_OUTPUT_ENUM_CLASS_NAME(PDB_SymType, Compiland, OS) @@ -243,7 +248,8 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_SymType &Tag) { return OS; } -raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_MemberAccess &Access) { +raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, + const PDB_MemberAccess &Access) { switch (Access) { CASE_OUTPUT_ENUM_CLASS_STR(PDB_MemberAccess, Public, "public", OS) CASE_OUTPUT_ENUM_CLASS_STR(PDB_MemberAccess, Protected, "protected", OS) @@ -252,7 +258,7 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_MemberAccess &Access) { return OS; } -raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_UdtType &Type) { +raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_UdtType &Type) { switch (Type) { CASE_OUTPUT_ENUM_CLASS_STR(PDB_UdtType, Class, "class", OS) CASE_OUTPUT_ENUM_CLASS_STR(PDB_UdtType, Struct, "struct", OS) @@ -262,7 +268,7 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_UdtType &Type) { return OS; } -raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_UniqueId &Id) { +raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const PDB_UniqueId &Id) { static const char *Lookup = "0123456789ABCDEF"; static_assert(sizeof(PDB_UniqueId) == 16, "Expected 16-byte GUID"); @@ -281,7 +287,8 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_UniqueId &Id) { return OS; } -raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_Machine &Machine) { +raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, + const PDB_Machine &Machine) { switch (Machine) { CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, Am33, OS) CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Machine, Amd64, OS) @@ -309,7 +316,7 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const PDB_Machine &Machine) { return OS; } -raw_ostream &llvm::operator<<(raw_ostream &OS, const Variant &Value) { +raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const Variant &Value) { switch (Value.Type) { case PDB_VariantType::Bool: OS << (Value.Value.Bool ? "true" : "false"); @@ -353,12 +360,13 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const Variant &Value) { return OS; } -raw_ostream &llvm::operator<<(raw_ostream &OS, const VersionInfo &Version) { +raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, + const VersionInfo &Version) { OS << Version.Major << "." << Version.Minor << "." << Version.Build; return OS; } -raw_ostream &llvm::operator<<(raw_ostream &OS, const TagStats &Stats) { +raw_ostream &llvm::pdb::operator<<(raw_ostream &OS, const TagStats &Stats) { for (auto Tag : Stats) { OS << Tag.first << ":" << Tag.second << " "; } diff --git a/lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp b/lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp index 7b6268d8f65..a347c67ba8e 100644 --- a/lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp +++ b/lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp @@ -18,6 +18,7 @@ #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h" using namespace llvm; +using namespace llvm::pdb; IPDBSession::~IPDBSession() {} diff --git a/lib/DebugInfo/PDB/PDBSymDumper.cpp b/lib/DebugInfo/PDB/PDBSymDumper.cpp index 121e2d13d0c..9450a988dd6 100644 --- a/lib/DebugInfo/PDB/PDBSymDumper.cpp +++ b/lib/DebugInfo/PDB/PDBSymDumper.cpp @@ -11,6 +11,7 @@ #include "llvm/Support/ErrorHandling.h" using namespace llvm; +using namespace llvm::pdb; #define PDB_SYMDUMP_UNREACHABLE(Type) \ if (RequireImpl) \ diff --git a/lib/DebugInfo/PDB/PDBSymbol.cpp b/lib/DebugInfo/PDB/PDBSymbol.cpp index 9d83181b53f..78b3afc6079 100644 --- a/lib/DebugInfo/PDB/PDBSymbol.cpp +++ b/lib/DebugInfo/PDB/PDBSymbol.cpp @@ -50,6 +50,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbol::PDBSymbol(const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp b/lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp index a782cad00ae..cdb167b6191 100644 --- a/lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp @@ -14,6 +14,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolAnnotation::PDBSymbolAnnotation(const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolBlock.cpp b/lib/DebugInfo/PDB/PDBSymbolBlock.cpp index 46b0ea553e7..fd5dc9427ab 100644 --- a/lib/DebugInfo/PDB/PDBSymbolBlock.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolBlock.cpp @@ -15,6 +15,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolBlock::PDBSymbolBlock(const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp b/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp index 8393b5cdfd1..ebff08846ca 100644 --- a/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp @@ -15,6 +15,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolCompiland::PDBSymbolCompiland(const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp b/lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp index 7b351a042d0..6dbd5228f2c 100644 --- a/lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp @@ -15,6 +15,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolCompilandDetails::PDBSymbolCompilandDetails( const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp b/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp index 1b30c446a44..9c7f0b1be56 100644 --- a/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp @@ -16,16 +16,17 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolCompilandEnv::PDBSymbolCompilandEnv( const IPDBSession &PDBSession, std::unique_ptr Symbol) : PDBSymbol(PDBSession, std::move(Symbol)) {} std::string PDBSymbolCompilandEnv::getValue() const { - llvm::Variant Value = RawSymbol->getValue(); - if (Value.Type != PDB_VariantType::String) - return std::string(); - return std::string(Value.Value.String); + Variant Value = RawSymbol->getValue(); + if (Value.Type != PDB_VariantType::String) + return std::string(); + return std::string(Value.Value.String); } void PDBSymbolCompilandEnv::dump(PDBSymDumper &Dumper) const { diff --git a/lib/DebugInfo/PDB/PDBSymbolCustom.cpp b/lib/DebugInfo/PDB/PDBSymbolCustom.cpp index bd7d9cda218..0ea387a0eab 100644 --- a/lib/DebugInfo/PDB/PDBSymbolCustom.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolCustom.cpp @@ -16,6 +16,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolCustom::PDBSymbolCustom(const IPDBSession &PDBSession, std::unique_ptr CustomSymbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolData.cpp b/lib/DebugInfo/PDB/PDBSymbolData.cpp index a948c2d08af..62bb6f3f41e 100644 --- a/lib/DebugInfo/PDB/PDBSymbolData.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolData.cpp @@ -15,6 +15,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolData::PDBSymbolData(const IPDBSession &PDBSession, std::unique_ptr DataSymbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolExe.cpp b/lib/DebugInfo/PDB/PDBSymbolExe.cpp index c9e34ea501d..60101c168a7 100644 --- a/lib/DebugInfo/PDB/PDBSymbolExe.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolExe.cpp @@ -14,6 +14,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolExe::PDBSymbolExe(const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolFunc.cpp b/lib/DebugInfo/PDB/PDBSymbolFunc.cpp index 0aff327366c..35251c0cc1c 100644 --- a/lib/DebugInfo/PDB/PDBSymbolFunc.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolFunc.cpp @@ -23,6 +23,7 @@ #include using namespace llvm; +using namespace llvm::pdb; namespace { class FunctionArgEnumerator : public IPDBEnumChildren { diff --git a/lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp b/lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp index 8e559b32405..77e996f651d 100644 --- a/lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp @@ -15,6 +15,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolFuncDebugEnd::PDBSymbolFuncDebugEnd( const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp b/lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp index ff4254f1150..9c653879176 100644 --- a/lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp @@ -15,6 +15,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolFuncDebugStart::PDBSymbolFuncDebugStart( const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolLabel.cpp b/lib/DebugInfo/PDB/PDBSymbolLabel.cpp index f39dee8d949..d2cfd11c35e 100644 --- a/lib/DebugInfo/PDB/PDBSymbolLabel.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolLabel.cpp @@ -14,6 +14,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolLabel::PDBSymbolLabel(const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp b/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp index bd6fe89ac32..97d66874081 100644 --- a/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp @@ -15,6 +15,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolPublicSymbol::PDBSymbolPublicSymbol( const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolThunk.cpp b/lib/DebugInfo/PDB/PDBSymbolThunk.cpp index 733eb5f7503..ef8897d12af 100644 --- a/lib/DebugInfo/PDB/PDBSymbolThunk.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolThunk.cpp @@ -14,6 +14,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolThunk::PDBSymbolThunk(const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp index 19809650361..c010cc5d767 100644 --- a/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp @@ -15,6 +15,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolTypeArray::PDBSymbolTypeArray(const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp index c1f0d2f6db1..382c397b24d 100644 --- a/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp @@ -15,6 +15,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolTypeBaseClass::PDBSymbolTypeBaseClass( const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp index b302b662989..e5d65bf5d1f 100644 --- a/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp @@ -14,6 +14,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolTypeBuiltin::PDBSymbolTypeBuiltin( const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp index cc391f1856c..1d80c97f9ed 100644 --- a/lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp @@ -15,6 +15,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolTypeCustom::PDBSymbolTypeCustom(const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp index 1e19d0b0012..535d97dcd21 100644 --- a/lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp @@ -16,6 +16,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolTypeDimension::PDBSymbolTypeDimension( const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp index 8dd26a342e7..788f2b732aa 100644 --- a/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp @@ -17,6 +17,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolTypeEnum::PDBSymbolTypeEnum(const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp index d3326609454..5831baebb99 100644 --- a/lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp @@ -15,6 +15,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolTypeFriend::PDBSymbolTypeFriend(const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp index f8f71ead88b..c6f586db9e5 100644 --- a/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp @@ -14,6 +14,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolTypeFunctionArg::PDBSymbolTypeFunctionArg( const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp index af3563f891f..057ae260885 100644 --- a/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp @@ -19,6 +19,7 @@ #include using namespace llvm; +using namespace llvm::pdb; namespace { class FunctionArgEnumerator : public IPDBEnumSymbols { diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp index a7fac3030e9..072d2cfd42f 100644 --- a/lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp @@ -15,6 +15,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolTypeManaged::PDBSymbolTypeManaged( const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp b/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp index 082ed83fcf4..699771450a5 100644 --- a/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp @@ -15,6 +15,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolTypePointer::PDBSymbolTypePointer( const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp index 5a426993869..0f283b9e21a 100644 --- a/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp @@ -14,6 +14,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolTypeTypedef::PDBSymbolTypeTypedef( const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp index 2b5da295fde..c71838cc7a6 100644 --- a/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp @@ -14,6 +14,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolTypeUDT::PDBSymbolTypeUDT(const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp index b465d023c59..6b76db5912c 100644 --- a/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp @@ -14,6 +14,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolTypeVTable::PDBSymbolTypeVTable(const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp b/lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp index 16052f1e681..ef509d64bf6 100644 --- a/lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp @@ -15,6 +15,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolTypeVTableShape::PDBSymbolTypeVTableShape( const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolUnknown.cpp b/lib/DebugInfo/PDB/PDBSymbolUnknown.cpp index 48dc11558cc..dbbea9c93e2 100644 --- a/lib/DebugInfo/PDB/PDBSymbolUnknown.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolUnknown.cpp @@ -15,6 +15,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolUnknown::PDBSymbolUnknown(const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp b/lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp index 6cf13de0851..6a62d554f42 100644 --- a/lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp +++ b/lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp @@ -15,6 +15,7 @@ #include using namespace llvm; +using namespace llvm::pdb; PDBSymbolUsingNamespace::PDBSymbolUsingNamespace( const IPDBSession &PDBSession, std::unique_ptr Symbol) diff --git a/lib/DebugInfo/Symbolize/Symbolize.cpp b/lib/DebugInfo/Symbolize/Symbolize.cpp index 12e60476cf7..f8db4032314 100644 --- a/lib/DebugInfo/Symbolize/Symbolize.cpp +++ b/lib/DebugInfo/Symbolize/Symbolize.cpp @@ -367,6 +367,7 @@ LLVMSymbolizer::getOrCreateModuleInfo(const std::string &ModuleName) { std::unique_ptr Context; if (auto CoffObject = dyn_cast(Objects.first)) { + using namespace pdb; // If this is a COFF object, assume it contains PDB debug information. If // we don't find any we will fall back to the DWARF case. std::unique_ptr Session; diff --git a/tools/llvm-pdbdump/BuiltinDumper.cpp b/tools/llvm-pdbdump/BuiltinDumper.cpp index 413a3fcba71..2ce1a783911 100644 --- a/tools/llvm-pdbdump/BuiltinDumper.cpp +++ b/tools/llvm-pdbdump/BuiltinDumper.cpp @@ -14,6 +14,7 @@ #include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h" using namespace llvm; +using namespace llvm::pdb; BuiltinDumper::BuiltinDumper(LinePrinter &P) : PDBSymDumper(false), Printer(P) {} diff --git a/tools/llvm-pdbdump/BuiltinDumper.h b/tools/llvm-pdbdump/BuiltinDumper.h index c325b531e4f..7a2f1438669 100644 --- a/tools/llvm-pdbdump/BuiltinDumper.h +++ b/tools/llvm-pdbdump/BuiltinDumper.h @@ -14,6 +14,7 @@ #include "llvm/DebugInfo/PDB/PDBSymDumper.h" namespace llvm { +namespace pdb { class LinePrinter; @@ -29,5 +30,6 @@ private: LinePrinter &Printer; }; } +} #endif diff --git a/tools/llvm-pdbdump/ClassDefinitionDumper.cpp b/tools/llvm-pdbdump/ClassDefinitionDumper.cpp index 8abf3fa3912..1dfd879eb82 100644 --- a/tools/llvm-pdbdump/ClassDefinitionDumper.cpp +++ b/tools/llvm-pdbdump/ClassDefinitionDumper.cpp @@ -28,6 +28,7 @@ #include "llvm/Support/Format.h" using namespace llvm; +using namespace llvm::pdb; ClassDefinitionDumper::ClassDefinitionDumper(LinePrinter &P) : PDBSymDumper(true), Printer(P) {} diff --git a/tools/llvm-pdbdump/ClassDefinitionDumper.h b/tools/llvm-pdbdump/ClassDefinitionDumper.h index 5b48ba879cf..304e11dcb6c 100644 --- a/tools/llvm-pdbdump/ClassDefinitionDumper.h +++ b/tools/llvm-pdbdump/ClassDefinitionDumper.h @@ -19,6 +19,7 @@ #include namespace llvm { +namespace pdb { class LinePrinter; @@ -58,5 +59,5 @@ private: int dumpAccessGroup(PDB_MemberAccess Access, const SymbolGroup &Group); }; } - +} #endif diff --git a/tools/llvm-pdbdump/CompilandDumper.cpp b/tools/llvm-pdbdump/CompilandDumper.cpp index 86b54589c24..b7de0f2534e 100644 --- a/tools/llvm-pdbdump/CompilandDumper.cpp +++ b/tools/llvm-pdbdump/CompilandDumper.cpp @@ -35,6 +35,7 @@ #include using namespace llvm; +using namespace llvm::pdb; CompilandDumper::CompilandDumper(LinePrinter &P) : PDBSymDumper(true), Printer(P) {} diff --git a/tools/llvm-pdbdump/CompilandDumper.h b/tools/llvm-pdbdump/CompilandDumper.h index 204d34acf1b..462aaeb2611 100644 --- a/tools/llvm-pdbdump/CompilandDumper.h +++ b/tools/llvm-pdbdump/CompilandDumper.h @@ -13,6 +13,7 @@ #include "llvm/DebugInfo/PDB/PDBSymDumper.h" namespace llvm { +namespace pdb { class LinePrinter; @@ -38,5 +39,6 @@ private: LinePrinter &Printer; }; } +} #endif diff --git a/tools/llvm-pdbdump/EnumDumper.cpp b/tools/llvm-pdbdump/EnumDumper.cpp index 3514c39f6e0..02c3df748be 100644 --- a/tools/llvm-pdbdump/EnumDumper.cpp +++ b/tools/llvm-pdbdump/EnumDumper.cpp @@ -18,6 +18,7 @@ #include "llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h" using namespace llvm; +using namespace llvm::pdb; EnumDumper::EnumDumper(LinePrinter &P) : PDBSymDumper(true), Printer(P) {} diff --git a/tools/llvm-pdbdump/EnumDumper.h b/tools/llvm-pdbdump/EnumDumper.h index 23de0614247..0a34e1f89ad 100644 --- a/tools/llvm-pdbdump/EnumDumper.h +++ b/tools/llvm-pdbdump/EnumDumper.h @@ -13,6 +13,7 @@ #include "llvm/DebugInfo/PDB/PDBSymDumper.h" namespace llvm { +namespace pdb { class LinePrinter; @@ -26,5 +27,5 @@ private: LinePrinter &Printer; }; } - +} #endif diff --git a/tools/llvm-pdbdump/ExternalSymbolDumper.cpp b/tools/llvm-pdbdump/ExternalSymbolDumper.cpp index c4e9f474880..508a2405772 100644 --- a/tools/llvm-pdbdump/ExternalSymbolDumper.cpp +++ b/tools/llvm-pdbdump/ExternalSymbolDumper.cpp @@ -15,6 +15,7 @@ #include "llvm/Support/Format.h" using namespace llvm; +using namespace llvm::pdb; ExternalSymbolDumper::ExternalSymbolDumper(LinePrinter &P) : PDBSymDumper(true), Printer(P) {} diff --git a/tools/llvm-pdbdump/ExternalSymbolDumper.h b/tools/llvm-pdbdump/ExternalSymbolDumper.h index d77b09cdebf..b44b8a6fe98 100644 --- a/tools/llvm-pdbdump/ExternalSymbolDumper.h +++ b/tools/llvm-pdbdump/ExternalSymbolDumper.h @@ -13,6 +13,7 @@ #include "llvm/DebugInfo/PDB/PDBSymDumper.h" namespace llvm { +namespace pdb { class LinePrinter; @@ -28,5 +29,6 @@ private: LinePrinter &Printer; }; } +} #endif diff --git a/tools/llvm-pdbdump/FunctionDumper.cpp b/tools/llvm-pdbdump/FunctionDumper.cpp index 7f4181722e7..29ba15d521f 100644 --- a/tools/llvm-pdbdump/FunctionDumper.cpp +++ b/tools/llvm-pdbdump/FunctionDumper.cpp @@ -13,6 +13,7 @@ #include "llvm-pdbdump.h" #include "llvm/DebugInfo/PDB/IPDBSession.h" +#include "llvm/DebugInfo/PDB/PDBExtras.h" #include "llvm/DebugInfo/PDB/PDBSymbolData.h" #include "llvm/DebugInfo/PDB/PDBSymbolFunc.h" #include "llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h" @@ -28,11 +29,12 @@ using namespace llvm; using namespace llvm::codeview; +using namespace llvm::pdb; namespace { template void dumpClassParentWithScopeOperator(const T &Symbol, LinePrinter &Printer, - llvm::FunctionDumper &Dumper) { + FunctionDumper &Dumper) { uint32_t ClassParentId = Symbol.getClassParentId(); auto ClassParent = Symbol.getSession().template getConcreteSymbolById( @@ -58,7 +60,7 @@ void FunctionDumper::start(const PDBSymbolTypeFunctionSig &Symbol, Symbol.getSession().getConcreteSymbolById( ClassParentId); - CallingConvention CC = Symbol.getCallingConvention(); + PDB_CallingConv CC = Symbol.getCallingConvention(); bool ShouldDumpCallingConvention = true; if ((ClassParent && CC == CallingConvention::ThisCall) || (!ClassParent && CC == CallingConvention::NearStdCall)) { diff --git a/tools/llvm-pdbdump/FunctionDumper.h b/tools/llvm-pdbdump/FunctionDumper.h index 19a00145a1f..c71fafa18ed 100644 --- a/tools/llvm-pdbdump/FunctionDumper.h +++ b/tools/llvm-pdbdump/FunctionDumper.h @@ -13,7 +13,7 @@ #include "llvm/DebugInfo/PDB/PDBSymDumper.h" namespace llvm { - +namespace pdb { class LinePrinter; class FunctionDumper : public PDBSymDumper { @@ -38,5 +38,6 @@ private: LinePrinter &Printer; }; } +} #endif diff --git a/tools/llvm-pdbdump/LinePrinter.cpp b/tools/llvm-pdbdump/LinePrinter.cpp index a43727f02b5..db1180902cc 100644 --- a/tools/llvm-pdbdump/LinePrinter.cpp +++ b/tools/llvm-pdbdump/LinePrinter.cpp @@ -16,6 +16,9 @@ #include +using namespace llvm; +using namespace llvm::pdb; + namespace { bool IsItemExcluded(llvm::StringRef Item, std::list &IncludeFilters, diff --git a/tools/llvm-pdbdump/LinePrinter.h b/tools/llvm-pdbdump/LinePrinter.h index b0a9d2cfc4e..a4401f8af95 100644 --- a/tools/llvm-pdbdump/LinePrinter.h +++ b/tools/llvm-pdbdump/LinePrinter.h @@ -18,6 +18,7 @@ #include namespace llvm { +namespace pdb { class LinePrinter { friend class WithColor; @@ -88,5 +89,6 @@ private: raw_ostream &OS; }; } +} #endif diff --git a/tools/llvm-pdbdump/TypeDumper.cpp b/tools/llvm-pdbdump/TypeDumper.cpp index 39bdde93c6a..f6ec9637cf3 100644 --- a/tools/llvm-pdbdump/TypeDumper.cpp +++ b/tools/llvm-pdbdump/TypeDumper.cpp @@ -24,6 +24,7 @@ #include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h" using namespace llvm; +using namespace llvm::pdb; TypeDumper::TypeDumper(LinePrinter &P) : PDBSymDumper(true), Printer(P) {} diff --git a/tools/llvm-pdbdump/TypeDumper.h b/tools/llvm-pdbdump/TypeDumper.h index 5c0832eccaf..76a477964f1 100644 --- a/tools/llvm-pdbdump/TypeDumper.h +++ b/tools/llvm-pdbdump/TypeDumper.h @@ -13,7 +13,7 @@ #include "llvm/DebugInfo/PDB/PDBSymDumper.h" namespace llvm { - +namespace pdb { class LinePrinter; class TypeDumper : public PDBSymDumper { @@ -30,5 +30,5 @@ private: LinePrinter &Printer; }; } - +} #endif diff --git a/tools/llvm-pdbdump/TypedefDumper.cpp b/tools/llvm-pdbdump/TypedefDumper.cpp index a6b5c53a6b3..b1e017613ce 100644 --- a/tools/llvm-pdbdump/TypedefDumper.cpp +++ b/tools/llvm-pdbdump/TypedefDumper.cpp @@ -23,6 +23,7 @@ #include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h" using namespace llvm; +using namespace llvm::pdb; TypedefDumper::TypedefDumper(LinePrinter &P) : PDBSymDumper(true), Printer(P) {} diff --git a/tools/llvm-pdbdump/TypedefDumper.h b/tools/llvm-pdbdump/TypedefDumper.h index 8cd578cc6d2..c22b58a7e41 100644 --- a/tools/llvm-pdbdump/TypedefDumper.h +++ b/tools/llvm-pdbdump/TypedefDumper.h @@ -13,6 +13,7 @@ #include "llvm/DebugInfo/PDB/PDBSymDumper.h" namespace llvm { +namespace pdb { class LinePrinter; @@ -33,5 +34,6 @@ private: LinePrinter &Printer; }; } +} #endif diff --git a/tools/llvm-pdbdump/VariableDumper.cpp b/tools/llvm-pdbdump/VariableDumper.cpp index e5665b5fcaf..d8b66a6737c 100644 --- a/tools/llvm-pdbdump/VariableDumper.cpp +++ b/tools/llvm-pdbdump/VariableDumper.cpp @@ -27,6 +27,7 @@ #include "llvm/Support/Format.h" using namespace llvm; +using namespace llvm::pdb; VariableDumper::VariableDumper(LinePrinter &P) : PDBSymDumper(true), Printer(P) {} diff --git a/tools/llvm-pdbdump/VariableDumper.h b/tools/llvm-pdbdump/VariableDumper.h index 7d4af8afdf8..4f00358878c 100644 --- a/tools/llvm-pdbdump/VariableDumper.h +++ b/tools/llvm-pdbdump/VariableDumper.h @@ -15,6 +15,9 @@ namespace llvm { class StringRef; + +namespace pdb { + class LinePrinter; class VariableDumper : public PDBSymDumper { @@ -37,5 +40,5 @@ private: LinePrinter &Printer; }; } - +} #endif