| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
library configuration
Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen. This is suboptimal for
clients which only wish to make use of the frontend. CodeGen in
particular introduces a large number of unwanted dependencies.
This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries. The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).
After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").
N.B. This patch includes file renames which are indicated in the
patch body.
Changes in this revision of the patch:
- Fixed some copy-paste mistakes in the header files
- Modified certain aspects of the coding to comply with the LLVM
Coding Standards
llvm-svn: 106010
|
|
|
|
| |
llvm-svn: 104614
|
|
|
|
|
|
| |
methods. (Radar 7987817).
llvm-svn: 104608
|
|
|
|
|
|
| |
pointer is copied into a block. Fixes radar 7924024.
llvm-svn: 104526
|
|
|
|
|
|
|
| |
class declaration's @end is not followed by a new-line.
(radar 7946975).
llvm-svn: 104512
|
|
|
|
|
|
| |
out. The remaining ones are okay.
llvm-svn: 103973
|
|
|
|
| |
llvm-svn: 103517
|
|
|
|
|
|
|
|
| |
thing. Audit all uses of Type::isStructure(), changing those calls to
isStructureOrClassType() as needed (which is alsmost
everywhere). Fixes the remaining failure in Boost.Utility/Swap.
llvm-svn: 102386
|
|
|
|
|
|
|
| |
@catch a VarDecl. The dynamic type is still a ParmVarDecl, but that
will change soon. No effective functionality change.
llvm-svn: 102341
|
|
|
|
| |
llvm-svn: 102258
|
|
|
|
| |
llvm-svn: 102249
|
|
|
|
|
|
|
|
|
|
| |
statements. Instead of the @try having a single @catch, where all of
the @catch's were chained (using an O(n^2) algorithm nonetheless),
@try just holds an array of its @catch blocks. The resulting AST is
slightly more compact (not important) and better represents the actual
language semantics (good).
llvm-svn: 102221
|
|
|
|
| |
llvm-svn: 102218
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expressions, to improve source-location information, clarify the
actual receiver of the message, and pave the way for proper C++
support. The ObjCMessageExpr node represents four different kinds of
message sends in a single AST node:
1) Send to a object instance described by an expression (e.g., [x method:5])
2) Send to a class described by the class name (e.g., [NSString method:5])
3) Send to a superclass class (e.g, [super method:5] in class method)
4) Send to a superclass instance (e.g., [super method:5] in instance method)
Previously these four cases where tangled together. Now, they have
more distinct representations. Specific changes:
1) Unchanged; the object instance is represented by an Expr*.
2) Previously stored the ObjCInterfaceDecl* referring to the class
receiving the message. Now stores a TypeSourceInfo* so that we know
how the class was spelled. This both maintains typedef information
and opens the door for more complicated C++ types (e.g., dependent
types). There was an alternative, unused representation of these
sends by naming the class via an IdentifierInfo *. In practice, we
either had an ObjCInterfaceDecl *, from which we would get the
IdentifierInfo *, or we fell into the case below...
3) Previously represented by a class message whose IdentifierInfo *
referred to "super". Sema and CodeGen would use isStr("super") to
determine if they had a send to super. Now represented as a
"class super" send, where we have both the location of the "super"
keyword and the ObjCInterfaceDecl* of the superclass we're
targetting (statically).
4) Previously represented by an instance message whose receiver is a
an ObjCSuperExpr, which Sema and CodeGen would check for via
isa<ObjCSuperExpr>(). Now represented as an "instance super" send,
where we have both the location of the "super" keyword and the
ObjCInterfaceDecl* of the superclass we're targetting
(statically). Note that ObjCSuperExpr only has one remaining use in
the AST, which is for "super.prop" references.
The new representation of ObjCMessageExpr is 2 pointers smaller than
the old one, since it combines more storage. It also eliminates a leak
when we loaded message-send expressions from a precompiled header. The
representation also feels much cleaner to me; comments welcome!
This patch attempts to maintain the same semantics we previously had
with Objective-C message sends. In several places, there are massive
changes that boil down to simply replacing a nested-if structure such
as:
if (message has a receiver expression) {
// instance message
if (isa<ObjCSuperExpr>(...)) {
// send to super
} else {
// send to an object
}
} else {
// class message
if (name->isStr("super")) {
// class send to super
} else {
// send to class
}
}
with a switch
switch (E->getReceiverKind()) {
case ObjCMessageExpr::SuperInstance: ...
case ObjCMessageExpr::Instance: ...
case ObjCMessageExpr::SuperClass: ...
case ObjCMessageExpr::Class:...
}
There are quite a few places (particularly in the checkers) where
send-to-super is effectively ignored. I've placed FIXMEs in most of
them, and attempted to address send-to-super in a reasonable way. This
could use some review.
llvm-svn: 101972
|
|
|
|
|
|
|
|
| |
function declaration, since it may end up being changed (e.g.,
"extern" can become "static" if a prior declaration was static). Patch
by Enea Zaffanella and Paolo Bolzoni.
llvm-svn: 101826
|
|
|
|
|
|
|
| |
measurements of '-fsyntax-only' on combine.c (403.gcc) shows no real performance
change, but now the vector isn't leaked.
llvm-svn: 101195
|
|
|
|
|
|
|
| |
Without it, there is no reason for a compiler that supports it to
emit the dead static globals that the rewriter labels attribute(used).
llvm-svn: 101149
|
|
|
|
|
|
|
|
| |
This introduces FunctionType::ExtInfo to hold the calling convention and the
noreturn attribute. The next patch will extend it to include the regparm
attribute and fix the bug.
llvm-svn: 99920
|
|
|
|
|
|
| |
const char*.
llvm-svn: 98630
|
|
|
|
|
|
| |
and start simplifying the interfaces in SourceManager that can fail.
llvm-svn: 98594
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SourceManager's getBuffer() (and similar) operations. This abstract
can be used to force callers to cope with errors in getBuffer(), such
as missing files and changed files. Fix a bunch of callers to use the
new interface.
Add some very basic checks for file consistency (file size,
modification time) into ContentCache::getBuffer(), although these
checks don't help much until we've updated the main callers (e.g.,
SourceManager::getSpelling()).
llvm-svn: 98585
|
|
|
|
|
|
|
| |
external linkage (static, extern, etc.) in blocks in
rewriter. wip.
llvm-svn: 98265
|
|
|
|
|
|
| |
Fixes radar 7738452.
llvm-svn: 98190
|
|
|
|
|
|
| |
on a block API struct definition.
llvm-svn: 97754
|
|
|
|
|
|
| |
moved incorrectly. (radar 7714443).
llvm-svn: 97734
|
|
|
|
|
|
| |
Satisfies radar 7703202.
llvm-svn: 97532
|
|
|
|
|
|
| |
Radar 7696893.
llvm-svn: 97520
|
|
|
|
|
|
| |
Fixes radar 7692183.
llvm-svn: 97281
|
|
|
|
| |
llvm-svn: 97280
|
|
|
|
| |
llvm-svn: 97274
|
|
|
|
|
|
| |
Fixes radar 7692350.
llvm-svn: 97254
|
|
|
|
|
|
|
| |
blocks's argument in the inner block requires special treatment.
Fixes radar 7692419.
llvm-svn: 97244
|
|
|
|
|
|
| |
attributes. Fixes radar 7214439.
llvm-svn: 97203
|
|
|
|
|
|
|
| |
blocks use variables not used in any of the outer blocks.
(Fixes radar 7682149).
llvm-svn: 97073
|
|
|
|
|
|
| |
a block pointer type. Fixes radar 7682149.
llvm-svn: 97008
|
|
|
|
|
|
| |
rewriting problem. Fixes radar 7680953.
llvm-svn: 96987
|
|
|
|
|
|
| |
itself rewritten. Radar 7669784.
llvm-svn: 96798
|
|
|
|
|
|
|
|
| |
fixing up a few callers that thought they were propagating NoReturn
information but were in fact saying something about exception
specifications.
llvm-svn: 96766
|
|
|
|
|
|
|
|
| |
This was causing buildbot breakage.
This reverts commit d46e952cc8cb8d9eed8657d9a0b267910a0f745a.
llvm-svn: 96652
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to initializer expressions in an array allocated using ASTContext.
This plugs a memory leak when ASTContext uses a BumpPtrAllocator to
allocate memory for AST nodes.
In my mind this isn't an ideal solution; it would be nice to have
a general "vector"-like class that allocates memory using ASTContext,
but whose guts could be separated from the methods of InitListExpr
itself. I haven't gone and taken this approach yet because it isn't
clear yet if we'll eventually want an alternate solution for recylcing
memory using by InitListExprs as we are constructing the ASTs.
llvm-svn: 96642
|
|
|
|
|
|
| |
instead relies on their DeclContext for iteration, etc.
llvm-svn: 96638
|
|
|
|
|
|
| |
rewriting. Fixes radar 7659483.
llvm-svn: 96549
|
|
|
|
| |
llvm-svn: 96361
|
|
|
|
|
|
| |
causes C++ compile error (radar 7651312).
llvm-svn: 96352
|
|
|
|
|
|
| |
(fixes radar 7649577).
llvm-svn: 96270
|
|
|
|
|
|
| |
unnecessary length arguments.
llvm-svn: 96164
|
|
|
|
|
|
|
| |
with block-pointer-type as one or more of its
arguments. Fixes radar 7638400.
llvm-svn: 95992
|
|
|
|
|
|
|
|
|
|
| |
not match
order of constructor arguments (all block API specific). This was exposed only in
a large block literal expression in a large file where PtrSet container size
execceded its limit and required reallocation. Fixes radar 7638294
llvm-svn: 95936
|
|
|
|
|
|
| |
associated with ASTContext. This fixes yet another leak (<rdar://problem/7639260>).
llvm-svn: 95930
|
|
|
|
|
|
| |
Decl subclasses. No functionality change.
llvm-svn: 95841
|