Cheat Cheat

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

Cheat Cheat

Kristof Beyls via cfe-dev
Hi Gurus,
I am a newbie at llvm/clang, I am doing research at the preprocessor level.

I am now able to build clang in debug mode and manage to navigate into it with GDB, working on linux desktop.

I'd like to know if cheat cheat exist about

How to add a new directive (other than extending #pragma) i.e adding
#MyDirective

How to add a new predefined fun-like macro, for instance _MyMacro()

For #MyDirective case, my guess that I need to do:

- Define a new MyDirective token
- Implement a Handler for it
-  Implement the PrintPreprocessedOutput
- Test indeed :)

I can't translate  into a fileset I should look at and patch.

The _MyMacro() case will be different, didn't not looked at it yet.

Does someone has a chat cheat at hand ? :-) or a git*.com link of an implementation I could infere from ?

Thanx in advance,
Cheers,
Phi

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