| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
builtin types (When requested). This is another step toward making
ASTUnit build the ASTContext as needed when loading an AST file,
rather than doing so after the fact. No actual functionality change (yet).
llvm-svn: 138985
|
|
|
|
|
|
|
| |
Doing this happens to disrupt the pattern that ARC was looking for
for move optimizations, so we need to fix that simultaneously.
llvm-svn: 138789
|
|
|
|
|
|
|
|
|
|
| |
emit call results into potentially aliased slots. This allows us
to properly mark indirect return slots as noalias, at the cost
of requiring an extra memcpy when assigning an aggregate call
result into a l-value. It also brings us into compliance with
the x86-64 ABI.
llvm-svn: 138599
|
|
|
|
|
|
|
| |
creators to tell us whether something needs GC barriers.
No functionality change.
llvm-svn: 138581
|
|
|
|
|
|
|
|
| |
enumerations from the ASTContext into CodeGen, so that we don't need
to serialize it to AST files. This appears to be the last of the
low-hanging fruit for SpecialTypes.
llvm-svn: 137124
|
|
|
|
|
|
| |
releasing the collection.
llvm-svn: 136949
|
|
|
|
|
|
| |
own, incorrectly, for releasing objects at the end of a full-expression.
llvm-svn: 136823
|
|
|
|
| |
llvm-svn: 136461
|
|
|
|
|
|
|
|
|
|
|
| |
__block variables where the act of initialization/assignment
itself causes the __block variable to be copied to the heap
because the variable is of block type and is being assigned
a block literal which captures the variable.
rdar://problem/9814099
llvm-svn: 136337
|
|
|
|
|
|
|
|
|
|
|
| |
for-in statements; specifically, make sure to close over any
temporaries or cleanups it might require. In ARC, this has
implications for the lifetime of the collection, so emit it
with a retain and release it upon exit from the loop.
rdar://problem/9817306
llvm-svn: 136204
|
|
|
|
|
|
|
|
| |
LLVM.h imports
them into the clang namespace.
llvm-svn: 135852
|
|
|
|
|
|
|
|
|
| |
Introduce and document a new objc_returns_inner_pointer
attribute, and consume it by performing a retain+autorelease
on message receivers when they're not immediately loaded from
an object with precise lifetime.
llvm-svn: 135764
|
|
|
|
|
|
|
| |
their loaded values, although it still worth doing this for __weak
properties to get the autoreleased-return-value optimization.
llvm-svn: 135747
|
|
|
|
|
|
|
|
|
| |
This was previously not-const only because it has to lazily construct a chain
of ivars the first time it is called (and after the chain is invalidated).
In practice, all the clients were just const_casting their const Decls;
all those now-unnecessary const_casts have been removed.
llvm-svn: 135741
|
|
|
|
| |
llvm-svn: 135370
|
|
|
|
| |
llvm-svn: 135054
|
|
|
|
|
|
| |
of flags. No functionality change.
llvm-svn: 134997
|
|
|
|
|
|
| |
and kill a lot of redundant code.
llvm-svn: 134988
|
|
|
|
|
|
| |
people write useful cleanup classes.
llvm-svn: 134942
|
|
|
|
| |
llvm-svn: 134831
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Emit default-initialization of arrays that were partially initialized
with initializer lists with a loop, rather than emitting the default
initializer N times;
- support destroying VLAs of non-trivial type, although this is not
yet exposed to users; and
- support the partial destruction of arrays initialized with
initializer lists when an initializer throws an exception.
llvm-svn: 134784
|
|
|
|
|
|
|
|
|
|
|
|
| |
where we have an immediate need of a retained value.
As an exception, don't do this when the call is made as the immediate
operand of a __bridge retain. This is more in the way of a workaround
than an actual guarantee, so it's acceptable to be brittle here.
rdar://problem/9504800
llvm-svn: 134605
|
|
|
|
|
|
|
|
|
|
|
|
| |
structure to hold inferred information, then propagate each invididual
bit down to -cc1. Separate the bits of "supports weak" and "has a native
ARC runtime"; make the latter a CodeGenOption.
The tool chain is still driving this decision, because it's the place that
has the required deployment target information on Darwin, but at least it's
better-factored now.
llvm-svn: 134453
|
|
|
|
|
|
| |
Fixes rdar://9714064
llvm-svn: 134292
|
|
|
|
| |
llvm-svn: 133861
|
|
|
|
|
|
| |
by removing the redundant type parameter.
llvm-svn: 133860
|
|
|
|
|
|
|
| |
in the variable to an inline asm which gets run when the variable
goes out of scope.
llvm-svn: 133840
|
|
|
|
|
|
|
| |
not sizes; so that we use well-typed allocas; and so that we
properly recurse through the full set of variably-modified types.
llvm-svn: 133827
|
|
|
|
| |
llvm-svn: 133623
|
|
|
|
|
|
|
|
| |
objects, so that we steal the retain count of a temporary __strong
pointer (zeroing out that temporary), eliding a retain/release
pair. Addresses <rdar://problem/9364932>.
llvm-svn: 133621
|
|
|
|
|
|
|
|
|
| |
retain/release the temporary object appropriately. Previously, we
would only perform the retain/release operations when the reference
would extend the lifetime of the temporary, but this does the wrong
thing across calls.
llvm-svn: 133620
|
|
|
|
| |
llvm-svn: 133346
|
|
|
|
|
|
|
|
|
|
|
|
| |
they should still be officially __strong for the purposes of errors,
block capture, etc. Make a new bit on variables, isARCPseudoStrong(),
and set this for 'self' and these enumeration-loop variables. Change
the code that was looking for the old patterns to look for this bit,
and change IR generation to find this bit and treat the resulting
variable as __unsafe_unretained for the purposes of init/destroy in
the two places it can come up.
llvm-svn: 133243
|
|
|
|
|
|
|
|
|
|
| |
Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.
Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.
llvm-svn: 133103
|
|
|
|
|
|
| |
This fixes radar 8757124.
llvm-svn: 132949
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Related result types apply Cocoa conventions to the type of message
sends and property accesses to Objective-C methods that are known to
always return objects whose type is the same as the type of the
receiving class (or a subclass thereof), such as +alloc and
-init. This tightens up static type safety for Objective-C, so that we
now diagnose mistakes like this:
t.m:4:10: warning: incompatible pointer types initializing 'NSSet *'
with an
expression of type 'NSArray *' [-Wincompatible-pointer-types]
NSSet *array = [[NSArray alloc] init];
^ ~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:
note:
instance method 'init' is assumed to return an instance of its
receiver
type ('NSArray *')
- (id)init;
^
It also means that we get decent type inference when writing code in
Objective-C++0x:
auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil];
// ^ now infers NSMutableArray* rather than id
llvm-svn: 132868
|
|
|
|
| |
llvm-svn: 131701
|
|
|
|
|
|
|
| |
types. Also, cache a translation of 'void' in CGM and provide a ptrdiff_t
alias. No functionality change.
llvm-svn: 131373
|
|
|
|
|
|
|
| |
modify the semantics slightly to accomodate default constructors (I
hope).
llvm-svn: 131087
|
|
|
|
|
|
| |
change.
llvm-svn: 130699
|
|
|
|
|
|
|
| |
pass a previously failing clang test.
// rdar://8808439
llvm-svn: 129004
|
|
|
|
|
|
|
| |
As a result, I had to remove a c++ version of a clang
test which requires more scrutiny on my part.
llvm-svn: 128950
|
|
|
|
|
|
|
| |
targets) when load/store results in multiple instructions.
// rdar://8808439
llvm-svn: 128937
|
|
|
|
|
|
| |
for prperty reference types. // rdar://9208606.
llvm-svn: 128551
|
|
|
|
|
|
| |
PHINode::Create() giving the (known or expected) number of operands.
llvm-svn: 128538
|
|
|
|
| |
llvm-svn: 128534
|
|
|
|
|
|
|
| |
an executable test to llvm test suite.
// rdar://9070460.
llvm-svn: 128435
|
|
|
|
|
|
| |
ptrdiff_t instead of a long (should have no impact on any sane platforms, but win64 is not sane).
llvm-svn: 128104
|
|
|
|
|
|
|
| |
conditioned on whether it has any destructible ivars, not on whether
it has any non-trivial class-object initializers.
llvm-svn: 128074
|
|
|
|
|
|
|
|
|
|
| |
simplify the logic of initializing function parameters so that we don't need
both a variable declaration and a type in FunctionArgList. This also means
that we need to propagate the CGFunctionInfo down in a lot of places rather
than recalculating it from the FAL. There's more we can do to eliminate
redundancy here, and I've left FIXMEs behind to do it.
llvm-svn: 127314
|