Avoid incorrectly adding null values to the scalar map!
authorChris Lattner <sabre@nondot.org>
Mon, 1 Apr 2002 00:45:09 +0000 (00:45 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 1 Apr 2002 00:45:09 +0000 (00:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2085 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/FunctionRepBuilder.cpp

index f4689eb854d7fd1876c5265ff9d85921ff9fce19..f0d8aa3801e0b45482d82300a4555bdc47283922 100644 (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)];