aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
diff options
context:
space:
mode:
authorMark Seaborn <mseaborn@chromium.org>2013-06-26 08:42:14 -0700
committerMark Seaborn <mseaborn@chromium.org>2013-06-26 08:42:14 -0700
commite635564fe07f78c19fd6022aa105f620e7cad60a (patch)
tree6f1e0279dbac4f14ca787645663db02babffae61 /lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
parent3a69b22c3d95634002f80e1e491616942e0407d7 (diff)
PNaCl wire format: Remove magic number and hash from encoding of 'switch'
The magic number is no longer needed now that the reader for the old switch representation has been removed (in https://codereview.chromium.org/17764003), so we can remove this baggage. Also add a missing record size check to the reader. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3507 TEST=hello_world.pexe includes a switch statement; also PNaCl toolchain trybots Review URL: https://codereview.chromium.org/17777005
Diffstat (limited to 'lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp')
-rw-r--r--lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp b/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
index 7afcf666dc..b41b3c83c6 100644
--- a/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
+++ b/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
@@ -1252,9 +1252,6 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,
Code = naclbitc::FUNC_CODE_INST_SWITCH;
const SwitchInst &SI = cast<SwitchInst>(I);
- uint32_t SwitchRecordHeader = SI.hash() | (SWITCH_INST_MAGIC << 16);
- Vals64.push_back(SwitchRecordHeader);
-
Vals64.push_back(VE.getTypeID(SI.getCondition()->getType()));
pushValue64(SI.getCondition(), InstID, Vals64, VE);
Vals64.push_back(VE.getValueID(SI.getDefaultDest()));