diff options
author | Mark Seaborn <mseaborn@chromium.org> | 2013-09-09 15:26:13 -0700 |
---|---|---|
committer | Mark Seaborn <mseaborn@chromium.org> | 2013-09-09 15:26:13 -0700 |
commit | a90e7c5042db33b4cc05625af4593e1a796533dc (patch) | |
tree | 1b73137669fb75d8a286510a0b32876455226343 /lib/Bitcode | |
parent | 12b849f6a7ba9cdd1e7b27a7b23aa0e073942fe0 (diff) |
PNaCl bitcode: Make the reader reject TYPE_CODE_POINTER in the type table
Making the reader stricter is something I forgot to do in my earlier
change that stops the writer from emitting TYPE_CODE_POINTER.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3671
TEST=test/NaCl/Bitcode/*.ll
Review URL: https://codereview.chromium.org/23658027
Diffstat (limited to 'lib/Bitcode')
-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 c826ab3353..41acb6f999 100644 --- a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp +++ b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp @@ -326,6 +326,10 @@ bool NaClBitcodeReader::ParseTypeTableBody() { break; case naclbitc::TYPE_CODE_POINTER: { // POINTER: [pointee type] or // [pointee type, address space] + // TODO(mseaborn): Remove this case when we drop support for v1 + // of the PNaCl bitcode format. + if (GetPNaClVersion() >= 2) + return Error("Pointer types not supported in PNaCl bitcode"); if (Record.size() < 1) return Error("Invalid POINTER type record"); unsigned AddressSpace = 0; |