Mercurial > hg > CbC > CbC_llvm
comparison lib/DebugInfo/PDB/PDBSymbolFunc.cpp @ 121:803732b1fca8
LLVM 5.0
author | kono |
---|---|
date | Fri, 27 Oct 2017 17:07:41 +0900 |
parents | 1172e4bd9c6f |
children | 3a76565eade5 |
comparison
equal
deleted
inserted
replaced
120:1172e4bd9c6f | 121:803732b1fca8 |
---|---|
10 #include "llvm/DebugInfo/PDB/PDBSymbolFunc.h" | 10 #include "llvm/DebugInfo/PDB/PDBSymbolFunc.h" |
11 | 11 |
12 #include "llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h" | 12 #include "llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h" |
13 #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" | 13 #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" |
14 #include "llvm/DebugInfo/PDB/IPDBSession.h" | 14 #include "llvm/DebugInfo/PDB/IPDBSession.h" |
15 #include "llvm/DebugInfo/PDB/PDBSymDumper.h" | |
15 #include "llvm/DebugInfo/PDB/PDBSymbolData.h" | 16 #include "llvm/DebugInfo/PDB/PDBSymbolData.h" |
16 #include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h" | 17 #include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h" |
17 #include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h" | 18 #include "llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h" |
18 #include "llvm/DebugInfo/PDB/PDBSymDumper.h" | |
19 #include "llvm/DebugInfo/PDB/PDBTypes.h" | 19 #include "llvm/DebugInfo/PDB/PDBTypes.h" |
20 | 20 |
21 #include <unordered_set> | 21 #include <unordered_set> |
22 #include <utility> | 22 #include <utility> |
23 #include <vector> | 23 #include <vector> |
83 }; | 83 }; |
84 } | 84 } |
85 | 85 |
86 PDBSymbolFunc::PDBSymbolFunc(const IPDBSession &PDBSession, | 86 PDBSymbolFunc::PDBSymbolFunc(const IPDBSession &PDBSession, |
87 std::unique_ptr<IPDBRawSymbol> Symbol) | 87 std::unique_ptr<IPDBRawSymbol> Symbol) |
88 : PDBSymbol(PDBSession, std::move(Symbol)) {} | 88 : PDBSymbol(PDBSession, std::move(Symbol)) { |
89 | 89 assert(RawSymbol->getSymTag() == PDB_SymType::Function); |
90 std::unique_ptr<PDBSymbolTypeFunctionSig> PDBSymbolFunc::getSignature() const { | |
91 return Session.getConcreteSymbolById<PDBSymbolTypeFunctionSig>(getTypeId()); | |
92 } | 90 } |
93 | 91 |
94 std::unique_ptr<IPDBEnumChildren<PDBSymbolData>> | 92 std::unique_ptr<IPDBEnumChildren<PDBSymbolData>> |
95 PDBSymbolFunc::getArguments() const { | 93 PDBSymbolFunc::getArguments() const { |
96 return llvm::make_unique<FunctionArgEnumerator>(Session, *this); | 94 return llvm::make_unique<FunctionArgEnumerator>(Session, *this); |
97 } | 95 } |
98 | 96 |
99 std::unique_ptr<PDBSymbolTypeUDT> PDBSymbolFunc::getClassParent() const { | 97 void PDBSymbolFunc::dump(PDBSymDumper &Dumper) const { Dumper.dump(*this); } |
100 return Session.getConcreteSymbolById<PDBSymbolTypeUDT>(getClassParentId()); | 98 |
99 bool PDBSymbolFunc::isDestructor() const { | |
100 std::string Name = getName(); | |
101 if (Name.empty()) | |
102 return false; | |
103 if (Name[0] == '~') | |
104 return true; | |
105 if (Name == "__vecDelDtor") | |
106 return true; | |
107 return false; | |
101 } | 108 } |
102 | |
103 void PDBSymbolFunc::dump(PDBSymDumper &Dumper) const { Dumper.dump(*this); } |