diff options
author | Karl Schimpf <kschimpf@google.com> | 2013-09-03 14:04:17 -0700 |
---|---|---|
committer | Karl Schimpf <kschimpf@google.com> | 2013-09-03 14:04:17 -0700 |
commit | eb10318143cc0045a053a1973e4aeaf246e53984 (patch) | |
tree | cc1b6e097abc12a5532e61a14429f04ece95e37a /lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp | |
parent | 30aa17affbfa35a9d32895ff6f4b5f5fbfc9575a (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 STRUCT_ANON in bitcode files PNaClVersion==2.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3648
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/23455023
Diffstat (limited to 'lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp')
-rw-r--r-- | lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp index aac03678d1..1e524db3de 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; |