Make RegionStoreManager::InitializeArray safe against array sizes that don't have pointer width.

This may be the case on 64-bit systems. Whether that fact is a bug is a different question, but it's easy to cure the symptom.

llvm-svn: 60422
This commit is contained in:
Sebastian Redl 2008-12-02 16:47:35 +00:00
parent db36b9b962
commit 6ef75e9ee8
1 changed files with 2 additions and 1 deletions

View File

@ -639,7 +639,8 @@ Store RegionStoreManager::InitializeArray(Store store, const TypedRegion* R,
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)) {