History log of /external/clang/lib/CodeGen/CGExprCXX.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4967a710c84587c654b56c828382219c3937dacb 20-Sep-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master Clang for rebase to r275480

Bug: http://b/31320715

This merges commit ac9cc4764cf47a6c3f031687d8592e080c9f5001 from
aosp/dev.

Test: Build AOSP and run RenderScript tests (host tests for slang and
libbcc, RsTest, CTS)

Change-Id: Ic2875e5c3673c83448cd7d1013861e42947b1b55
/external/clang/lib/CodeGen/CGExprCXX.cpp
87d948ecccffea9e9e37d0d053b246e2d6d6c47b 04-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r256229

http://b/26987366

Change-Id: I5d349c9843ea5c24d6e455956f8a446393b6873d
/external/clang/lib/CodeGen/CGExprCXX.cpp
b6d6993e6e6d3daf4d9876794254d20a134e37c2 01-Jul-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r239765

Change-Id: I0393bcc952590a7226af8c4b58534a8ee5fd2d99
/external/clang/lib/CodeGen/CGExprCXX.cpp
58878f85ab89b13e9eea4af3ccf055e42c557bc8 06-May-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r235153

Change-Id: Ia94bbcb6da7c75b6e7c2afedd1001094d62a7324
/external/clang/lib/CodeGen/CGExprCXX.cpp
3ea9e33ea25e0c2b12db56418ba3f994eb662c04 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r233350

Change-Id: I12d4823f10bc9e445b8b86e7721b71f98d1df442
/external/clang/lib/CodeGen/CGExprCXX.cpp
0e2c34f92f00628d48968dfea096d36381f494cb 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master clang for rebase to r230699.

Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/lib/CodeGen/CGExprCXX.cpp
176edba5311f6eff0cad2631449885ddf4fbc9ea 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master Clang for rebase to r222490.

Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/lib/CodeGen/CGExprCXX.cpp
c568f1e98938584c0ef0b12ae5018ff7d90a4072 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

This also fixes a small issue with arm_neon.h not being generated always.

Includes a cherry-pick of:
r213450 - fixes mac-specific header issue
r213126 - removes a default -Bsymbolic on Android

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/lib/CodeGen/CGExprCXX.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/CodeGen/CGExprCXX.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/CodeGen/CGExprCXX.cpp
b66a0f46ebf715835fb643d06510cd822f946c17 11-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196995:
------------------------------------------------------------------------
r196995 | rsmith | 2013-12-10 17:40:16 -0800 (Tue, 10 Dec 2013) | 5 lines

When performing an array new of a multidimensional array with an initializer
list, each element of the initializer list may provide more than one of the
base elements of the array. Be sure to initialize the right type and bump the
array pointer by the right amount.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@197005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
8b54999a831bb195c08541ca995ef0505c96193f 30-Oct-2013 Mark Lacey <mark.lacey@apple.com> Add CodeGenABITypes.h for use in LLDB.

CodeGenABITypes is a wrapper built on top of CodeGenModule that exposes
some of the functionality of CodeGenTypes (held by CodeGenModule),
specifically methods that determine the LLVM types appropriate for
function argument and return values.

I addition to CodeGenABITypes.h, CGFunctionInfo.h is introduced, and the
definitions of ABIArgInfo, RequiredArgs, and CGFunctionInfo are moved
into this new header from the private headers ABIInfo.h and CGCall.h.

Exposing this functionality is one part of making it possible for LLDB
to determine the actual ABI locations of function arguments and return
values, making it possible for it to determine this for any supported
target without hard-coding ABI knowledge in the LLDB code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
87017a781f9e2d70a0478abaae26ba486f6e717e 22-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert "This patch causes clang to reject alias attributes that point to undefined names. For example, with this patch we now reject"

This reverts commit r193161.

It broke

void foo() __attribute__((alias("bar")));
void bar() {}
void zed() __attribute__((alias("foo")));

Looks like we have to fix pr17639 first :-(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
e37bf44c8012f36f900955d8513e03791803045e 22-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> This patch causes clang to reject alias attributes that point to undefined
names. For example, with this patch we now reject

void f1(void) __attribute__((alias("g1")));

This patch is implemented in CodeGen. It is quiet a bit simpler and more
compatible with gcc than implementing it in Sema. The downside is that the
errors only fire during -emit-llvm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
b914e87377fd4d7642f544000a79f8648c6f06c9 20-Oct-2013 Peter Collingbourne <peter@pcc.me.uk> Implement function type checker for the undefined behavior sanitizer.

This uses function prefix data to store function type information at the
function pointer.

Differential Revision: http://llvm-reviews.chandlerc.com/D1338

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
5d4a7559df106959dd721744c8971547f0f09097 01-Oct-2013 Nick Lewycky <nicholas@mxc.ca> No functionality change. Reflow lines that could fit on one line. Break lines
that had 80-column violations. Remove spurious emacs mode markers on .cpp files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
fe16aa31fdfaad4c38aed443d853af293714f1c4 27-Sep-2013 David Majnemer <david.majnemer@gmail.com> AST: Handle qualified array types in typeid() expressions

The intent of getTypeOperand() was to yield an unqualified type.
However QualType::getUnqualifiedType() does not strip away qualifiers on
arrays.

N.B. This worked fine when typeid() was applied to an expression
because we would inject as implicit cast to the unqualified array type
in the AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
9581ed07dee5376002620a0cfb363c6b9e5bdd3e 26-Aug-2013 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: Unify two implementations of canDevirtualizeMemberFunctionCall.

They were mostly copy&paste of each other, move it to CodeGenFunction. Of course
the two implementations have diverged over time; the one in CGExprCXX seems to
be the more modern one so I picked that one and moved it to CGClass which feels
like a better home for it. No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
8f189a9911a992a5c4118c3789485a85bd96e045 21-Aug-2013 Timur Iskhodzhanov <timurrrr@google.com> Abstract out virtual calls and virtual function prologue code generation; implement them for -cxx-abi microsoft

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
060cb4a28c9d0cb15c7a9bd5de2164685629ad9c 29-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR16715: Fix assert in verifier: only mark call to 'operator new' as 'builtin' if
corresponding 'operator new' was actually emitted as a function marked 'nobuiltin'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
a4130baad9d10b7feabb7e003da53424e986d269 22-Jul-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Emit linkonce complete dtors in TUs that need them

Based on Peter Collingbourne's destructor patches.

Prior to this change, clang was considering ?1 to be the complete
destructor and the base destructor, which was wrong. This lead to
crashes when clang tried to emit two LLVM functions with the same name.

In this ABI, TUs with non-inline dtors might not emit a complete
destructor. They are emitted as inline thunks in TUs that need them,
and they always delegate to the base dtors of the complete class and its
virtual bases. This change uses the DeferredDecls machinery to emit
complete dtors as needed.

Currently in clang try body destructors can catch exceptions thrown by
virtual base destructors. In the Microsoft C++ ABI, clang may not have
the destructor definition, in which case clang won't wrap the virtual
virtual base destructor calls in a try-catch. Diagnosing this in user
code is TODO.

Finally, for classes that don't use virtual inheritance, MSVC always
calls the base destructor (?1) directly. This is a useful code size
optimization that avoids emitting lots of extra thunks or aliases.
Implementing it also means our existing tests continue to pass, and is
consistent with MSVC's output.

We can do the same for Itanium by tweaking GetAddrOfCXXDestructor, but
it will require further testing.

Reviewers: rjmccall

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1066

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
ddcff1b310b80b63f1a9ba88f2befeab40c3648f 22-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> Tighten up the set of operator new/operator delete calls we're permitted to
optimize, to follow the permissions granted in N3664. Under those rules, only
calls generated by new-expressions and delete-expressions are permitted to be
optimized, and direct calls to ::operator new and ::operator delete must be
treated as normal calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
658cd2c287b1a0b419f51cd18e5a48d4560d1c56 13-Jul-2013 David Blaikie <dblaikie@gmail.com> PR16214, PR14467: DebugInfo: use "RequireCompleteType" to decide when to emit the full definition of a type in -flimit-debug-info

This simplifies the core benefit of -flimit-debug-info by taking a more
systematic approach to avoid emitting debug info definitions for types
that only require declarations. The previous ad-hoc approach (3 cases
removed in this patch) had many holes.

The general approach (adding a bit to TagDecl and callback through
ASTConsumer) has been discussed with Richard Smith - though always open
to revision.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
3b50e8d78c34fc57e25781015a2cb0536ca54f89 30-Jun-2013 Stephen Lin <stephenwlin@gmail.com> Restore r184205 and associated commits (after commit of r185290)

This allows clang to use the backend parameter attribute 'returned' when generating 'this'-returning constructors and destructors in ARM and MSVC C++ ABIs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
3258abc2bad74e8bb1799d124bc4113c7234fa42 20-Jun-2013 Stephen Lin <stephenwlin@gmail.com> Revert r184205 and associated patches while investigating issue with broken buildbot (possible interaction with LTO)

<rdar://problem/14209661>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
4444dbbb96ba55ff8a05a1918627f609a387db9f 19-Jun-2013 Stephen Lin <stephenwlin@gmail.com> Corrections to r184205 ('this'-return optimization) due to the wrong version of the patch being committed originally.
1) Removed useless return value of CGCXXABI::EmitConstructorCall and CGCXXABI::EmitVirtualDestructorCall and implementations
2) Corrected last portion of CodeGenCXX/constructor-destructor-return-this to correctly test for non-'this'-return of virtual destructor calls


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
7c3e615f01e8f9f587315800fdaf2305ed824568 13-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR12086, PR15117

