[LLVMdev] [Mips][TargetOptions] How to properly instantiate TargetOptions in MC layer?

Eric Christopher echristo at gmail.com
Tue Jan 27 15:59:41 PST 2015


You can't really get there from here is the short answer. You can possible
get MCTargetOptions, but then you need to change all of the constructors
and calls across all of the backends to do this.

I fixed all of the things that are currently in tree - what are you seeing
or what do you need migrated around?

-eric

ps. Also, cc'ing me on it would have likely gotten you a faster answer, I
just noticed this while going through email.

On Tue Jan 27 2015 at 5:49:58 AM Vladimir Medic <Vladimir.Medic at imgtec.com>
wrote:

>  Hi all,
> we have several features in Mips that are dependent on target abi. A
> recent commit(r224492) introduced a new -target-abi option to TargetOptions
> struct that provides access to abi string. This info is stored in
> MCSubtarget class(ARMSubratget in this case) and distributed to other
> libraries. Unfortunately, for Mips we need this info in other classes that
> don't have access to MCSubtarget class, like MCAsmBackend and
> MCTargetStreamer and instantiating a new copy od TargetOption causes  link
> errors as it is already instantiated in some drivers(llc.cpp for example).
> What would be the proper way to get the TargetOptions struct available in
> other classes?
>
> Kind regards,
>
> Vladimir
>  _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150127/6895a003/attachment.html>


More information about the llvm-dev mailing list