summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-17 08:25:26 +0000
committerChris Lattner <sabre@nondot.org>2010-11-17 08:25:26 +0000
commit11feaf5921cfc0afeb207cfed6a186c948ad66bc (patch)
treeee0af4ff80fceaf85d190796420fe6af6c722852 /llvm/lib
parent79ffdc7581f6d6296f37857e483a524f22b6c9e7 (diff)
downloadbcm5719-llvm-11feaf5921cfc0afeb207cfed6a186c948ad66bc.tar.gz
bcm5719-llvm-11feaf5921cfc0afeb207cfed6a186c948ad66bc.zip
When forming the !srcloc mdnode for an inline asm, add the SourceLocations
of all the lines of the inline asm. With the refactoring and enhancement of the backend, we can now reports errors on the correct source line when an asm contains multiple lines of text. For something like this: void foo() { asm("push %rax\n" ".code32\n"); } we used to get this: (note that the line 4 in t.c isn't helpful) t.c:4:7: error: warning: ignoring directive for now asm("push %rax\n" ^ <inline asm>:2:1: note: instantiated into assembly here .code32 ^ now we get: t.c:5:8: error: warning: ignoring directive for now ".code32\n" ^ <inline asm>:2:1: note: instantiated into assembly here .code32 ^ Note that we're pointing to line 5 properly now. This implements rdar://7839391 - inline asm errors should point to the right line in the asm and makes the error message in PR8595 much less confusing. llvm-svn: 119489
Diffstat (limited to 'llvm/lib')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud