diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGen/split-debug-filename.c | 7 | ||||
-rw-r--r-- | clang/test/Driver/split-debug.c | 3 | ||||
-rw-r--r-- | clang/test/Driver/split-debug.s | 3 | ||||
-rw-r--r-- | clang/test/Misc/cc1as-split-dwarf.s | 26 |
4 files changed, 35 insertions, 4 deletions
diff --git a/clang/test/CodeGen/split-debug-filename.c b/clang/test/CodeGen/split-debug-filename.c index 9ca7b0f3287..99f89a74145 100644 --- a/clang/test/CodeGen/split-debug-filename.c +++ b/clang/test/CodeGen/split-debug-filename.c @@ -1,5 +1,9 @@ +// REQUIRES: x86-registered-target // RUN: %clang_cc1 -debug-info-kind=limited -split-dwarf-file foo.dwo -S -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -debug-info-kind=limited -enable-split-dwarf -split-dwarf-file foo.dwo -S -emit-llvm -o - %s | FileCheck --check-prefix=VANILLA %s +// RUN: %clang_cc1 -triple x86_64-unknown-linux -debug-info-kind=limited -enable-split-dwarf -split-dwarf-file %t.dwo -emit-obj -o - %s | llvm-objdump -section-headers - | FileCheck --check-prefix=O %s +// RUN: llvm-objdump -section-headers %t.dwo | FileCheck --check-prefix=DWO %s + int main (void) { return 0; } @@ -10,3 +14,6 @@ int main (void) { // Testing to ensure that the dwo name is not output into the compile unit if // it's for vanilla split-dwarf rather than split-dwarf for implicit modules. // VANILLA-NOT: splitDebugFilename + +// O-NOT: .dwo +// DWO: .dwo diff --git a/clang/test/Driver/split-debug.c b/clang/test/Driver/split-debug.c index 52f53d3e712..212c12f5395 100644 --- a/clang/test/Driver/split-debug.c +++ b/clang/test/Driver/split-debug.c @@ -3,8 +3,7 @@ // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -### %s 2> %t // RUN: FileCheck -check-prefix=CHECK-ACTIONS < %t %s // -// CHECK-ACTIONS: objcopy{{.*}}--extract-dwo{{.*}}"split-debug.dwo" -// CHECK-ACTIONS: objcopy{{.*}}--strip-dwo{{.*}}"split-debug.o" +// CHECK-ACTIONS: "-split-dwarf-file" "split-debug.dwo" // RUN: %clang -target x86_64-macosx -gsplit-dwarf -c -### %s 2> %t diff --git a/clang/test/Driver/split-debug.s b/clang/test/Driver/split-debug.s index 64e8f2fa03d..6e6f8c5b804 100644 --- a/clang/test/Driver/split-debug.s +++ b/clang/test/Driver/split-debug.s @@ -3,8 +3,7 @@ // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -### %s 2> %t // RUN: FileCheck -check-prefix=CHECK-ACTIONS < %t %s // -// CHECK-ACTIONS: objcopy{{.*}}--extract-dwo{{.*}}"split-debug.dwo" -// CHECK-ACTIONS: objcopy{{.*}}--strip-dwo{{.*}}"split-debug.o" +// CHECK-ACTIONS: "-split-dwarf-file" "split-debug.dwo" // RUN: %clang -target x86_64-macosx -gsplit-dwarf -c -### %s 2> %t diff --git a/clang/test/Misc/cc1as-split-dwarf.s b/clang/test/Misc/cc1as-split-dwarf.s new file mode 100644 index 00000000000..0d507b1927d --- /dev/null +++ b/clang/test/Misc/cc1as-split-dwarf.s @@ -0,0 +1,26 @@ +// REQUIRES: x86-registered-target +// RUN: %clang -cc1as -triple x86_64-pc-linux-gnu %s -filetype obj -o %t1 -split-dwarf-file %t2 +// RUN: llvm-objdump -s %t1 | FileCheck --check-prefix=O %s +// RUN: llvm-objdump -s %t2 | FileCheck --check-prefix=DWO %s + +// O-NOT: Contents of section +// O: Contents of section .strtab: +// O-NOT: Contents of section +// O: Contents of section .text: +// O-NEXT: 0000 c3 +// O-NEXT: Contents of section .symtab: +// O-NOT: Contents of section +.globl main +main: +.Ltmp1: +ret +.Ltmp2: + +// DWO-NOT: Contents of section +// DWO: Contents of section .strtab: +// DWO-NOT: Contents of section +// DWO: Contents of section .foo.dwo: +// DWO-NEXT: 0000 01000000 +// DWO-NOT: Contents of section +.section .foo.dwo +.long .Ltmp2-.Ltmp1 |