[PATCH] D89787: [AsmParser] Add source location to all errors related to .cfi directives
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 30 15:28:08 PDT 2020
MaskRay added a comment.
In D89787#2365791 <https://reviews.llvm.org/D89787#2365791>, @rnk wrote:
> I've been thinking about this problem of missing SMLocs for a while, and I think the right direction is probably for MCStreamer to have a way to get the location of the beginning of the directive being processed. That would suffice for the majority of these `.cfi_*` directives. It would make it much easier to get error reporting right by default or to add in error reporting later.
How should MCStreamer get an access to the parser's SMLoc? The constructor of AsmParser has a non-const reference to MCStreamer. Add a SMLoc pointer in MCStreamer and make it aware of the parser's SMLoc in the constructor of AsmParser?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89787/new/
https://reviews.llvm.org/D89787
More information about the llvm-commits
mailing list