aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/SymbolManager.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-06-19 06:00:32 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-06-19 06:00:32 +0000
commit45257c37a4e9a8f915661e0f964aec375909eb4c (patch)
tree8e8263c941e421066b82dbb558c0b80e5bf04110 /lib/Analysis/SymbolManager.cpp
parent005f07b874ae559047f6189e2f770739695f6779 (diff)
A further step of r73690: associate the cast-to type with the created symbol,
because the type of the symbol is used to create the default range. We need the sign to be consistent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73756 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/SymbolManager.cpp')
-rw-r--r--lib/Analysis/SymbolManager.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Analysis/SymbolManager.cpp b/lib/Analysis/SymbolManager.cpp
index 5c885cd6e1..4e38a3492c 100644
--- a/lib/Analysis/SymbolManager.cpp
+++ b/lib/Analysis/SymbolManager.cpp
@@ -92,14 +92,14 @@ std::ostream& std::operator<<(std::ostream& os, const SymExpr *SE) {
}
const SymbolRegionValue*
-SymbolManager::getRegionValueSymbol(const MemRegion* R) {
+SymbolManager::getRegionValueSymbol(const MemRegion* R, QualType T) {
llvm::FoldingSetNodeID profile;
- SymbolRegionValue::Profile(profile, R);
+ SymbolRegionValue::Profile(profile, R, T);
void* InsertPos;
SymExpr *SD = DataSet.FindNodeOrInsertPos(profile, InsertPos);
if (!SD) {
SD = (SymExpr*) BPAlloc.Allocate<SymbolRegionValue>();
- new (SD) SymbolRegionValue(SymbolCounter, R);
+ new (SD) SymbolRegionValue(SymbolCounter, R, T);
DataSet.InsertNode(SD, InsertPos);
++SymbolCounter;
}
@@ -166,6 +166,9 @@ QualType SymbolConjured::getType(ASTContext&) const {
}
QualType SymbolRegionValue::getType(ASTContext& C) const {
+ if (!T.isNull())
+ return T;
+
if (const TypedRegion* TR = dyn_cast<TypedRegion>(R))
return TR->getValueType(C);