<div dir="ltr"><div>Hi<br><br></div><div>i wish to add Attribute on Function so i added <br><br>def MutateFunction : InheritableAttr {<br> let Spellings = [GNU<"mutate_function_hint">];<br> let Args = [UnsignedArgument<"SIndex">,UnsignedArgument<"RIndex">];<br> let Subjects = SubjectList<[Function], ErrorDiag>;<br> let Documentation = [Undocumented];<br>}<br><br></div><div>i have added function to hadle it, which simply adds attribute to Decl object<br><br></div><div>When i dump this declaration in SemaDeclAttr.cpp: handleMutateFunction i get<br><br> FunctionDecl 0xc9f9270 <kernel.cpp:6:12, line:7:1> col:1 k 'void (class Rad::Nav<short> &)'<br>|-ParmVarDecl 0xc9f9000 <col:3, col:18> col:18 inParam 'class Rad::Nav<short>&'<br>`-MutateFunction 0xc9f92e0 <line:6:40, col:68> 50 10<br><br></div><div>But this attribute is not visible in final IR.<br></div><div>attribute #1 = { nounwind .... }<br><br></div><div>How can i get it in #1?<br></div>Thanks in advance><div><div class="gmail_signature"><div dir="ltr"><span style="color:rgb(80,0,80)">-- </span><br style="color:rgb(80,0,80)"><span style="color:rgb(80,0,80)">Regards</span><br><span style="color:rgb(80,0,80)"></span><div style="color:rgb(80,0,80)"><font size="4"></font><div><font size="4">Mahesh C. Attarde.</font><br></div></div></div></div></div>
</div>