Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Frontend: Factor out header include dumping (-H) into its own preprocessor | Daniel Dunbar | 2011-02-02 | 1 | -36/+4 | |
| | | | | | | | | callbacks class. - Aside from being generally cleaner, this also allows -H to work correctly in modes other than standard preprocessing (e.g., -c, -MM, etc.) llvm-svn: 124723 | |||||
* | Several PPCallbacks take an SourceLocation + IdentifierInfo, rather | Craig Silverstein | 2010-11-19 | 1 | -10/+7 | |
| | | | | | | | | | | | than a Token that holds the same information all in one easy-to-use package. There's no technical reason to prefer the former -- the information comes from a Token originally -- and it's clumsier to use, so I've changed the code to use tokens everywhere. Approved by clattner llvm-svn: 119845 | |||||
* | Make sure to always check the result of | Douglas Gregor | 2010-11-12 | 1 | -6/+20 | |
| | | | | | | | SourceManager::getPresumedLoc(), so that we don't try to make use of an invalid presumed location. Doing so can cause crashes. llvm-svn: 118885 | |||||
* | make sure #pragma clang is treated the same way as #pragma gcc in -E mode, | Chris Lattner | 2010-11-10 | 1 | -2/+3 | |
| | | | | | | unknown pragmas should just be passed through to the .i file. llvm-svn: 118659 | |||||
* | Handle '#line' in '-E' that has an empty file name. Fixes ↵ | Ted Kremenek | 2010-09-17 | 1 | -2/+2 | |
| | | | | | | <rdar://problem/8439412>. llvm-svn: 114142 | |||||
* | Make sure we're producing a newline in the preprocessed output before | Douglas Gregor | 2010-09-10 | 1 | -2/+1 | |
| | | | | | | emitting a #pragma, whenever one is needed. Fixes <rdar://problem/8417307>. llvm-svn: 113648 | |||||
* | When we parse a pragma, keep track of how that pragma was originally | Douglas Gregor | 2010-09-09 | 1 | -4/+20 | |
| | | | | | | | | spelled (#pragma, _Pragma, __pragma). In -E mode, use that information to add appropriate newlines when translating _Pragma and __pragma into #pragma, like GCC does. Fixes <rdar://problem/8412013>. llvm-svn: 113553 | |||||
* | Frontend/-H: Add comment on why I used a temporary string here. | Daniel Dunbar | 2010-09-08 | 1 | -0/+1 | |
| | | | | llvm-svn: 113379 | |||||
* | Frontend: Add basic -H support. | Daniel Dunbar | 2010-08-24 | 1 | -7/+39 | |
| | | | | | | | - I didn't implement the GCC "multiple include guard" detection parts, because it doesn't seem useful or obvious. llvm-svn: 111983 | |||||
* | Push location through the MacroUndefined PPCallback and use it to print ↵ | Benjamin Kramer | 2010-08-07 | 1 | -0/+13 | |
| | | | | | | #undefs in -dD mode. (PR7818) llvm-svn: 110523 | |||||
* | Modify the pragma handlers to accept and use StringRefs instead of ↵ | Argyrios Kyrtzidis | 2010-07-13 | 1 | -3/+3 | |
| | | | | | | | | | | | IdentifierInfos. When loading the PCH, IdentifierInfos that are associated with pragmas cause declarations that use these identifiers to be deserialized (e.g. the "clang" pragma causes the "clang" namespace to be loaded). We can avoid this if we just use StringRefs for the pragmas. As a bonus, since we don't have to create and pass IdentifierInfos, the pragma interfaces get a bit more simplified. llvm-svn: 108237 | |||||
* | Implement support for #pragma message, patch by Michael Spencer! | Chris Lattner | 2010-06-26 | 1 | -1/+25 | |
| | | | | llvm-svn: 106950 | |||||
* | fix the various buildbot failures by ensuring that tokens are really ↵ | Chris Lattner | 2010-06-15 | 1 | -4/+3 | |
| | | | | | | completely initialized. llvm-svn: 106043 | |||||
* | fix an uninitialized variable, patch by Michael Spencer! | Chris Lattner | 2010-06-15 | 1 | -0/+2 | |
| | | | | llvm-svn: 106025 | |||||
* | fix PR7360: -P mode turns off line markers, but not blank space. | Chris Lattner | 2010-06-12 | 1 | -15/+10 | |
| | | | | | | | Apparently some programs which abuse the preprocessor depend on this. llvm-svn: 105889 | |||||
* | Preprocessor: Ignore unknown pragmas in -E -dM and -Eonly modes. | Daniel Dunbar | 2010-06-11 | 1 | -0/+3 | |
| | | | | llvm-svn: 105830 | |||||
* | push some source location information down through the compiler, | Chris Lattner | 2010-04-20 | 1 | -4/+2 | |
| | | | | | | | | into ContentCache::getBuffer. This allows it to produce diagnostics on the broken #include line instead of without a location. llvm-svn: 101939 | |||||
* | Remove this hard-coded buffer size. In some basic experiments preprocessing | Dan Gohman | 2010-04-16 | 1 | -2/+0 | |
| | | | | | | | | | | | large files, this doesn't seem significantly better than just letting raw_ostream pick a buffer size. This code predates raw-ostream's automatic buffer sizing; in fact, it was introduced as part of the code which would eventually become raw_ostream. llvm-svn: 101473 | |||||
* | Improve line marker directive locations, patch by Jordy Rose | Chris Lattner | 2010-04-14 | 1 | -1/+1 | |
| | | | | llvm-svn: 101226 | |||||
* | make the token paste avoidance logic turn "..." into ".. ." instead of ". . ." | Chris Lattner | 2010-04-14 | 1 | -3/+6 | |
| | | | | | | when avoiding paste. Patch by David Peixotto! llvm-svn: 101218 | |||||
* | cache the PP's SourceManager. | Chris Lattner | 2010-04-13 | 1 | -5/+6 | |
| | | | | llvm-svn: 101099 | |||||
* | make the preprocessor listen to linemarker directives in -E mode, | Chris Lattner | 2010-04-13 | 1 | -10/+14 | |
| | | | | | | PR6101. This is based on a patch and testcase by Jordy Rose! llvm-svn: 101097 | |||||
* | Entering the main source file in the preprocessor can fail if the | Douglas Gregor | 2010-03-17 | 1 | -2/+4 | |
| | | | | | | source file has been changed. Handle that failure more gracefully. llvm-svn: 98727 | |||||
* | Use SmallString instead of SmallVector | Kovarththanan Rajaratnam | 2010-03-13 | 1 | -1/+1 | |
| | | | | llvm-svn: 98436 | |||||
* | Rename to addPPCallbacks since we're effectively adding a callback and maybe ↵ | Kovarththanan Rajaratnam | 2010-03-07 | 1 | -4/+4 | |
| | | | | | | chaining it to an existing one llvm-svn: 97913 | |||||
* | Revert 97324. Chris says this cleanup could hurt -E performance. | Benjamin Kramer | 2010-02-27 | 1 | -8/+24 | |
| | | | | llvm-svn: 97331 | |||||
* | Simplify code. | Benjamin Kramer | 2010-02-27 | 1 | -24/+8 | |
| | | | | llvm-svn: 97324 | |||||
* | Add an overload of Preprocessor::getSpelling which takes a SmallVector and | Benjamin Kramer | 2010-02-27 | 1 | -6/+1 | |
| | | | | | | returns a StringRef. Use it to simplify some repetitive code. llvm-svn: 97322 | |||||
* | Avoid an instantiation of std::sort. | Benjamin Kramer | 2010-01-19 | 1 | -14/+10 | |
| | | | | llvm-svn: 93882 | |||||
* | Neil points out that this could be simplified, do it. | Chris Lattner | 2009-12-09 | 1 | -15/+9 | |
| | | | | llvm-svn: 90927 | |||||
* | fix -dM with variadic macros, PR5699 | Chris Lattner | 2009-12-07 | 1 | -8/+15 | |
| | | | | llvm-svn: 90735 | |||||
* | some code cleanup. | Chris Lattner | 2009-12-07 | 1 | -9/+14 | |
| | | | | llvm-svn: 90732 | |||||
* | Integrate the following from the 'objective-rewrite' branch: | Steve Naroff | 2009-12-06 | 1 | -7/+13 | |
| | | | | | | http://llvm.org/viewvc/llvm-project?view=rev&revision=71473 llvm-svn: 90688 | |||||
* | Add PreprocessorOutputOptions to CompilerInvocation, and move initialization to | Daniel Dunbar | 2009-11-11 | 1 | -1/+1 | |
| | | | | | | clang-cc/Options.cpp llvm-svn: 86828 | |||||
* | Add PreprocessorOutputOptions, for things like -dM, -C, -CC which control -E | Daniel Dunbar | 2009-11-11 | 1 | -10/+16 | |
| | | | | | | mode. llvm-svn: 86827 | |||||
* | Fix buffer overflow in PrintMacroDefinition() by inverting the check to see ↵ | Ted Kremenek | 2009-11-03 | 1 | -1/+1 | |
| | | | | | | if the target buffer needs to be resized. Fixes <rdar://problem/7255377>. llvm-svn: 85872 | |||||
* | PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients | Daniel Dunbar | 2009-10-18 | 1 | -2/+2 | |
| | | | | | | are updated. llvm-svn: 84447 | |||||
* | Move misc clients to IdentifierInfo StringRef API. | Daniel Dunbar | 2009-10-18 | 1 | -2/+2 | |
| | | | | | | | | | - strcmp -> == - OS.write(II->getName() ...) -> OS << II->getNameStr() - Avoid std::string concatenation - Use getNameStr().str() when an std::string is really needed. llvm-svn: 84437 | |||||
* | Remove tabs, and whitespace cleanups. | Mike Stump | 2009-09-09 | 1 | -48/+48 | |
| | | | | llvm-svn: 81346 | |||||
* | no really, add the lines :) | Chris Lattner | 2009-06-15 | 1 | -1/+1 | |
| | | | | llvm-svn: 73367 | |||||
* | Fix PR2741 by making our newline tracking be aware of newlines that | Chris Lattner | 2009-06-15 | 1 | -0/+35 | |
| | | | | | | can occur in the middle of comment tokens. llvm-svn: 73365 | |||||
* | PR4288: Make -dD (dump macros with preprocessed source) play nicely with | Eli Friedman | 2009-06-02 | 1 | -2/+7 | |
| | | | | | | # line directives. llvm-svn: 72724 | |||||
* | Use v.data() instead of &v[0] when SmallVector v might be empty. | Jay Foad | 2009-05-21 | 1 | -1/+1 | |
| | | | | llvm-svn: 72210 | |||||
* | Clean up some unnecessary includes. | Eli Friedman | 2009-05-19 | 1 | -2/+0 | |
| | | | | llvm-svn: 72101 | |||||
* | Move clang-cc.h to lib/Frontend/Utils.h, and move the associated .cpp | Eli Friedman | 2009-05-19 | 1 | -0/+467 | |
files to lib/Frontend. llvm-svn: 72099 |