History log of /llvm-project-15.0.7/clang/lib/CodeGen/CGExprAgg.cpp (Results 201 – 225 of 476)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# aa347f93 23-Sep-2011 David Blaikie <[email protected]>

Removing a bunch of dead returns/breaks after llvm_unreachables.

llvm-svn: 140407


# 83d382b1 23-Sep-2011 David Blaikie <[email protected]>

Switch assert(0/false) llvm_unreachable.

llvm-svn: 140367


# 79a91418 13-Sep-2011 Douglas Gregor <[email protected]>

Switch LangOptions over to a .def file that describes header of the
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of an

Switch LangOptions over to a .def file that describes header of the
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of annoying
initialization bugs.

AST serialization changes are next up.

llvm-svn: 139605

show more ...


# 2d637d2e 10-Sep-2011 John McCall <[email protected]>

Rename the ARC cast kinds to start with "ARC".

llvm-svn: 139466


# cd78e805 10-Sep-2011 John McCall <[email protected]>

When converting a block pointer to an Objective-C pointer type, extend
the lifetime of the block by copying it to the heap, or else we'll get
a dangling reference because the code working with the no

When converting a block pointer to an Objective-C pointer type, extend
the lifetime of the block by copying it to the heap, or else we'll get
a dangling reference because the code working with the non-block-typed
object will not know it needs to copy.

There is some danger here, e.g. with assigning a block literal to an
unsafe variable, but, well, it's an unsafe variable.

llvm-svn: 139451

show more ...


# 9320b87c 09-Sep-2011 John McCall <[email protected]>

Give conversions of block pointers to ObjC pointers a different cast kind
than conversions of C pointers to ObjC pointers. In order to ensure that
we've caught every case, add asserts to CastExpr th

Give conversions of block pointers to ObjC pointers a different cast kind
than conversions of C pointers to ObjC pointers. In order to ensure that
we've caught every case, add asserts to CastExpr that strictly determine
which cast kind is used for which kind of bit cast.

llvm-svn: 139352

show more ...


# 146b8e9a 06-Sep-2011 Douglas Gregor <[email protected]>

When performing a derived-to-base cast on the right-hand side of the
synthesized move assignment within an implicitly-defined move
assignment operator, be sure to treat the derived-to-base cast as an

When performing a derived-to-base cast on the right-hand side of the
synthesized move assignment within an implicitly-defined move
assignment operator, be sure to treat the derived-to-base cast as an
xvalue (rather than an lvalue). Otherwise, we'll end up getting the
wrong constructor.

Optimize a direct call to a trivial move assignment operator to an
aggregate copy, as we do for trivial copy assignment operators, and
update the the assertion in CodeGenFunction::EmitAggregateCopy() to
cope with this optimization.

Fixes PR10860.

llvm-svn: 139143

show more ...


# e8bbc121 02-Sep-2011 Douglas Gregor <[email protected]>

Extend the ASTContext constructor to delay the initialization of
builtin types (When requested). This is another step toward making
ASTUnit build the ASTContext as needed when loading an AST file,
ra

Extend the ASTContext constructor to delay the initialization of
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

show more ...


# cac93853 26-Aug-2011 John McCall <[email protected]>

What say we document some of these AggValueSlot flags a bit
better.

llvm-svn: 138628


# 46759f4f 26-Aug-2011 John McCall <[email protected]>

Since the 'is aliased' bit is critical for correctness in C++, it
really shouldn't be optional. Fix the remaining place where a
temporary was being passed as potentially-aliased memory.

Fixes PR107

Since the 'is aliased' bit is critical for correctness in C++, it
really shouldn't be optional. Fix the remaining place where a
temporary was being passed as potentially-aliased memory.

Fixes PR10756.

llvm-svn: 138627

show more ...


# a5efa738 25-Aug-2011 John McCall <[email protected]>

Track whether an AggValueSlot is potentially aliased, and do not
emit call results into potentially aliased slots. This allows us
to properly mark indirect return slots as noalias, at the cost
of re

Track whether an AggValueSlot is potentially aliased, and do not
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

show more ...


# 8d6fc958 25-Aug-2011 John McCall <[email protected]>

Use stronger typing for the flags on AggValueSlot and require
creators to tell us whether something needs GC barriers.
No functionality change.

llvm-svn: 138581


