summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGVTables.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert the offset parameter ofKen Dyck2011-03-301-4/+4
| | | | | | | VCallAndVBaseOffsetBuilder::AddVCallOffsets() to CharUnits. No change in functionality intended. llvm-svn: 128531
* Convert local offset variable to CharUnits in AddVCallOffsets. No change inKen Dyck2011-03-301-4/+4
| | | | | | functionality intended. llvm-svn: 128522
* Convert a local offset variable to CharUnits. No change in functionalityKen Dyck2011-03-301-3/+3
| | | | | | intended. llvm-svn: 128521
* Convert the OffsetInLayoutClass parameter of DeterminePrimaryVirtualBases()Ken Dyck2011-03-301-9/+9
| | | | | | to CharUnits. No change in functionality intended. llvm-svn: 128520
* Convert the OffsetInLayoutClass parameter of LayoutSecondaryVTables toKen Dyck2011-03-301-8/+6
| | | | | | CharUnits. No change in functionality intended. llvm-svn: 128516
* Convert offset parameter in LayoutPrimaryAndSecondaryVTables() to CharUnits.Ken Dyck2011-03-271-16/+16
| | | | | | No change in functionality intended. llvm-svn: 128393
* Convert VTableBuilder::MostDerivedClassOffset to CharUnits. No change inKen Dyck2011-03-271-16/+15
| | | | | | functionality intended. llvm-svn: 128392
* Convert FinalOverriders::MostDerivedClassOffset to CharUnits. No change inKen Dyck2011-03-271-5/+8
| | | | | | functionality intended. llvm-svn: 128391
* Remove a fixed FIXME comment (the base offset has already been converted toKen Dyck2011-03-271-1/+0
| | | | | | CharUnits). llvm-svn: 128386
* Convert the offset parameters of AddMethods() to CharUnits. No change inKen Dyck2011-03-271-17/+15
| | | | | | functionality intended. llvm-svn: 128385
* Convert the BaseOffsetInLayoutClass parameter of ComputeThisAdjustment() toKen Dyck2011-03-271-9/+8
| | | | | | CharUnits. No change in functionality intended. llvm-svn: 128384
* Convert offset members in MethodInfo to CharUnits. No change inKen Dyck2011-03-271-14/+17
| | | | | | functionality intended. llvm-svn: 128383
* We were emitting construction v-tables with internal linkage all the time.John McCall2011-03-271-2/+6
| | | | | | | | | | | | | | | Emit them instead with the linkage of the VTT. I'm actually really ambivalent about this; it's what GCC does, but outside of improving code size (if the linkage is coalescing), I'm not sure it's at all relevant. Construction vtables are naturally referenced only by the VTT, which is itself only referenced by complete-object constructors and destructors; giving the construction vtables possibly-external linkage is important if you have an optimization that drills through the VTT to a reference to a particular construction vtable which it cannot just emit itself. llvm-svn: 128374
* On Mac OS X, the presence of an 'availability' attribute for thatDouglas Gregor2011-03-261-1/+1
| | | | | | | | | platform implies default visibility. To achieve these, refactor our lookup of explicit visibility so that we search for both an explicit VisibilityAttr and an appropriate AvailabilityAttr, favoring the VisibilityAttr if it is present. llvm-svn: 128336
* Convert the OffsetInLayoutClass parameter ofKen Dyck2011-03-261-8/+8
| | | | | | | FinalOverriders::ComputeBaseOffsets() to CharUnits. No change in functionality intended. llvm-svn: 128323
* Convert FinalOverriders::Offset to CharUnits. No change in functionalityKen Dyck2011-03-261-8/+8
| | | | | | intended. llvm-svn: 128321
* Convert offset in MethodBaseOffsetPairTy to CharUnits. No change inKen Dyck2011-03-261-9/+8
| | | | | | functionality intended. llvm-svn: 128318
* Convert the offsets in SubobjectOffsetMapTy to CharUnits. No change inKen Dyck2011-03-261-8/+8
| | | | | | functionality intended. llvm-svn: 128317
* Convert several local variables to CharUnits. No change in functionalityKen Dyck2011-03-261-45/+39
| | | | | | intended. llvm-svn: 128315
* Convert the BaseOffset member of BaseSubobject to CharUnits from bits. NoKen Dyck2011-03-241-51/+74
| | | | | | change in functionality intended. llvm-svn: 128190
* Use a slightly more semantic interface for emitting call arguments.John McCall2011-03-111-5/+2
| | | | llvm-svn: 127494
* Tame this assert, hopefully fixing self-host.John McCall2011-03-091-1/+20
| | | | llvm-svn: 127319
* Use the "undergoes default argument promotion" bit on parameters toJohn McCall2011-03-091-8/+15
| | | | | | | | | | 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
* Revert "Add CC_Win64ThisCall and set it in the necessary places."Tilmann Scheller2011-03-021-12/+4
| | | | | | This reverts commit 126863. llvm-svn: 126886
* Revert "Add preliminary support for MSVC-style vtables."Tilmann Scheller2011-03-021-61/+2
| | | | | | This reverts commit 126865. llvm-svn: 126876
* Add preliminary support for MSVC-style vtables.Tilmann Scheller2011-03-021-2/+61
| | | | llvm-svn: 126865
* Add CC_Win64ThisCall and set it in the necessary places.Tilmann Scheller2011-03-021-4/+12
| | | | llvm-svn: 126863
* For consistency, use llvm::raw_ostream in the rest of the mangle api.Rafael Espindola2011-02-111-5/+11
| | | | llvm-svn: 125360
* Reorganize CodeGen{Function,Module} to eliminate the unfortunateJohn McCall2011-02-081-1/+1
| | | | | | | | Block{Function,Module} base class. Minor other refactorings. Fixed a few address-space bugs while I was there. llvm-svn: 125085
* Fix self-host; if a thunk already exists and has available_externally ↵Anders Carlsson2011-02-061-2/+7
| | | | | | linkage, we should change its linkage instead of asserting. llvm-svn: 124986
* When building with optimizations, emit thunks with available_externally ↵Anders Carlsson2011-02-061-4/+34
| | | | | | linkage so devirtualized function calls can also be de-thunked. llvm-svn: 124984
* Simplify thunks code.Anders Carlsson2011-02-061-7/+6
| | | | llvm-svn: 124983
* Pass a 'ForVTable' flag to GetAddrOfThunk and pass it along to ↵Anders Carlsson2011-02-051-5/+6
| | | | | | | | GetOrCreateLLVMFunction so that we won't assert when building a thunk for an implicit virtual member function that is not marked used. llvm-svn: 124967
* Re-land r124768, with a fix for PR9130.Anders Carlsson2011-02-051-2/+2
| | | | | | We now emit everything except unused implicit virtual member functions when building the vtable. llvm-svn: 124935
* Revert 124768.Rafael Espindola2011-02-031-2/+2
| | | | | | | This reopens PR99114, but that one at least can be avoided with an #include. PR9130 cannot. llvm-svn: 124780
* Don't try to mark virtual members referenced for classes where the key functionAnders Carlsson2011-02-031-2/+2
| | | | | | | | | | | is not defined in the current translation unit. Doing so lead to compile errors such as PR9114. Instead, when CodeGen is building the vtable, don't try to emit a definition for functions that aren't marked used in the current translation unit. Fixes PR9114. llvm-svn: 124768
* When building with optimizations, emit vtables where the key is not in the Anders Carlsson2011-01-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | current translation unit as available_externally. This helps devirtualize the second example in PR3100, comment 18: struct S { S() {}; virtual void xyzzy(); }; inline void foo(S *s) { s->xyzzy(); } void bar() { S s; foo(&s); } This involved four major changes: 1. In DefineUsedVTables, always mark virtual member functions as referenced for non-template classes and class template specializations. 2. In CodeGenVTables::ShouldEmitVTableInThisTU return true if optimizations are enabled, even if the key function is not implemented in this translation unit. We don't ever do this for code compiled with -fapple-kext, because we don't ever want to devirtualize virtual member function calls in that case. 3. Give the correct linkage for vtables where the key function is not defined. 4. Update the linkage for RTTI structures when necessary. llvm-svn: 124565
* Change CodeGenModule::setTypeVisibility to take a TypeVisibilityKind enum ↵Anders Carlsson2011-01-291-1/+1
| | | | | | instead of an "IsForRTTI" flag. llvm-svn: 124546
* Get rid of an unneeded parameter from setGlobalVisibility.Anders Carlsson2011-01-291-1/+1
| | | | llvm-svn: 124541
* Make emitting a VTT a two-step process, much like emitting a VTable. You ↵Anders Carlsson2011-01-291-1/+4
| | | | | | first get the address of the VTT, and then pass it to EmitVTTDefinition. llvm-svn: 124539
* Use CGM.CreateOrReplaceCXXRuntimeVariable in CGVTables.cppAnders Carlsson2011-01-291-47/+4
| | | | llvm-svn: 124538
* Remove IsDefinition from CodeGenModule::setTypeVisibility; it is always true.Anders Carlsson2011-01-291-1/+1
| | | | llvm-svn: 124529
* More work to support -fapple-kext regarding Fariborz Jahanian2011-01-281-0/+7
| | | | | | | indirect vf calls and addition of extra entry at bottom of vtbls. llvm-svn: 124507
* Also set unnamed_addr on declarations.Rafael Espindola2011-01-151-1/+1
| | | | llvm-svn: 123531
* Only add unnamed_addr to definitions.Rafael Espindola2011-01-131-1/+1
| | | | llvm-svn: 123354
* Add unnamed_addr to vtables.Rafael Espindola2011-01-111-2/+5
| | | | llvm-svn: 123272
* Rename RecordLayout::getPrimaryBaseWasVirtual to isPrimaryBaseVirtual.Anders Carlsson2010-11-241-6/+6
| | | | llvm-svn: 120133
* Move code off the primary base info iterator. No functionality change.Anders Carlsson2010-11-241-4/+14
| | | | llvm-svn: 120132
* When re-using a vtable slot for the nearest overridden method, just becauseJohn McCall2010-11-091-1/+10
| | | | | | | | | | | | there's no return adjustment from the overridden to the overrider doesn't mean there isn't a return adjustment from the overrider to the final overrider. This matters if we're emitting a virtual this-adjustment thunk because the overrider virtually inherits from the class providing the nearest overridden method. Do the appropriate return adjustment in this case. Fixes PR7611. llvm-svn: 118466
* Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a ↵Anders Carlsson2010-10-311-27/+28
| | | | | | getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset. llvm-svn: 117881
OpenPOWER on IntegriCloud