diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGen/split-debug-single-file.c | 17 | ||||
-rw-r--r-- | clang/test/Driver/split-debug.c | 15 | ||||
-rw-r--r-- | clang/test/Driver/split-debug.s | 7 |
3 files changed, 39 insertions, 0 deletions
diff --git a/clang/test/CodeGen/split-debug-single-file.c b/clang/test/CodeGen/split-debug-single-file.c new file mode 100644 index 00000000000..ffbc127a463 --- /dev/null +++ b/clang/test/CodeGen/split-debug-single-file.c @@ -0,0 +1,17 @@ +// REQUIRES: x86-registered-target + +// Testing to ensure -enable-split-dwarf=single allows to place .dwo sections into regular output object. +// RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-unknown-linux \ +// RUN: -enable-split-dwarf=single -split-dwarf-file %t.o -emit-obj -o %t.o %s +// RUN: llvm-objdump -section-headers %t.o | FileCheck --check-prefix=MODE-SINGLE %s +// MODE-SINGLE: .dwo + +// Testing to ensure -enable-split-dwarf=split does not place .dwo sections into regular output object. +// RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-unknown-linux \ +// RUN: -enable-split-dwarf=split -split-dwarf-file %t.o -emit-obj -o %t.o %s +// RUN: llvm-objdump -section-headers %t.o | FileCheck --check-prefix=MODE-SPLIT %s +// MODE-SPLIT-NOT: .dwo + +int main (void) { + return 0; +} diff --git a/clang/test/Driver/split-debug.c b/clang/test/Driver/split-debug.c index 212c12f5395..0ac206395e7 100644 --- a/clang/test/Driver/split-debug.c +++ b/clang/test/Driver/split-debug.c @@ -5,6 +5,21 @@ // // CHECK-ACTIONS: "-split-dwarf-file" "split-debug.dwo" +// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -### %s 2> %t +// RUN: FileCheck -check-prefix=CHECK-ACTIONS < %t %s +// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf=split -c -### %s 2> %t +// RUN: FileCheck -check-prefix=CHECK-ACTIONS < %t %s + +// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf=single -c -### %s 2> %t +// RUN: FileCheck -check-prefix=CHECK-ACTIONS-SINGLE-SPLIT < %t %s +// +// CHECK-ACTIONS-SINGLE-SPLIT: "-enable-split-dwarf=single" +// CHECK-ACTIONS-SINGLE-SPLIT: "-split-dwarf-file" "split-debug.o" + +// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf=single -c -### -o %tfoo.o %s 2> %t +// RUN: FileCheck -check-prefix=CHECK-SINGLE-SPLIT-FILENAME < %t %s +// +// CHECK-SINGLE-SPLIT-FILENAME: "-split-dwarf-file" "{{.*}}foo.o" // RUN: %clang -target x86_64-macosx -gsplit-dwarf -c -### %s 2> %t // RUN: FileCheck -check-prefix=CHECK-NO-ACTIONS < %t %s diff --git a/clang/test/Driver/split-debug.s b/clang/test/Driver/split-debug.s index 6e6f8c5b804..ece64cc0ad1 100644 --- a/clang/test/Driver/split-debug.s +++ b/clang/test/Driver/split-debug.s @@ -5,6 +5,13 @@ // // CHECK-ACTIONS: "-split-dwarf-file" "split-debug.dwo" +// Check we pass -split-dwarf-file to `as` if -gsplit-dwarf=split. +// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf=split -c -### %s 2> %t +// RUN: FileCheck -check-prefix=CHECK-ACTIONS < %t %s + +// Check we do not pass any -split-dwarf* commands to `as` if -gsplit-dwarf=single. +// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf=single -c -### %s 2> %t +// RUN: FileCheck -check-prefix=CHECK-NO-ACTIONS < %t %s // RUN: %clang -target x86_64-macosx -gsplit-dwarf -c -### %s 2> %t // RUN: FileCheck -check-prefix=CHECK-NO-ACTIONS < %t %s |