- Dec 04, 2008
-
-
Ted Kremenek authored
llvm-svn: 60559
-
Ted Kremenek authored
llvm-svn: 60556
-
- Dec 03, 2008
-
-
Ted Kremenek authored
Use an array instead of a DenseMap to cache persistent IDs -> IdentifierInfo*. This leads to a 4% speedup at -fsyntax-only using PTH. llvm-svn: 60452
-
Ted Kremenek authored
- Remove PTHManager.cpp. Move all of its functions to PTHLexer.cpp since some of the internal methods are used by PTHLexer (their implementations are intertwined.) This enables some important inlining opportunities at -O3. - Don't construct an std::vector<Token> prior to feeding PTH tokens to the Preprocessor. Stream them off the PTH file directly. llvm-svn: 60447
-
- Dec 02, 2008
-
-
Ted Kremenek authored
- Added method "setPTHManager" that will be called by the driver to install a PTHManager for the Preprocessor. - Fixed some comments. - Added EnterSourceFileWithPTH to mirror EnterSourceFileWithLexer. llvm-svn: 60437
-
Ted Kremenek authored
Added PTHManager, a utility class that will be used by Preprocessor to lazily create PTHLexer objects for pre-tokenized files. llvm-svn: 60436
-
- Dec 01, 2008
-
-
Douglas Gregor authored
llvm-svn: 60373
-
Daniel Dunbar authored
__ASSEMBLER__ properly. Patch from Roman Divacky (with minor formatting changes). Thanks! llvm-svn: 60362
-
- Nov 27, 2008
-
-
Ted Kremenek authored
llvm-svn: 60136
-
- Nov 25, 2008
-
-
Daniel Dunbar authored
llvm-svn: 59997
-
- Nov 24, 2008
-
-
Chris Lattner authored
llvm-svn: 59921
-
- Nov 23, 2008
-
-
Chris Lattner authored
with implicit quotes around them. This has a bunch of follow-on effects and requires tweaking to a whole lot of code. This causes a regression in two tests (xfailed) by causing it to emit things like: Line 10: duplicate interface declaration for category 'MyClass1' ('Category1') instead of: Line 10: duplicate interface declaration for category 'MyClass1(Category1)' I will fix this in a follow-up commit. As part of this, I had to start switching stuff to use ->getDeclName() instead of Decl::getName() for consistency. This is good, but I was planning to do this as an independent patch. There will be several follow-on patches to clean up some of the mess, but this patch is already too big. llvm-svn: 59917
-
- Nov 22, 2008
-
-
Chris Lattner authored
would not eat the "-1" in "0x0p-1", but LiteralSupport would accept it when extensions are on. This caused strangeness and failures when hexfloats were properly treated as an extension (not error) in LiteralSupport. llvm-svn: 59865
-
Chris Lattner authored
its call sites. This makes it more explicit when the hasError flag is getting set and removes a confusing difference in behavior between PP.Diag and Diag in this code. llvm-svn: 59863
-
Chris Lattner authored
(and carefully calculated) effect of allowing the compiler to reason about the aliasing properties of DiagnosticBuilder object better, allowing the whole thing to be promoted to registers instead of resulting in a ton of stack traffic. While I'm not very concerned about the performance of the Diag() method invocations, I *am* more concerned about their code size and impact on the non-diagnostic code. This patch shrinks the clang executable (in release-asserts mode with gcc-4.2) from 14523980 to 14519816 bytes. This isn't much, but it shrinks the lexer from 38192 to 37776, PPDirectives.o from 31116 to 28868 bytes, etc. llvm-svn: 59862
-
Chris Lattner authored
llvm-svn: 59860
-
Chris Lattner authored
llvm-svn: 59859
-
Chris Lattner authored
llvm-svn: 59858
-
Chris Lattner authored
force the caller to check instead. This eliminates the need (and the risk!) of weird null DiagnosticBuilder's floating around. llvm-svn: 59856
-
Chris Lattner authored
one for building up the diagnostic that is in flight (DiagnosticBuilder) and one for pulling structured information out of the diagnostic when formatting and presenting it. There is no functionality change with this patch. llvm-svn: 59849
-
Ted Kremenek authored
In PTHLexer::DiscardToEndOfLine() use Lex() instead of AdvanceToken(). This handles transitions in the preprocessor state. llvm-svn: 59845
-
- Nov 21, 2008
-
-
Ted Kremenek authored
llvm-svn: 59843
-
Ted Kremenek authored
When creating the raw tokens for PTHLexer, make sure the token representing the file to include is checked for being an identifier. llvm-svn: 59842
-
Ted Kremenek authored
llvm-svn: 59840
-
Ted Kremenek authored
- Move out logic for handling the end-of-file to LexEndOfFile (to match the Lexer) class. The logic now mirrors the Lexer class more, which allows us to pass most of the Preprocessor test cases. llvm-svn: 59768
-
- Nov 20, 2008
-
-
Ted Kremenek authored
- Move PTHLexer::GetToken() to be inside PTHLexer.cpp. - When lexing in raw mode, null out identifiers. llvm-svn: 59744
-
Ted Kremenek authored
llvm-svn: 59736
-
Ted Kremenek authored
- Rename 'CurToken' and 'LastToken' to 'CurTokenIdx' and 'LastTokenIdx' respectively. - Add helper methods GetToken(), AdvanceToken(), AtLastToken() to abstract away details of the token stream. This also allows us to easily replace their implementation later. llvm-svn: 59733
-
Ted Kremenek authored
llvm-svn: 59731
-
Ted Kremenek authored
Rewrote PTHLexer::Lex by digging through the sources of Lexer again. Now we can do basic macro expansion using the PTHLexer. llvm-svn: 59724
-
Ted Kremenek authored
(temporary hack) to test the PTHLexer is that whenever we would create a Lexer object we instead raw lex a memory buffer first and then use the PTHLexer. This logic exists only to driver the PTHLexer and will be removed/changed in the future. Note that the regular path using normal Lexer objects is what is used by default. llvm-svn: 59723
-
Ted Kremenek authored
llvm-svn: 59695
-
Ted Kremenek authored
a Lexer*. This means it will either return the current (normal) file Lexer or a PTHLexer. llvm-svn: 59694
-
Ted Kremenek authored
information. A diff of the -E output for Cocoa.h shows that there is no change in output. llvm-svn: 59693
-
Ted Kremenek authored
Assign the result of getCurrentFileLexer() to a PreprocessorLexer* instead of Lexer* (narrower interface). llvm-svn: 59691
-
Ted Kremenek authored
LexingRawMode in the ctor of PreprocessorLexer. - PTHLexer: Use "LastToken" instead of "NumToken" llvm-svn: 59690
-
Ted Kremenek authored
Add (untested) implementation of PTHLexer::isNextPPTokenLParen() and PTHLexer::DiscardToEndOfLine(). llvm-svn: 59687
-
- Nov 19, 2008
-
-
Ted Kremenek authored
Use PreprocessorLexer::getFileID() instead of Lexer::getFileLoc(). This is an intermediate step to having getCurrentLexer() return a PreprocessorLexer* instead of a Lexer*. llvm-svn: 59672
-
Ted Kremenek authored
Use PTHLexer::isNextPPTokenLParen() when using the PTHLexer. llvm-svn: 59671
-
Ted Kremenek authored
llvm-svn: 59670
-