summaryrefslogtreecommitdiffstats
path: root/clang/Driver/RewriteMacros.cpp
Commit message (Collapse)AuthorAgeFilesLines
* comment out #pragma mark and #warning directives.Chris Lattner2008-07-251-2/+21
| | | | llvm-svn: 54020
* rewrite handling of the raw token stream in -rewrite-macros to lexChris Lattner2008-07-251-29/+52
| | | | | | | everything up front into a vector. This makes it easier to scan around the stream when needed. llvm-svn: 54019
* make rewrite macros insert a space when commenting out macros where the ↵Chris Lattner2008-06-031-2/+3
| | | | | | | | token didn't lead with a space. llvm-svn: 51896
* Two identifiers are not the same unless they have the same identifier info.Chris Lattner2008-05-311-1/+7
| | | | llvm-svn: 51827
* Implement -rewrite-macros, which is a crazy macro expander that expandsChris Lattner2008-05-101-9/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* make #if 0 code compile, even though it still isn't very useful.Chris Lattner2008-05-091-13/+4
| | | | llvm-svn: 50920
* start implementation of a macro rewriter, this is currently just stubbed out.Chris Lattner2008-05-081-0/+76
llvm-svn: 50845
OpenPOWER on IntegriCloud