
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.
5 lines
168 B
LLVM
5 lines
168 B
LLVM
; RUN: not llvm-as --disable-output %s 2>&1 | FileCheck -DFILE=%s %s
|
|
|
|
; CHECK: [[FILE]]:[[@LINE+1]]:30: error: expected allockind value
|
|
declare void @f0() allockind()
|