Introduce CXXStdInitializerListExpr node, representing the implicit
construction of a std::initializer_list<T> object from its underlying array.
The AST representation of such an expression goes from an InitListExpr with a
flag set, to a CXXStdInitializerListExpr containing a MaterializeTemporaryExpr
containing an InitListExpr (possibly wrapped in a CXXBindTemporaryExpr).

This more detailed representation has several advantages, the most important of
which is that the new MaterializeTemporaryExpr allows us to directly model
lifetime extension of the underlying temporary array. Using that, this patch
*drastically* simplifies the IR generation of this construct, provides IR
generation support for nested global initializer_list objects, fixes several
bugs where the destructors for the underlying array would accidentally not get
invoked, and provides constant expression evaluation support for
std::initializer_list objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
5b07e8077a20b80fee90bd76c43c6150c676e4a8 13-Mar-2013 John McCall <rjmccall@apple.com> Tighten up the rules for precise lifetime and document
the requirements on the ARC optimizer.

rdar://13407451

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
9d232c884ea9872d6555df0fd7359699819bc1f1 07-Mar-2013 John McCall <rjmccall@apple.com> Change hasAggregateLLVMType, which conflates complex and
aggregate types in a profoundly wrong way that has to be
worked around in every call site, to getEvaluationKind,
which classifies and distinguishes between all of these
cases.

Also, normalize the API for loading and storing complexes.

I'm working on a larger patch and wanted to pull these
changes out, but it would have be annoying to detangle
them from each other.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
bd7370a78604e9a20d698bfe328c1e43f12a0613 28-Feb-2013 John McCall <rjmccall@apple.com> Use the actual ABI-determined C calling convention for runtime
calls and declarations.

LLVM has a default CC determined by the target triple. This is
not always the actual default CC for the ABI we've been asked to
target, and so we sometimes find ourselves annotating all user
functions with an explicit calling convention. Since these
calling conventions usually agree for the simple set of argument
types passed to most runtime functions, using the LLVM-default CC
in principle has no effect. However, the LLVM optimizer goes
into histrionics if it sees this kind of formal CC mismatch,
since it has no concept of CC compatibility. Therefore, if this
module happens to define the "runtime" function, or got LTO'ed
with such a definition, we can miscompile; so it's quite
important to get this right.

Defining runtime functions locally is quite common in embedded
applications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
0f9827f5d6248d7008063768eb5f2c3e6ba83e94 15-Feb-2013 Timur Iskhodzhanov <timurrrr@google.com> Abstract out emitting the vdtor calls and do it properly when using -cxx-abi microsoft; also fix vdtor calls for the ARM ABI

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
59660c21178b6af518bd4b564e032d5c9cc218cb 13-Feb-2013 Timur Iskhodzhanov <timurrrr@google.com> Emit virtual/deleting destructors properly with -cxx-abi microsoft, PR15058

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
ae3f7608756eb90d8dd5d014238437fcbf1c7de7 03-Feb-2013 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: Implement hint values for dynamic_cast as described in the Itanium C++ ABI.

This can yield dramatic speedups of dynamic_cast for simple inheritance trees,
at least with libsupc++. Neither libcxxabi nor libcxxrt make use of this
hint currently, it was never implemented because clang didn't support it.

There was some concern about the number of class hierarchy walks this change
introduces. If it turns out to be an issue we can add caching either at the cast
pair level or even deeper, but we also do a lot of walks in Sema so this
codepath is probably fairly optimized already.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
21f6b39cca88f0a027c6f5cde24575165c2d5e40 03-Feb-2013 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: Mark the runtime function __dynamic_cast as readonly & nounwind.

This allows the optimizer to CSE dynamic_casts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
378e1e739aed97e9b278beeb20e9f5bbe34c0232 31-Jan-2013 Douglas Gregor <dgregor@apple.com> When we're emitting a constructor or destructor call from a delegating
constructor, retrieve our VTT parameter directly. Fixes PR14588 /
<rdar://problem/12867962>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
3b844ba7d5be205a9b4f5f0b0d1b7978977f4b8c 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate to
reflect the migration in r171366.

Re-sort the #include lines to reflect the new paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
55fc873017f10f6f566b182b70f6fc22aefa3464 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.

I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
7edf9e38b91917b661277601c0e448eef0eb2b56 01-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Simplify: replace getContext().getLangOpts() with just getLangOpts().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
956a5a17713deb1b5b27893303c4f308a1bd2a62 25-Oct-2012 Micah Villmow <villmow@gmail.com> Cleanup some clang code to use new type functions instead of using cast<>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
8e1cee6f23e2552b96b81e5ef419ab3f69c5b5c2 25-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior checking for appropriate vptr value: Clang CodeGen side.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
465e89e094004a2ff53ba930ca0c4b41e51299ba 25-Oct-2012 Eli Friedman <eli.friedman@gmail.com> When we're devirtualizing a method call, make sure the method has the correct IR type.

Reported in the thread "devirtualisation appears to crash clang on covariant functions on ARM" on cfe-dev.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
4cdad3151bfb2075c6bdbfe89fbb08f31a90a45b 23-Oct-2012 Douglas Gregor <dgregor@apple.com> Switch CodeGenOptions over to a .def file, like we do with LangOptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
4def70d3040e73707c738f7c366737a986135edf 09-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: emit calls to the runtime library whenever one of the checks fails.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
6cacae8bf9597b8124cd40aedc189c04484e1990 30-Sep-2012 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: Copy tail padding when we're not dealing with a trivial copy assign or move assign operator.

This fixes a regression from r162254, the optimizer has problems reasoning
about the smaller memcpy as it's often not safe to widen a store but making it
smaller is.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
ecd03b447bb0e2ed1954c77441d49a4a17ca8138 25-Sep-2012 John McCall <rjmccall@apple.com> When performing a ::delete of an object with a virtual destructor,
be sure to delete the complete object pointer, not the original
pointer. This is necessary if the base being deleted is at a
non-zero offset in the complete object. This is only required
for objects with virtual destructors because deleting an object
via a base-class subobject when the base does not have a virtual
destructor is undefined behavior.

Noticed while reviewing the last four years of cxx-abi-dev
activity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
1ad23d62007162df82b58bca31b4aa277a5f6586 10-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Remove redundant semicolons which are null statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
7ac9ef1c82c779a5348ed11b3d10e01c58803b35 08-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: Factor emission of the creation of, and branch to,
the trap BB out of the individual checks and into a common function, to prepare
for making this code call into a runtime library. Rename the existing EmitCheck
to EmitTypeCheck to clarify it and to move it out of the way of the new
EmitCheck.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
b41ba1aa47a66979df578074de3c218d820c152d 25-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Fix a CodeGen bug where we would skip zero-initialization for
array new with a non-trivial constructor. Pointed out in PR13380.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
2c9f87ca5cccbfdaad82762368af5b2323320653 24-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> New -fcatch-undefined-behavior features:
* when checking that a pointer or reference refers to appropriate storage for a type, also check the alignment and perform a null check
* check that references are bound to appropriate storage
* check that 'this' has appropriate storage in member accesses and member function calls


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
ac45293276030400195133225d54ddcb3644ea20 16-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Devirtualize calls on glvalues produced by class member access expressions.
Based on a patch by Yin Ma!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
0d729105ecb50a7e3cbe6e57c29149edfa5cf05a 13-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Factor out computation of whether a typeid's expression is potentially
evaluated into a CXXTypeid member function. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
34f60a4a7fb87e9f4dfd08f8751ce76db9981215 09-Jul-2012 Abramo Bagnara <abramo.bagnara@gmail.com> The delete argument should not be converted to void*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
0f3d0970dcdf6cf17550b86838dff12813968dbc 07-Jul-2012 John McCall <rjmccall@apple.com> Distinguish more carefully between free functions and C++ instance methods
in the ABI arrangement, and leave a hook behind so that we can easily
tweak CCs on platforms that use different CCs by default for C++
instance methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
80bc96e6aa9bc8331473385150cff5e0db305da6 28-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Compare the canonical types and document why we give up on the covariant case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
4a889e47bd5a8d08a705a87962a35a504728d7f6 28-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Disable devirtualization when we have covariant returns. I will open a bug
for tracking this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
ea01d7661751e062bb670cc1a0bdfee5789cb96f 28-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Don't devirtualize calls when we don't have the correct type of the this pointer
handy. It can be done, but we would have to build a derived-to-base cast
during codegen to compute the correct this pointer.

