From 702c1d11b59ae7f77d7473d0ac754279a65b1187 Mon Sep 17 00:00:00 2001 From: Jim Laskey Date: Sun, 26 Feb 2006 10:16:05 +0000 Subject: [PATCH] Reverting. Didn't realize some developers were embedding constants in their target assembler code gen. llvm-svn: 26383 --- llvm/lib/VMCore/AsmWriter.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index 80085d015d8a..cf9af3f71502 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -419,7 +419,6 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV, bool PrintName, std::map &TypeTable, SlotMachine *Machine) { - static std::string Indent = "\n"; if (const ConstantBool *CB = dyn_cast(CV)) { Out << (CB == ConstantBool::True ? "true" : "false"); } else if (const ConstantSInt *CI = dyn_cast(CV)) { @@ -485,12 +484,7 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV, Out << '{'; unsigned N = CS->getNumOperands(); if (N) { - if (N > 2) { - Indent += " "; - Out << Indent; - } else { - Out << ' '; - } + Out << ' '; printTypeInt(Out, CS->getOperand(0)->getType(), TypeTable); WriteAsOperandInternal(Out, CS->getOperand(0), @@ -498,13 +492,11 @@ static void WriteConstantInt(std::ostream &Out, const Constant *CV, for (unsigned i = 1; i < N; i++) { Out << ", "; - if (N > 2) Out << Indent; printTypeInt(Out, CS->getOperand(i)->getType(), TypeTable); WriteAsOperandInternal(Out, CS->getOperand(i), PrintName, TypeTable, Machine); } - if (N > 2) Indent.resize(Indent.size() - 4); } Out << " }";