| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
class and to bind the shared value using OpaqueValueExpr. This fixes an
unnoticed problem with deserialization of these expressions where the
deserialized form would lose the vital pointer-equality trait; or rather,
it fixes it because this patch also does the right thing for deserializing
OVEs.
Change OVEs to not be a "temporary object" in the sense that copy elision is
permitted.
This new representation is not totally unawkward to work with, but I think
that's really part and parcel with the semantics we're modelling here. In
particular, it's much easier to fix things like the copy elision bug and to
make the CFG look right.
I've tried to update the analyzer to deal with this in at least some
obvious cases, and I think we get a much better CFG out, but the printing
of OpaqueValueExprs probably needs some work.
llvm-svn: 125744
|
| |
|
|
| |
llvm-svn: 125661
|
| |
|
|
|
|
|
|
|
| |
- Have CGM precompute a number of commonly-used types
- Have CGF copy that during initialization instead of recomputing them
- Use TBAA info when initializing a parameter variable
- Refactor the scalar ++/-- code
llvm-svn: 125562
|
| |
|
|
| |
llvm-svn: 125538
|
| |
|
|
|
|
| |
builders unhappy.
llvm-svn: 125505
|
| |
|
|
| |
llvm-svn: 125488
|
| |
|
|
| |
llvm-svn: 125360
|
| |
|
|
|
|
|
|
| |
Block{Function,Module} base class. Minor other refactorings.
Fixed a few address-space bugs while I was there.
llvm-svn: 125085
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- BlockDeclRefExprs always store VarDecls
- BDREs no longer store copy expressions
- BlockDecls now store a list of captured variables, information about
how they're captured, and a copy expression if necessary
With that in hand, change IR generation to use the captures data in
blocks instead of walking the block independently.
Additionally, optimize block layout by emitting fields in descending
alignment order, with a heuristic for filling in words when alignment
of the end of the block header is insufficient for the most aligned
field.
llvm-svn: 125005
|
| |
|
|
|
|
|
|
|
|
|
| |
right for anonymous struct/union members led to me discovering some
seemingly broken code in that area of Sema, which I fixed, partly by
changing the representation of member pointer constants so that
IndirectFieldDecls aren't expanded. This led to assorted cleanups with
member pointers in CodeGen, and while I was doing that I saw some random
other things to clean up.
llvm-svn: 124785
|
| |
|
|
|
|
|
|
|
| |
non-class prvalues actually require the realization of a
temporary. For everything else, we already have an lvalue (or class
prvalue) in the subexpression.
Note: we're missing some move elision in this case. I'll tackle that next.
llvm-svn: 124453
|
| |
|
|
|
|
|
| |
referenced in the block-literal initializer
of that variable. // rdar://8893785
llvm-svn: 124332
|
| |
|
|
| |
llvm-svn: 124310
|
| |
|
|
|
|
|
|
| |
I'm separately committing this because it incidentally changes some
block orderings and minor IR issues, like using a phi instead of
an unnecessary alloca.
llvm-svn: 124277
|
| |
|
|
| |
llvm-svn: 124023
|
| |
|
|
|
|
| |
counterparts where char units are needed.
llvm-svn: 123805
|
| |
|
|
|
|
| |
-Wint-to-pointer-cast.
llvm-svn: 123719
|
| |
|
|
|
|
| |
reason this is limited to C++, and it's certainly not limited to temporaries.
llvm-svn: 120996
|
| |
|
|
|
|
|
|
|
|
| |
the LHS, or else the pointer might be invalid. This is kindof dumb, but
go ahead and make sure we're doing that for l-value scalar assignment,
which fixes a miscompile of obj-c++.dg/block-seq.mm.
Leave a FIXME for how to solve this problem for agg __blocks.
llvm-svn: 120992
|
| |
|
|
|
|
|
|
|
| |
Fix a bug in the emission of complex compound assignment l-values.
Introduce a method to emit an expression whose value isn't relevant.
Make that method evaluate its operand as an l-value if it is one.
Fixes our volatile compliance in C++.
llvm-svn: 120931
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
used in a constructor initializer list:
struct X {
X() : au_i1(123) {}
union {
int au_i1;
float au_f1;
};
};
clang will now deal with au_i1 explicitly as an IndirectFieldDecl.
llvm-svn: 120900
|
| |
|
|
|
|
|
| |
be required, and then fix up some missing loads on overloaded-operator
paths which that exposed.
llvm-svn: 120896
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
not actually frequently used, because ImpCastExprToType only creates a node
if the types differ. So explicitly create an ICE in the lvalue-to-rvalue
conversion code in DefaultFunctionArrayLvalueConversion() as well as several
other new places, and consistently deal with the consequences throughout the
compiler.
In addition, introduce a new cast kind for loading an ObjCProperty l-value,
and make sure we emit those nodes whenever an ObjCProperty l-value appears
that's not on the LHS of an assignment operator.
This breaks a couple of rewriter tests, which I've x-failed until future
development occurs on the rewriter.
Ted Kremenek kindly contributed the analyzer workarounds in this patch.
llvm-svn: 120890
|
| |
|
|
|
|
|
|
|
|
| |
Also, move the l-value emission code into CGObjC.cpp and teach it, for
completeness, to store away self for a super send.
Also, inline the super cases for property gets and sets and make them
use the correct result type for implicit getter/setter calls.
llvm-svn: 120887
|
| |
|
|
|
|
| |
the l-value.
llvm-svn: 120884
|
| |
|
|
|
|
|
|
| |
ObjCPropertyRefExpr
into the latter.
llvm-svn: 120643
|
| |
|
|
| |
llvm-svn: 120555
|
| |
|
|
| |
llvm-svn: 120433
|
| |
|
|
|
|
| |
about the reliability of this yet.
llvm-svn: 120422
|
| |
|
|
| |
llvm-svn: 120153
|
| |
|
|
| |
llvm-svn: 120084
|
| |
|
|
| |
llvm-svn: 119814
|
| |
|
|
|
|
|
| |
types was not being generated for objc pointers.
// rdar://8681766.
llvm-svn: 119751
|
| |
|
|
|
|
|
| |
case based on CodeGen/volatile-1.c which tests the current C++
semantics, and note the many, many places we fall short of them.
llvm-svn: 119402
|
| |
|
|
|
|
|
|
|
| |
assignment to volatiles in C. This in effect reverts some of mjs's
work in and around r72572. Basically, the C++ standard is quite
clear, except that it lies about volatile behavior approximating
C's, whereas the C standard is almost actively misleading.
llvm-svn: 119344
|
| |
|
|
| |
llvm-svn: 119331
|
| |
|
|
| |
llvm-svn: 119138
|
| |
|
|
|
|
|
|
|
|
| |
implicit conversions; the last batch was specific to promotions.
I think this is the full set we need. I do think dividing the cast
kinds into floating and integral is probably a good idea.
Annotate a *lot* more C casts with useful cast kinds.
llvm-svn: 119036
|
| |
|
|
|
|
| |
between complex types.
llvm-svn: 118994
|
| |
|
|
| |
llvm-svn: 118966
|
| |
|
|
|
|
| |
Fixes rdar://8644873 & http://llvm.org/PR8567.
llvm-svn: 118468
|
| |
|
|
|
|
|
| |
aggressive about the form we expect bools to be in. I don't really have
time to fix all the sources right now.
llvm-svn: 117486
|
| |
|
|
| |
llvm-svn: 117456
|
| |
|
|
|
|
|
| |
in IR gen, and use those to fix a correctness issue with bool atomic
intrinsics. rdar://problem/8461234
llvm-svn: 117403
|
| |
|
|
| |
llvm-svn: 117321
|
| |
|
|
|
|
| |
ambiguous context.
llvm-svn: 116567
|
| |
|
|
|
|
|
| |
This enables metadata generation by default, however the TBAA pass
in the optimizer is still disabled for now.
llvm-svn: 116536
|
| |
|
|
|
|
|
| |
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788
llvm-svn: 116483
|
| |
|
|
|
|
| |
bit by me).
llvm-svn: 116122
|
| |
|
|
|
|
|
| |
with missing LHS. radar 8453812. Executable test is checked
into llvm test suite.
llvm-svn: 114457
|