[LLVMdev] metadata as function arguments

Eli Bendersky eliben at google.com
Mon Feb 11 13:50:59 PST 2013


On Mon, Feb 11, 2013 at 1:32 PM, Niko Zarzani <koni10 at hotmail.it> wrote:
> Hi, I am trying to write a Pass that reads metadata passed as a argument to
> a function.
>
> I have written them by hand in the .s file in the same way of the IR
> reference (http://llvm.org/docs/LangRef.html#named-metadata) :
>
> define i32 @function(i32 %argInt, metadata !3) nounwind {

This seems wrong. "metadata" is a type (like i32), and the exclamation
mark is only used to refer to metadata nodes, not to declare functions
with them.

Eli



More information about the llvm-dev mailing list