aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/RegionStore.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2009-01-26 19:54:12 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2009-01-26 19:54:12 +0000
commit1be3da51d26b4ee95a46c21f48eba5c5caa4b1b0 (patch)
tree50b590357909e29b31587a14ce9eb23d87ce1fa9 /lib/Analysis/RegionStore.cpp
parentbcd1a1b5af0b2d57b20fc393a8c3b0badc58c450 (diff)
Correct size assumption; fixes a crash on amd64.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63031 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r--lib/Analysis/RegionStore.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp
index f519d4d1cd..e50b0abb61 100644
--- a/lib/Analysis/RegionStore.cpp
+++ b/lib/Analysis/RegionStore.cpp
@@ -888,7 +888,8 @@ const GRState* RegionStoreManager::BindArray(const GRState* St,
ConstantArrayType* CAT = cast<ConstantArrayType>(T.getTypePtr());
llvm::APSInt Size(CAT->getSize(), false);
- llvm::APSInt i = getBasicVals().getZeroWithPtrWidth(false);
+ llvm::APSInt i = getBasicVals().getValue(0, Size.getBitWidth(),
+ Size.isUnsigned());
// Check if the init expr is a StringLiteral.
if (isa<loc::MemRegionVal>(Init)) {