summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-06-09 22:22:10 +0000
committerChris Lattner <sabre@nondot.org>2004-06-09 22:22:10 +0000
commit68a038e6a1d00f255bc8e13b1289694b9d3ccd48 (patch)
tree53424182100d580a2bf750d1d5d4b8a766a66fa4 /llvm/lib
parent5b03a0628ff77b7b4eff00e6ed5539b2c5b967b0 (diff)
downloadbcm5719-llvm-68a038e6a1d00f255bc8e13b1289694b9d3ccd48.tar.gz
bcm5719-llvm-68a038e6a1d00f255bc8e13b1289694b9d3ccd48.zip
Tolerate more errors
llvm-svn: 14104
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/AsmWriter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index 72caa80b5b3..3484d3976e3 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud