llvm.org GIT mirror llvm / 611e805
[DebugInfoPDB] Add DIA implementation for getSrcLineOnTypeDefn Summary: This helps to determine the line number for a PDB type with definition Reviewers: zturner, llvm-commits, rnk Reviewed By: zturner Subscribers: rengolin, JDevlieghere Differential Revision: https://reviews.llvm.org/D44119 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326857 91177308-0d34-0410-b5e6-96231b3b80d8 Aaron Smith 1 year, 8 months ago
6 changed file(s) with 25 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
102102 uint32_t getSizeInUdt() const override;
103103 uint32_t getSlot() const override;
104104 std::string getSourceFileName() const override;
105 std::unique_ptr getSrcLineOnTypeDefn() const override;
105106 uint32_t getStride() const override;
106107 uint32_t getSubTypeId() const override;
107108 std::string getSymbolsFileName() const override;
114114 virtual uint32_t getSizeInUdt() const = 0;
115115 virtual uint32_t getSlot() const = 0;
116116 virtual std::string getSourceFileName() const = 0;
117 virtual std::unique_ptr
118 getSrcLineOnTypeDefn() const = 0;
117119 virtual uint32_t getStride() const = 0;
118120 virtual uint32_t getSubTypeId() const = 0;
119121 virtual std::string getSymbolsFileName() const = 0;
107107 uint32_t getSizeInUdt() const override;
108108 uint32_t getSlot() const override;
109109 std::string getSourceFileName() const override;
110 std::unique_ptr getSrcLineOnTypeDefn() const override;
110111 uint32_t getStride() const override;
111112 uint32_t getSubTypeId() const override;
112113 std::string getSymbolsFileName() const override;
1212 #include "llvm/DebugInfo/CodeView/Formatters.h"
1313 #include "llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h"
1414 #include "llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h"
15 #include "llvm/DebugInfo/PDB/DIA/DIALineNumber.h"
1516 #include "llvm/DebugInfo/PDB/DIA/DIASession.h"
1617 #include "llvm/DebugInfo/PDB/PDBExtras.h"
1718 #include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
747748 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_sourceFileName);
748749 }
749750
751 std::unique_ptr
752 DIARawSymbol::getSrcLineOnTypeDefn() const {
753 CComPtr LineNumber;
754 if (FAILED(Symbol->getSrcLineOnTypeDefn(&LineNumber)) || !LineNumber)
755 return nullptr;
756
757 return llvm::make_unique(LineNumber);
758 }
759
750760 uint32_t DIARawSymbol::getStride() const {
751761 return PrivateGetDIAValue(Symbol, &IDiaSymbol::get_stride);
752762 }
66 //
77 //===----------------------------------------------------------------------===//
88
9 #include "llvm/DebugInfo/PDB/IPDBLineNumber.h"
910 #include "llvm/DebugInfo/PDB/Native/NativeRawSymbol.h"
1011 #include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
1112
277278 return {};
278279 }
279280
281 std::unique_ptr
282 NativeRawSymbol::getSrcLineOnTypeDefn() const {
283 return nullptr;
284 }
285
280286 uint32_t NativeRawSymbol::getStride() const {
281287 return 0;
282288 }
1010
1111 #include "llvm/ADT/STLExtras.h"
1212 #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
13 #include "llvm/DebugInfo/PDB/IPDBLineNumber.h"
1314 #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
1415 #include "llvm/DebugInfo/PDB/IPDBSession.h"
1516 #include "llvm/DebugInfo/PDB/IPDBSourceFile.h"
192193
193194 std::string getUndecoratedNameEx(PDB_UndnameFlags Flags) const override {
194195 return {};
196 }
197
198 std::unique_ptr getSrcLineOnTypeDefn() const override {
199 return nullptr;
195200 }
196201
197202 MOCK_SYMBOL_ACCESSOR(getAccess)