r266775 - Pass dwarf-version to cc1as.

Dimitry Andric via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 16 14:16:33 PDT 2016


Hi Hans,

Can we please merge this one to release_39 too?  I forgot all about it, sorry.

Doug, can you please approve?

-Dimitry

> On 19 Apr 2016, at 19:43, Douglas Katzman via cfe-commits <cfe-commits at lists.llvm.org> wrote:
> 
> Author: dougk
> Date: Tue Apr 19 12:43:54 2016
> New Revision: 266775
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=266775&view=rev
> Log:
> Pass dwarf-version to cc1as.
> 
> Fix PR26999 - crashing in cc1as with any '*bsd' target.
> 
> Modified:
>    cfe/trunk/lib/Driver/Tools.cpp
>    cfe/trunk/test/Driver/save-temps.c
> 
> Modified: cfe/trunk/lib/Driver/Tools.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=266775&r1=266774&r2=266775&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/Tools.cpp (original)
> +++ cfe/trunk/lib/Driver/Tools.cpp Tue Apr 19 12:43:54 2016
> @@ -6314,6 +6314,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());
> 
> 
> Modified: cfe/trunk/test/Driver/save-temps.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/save-temps.c?rev=266775&r1=266774&r2=266775&view=diff
> ==============================================================================
> --- cfe/trunk/test/Driver/save-temps.c (original)
> +++ cfe/trunk/test/Driver/save-temps.c Tue Apr 19 12:43:54 2016
> @@ -77,3 +77,8 @@
> // CHECK-OBJ-NOO: "-o" "save-temps.s"
> // CHECK-OBJ-NOO: "-o" "save-temps.o"
> // CHECK-OBJ-NOO: "-o" "a.out"
> +
> +// RUN: %clang -target i386-unknown-freebsd -save-temps -g -c %s -### 2>&1 \
> +// RUN:   | FileCheck %s -check-prefix=CHECK-SAVE-TEMPS
> +// CHECK-SAVE-TEMPS: "-cc1as"
> +// CHECK-SAVE-TEMPS: "-dwarf-version={{.}}"
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160816/21ed7acd/attachment.sig>


More information about the cfe-commits mailing list