summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.h
Commit message (Collapse)AuthorAge
...
* Give explicit template instantiations weak ODR linkage. FormerDouglas Gregor2010-03-13
| | | | | | | | | | iterations of this patch gave explicit template instantiation link-once ODR linkage, which permitted the back end to eliminate unused symbols. Weak ODR linkage still requires the symbols to be generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98441 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-revert the explicit template instantiation linkage patch. I am beginning ↵Douglas Gregor2010-03-13
| | | | | | to look incompetent git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98425 91177308-0d34-0410-b5e6-96231b3b80d8
* Reinstate patch to turn explicit template instantiations into weak symbolsDouglas Gregor2010-03-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98424 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the linkage change for explicit template instantiations; something is ↵Douglas Gregor2010-03-12
| | | | | | amiss git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98332 91177308-0d34-0410-b5e6-96231b3b80d8
* Give explicit template instantiations weak linkage (but don't deferDouglas Gregor2010-03-12
| | | | | | | them). Fixes PR6578. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98328 91177308-0d34-0410-b5e6-96231b3b80d8
* Delay codegen of vtables when handling implicit instantiations.Rafael Espindola2010-03-10
| | | | | | | | This fixes PR6474. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98123 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement __builtin_dwarf_sp_column for i386 (Darwin and not), x86-64 (all),John McCall2010-03-06
| | | | | | | | | and ARM. Implement __builtin_init_dwarf_reg_size_table for i386 (both) and x86-64 (all). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97859 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR6473.Rafael Espindola2010-03-04
| | | | | | | | | | | Clang's support for weakref is now better than llvm-gcc's :-) We don't introduce a new symbol and we correctly mark undefined references weak only if there is no definition or regular undefined references in the same file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97733 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert changes r97693, r97700, and r97718.John McCall2010-03-04
| | | | | | | | Our testing framework can't deal with disabled targets yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97719 91177308-0d34-0410-b5e6-96231b3b80d8
* Create a TargetMachine whenever we create a CodeGenAction. The codegen ofJohn McCall2010-03-04
| | | | | | | | some builtins will rely on target knowledge. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97693 91177308-0d34-0410-b5e6-96231b3b80d8
* Perform two more constructor/destructor code-size optimizations:John McCall2010-02-23
| | | | | | | | | | | | | | | | | | 1) emit base destructors as aliases to their unique base class destructors under some careful conditions. This is enabled for the same targets that can support complete-to-base aliases, i.e. not darwin. 2) Emit non-variadic complete constructors for classes with no virtual bases as calls to the base constructor. This is enabled on all targets and in theory can trigger in situations that the alias optimization can't (mostly involving virtual bases, mostly not yet supported). These are bundled together because I didn't think it worthwhile to split them, not because they really need to be. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96842 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-introduce the ctor/dtor alias optimization, this time hidden behind aJohn McCall2010-02-19
| | | | | | | | command-line option which defaults off. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96649 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the ctor/dtor alias optimization for now; the buildbots can detectJohn McCall2010-02-18
| | | | | | | | some failure here that I can't. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96612 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit complete constructors and destructors as aliases to base constructorsJohn McCall2010-02-17
| | | | | | | | | | and destructors when the two entities are semantically identical, i.e. when the class has no virtual base classes. We only do this for linkage types for which aliases are supported, i.e. internal and external, i.e. not linkonce. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96451 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the correct function info for constructors when applying function ↵Anders Carlsson2010-02-06
| | | | | | attributes. Fixes PR6245. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95474 91177308-0d34-0410-b5e6-96231b3b80d8
* Move pointer to data member emission to CodeGenModule and use it in ↵Anders Carlsson2010-02-02
| | | | | | CGExprConstant. Fixes PR5674. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95063 91177308-0d34-0410-b5e6-96231b3b80d8
* Some class related cleanup.Anders Carlsson2010-01-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94938 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce CodeGenModule::GetTargetTypeStoreSize() to calculate the store sizeKen Dyck2010-01-26
| | | | | | | of LLVM types in character units. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94542 91177308-0d34-0410-b5e6-96231b3b80d8
* Created __builtin___NSStringMakeConstantString() builtin, which generates ↵David Chisnall2010-01-23
| | | | | | constant Objective-C strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94274 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize target weirdness handling having proper layering in mind:Anton Korobeynikov2010-01-10
| | | | | | | | | 1. Add helper class for sema checks for target attributes 2. Add helper class for codegen of target attributes As a proof-of-concept - implement msp430's 'interrupt' attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93118 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR5967: Make const-marking for LLVM globals correct for cases requiringEli Friedman2010-01-08
| | | | | | | | | run-time initialization, and emit run-time initializers aggresively to avoid ordering issues with deferred globals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92976 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix linkage for RTTI names by re-using the logic for computing theDouglas Gregor2010-01-06
| | | | | | | | | linkage of vtables. Before this, we were emitting RTTI names for template instantiations with strong external linkage rather than with weak ODR linkage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92857 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix marking of virtual members for nested classes whose first non-pure ↵Douglas Gregor2010-01-06
| | | | | | virtual function has a body inlined in the class git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92855 91177308-0d34-0410-b5e6-96231b3b80d8
* Move address points to CGVtableInfo, no functionality change.Anders Carlsson2010-01-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92420 91177308-0d34-0410-b5e6-96231b3b80d8
* Work in progress for setting the vtable pointers for all bases correctly inEli Friedman2009-12-18
| | | | | | | | | the constructor. This doesn't handle cases requiring the VTT at the moment, and generates unnecessary stores, but I think it's essentially correct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91731 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename GetAddrOfRTTI to GetAddrOfRTTIDescriptor. Remove the overload that ↵Anders Carlsson2009-12-17
| | | | | | 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
* Use GetAddrOfRTTI everywhere and remove GenerateRTTI and GenerateRTTIRef. ↵Anders Carlsson2009-12-16
| | | | | | 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
* Improve linkage of RTTI data structures. Introduce ↵Anders Carlsson2009-12-11
| | | | | | 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
* Work-in-progess rewrite of thunks: move thunk generation outside of vtableEli Friedman2009-12-06
| | | | | | | | | generation, and make sure we generate thunks when the function is defined rather than when the vtable is defined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90722 91177308-0d34-0410-b5e6-96231b3b80d8
* Set the correct linkage for VTTs as well.Anders Carlsson2009-12-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90689 91177308-0d34-0410-b5e6-96231b3b80d8
* Make GenerateVtable a private member function of CGVtableInfo.Anders Carlsson2009-12-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90684 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanup.Eli Friedman2009-12-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90411 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for thunking dtors. Oh why does this make my head hurt?Mike Stump2009-12-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90409 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CodeGenModule::ComputeThunkAdjustment, which Eli wrote.Anders Carlsson2009-12-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90401 91177308-0d34-0410-b5e6-96231b3b80d8
* Change rtti/Rtti to RTTI, as it is an acronym.Mike Stump2009-12-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90334 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify and fix up the handling of implicit constructors, copy assignmentEli Friedman2009-11-26
| | | | | | | | | | operators, and destructors. Avoids generating declarations/definitions of trivial constructors/destructors, and makes sure the trivial copy assignment operator is generated when necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89943 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a CovariantThunkAdjustment struct that represents the adjustments needed ↵Anders Carlsson2009-11-26
| | | | | | for a covariant thunk. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89933 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a ThunkAdjustment struct which holds a non-virtual and a virtual ↵Anders Carlsson2009-11-26
| | | | | | adjustment offset. Start using it. General cleanup in Mangle.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89925 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify rtti building code a little. Prep for reuse for throw rttiMike Stump2009-11-20
| | | | | | | generation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89416 91177308-0d34-0410-b5e6-96231b3b80d8
* Add typeid for the builtin types. WIP.Mike Stump2009-11-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89028 91177308-0d34-0410-b5e6-96231b3b80d8
* Finisgh off rest of class_type_info rtti generation.Mike Stump2009-11-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88823 91177308-0d34-0410-b5e6-96231b3b80d8
* Move GlobalDecl to its own file. Also add DenseMapInfo traits.Anders Carlsson2009-11-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87081 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow the tracking of address points for construction vtables as well.Mike Stump2009-11-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87063 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the offset calculations for non-virtual bases with overrides.Mike Stump2009-11-12
| | | | | | | | | | Refine the VTT entries for virtual bases to refer to the complete object's vtable instead of constructor vtables. Refine the AddressPoint calculations for VTT entries for virtual bases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87021 91177308-0d34-0410-b5e6-96231b3b80d8
* "Attach debug info with llvm instructions" mode was enabled a month ago. ↵Devang Patel2009-11-12
| | | | | | Now make it permanent and remove old way of inserting intrinsics to encode debug info for locations and types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87007 91177308-0d34-0410-b5e6-96231b3b80d8
* Move CompileOptions -> CodeGenOptions, and sink it into the CodeGen library.Chandler Carruth2009-11-12
| | | | | | | This resolves the layering violation where CodeGen depended on Frontend. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86998 91177308-0d34-0410-b5e6-96231b3b80d8
* Push ctor vtable construction down further. WIP.Mike Stump2009-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86878 91177308-0d34-0410-b5e6-96231b3b80d8
* Add vtable caching to prevent multiple vtables for the same class fromMike Stump2009-11-10
| | | | | | | | | being generated. Add the most derived vtable pointer to the VTT. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86671 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for static variables which requireFariborz Jahanian2009-11-05
| | | | | | | | initialization before main. Fixes pr5396. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86145 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable "debug info attached to an instruction" mode.Devang Patel2009-10-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83928 91177308-0d34-0410-b5e6-96231b3b80d8