diff options
author | Karl Schimpf <kschimpf@google.com> | 2013-08-01 07:12:23 -0700 |
---|---|---|
committer | Karl Schimpf <kschimpf@google.com> | 2013-08-01 07:12:23 -0700 |
commit | b9657234ee8b1951db5977a8ffb55a2e5df6d76c (patch) | |
tree | da9f474ea4b35ff767b93715a13a3933f0355f39 /lib/Bitcode/NaCl/Reader/NaClBitcodeHeader.cpp | |
parent | 365546bcef14965546dc39ebcef35f07a897b9c5 (diff) |
Remove the inttoptr dependency from load instructions.
Elides inttoptr casts used (exclusively) in load instructions when
PNaClVersion=2. This is an incremental start on removing the inttoptr
instruction from the PNaCl wire format (See issue 3544 for more information
on the strategy of removing ptrtoint).
Also modifies PNaCl bitcode reader/writer to accept PNaClVersion=1 as supported,
and PNaClVersion=2 as unsupported but readable (allowing pnacl-freeze and
pnacl-thaw to work on such files).
Also allows command-line option --pnacl-version for setting 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= https://code.google.com/p/nativeclient/issues/detail?id=3544
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/5812155903377408
Diffstat (limited to 'lib/Bitcode/NaCl/Reader/NaClBitcodeHeader.cpp')
-rw-r--r-- | lib/Bitcode/NaCl/Reader/NaClBitcodeHeader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Bitcode/NaCl/Reader/NaClBitcodeHeader.cpp b/lib/Bitcode/NaCl/Reader/NaClBitcodeHeader.cpp index 2dd2af5dc3..37b79ad3d8 100644 --- a/lib/Bitcode/NaCl/Reader/NaClBitcodeHeader.cpp +++ b/lib/Bitcode/NaCl/Reader/NaClBitcodeHeader.cpp @@ -248,7 +248,7 @@ void NaClBitcodeHeader::InstallFields() { } if (PNaClVersion != 1) { IsSupportedFlag = false; - IsReadableFlag = false; + IsReadableFlag = (PNaClVersion == 2); UpdatedUnsupportedMessage = true; UnsupportedMessage.clear(); raw_string_ostream UnsupportedStream(UnsupportedMessage); |