<!DOCTYPE html>
<html><head>
    <meta charset="UTF-8">
</head><body><p>Hi,</p><p><br></p><p>take a look at the PragmaHandler class. You can find an example here:</p><p><br></p><p><a href="https://clang.llvm.org/docs/ClangPlugins.html">https://clang.llvm.org/docs/ClangPlugins.html</a></p><p><br></p><p>Marcel</p><blockquote type="cite">Zbigniew Sarbinowski via cfe-dev <cfe-dev@lists.llvm.org> hat am 26. Juni 2017 um 18:25 geschrieben:<br><br><div class="ox-e492cd41c1-socmaildefaultfont" dir="ltr" style="font-family: Courier New, Courier, monospace; font-size: 10.5pt;"><div dir="ltr"> </div><div dir="ltr">Hello,</div><div dir="ltr"> </div><div dir="ltr">I'm trying to fix, redesign, current implementation of the following pragma.</div><div dir="ltr"> </div><div dir="ltr">#pragma map(identifier, "new name")</div><div dir="ltr"> </div><div dir="ltr">The pragma can appear before or after 'identifier' is defined.</div><div dir="ltr">The current implementation works only on simple identifiers in global scope. </div><div dir="ltr"> </div><div dir="ltr">I need to fix the cases when 'identifier' is a nested specifier. For example:</div><div dir="ltr">::i or ns::i, where ns is a namespace or a class. The 'identifier' can be an object or function with external linkage. It can also be a function with  optionally specified parameters to distinguish overloaded functions.</div><div dir="ltr"> </div><div dir="ltr">The 'identifier' should be lookup first at the point of the pragma and if not resolved once again at the end of compilation and let the back-end know its new name. </div><div dir="ltr"> </div><div dir="ltr">Are there any similar pragmas which can help me out? Any advice you can offer is appreciated.</div><div dir="ltr"> </div><div dir="ltr"> </div><div dir="ltr"> </div><div dir="ltr"><br><br>Regards, ______________________________________<br>Zbigniew Sarbinowski (Zibi) C++ FE development<br>IBM z Systems Software, IBM Systems Unit<br>8200 Warden Ave. Markham ON, L6G 1C7<br>C2/712/8200/MKM Tel: 905-413-6071</div></div><br> _______________________________________________ cfe-dev mailing list cfe-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</blockquote></body></html>