summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-03-04 22:53:46 +0000
committerTed Kremenek <kremenek@apple.com>2009-03-04 22:53:46 +0000
commit6ee8f8bcb51b353d2ad2f256b3f840c39e90efe3 (patch)
treedfa62e0d9d9c8cf008f25ead716218a975d891a3 /clang/lib/Analysis
parent2d33d6300cd2cda457d993d03c8179cc72f6af4f (diff)
downloadbcm5719-llvm-6ee8f8bcb51b353d2ad2f256b3f840c39e90efe3.tar.gz
bcm5719-llvm-6ee8f8bcb51b353d2ad2f256b3f840c39e90efe3.zip
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. llvm-svn: 66092
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r--clang/lib/Analysis/SymbolManager.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Analysis/SymbolManager.cpp b/clang/lib/Analysis/SymbolManager.cpp
index 45e1aae23bc..589178fecb1 100644
--- a/clang/lib/Analysis/SymbolManager.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud