diff options
author | Karl Schimpf <kschimpf@google.com> | 2013-09-03 13:59:55 -0700 |
---|---|---|
committer | Karl Schimpf <kschimpf@google.com> | 2013-09-03 13:59:55 -0700 |
commit | 30aa17affbfa35a9d32895ff6f4b5f5fbfc9575a (patch) | |
tree | 387b9668a029e22fcbcbf428bc46b195e5c8e146 /lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp | |
parent | 264065105b2b9be73662b3c7e5a66c9d70d26a2c (diff) |
Remove all remaining pointer casts from PNaCl bitcode files.
For PNaClVersion==2, removes remaining pointer casts from bitcode files.
This includes:
* Return value can be casted to a scalar value.
* Intrinsic calls may return an inherent pointer, which may
need casting to a scalar value.
Also modifies tests bitcast-elide.ll and inttoptr-elide.ll
by removing tests that assumed there were remaining pointer
bitcasts that do not get removed.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3544
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/23524003
Diffstat (limited to 'lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp')
-rw-r--r-- | lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp index 994bf712ae..aac03678d1 100644 --- a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp +++ b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp @@ -1429,7 +1429,7 @@ bool NaClBitcodeReader::ParseFunctionBody(Function *F) { if (OpNum != Record.size()) return Error("Invalid RET record"); - I = ReturnInst::Create(Context, Op); + I = ReturnInst::Create(Context, ConvertOpToScalar(Op, CurBBNo)); break; } case naclbitc::FUNC_CODE_INST_BR: { // BR: [bb#, bb#, opval] or [bb#] |