brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · 3362b74 Raw
37 lines · plain
1## Test that llvm-objdump prints source and disassembly for relative directory2## paths for appropriate working directories. We also test that when the directory3## string is empty the behaviour is the same as the current working directory.4 5# RUN: mkdir -p %t/a/b6# RUN: cp %p/Inputs/source-interleave-x86_64.c %t/a/source-interleave-x86_64.c7 8# RUN: sed -e "s,SRC_COMPDIR,a,g" %p/Inputs/source-interleave.ll > %t.ll9# RUN: sed -e "s,SRC_COMPDIR,,g" %p/Inputs/source-interleave.ll > %t2.ll10# RUN: sed -e "s,SRC_COMPDIR,.,g" %p/Inputs/source-interleave.ll > %t3.ll11# RUN: sed -e "s,SRC_COMPDIR,..,g" %p/Inputs/source-interleave.ll > %t4.ll12 13# RUN: llc -o %t/a/a.o -filetype=obj -mtriple=x86_64-pc-linux %t.ll14# RUN: llc -o %t/a/b.o -filetype=obj -mtriple=x86_64-pc-linux %t2.ll15# RUN: llc -o %t/a/c.o -filetype=obj -mtriple=x86_64-pc-linux %t3.ll16# RUN: llc -o %t/a/d.o -filetype=obj -mtriple=x86_64-pc-linux %t4.ll17 18# RUN: cd %t19# RUN: llvm-objdump --source a/a.o | FileCheck %s --check-prefixes=CHECK,SOURCE20# RUN: llvm-objdump --source a/b.o | FileCheck %s --implicit-check-not='main()'21# RUN: llvm-objdump --source a/c.o | FileCheck %s --implicit-check-not='main()'22# RUN: llvm-objdump --source a/d.o | FileCheck %s --implicit-check-not='main()'23# RUN: cd a24# RUN: llvm-objdump --source a.o | FileCheck %s --implicit-check-not='main()'25# RUN: llvm-objdump --source b.o | FileCheck %s --check-prefixes=CHECK,SOURCE26# RUN: llvm-objdump --source c.o | FileCheck %s --check-prefixes=CHECK,SOURCE27# RUN: llvm-objdump --source d.o | FileCheck %s --implicit-check-not='main()'28# RUN: cd b29# RUN: llvm-objdump --source ../a.o | FileCheck %s --implicit-check-not='main()'30# RUN: llvm-objdump --source ../b.o | FileCheck %s --implicit-check-not='main()'31# RUN: llvm-objdump --source ../c.o | FileCheck %s --implicit-check-not='main()'32# RUN: llvm-objdump --source ../d.o | FileCheck %s --check-prefixes=CHECK,SOURCE33 34# CHECK:       0000000000000010 <main>:35# SOURCE-NEXT: ; int main() {36# CHECK-NEXT:   10:   55                      pushq   %rbp37