r188352 - Driver::IsUsingLTO() no longer return true when seeing -emit-llvm.
Eric Christopher
echristo at gmail.com
Tue Aug 13 21:55:42 PDT 2013
No worries.
That said I think we should come up with a loose plan of how we'd like
to expose LTO to users with some command line options and development
workflow. I don't think it'll take too long to get some consensus and
then it comes down to a matter of implementation and those are much
better things to argue about :)
-eric
On Tue, Aug 13, 2013 at 9:53 PM, Shuxin Yang <shuxin.llvm at gmail.com> wrote:
> Reverted, I don't know why it cause failure.
> Sorry for the confusion.
>
>
> On 8/13/13 9:52 PM, Eric Christopher wrote:
>>
>> On Tue, Aug 13, 2013 at 9:36 PM, Shuxin Yang <shuxin.llvm at gmail.com>
>> wrote:
>>>
>>> Author: shuxin_yang
>>> Date: Tue Aug 13 23:36:53 2013
>>> New Revision: 188352
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=188352&view=rev
>>> Log:
>>> Driver::IsUsingLTO() no longer return true when seeing -emit-llvm.
>>>
>>> The rationale for this change is to differentiate following two
>>> situations:
>>> 1) clang -c -emit-llvm a.c
>>> 2) clang -c -flto a.c
>>>
>>> Reviewed by Eric Christopher. Thanks a lot!
>>>
>> Wait, what? I thought we were in the middle of a discussion? :)
>>
>> -eric
>>
>>> 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=188352&r1=188351&r2=188352&view=diff
>>>
>>> ==============================================================================
>>> --- cfe/trunk/lib/Driver/Driver.cpp (original)
>>> +++ cfe/trunk/lib/Driver/Driver.cpp Tue Aug 13 23:36:53 2013
>>> @@ -1339,6 +1339,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);
>>> }
>>> @@ -1351,9 +1355,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
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
More information about the cfe-commits
mailing list