diff options
author | Tim Northover <tnorthover@apple.com> | 2016-04-13 19:46:54 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2016-04-13 19:46:54 +0000 |
commit | c0bef99bb03cbcef5e0700bfdbed6e82970c8416 (patch) | |
tree | c20731cf874216d7034bf71e42c8606f11bd7ef2 /llvm/test | |
parent | cbd39897422bf686076e153b088670bab7aeb112 (diff) | |
download | bcm5719-llvm-c0bef99bb03cbcef5e0700bfdbed6e82970c8416.tar.gz bcm5719-llvm-c0bef99bb03cbcef5e0700bfdbed6e82970c8416.zip |
AsmParser: record "# line file" context to calculate location for diag
Since we can't emit diagnostics for missing "jmp 1f" labels until the end of
the file, we need to be able to restore the context used to calculate
file/line. This is basically the "# line file" directive that's being used at
the time the expression is seen.
rdar://25706972
llvm-svn: 266238
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/MC/ELF/undefined-directional.s | 5 | ||||
-rw-r--r-- | llvm/test/MC/MachO/undefined-directional.s | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/llvm/test/MC/ELF/undefined-directional.s b/llvm/test/MC/ELF/undefined-directional.s index 74449d4e4f6..e09acd73111 100644 --- a/llvm/test/MC/ELF/undefined-directional.s +++ b/llvm/test/MC/ELF/undefined-directional.s @@ -4,6 +4,9 @@ jmp 1b // CHECK: [[@LINE+1]]:{{[0-9]+}}: error: directional label undefined jmp 1f -// CHECK: [[@LINE+1]]:{{[0-9]+}}: error: directional label undefined +# 10 "wibble.s" +// CHECK: wibble.s:11:{{[0-9]+}}: error: directional label undefined jmp 2f +# 42 "invalid.s" + diff --git a/llvm/test/MC/MachO/undefined-directional.s b/llvm/test/MC/MachO/undefined-directional.s index 8d75228f835..80af9caf68c 100644 --- a/llvm/test/MC/MachO/undefined-directional.s +++ b/llvm/test/MC/MachO/undefined-directional.s @@ -4,6 +4,8 @@ jmp 1b // CHECK: [[@LINE+1]]:{{[0-9]+}}: error: directional label undefined jmp 1f -// CHECK: [[@LINE+1]]:{{[0-9]+}}: error: directional label undefined +# 10 "wibble.s" +// CHECK: wibble.s:11:{{[0-9]+}}: error: directional label undefined jmp 2f +# 42 "invalid.s" |