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 | dcb3c978c429fe6829ea567ee9f536547786d2d5 (patch) | |
tree | 40c6361166f703108484cd6d1318213879821918 /llvm/lib/Bytecode/Reader/Reader.cpp | |
parent | 78f9389d79e56243b2f9a70c060d803f794ffd89 (diff) | |
download | bcm5719-llvm-dcb3c978c429fe6829ea567ee9f536547786d2d5.tar.gz bcm5719-llvm-dcb3c978c429fe6829ea567ee9f536547786d2d5.zip |
Packed Structures
llvm-svn: 32361
Diffstat (limited to 'llvm/lib/Bytecode/Reader/Reader.cpp')
-rw-r--r-- | llvm/lib/Bytecode/Reader/Reader.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/llvm/lib/Bytecode/Reader/Reader.cpp b/llvm/lib/Bytecode/Reader/Reader.cpp index 3cc3b1d362b..2ac92bc9468 100644 --- a/llvm/lib/Bytecode/Reader/Reader.cpp +++ b/llvm/lib/Bytecode/Reader/Reader.cpp @@ -1192,7 +1192,18 @@ const Type *BytecodeReader::ParseType() { Typ = read_vbr_uint(); } - Result = StructType::get(Elements); + Result = StructType::get(Elements, false); + break; + } + case Type::BC_ONLY_PackedStructTyID: { + std::vector<const Type*> Elements; + unsigned Typ = read_vbr_uint(); + while (Typ) { // List is terminated by void/0 typeid + Elements.push_back(getType(Typ)); + Typ = read_vbr_uint(); + } + + Result = StructType::get(Elements, true); break; } case Type::PointerTyID: { |