| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"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
|
|
|
|
|
|
|
| |
content cache directly. Content cache has a 1-1 mapping with fileentries,
whereas multiple FileIDs can be the same FileEntry.
llvm-svn: 62401
|
|
|
|
| |
llvm-svn: 62368
|
|
|
|
|
|
| |
"logical" location, refer to the "instantiation" location.
llvm-svn: 62316
|
|
|
|
|
|
|
| |
the "physical" location of tokens, refer to the "spelling" location.
This is more concrete and useful, tokens aren't really physical objects!
llvm-svn: 62309
|
|
|
|
| |
llvm-svn: 60942
|
|
|
|
| |
llvm-svn: 60937
|
|
|
|
| |
llvm-svn: 60373
|
|
|
|
| |
llvm-svn: 59997
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 59859
|
|
|
|
| |
llvm-svn: 59858
|
|
|
|
|
|
|
| |
force the caller to check instead. This eliminates the need (and the
risk!) of weird null DiagnosticBuilder's floating around.
llvm-svn: 59856
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add variants of IsNonPragmaNonMacroLexer to accept an IncludeMacroStack entry
(simplifies some uses).
- Use IsNonPragmaNonMacroLexer in Preprocessor::LookupFile.
- Add 'FileID' to PreprocessorLexer, and have Preprocessor query this fileid
when looking up the FileEntry for a file
Performance testing of -Eonly on Cocoa.h shows no performance regression because
of this patch.
llvm-svn: 59666
|
|
|
|
|
|
| |
methods.
llvm-svn: 59511
|
|
|
|
| |
llvm-svn: 59191
|
|
|
|
| |
llvm-svn: 59186
|
|
|
|
|
|
|
| |
were setting a kind and then forming it. This is just a minor API cleanup,
no functionality change.
llvm-svn: 57404
|
|
|
|
|
|
| |
unterminated.
llvm-svn: 57403
|
|
|
|
|
|
| |
keep comment mode, instead of returning false. This matches SkipWhitespace.
llvm-svn: 57402
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
even whitespace, as tokens from the file. This is enabled with
L->SetKeepWhitespaceMode(true) on a raw lexer. In this mode, you too
can use clang as a really complex version of 'cat' with code like this:
Lexer RawLex(SourceLocation::getFileLoc(SM.getMainFileID(), 0),
PP.getLangOptions(), File.first, File.second);
RawLex.SetKeepWhitespaceMode(true);
Token RawTok;
RawLex.LexFromRawLexer(RawTok);
while (RawTok.isNot(tok::eof)) {
std::cout << PP.getSpelling(RawTok);
RawLex.LexFromRawLexer(RawTok);
}
This will emit exactly the input file, with no canonicalization or other
translation. Realistic clients actually do something with the tokens of
course :)
llvm-svn: 57401
|
|
|
|
| |
llvm-svn: 57398
|
|
|
|
|
|
| |
ivar.
llvm-svn: 57397
|
|
|
|
| |
llvm-svn: 57396
|
|
|
|
|
|
|
|
| |
same we we do an unterminated string or character literal. This makes
it so we can guarantee that the lexer never calls into the
preprocessor (which would be suicide for a raw lexer).
llvm-svn: 57395
|
|
|
|
| |
llvm-svn: 57394
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 57391
|
|
|
|
| |
llvm-svn: 57389
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Added as private members for each because it is not clear where to
put the common definition. Perhaps the IdentifierInfos all of these
"pseudo-keywords" should be collected into one place (this would
KnownFunctionIDs and Objective-C property IDs, for example).
Remove Token::isNamedIdentifier.
- There isn't a good reason to use strcmp when we have interned
strings, and there isn't a good reason to encourage clients to do
so.
llvm-svn: 54794
|
|
|
|
| |
llvm-svn: 49632
|
|
|
|
| |
llvm-svn: 49575
|
|
|
|
| |
llvm-svn: 49535
|
|
lib dir and move all the libraries into it. This follows the main
llvm tree, and allows the libraries to be built in parallel. The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in. This speeds
up parallel builds, particularly incremental ones.
llvm-svn: 48402
|