[cfe-commits] r63031 - /cfe/trunk/lib/Analysis/RegionStore.cpp
Sebastian Redl
sebastian.redl at getdesigned.at
Mon Jan 26 11:54:12 PST 2009
Author: cornedbee
Date: Mon Jan 26 13:54:12 2009
New Revision: 63031
URL: http://llvm.org/viewvc/llvm-project?rev=63031&view=rev
Log:
Correct size assumption; fixes a crash on amd64.
Modified:
cfe/trunk/lib/Analysis/RegionStore.cpp
Modified: cfe/trunk/lib/Analysis/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=63031&r1=63030&r2=63031&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
+++ cfe/trunk/lib/Analysis/RegionStore.cpp Mon Jan 26 13:54:12 2009
@@ -888,7 +888,8 @@
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)) {
More information about the cfe-commits
mailing list