Avoid incorrectly adding null values to the scalar map!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2085 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-04-01 00:45:09 +00:00
parent dba61f34e8
commit e0d1d1acf6

View File

@ -267,6 +267,7 @@ void FunctionRepBuilder::visitStoreInst(StoreInst *SI) {
// into data structures...
//
if (!isa<PointerType>(SI->getOperand(0)->getType())) return;
if (!ValueMap.count(SI->getOperand(0))) return; // Src scalar has no values!
const PointerValSet &SrcPVS = ValueMap[SI->getOperand(0)];
const PointerValSet &PtrPVS = ValueMap[SI->getOperand(1)];