aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-04-21 20:38:10 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-04-21 20:38:10 +0000
commitb753b98b165e6b4add36c585a9a1ca85d68a2a2f (patch)
tree29fdb211180253989a7243b1740fe3f6ffa10567 /contrib
parentf0a19145c0ebe91553490c6d79c6bf99eda1fd4d (diff)
downloadsrc-b753b98b165e6b4add36c585a9a1ca85d68a2a2f.tar.gz
src-b753b98b165e6b4add36c585a9a1ca85d68a2a2f.zip
Pull r266775 from upstream clang trunk (by Douglas Katzman):
Pass dwarf-version to cc1as. Fix PR26999 - crashing in cc1as with any '*bsd' target. This should fix possible crashes when using -g in combination with -save-temps.
Notes
Notes: svn path=/head/; revision=298438
Diffstat (limited to 'contrib')
-rw-r--r--contrib/llvm/tools/clang/lib/Driver/Tools.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/llvm/tools/clang/lib/Driver/Tools.cpp b/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
index b7ac24fe674e..0522d46322c1 100644
--- a/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
+++ b/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
@@ -6061,6 +6061,12 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
// FIXME: Stop lying and consume only the appropriate driver flags
Args.ClaimAllArgs(options::OPT_W_Group);
+ // Assemblers that want to know the dwarf version can't assume a value,
+ // since the defaulting logic resides in the driver. Put in something
+ // reasonable now, in case a subsequent "-Wa,-g" changes it.
+ RenderDebugEnablingArgs(Args, CmdArgs, CodeGenOptions::NoDebugInfo,
+ getToolChain().GetDefaultDwarfVersion(),
+ llvm::DebuggerKind::Default);
CollectArgsForIntegratedAssembler(C, Args, CmdArgs,
getToolChain().getDriver());