I will handle covariant returns next.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
632fbaa22fbed7c090eb83775731bfff786c2198 28-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix another issue with devirtualizing calls to final methods by passing them
the correct this pointer. There is some potential for sharing a bit more
code with canDevirtualizeMemberFunctionCalls, but that can be done in an
independent patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
8d852e35adb46e0799538dfc9c80d44f27cd3597 27-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Implement John McCall's review of r159212 other than the this pointer not
being updated. Will fix that in a second.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
12582bdc2e1fca260eb2437d87dab5302c37bab2 26-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix a bug in my previous patch: If we are not doing a virtual call because
the member expression is qualified, call the method specified in the code,
not the most derived one we can find.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159219 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
0b4fe503ef00d9f8ea330850d3e3b303e9c7c876 26-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> During codegen of a virtual call we would extract any casts in the expression
to see if we had an underlying final class or method, but we would then
use the cast type to do the call, resulting in a direct call to the wrong
method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
581deb3da481053c4993c7600f97acf7768caac5 06-Jun-2012 David Blaikie <dblaikie@gmail.com> Revert Decl's iterators back to pointer value_type rather than reference value_type

In addition, I've made the pointer and reference typedef 'void' rather than T*
just so they can't get misused. I would've omitted them entirely but
std::distance likes them to be there even if it doesn't use them.

This rolls back r155808 and r155869.

Review by Doug Gregor incorporating feedback from Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
a2ac407e285290508c86baa358a0c011ce6f8958 20-May-2012 Eli Friedman <eli.friedman@gmail.com> Zap a bogus assert for delegating constructors. PR12890, part 2.

I'm pretty sure we are in fact doing the right thing here, but someone who knows the standard better should double-check that we are in fact supposed to zero out the member in the given testcase.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
262bc18e32500558af7cb0afa205b34bd37bafed 30-Apr-2012 David Blaikie <dblaikie@gmail.com> Remove the ref/value inconsistency in filter_decl_iterator.

filter_decl_iterator had a weird mismatch where both op* and op-> returned T*
making it difficult to generalize this filtering behavior into a reusable
library of any kind.

This change errs on the side of value, making op-> return T* and op* return
T&.

(reviewed by Richard Smith)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
3a70cd6e1cc414856e41ce5509aa61c89bf472dc 27-Apr-2012 Alexey Samsonov <samsonov@google.com> Use enum to set debug info size generated by Clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
377ecc7996dce6803f7b7b6208cab5e197c9c5b8 16-Apr-2012 Eli Friedman <eli.friedman@gmail.com> Propagate alignment on lvalues through EmitLValueForField. PR12395.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
649b4a1a9b5e6f768ca0cb84bd97b00f51083e15 29-Mar-2012 Chad Rosier <mcrosier@apple.com> Revert r153613 as it's causing large compile-time regressions on the nightly testers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
57cd1b89cd91433ce1991a5bff36fe776a263796 29-Mar-2012 John McCall <rjmccall@apple.com> When we can't prove that the target of an aggregate copy is
a complete object, the memcpy needs to use the data size of
the structure instead of its sizeof() value. Fixes PR12204.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d 11-Mar-2012 David Blaikie <dblaikie@gmail.com> Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).

The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
c07b18ed2b207b17cf8d770966e5c1e52d46f4ec 29-Feb-2012 Eric Christopher <echristo@apple.com> Formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
577fb5b2c15f7c187983a53e53f4f53b5d7aabb1 24-Feb-2012 Chad Rosier <mcrosier@apple.com> Reapply r151172 - Unwind path cleanup for array new list initializers - with a
test case that only runs on debug builds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151311 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
887ddf39b365320fdf8dde923287bf52bb3c6a38 23-Feb-2012 Douglas Gregor <dgregor@apple.com> Replace a use of hasTrivialDefaultConstructor() with the appropriate
isTrivial() call.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
4d8b79786bf1426ed7031274433279737a6917fe 22-Feb-2012 Chad Rosier <mcrosier@apple.com> Revert r151172: Unwind path cleanup for array new list initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
0f5a1930ccf169f9a2885bff18e3169af4aff2a4 22-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Unwind path cleanup for array new list initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151172 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
9203647221439c6eb04842bb8a22f5f03fd4d2bf 22-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> CodeGen for array new list initializers. Doesn't correctly clean up in the face of exceptions yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
972edf0534d8a50f87fac1d0ff34eb22f593df11 19-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Make heap-allocation of std::initializer_list 'work'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
de5d3c717684f3821b8db58037bc7140acf134aa 17-Feb-2012 John McCall <rjmccall@apple.com> Whether an argument is required (in contrast with being an
optional argument passed through the variadic ellipsis)
potentially affects how we need to lower it. Propagate
this information down to the various getFunctionInfo(...)
overloads on CodeGenTypes. Furthermore, rename those
overloads to clarify their distinct purposes, and make
sure we're calling the right one in the right place.
This has a nice side-effect of making it easier to construct
a function type, since the 'variadic' bit is no longer
separable.

This shouldn't really change anything for our existing
platforms, with one minor exception --- we should now call
variadic ObjC methods with the ... in the "right place"
(see the test case), which I guess matters for anyone
running GNUStep on MIPS. Mostly it's just a substantial
clean-up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
22cfaf512e4f66105fb1f8dd39e0a77787fbdf9b 16-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Elide copy construction in new expressions. PR11757.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
2aed8b88613863f3c439cdfb205bdf8b608fb205 16-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Revert "Revert "Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself.""

This reintroduces commit r150682 with a fix for the Bullet benchmark crash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
1548d14f4092a817f7d90ad3e7a65266dc85fbc5 16-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Revert "Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself."
It leads to a compiler crash in the Bullet benchmark.

This reverts commit r12014.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
5f688f4b15d02aa7ad159c46b1f78fe59d412f12 16-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself.

Holding the constructor directly makes no sense when list-initialized arrays come into play. The constructor is now held in a CXXConstructExpr, if construction is what is done. The new design can also distinguish properly between list-initialization and direct-initialization, as well as implicit default-initialization constructors and explicit value-initialization constructors. Finally, doing it this way removes redundance from the AST because CXXNewExpr doesn't try to handle both the allocation and the initialization responsibilities.

