| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
.def file for each library. This means that adding a diagnostic
to sema doesn't require all the other libraries to be rebuilt.
Patch by Anders Johnsen!
llvm-svn: 63111
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as reported to the user and as manipulated by #line. This is what __FILE__,
__INCLUDE_LEVEL__, diagnostics and other things should follow (but not
dependency generation!).
This patch also includes several cleanups along the way:
- SourceLocation now has a dump method, and several other places
that did similar things now use it.
- I cleaned up some code in AnalysisConsumer, but it should probably be
simplified further now that NamedDecl is better.
- TextDiagnosticPrinter is now simplified and cleaned up a bit.
This patch is a prerequisite for #line, but does not actually provide
any #line functionality.
llvm-svn: 63098
|
|
|
|
| |
llvm-svn: 63097
|
|
|
|
|
|
|
|
|
|
| |
spelling data in the PTH file. This removes a ton of code for looking up spellings using sourcelocations in the PTH file. This simplifies both PTH-generation and reading.
Performance impact for -fsyntax-only on Cocoa.h (with Cocoa.h in the PTH file):
- PTH generation time improves by 5%
- PTH reading improves by 0.3%.
llvm-svn: 63072
|
|
|
|
| |
llvm-svn: 63047
|
|
|
|
|
|
| |
will help improve gradual versioning of PTH files instead of relying that the PTH table is at a fixed offset.
llvm-svn: 63045
|
|
|
|
| |
llvm-svn: 63029
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Token now has a class of kinds for "literals", which include
numeric constants, strings, etc. These tokens can optionally have
a pointer to the start of the token in the lexer buffer. This
makes it faster to get spelling and do other gymnastics, because we
don't have to go through source locations.
This change is performance neutral, but will make other changes
more feasible down the road.
llvm-svn: 63028
|
|
|
|
| |
llvm-svn: 62974
|
|
|
|
|
|
| |
analyzer should output 'ANALYZE:' messages to display its progress on a source file.
llvm-svn: 62875
|
|
|
|
|
|
| |
contains no error reports.
llvm-svn: 62871
|
|
|
|
|
|
| |
Objective-C declarations!) again. Fixes <rdar://problem/6517155>
llvm-svn: 62826
|
|
|
|
|
|
| |
for the new meta-data.
llvm-svn: 62806
|
|
|
|
| |
llvm-svn: 62785
|
|
|
|
|
|
| |
the new ObjC's abi.
llvm-svn: 62721
|
|
|
|
|
|
| |
Fixes <rdar://problem/6507668> clang ObjC rewriter: put #line statement at top of rewritten file
llvm-svn: 62706
|
|
|
|
| |
llvm-svn: 62701
|
|
|
|
|
|
| |
individual checker options.
llvm-svn: 62634
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that every declaration lives inside a DeclContext.
Moved several things that don't have names but were ScopedDecls (and,
therefore, NamedDecls) to inherit from Decl rather than NamedDecl,
including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't
store empty DeclarationNames for these things, nor do we try to insert
them into DeclContext's lookup structure.
The serialization tests are temporarily disabled. We'll re-enable them
once we've sorted out the remaining ownership/serialiazation issues
between DeclContexts and TranslationUnion, DeclGroups, etc.
llvm-svn: 62562
|
|
|
|
|
|
| |
loads. This reduces user time but increases system time because of the slightly larger PTH file. Although there is no performance win on Cocoa.h and -Eonly, overall this seems like a good step.
llvm-svn: 62542
|
|
|
|
| |
llvm-svn: 62537
|
|
|
|
|
|
| |
Fix type of logical negation for C++.
llvm-svn: 62475
|
|
|
|
|
|
| |
These actions are extremely widely used (identifier expressions and literals); still no performance regression.
llvm-svn: 62468
|
|
|
|
| |
llvm-svn: 62465
|
|
|
|
| |
llvm-svn: 62464
|
|
|
|
| |
llvm-svn: 62463
|
|
|
|
| |
llvm-svn: 62416
|
|
|
|
|
|
| |
entire file.
llvm-svn: 62414
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"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
|
|
|
|
| |
llvm-svn: 62402
|
|
|
|
|
|
|
| |
content cache directly. Content cache has a 1-1 mapping with fileentries,
whereas multiple FileIDs can be the same FileEntry.
llvm-svn: 62401
|
|
|
|
|
|
| |
Fix a type error; parser wanted to pass the third part of a for-statement as a statement; should be expression.
llvm-svn: 62380
|
|
|
|
| |
llvm-svn: 62367
|
|
|
|
| |
llvm-svn: 62339
|
|
|
|
|
|
| |
"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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- IdentifierInfo can now (optionally) have its string data not be
co-located with itself. This is for use with PTH. This aspect is a
little gross, as getName() and getLength() now make assumptions
about a possible alternate representation of IdentifierInfo.
Perhaps we should make IdentifierInfo have virtual methods?
IdentifierTable:
- Added class "IdentifierInfoLookup" that can be used by
IdentifierTable to perform "string -> IdentifierInfo" lookups using
an auxilliary data structure. This is used by PTH.
- Perform tests show that IdentifierTable::get() does not slow down
because of the extra check for the IdentiferInfoLookup object (the
regular StringMap lookup does enough work to mitigate the impact of
an extra null pointer check).
- The upshot is that now that some IdentifierInfo objects might be
owned by the IdentiferInfoLookup object. This should be reviewed.
PTH:
- Modified PTHManager::GetIdentifierInfo to *not* insert entries in
IdentifierTable's string map, and instead create IdentifierInfo
objects on the fly when mapping from persistent IDs to
IdentifierInfos. This saves a ton of work with string copies,
hashing, and StringMap lookup and resizing. This change was
motivated because when processing source files in the PTH cache we
don't need to do any string -> IdentifierInfo lookups.
- PTHManager now subclasses IdentifierInfoLookup, allowing clients of
IdentifierTable to transparently use IdentifierInfo objects managed
by the PTH file. PTHManager resolves "string -> IdentifierInfo"
queries by doing a binary search over a sorted table of identifier
strings in the PTH file (the exact algorithm we use can be changed
as needed).
These changes lead to the following performance changes when using PTH on Cocoa.h:
- fsyntax-only: 10% performance improvement
- Eonly: 30% performance improvement
llvm-svn: 62273
|
|
|
|
|
|
|
|
| |
lexical order of the corresponding identifier strings. This will be used for a
forthcoming optimization. This slows down PTH generation time by 7%. We can
revert this change if the optimization proves to not be valuable.
llvm-svn: 62248
|
|
|
|
| |
llvm-svn: 62239
|
|
|
|
|
|
|
|
| |
DeclContext::CastTo (causes compilation error on MSVC).
Add DeclContext::getDeclKind() and use that instead of DeclContext::KindTrait.
llvm-svn: 62164
|
|
|
|
| |
llvm-svn: 62153
|
|
|
|
| |
llvm-svn: 62143
|
|
|
|
| |
llvm-svn: 62140
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
its Decls in indented format. An Example:
$ cat t.cpp
class A {
int a;
void f();
};
void A::f() {
a = 3;
}
$ clang -print-decl-contexts t.cpp
[translation unit] 0x9754d7c
<typedef> __builtin_va_list
[class] A 0x9753310
<class> A 0x975ce20
<field> a
<c++ method> f
<c++ ctor> A
<c++ ctor> A
<c++ method> operator=
<c++ dtor> ~A
[c++ method] f [[0x9753310]]
Some comments: '<>' indicates a declaration, '[]' indicates a definition, '[[
]]' displays the semantic DeclContext which is different from the lexical
DeclContext. The symbols printed can definitely be changed in the future.
llvm-svn: 62136
|
|
|
|
| |
llvm-svn: 62122
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C++ handle anonymous structs/unions in the same way. Addresses several
bugs:
<rdar://problem/6259534>
<rdar://problem/6481130>
<rdar://problem/6483159>
The test case in PR clang/1750 now passes with -fsyntax-only, but
CodeGen for inline assembler still fails.
llvm-svn: 62112
|
|
|
|
|
|
|
|
| |
is enabled
respectively. Inspired by a patch by Dan Villiom Podlaski Christiansen.
llvm-svn: 62044
|
|
|
|
|
|
|
|
| |
‘-MT’. Using this patch, I was able to use ‘ccc’ as C compiler for the few C files in LLVM. In my brief testing, the output remains identical to that of GCC."
Patch by Dan Villiom Podlaski Christiansen!
llvm-svn: 62040
|
|
|
|
| |
llvm-svn: 62034
|
|
|
|
|
|
|
| |
No performance regression in my basic test.
Also fixed a type error in ActOnFinishSwitchStmt's arguments (body is a stmt).
llvm-svn: 62032
|