summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2015-08-27 19:46:20 +0000
committerAdrian Prantl <aprantl@apple.com>2015-08-27 19:46:20 +0000
commit6b21ab21d120abf46f06803d47da123b4e8be420 (patch)
tree67a155d58aa3e07fc339ab38615e5bf78b60e6fc /clang/lib/Driver
parented6eab32b38b54ed513e38eafbab6e38f3b58738 (diff)
downloadbcm5719-llvm-6b21ab21d120abf46f06803d47da123b4e8be420.tar.gz
bcm5719-llvm-6b21ab21d120abf46f06803d47da123b4e8be420.zip
Add a -gmodules option to the driver and a -dwarf-ext-refs to cc1
to enable the use of external type references in the debug info (a.k.a. module debugging). The driver expands -gmodules to "-g -fmodule-format=obj -dwarf-ext-refs" and passes that to cc1. All this does at the moment is set a flag codegenopts. http://reviews.llvm.org/D11958 llvm-svn: 246192
Diffstat (limited to 'clang/lib/Driver')
-rw-r--r--clang/lib/Driver/Tools.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 6de6eeb011c..c90c63d850a 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -3739,6 +3739,12 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-dwarf-column-info");
// FIXME: Move backend command line options to the module.
+ if (Args.hasArg(options::OPT_gmodules)) {
+ CmdArgs.push_back("-g");
+ CmdArgs.push_back("-dwarf-ext-refs");
+ CmdArgs.push_back("-fmodule-format=obj");
+ }
+
// -gsplit-dwarf should turn on -g and enable the backend dwarf
// splitting and extraction.
// FIXME: Currently only works on Linux.
OpenPOWER on IntegriCloud