diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-01-11 06:52:53 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-01-11 06:52:53 +0000 |
commit | 604848a49d2a9c0985225bbe3a39fca223e961bb (patch) | |
tree | 2ef929a4b759f43d721ace604d8710db40b94e0a /lib | |
parent | cd991dbb12f24368753cef086c7ad3ec203c9ea6 (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.cpp | 4 |
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; } |