summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Reader/Reader.cpp
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2006-12-08 18:06:16 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2006-12-08 18:06:16 +0000
commitdcb3c978c429fe6829ea567ee9f536547786d2d5 (patch)
tree40c6361166f703108484cd6d1318213879821918 /llvm/lib/Bytecode/Reader/Reader.cpp
parent78f9389d79e56243b2f9a70c060d803f794ffd89 (diff)
downloadbcm5719-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.cpp13
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: {
OpenPOWER on IntegriCloud