[cfe-dev] how to add objectlike macro?

huc1985 huc1985 at 163.com
Wed Apr 10 23:45:53 PDT 2013


Hello all.
I want to add some objectlike macro to Preprocessor.  I'm using libclang, i
want add macro in code. I just know add simple one.
 e.g.  #define TEST ==>>
    Preprocessor *pp;
    IdentifierInfo *Id = pp->getIdentifierInfo("TEST");
    MacroInfo *MI = pp->AllocateMacroInfo(SourceLocation());
    MI->setIsBuiltinMacro();
    pp->setMacroInfo(Id, MI);

 #define MAX 100
 How to do next?
    
        



--
View this message in context: http://clang-developers.42468.n3.nabble.com/how-to-add-objectlike-macro-tp4031430.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list