Add an SMLoc to MCExpr. Most code does not generate or consume the
SMLoc (yet). Use CHECK-DAG where necessary.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
The change looks good, but it's a bit central to the MC layer, so I'll let Jim approve or add more people if necessary.
test/MC/AArch64/error-location-post-layout.s | ||
---|---|---|
4 ↗ | (On Diff #84838) | Why CHECK-DAG? Can they really come in different order? |
This LGTM in general. I agree w/ Renato that CHECK-DAG is a bit unexpected. Can you elaborate on why that's better than plain CHECK?
I've long wanted better plumbing of location info through the asm stuff. This is a nice step in that direction. Thank you for working on it! Do you intend to continue on with threading this through the various places that create MCExprs in the AsmParser?
Removed uses of CHECK-DAG where they were unnecessary. Still required for the last two tests in ARM/error-location-post-layout.s because these /do/ come out in the "wrong" order.
@grosbach, I will be working on improving diagnostics throughout the assembler. So yes, I will be threading this through to the AsmParser whenever I come across an MCExpr with a default SMLoc. Seems reasonable to do this incrementally.