simplify some logic further
authorChris Lattner <sabre@nondot.org>
Thu, 11 Jan 2007 04:30:21 +0000 (04:30 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 11 Jan 2007 04:30:21 +0000 (04:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33069 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/AsmWriter.cpp

index f7e1f051f7e5d51f29b2e0395f1cbd2a362855c1..181f8e68c6166252b861e21902922cf6812c5aae 100644 (file)
@@ -1516,17 +1516,8 @@ int SlotMachine::getLocalSlot(const Value *V) {
   ValueMap::const_iterator FVI = FI->second.map.find(V);
   TypedPlanes::const_iterator MI = mMap.find(VTy);
   
-  // If the value doesn't exist in the function map
-  if (FVI == FI->second.map.end()) {
-    // 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;
-    assert(MVI != MI->second.map.end() && "Value not found");
-    // We found it only at the module level
-    return MVI->second;
-  }
+  // If the value doesn't exist in the function map, it is a <badref>
+  if (FVI == FI->second.map.end()) return -1;
   
   // Return the slot number as the module's contribution to
   // the type plane plus the index in the function's contribution