aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
diff options
context:
space:
mode:
authorKarl Schimpf <kschimpf@google.com>2013-07-22 13:36:16 -0700
committerKarl Schimpf <kschimpf@google.com>2013-07-22 13:36:16 -0700
commit0b41f88a8de25db50e1a57645a6e132954a6dcd2 (patch)
tree059d73d19b2f788ce145d90015dd53b091095f28 /lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
parent208b40ed21d78767d9d1c3c855cbd2e3a3c02451 (diff)
Enable ability to have multiple PNaCl wire format versions.
Modifies PNaCl bitcode reader/writer to accept PNaClVersion=1 as supported, and all other versions are unsupported and unreadable. The PNaCl bitcode reader/writer will generate appropriate messages (including what version is unsupported if applicable). Also allows command-line option --pnacl-version for setting the PNaClVersion in the PNaCl bitcode writer. Also fixes some problems on PNaCl bitcode headers, using common support to determine when the read/written PNaCl bitcode file is valid. BUG=None R=jvoung@chromium.org Review URL: https://codereview.chromium.org/19400002
Diffstat (limited to 'lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp')
-rw-r--r--lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
index 09a94c08cf..c7eb1ac683 100644
--- a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
+++ b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
@@ -1504,7 +1504,7 @@ bool NaClBitcodeReader::ParseBitcodeInto(Module *M) {
M->setDataLayout("e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-"
"f32:32:32-f64:64:64-p:32:32:32-v128:32:32");
- if (InitStream()) return true;
+ if (InitStream()) return Error(Header.Unsupported());
// We expect a number of well-defined blocks, though we don't necessarily
// need to understand them all.