summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGClass.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [Reapply r128776, modified so that it does not break debug info.]Ken Dyck2011-04-071-2/+3
| | | | | | | Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() to CharUnits. No change in functionality intended. llvm-svn: 129072
* Revert r128770, r128771, r128773 and r128776 for now. It breaks debug info.Devang Patel2011-04-041-3/+2
| | | | llvm-svn: 128842
* Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() toKen Dyck2011-04-021-2/+3
| | | | | | CharUnits. No change in functionality intended. llvm-svn: 128776
* 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
* Convert the BaseOffset member of BaseSubobject to CharUnits from bits. NoKen Dyck2011-03-241-11/+8
| | | | | | change in functionality intended. llvm-svn: 128190
* Convert OffsetFromNearestVBast parameter of InitializeVTablePointer(s) toKen Dyck2011-03-231-12/+13
| | | | | | CharUnits. No change in functionality intended. llvm-svn: 128129
* Convert NonVirtual parameter of ApplyNonVirtualAndVirtualOffset() toKen Dyck2011-03-231-8/+11
| | | | | | CharUnits. No change in functionality intended. llvm-svn: 128126
* Convert Offset variable in GetAddressOfDirectBaseInCompleteClass() toKen Dyck2011-03-221-5/+5
| | | | | | CharUnits. No change in functionality intended. llvm-svn: 128060
* Change return value of ComputeNonVirtualBaseClassOffset() to CharUnits. NoKen Dyck2011-03-221-13/+13
| | | | | | change in functionality intended. llvm-svn: 128050
* Use a slightly more semantic interface for emitting call arguments.John McCall2011-03-111-10/+4
| | | | llvm-svn: 127494
* Use the "undergoes default argument promotion" bit on parameters toJohn McCall2011-03-091-5/+4
| | | | | | | | | | simplify the logic of initializing function parameters so that we don't need both a variable declaration and a type in FunctionArgList. This also means that we need to propagate the CGFunctionInfo down in a lot of places rather than recalculating it from the FAL. There's more we can do to eliminate redundancy here, and I've left FIXMEs behind to do it. llvm-svn: 127314
* Get rid of the areExceptionsEnabled() getter from LangOptions.Anders Carlsson2011-02-281-2/+2
| | | | llvm-svn: 126598
* A constructor call should force class's debug info even if ↵Devang Patel2011-02-221-0/+11
| | | | | | -flimit-debug-info is enabled. llvm-svn: 126246
* Add a LangOptions::areExceptionsEnabled and start using it.Anders Carlsson2011-02-201-2/+3
| | | | llvm-svn: 126062
* Reorganize CodeGen{Function,Module} to eliminate the unfortunateJohn McCall2011-02-081-3/+0
| | | | | | | | 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-1/+2
| | | | llvm-svn: 124807
* -fapple-kext, elimination of all direct calls to virtual dtors.Fariborz Jahanian2011-02-021-0/+4
| | | | llvm-svn: 124757
* -fapple-kext support for indirect call to virtuals dtors - wip.Fariborz Jahanian2011-02-011-1/+6
| | | | llvm-svn: 124701
* Make emitting a VTT a two-step process, much like emitting a VTable. You ↵Anders Carlsson2011-01-291-1/+1
| | | | | | first get the address of the VTT, and then pass it to EmitVTTDefinition. llvm-svn: 124539
* When doing a derived-to-base class through a virtual class, we don't have to ↵Anders Carlsson2011-01-291-2/+11
| | | | | | get the vbase offset from the vtable if the derived class is marked final. llvm-svn: 124523
* Renamed CXXBaseOrMemberInitializer to CXXCtorInitializer. This is both shorter,Alexis Hunt2011-01-081-6/+6
| | | | | | | more accurate, and makes it make sense for it to hold a delegating constructor call. llvm-svn: 123084
* More anonymous struct/union redesign. This one deals with anonymous field ↵Francois Pichet2010-12-041-6/+6
| | | | | | | | | | | | | | | | used in a constructor initializer list: struct X { X() : au_i1(123) {} union { int au_i1; float au_f1; }; }; clang will now deal with au_i1 explicitly as an IndirectFieldDecl. llvm-svn: 120900
* Block API patch to do copy ctor of copied-in cxx objects inFariborz Jahanian2010-11-131-0/+58
| | | | | | | | copy helper function and dtor of copied cxx objects in dispose helper functions. __block variables TBD next. llvm-svn: 119011
* Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a ↵Anders Carlsson2010-10-311-7/+9
| | | | | | getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset. llvm-svn: 117881
* Factor out the code for emitting code to load vtable pointer membersDan Gohman2010-10-261-4/+7
| | | | | | so that it's done in one place. llvm-svn: 117386
* Death to blocks, or at least the word "block" in one particular obnoxiouslyJohn McCall2010-10-151-1/+1
| | | | | | ambiguous context. llvm-svn: 116567
* Currently we're initializing the vtable pointers of a class only afterJohn McCall2010-09-171-0/+30
| | | | | | | | | | | | | | | the bases are completely initialized. This won't work --- base initializer expressions can rely on the vtables having been set up. Check for uses of 'this' in the initializers and force a vtable initialization if found. This might not be good enough; we might need to extend this to handle the possibility of arbitrary code finding an external reference to this (not yet completely-constructed!) object and accessing through it, in which case we'll probably find ourselves doing a lot more unnecessary stores. llvm-svn: 114153
* one piece of code is responsible for the lifetime of every aggregateJohn McCall2010-09-151-5/+7
| | | | | | | | | | | | | 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
* IRgen: Switch a bunch of trivial MakeAddr calls to use MakeAddrLValue.Daniel Dunbar2010-08-211-1/+1
| | | | llvm-svn: 111716
* Emit a stop point for delegate constructor call. This gives user a chance to ↵Devang Patel2010-08-111-0/+3
| | | | | | step into constructor body. llvm-svn: 110853
* Store inheritance paths after CastExprs instead of inside them.John McCall2010-08-071-15/+18
| | | | | | | | | | | | | | | This takes some trickery since CastExpr has subclasses (and indeed, is abstract). Also, smoosh the CastKind into the bitfield from Expr. Drops two words of storage from Expr in the common case of expressions which don't need inheritance paths. Avoids a separate allocation and another word of overhead in cases needing inheritance paths. Also has the advantage of not leaking memory, since destructors for AST nodes are never run. llvm-svn: 110507
* Rename LazyCleanup -> Cleanup. No functionality change for these last threeJohn McCall2010-07-211-20/+20
| | | | | | commits. llvm-svn: 109000
* Switch the destructor for a temporary arising from a reference binding over toJohn McCall2010-07-211-2/+6
| | | | | | using a lazy cleanup. llvm-svn: 108994
* Implement proper base/member destructor EH chaining.John McCall2010-07-211-151/+170
| | | | llvm-svn: 108989
* Change PushDestructorCleanup to use lazy cleanups.John McCall2010-07-211-8/+16
| | | | llvm-svn: 108979
* Convert the EH cleanups for base and member destructors in a constructor intoJohn McCall2010-07-211-18/+42
| | | | | | lazy cleanups. llvm-svn: 108978
* Implement zero-initialization for array new when there is anDouglas Gregor2010-07-211-6/+17
| | | | | | | | | 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. llvm-svn: 108977
* Teach IR generation how to lazily emit cleanups. This has a lot of advantages,John McCall2010-07-131-2/+2
| | | | | | | | | | | | | | | mostly in avoiding unnecessary work at compile time but also in producing more sensible block orderings. Move the destructor cleanups for local variables over to use lazy cleanups. Eventually all cleanups will do this; for now we have some awkward code duplication. Tell IR generation just to never produce landing pads in -fno-exceptions. This is a much more comprehensive solution to a problem which previously was half-solved by checks in most cleanup-generation spots. llvm-svn: 108270
* Teach function-try-blocks on constructors and destructors to implicitlyJohn McCall2010-07-071-7/+4
| | | | | | rethrow. Fixes rdar://problem/7696603 llvm-svn: 107757
* Validated by nightly-test runs on x86 and x86-64 darwin, including afterJohn McCall2010-07-061-34/+49
| | | | | | | | | | | | | | | | | | | | | | | | self-host. Hopefully these results hold up on different platforms. I tried to keep the GNU ObjC runtime happy, but it's hard for me to test. Reimplement how clang generates IR for exceptions. Instead of creating new invoke destinations which sequentially chain to the previous destination, push a more semantic representation of *why* we need the cleanup/catch/filter behavior, then collect that information into a single landing pad upon request. Also reorganizes how normal cleanups (i.e. cleanups triggered by non-exceptional control flow) are generated, since it's actually fairly closely tied in with the former. Remove the need to track which cleanup scope a block is associated with. Document a lot of previously poorly-understood (by me, at least) behavior. The new framework implements the Horrible Hack (tm), which requires every landing pad to have a catch-all so that inlining will work. Clang no longer requires the Horrible Hack just to make exceptions flow correctly within a function, however. The HH is an unfortunate requirement of LLVM's EH IR. llvm-svn: 107631
* Remove unnecessary ASTContext parameter fromDouglas Gregor2010-07-011-6/+6
| | | | | | CXXRecordDecl::getDestructor(); no functionality change. llvm-svn: 107394
* Change EmitReferenceBindingToExpr to take a decl instead of a boolean.Anders Carlsson2010-06-261-2/+1
| | | | llvm-svn: 106949
* Move GenerateCXXAggrDestructorHelper to CGDeclCXX.cpp where it belongs.Anders Carlsson2010-06-081-38/+0
| | | | llvm-svn: 105647
* Simplify GenerateCXXAggrDestructorHelper.Anders Carlsson2010-06-081-20/+13
| | | | llvm-svn: 105646
* Don't intentionally try to ignore the value of a scalar expression when weEli Friedman2010-06-031-1/+1
| | | | | | actually care about it. Fixes PR7291. llvm-svn: 105404
* Correctly pass aggregates by reference when emitting thunks.John McCall2010-05-261-26/+1
| | | | llvm-svn: 104778
* Re-land the fix for PR7139.Anders Carlsson2010-05-221-1/+1
| | | | llvm-svn: 104446
* Unbreak self-host.Anders Carlsson2010-05-211-1/+1
| | | | llvm-svn: 104390
* Rename CodeGenFunction::EmitMemSetToZero to EmitNullInitialization. Handle ↵Anders Carlsson2010-05-211-1/+1
| | | | | | setting null data member pointers correctly. Fixes PR7139. llvm-svn: 104387
* When emitting an lvalue for an anonymous struct or union member duringJohn McCall2010-05-211-2/+4
| | | | | | | class initialization, drill down through an arbitrary number of anonymous records. llvm-svn: 104310
OpenPOWER on IntegriCloud