From 162b02e327873f2460dc9f2863f7ef7e77df9d56 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Wed, 10 Jan 2007 09:18:16 +0000 Subject: [PATCH] Back out the last patch which is a nightly test killer. The assertion in getLocalSlot fires on many, many values. It broke nearly all of the dejagnu tests. Simple changes to the assertion did not fix the problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33054 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/AsmWriter.cpp | 126 +++++++++++++++++++-------------------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 80b54c58d92..263385c6119 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -75,9 +75,9 @@ public: /// @{ public: /// Return the slot number of the specified value in it's type - /// plane. If something is not in the SlotMachine, return -1. - int getLocalSlot(const Value *V); - int getGlobalSlot(const GlobalValue *V); + /// plane. Its an error to ask for something not in the SlotMachine. + /// Its an error to ask for a Type* + int getSlot(const Value *V); /// @} /// @name Mutators @@ -597,20 +597,13 @@ static void WriteAsOperandInternal(std::ostream &Out, const Value *V, } else { int Slot; if (Machine) { - if (const GlobalValue *GV = dyn_cast(V)) - Slot = Machine->getGlobalSlot(GV); - else - Slot = Machine->getLocalSlot(V); + Slot = Machine->getSlot(V); } else { Machine = createSlotMachine(V); - if (Machine) { - if (const GlobalValue *GV = dyn_cast(V)) - Slot = Machine->getGlobalSlot(GV); - else - Slot = Machine->getLocalSlot(V); - } else { + if (Machine) + Slot = Machine->getSlot(V); + else Slot = -1; - } delete Machine; } if (Slot != -1) @@ -1049,7 +1042,7 @@ void AssemblyWriter::printBasicBlock(const BasicBlock *BB) { Out << "\n" << getLLVMName(BB->getName(), false) << ':'; } else if (!BB->use_empty()) { // Don't print block # of no uses... Out << "\n;