llvm-project
3bace7ef - [LLVM][AsmParser] Make error reporting of lexer errors more precise (#111077)

Commit
1 year ago
[LLVM][AsmParser] Make error reporting of lexer errors more precise (#111077) When the lexer hits an error during assembly parsing, it just logs the error in the `ErrorMsg` object, and it's possible that error gets overwritten later in by the parser with a more generic error message. This makes some errors reported by the LLVM's asm parser less precise. Address this by not having the parser overwrite the message logged by the lexer by assigning error messages generated by the lexer higher "priority" than those generated by parser and overwriting the error message only if its same or higher priority. Update several Assembler unit test to now check the more precise error messaged reported by the LLVM's AsmParser.
Author
Parents
Loading