diff options
author | Chris Lattner <sabre@nondot.org> | 2007-01-11 04:30:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-01-11 04:30:21 +0000 |
commit | 550a8f37606d582fa2775f4e33aab47723acd4d4 (patch) | |
tree | fdc4d3c7c04208b5972bee41d217c3321f5af5f2 /llvm/lib | |
parent | 5e0433232673e4e3d6a14cdeb02d6cce47801af0 (diff) | |
download | bcm5719-llvm-550a8f37606d582fa2775f4e33aab47723acd4d4.tar.gz bcm5719-llvm-550a8f37606d582fa2775f4e33aab47723acd4d4.zip |
simplify some logic further
llvm-svn: 33069
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index f7e1f051f7e..181f8e68c61 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -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 |