aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-01-11 06:52:53 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-01-11 06:52:53 +0000
commit604848a49d2a9c0985225bbe3a39fca223e961bb (patch)
tree2ef929a4b759f43d721ace604d8710db40b94e0a /lib
parentcd991dbb12f24368753cef086c7ad3ec203c9ea6 (diff)
Enhance SVals::getAsRegion: get the region that is converted to an integer.
This with previous patch fixes a OSAtomic test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93146 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/SVals.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Analysis/SVals.cpp b/lib/Analysis/SVals.cpp
index 9163b27252..fbdb73b0ef 100644
--- a/lib/Analysis/SVals.cpp
+++ b/lib/Analysis/SVals.cpp
@@ -97,6 +97,10 @@ const MemRegion *SVal::getAsRegion() const {
if (const loc::MemRegionVal *X = dyn_cast<loc::MemRegionVal>(this))
return X->getRegion();
+ if (const nonloc::LocAsInteger *X = dyn_cast<nonloc::LocAsInteger>(this)) {
+ return X->getLoc().getAsRegion();
+ }
+
return 0;
}