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

Chris Lattner lattner at cs.uiuc.edu
Mon Nov 17 11:29:01 PST 2003


Changes in directory llvm/lib/Bytecode/Writer:

ConstantWriter.cpp updated: 1.27 -> 1.28

---
Log message:

Remove usage of ConstantPointer


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

Index: llvm/lib/Bytecode/Writer/ConstantWriter.cpp
diff -u llvm/lib/Bytecode/Writer/ConstantWriter.cpp:1.27 llvm/lib/Bytecode/Writer/ConstantWriter.cpp:1.28
--- llvm/lib/Bytecode/Writer/ConstantWriter.cpp:1.27	Tue Nov 11 16:41:32 2003
+++ llvm/lib/Bytecode/Writer/ConstantWriter.cpp	Mon Nov 17 11:28:29 2003
@@ -175,9 +175,7 @@
   }
 
   case Type::PointerTyID: {
-    const ConstantPointer *CPP = cast<ConstantPointer>(CPV);
-    assert(!isa<ConstantPointerNull>(CPP) && "Null should be already emitted!");
-    const ConstantPointerRef *CPR = cast<ConstantPointerRef>(CPP);
+    const ConstantPointerRef *CPR = cast<ConstantPointerRef>(CPV);
     int Slot = Table.getSlot((Value*)CPR->getValue());
     assert(Slot != -1 && "Global used but not available!!");
     output_vbr((unsigned)Slot, Out);





More information about the llvm-commits mailing list