summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/debug-options.c
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2018-08-31 13:56:14 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2018-08-31 13:56:14 +0000
commit80e1b5eb3486758ba67cf311e3afad7c1a56deda (patch)
tree5b3b926ae629eaca499ae915ee5e33ff5601803e /clang/test/Driver/debug-options.c
parent2e5700f0388b4857e331d0ec5f887cddcc616d85 (diff)
downloadbcm5719-llvm-80e1b5eb3486758ba67cf311e3afad7c1a56deda.tar.gz
bcm5719-llvm-80e1b5eb3486758ba67cf311e3afad7c1a56deda.zip
[DEBUGINFO] Add support for emission of the debug directives only.
Summary: Added option -gline-directives-only to support emission of the debug directives only. It behaves very similar to -gline-tables-only, except that it sets llvm debug info emission kind to llvm::DICompileUnit::DebugDirectivesOnly. Reviewers: echristo Subscribers: aprantl, fedor.sergeev, JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D51177 llvm-svn: 341212
Diffstat (limited to 'clang/test/Driver/debug-options.c')
-rw-r--r--clang/test/Driver/debug-options.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/clang/test/Driver/debug-options.c b/clang/test/Driver/debug-options.c
index 0435d3ab590..04b9383c063 100644
--- a/clang/test/Driver/debug-options.c
+++ b/clang/test/Driver/debug-options.c
@@ -119,6 +119,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 \
@@ -178,6 +197,9 @@
// RUN: %clang -### -gmodules -gline-tables-only %s 2>&1 \
// RUN: | FileCheck -check-prefix=GLTO_ONLY %s
//
+// RUN: %clang -### -gmodules -gline-directives-only %s 2>&1 \
+// RUN: | FileCheck -check-prefix=GLIO_ONLY %s
+//
// G: "-cc1"
// G: "-debug-info-kind=limited"
//
@@ -204,6 +226,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"
//
@@ -225,6 +256,10 @@
// 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
//
OpenPOWER on IntegriCloud