summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorAdrian McCarthy <amccarth@google.com>2017-06-22 18:43:18 +0000
committerAdrian McCarthy <amccarth@google.com>2017-06-22 18:43:18 +0000
commit31bcb6f680a07ddfc90f01dbfeb38b9994a67c3c (patch)
treeda3e0cb31b60411e037123d09f8f4f20b6be3a2e /llvm/include
parent6a4b080a5f10f873e163eb526e499a75accea3a2 (diff)
downloadbcm5719-llvm-31bcb6f680a07ddfc90f01dbfeb38b9994a67c3c.tar.gz
bcm5719-llvm-31bcb6f680a07ddfc90f01dbfeb38b9994a67c3c.zip
Add IDs and clone methods to NativeRawSymbol
All NativeRawSymbols will have a unique symbol ID (retrievable via getSymIndexId). For now, these are initialized to 0, but soon the NativeSession will be responsible for creating the raw symbols, and it will assign unique IDs. The symbol cache in the NativeSession will also require the ability to clone raw symbols, so I've provided implementations for that as well. llvm-svn: 306042
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h6
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h4
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h5
3 files changed, 12 insertions, 3 deletions
diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h b/llvm/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h
index 22ed61910d9..1687737f0e7 100644
--- a/llvm/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h
+++ b/llvm/include/llvm/DebugInfo/PDB/Native/NativeCompilandSymbol.h
@@ -18,7 +18,11 @@ namespace pdb {
class NativeCompilandSymbol : public NativeRawSymbol {
public:
- NativeCompilandSymbol(NativeSession &Session, DbiModuleDescriptor MI);
+ NativeCompilandSymbol(NativeSession &Session, uint32_t SymbolId,
+ DbiModuleDescriptor MI);
+
+ std::unique_ptr<NativeRawSymbol> clone() const override;
+
PDB_SymType getSymTag() const override;
bool isEditAndContinueEnabled() const override;
uint32_t getLexicalParentId() const override;
diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h b/llvm/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h
index 9516810539b..15bac78df19 100644
--- a/llvm/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h
+++ b/llvm/include/llvm/DebugInfo/PDB/Native/NativeExeSymbol.h
@@ -18,7 +18,9 @@ namespace pdb {
class NativeExeSymbol : public NativeRawSymbol {
public:
- NativeExeSymbol(NativeSession &Session);
+ NativeExeSymbol(NativeSession &Session, uint32_t SymbolId);
+
+ std::unique_ptr<NativeRawSymbol> clone() const override;
std::unique_ptr<IPDBEnumSymbols>
findChildren(PDB_SymType Type) const override;
diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h b/llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h
index e1e78035ff3..5e4aaafff1a 100644
--- a/llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h
+++ b/llvm/include/llvm/DebugInfo/PDB/Native/NativeRawSymbol.h
@@ -19,7 +19,9 @@ class NativeSession;
class NativeRawSymbol : public IPDBRawSymbol {
public:
- explicit NativeRawSymbol(NativeSession &PDBSession);
+ NativeRawSymbol(NativeSession &PDBSession, uint32_t SymbolId);
+
+ virtual std::unique_ptr<NativeRawSymbol> clone() const = 0;
void dump(raw_ostream &OS, int Indent) const override;
@@ -201,6 +203,7 @@ public:
protected:
NativeSession &Session;
+ uint32_t SymbolId;
};
}
OpenPOWER on IntegriCloud