This breaks the static analysis of new expressions. I've filed PR12014 to track this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
b74ed087469db042325bad76fdf3ff6ed67dec09 14-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Implement IRGen of lambda expressions which capture arrays.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
f8823e7ae00d2b0a9395b51b7bd53b505df72031 09-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Use RAII object for cleanups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
4c5d8afd100189b6cce4fd89bfb8aec5700acb50 09-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Refactor lambda IRGen so AggExprEmitter::VisitLambdaExpr does the right thing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150146 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
8b418685e9e4f02f4eb2a76e1ec063e07552b68d 07-Feb-2012 Chris Lattner <sabre@nondot.org> simplify a bunch of code to use the well-known LLVM IR types computed by CodeGenModule.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
40563cd5ea402b7a0db13058ee869a77cd1ab5ee 10-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Make array new on a pointer to data member type work correctly. PR11523.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
6da2c716017d5c8530ec99779524491ebc5dadb8 03-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Switch LValue so that it exposes alignment in CharUnits. (No functional change.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
d7722d9d76a851e7897f4127626616d3b1b8e530 03-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Switch the Alignment argument on AggValueSlot over to CharUnits, per John's review comment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
f394078fde147dcf27e9b6a7965517388d64dcb6 03-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Track alignment in AggValueSlot. No functional change in this patch, but I'll be introducing uses of the specified alignment soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
6f103ba42cb69d50005a977c5ea583984ab63fc4 10-Nov-2011 John McCall <rjmccall@apple.com> Whenever explicitly activating or deactivating a cleanup, we
need to provide a 'dominating IP' which is guaranteed to
dominate the (de)activation point but which cannot be avoided
along any execution path from the (de)activation point to
the push-point of the cleanup. Using the entry block is
bad mojo.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
2ed7cb649aa709b875c519f4a980a1e2b5712370 14-Oct-2011 Eli Friedman <eli.friedman@gmail.com> PR11124: Don't overwrite memory outside of a base class when performing zero-initialization before running its constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
6c0aa5ff6e6253db0f993053599e2a52b5b93b2d 06-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> CUDA: IR generation support for kernel call expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
197056726ed6412501130c2ef2ff69009772aa65 15-Sep-2011 John McCall <rjmccall@apple.com> Rewrite this loop to use partial destruction; I'm not sure it's
possible for that to matter right now, but eventually I think we'll
need to unify this better, and then it might. Also, use a more
efficient looping structure.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
576cf17055c92e7d1ae8fb9fd9f79433a16a4394 06-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Rearrange code so that we pass the right pointer to delete[] when an exception is thrown constructing the array elements in an array new expression. Fixes PR10870.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139158 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
b2b5658a8e4ad566303ec98caceaa3485e7635f7 06-Sep-2011 Douglas Gregor <dgregor@apple.com> 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
85ea7aa961deac1d754f610af8062ae3f8b4e2a5 30-Aug-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Declare and define implicit move constructor and assignment operator.

This makes the code duplication of implicit special member handling even worse,
but the cleanup will have to come later. For now, this works.
Follow-up with tests for explicit defaulting and enabling the __has_feature
flag to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
4418439220a8f8e0b1deffdccce2354854c702f5 26-Aug-2011 John McCall <rjmccall@apple.com> 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
7c2349be2d11143a2e59a167fd43362a3bf4585e 25-Aug-2011 John McCall <rjmccall@apple.com> Use stronger typing for the flags on AggValueSlot and require
creators to tell us whether something needs GC barriers.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
aebab72698ce5283395e61597a266fb04e62e390 02-Aug-2011 Eli Friedman <eli.friedman@gmail.com> PR10566: Make sure codegen for deleting an pointer to an incomplete type actually works.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
5f9e272e632e951b1efe824cd16acb4d96077930 23-Jul-2011 Chris Lattner <sabre@nondot.org> remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
0f6ac7cf7bc6a02c1a5c19d2c90ec0d1dd7786e7 22-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use
ArrayRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
2acc6e3feda5e4f7d9009bdcf8b1cd777fecfe2d 18-Jul-2011 Chris Lattner <sabre@nondot.org> de-constify llvm::Type, patch by David Blaikie!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
4c7d9f1507d0f102bd4133bba63348636facd469 15-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert CallInst and InvokeInst APIs to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
8dd55a3c3b28d195717c87bbc60e765951d408fe 14-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Change intrinsic getter to take an ArrayRef, now that the underlying function in LLVM does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
fbf780a9d1dbb191fc40c8af967c590e08724b74 13-Jul-2011 John McCall <rjmccall@apple.com> Okay, that rule about zero-length arrays applies to destroying
them, too.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
dd376cae98ce4d0ab92c90d3e9c01ee19e919f44 13-Jul-2011 John McCall <rjmccall@apple.com> Arrays are permitted to be zero-length in some situations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
c3c0766277cd64bf117450a1519c9cf762d994d4 13-Jul-2011 John McCall <rjmccall@apple.com> Convert the standard default-construction loops to use phis and
partial destruction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
7cfd76cb5cec2aa7aaa4176339c806de6ec85a79 13-Jul-2011 John McCall <rjmccall@apple.com> Switch delete[] IR-generation over to the destroy framework,
which implicitly makes it EH-safe as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
a8b20f70d562cdc2679f82d409832b79fc415277 13-Jul-2011 Douglas Gregor <dgregor@apple.com> When compiling ::delete for a class with a virtual destructor, call
the complete destructor and then invoke the global delete
operator. Previously, we would invoke the deleting destructor, which
calls the wrong delete operator. Fixes PR10341.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
ad346f4f678ab1c3222425641d851dc63e9dfa1a 12-Jul-2011 John McCall <rjmccall@apple.com> Generalize Cleanup::Emit's "isForEH" parameter into a set
of flags. No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
9cbe4f0ba01ec304e1e3d071c071f7bca33631c0 09-Jul-2011 Chris Lattner <sabre@nondot.org> clang side to match the LLVM IR type system rewrite patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
a07398ed98ea2b55ad7a505a3aab18aed93b149f 16-Jun-2011 John McCall <rjmccall@apple.com> Restore correct use of GC barriers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
f85e193739c953358c865005855253af4f68a497 16-Jun-2011 John McCall <rjmccall@apple.com> Automatic Reference Counting.

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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
575a1c9dc8dc5b4977194993e289f9eda7295c39 20-May-2011 Douglas Gregor <dgregor@apple.com> Introduce Type::isSignedIntegerOrEnumerationType() and
Type::isUnsignedIntegerOrEnumerationType(), which are like
Type::isSignedIntegerType() and Type::isUnsignedIntegerType() but also
consider the underlying type of a C++0x scoped enumeration type.

Audited all callers to the existing functions, switching those that
need to also handle scoped enumeration types (e.g., those that deal
with constant values) over to the new functions. Fixes PR9923 /
<rdar://problem/9447851>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
b1c98a35fbd49d6404a72db4aca2ceda352380c7 16-May-2011 John McCall <rjmccall@apple.com> Don't actually emit calls to the reserved global placement new and delete
operators; their semantics are guaranteed by the language.

If someone wants to argue that freestanding compiles shouldn't recognize
this, I might be convinceable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
7d16627081caede9691a6f46b796da4073ac14ad 15-May-2011 John McCall <rjmccall@apple.com> The array-size operand to a new-expression is not necessarily a size_t.
It can be larger, it can be smaller, it can be signed, whatever. Handle
all the crazy cases with grace and spirit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
023df37c27ee8035664fb62f206ca58f4e2a169d 09-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Rename "hasTrivialConstructor" to "hasTrivialDefaultConstructor" and
modify the semantics slightly to accomodate default constructors (I
hope).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
a2447e0d1e28669cd637204a871f15b1215277fd 08-May-2011 Anders Carlsson <andersca@mac.com> Move code to emit the callee of an CXXOperatorCallExpr out into a separate function in CGClass.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
6bd2f6ad857949d4dfb6e75e0760c61950b917cf 06-May-2011 Cameron Esfahani <dirty@apple.com> Fix false positive warning about uninitialized variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
d49bd5515b89bedc57c3d1d3be457e4340dbdb1d 03-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Fix delegating constructors stylistic issues.

Material bugfixes to come this afternoon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
c6d07821c529bb95e4cf072e49b736c5142f1786 02-May-2011 Eli Friedman <eli.friedman@gmail.com> Switch CallArgList from an std::pair to a new CallArg struct (which will eventually gain more members). Working towards modifying call emission to avoid unnecessary copies.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
04c9a49ee251424b11d7c4e8b1c23637684cecb6 02-May-2011 Eli Friedman <eli.friedman@gmail.com> Simplify code a bit by using CallArgList::add. No intended functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
059ce0d92eb5a7da900ae735dc0a2ea3d64f4b0b 01-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Fully implement delegating constructors!

As far as I know, this implementation is complete but might be missing a
few optimizations. Exceptions and virtual bases are handled correctly.

Because I'm an optimist, the web page has appropriately been updated. If
I'm wrong, feel free to downgrade its support categories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
657baf19ca8a48a926bd3bc148b6ad1b17e53199 29-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Cut down unnecessary zero'ing when value-initializing arrays of C++ objects.

-C++ objects with user-declared constructor don't need zero'ing.
-We can zero-initialize arrays of C++ objects in "bulk" now, in which case don't zero-initialize each object again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
864c041e118155c2b1ce0ba36942a3da5a4a055e 26-Apr-2011 John McCall <rjmccall@apple.com> Make yet another placeholder type, this one marking that an expression is a bound
member function, i.e. something of the form 'x.f' where 'f' is a non-static
member function. Diagnose this in the general case. Some of the new diagnostics
are probably worse than the old ones, but we now get this right much more
universally, and there's certainly room for improvement in the diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
3f6c5e13f6c1662a7173c747fc63f4e8edb91206 18-Apr-2011 Anders Carlsson <andersca@mac.com> Clean up code generation of typeid expressions and add C++ standard references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
ad3692bbe1874abafae1757a2b9d3bfa2249dc43 13-Apr-2011 Anders Carlsson <andersca@mac.com> Use EmitCallOrInvoke in EmitBadTypeidCall and EmitBadCastCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
4bdbc0cb1e29ac870b7e7985cf4a1b5c34176e8c 11-Apr-2011 Anders Carlsson <andersca@mac.com> If there's an invoke destination, we should use invoke instead of call when calling the __cxa_bad_typeid function. Fixes PR7400.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
379b5155b4566f63679e1da6b0ceb5fdfa2aec6d 11-Apr-2011 John McCall <rjmccall@apple.com> More __unknown_anytype work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
3ddcdd5d6c88902d24baa9e6bb240a3da88e68d4 11-Apr-2011 Anders Carlsson <andersca@mac.com> When we know that a dynamic_cast always returns null, we can make
CodeGenFunction::EmitDynamicCast always return null or throw a bad_cast
exception.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
f0cb4a6ac7ffcba25309a5d1ad1a4bf869b13a33 11-Apr-2011 Anders Carlsson <andersca@mac.com> Clean up CodeGenFunction::EmitDynamicCast. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
b924124316becf2968a37dab36d0c48ea167666f 11-Apr-2011 Anders Carlsson <andersca@mac.com> Replace a couple of Builder.CreateICmpEQ with Builder.CreateIsNull. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
cd0b32e73a66a20a8dab7a7f0ce963dc669f7c0a 10-Apr-2011 Anders Carlsson <andersca@mac.com> Strip off parens and no-op casts when deciding if an expr can be devirtualized. Fixes the second half of PR9660.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
5536daa627b508299007b735a588bf4e88825bb3 09-Apr-2011 Eli Friedman <eli.friedman@gmail.com> Make sure we or together the overflow flags of the multiply and add, so the
check is triggered appropriately. Reported on cfe-dev.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
bbf3bacb3e0c1ebb3e8a4a8b1330404a7e379315 30-Mar-2011 Jay Foad <jay.foad@gmail.com> Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
PHINode::Create() giving the (known or expected) number of operands.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
8026f6d82f7fa544bc0453714fe94bca62a1196e 13-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Instead of storing an ASTContext* in FunctionProtoTypes with computed noexcept specifiers, unique FunctionProtoTypes with a ContextualFoldingSet, as suggested by John McCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
60618fa7f88d5162bb5b40988b6b38d4d75d6fc6 12-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Propagate the new exception information to FunctionProtoType.
Change the interface to expose the new information and deal with the enormous fallout.
Introduce the new ExceptionSpecificationType value EST_DynamicNone to more easily deal with empty throw specifications.
Update the tests for noexcept and fix the various bugs uncovered, such as lack of tentative parsing support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
413ebdb1af6fb0d81845b61254daf02ba0449afd 11-Mar-2011 John McCall <rjmccall@apple.com> Use a slightly more semantic interface for emitting call arguments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
c2f3e7f42c8bf9e8d4393a6e8c4762dafc4f28dd 07-Mar-2011 John McCall <rjmccall@apple.com> The conditional needs to be pushed before the branch. Make the test less
trivial to check this. Adjust for style.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127151 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
a7f633f522af786e80dc08dbd63e222c9414095b 07-Mar-2011 John McCall <rjmccall@apple.com> An operator new with an empty exception specifier returns null on a bad
allocation and therefore requires a null-check. We were doing that, but
we weren't treating the new-initializer as being conditionally executed,
which means it was possible to get ill-formed IR as in PR9298.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
9c6082fe89c61af697f017aa80937581cc2128d8 02-Mar-2011 Tilmann Scheller <tilmann.scheller@googlemail.com> Revert "Add CC_Win64ThisCall and set it in the necessary places."

This reverts commit 126863.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
88d117c2eedd7c5bec57ac983a98d5e12bdd2cc6 02-Mar-2011 Tilmann Scheller <tilmann.scheller@googlemail.com> Add CC_Win64ThisCall and set it in the necessary places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
d16c2cf1cafa413709aa487cbbd5dc392f1ba1ff 08-Feb-2011 John McCall <rjmccall@apple.com> Reorganize CodeGen{Function,Module} to eliminate the unfortunate
Block{Function,Module} base class. Minor other refactorings.

Fixed a few address-space bugs while I was there.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
771c678c04f5f685b4f188ec6c2fd88ad0f7457f 03-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Clean up of -fapple-kext abi code. No change otherwise.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
ccd5259d33cbbdd6f5fbf7ccab4cb4a2702309ea 02-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> -fapple-kext support for indirect call to virtuals dtors - wip.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
268ab8c6b92dc40c678d8458a335698fa34915c9 29-Jan-2011 Anders Carlsson <andersca@mac.com> When trying to get the most derived class, don't assume that we can ignore all casts. We can only ignore derived-to-base and no-op casts. Fixes selfhost.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
1679f5a84ae1e578b0de347c89eaf31e0465f33c 29-Jan-2011 Anders Carlsson <andersca@mac.com> When calling a virtual member function on a base class and the most derived class is marked 'final', we can devirtualize the call.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
a50e33eb0ff7b73d44aebce88de3732583a7e960 29-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> More work to support -fapple-kext regarding
indirect vf calls and addition of extra entry
at bottom of vtbls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
36f893c1efe367f929d92c8b125f964c22ba189e 28-Jan-2011 John McCall <rjmccall@apple.com> Move all the cleanups framework code into a single file.
Pure motion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124484 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
804b807ea918184d6de63bd745e1ff75a9bfc679 28-Jan-2011 John McCall <rjmccall@apple.com> Reorganize the value-dominance metaprogram and introduce a specialization
for CodeGen's RValue type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
3ad32c8d93eb65d1d4943d7df567fc9b4f55d137 28-Jan-2011 John McCall <rjmccall@apple.com> Convert the exception-freeing cleanup over to the conditional cleanups code,
fixing a crash which probably nobody was ever going to see. In doing so,
fix a horrendous number of problems with the conditional-cleanups code.
Also, make conditional cleanups re-use the cleanup's activation variable,
which avoids some unfortunate repetitiveness.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
6ec278d1a354517e20f13a877481453ee7940c78 27-Jan-2011 John McCall <rjmccall@apple.com> Do a proper recursive lookup when deciding whether a class's usual
deallocation function has a two-argument form. Store the result of this
check in new[] and delete[] nodes.

Fixes rdar://problem/8913519



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
cb88a1f968c3d4eb451dafb421a8d9578edcbf1a 24-Jan-2011 Anders Carlsson <andersca@mac.com> Use attributes for all the override control specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
f89e0424b8903438179f4a2f16dddd5e5bdc814e 23-Jan-2011 Anders Carlsson <andersca@mac.com> Get rid of the [[final]] C++0x attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
7ac0ff2a8791280102a557761dbb931deb21a1dc 21-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> Move cheking of kext into canDevirtualizeMemberFunctionCalls().
Improve on test case. Per Doug's comment. wip.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123954 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
2726267f094a0c1f5ac5b501ec5a9898c58876bf 20-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> apple kext abi requires all vf calls, including qualified
vf calls, be made indirect. This patch is towards that goal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
fe71008c2764768f25478b16c1802755189ed7c9 19-Jan-2011 Ken Dyck <kd@kendyck.com> Replace calls to getTypeSize() and getTypeAlign() with their 'InChars'
counterparts where char units are needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
dbee3411a22b0dbb03267f5445f7b796104991bb 18-Jan-2011 Francois Pichet <pichet2000@gmail.com> Add support for explicit constructor calls in Microsoft mode.
For example:

class A{
public:
A& operator=(const A& that) {
if (this != &that) {
this->A::~A();
this->A::A(that); // <=== explicit constructor call.
}
return *this;
}
};

More work will be needed to support an explicit call to a template constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
9f0c7cc36d29cf591c33962931f5862847145f3e 30-Dec-2010 Benjamin Kramer <benny.kra@googlemail.com> Simplify mem{cpy, move, set} creation with IRBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
9f71a8f4c7a182a5236da9e747d57cc1d1bd24c2 07-Dec-2010 Jay Foad <jay.foad@gmail.com> PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121121 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
4765fa05b5652fcc4356371c2f481d0ea9a1b007 06-Dec-2010 John McCall <rjmccall@apple.com> Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoretical
reason this is limited to C++, and it's certainly not limited to temporaries.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
0e800c9c20d1a658a91096c756c4a4a9e90264fc 04-Dec-2010 John McCall <rjmccall@apple.com> Remove some defensive calls to EmitLoadOfPropertyRefLValue that shouldn't
be required, and then fix up some missing loads on overloaded-operator
paths which that exposed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
119a1c6c4029d30cae7b31a2826aa0ff70d01668 04-Dec-2010 John McCall <rjmccall@apple.com> Kill the KVC l-value kind and calculate the base expression when emitting
the l-value.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
830937bc1100fba7682f7c32c40512085870f50c 02-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> IR Gen. part of API support for __block cxx
objects imported into blocks. //rdar://8594790.
Will have a test case coming (as well as one
sent to llvm test suite).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
858a546d8fe73b07f2296313bef2e30445ea164b 15-Nov-2010 Chandler Carruth <chandlerc@gmail.com> Silence an unused variable warning during release builds by folding the
expression into the assert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
34999876e215b22febc240b1a6dc054215d12f9c 13-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Block API patch to do copy ctor of copied-in cxx objects in
copy helper function and dtor of copied cxx objects
in dispose helper functions. __block variables
TBD next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
d66f42856539bf1c764c13fba41758228fc4cb9b 27-Oct-2010 Anders Carlsson <andersca@mac.com> Also devirtualize calls to a member functions where the containing class has been marked final.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
bd2bfae2a6e5dc264e1f13183ad2ac11095766bb 27-Oct-2010 Anders Carlsson <andersca@mac.com> If a virtual member function has the 'final' attribute, we can devirtualize calls to it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117444 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
043fb9a1fc0609285f60f0f87e5a18195408f34c 26-Oct-2010 Dan Gohman <gohman@apple.com> Factor out the code for emitting code to load vtable pointer members
so that it's done in one place.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
8a97005f97a2a93fc2cd942c040668c5d4df7537 23-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> After discussion with Doug and John, I am reverting
the patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
07ed93f378a8868c9a7c04ca7ae685b85c55e5ea 22-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Patch fixes miscompile with non-trivial copy constructors and
statement expressions, //rdar: //8540501


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117146 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
6802027338b8af1d54ba94d7ed9722f1b327b645 22-Oct-2010 Devang Patel <dpatel@apple.com> Delay record type's debug info emission, in -flimit-debug-info mode, if member expression's base is call expr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
79ba2a6379f87fa137377c3f55ff993b9e5cc144 22-Oct-2010 Benjamin Kramer <benny.kra@googlemail.com> More class anonymization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117106 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
c69e1cf04323f2e786d40e8a5ba84e77ee1c6827 30-Sep-2010 Devang Patel <dpatel@apple.com> Introduce -flimit-debug-info.
In this experimental mode try avoiding debug info emission for classes as much as possible. The goal is to reduce size of produced debuginfo without reducing quality of debug info in general. This is a work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
3e9438b5251a547253d64169863c2909b9b2772a 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Kill FunctionDecl's IsCopyAssignment bit; it duplicated what could
already be determined by isCopyAssignmentOperator(), and was set too
late in the process for all clients to see the appropriate
value. Cleanup only; no functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
fc1e6c79bbfe0e9a58bb792996d51f42e36e3d6a 18-Sep-2010 John McCall <rjmccall@apple.com> Fix a bug with binding l-values to elided temporaries, and leave a couple
helpful asserts behind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
3019c444c672938c57f5573840071ecd73425ee7 17-Sep-2010 John McCall <rjmccall@apple.com> When emitting a new-expression inside a conditional expression,
the cleanup might not be dominated by the allocation code.
In this case, we have to store aside all the delete arguments
in case we need them later. There's room for optimization here
in cases where we end up not actually needing the cleanup in
different branches (or being able to pop it after the
initialization code).

Also make sure we only call this operator delete along the path
where we actually allocated something.

Fixes rdar://problem/8439196.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
558d2abc7f9fd6801cc7677200992313ae90b5d8 15-Sep-2010 John McCall <rjmccall@apple.com> one piece of code is responsible for the lifetime of every aggregate
slot. The easiest way to do that was to bundle up the information
we care about for aggregate slots into a new structure which demands
that its creators at least consider the question.

I could probably be convinced that the ObjC 'needs GC' bit should
be rolled into this structure.
Implement generalized copy elision. The main obstacle here is that
IR-generation must be much more careful about making sure that exactly



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
c384636f9a405b687990564b204b98e360c81587 14-Sep-2010 John McCall <rjmccall@apple.com> Tweak this assert.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
7d8647f194ae4f2499e5bcd40dcfea34cd21ebc6 14-Sep-2010 John McCall <rjmccall@apple.com> Implement the EH cleanup to call 'operator delete' if a new-expression throws
(but not if destructors associated with the full-expression throw).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
0339d72d7f853d90088a4d8639fb50810533e791 10-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> IRGen fix for using property-dot syntax to pass
reference object to a c++ member function.
fixes radar 8409336.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
fc4002872864e3c29c896000519ae989b6fdb7dd 03-Sep-2010 John McCall <rjmccall@apple.com> Re-commit r112916 with an additional fix for the self-host failures.
I've audited the remaining getFunctionInfo call sites.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
2b8d60dfdfbbf19f6e2dcfb5c438f8eda8a7ecb4 03-Sep-2010 John McCall <rjmccall@apple.com> Revert r112916, it's breaking selfhost pretty badly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
52968abd2aaf36f17d9858581563bf80475fb178 03-Sep-2010 John McCall <rjmccall@apple.com> It's not safe to use the generic CXXMethodDecl overload of CGT::getFunctionInfo
to set up a destructor call, because ABIs can tweak these conventions.
Fixes rdar://problem/8386802.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
cc09c022bebcabd5f222d410bb6695af0ea93257 03-Sep-2010 Douglas Gregor <dgregor@apple.com> Fix a few more ConvertTypes that should be ConvertTypeForMems, fixing
two regressions in Boost.Config.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
eede61a83e90f3cb03ef8665b67d648dccd6ce42 02-Sep-2010 Douglas Gregor <dgregor@apple.com> Revert my two IRgen fixes for "bool", then use a far simpler approach
based on ConvertTypeForMem. Thanks to John for pointing out the right
solution.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
f9cce31a1c71e2949cd5f47616a5624f5fedd84d 02-Sep-2010 Douglas Gregor <dgregor@apple.com> Fix more i1/i8 pointer madness. Here, an overactive assertion
complains when the element type of a C++ "delete" expression is
different from what we would expect from the pointer type. When
deleting a bool*, we end up with an i1 on one side (where we compute
the LLVM type from the Clang bool type) and i8 on the other (where we
grab the LLVM type from the LLVM pointer type). I've weakened the
assertion appropriately, and the Boost Parallel Graph Library now
passes its regression tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
1e7fe751466ea82665fd21e9162fd7cc9c5f412d 02-Sep-2010 John McCall <rjmccall@apple.com> Abstract IR generation of array cookies into the C++ ABI class and
implement ARM array cookies. Also fix a few unfortunate bugs:
- throwing dtors in deletes prevented the allocation from being deleted
- adding the cookie to the new[] size was not being considered for
overflow (and, more seriously, was screwing up the earlier checks)
- deleting an array via a pointer to array of class type was not
causing any destructors to be run and was passing the unadjusted
pointer to the deallocator
- lots of address-space problems, in case anyone wants to support
free store in a variant address space :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
98c9d1fa3776204a94c013f1dc25f62d75c00573 01-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Fix IRGen when property-dot syntax used to access
a c++ class object 'ivar'. Fixes radar 8366604.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
4c40d98ab7acf5f27fa89b17bd8fc0ef7683df37 31-Aug-2010 John McCall <rjmccall@apple.com> Teach IR generation to return 'this' from constructors and destructors
under the ARM ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
7a126a474fdde06382b315b4e3d8ef0a21d4dc31 31-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename DeclContext::getLookupContext to getRedeclContext and change its semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
e7ab92e1d62f9c243bbd1f42f72a7b3c2666d33e 26-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix miscompilation. The cookie was not used when new'ing arrays with multiple dimensions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
2de56d1d0c3a504ad1529de2677628bdfbb95cd4 25-Aug-2010 John McCall <rjmccall@apple.com> GCC didn't care for my attempt at API compatibility, so brute-force everything
to the new constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
5172ed92b42f0bc6a022542a08f7b18af821bcb3 23-Aug-2010 John McCall <rjmccall@apple.com> Extract a method to check whether a function is the global placement
operator new[].



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
f16aa103d3afd42fbca2ab346f191bf745cec092 22-Aug-2010 John McCall <rjmccall@apple.com> Go back to asking CodeGenTypes whether a type is zero-initializable.
Make CGT defer to the ABI on all member pointer types.
This requires giving CGT a handle to the ABI.
It's way easier to make that work if we avoid lazily creating the ABI.
Make it so.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
759e41baf6a95c3a265970b6bf1c97c233fd28b0 22-Aug-2010 Douglas Gregor <dgregor@apple.com> When performing value-initialization for a class with a non-trivial,
implicitly-defined default constructor, zero-initialize the memory
before calling the default constructor. Previously, we would only
zero-initialize in the case of a trivial default constructor.

Also, simplify the hideous logic that determines when we have a
trivial default constructor and, therefore, don't need to emit any
call at all.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
d608cdb7c044365cf4e8764ade1e11e99c176078 22-Aug-2010 John McCall <rjmccall@apple.com> Experiment with using first-class aggregates to represent member function
pointers. I find the resulting code to be substantially cleaner, and it
makes it very easy to use the same APIs for data member pointers (which I have
conscientiously avoided here), and it avoids a plethora of potential
inefficiencies due to excessive memory copying, but we'll have to see if it
actually works.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
cf2c85e76fdafe7e634810a292321a6c8322483d 22-Aug-2010 John McCall <rjmccall@apple.com> Abstract more member-pointerness out.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
93d557bc1867b7d7b102f87290194b4be7932c92 22-Aug-2010 John McCall <rjmccall@apple.com> Extract calls to method pointers out as an ABI routine.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
91a16fa3265686b90054715eea504d9b4a13438b 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Change Emit{Load,Store}OfScalar to take a required Alignment argument and
update callers as best I can.
- This is a work in progress, our alignment handling is very horrible / sketchy -- I am just aiming for monotonic improvement.
- Serious review appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111707 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
452b7f22d75d1838df72653dcaacbf92b6c34e71 20-Aug-2010 Douglas Gregor <dgregor@apple.com> Fix a major regression with value-initialization of class types with
trivial default constructors. We're weren't zero-initializing them,
which manifested as <rdar://problem/8320532> (a regression in the GCC
test suite) and is likely to have caused significant other breakage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
59174c0633fb5cde41735cfbff5744bdf837e8d9 21-Jul-2010 Douglas Gregor <dgregor@apple.com> Implement zero-initialization for array new when there is an
initializer of (). Make sure to use a simple memset() when we can, or
fall back to generating a loop when a simple memset will not
suffice. Fixes <rdar://problem/8212208>, a regression due to my work
in r107857.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
806941eab5e1d62d7676e5cdc0e1d9e397ea78b4 20-Jul-2010 Chris Lattner <sabre@nondot.org> in 'new int[4]', constant fold the 4*4=16 instead of
doing an overflow check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
83252dcfe61aaebcb6bc117e71dc12968729513f 20-Jul-2010 Chris Lattner <sabre@nondot.org> Follow the implementation approach suggested by PR6687,
which generates more efficient and more obviously conformant
code. We now test for overflow of the multiply then force
the result to -1 if so. On X86, this generates nice code
like this:

