diff options
| author | James Henderson <jh7370@my.bristol.ac.uk> | 2019-05-23 10:17:10 +0000 |
|---|---|---|
| committer | James Henderson <jh7370@my.bristol.ac.uk> | 2019-05-23 10:17:10 +0000 |
| commit | e51b9e42b68c243dbc9b472f7c64c2c0fe821311 (patch) | |
| tree | a3ff6fc774757d83e9edd0f46ca5020df3abf324 /llvm/test/tools/llvm-objdump/X86/source-interleave-invalid-source.test | |
| parent | f5d9d2390592f36e594d8e9f3d4b4cc1733193d3 (diff) | |
| download | bcm5719-llvm-e51b9e42b68c243dbc9b472f7c64c2c0fe821311.tar.gz bcm5719-llvm-e51b9e42b68c243dbc9b472f7c64c2c0fe821311.zip | |
[llvm-objdump][test] Improve testing of some switches #2
This patch focuses on adding additional testing for the --source switch.
For reference, the source-interleave-x86_64.ll test file has been split
into two parts - the input (shared with the other tests) and the test
itself.
Reviewed by: MaskRay, rupprecht, grimar
Differential Revision: https://reviews.llvm.org/D61996
llvm-svn: 361479
Diffstat (limited to 'llvm/test/tools/llvm-objdump/X86/source-interleave-invalid-source.test')
| -rw-r--r-- | llvm/test/tools/llvm-objdump/X86/source-interleave-invalid-source.test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objdump/X86/source-interleave-invalid-source.test b/llvm/test/tools/llvm-objdump/X86/source-interleave-invalid-source.test new file mode 100644 index 00000000000..e958173d16e --- /dev/null +++ b/llvm/test/tools/llvm-objdump/X86/source-interleave-invalid-source.test @@ -0,0 +1,16 @@ +## Test llvm-objdump's --source behaviour when a line number is greater than the +## file length. + +# RUN: sed -e "s,SRC_COMPDIR,%/p/Inputs,g" %p/Inputs/source-interleave.ll > %t.ll +# RUN: sed -e "s,line: 7,line: 9999,g" %t.ll > %t2.ll + +# RUN: llc -o %t.o -filetype=obj -mtriple=x86_64-pc-linux %t.ll +# RUN: llc -o %t2.o -filetype=obj -mtriple=x86_64-pc-linux %t2.ll + +# RUN: llvm-objdump --source %t.o | FileCheck %s --check-prefixes=CHECK,GOOD +# RUN: llvm-objdump --source %t2.o | FileCheck %s --implicit-check-not="int *b = &a;" + +# CHECK: main: +# CHECK-NEXT: ; int main() { +# GOOD: ; int *b = &a; +# CHECK: ; return *b + foo(); |