# 0e62c1cc 23-Jul-2011 Chris Lattner <[email protected]>

remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.

llvm-svn: 135852


# 040dd82f 22-Jul-2011 Jay Foad <[email protected]>

Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use
ArrayRef.

llvm-svn: 135761


# 2192fe50 18-Jul-2011 Chris Lattner <[email protected]>

de-constify llvm::Type, patch by David Blaikie!

llvm-svn: 135370


# 7c454bb8 15-Jul-2011 John McCall <[email protected]>

Create a new expression node, SubstNonTypeTemplateParmExpr,
to represent a fully-substituted non-type template parameter.
This should improve source fidelity, as well as being generically
useful for

Create a new expression node, SubstNonTypeTemplateParmExpr,
to represent a fully-substituted non-type template parameter.
This should improve source fidelity, as well as being generically
useful for diagnostics and such.

llvm-svn: 135243

show more ...


# 3b935d33 11-Jul-2011 John McCall <[email protected]>

Emit partial destruction of structs with initializer lists.

llvm-svn: 134913


# 178360e1 11-Jul-2011 John McCall <[email protected]>

Fix a lot of problems with the partial destruction of arrays:
- an off-by-one error in emission of irregular array limits for
InitListExprs
- use an EH partial-destruction cleanup within the nor

Fix a lot of problems with the partial destruction of arrays:
- an off-by-one error in emission of irregular array limits for
InitListExprs
- use an EH partial-destruction cleanup within the normal
array-destruction cleanup
- get the branch destinations right for the empty check
Also some refactoring which unfortunately obscures these changes.

llvm-svn: 134890

show more ...


# 82fe67bb 09-Jul-2011 John McCall <[email protected]>

A number of array-related IR-gen cleanups.
- Emit default-initialization of arrays that were partially initialized
with initializer lists with a loop, rather than emitting the default
initi

A number of array-related IR-gen cleanups.
- 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

show more ...


# 4db5c3c8 07-Jul-2011 John McCall <[email protected]>

In ARC, reclaim all return values of retainable type, not just those
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
operan

In ARC, reclaim all return values of retainable type, not just those
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

show more ...


# 55e1fbc8 25-Jun-2011 John McCall <[email protected]>

LValue carries a type now, so simplify the main EmitLoad/Store APIs
by removing the redundant type parameter.

llvm-svn: 133860


# fe31481f 21-Jun-2011 Douglas Gregor <[email protected]>

Introduce a new AST node describing reference binding to temporaries.

MaterializeTemporaryExpr captures a reference binding to a temporary
value, making explicit that the temporary value (a prvalue)

Introduce a new AST node describing reference binding to temporaries.

MaterializeTemporaryExpr captures a reference binding to a temporary
value, making explicit that the temporary value (a prvalue) needs to
be materialized into memory so that its address can be used. The
intended AST invariant here is that a reference will always bind to a
glvalue, and MaterializeTemporaryExpr will be used to convert prvalues
into glvalues for that binding to happen. For example, given

const int& r = 1.0;

The initializer of "r" will be a MaterializeTemporaryExpr whose
subexpression is an implicit conversion from the double literal "1.0"
to an integer value.

IR generation benefits most from this new node, since it was
previously guessing (badly) when to materialize temporaries for the
purposes of reference binding. There are likely more refactoring and
cleanups we could perform there, but the introduction of
MaterializeTemporaryExpr fixes PR9565, a case where IR generation
would effectively bind a const reference directly to a bitfield in a
struct. Addresses <rdar://problem/9552231>.

llvm-svn: 133521

show more ...


# 6c9d31eb 17-Jun-2011 Douglas Gregor <[email protected]>

When emitting a compound literal of POD type, continue to emit a
separate aggregate temporary and then memcpy it over to the
destination. This fixes a regression I introduced with r133235, where
the

When emitting a compound literal of POD type, continue to emit a
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

show more ...


# 9b71f0cf 17-Jun-2011 Douglas Gregor <[email protected]>

Implement proper support for generating code for compound literals in
C++, which means:
- binding the temporary as needed in Sema, so that we generate the
appropriate call to the destructor, and

Implement proper support for generating code for compound literals in
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

show more ...


# 1553b190 16-Jun-2011 John McCall <[email protected]>

Restore correct use of GC barriers.

llvm-svn: 133144


12345678910>>...20