diff options
Diffstat (limited to 'test/Driver/debug-options.c')
-rw-r--r-- | test/Driver/debug-options.c | 92 |
1 files changed, 86 insertions, 6 deletions
diff --git a/test/Driver/debug-options.c b/test/Driver/debug-options.c index 0dd32e983ad85..58269cbb29bf4 100644 --- a/test/Driver/debug-options.c +++ b/test/Driver/debug-options.c @@ -64,6 +64,14 @@ // RUN: %clang -### -c -g %s -target x86_64-pc-freebsd10.0 2>&1 \ // RUN: | FileCheck -check-prefix=G_GDB %s +// Windows. +// RUN: %clang -### -c -g %s -target x86_64-w64-windows-gnu 2>&1 \ +// RUN: | FileCheck -check-prefix=G_GDB %s +// RUN: %clang -### -c -g %s -target x86_64-windows-msvc 2>&1 \ +// RUN: | FileCheck -check-prefix=G_NOTUNING %s +// RUN: %clang_cl -### -c -Z7 -target x86_64-windows-msvc -- %s 2>&1 \ +// RUN: | FileCheck -check-prefix=G_NOTUNING %s + // On the PS4, -g defaults to -gno-column-info, and we always generate the // arange section. // RUN: %clang -### -c %s -target x86_64-scei-ps4 2>&1 \ @@ -119,6 +127,25 @@ // RUN: %clang -### -c -gline-tables-only -g0 %s 2>&1 \ // RUN: | FileCheck -check-prefix=GLTO_NO %s // +// RUN: %clang -### -c -gline-directives-only %s -target x86_64-apple-darwin 2>&1 \ +// RUN: | FileCheck -check-prefix=GLIO_ONLY %s +// RUN: %clang -### -c -gline-directives-only %s -target i686-pc-openbsd 2>&1 \ +// RUN: | FileCheck -check-prefix=GLIO_ONLY_DWARF2 %s +// RUN: %clang -### -c -gline-directives-only %s -target x86_64-pc-freebsd10.0 2>&1 \ +// RUN: | FileCheck -check-prefix=GLIO_ONLY_DWARF2 %s +// RUN: %clang -### -c -gline-directives-only -g %s -target x86_64-linux-gnu 2>&1 \ +// RUN: | FileCheck -check-prefix=G_ONLY %s +// RUN: %clang -### -c -gline-directives-only -g %s -target x86_64-apple-darwin16 2>&1 \ +// RUN: | FileCheck -check-prefix=G_STANDALONE -check-prefix=G_DWARF4 %s +// RUN: %clang -### -c -gline-directives-only -g %s -target i686-pc-openbsd 2>&1 \ +// RUN: | FileCheck -check-prefix=G_ONLY_DWARF2 %s +// RUN: %clang -### -c -gline-directives-only -g %s -target x86_64-pc-freebsd10.0 2>&1 \ +// RUN: | FileCheck -check-prefix=G_ONLY_DWARF2 %s +// RUN: %clang -### -c -gline-directives-only -g %s -target i386-pc-solaris 2>&1 \ +// RUN: | FileCheck -check-prefix=G_ONLY_DWARF2 %s +// RUN: %clang -### -c -gline-directives-only -g0 %s 2>&1 \ +// RUN: | FileCheck -check-prefix=GLIO_NO %s +// // RUN: %clang -### -c -grecord-gcc-switches %s 2>&1 \ // | FileCheck -check-prefix=GRECORD %s // RUN: %clang -### -c -gno-record-gcc-switches %s 2>&1 \ @@ -130,12 +157,39 @@ // RUN: %clang -### -c -O3 -ffunction-sections -grecord-gcc-switches %s 2>&1 \ // | FileCheck -check-prefix=GRECORD_OPT %s // +// RUN: %clang -### -c -grecord-command-line %s 2>&1 \ +// | FileCheck -check-prefix=GRECORD %s +// RUN: %clang -### -c -gno-record-command-line %s 2>&1 \ +// | FileCheck -check-prefix=GNO_RECORD %s +// RUN: %clang -### -c -grecord-command-line -gno-record-command-line %s 2>&1 \ +// | FileCheck -check-prefix=GNO_RECORD %s/ +// RUN: %clang -### -c -grecord-command-line -o - %s 2>&1 \ +// | FileCheck -check-prefix=GRECORD_O %s +// RUN: %clang -### -c -O3 -ffunction-sections -grecord-command-line %s 2>&1 \ +// | FileCheck -check-prefix=GRECORD_OPT %s +// // RUN: %clang -### -c -gstrict-dwarf -gno-strict-dwarf %s 2>&1 \ // RUN: | FileCheck -check-prefix=GIGNORE %s // -// RUN: %clang -### -c -ggnu-pubnames %s 2>&1 | FileCheck -check-prefix=GOPT %s -// RUN: %clang -### -c %s 2>&1 | FileCheck -check-prefix=NOGOPT %s -// RUN: %clang -### -c -ggnu-pubnames -gno-gnu-pubnames %s 2>&1 | FileCheck -check-prefix=NOGOPT %s +// RUN: %clang -### -c -ggnu-pubnames %s 2>&1 | FileCheck -check-prefix=GPUB %s +// RUN: %clang -### -c -ggdb %s 2>&1 | FileCheck -check-prefix=NOPUB %s +// RUN: %clang -### -c -ggnu-pubnames -gno-gnu-pubnames %s 2>&1 | FileCheck -check-prefix=NOPUB %s +// RUN: %clang -### -c -ggnu-pubnames -gno-pubnames %s 2>&1 | FileCheck -check-prefix=NOPUB %s +// +// RUN: %clang -### -c -gpubnames %s 2>&1 | FileCheck -check-prefix=PUB %s +// RUN: %clang -### -c -ggdb %s 2>&1 | FileCheck -check-prefix=NOPUB %s +// RUN: %clang -### -c -gpubnames -gno-gnu-pubnames %s 2>&1 | FileCheck -check-prefix=NOPUB %s +// RUN: %clang -### -c -gpubnames -gno-pubnames %s 2>&1 | FileCheck -check-prefix=NOPUB %s +// +// RUN: %clang -### -c -gsplit-dwarf %s 2>&1 | FileCheck -check-prefix=GPUB %s +// RUN: %clang -### -c -gsplit-dwarf -gno-pubnames %s 2>&1 | FileCheck -check-prefix=NOPUB %s +// +// RUN: %clang -### -c -fdebug-ranges-base-address %s 2>&1 | FileCheck -check-prefix=RNGBSE %s +// RUN: %clang -### -c %s 2>&1 | FileCheck -check-prefix=NORNGBSE %s +// RUN: %clang -### -c -fdebug-ranges-base-address -fno-debug-ranges-base-address %s 2>&1 | FileCheck -check-prefix=NORNGBSE %s +// +// RUN: %clang -### -c -glldb %s 2>&1 | FileCheck -check-prefix=GPUB %s +// RUN: %clang -### -c -glldb -gno-pubnames %s 2>&1 | FileCheck -check-prefix=NOPUB %s // // RUN: %clang -### -c -gdwarf-aranges %s 2>&1 | FileCheck -check-prefix=GARANGE %s // @@ -169,6 +223,9 @@ // RUN: %clang -### -gmodules -gline-tables-only %s 2>&1 \ // RUN: | FileCheck -check-prefix=GLTO_ONLY %s // +// RUN: %clang -### -target %itanium_abi_triple -gmodules -gline-directives-only %s 2>&1 \ +// RUN: | FileCheck -check-prefix=GLIO_ONLY %s +// // G: "-cc1" // G: "-debug-info-kind=limited" // @@ -195,6 +252,15 @@ // GLTO_ONLY_DWARF2: "-debug-info-kind=line-tables-only" // GLTO_ONLY_DWARF2: "-dwarf-version=2" // +// GLIO_ONLY: "-cc1" +// GLIO_ONLY-NOT: "-dwarf-ext-refs" +// GLIO_ONLY: "-debug-info-kind=line-directives-only" +// GLIO_ONLY-NOT: "-dwarf-ext-refs" +// +// GLIO_ONLY_DWARF2: "-cc1" +// GLIO_ONLY_DWARF2: "-debug-info-kind=line-directives-only" +// GLIO_ONLY_DWARF2: "-dwarf-version=2" +// // G_ONLY: "-cc1" // G_ONLY: "-debug-info-kind=limited" // @@ -212,10 +278,17 @@ // G_LLDB: "-debugger-tuning=lldb" // G_SCE: "-debugger-tuning=sce" // +// G_NOTUNING: "-cc1" +// G_NOTUNING-NOT: "-debugger-tuning=" +// // This tests asserts that "-gline-tables-only" "-g0" disables debug info. // GLTO_NO: "-cc1" // GLTO_NO-NOT: -debug-info-kind= // +// This tests asserts that "-gline-directives-only" "-g0" disables debug info. +// GLIO_NO: "-cc1" +// GLIO_NO-NOT: -debug-info-kind= +// // GRECORD: "-dwarf-debug-flags" // GRECORD: -### -c -grecord-gcc-switches // @@ -229,8 +302,14 @@ // // GIGNORE-NOT: "argument unused during compilation" // -// GOPT: -ggnu-pubnames -// NOGOPT-NOT: -ggnu-pubnames +// GPUB: -ggnu-pubnames +// NOPUB-NOT: -ggnu-pubnames +// NOPUB-NOT: -gpubnames +// +// PUB: -gpubnames +// +// RNGBSE: -fdebug-ranges-base-address +// NORNGBSE-NOT: -fdebug-ranges-base-address // // GARANGE: -generate-arange-section // @@ -244,7 +323,8 @@ // // NOCI-NOT: "-dwarf-column-info" // -// GEXTREFS: "-dwarf-ext-refs" "-fmodule-format=obj" "-debug-info-kind={{standalone|limited}}" +// GEXTREFS: "-dwarf-ext-refs" "-fmodule-format=obj" +// GEXTREFS: "-debug-info-kind={{standalone|limited}}" // RUN: not %clang -cc1 -debug-info-kind=watkind 2>&1 | FileCheck -check-prefix=BADSTRING1 %s // BADSTRING1: error: invalid value 'watkind' in '-debug-info-kind=watkind' |