From 2302e5d39e2302962d1a0e45d60e00ed47b9b061 Mon Sep 17 00:00:00 2001 From: Karl Schimpf Date: Fri, 30 Aug 2013 08:52:20 -0700 Subject: 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 --- lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp') 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 EltTys; -- cgit v1.2.3-18-g5258