r189148 - Driver::IsUsingLTO() no longer return true when seeing -emit-llvm.
Shuxin Yang
shuxin.llvm at gmail.com
Fri Aug 23 14:50:30 PDT 2013
On 8/23/13 2:44 PM, Chandler Carruth wrote:
> Please document this is the release notes.
Yes, we should.
I never modify release note before, I don't know where it is either:-)
I'm at home now. I will ask my coworkers next Monday for this matter
(I'm serious).
Thanks
> If possible, also adding a test case? But I suspect you can't test
> this yet.
>
>
> On Fri, Aug 23, 2013 at 2:34 PM, Shuxin Yang <shuxin.llvm at gmail.com
> <mailto:shuxin.llvm at gmail.com>> wrote:
>
> Author: shuxin_yang
> Date: Fri Aug 23 16:34:57 2013
> New Revision: 189148
>
> URL: http://llvm.org/viewvc/llvm-project?rev=189148&view=rev
> Log:
> Driver::IsUsingLTO() no longer return true when seeing -emit-llvm.
>
> One step toward differentiating following two commands:
> clang -O3 -flto a.c -c, and
> clang -O3 -emit-llvm a.c
>
> Thanks many awesome folks for clarifying things.
>
> Modified:
> cfe/trunk/lib/Driver/Driver.cpp
>
> Modified: cfe/trunk/lib/Driver/Driver.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=189148&r1=189147&r2=189148&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/Driver.cpp (original)
> +++ cfe/trunk/lib/Driver/Driver.cpp Fri Aug 23 16:34:57 2013
> @@ -1340,6 +1340,10 @@ Action *Driver::ConstructPhaseAction(con
> types::ID Output =
> Args.hasArg(options::OPT_S) ? types::TY_LTO_IR :
> types::TY_LTO_BC;
> return new CompileJobAction(Input, Output);
> + } else if (Args.hasArg(options::OPT_emit_llvm)) {
> + types::ID Output =
> + Args.hasArg(options::OPT_S) ? types::TY_LLVM_IR :
> types::TY_LLVM_BC;
> + return new CompileJobAction(Input, Output);
> } else {
> return new CompileJobAction(Input, types::TY_PP_Asm);
> }
> @@ -1352,9 +1356,7 @@ Action *Driver::ConstructPhaseAction(con
> }
>
> bool Driver::IsUsingLTO(const ArgList &Args) const {
> - // Check for -emit-llvm or -flto.
> - if (Args.hasArg(options::OPT_emit_llvm) ||
> - Args.hasFlag(options::OPT_flto, options::OPT_fno_lto, false))
> + if (Args.hasFlag(options::OPT_flto, options::OPT_fno_lto, false))
> return true;
>
> // Check for -O4.
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu <mailto:cfe-commits at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130823/82315e8c/attachment.html>
More information about the cfe-commits
mailing list