Hi,
I'm trying to add a function attribute to clang/llvm.
I need an attribute that will have an additional information of a variable name.
e.g. I would like to add support for something like:
void foo() __attribute__ ((xyz(v)) {…}
such that on the IR stage I can realize that the function foo has the attribute xyz and an argument v that marks variable v (which is a variable inside foo) for my needs.
I was able to add a function attribute without an argument, but I don't understand how to parse/save/analyze the argument.
I would appreciate any ideas/examples/references.
Thanks a lot,
Tehila.
_______________________________________________ LLVM Developers mailing list llvm...@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Hi Gael,
Thanks a lot for your response, it was very helpful!
How did you manage to access the argument value at the IR stage?
Thanks again,
Tehila.
Gaël Jobin via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 8 01:08:05 PDT 2015
How did you manage to access the argument value at the IR stage?