summaryrefslogtreecommitdiffstats
path: root/clang/Driver/RewriteMacros.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move <root>/Driver into <root>/tools/clang-cc.Daniel Dunbar2009-03-241-236/+0
| | | | | | Again, I tried to update cmake but it is untested. llvm-svn: 67605
* rename getFullFilePos -> getFileOffset.Chris Lattner2009-01-271-6/+6
| | | | llvm-svn: 63097
* use simplified Lexer ctor.Chris Lattner2009-01-171-3/+1
| | | | llvm-svn: 62416
* this massive patch introduces a simple new abstraction: it makesChris Lattner2009-01-171-1/+1
| | | | | | | | | | | | | | | "FileID" a concept that is now enforced by the compiler's type checker instead of yet-another-random-unsigned floating around. This is an important distinction from the "FileID" currently tracked by SourceLocation. *That* FileID may refer to the start of a file or to a chunk within it. The new FileID *only* refers to the file (and its #include stack and eventually #line data), it cannot refer to a chunk. FileID is a completely opaque datatype to all clients, only SourceManager is allowed to poke and prod it. llvm-svn: 62407
* more SourceLocation lexicon change: instead of referring to theChris Lattner2009-01-161-2/+2
| | | | | | "logical" location, refer to the "instantiation" location. llvm-svn: 62316
* [LLVM up] Update for raw_fd_ostream change. This fixes a FIXME thatDaniel Dunbar2008-11-131-2/+2
| | | | | | | | the Backend output should be done in binary mode. - I'd appreciate it if someone who has a Windows build could verify this. llvm-svn: 59221
* Change how raw lexers are handled: instead of creating them and thenChris Lattner2008-10-121-1/+1
| | | | | | | | | | | using LexRawToken, create one and use LexFromRawLexer. This avoids twiddling the RawLexer flag around and simplifies some code (even speeding raw lexing up a tiny bit). This change also improves the token paster to use a Lexer on the stack instead of new/deleting it. llvm-svn: 57393
* Patch by Csaba Hruska!Ted Kremenek2008-09-131-8/+13
| | | | | | | "Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch covers the AST library, but ignores Analysis lib." llvm-svn: 56185
* Fix typo.Ted Kremenek2008-08-141-1/+1
| | | | llvm-svn: 54774
* 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