[cfe-dev] How to implement new pragma within clang

Compiler Dragon via cfe-dev cfe-dev at lists.llvm.org
Mon Jun 26 10:55:27 PDT 2017


Hi,


take a look at the PragmaHandler class. You can find an example here:


https://clang.llvm.org/docs/ClangPlugins.html


Marcel

> Zbigniew Sarbinowski via cfe-dev <cfe-dev at lists.llvm.org> hat am 26. Juni 2017 um 18:25 geschrieben:
> 
>      
>     Hello,
>      
>     I'm trying to fix, redesign, current implementation of the following pragma.
>      
>     #pragma map(identifier, "new name")
>      
>     The pragma can appear before or after 'identifier' is defined.
>     The current implementation works only on simple identifiers in global scope. 
>      
>     I need to fix the cases when 'identifier' is a nested specifier. For example:
>     ::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.
>      
>     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. 
>      
>     Are there any similar pragmas which can help me out? Any advice you can offer is appreciated.
>      
>      
>      
> 
> 
>     Regards, ______________________________________
>     Zbigniew Sarbinowski (Zibi) C++ FE development
>     IBM z Systems Software, IBM Systems Unit
>     8200 Warden Ave. Markham ON, L6G 1C7
>     C2/712/8200/MKM Tel: 905-413-6071
> 
>     _______________________________________________ cfe-dev mailing list cfe-dev at lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170626/dbe2b4e7/attachment.html>


More information about the cfe-dev mailing list