diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-04-07 23:40:44 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-04-07 23:40:44 +0000 |
| commit | 1e45789ee0adb192300b940f69484f0ce020aadd (patch) | |
| tree | 18b227cf263af638a92b9c8bb2a257804e4b8626 /clang/lib/Sema/JumpDiagnostics.cpp | |
| parent | 4e150f8d35ac8e67a765eed0d3be2914e7bec61d (diff) | |
| download | bcm5719-llvm-1e45789ee0adb192300b940f69484f0ce020aadd.tar.gz bcm5719-llvm-1e45789ee0adb192300b940f69484f0ce020aadd.zip | |
introduce a new recoverable error handling API to LLVMContext
and use it in one place in inline asm handling stuff. Before
we'd generate this for an invalid modifier letter:
$ clang asm.c -c -o t.o
fatal error: error in backend: Invalid operand found in inline asm: 'abc incl ${0:Z}'
INLINEASM <es:abc incl ${0:Z}>, 10, %EAX<def>, 2147483657, %EAX, 14, %EFLAGS<earlyclobber,def,dead>, <!-1>
Now we generate this:
$ clang asm.c -c -o t.o
error: invalid operand in inline asm: 'incl ${0:Z}'
asm.c:3:12: note: generated from here
__asm__ ("incl %Z0" : "+r" (X));
^
1 error generated.
This is much better but still admittedly not great ("why" is the operand
invalid??), codegen should try harder with its diagnostics :)
llvm-svn: 100723
Diffstat (limited to 'clang/lib/Sema/JumpDiagnostics.cpp')
0 files changed, 0 insertions, 0 deletions

