[PATCH] D53620: [WebAssembly] Error out when block/loop markers mismatch
Derek Schuff via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 23 17:32:12 PDT 2018
dschuff added a comment.
This kind of code should never be produced by the wasm backend, right? In which case this could be an assert/unreachable rather than a fatal error. But I guess this code also prints insts that are parsed from an obj or asm file, right? In that case the input could just be bogus and we shouldn't assert.
So I'm not sure if it's possible here to tell which one to ideally use.
But also:
1. can this test be an llvm-mc test (which has assembly input and prints assembly)? I think the answer is "yes" (at least eventually) but I'm not sure if the asm parser is far enough along yet for that.
2. I wonder if there's some kind of infrastructure in MC for printing errors (e.g. for malformed asm) other than just the big hammer of report_fatal_error? If so it probably makes sense to use that (even if we can't tell the difference between bogus code from the compiler and bogus input from an asm user).
Repository:
rL LLVM
https://reviews.llvm.org/D53620
More information about the llvm-commits
mailing list