diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-04 22:53:46 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-04 22:53:46 +0000 |
commit | a880b66d6e0e446501fcbc27b87a1ec0e4ecde4c (patch) | |
tree | 25628d50df5e564ac93a12a0344fa9d52c14455c /lib/Analysis/SymbolManager.cpp | |
parent | 58a851409298a53e1a6245cb24b8403ac09264ff (diff) |
Add an optional "tag" to conjured symbols that allows us to distinguish between
multiple symbols conjured at the same location. All that is required of the tag
is that it is a fixed void* value that points to an memory address that remains
valid throughout the remainder of the lifetime of the SymbolManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66092 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/SymbolManager.cpp')
-rw-r--r-- | lib/Analysis/SymbolManager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Analysis/SymbolManager.cpp b/lib/Analysis/SymbolManager.cpp index 45e1aae23b..589178fecb 100644 --- a/lib/Analysis/SymbolManager.cpp +++ b/lib/Analysis/SymbolManager.cpp @@ -52,10 +52,11 @@ SymbolRef SymbolManager::getRegionRValueSymbol(const MemRegion* R) { return SymbolCounter++; } -SymbolRef SymbolManager::getConjuredSymbol(Stmt* E, QualType T, unsigned Count){ +SymbolRef SymbolManager::getConjuredSymbol(Stmt* E, QualType T, unsigned Count, + const void* SymbolTag) { llvm::FoldingSetNodeID profile; - SymbolConjured::Profile(profile, E, T, Count); + SymbolConjured::Profile(profile, E, T, Count, SymbolTag); void* InsertPos; SymbolData* SD = DataSet.FindNodeOrInsertPos(profile, InsertPos); @@ -64,7 +65,7 @@ SymbolRef SymbolManager::getConjuredSymbol(Stmt* E, QualType T, unsigned Count){ return SD->getSymbol(); SD = (SymbolData*) BPAlloc.Allocate<SymbolConjured>(); - new (SD) SymbolConjured(SymbolCounter, E, T, Count); + new (SD) SymbolConjured(SymbolCounter, E, T, Count, SymbolTag); DataSet.InsertNode(SD, InsertPos); DataMap[SymbolCounter] = SD; |