__Z4testl: ## @_Z4testl
## BB#0: ## %entry
subl $12, %esp
movl $4, %eax
mull 16(%esp)
testl %edx, %edx
movl $-1, %ecx
cmovel %eax, %ecx
movl %ecx, (%esp)
call __Znam
addl $12, %esp
ret



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
6c552c1d5f47fbba00e6268d96a26ad026f2da2a 20-Jul-2010 Chris Lattner <sabre@nondot.org> implement rdar://5739832 - operator new should check for overflow in multiply,
causing clang to compile this code into something that correctly throws a
length error, fixing a potential integer overflow security attack:

void *test(long N) {
return new int[N];
}

int main() {
test(1L << 62);
}

We do this even when exceptions are disabled, because it is better for the
code to abort than for the attack to succeed.

This is heavily based on a patch that Fariborz wrote.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
6ba9aaed5eb612402d69117a0b63351272b4ae2e 20-Jul-2010 Chris Lattner <sabre@nondot.org> delete a loop that just generates dead code. In an example
like this:

void *test(long N) {
return new int[N][42][42];
}

the loop generates two dead mul instructions:

%tmp = load i64* %N.addr ; <i64> [#uses=2]
%0 = mul i64 %tmp, 7056 ; <i64> [#uses=1]
%1 = mul i64 %tmp, 42 ; <i64> [#uses=1]
%2 = mul i64 %1, 42 ; <i64> [#uses=0]
%call = call noalias i8* @_Znam(i64 %0) ; <i8*> [#uses=1]

The scale of these multiplies is already handled by the typesize stuff.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
defe8b263aebd0dfdbe15478ad7bd832b4345ac9 20-Jul-2010 Chris Lattner <sabre@nondot.org> remove the special case for constant array sizes from
EmitCXXNewAllocSize. This code uses IRBuilder, which does
constant folding already.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
ed8abf18329df67b0abcbb3a10458bd8c1d2a595 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Reinstate the fix for PR7556. A silly use of isTrivial() was
suppressing copies of objects with trivial copy constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
84745677f64863e025a6733cb29d0b94bc3a6ae2 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Revert r107828 and r107827, the fix for PR7556, which seems to be
breaking bootstrap on Linux.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
63ef464c3fad1e8b9f9360baa6c81f974b712e90 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Do not use CXXZeroValueInitExpr for class types. Instead, use
CXXConstructExpr/CXXTemporaryObjectExpr/CXXNewExpr as
appropriate. Fixes PR7556, and provides a slide codegen improvement
when copy-initializing a POD class type from a value-initialized
temporary. Previously, we weren't eliding the copy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
1d110e05e0ff48c1c7a483d6b7fd094cdf28316a 01-Jul-2010 Douglas Gregor <dgregor@apple.com> Remove unnecessary ASTContext parameter from
CXXRecordDecl::getDestructor(); no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
5304c953c1ccba4772ee77ce6526fff14ef5a16c 25-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Minor change to my last patch to fix PR7490.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
ef66872797e46ced3ffdb428e582bc7f00474f99 25-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> IRGen for trivial initialization of dynamiccaly allocated
array of other done c++ objects. Fixes PR7490.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
55bcace250e1ff366e4482714b344b8cbc8be5f3 16-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Patch adds support for copying of those
objective-c++ class objects which have GC'able objc object
pointers and need to use ObjC's objc_memmove_collectable
API (radar 8070772).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
842ddd0391eb799edfed05f0c5019d6f720d2c37 20-May-2010 Fariborz Jahanian <fjahanian@apple.com> Adds support for generation of objc_memmove_collectable API
in Objective-C++ mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
1d49f2112572c247ff9c209de112fbf5d9ecf765 20-May-2010 Fariborz Jahanian <fjahanian@apple.com> Copy construction of non-trivial properties must not
be turned into a setter call (fixes radar 8008649).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
c9a8fa4e4df099cf0addc55d9ba513926588a0fb 16-May-2010 Fariborz Jahanian <fjahanian@apple.com> Minor twik to my last patch. (for radar 7986354).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
0ca0b1f4b4a73e888c42c930dab464885afcd09a 16-May-2010 Fariborz Jahanian <fjahanian@apple.com> Fix API gen for objc_msgSend property of aggregate types
in Objective-c++ mode. Fixes radar 7986354.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
3c9034cb7ff1d6c1e4ecd1b44c98f553df013c7c 15-May-2010 Douglas Gregor <dgregor@apple.com> Recognize when the named return value optimization applies in a
"return" statement and mark the corresponding CXXConstructExpr as
elidable. Teach CodeGen that eliding a temporary is different from
eliding an object construction.

This is just a baby step toward NRVO.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
485ee32d93d9f955ef1fb7239a0871c8a68a1867 14-May-2010 Douglas Gregor <dgregor@apple.com> When a failed dynamic_cast<T&> (which is an lvalue) results in a
throw, it should use invoke when needed. The fixes the
Boost.Statechrt failures that motivated PR7132, but there are a few
side issues to tackle as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
b3ebe946d3bf1e06d3ccbecd11cc16c75b128342 11-May-2010 Fariborz Jahanian <fjahanian@apple.com> Objective-C++ Code gen. Handle code gen. for property
reference dot-syntax notation in a varierty of cases.
Fixes radar 7964490.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
100b3b915335834715afc81a3911b77668e215b2 07-May-2010 Fariborz Jahanian <fjahanian@apple.com> Minor mod. to my last patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
bbb5224710ded82014b0be9ba8651da312613d02 07-May-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a Code gen crash trying to use a dot-syntax for
a property of a c++ class object (radar 7957369).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
e99bdb6969ec16d2829ccdf62b04a8c8eda8b215 03-May-2010 Anders Carlsson <andersca@mac.com> Don't build an aggregate constructor loop when the constructor is trivial.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
8e6404ca28d6bbb76e97ea2a53a74816c2a74665 03-May-2010 Anders Carlsson <andersca@mac.com> Add the same 'ForVirtualBase' parameter to EmitCXXDestructorCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
155ed4a23366f4514befb1c9f5f89d16f8b8b6db 03-May-2010 Anders Carlsson <andersca@mac.com> Revert my last change and add a 'ForVirtualBase' parameter to EmitCXXConstructorCall instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
24eb78e38aba55c507bc3c05c37035a9ab2defa7 03-May-2010 Anders Carlsson <andersca@mac.com> Pass the construction kind down to EmitCXXConstructorCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
43db20e9550ecf2b215ddb76eaff82a3b466de96 01-May-2010 Anders Carlsson <andersca@mac.com> Simplify EmitClassAggrMemberwiseCopy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
046c294a43024874ff35656c6e785b64e72f1f36 17-Apr-2010 Anders Carlsson <andersca@mac.com> Vtable -> VTable renames across the board.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
2f59979a7cc7929f53c9984423b0abeb83113442 02-Apr-2010 Douglas Gregor <dgregor@apple.com> Rework our handling of copy construction of temporaries, which was a
poor (and wrong) approximation of the actual rules governing when to
build a copy and when it can be elided.

The correct implementation is actually simpler than the
approximation. When we only enumerate constructors as part of
initialization (e.g., for direct initialization or when we're copying
from a class type or one of its derived classes), we don't create a
copy. When we enumerate all conversion functions, we do create a
copy. Before, we created some extra copies and missed some
others. The new test copy-initialization.cpp shows a case where we
missed creating a (required, non-elidable) copy as part of a
user-defined conversion, which resulted in a miscompile. This commit
also fixes PR6757, where the missing copy made us reject well-formed
code in the ternary operator.

This commit also cleans up our handling of copy elision in the case
where we create an extra copy of a temporary object, which became
necessary now that we produce the right copies. The code that seeks to
find the temporary object being copied has moved into
Expr::getTemporaryObject(); it used to have two different
not-quite-the-same implementations, one in Sema and one in CodeGen.

Note that we still do not attempt to perform the named return value
optimization, so we miss copy elisions for return values and throw
expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100196 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
264ba48dc98f3f843935a485d5b086f7e0fdc4f1 30-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> the big refactoring bits of PR3782.

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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
ceb43b662bf09b44a08714e8f9d222780ca979d7 24-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Code gen for multi-dimensional dynamic allocations.
Fixes PR6641.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
195337d2e5d4625ae9dc1328c7cdbc7115b0261b 09-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Add CreateMemTemp, for creating an temporary memory object for a particular type, and flood fill. - CreateMemTemp sets the alignment on the alloca correctly, which fixes a great many places in IRgen where we were doing the wrong thing.

- This fixes many many more places than the test case, but my feeling is we need to audit alignment systematically so I'm not inclined to try hard to test the individual fixes in this patch. If this bothers you, patches welcome!

PR6240.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
04a67a6aa3dfdc92d57f7f8d93ba397348c868a4 05-Feb-2010 John McCall <rjmccall@apple.com> Standardize the parsing of function type attributes in a way that
follows (as conservatively as possible) gcc's current behavior: attributes
written on return types that don't apply there are applied to the function
instead, etc. Only parse CC attributes as type attributes, not as decl attributes;
don't accepet noreturn as a decl attribute on ValueDecls, either (it still
needs to apply to other decls, like blocks). Consistently consume CC/noreturn
information throughout codegen; enforce this by removing their default values
in CodeGenTypes::getFunctionInfo().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
ea48522e979957889fdaaa550beb4385601f66d3 05-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix some CreateTempAlloca calls to use ConvertTypeForMem when that is
conceptually correct. Review appreciated (Chris, Eli, Anders).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
51591bed1050827c23691cf36e2e1621dfe08b00 04-Feb-2010 Anders Carlsson <andersca@mac.com> Fix another pointer-to-member function miscompile, this time when trying to call a virtual member function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
321725d95d331d1612ac386d7d4235eca94b0021 03-Feb-2010 Douglas Gregor <dgregor@apple.com> Provide a real fix for PR6199, reverting the old workaround. Here, we
realize that CXXConstructExpr is always implicit, so we should just
return its argument (if there is only one) rather than directly
invoking the constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
2e13db8bc64bc99922b0aeb45443c681c1643c82 02-Feb-2010 Anders Carlsson <andersca@mac.com> Check in a test case and a nasty workaround for PR6199.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
6997aae42800d95a1189a6186af438feb19ecc54 31-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Switch expressions like T() and T(1,2) over to new-style initialization. I'm
not quite sure what we want to do about the AST representation; comments
welcome.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
9db7dbb918ca49f4ee6c181e4917e7b6ec547353 31-Jan-2010 Douglas Gregor <dgregor@apple.com> Rework base and member initialization in constructors, with several
(necessarily simultaneous) changes:

- CXXBaseOrMemberInitializer now contains only a single initializer
rather than a set of initialiation arguments + a constructor. The
single initializer covers all aspects of initialization, including
constructor calls as necessary but also cleanup of temporaries
created by the initializer (which we never handled
before!).

- Rework + simplify code generation for CXXBaseOrMemberInitializers,
since we can now just emit the initializer as an initializer.

- Switched base and member initialization over to the new
initialization code (InitializationSequence), so that it

- Improved diagnostics for the new initialization code when
initializing bases and members, to match the diagnostics produced
by the previous (special-purpose) code.

- Simplify the representation of type-checked constructor initializers in
templates; instead of keeping the fully-type-checked AST, which is
rather hard to undo at template instantiation time, throw away the
type-checked AST and store the raw expressions in the AST. This
simplifies instantiation, but loses a little but of information in
the AST.

- When type-checking implicit base or member initializers within a
dependent context, don't add the generated initializers into the
AST, because they'll look like they were explicit.

- Record in CXXConstructExpr when the constructor call is to
initialize a base class, so that CodeGen does not have to infer it
from context. This ensures that we call the right kind of
constructor.

There are also a few "opportunity" fixes here that were needed to not
regress, for example:

- Diagnose default-initialization of a const-qualified class that
does not have a user-declared default constructor. We had this
diagnostic specifically for bases and members, but missed it for
variables. That's fixed now.

- When defining the implicit constructors, destructor, and
copy-assignment operator, set the CurContext to that constructor
when we're defining the body.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
4f122ef0ca7683486d78c84ed87455d5f35ee1b1 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Convert one last size variable to CharUnits (follow-on to 94577).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
caf647c33ad74621c352c21d6c50d149ba49e89d 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Use CharUnits for sizes, offsets, alignments, and padding amounts for values
that are in character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
c997d4278d329e18891aac9698fb991b2d4622eb 02-Jan-2010 Anders Carlsson <andersca@mac.com> Correctly pass VTT parameters to constructors and destructors. The VTTs aren't yet used in the ctors/dtors, but that will follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
3b5ad2283c999f6edf7d42332a655447b7386b2e 01-Jan-2010 Anders Carlsson <andersca@mac.com> Move a few more functions away from CGCXX and to CGClass and CGExprCXX.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
54d76db0aa7107597cac0b80d8e138a37e6d1de9 25-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove some dead variables clang-analyzer found.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
a1736c0c750d4514a5d8fda36670addf1e4de54a 24-Dec-2009 Anders Carlsson <andersca@mac.com> Pass the return value slot to all call exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
f3c47c9525153aea2de0ec4bd615b9cf2d81c103 24-Dec-2009 Anders Carlsson <andersca@mac.com> Pass ReturnValueSlot to EmitCall. No functionality change yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
154fe9812faddcd94568a64aee5f3cb0d47003d9 23-Dec-2009 Douglas Gregor <dgregor@apple.com> There is no such thing as typeinfo for a cv-qualified type. Assert
that this is true when mangling, then fix up the various places in
Sema and/or CodeGen that need to remove qualifiers. Addresses a
linking issue when building LLVM with Clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
6f0e485a5cc120c5b30f5a5d11b2784de0c9c767 18-Dec-2009 Anders Carlsson <andersca@mac.com> Fix regression I introduced when dynamic_cast-ing to a reference type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
1d7088d1d9dc99e5478c0184a3e21cafef2a0b53 17-Dec-2009 Anders Carlsson <andersca@mac.com> Rename GetAddrOfRTTI to GetAddrOfRTTIDescriptor. Remove the overload that takes a CXXRecordDecl since we were just creating a QualType from it anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
e8e4a1c0bf2e3dd26dd0721a102307bbb589e96a 16-Dec-2009 Anders Carlsson <andersca@mac.com> Use GetAddrOfRTTI everywhere and remove GenerateRTTI and GenerateRTTIRef. With this change, we can now compile and link TableGen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
dd9375513db874caadaeff62ef10becbe32bd7fb 13-Dec-2009 Anders Carlsson <andersca@mac.com> Don't use a cookie if the global placement new function is used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
710f7058400e0e5accae0ce92e9c1fbfd0c15232 13-Dec-2009 Anders Carlsson <andersca@mac.com> Fix regression in my last commit - if a struct has a trivial destructor but no usual deallocation function we don't need a cookie.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
871d078f5ae5505553c02deeabdd4b83b4820211 13-Dec-2009 Anders Carlsson <andersca@mac.com> More array cookie improvements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91247 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
6153710ee3e7dc3014d5fb992bfb77d4af56ccac 13-Dec-2009 Anders Carlsson <andersca@mac.com> If the usual array deallocation function of a class takes two arguments, we need to pass the number of bytes allocated to the deallocation function, just not the number of bytes in a single element.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91246 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
31b7f52d8c8d459e80d2a72176cc7fcc4b7d8d38 11-Dec-2009 Anders Carlsson <andersca@mac.com> Improve linkage of RTTI data structures. Introduce CodeGenModule::GetAddrOfRTTI which figures out the right linkage of the RTTI information for the given type and whether it should be defined or not. I will migrate clients over to GetAddrOfRTTI in subsequent commits (with tests).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
de05057932cebc3f43911f87d75869cb7b705a19 02-Dec-2009 Mike Stump <mrs@apple.com> Change rtti/Rtti to RTTI, as it is an acronym.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
5d4d946ec2d88696fd8422aeb64dc29688e6a2c1 24-Nov-2009 Anders Carlsson <andersca@mac.com> Handle cases where we're constructing an array of objects and the constructor has default arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp
5b955920c1d8f2cd35aae3c85b656578286a8bc1 24-Nov-2009 Anders Carlsson <andersca@mac.com> Get rid of the ugly CGCXX names and replace them with CGClass, CGExprCXX and CGTemporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGExprCXX.cpp