diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 24c33489a8e..72caa80b5b3 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -74,7 +74,7 @@ public: /// Return the slot number of the specified value in it's type /// plane. Its an error to ask for something not in the SlotMachine. /// Its an error to ask for a Type* - unsigned getSlot(const Value *V, bool ignoreMissing = false ) ; + int getSlot(const Value *V); /// Determine if a Value has a slot or not bool hasSlot(const Value* V); @@ -525,12 +525,16 @@ static void WriteAsOperandInternal(std::ostream &Out, const Value *V, } Machine = createSlotMachine(V); - if (Machine == 0) { Out << "BAD VALUE TYPE!"; return; } - - Slot = Machine->getSlot(V); + if (Machine == 0) + Slot = Machine->getSlot(V); + else + Slot = -1; delete Machine; } - Out << '%' << Slot; + if (Slot != -1) + Out << '%' << Slot; + else + Out << ""; } } } @@ -841,7 +845,12 @@ void AssemblyWriter::printBasicBlock(const BasicBlock *BB) { if (BB->hasName()) { // Print out the label if it exists... *Out << "\n" << BB->getName() << ':'; } else if (!BB->use_empty()) { // Don't print block # of no uses... - *Out << "\n;