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 | 7be08bfae191e4ea7818067bf6e3030b6543d9f9 (patch) | |
tree | bbfb9c406413ab5b5a4334d0feb39896c1b13789 /lib/Bytecode | |
parent | 933619912bf7af3f226871387902245d91df2e21 (diff) |
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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10884 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode')
-rw-r--r-- | lib/Bytecode/Writer/ConstantWriter.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/Bytecode/Writer/ConstantWriter.cpp b/lib/Bytecode/Writer/ConstantWriter.cpp index 02569ec33d..088a5b787b 100644 --- a/lib/Bytecode/Writer/ConstantWriter.cpp +++ b/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(); |