diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-08-31 13:56:14 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-08-31 13:56:14 +0000 |
commit | 80e1b5eb3486758ba67cf311e3afad7c1a56deda (patch) | |
tree | 5b3b926ae629eaca499ae915ee5e33ff5601803e /clang/test/CodeGen | |
parent | 2e5700f0388b4857e331d0ec5f887cddcc616d85 (diff) | |
download | bcm5719-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/CodeGen')
-rw-r--r-- | clang/test/CodeGen/debug-info-gline-tables-only.c | 3 | ||||
-rw-r--r-- | clang/test/CodeGen/debug-info-gline-tables-only2.c | 3 | ||||
-rw-r--r-- | clang/test/CodeGen/debug-info-line.c | 1 | ||||
-rw-r--r-- | clang/test/CodeGen/debug-info-macro.c | 1 | ||||
-rw-r--r-- | clang/test/CodeGen/debug-info-scope.c | 1 | ||||
-rw-r--r-- | clang/test/CodeGen/lifetime-debuginfo-1.c | 1 | ||||
-rw-r--r-- | clang/test/CodeGen/lifetime-debuginfo-2.c | 1 |
7 files changed, 9 insertions, 2 deletions
diff --git a/clang/test/CodeGen/debug-info-gline-tables-only.c b/clang/test/CodeGen/debug-info-gline-tables-only.c index e890dbb0da2..6f832be8287 100644 --- a/clang/test/CodeGen/debug-info-gline-tables-only.c +++ b/clang/test/CodeGen/debug-info-gline-tables-only.c @@ -1,5 +1,6 @@ // RUN: %clang_cc1 %s -debug-info-kind=line-tables-only -S -emit-llvm -o - | FileCheck %s -// Checks that clang with "-gline-tables-only" doesn't emit debug info +// RUN: %clang_cc1 %s -debug-info-kind=line-directives-only -S -emit-llvm -o - | FileCheck %s +// Checks that clang with "-gline-tables-only" or "-gline-directives-only" doesn't emit debug info // for variables and types. // CHECK-NOT: DW_TAG_variable diff --git a/clang/test/CodeGen/debug-info-gline-tables-only2.c b/clang/test/CodeGen/debug-info-gline-tables-only2.c index da17d41f3b1..8b8fbc2fe00 100644 --- a/clang/test/CodeGen/debug-info-gline-tables-only2.c +++ b/clang/test/CodeGen/debug-info-gline-tables-only2.c @@ -1,5 +1,6 @@ // RUN: %clang_cc1 %s -debug-info-kind=line-tables-only -S -emit-llvm -o - | FileCheck %s -// Checks that clang with "-gline-tables-only" emits metadata for +// RUN: %clang_cc1 %s -debug-info-kind=line-directives-only -S -emit-llvm -o - | FileCheck %s +// Checks that clang with "-gline-tables-only" or "-gline-directives-only" emits metadata for // compile unit, subprogram and file. int main() { diff --git a/clang/test/CodeGen/debug-info-line.c b/clang/test/CodeGen/debug-info-line.c index 24981b54b7e..39595d148c1 100644 --- a/clang/test/CodeGen/debug-info-line.c +++ b/clang/test/CodeGen/debug-info-line.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -w -debug-info-kind=line-tables-only -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -w -debug-info-kind=line-directives-only -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s int f1(int a, int b) { // CHECK: icmp {{.*}}, !dbg [[DBG_F1:!.*]] diff --git a/clang/test/CodeGen/debug-info-macro.c b/clang/test/CodeGen/debug-info-macro.c index 7f7358d04bd..6294d43753f 100644 --- a/clang/test/CodeGen/debug-info-macro.c +++ b/clang/test/CodeGen/debug-info-macro.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -emit-llvm -debug-info-kind=line-tables-only -debug-info-macro %s -o - "-DC1(x)=( x + 5 )" -DA -include %S/Inputs/debug-info-macro.h -UC1 | FileCheck -check-prefixes=CHECK,NO_PCH %s +// RUN: %clang_cc1 -emit-llvm -debug-info-kind=line-directives-only -debug-info-macro %s -o - "-DC1(x)=( x + 5 )" -DA -include %S/Inputs/debug-info-macro.h -UC1 | FileCheck -check-prefixes=CHECK,NO_PCH %s // RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -debug-info-macro %s -o - "-DC1(x)=( x + 5 )" -DA -include %S/Inputs/debug-info-macro.h -UC1 | FileCheck -check-prefixes=CHECK,NO_PCH %s // RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -debug-info-macro %s -o - "-DC1(x)=( x + 5 )" -DA -include %S/Inputs/debug-info-macro.h -UC1 | FileCheck -check-prefixes=CHECK,NO_PCH %s // RUN: %clang_cc1 -emit-llvm -debug-info-macro %s -o - "-DC1(x)=( x + 5 )" -DA -include %S/Inputs/debug-info-macro.h -UC1 | FileCheck -check-prefixes=NO_MACRO %s diff --git a/clang/test/CodeGen/debug-info-scope.c b/clang/test/CodeGen/debug-info-scope.c index a25f1177a91..0c12c4d6046 100644 --- a/clang/test/CodeGen/debug-info-scope.c +++ b/clang/test/CodeGen/debug-info-scope.c @@ -1,5 +1,6 @@ // RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=limited -disable-llvm-passes -emit-llvm < %s | FileCheck %s // RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=line-tables-only -disable-llvm-passes -emit-llvm < %s | FileCheck --check-prefix=GMLT %s +// RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=line-directives-only -disable-llvm-passes -emit-llvm < %s | FileCheck --check-prefix=GMLT %s // Two variables with same name in separate scope. // Radar 8330217. int main() { diff --git a/clang/test/CodeGen/lifetime-debuginfo-1.c b/clang/test/CodeGen/lifetime-debuginfo-1.c index e2e45cb7f81..10fd2c21644 100644 --- a/clang/test/CodeGen/lifetime-debuginfo-1.c +++ b/clang/test/CodeGen/lifetime-debuginfo-1.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -O1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=line-tables-only %s -o - | FileCheck %s +// RUN: %clang_cc1 -O1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=line-directives-only %s -o - | FileCheck %s // Inserting lifetime markers should not affect debuginfo diff --git a/clang/test/CodeGen/lifetime-debuginfo-2.c b/clang/test/CodeGen/lifetime-debuginfo-2.c index 1d2fb595769..a2e06519358 100644 --- a/clang/test/CodeGen/lifetime-debuginfo-2.c +++ b/clang/test/CodeGen/lifetime-debuginfo-2.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -O1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=line-tables-only %s -o - | FileCheck %s +// RUN: %clang_cc1 -O1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=line-directives-only %s -o - | FileCheck %s // Inserting lifetime markers should not affect debuginfo: lifetime.end is not // a destructor, but instrumentation for the compiler. Ensure the debug info for |