From e635564fe07f78c19fd6022aa105f620e7cad60a Mon Sep 17 00:00:00 2001 From: Mark Seaborn Date: Wed, 26 Jun 2013 08:42:14 -0700 Subject: 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 --- lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'lib/Bitcode/NaCl/Writer') 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(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())); -- cgit v1.2.3-70-g09d2