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

LLVM llvm at cs.uiuc.edu
Sat Jul 17 17:16:31 PDT 2004



Changes in directory llvm/lib/Bytecode/Writer:

Writer.cpp updated: 1.69 -> 1.70

---
Log message:

bug 122: http://llvm.cs.uiuc.edu/PR122 :
- Correct ordering of tests because for GlobalValue isa Constant


---
Diffs of the changes:  (+8 -8)

Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.69 llvm/lib/Bytecode/Writer/Writer.cpp:1.70
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.69	Sun Jul  4 06:46:15 2004
+++ llvm/lib/Bytecode/Writer/Writer.cpp	Sat Jul 17 19:16:21 2004
@@ -135,8 +135,8 @@
 
   for (unsigned i = ValNo; i < ValNo+NC; ++i) {
     const Value *V = Plane[i];
-    if (const Constant *CPV = dyn_cast<Constant>(V)) {
-      outputConstant(CPV);
+    if (const Constant *C = dyn_cast<Constant>(V)) {
+      outputConstant(C);
     }
   }
 }
@@ -151,13 +151,11 @@
 
   unsigned NumPlanes = Table.getNumPlanes();
 
-  // Output the type plane before any constants!
-  if (isFunction) {
+  if (isFunction)
+    // Output the type plane before any constants!
     outputTypes( Table.getModuleTypeLevel() );
-  }
-  
-  // Output module-level string constants before any other constants.x
-  if (!isFunction)
+  else
+    // Output module-level string constants before any other constants.x
     outputConstantStrings();
 
   for (unsigned pno = 0; pno != NumPlanes; pno++) {
@@ -397,3 +395,5 @@
   }
   Out.flush();
 }
+
+// vim: sw=2 ai





More information about the llvm-commits mailing list