From 1180f259c88b1eb1000d0aaf5753b3da9f8e4e51 Mon Sep 17 00:00:00 2001 From: Mark Seaborn Date: Thu, 5 Sep 2013 08:46:41 -0700 Subject: PNaCl bitcode: Don't output the LABEL type in the type table The type ID for the "label" type is never referenced. The "label" type was only being added to the type table because EnumerateType() treats BasicBlock and Value operands the same. However, the rest of the reader and writer treat BasicBlock operands specially and not like other Values. Change some tests to use wildcards for some type IDs. This is so that I don't have to update all the type ID numbers now that the generated type tables have changed. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3590 TEST=run small_tests with v2 bitcode format enabled Review URL: https://codereview.chromium.org/23530031 --- 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 cccc5cee5a..eaaa85a164 100644 --- a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp +++ b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp @@ -449,6 +449,10 @@ bool NaClBitcodeReader::ParseTypeTableBody() { ResultTy = Type::getDoubleTy(Context); break; case naclbitc::TYPE_CODE_LABEL: // LABEL + // TODO(mseaborn): Remove this case when we drop support for v1 + // of the PNaCl bitcode format. + if (GetPNaClVersion() >= 2) + return Error("Label type not supported in PNaCl bitcode"); ResultTy = Type::getLabelTy(Context); break; case naclbitc::TYPE_CODE_INTEGER: // INTEGER: [width] -- cgit v1.2.3-18-g5258