summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Writer/ConstantWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-09-30 22:46:54 +0000
committerChris Lattner <sabre@nondot.org>2001-09-30 22:46:54 +0000
commitfbdec250b314be0b80121654385e66f6a7650381 (patch)
treea711ca58cea2ce223104f9b485ac9ad3255912a5 /llvm/lib/Bytecode/Writer/ConstantWriter.cpp
parent436248f236b13fa4816e0cb22bbaf37198433f2a (diff)
downloadbcm5719-llvm-fbdec250b314be0b80121654385e66f6a7650381.tar.gz
bcm5719-llvm-fbdec250b314be0b80121654385e66f6a7650381.zip
Implement constant pointers, and null specifically in the parser, bytecode writer, and
bytecode reader. llvm-svn: 668
Diffstat (limited to 'llvm/lib/Bytecode/Writer/ConstantWriter.cpp')
-rw-r--r--llvm/lib/Bytecode/Writer/ConstantWriter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Bytecode/Writer/ConstantWriter.cpp b/llvm/lib/Bytecode/Writer/ConstantWriter.cpp
index 24ceaecf2e2..dde47d52b11 100644
--- a/llvm/lib/Bytecode/Writer/ConstantWriter.cpp
+++ b/llvm/lib/Bytecode/Writer/ConstantWriter.cpp
@@ -141,6 +141,11 @@ bool BytecodeWriter::outputConstant(const ConstPoolVal *CPV) {
break;
}
+ case Type::PointerTyID: {
+ output_vbr((unsigned)0, Out);
+ break;
+ }
+
case Type::FloatTyID: { // Floating point types...
float Tmp = (float)((const ConstPoolFP*)CPV)->getValue();
output_data(&Tmp, &Tmp+1, Out);
OpenPOWER on IntegriCloud