diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2006-12-08 18:06:16 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2006-12-08 18:06:16 +0000 |
commit | 38ecbf18eb9c8ca7ae08dfed4dc6fb4e3e5deb1e (patch) | |
tree | 25f918d862f8baff414df9382c194b5b5e072de1 /lib/Bytecode/Writer/Writer.cpp | |
parent | 8894255fc01cd8dcdccc700fdd69186d02131ffe (diff) |
Packed Structures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32361 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Writer/Writer.cpp')
-rw-r--r-- | lib/Bytecode/Writer/Writer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp index b69c1ad8b3..c6bc22e796 100644 --- a/lib/Bytecode/Writer/Writer.cpp +++ b/lib/Bytecode/Writer/Writer.cpp @@ -197,7 +197,11 @@ inline BytecodeBlock::~BytecodeBlock() { // Do backpatch when block goes out //===----------------------------------------------------------------------===// void BytecodeWriter::outputType(const Type *T) { - output_vbr((unsigned)T->getTypeID()); + const StructType* STy = dyn_cast<StructType>(T); + if(STy && STy->isPacked()) + output_vbr((unsigned)Type::BC_ONLY_PackedStructTyID); + else + output_vbr((unsigned)T->getTypeID()); // That's all there is to handling primitive types... if (T->isPrimitiveType()) { @@ -246,10 +250,8 @@ void BytecodeWriter::outputType(const Type *T) { break; } - case Type::StructTyID: { const StructType *ST = cast<StructType>(T); - // Output all of the element types... for (StructType::element_iterator I = ST->element_begin(), E = ST->element_end(); I != E; ++I) { |