<div dir="ltr"><div>Hello,</div><div><br></div><div>is there anything similar to __attribute__((annotate("foo"))) that works on declarations (and their parameters) instead of definitions? </div><div><br></div><div>I am trying to get Clang to pass an annotation such as</div><div><br></div><div>extern void foo(int *a __attribute__((annotate("foo"))) , int *b)</div><div><br></div><div> or, if the above isnt possible, an annotation on the entire function</div><div><br></div><div>extern void foo(int *a , int *b) __attribute__((annotate("foo")))</div><div><br></div><div><br></div><div>down to the LLVM IR in any way. At the moment, this is for a prototype and I would like to have a quick and dirty way that I can iterate on -- so ideally something string-based. </div><div><br></div><div>Is there a solution I have missed, or should I roll my own attribute. If so, what would the cleanest way of emitting this in the IR be -- perhaps weak symbols in the LLVM IR? </div><div><br></div><div>Regards,</div><div>Julian </div></div>