From e9e326e2eb223ea4bc6762a099ce3c314e4daedb Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 9 Jun 2004 22:22:10 +0000 Subject: [PATCH] Tolerate more errors git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14104 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/AsmWriter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 72caa80b5b3..3484d3976e3 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -1310,7 +1310,8 @@ int SlotMachine::getSlot(const Value *V) { ValueMap::const_iterator FVI = FI->second.map.find(V); // If the value doesn't exist in the function map if ( FVI == FI->second.map.end() ) { - // Look up the value in the module map + // Look up the value in the module map. + if (MI == mMap.end()) return -1; ValueMap::const_iterator MVI = MI->second.map.find(V); // If we didn't find it, it wasn't inserted if (MVI == MI->second.map.end()) return -1;