[LLVMdev] [RFC] Module Flags Metadata

Bill Wendling wendling at apple.com
Tue Jan 24 11:58:58 PST 2012


On Jan 24, 2012, at 1:25 AM, Duncan Sands wrote:

> Hi Bill,
> 
>> This is a proposal for implementing "module flags". Please take a look at this and give any feedback you may have.
> 
> what does this give you that you can't get with the existing scheme of using
> global variables in a special section?
> 
In the case of "image info" flags, we would need to have special code in the linker which knew to look for that special GV name, and then be able to interpret and merge two or more GVs together. It's specialized specifically to ObjC+MachO and very hacky. Placing specialized code into a generic module isn't a good idea. Also, that method isn't extensible to other potential uses (I'm suggesting they use it for some OpenCL work). And finally, because this would be defined in the LangRef document, the flags and how they're interpreted / merged would be formalized. The one LLVM submodule which cares about these flags would interpret them according to the LangRef.

-bw





More information about the llvm-dev mailing list