diff options
author | Chris Lattner <sabre@nondot.org> | 2004-01-15 18:46:56 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-01-15 18:46:56 +0000 |
commit | f4572852dc7fc58370925a695f3cae9ec224561a (patch) | |
tree | 558ba30a81a357c4c70bc28d94cf4a488d6e3d6a | |
parent | e2f63174364087b019600f5a14587990bfcfb787 (diff) | |
download | bcm5719-llvm-f4572852dc7fc58370925a695f3cae9ec224561a.tar.gz bcm5719-llvm-f4572852dc7fc58370925a695f3cae9ec224561a.zip |
ConstantPointerRef's are no longer emitted. This saves 20028 bytes in the
bytecode files when compiling 176.gcc, but more importantly will make it
easier to eliminate CPR's in the future (no new .bc revision will be
required to support them)
llvm-svn: 10884
-rw-r--r-- | llvm/lib/Bytecode/Writer/ConstantWriter.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/Bytecode/Writer/ConstantWriter.cpp b/llvm/lib/Bytecode/Writer/ConstantWriter.cpp index 02569ec33d4..088a5b787bc 100644 --- a/llvm/lib/Bytecode/Writer/ConstantWriter.cpp +++ b/llvm/lib/Bytecode/Writer/ConstantWriter.cpp @@ -194,13 +194,9 @@ void BytecodeWriter::outputConstant(const Constant *CPV) { break; } - case Type::PointerTyID: { - 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); - break; - } + case Type::PointerTyID: + assert(0 && "No non-null, non-constant-expr constants allowed!"); + abort(); case Type::FloatTyID: { // Floating point types... float Tmp = (float)cast<ConstantFP>(CPV)->getValue(); |