[cfe-dev] Macro Registration (Migration issue for setMacroInfo function)

gladtbx gao2 at illinois.edu
Mon Aug 26 14:50:05 PDT 2013


MacroInfo* RegisterMacro(Preprocessor &PP, const char *Name){
  // Get the identifier.
  IdentifierInfo *Id = PP.getIdentifierInfo(Name);

  // Mark it as being a macro that is builtin.
  MacroInfo *MI = PP.AllocateMacroInfo(SourceLocation());
  MI->setIsBuiltinMacro();
  PP.setMacroInfo(Id,MI);

return MI;
}

Hi, we used to have this function to register Macros for our application,
however after we updated our clang to the latest version, the setMacroInfo 
function do not exist any more. Anyone has any idea how we should do 
it now with the latest version of clang? Thank you.

Gao



--
View this message in context: http://clang-developers.42468.n3.nabble.com/Macro-Registration-Migration-issue-for-setMacroInfo-function-tp4034069.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list