aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
diff options
context:
space:
mode:
authorKarl Schimpf <kschimpf@google.com>2013-08-30 08:52:20 -0700
committerKarl Schimpf <kschimpf@google.com>2013-08-30 08:52:20 -0700
commit2302e5d39e2302962d1a0e45d60e00ed47b9b061 (patch)
tree1a121361ee62714d76c916ac4e203a091a747601 /lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
parent215d7de42d1ada5ca44bd6bc03789b2ea81ce865 (diff)
Remove generating STRUCT_ANON records in PNaCl bitcode files.
Don't generate types for elided cast instructions, since they are never put into the bitcode file. In addition, do not generate a type id for the types of global variables, because they are never needed. Don't allow and STRUCT records in bitcode files when PNaClVersion==2. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3648 R=mseaborn@chromium.org Review URL: https://codereview.chromium.org/23431008
Diffstat (limited to 'lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp')
-rw-r--r--lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
index 9e8c398172..3bd1e2f783 100644
--- a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
+++ b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
@@ -489,6 +489,10 @@ bool NaClBitcodeReader::ParseTypeTableBody() {
break;
}
case naclbitc::TYPE_CODE_STRUCT_ANON: { // STRUCT: [ispacked, eltty x N]
+ // Deprecated. Only exists in early PNaCl version 1 bitcode files.
+ // TODO(kschimpf) Remove this as soon as is feasible.
+ if (GetPNaClVersion() >= 2)
+ return Error("Struct types not supported in PNaCl bitcode");
if (Record.size() < 1)
return Error("Invalid STRUCT type record");
SmallVector<Type*, 8> EltTys;