passing clang attribute to llvm

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

passing clang attribute to llvm

Alex Denisov via cfe-dev
Hi
I am trying to declare custom attribute in clang on local variables and pass it to llvm IR
I am able to add the attribute in Attr.td and SemaDeclAttr.cpp. In CGDecl.cpp - I can add the attribute to llvm *value as long it as the variable in C is static or global (EmitStaticVarDecl)
AddAttr API exists in llvm global variable but not on instruction.
Is there a way to attach attribute to llvm local variables which I assume would go to allocaInst. Is there any other way?
Thanks
Rajarshi

 
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev