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

Vladimir Medic Vladimir.Medic at imgtec.com
Tue Jan 27 05:45:03 PST 2015


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150127/ed2ca5fd/attachment.html>


More information about the llvm-dev mailing list