| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 133418
|
| |
|
|
|
|
|
|
|
|
|
| |
ConvertType on InitListExprs as they are being converted. This is
needed for a forthcoming patch, and improves the IR generated anyway
(see additional type names in testcases).
This patch also converts a bunch of std::vector's in CGObjCMac to use
C arrays. There are a ton more that should be converted as well.
llvm-svn: 133413
|
| |
|
|
| |
llvm-svn: 133365
|
| |
|
|
| |
llvm-svn: 133346
|
| |
|
|
| |
llvm-svn: 133345
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
separate aggregate temporary and then memcpy it over to the
destination. This fixes a regression I introduced with r133235, where
the compound literal on the RHS of an assignment makes use of the
structure on the LHS of the assignment.
I'm deeply suspicious of AggExprEmitter::VisitBinAssign()'s
optimization where it emits the RHS of an aggregate assignment
directly into the LHS lvalue without checking whether there is any
aliasing between the LHS/RHS. However, I'm not in a position to
revisit this now.
Big thanks to Eli for finding the regression!
llvm-svn: 133261
|
| |
|
|
|
|
| |
static initializer check, as required by the Itanium ABI.
llvm-svn: 133250
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
C++, which means:
- binding the temporary as needed in Sema, so that we generate the
appropriate call to the destructor, and
- emitting the compound literal into the appropriate location for
the aggregate, rather than trying to emit it as a temporary and
memcpy() it.
Fixes PR10138 / <rdar://problem/9615901>.
llvm-svn: 133235
|
| |
|
|
|
|
|
|
|
| |
register constraint. Note that we're not checking if the register itself
is valid for the constraint.
Fixes rdar://9382985
llvm-svn: 133226
|
| |
|
|
|
|
| |
getLVForNamespaceScopeDecl(). // rdar://9609649
llvm-svn: 133182
|
| |
|
|
|
|
|
| |
declaration of global var is __private_extern__.
// rdar://9609649
llvm-svn: 133157
|
| |
|
|
| |
llvm-svn: 133144
|
| |
|
|
| |
llvm-svn: 133110
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 133095
|
| |
|
|
|
|
| |
aggregate handling code; found by inspection.
llvm-svn: 133070
|
| |
|
|
|
|
| |
on gcc-testsuite bot.)
llvm-svn: 133069
|
| |
|
|
|
|
|
| |
- llvm.dbg.declare already receives line number information from ParmDecl
- Additional extra stoppoint messes up gdb's understanding of where function body starts.
llvm-svn: 133065
|
| |
|
|
|
|
| |
whether it's a data or instruction cache access.
llvm-svn: 132977
|
| |
|
|
| |
llvm-svn: 132973
|
| |
|
|
|
|
|
|
|
|
| |
if the alignment of an argument to a call is less than the specified byval alignment for that argument, there is no way to specify the alignment of the implied copy. Therefore, we must ensure that the alignment of the argument is at least the byval alignment. To do this, we have to mess with the alignment of relevant alloca's in some cases, and insert a copy that conceptually shouldn't be necessary in some cases.
This patch tries relatively hard to avoid creating an extra copy if it can be avoided (see test3 in the included testcase), but it is not possible to avoid in some cases (like test2 in the included testcase).
rdar://9483886
llvm-svn: 132957
|
| |
|
|
|
|
| |
This fixes radar 8757124.
llvm-svn: 132949
|
| |
|
|
| |
llvm-svn: 132878
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
determine whether the vtable should be externally visible, instead of a rough approximation of it which messes up with templates.
While I'm here, zap the other user of isInAnonymousNamespace outside of Decl.cpp.
llvm-svn: 132861
|
| |
|
|
|
|
| |
rdar://problem/9037836
llvm-svn: 132737
|
| |
|
|
|
|
|
|
| |
with a type-dependent expression, infer the placeholder type
'Context.DependentTy' to indicate that this is just a
placeholder. Fixes PR9982 / <rdar://problem/9486685>.
llvm-svn: 132657
|
| |
|
|
|
|
|
| |
__builtin_astype(): Used to reinterpreted as another data type of the same size using for both scalar and vector data types.
Added test case.
llvm-svn: 132612
|
| |
|
|
|
|
| |
Emit debug info only if there is an insertion point. The debug info should not force an insertion point. Codegen may later on decide to not emit code for some reason, see extensive comment in CodeGenFunction::EmitStmt(), and debug info should not get in the way.
llvm-svn: 132610
|
| |
|
|
|
|
| |
not force an insertion point. Codegen may later on decide to not emit code for some reason, see extensive comment in CodeGenFunction::EmitStmt(), and debug info should not get in the way.
llvm-svn: 132576
|
| |
|
|
| |
llvm-svn: 132560
|
| |
|
|
| |
llvm-svn: 132557
|
| |
|
|
| |
llvm-svn: 132548
|
| |
|
|
| |
llvm-svn: 132443
|
| |
|
|
|
|
| |
parameters directly.
llvm-svn: 132368
|
| |
|
|
| |
llvm-svn: 132361
|
| |
|
|
| |
llvm-svn: 132357
|
| |
|
|
| |
llvm-svn: 132311
|
| |
|
|
|
|
| |
It's quite likely that this will explode, but I need to know how. :)
llvm-svn: 132269
|
| |
|
|
| |
llvm-svn: 132260
|
| |
|
|
| |
llvm-svn: 132259
|
| |
|
|
| |
llvm-svn: 132258
|
| |
|
|
| |
llvm-svn: 132249
|
| |
|
|
|
|
| |
memcpy. (Spotted by looking at IR.)
llvm-svn: 132226
|
| |
|
|
|
|
| |
literals to 1. This can significantly impact the size of the string data, and as far as I know, the alignment doesn't help performance. rdar://9078969 .
llvm-svn: 132223
|
| |
|
|
| |
llvm-svn: 132219
|
| |
|
|
|
|
|
|
| |
to be careful to emit landing pads that are always prepared to handle a
cleanup path. This is correct mostly because of the fix to the LLVM
inliner, r132200.
llvm-svn: 132209
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
parameter types to be ill-formed. However, it relies on the
completeness of method parameter types when producing metadata, e.g.,
for a protocol, leading IR generating to crash in such cases.
Since there's no real way to tighten down the semantics of Objective-C
here without breaking existing code, do something safe but lame:
suppress the generation of metadata when this happens.
Fixes <rdar://problem/9123036>.
llvm-svn: 132171
|
| |
|
|
|
|
|
|
| |
rdar://problem/8139919 . This shouldn't make much of a difference at -O3, but should substantially reduce the number of generated memcpy's at -O0.
Originally r130717, but was backed out due to an ObjC regression.
llvm-svn: 132102
|