[PATCH] D44034: Reland "[WebAssembly] More uses of uint8_t for single byte values"

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 2 11:39:35 PST 2018

sbc100 added inline comments.

Comment at: lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp:97
+          assert(MO.getImm() > 0 && (MO.getImm() & ~0x3f) == 0x40 &&
+                 "Signature must be pre-encoded negative single-byte SLEB");
+          OS << uint8_t(MO.getImm());
There was no assert before and this is no more dangerous so I wouldn't add one as part of this change.

If you must at a new assert the text should maybe say "operand signaure is not a valid wasm value type", and the check should be a range change of valid wasm types.

But I would just drop this assert.



More information about the llvm-commits mailing list