summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Switch the Alignment argument on AggValueSlot over to CharUnits, per John's ↵Eli Friedman2011-12-031-3/+3
| | | | | | review comment. llvm-svn: 145741
* Track alignment in AggValueSlot. No functional change in this patch, but ↵Eli Friedman2011-12-031-1/+1
| | | | | | I'll be introducing uses of the specified alignment soon. llvm-svn: 145736
* Whenever explicitly activating or deactivating a cleanup, weJohn McCall2011-11-101-6/+14
| | | | | | | | | | 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. llvm-svn: 144276
* PR11124: Don't overwrite memory outside of a base class when performing ↵Eli Friedman2011-10-141-2/+56
| | | | | | zero-initialization before running its constructor. llvm-svn: 141933
* CUDA: IR generation support for kernel call expressionsPeter Collingbourne2011-10-061-0/+6
| | | | llvm-svn: 141300
* Rewrite this loop to use partial destruction; I'm not sure it'sJohn McCall2011-09-151-59/+75
| | | | | | | | 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. llvm-svn: 139788
* Rearrange code so that we pass the right pointer to delete[] when an ↵Eli Friedman2011-09-061-9/+9
| | | | | | exception is thrown constructing the array elements in an array new expression. Fixes PR10870. llvm-svn: 139158
* When performing a derived-to-base cast on the right-hand side of theDouglas Gregor2011-09-061-10/+6
| | | | | | | | | | | | | | | | synthesized move assignment within an implicitly-defined move assignment operator, be sure to treat the derived-to-base cast as an xvalue (rather than an lvalue). Otherwise, we'll end up getting the wrong constructor. Optimize a direct call to a trivial move assignment operator to an aggregate copy, as we do for trivial copy assignment operators, and update the the assertion in CodeGenFunction::EmitAggregateCopy() to cope with this optimization. Fixes PR10860. llvm-svn: 139143
* Declare and define implicit move constructor and assignment operator.Sebastian Redl2011-08-301-4/+5
| | | | | | | | | 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. llvm-svn: 138821
* Since the 'is aliased' bit is critical for correctness in C++, itJohn McCall2011-08-261-1/+2
| | | | | | | | | really shouldn't be optional. Fix the remaining place where a temporary was being passed as potentially-aliased memory. Fixes PR10756. llvm-svn: 138627
* Use stronger typing for the flags on AggValueSlot and requireJohn McCall2011-08-251-1/+3
| | | | | | | creators to tell us whether something needs GC barriers. No functionality change. llvm-svn: 138581
* PR10566: Make sure codegen for deleting an pointer to an incomplete type ↵Eli Friedman2011-08-021-1/+1
| | | | | | actually works. llvm-svn: 136703
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-1/+1
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to useJay Foad2011-07-221-1/+1
| | | | | | ArrayRef. llvm-svn: 135761
* de-constify llvm::Type, patch by David Blaikie!Chris Lattner2011-07-181-17/+17
| | | | llvm-svn: 135370
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-151-2/+2
| | | | llvm-svn: 135265
* Change intrinsic getter to take an ArrayRef, now that the underlying ↵Benjamin Kramer2011-07-141-6/+2
| | | | | | function in LLVM does. llvm-svn: 135155
* Okay, that rule about zero-length arrays applies to destroyingJohn McCall2011-07-131-15/+5
| | | | | | them, too. llvm-svn: 135038
* Arrays are permitted to be zero-length in some situations.John McCall2011-07-131-26/+0
| | | | llvm-svn: 135036
* Convert the standard default-construction loops to use phis andJohn McCall2011-07-131-12/+30
| | | | | | partial destruction. llvm-svn: 135033
* Switch delete[] IR-generation over to the destroy framework,John McCall2011-07-131-78/+38
| | | | | | which implicitly makes it EH-safe as well. llvm-svn: 135025
* When compiling ::delete for a class with a virtual destructor, callDouglas Gregor2011-07-131-4/+19
| | | | | | | | 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. llvm-svn: 135021
* Generalize Cleanup::Emit's "isForEH" parameter into a setJohn McCall2011-07-121-4/+4
| | | | | | of flags. No functionality change. llvm-svn: 134997
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-091-5/+5
| | | | llvm-svn: 134831
* Restore correct use of GC barriers.John McCall2011-06-161-3/+3
| | | | llvm-svn: 133144
* Automatic Reference Counting.John McCall2011-06-151-5/+85
| | | | | | | | | | 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. llvm-svn: 133103
* Introduce Type::isSignedIntegerOrEnumerationType() andDouglas Gregor2011-05-201-1/+2
| | | | | | | | | | | | | 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>. llvm-svn: 131735
* Don't actually emit calls to the reserved global placement new and deleteJohn McCall2011-05-161-28/+18
| | | | | | | | | operators; their semantics are guaranteed by the language. If someone wants to argue that freestanding compiles shouldn't recognize this, I might be convinceable. llvm-svn: 131395
* The array-size operand to a new-expression is not necessarily a size_t.John McCall2011-05-151-140/+209
| | | | | | | It can be larger, it can be smaller, it can be signed, whatever. Handle all the crazy cases with grace and spirit. llvm-svn: 131378
* Rename "hasTrivialConstructor" to "hasTrivialDefaultConstructor" andAlexis Hunt2011-05-091-1/+1
| | | | | | | modify the semantics slightly to accomodate default constructors (I hope). llvm-svn: 131087
* Move code to emit the callee of an CXXOperatorCallExpr out into a separate ↵Anders Carlsson2011-05-081-12/+1
| | | | | | function in CGClass.cpp llvm-svn: 131075
* Fix false positive warning about uninitialized variable.Cameron Esfahani2011-05-061-1/+1
| | | | llvm-svn: 131019
* 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
OpenPOWER on IntegriCloud