summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Use a slightly more semantic interface for emitting call arguments.John McCall2011-03-111-6/+2
| | | | llvm-svn: 127494
* The conditional needs to be pushed before the branch. Make the test lessJohn McCall2011-03-071-78/+81
| | | | | | trivial to check this. Adjust for style. llvm-svn: 127151
* An operator new with an empty exception specifier returns null on a badJohn McCall2011-03-071-0/+8
| | | | | | | | 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. llvm-svn: 127147
* Revert "Add CC_Win64ThisCall and set it in the necessary places."Tilmann Scheller2011-03-021-21/+9
| | | | | | This reverts commit 126863. llvm-svn: 126886
* Add CC_Win64ThisCall and set it in the necessary places.Tilmann Scheller2011-03-021-9/+21
| | | | llvm-svn: 126863
* Reorganize CodeGen{Function,Module} to eliminate the unfortunateJohn McCall2011-02-081-17/+11
| | | | | | | | Block{Function,Module} base class. Minor other refactorings. Fixed a few address-space bugs while I was there. llvm-svn: 125085
* Clean up of -fapple-kext abi code. No change otherwise.Fariborz Jahanian2011-02-031-2/+2
| | | | llvm-svn: 124807
* -fapple-kext support for indirect call to virtuals dtors - wip.Fariborz Jahanian2011-02-011-1/+6
| | | | llvm-svn: 124701
* When trying to get the most derived class, don't assume that we can ignore ↵Anders Carlsson2011-01-291-1/+17
| | | | | | all casts. We can only ignore derived-to-base and no-op casts. Fixes selfhost. llvm-svn: 124528
* When calling a virtual member function on a base class and the most derived ↵Anders Carlsson2011-01-291-1/+24
| | | | | | class is marked 'final', we can devirtualize the call. llvm-svn: 124524
* More work to support -fapple-kext regarding Fariborz Jahanian2011-01-281-0/+1
| | | | | | | indirect vf calls and addition of extra entry at bottom of vtbls. llvm-svn: 124507
* Move all the cleanups framework code into a single file.John McCall2011-01-281-65/+0
| | | | | | Pure motion. llvm-svn: 124484
* Reorganize the value-dominance metaprogram and introduce a specializationJohn McCall2011-01-281-90/+57
| | | | | | for CodeGen's RValue type. llvm-svn: 124483
* Convert the exception-freeing cleanup over to the conditional cleanups code,John McCall2011-01-281-1/+3
| | | | | | | | | 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. llvm-svn: 124481
* Do a proper recursive lookup when deciding whether a class's usualJohn McCall2011-01-271-5/+6
| | | | | | | | | deallocation function has a two-argument form. Store the result of this check in new[] and delete[] nodes. Fixes rdar://problem/8913519 llvm-svn: 124373
* Use attributes for all the override control specifiers.Anders Carlsson2011-01-241-2/+2
| | | | llvm-svn: 124122
* Get rid of the [[final]] C++0x attribute.Anders Carlsson2011-01-231-5/+5
| | | | llvm-svn: 124083
* Move cheking of kext into canDevirtualizeMemberFunctionCalls().Fariborz Jahanian2011-01-211-15/+16
| | | | | | Improve on test case. Per Doug's comment. wip. llvm-svn: 123954
* apple kext abi requires all vf calls, including qualifiedFariborz Jahanian2011-01-201-3/+14
| | | | | | vf calls, be made indirect. This patch is towards that goal. llvm-svn: 123922
* Replace calls to getTypeSize() and getTypeAlign() with their 'InChars' Ken Dyck2011-01-191-1/+2
| | | | | | counterparts where char units are needed. llvm-svn: 123805
* Add support for explicit constructor calls in Microsoft mode.Francois Pichet2011-01-181-13/+35
| | | | | | | | | | | | | | | | | | | 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. llvm-svn: 123735
* Simplify mem{cpy, move, set} creation with IRBuilder.Benjamin Kramer2010-12-301-8/+3
| | | | llvm-svn: 122634
* PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() andJay Foad2010-12-071-4/+3
| | | | | | | | 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. llvm-svn: 121121
* Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoreticalJohn McCall2010-12-061-1/+1
| | | | | | reason this is limited to C++, and it's certainly not limited to temporaries. llvm-svn: 120996
* Remove some defensive calls to EmitLoadOfPropertyRefLValue that shouldn'tJohn McCall2010-12-041-32/+5
| | | | | | | be required, and then fix up some missing loads on overloaded-operator paths which that exposed. llvm-svn: 120896
* Kill the KVC l-value kind and calculate the base expression when emittingJohn McCall2010-12-041-13/+6
| | | | | | the l-value. llvm-svn: 120884
* IR Gen. part of API support for __block cxxFariborz Jahanian2010-12-021-2/+1
| | | | | | | | objects imported into blocks. //rdar://8594790. Will have a test case coming (as well as one sent to llvm test suite). llvm-svn: 120713
* Silence an unused variable warning during release builds by folding theChandler Carruth2010-11-151-3/+2
| | | | | | expression into the assert. llvm-svn: 119143
* Block API patch to do copy ctor of copied-in cxx objects inFariborz Jahanian2010-11-131-0/+27
| | | | | | | | copy helper function and dtor of copied cxx objects in dispose helper functions. __block variables TBD next. llvm-svn: 119011
* Also devirtualize calls to a member functions where the containing class has ↵Anders Carlsson2010-10-271-2/+7
| | | | | | been marked final. llvm-svn: 117445
* If a virtual member function has the 'final' attribute, we can devirtualize ↵Anders Carlsson2010-10-271-4/+11
| | | | | | calls to it. llvm-svn: 117444
* Factor out the code for emitting code to load vtable pointer membersDan Gohman2010-10-261-7/+4
| | | | | | so that it's done in one place. llvm-svn: 117386
* After discussion with Doug and John, I am revertingFariborz Jahanian2010-10-221-1/+0
| | | | | | the patch. llvm-svn: 117159
* Patch fixes miscompile with non-trivial copy constructors and Fariborz Jahanian2010-10-221-0/+1
| | | | | | statement expressions, //rdar: //8540501 llvm-svn: 117146
* Delay record type's debug info emission, in -flimit-debug-info mode, if ↵Devang Patel2010-10-221-1/+2
| | | | | | member expression's base is call expr. llvm-svn: 117127
* More class anonymization.Benjamin Kramer2010-10-221-0/+2
| | | | llvm-svn: 117106
* Introduce -flimit-debug-info.Devang Patel2010-09-301-0/+11
| | | | | | 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. llvm-svn: 115188
* Kill FunctionDecl's IsCopyAssignment bit; it duplicated what couldDouglas Gregor2010-09-271-2/+2
| | | | | | | | 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. llvm-svn: 114916
* Fix a bug with binding l-values to elided temporaries, and leave a coupleJohn McCall2010-09-181-3/+5
| | | | | | helpful asserts behind. llvm-svn: 114250
* When emitting a new-expression inside a conditional expression,John McCall2010-09-171-7/+198
| | | | | | | | | | | | | | | | 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. llvm-svn: 114145
* one piece of code is responsible for the lifetime of every aggregateJohn McCall2010-09-151-19/+17
| | | | | | | | | | | | | 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 llvm-svn: 113962
* Tweak this assert.John McCall2010-09-141-1/+1
| | | | llvm-svn: 113863
* Implement the EH cleanup to call 'operator delete' if a new-expression throwsJohn McCall2010-09-141-0/+76
| | | | | | (but not if destructors associated with the full-expression throw). llvm-svn: 113836
* IRGen fix for using property-dot syntax to pass Fariborz Jahanian2010-09-101-1/+9
| | | | | | | reference object to a c++ member function. fixes radar 8409336. llvm-svn: 113602
* Re-commit r112916 with an additional fix for the self-host failures.John McCall2010-09-031-18/+26
| | | | | | I've audited the remaining getFunctionInfo call sites. llvm-svn: 112936
* Revert r112916, it's breaking selfhost pretty badly.John McCall2010-09-031-24/+17
| | | | llvm-svn: 112925
* It's not safe to use the generic CXXMethodDecl overload of CGT::getFunctionInfoJohn McCall2010-09-031-17/+24
| | | | | | | to set up a destructor call, because ABIs can tweak these conventions. Fixes rdar://problem/8386802. llvm-svn: 112916
* Fix a few more ConvertTypes that should be ConvertTypeForMems, fixingDouglas Gregor2010-09-021-2/+3
| | | | | | two regressions in Boost.Config. llvm-svn: 112908
* Revert my two IRgen fixes for "bool", then use a far simpler approachDouglas Gregor2010-09-021-3/+2
| | | | | | | based on ConvertTypeForMem. Thanks to John for pointing out the right solution. llvm-svn: 112838
* Fix more i1/i8 pointer madness. Here, an overactive assertionDouglas Gregor2010-09-021-2/+3
| | | | | | | | | | | | 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. llvm-svn: 112821
OpenPOWER on IntegriCloud