summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/debug-options.c
diff options
context:
space:
mode:
authorScott Linder <scott@scottlinder.com>2018-02-26 17:32:31 +0000
committerScott Linder <scott@scottlinder.com>2018-02-26 17:32:31 +0000
commita2fbcef8ee7cc4c90cbe2554e36d9cb859965833 (patch)
tree10e3ac019f5c8338c51d02bcd4024f27bdb95251 /clang/test/Driver/debug-options.c
parent2a26a286db424050435d1e8e01c39438d927aa06 (diff)
downloadbcm5719-llvm-a2fbcef8ee7cc4c90cbe2554e36d9cb859965833.tar.gz
bcm5719-llvm-a2fbcef8ee7cc4c90cbe2554e36d9cb859965833.zip
[DebugInfo] Support DWARF v5 source code embedding extension
In DWARF v5 the Line Number Program Header is extensible, allowing values with new content types. This vendor extension to DWARF v5 allows source text to be embedded directly in the line tables of the debug line section. Add new flag (-g[no-]embed-source) to Driver and CC1 which indicates that source should be passed through to LLVM during CodeGen. Differential Revision: https://reviews.llvm.org/D42766 llvm-svn: 326102
Diffstat (limited to 'clang/test/Driver/debug-options.c')
-rw-r--r--clang/test/Driver/debug-options.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Driver/debug-options.c b/clang/test/Driver/debug-options.c
index 3bec1e141d1..b3f7aa60e32 100644
--- a/clang/test/Driver/debug-options.c
+++ b/clang/test/Driver/debug-options.c
@@ -245,3 +245,13 @@
// RUN: %clang -### %s 2>&1 | FileCheck -check-prefix=NOMACRO %s
// MACRO: "-debug-info-macro"
// NOMACRO-NOT: "-debug-info-macro"
+//
+// RUN: %clang -### -gdwarf-5 -gembed-source %s 2>&1 | FileCheck -check-prefix=GEMBED_5 %s
+// RUN: %clang -### -gdwarf-2 -gembed-source %s 2>&1 | FileCheck -check-prefix=GEMBED_2 %s
+// RUN: %clang -### -gdwarf-5 -gno-embed-source %s 2>&1 | FileCheck -check-prefix=NOGEMBED_5 %s
+// RUN: %clang -### -gdwarf-2 -gno-embed-source %s 2>&1 | FileCheck -check-prefix=NOGEMBED_2 %s
+//
+// GEMBED_5: "-gembed-source"
+// GEMBED_2: error: invalid argument '-gembed-source' only allowed with '-gdwarf-5'
+// NOGEMBED_5-NOT: "-gembed-source"
+// NOGEMBED_2-NOT: error: invalid argument '-gembed-source' only allowed with '-gdwarf-5'
OpenPOWER on IntegriCloud