Implement -rewrite-macros, which is a crazy macro expander that expands
macros but doesn't expand #includes, remove comments, remove #defines etc. For example: ---- #include <stdio.h> #define bbaa #define funclike(x) x "a" x "b" x bbaa bbaa #if 1 funclike("gar") foo /*blah*/ bar bar #endif #if 0 funclike() #endif ---- rewrites to: ---- #include <stdio.h> #define bbaa #define funclike(x) x "a" x "b" x /*bbaa bbaa*/ #if 1 "gar" "a" "gar" "b" "gar"/*funclike*//*("gar")*/ foo /*blah*/ bar bar #endif #if 0 /*funclike()*/ #endif ---- llvm-svn: 50925
Loading
Please register or sign in to comment