tejohnson added a comment.

In https://reviews.llvm.org/D31114#704726, @mehdi_amini wrote:

> In https://reviews.llvm.org/D31114#704649, @tejohnson wrote:
>
> > I think you won't get the correct handling of -emit-llvm and -emit-llvm-bc 
> > since we don't get the handling for Backend_Emit* in 
> > EmitAssemblyHelper::EmitAssembly.
>
>
> I was not trying to achieve this. And your approach of an "OptimizeOnly" or 
> "DisableCodeGen" on the lot::Config for this purpose makes sense.


I'm confused - are you saying you now think https://reviews.llvm.org/D31100 and 
https://reviews.llvm.org/D31101 are the right approach?

Ah, I see that in thinBackend the created TM is used by handleAsmUndefinedRefs 
and opt(), so this patch is complementary. But in that case, to set up the TM 
accurately, this code does need to set up the other fields of lto::Config read 
by createTargetMachine, e.g. RelocModel, CodeModel, etc.


https://reviews.llvm.org/D31114



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to