[PATCH] D52442: [WebAssembly] Fixed AsmParser not allowing instructions with / and :

Wouter van Oortmerssen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 27 15:40:14 PDT 2018


aardappel added a comment.

Turns out `i32.trunc_s:sat/f32` is parsed as a label `i32.trunc_s:` followed by an instruction `sat/f32`.

The label parsing happens in the target agnostic code.

A simple solution would be to require whitespace after `:`, but only for the wasm target? Or a bit hairier, add a method that asks the target, is this a valid label? (so we can check against a list of instructions) ?

Best would of course be to not have `:` in names in the first place.


Repository:
  rL LLVM

https://reviews.llvm.org/D52442





More information about the llvm-commits mailing list