aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-10-03 08:08:25 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-10-03 08:08:25 -0700
commit8ed96f4d0ca9b8114875997f1f0196fc89a41a04 (patch)
tree7ba7ef325098e011a641ec62899b6ccbcd842c1e /lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
parent97e49363c618e0984b16bfaca3c5f60a97e442b8 (diff)
PNaCl bitcode: Reject CAST_PTRTOINT and CAST_INTTOPTR
Make the reader and writer stricter so that we can be sure we're not accidentally generating ptrtoint or inttoptr instructions in pexe files. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3590 TEST=toolchain trybots Review URL: https://codereview.chromium.org/25607006
Diffstat (limited to 'lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp')
-rw-r--r--lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp b/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
index 4cbb74be09..8a8e108621 100644
--- a/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
+++ b/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
@@ -119,8 +119,6 @@ static unsigned GetEncodedCastOpcode(unsigned Opcode, const Value &V) {
case Instruction::SIToFP : return naclbitc::CAST_SITOFP;
case Instruction::FPTrunc : return naclbitc::CAST_FPTRUNC;
case Instruction::FPExt : return naclbitc::CAST_FPEXT;
- case Instruction::PtrToInt: return naclbitc::CAST_PTRTOINT;
- case Instruction::IntToPtr: return naclbitc::CAST_INTTOPTR;
case Instruction::BitCast : return naclbitc::CAST_BITCAST;
}
}