svn commit: r298438 - head/contrib/llvm/tools/clang/lib/Driver

Dimitry Andric dim at FreeBSD.org
Thu Apr 21 20:38:12 UTC 2016


Author: dim
Date: Thu Apr 21 20:38:10 2016
New Revision: 298438
URL: https://svnweb.freebsd.org/changeset/base/298438

Log:
  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.

Modified:
  head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp

Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp
==============================================================================
--- head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp	Thu Apr 21 20:37:53 2016	(r298437)
+++ head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp	Thu Apr 21 20:38:10 2016	(r298438)
@@ -6061,6 +6061,12 @@ void ClangAs::ConstructJob(Compilation &
   // 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());
 


More information about the svn-src-head mailing list