[LLVMdev] PROPOSAL : Introduce NamedMetadata

Nick Lewycky nicholas at mxc.ca
Mon Jul 27 22:16:03 PDT 2009


Devang Patel wrote:
> On Mon, Jul 27, 2009 at 9:31 PM, Nick Lewycky<nicholas at mxc.ca> wrote:
> 
>> Why not have a named GlobalValue with an MDNode initializer? How is this
>> different from what we had before?
> 
> GlobalValue initializer accepts only Constants.

So in my initial implementation, before I submitted it for review, I 
tried making them not be Constants, only to discover that if I did that 
then I couldn't use then as GV initializers.

And it's not preposterous for them to be Constants. Functions are an 
example of a nameable zero-operand non-uniqued constant.

Is there any particular benefit to keeping them out of Constant and 
adding NamedMetadata?

Nick




More information about the llvm-dev mailing list