summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2019-12-18 11:13:46 -0800
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2019-12-18 14:31:41 -0800
commitd79b11fefb8e92660893b8ccf9e21d23668a6c73 (patch)
tree45ed7e2d6a973878358576dd67363c28cdd04d8a /clang/lib
parenta8c678cb9a90c4f82505f573e9b9fa23fec93a64 (diff)
downloadbcm5719-llvm-d79b11fefb8e92660893b8ccf9e21d23668a6c73.tar.gz
bcm5719-llvm-d79b11fefb8e92660893b8ccf9e21d23668a6c73.zip
[Remarks][Driver] Run dsymutil when remarks are enabled
When clang is invoked with a source file without -c or -S, it creates a cc1 job, a linker job and if debug info is requested, a dsymutil job. In case of remarks, we should also create a dsymutil job to avoid losing the remarks that will be generated in a tempdir that gets removed. Differential Revision: https://reviews.llvm.org/D71675
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Driver/Driver.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 35e7998bf22..e718b8366df 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -1990,8 +1990,9 @@ void Driver::BuildUniversalActions(Compilation &C, const ToolChain &TC,
// Handle debug info queries.
Arg *A = Args.getLastArg(options::OPT_g_Group);
- if (A && !A->getOption().matches(options::OPT_g0) &&
- !A->getOption().matches(options::OPT_gstabs) &&
+ bool enablesDebugInfo = A && !A->getOption().matches(options::OPT_g0) &&
+ !A->getOption().matches(options::OPT_gstabs);
+ if ((enablesDebugInfo || willEmitRemarks(Args)) &&
ContainsCompileOrAssembleAction(Actions.back())) {
// Add a 'dsymutil' step if necessary, when debug info is enabled and we
OpenPOWER on IntegriCloud