[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp

Jim Laskey jlaskey at apple.com
Sun Feb 26 02:16:28 PST 2006



Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.192 -> 1.193
---
Log message:

Reverting. Didn't realize some developers were embedding constants in their
target assembler code gen.


---
Diffs of the changes:  (+1 -9)

 AsmWriter.cpp |   10 +---------
 1 files changed, 1 insertion(+), 9 deletions(-)


Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.192 llvm/lib/VMCore/AsmWriter.cpp:1.193
--- llvm/lib/VMCore/AsmWriter.cpp:1.192	Sat Feb 25 06:27:03 2006
+++ llvm/lib/VMCore/AsmWriter.cpp	Sun Feb 26 04:16:05 2006
@@ -419,7 +419,6 @@
                              bool PrintName,
                              std::map<const Type *, std::string> &TypeTable,
                              SlotMachine *Machine) {
-  static std::string Indent = "\n";
   if (const ConstantBool *CB = dyn_cast<ConstantBool>(CV)) {
     Out << (CB == ConstantBool::True ? "true" : "false");
   } else if (const ConstantSInt *CI = dyn_cast<ConstantSInt>(CV)) {
@@ -485,12 +484,7 @@
     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 @@
 
       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 << " }";






More information about the llvm-commits mailing list