[llvm-commits] CVS: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

Chris Lattner sabre at nondot.org
Tue May 1 00:03:55 PDT 2007



Changes in directory llvm/lib/Bitcode/Writer:

BitcodeWriter.cpp updated: 1.18 -> 1.19
---
Log message:

fix build with non-buggy compilers


---
Diffs of the changes:  (+11 -10)

 BitcodeWriter.cpp |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)


Index: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff -u llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1.18 llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1.19
--- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1.18	Mon Apr 30 21:14:57 2007
+++ llvm/lib/Bitcode/Writer/BitcodeWriter.cpp	Tue May  1 02:03:37 2007
@@ -571,7 +571,7 @@
     for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i)
       Vals.push_back(VE.getValueID(I.getOperand(i)));
     break;
-  case Instruction::Invoke:
+  case Instruction::Invoke: {
     Code = bitc::FUNC_CODE_INST_INVOKE;
     // FIXME: param attrs
     Vals.push_back(VE.getTypeID(I.getOperand(0)->getType()));
@@ -596,6 +596,7 @@
       }
     }
     break;
+  }
   case Instruction::Unwind:
     Code = bitc::FUNC_CODE_INST_UNWIND;
     break;
@@ -658,18 +659,18 @@
     for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i)
       Vals.push_back(VE.getValueID(I.getOperand(i+1)));  // fixed param.
       
-      // Emit type/value pairs for varargs params.
-      if (FTy->isVarArg()) {
-        unsigned NumVarargs = I.getNumOperands()-1-FTy->getNumParams();
-        Vals.push_back(NumVarargs);
-        for (unsigned i = I.getNumOperands()-NumVarargs, e = I.getNumOperands();
-             i != e; ++i) {
-          Vals.push_back(VE.getTypeID(I.getOperand(i)->getType()));
-          Vals.push_back(VE.getValueID(I.getOperand(i)));
-        }
+    // Emit type/value pairs for varargs params.
+    if (FTy->isVarArg()) {
+      unsigned NumVarargs = I.getNumOperands()-1-FTy->getNumParams();
+      Vals.push_back(NumVarargs);
+      for (unsigned i = I.getNumOperands()-NumVarargs, e = I.getNumOperands();
+           i != e; ++i) {
+        Vals.push_back(VE.getTypeID(I.getOperand(i)->getType()));
+        Vals.push_back(VE.getValueID(I.getOperand(i)));
       }
     }
     break;
+  }
     
   case Instruction::VAArg:
     Code = bitc::FUNC_CODE_INST_VAARG;






More information about the llvm-commits mailing list