aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.h
AgeCommit message (Collapse)Author
2010-02-19Re-introduce the ctor/dtor alias optimization, this time hidden behind aJohn McCall
command-line option which defaults off. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96649 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18Revert the ctor/dtor alias optimization for now; the buildbots can detectJohn McCall
some failure here that I can't. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96612 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-17Emit complete constructors and destructors as aliases to base constructorsJohn McCall
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
2010-02-06Use the correct function info for constructors when applying function ↵Anders Carlsson
attributes. Fixes PR6245. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95474 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-02Move pointer to data member emission to CodeGenModule and use it in ↵Anders Carlsson
CGExprConstant. Fixes PR5674. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95063 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-31Some class related cleanup.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94938 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26Introduce CodeGenModule::GetTargetTypeStoreSize() to calculate the store sizeKen Dyck
of LLVM types in character units. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94542 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23Created __builtin___NSStringMakeConstantString() builtin, which generates ↵David Chisnall
constant Objective-C strings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94274 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10Generalize target weirdness handling having proper layering in mind:Anton Korobeynikov
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
2010-01-08Fix for PR5967: Make const-marking for LLVM globals correct for cases requiringEli Friedman
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
2010-01-06Fix linkage for RTTI names by re-using the logic for computing theDouglas Gregor
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
2010-01-06Fix marking of virtual members for nested classes whose first non-pure ↵Douglas Gregor
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
2010-01-02Move address points to CGVtableInfo, no functionality change.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92420 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-18Work in progress for setting the vtable pointers for all bases correctly inEli Friedman
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
2009-12-17Rename GetAddrOfRTTI to GetAddrOfRTTIDescriptor. Remove the overload that ↵Anders Carlsson
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
2009-12-16Use GetAddrOfRTTI everywhere and remove GenerateRTTI and GenerateRTTIRef. ↵Anders Carlsson
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
2009-12-11Improve linkage of RTTI data structures. Introduce ↵Anders Carlsson
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
2009-12-06Work-in-progess rewrite of thunks: move thunk generation outside of vtableEli Friedman
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
2009-12-06Set the correct linkage for VTTs as well.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90689 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-06Make GenerateVtable a private member function of CGVtableInfo.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90684 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03Minor cleanup.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90411 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03Add support for thunking dtors. Oh why does this make my head hurt?Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90409 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03Add CodeGenModule::ComputeThunkAdjustment, which Eli wrote.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90401 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-02Change rtti/Rtti to RTTI, as it is an acronym.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90334 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26Simplify and fix up the handling of implicit constructors, copy assignmentEli Friedman
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
2009-11-26Add a CovariantThunkAdjustment struct that represents the adjustments needed ↵Anders Carlsson
for a covariant thunk. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89933 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-26Add a ThunkAdjustment struct which holds a non-virtual and a virtual ↵Anders Carlsson
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
2009-11-20Simplify rtti building code a little. Prep for reuse for throw rttiMike Stump
generation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89416 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17Add typeid for the builtin types. WIP.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89028 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14Finisgh off rest of class_type_info rtti generation.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88823 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13Move GlobalDecl to its own file. Also add DenseMapInfo traits.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87081 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13Allow the tracking of address points for construction vtables as well.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87063 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12Fix the offset calculations for non-virtual bases with overrides.Mike Stump
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
2009-11-12 "Attach debug info with llvm instructions" mode was enabled a month ago. ↵Devang Patel
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
2009-11-12Move CompileOptions -> CodeGenOptions, and sink it into the CodeGen library.Chandler Carruth
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
2009-11-11Push ctor vtable construction down further. WIP.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86878 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-10Add vtable caching to prevent multiple vtables for the same class fromMike Stump
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
2009-11-05Added support for static variables which requireFariborz Jahanian
initialization before main. Fixes pr5396. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86145 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12Enable "debug info attached to an instruction" mode.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83928 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-11Move the vtable builder to CGVtable.cpp, general cleanup.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83798 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-07Add a MangleContext and pass it to all mangle functions. It will be used for ↵Anders Carlsson
keeping state, such as identifiers assigned to anonymous structs as well as scope encoding. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83442 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-03Move some functions from CodeGenFunctions to CodeGenModule so they can be ↵Anders Carlsson
used by CGExprConstant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83263 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14Fix subtle bug in generating LLVM function declarations for builtin functions.Daniel Dunbar
The decl wasn't being passed down, which meant that function attributes were not being set correctly. This is particularly important for ARM, since it wants to override the calling convention. Instead we would emit the builtin with the wrong calling convention, and instcombine would come along and merrily shred all the calls to it. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81756 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-12whitespace fixChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81644 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-12Change CodeGenModule::ConstructTypeAttributes to return the calling conventionDaniel Dunbar
to use, and allow the ABI implementation to override the calling convention. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81593 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11Add basic covariant thunk generation support. WIP.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81585 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11Pass GlobalDecls to GenerateCode and StartFunction.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81485 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-10Add stricter GlobalDecl constructors.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81480 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-05Install thunks later to fixup overrides. Track space taken by vbaseMike Stump
offsets better for thunk refinements. Cleanups. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81067 91177308-0d34-0410-b5e6-96231b3b80d8