summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix delegating constructors stylistic issues.Alexis Hunt2011-05-031-8/+16
| | | | | | Material bugfixes to come this afternoon. llvm-svn: 130782
* Switch CallArgList from an std::pair to a new CallArg struct (which will ↵Eli Friedman2011-05-021-2/+2
| | | | | | eventually gain more members). Working towards modifying call emission to avoid unnecessary copies. llvm-svn: 130700
* Simplify code a bit by using CallArgList::add. No intended functionality ↵Eli Friedman2011-05-021-15/+14
| | | | | | change. llvm-svn: 130699
* Fully implement delegating constructors!Alexis Hunt2011-05-011-3/+10
| | | | | | | | | | 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. llvm-svn: 130642
* Cut down unnecessary zero'ing when value-initializing arrays of C++ objects.Argyrios Kyrtzidis2011-04-281-2/+3
| | | | | | | -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. llvm-svn: 130453
* Make yet another placeholder type, this one marking that an expression is a ↵John McCall2011-04-261-4/+3
| | | | | | | | | | | 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. llvm-svn: 130239
* Clean up code generation of typeid expressions and add C++ standard references.Anders Carlsson2011-04-181-37/+53
| | | | llvm-svn: 129682
* Use EmitCallOrInvoke in EmitBadTypeidCall and EmitBadCastCall.Anders Carlsson2011-04-131-16/+6
| | | | llvm-svn: 129424
* If there's an invoke destination, we should use invoke instead of call when ↵Anders Carlsson2011-04-111-7/+25
| | | | | | calling the __cxa_bad_typeid function. Fixes PR7400. llvm-svn: 129273
* More __unknown_anytype work.John McCall2011-04-111-3/+5
| | | | llvm-svn: 129269
* When we know that a dynamic_cast always returns null, we can makeAnders Carlsson2011-04-111-10/+32
| | | | | | | CodeGenFunction::EmitDynamicCast always return null or throw a bad_cast exception. llvm-svn: 129264
* Clean up CodeGenFunction::EmitDynamicCast. No functionality change.Anders Carlsson2011-04-111-104/+141
| | | | llvm-svn: 129262
* Replace a couple of Builder.CreateICmpEQ with Builder.CreateIsNull. No ↵Anders Carlsson2011-04-111-3/+1
| | | | | | functionality change. llvm-svn: 129261
* Strip off parens and no-op casts when deciding if an expr can be ↵Anders Carlsson2011-04-101-0/+26
| | | | | | devirtualized. Fixes the second half of PR9660. llvm-svn: 129253
* Make sure we or together the overflow flags of the multiply and add, so theEli Friedman2011-04-091-1/+1
| | | | | | check is triggered appropriately. Reported on cfe-dev. llvm-svn: 129231
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-4/+2
| | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128538
* Instead of storing an ASTContext* in FunctionProtoTypes with computed ↵Sebastian Redl2011-03-131-1/+1
| | | | | | noexcept specifiers, unique FunctionProtoTypes with a ContextualFoldingSet, as suggested by John McCall. llvm-svn: 127568
* Propagate the new exception information to FunctionProtoType.Sebastian Redl2011-03-121-1/+1
| | | | | | | | 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. llvm-svn: 127537
* 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
OpenPOWER on IntegriCloud