summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGVTables.cpp
Commit message (Collapse)AuthorAge
...
* Convert BaseOffset::NonVirtualOffset to CharUnits. No change inKen Dyck2011-04-02
| | | | | | | functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128756 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert offset parameters and return values of VTableComponent methods toKen Dyck2011-04-02
| | | | | | | CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128754 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the offsets in VCallOffsetMap to CharUnits. No change inKen Dyck2011-04-02
| | | | | | | functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128753 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert offset parameters of VTableBuilder::IsOverriderUsed() to CharUnits.Ken Dyck2011-04-02
| | | | | | | No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128752 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the return value ofKen Dyck2011-03-31
| | | | | | | | VCallAndVBaseOffsetBuilder::getCurrentOffsetOffset() to CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128603 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the OffsetInLayoutClass parameter ofKen Dyck2011-03-31
| | | | | | | | VCallAndVBaseOffsetBuilder::AddVBaseOffsets() to CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128600 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the OffsetInLayoutClass of the VCallAndVBaseOffsetBuilderKen Dyck2011-03-31
| | | | | | | constructor to CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128598 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the RealBaseOffset parameter ofKen Dyck2011-03-31
| | | | | | | | VCallAndVBaseOffsetBuilder::AddVCallAndVBaseOffsets() to CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128596 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-30
| | | | | | PHINode::Create() giving the (known or expected) number of operands. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128538 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the offset parameter ofKen Dyck2011-03-30
| | | | | | | | VCallAndVBaseOffsetBuilder::AddVCallOffsets() to CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128531 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert local offset variable to CharUnits in AddVCallOffsets. No change inKen Dyck2011-03-30
| | | | | | | functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128522 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert a local offset variable to CharUnits. No change in functionalityKen Dyck2011-03-30
| | | | | | | intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128521 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the OffsetInLayoutClass parameter of DeterminePrimaryVirtualBases()Ken Dyck2011-03-30
| | | | | | | to CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128520 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the OffsetInLayoutClass parameter of LayoutSecondaryVTables toKen Dyck2011-03-30
| | | | | | | CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128516 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert offset parameter in LayoutPrimaryAndSecondaryVTables() to CharUnits.Ken Dyck2011-03-27
| | | | | | | No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128393 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert VTableBuilder::MostDerivedClassOffset to CharUnits. No change inKen Dyck2011-03-27
| | | | | | | functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128392 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert FinalOverriders::MostDerivedClassOffset to CharUnits. No change inKen Dyck2011-03-27
| | | | | | | functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128391 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a fixed FIXME comment (the base offset has already been converted toKen Dyck2011-03-27
| | | | | | | CharUnits). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128386 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the offset parameters of AddMethods() to CharUnits. No change inKen Dyck2011-03-27
| | | | | | | functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128385 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the BaseOffsetInLayoutClass parameter of ComputeThisAdjustment() toKen Dyck2011-03-27
| | | | | | | CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128384 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert offset members in MethodInfo to CharUnits. No change inKen Dyck2011-03-27
| | | | | | | functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128383 91177308-0d34-0410-b5e6-96231b3b80d8
* We were emitting construction v-tables with internal linkage all the time.John McCall2011-03-27
| | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128374 91177308-0d34-0410-b5e6-96231b3b80d8
* On Mac OS X, the presence of an 'availability' attribute for thatDouglas Gregor2011-03-26
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128336 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the OffsetInLayoutClass parameter ofKen Dyck2011-03-26
| | | | | | | | FinalOverriders::ComputeBaseOffsets() to CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128323 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert FinalOverriders::Offset to CharUnits. No change in functionalityKen Dyck2011-03-26
| | | | | | | intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128321 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert offset in MethodBaseOffsetPairTy to CharUnits. No change inKen Dyck2011-03-26
| | | | | | | functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128318 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the offsets in SubobjectOffsetMapTy to CharUnits. No change inKen Dyck2011-03-26
| | | | | | | functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128317 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert several local variables to CharUnits. No change in functionalityKen Dyck2011-03-26
| | | | | | | intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128315 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the BaseOffset member of BaseSubobject to CharUnits from bits. NoKen Dyck2011-03-24
| | | | | | | change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128190 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a slightly more semantic interface for emitting call arguments.John McCall2011-03-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127494 91177308-0d34-0410-b5e6-96231b3b80d8
* Tame this assert, hopefully fixing self-host.John McCall2011-03-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127319 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the "undergoes default argument promotion" bit on parameters toJohn McCall2011-03-09
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127314 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Add CC_Win64ThisCall and set it in the necessary places."Tilmann Scheller2011-03-02
| | | | | | This reverts commit 126863. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126886 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Add preliminary support for MSVC-style vtables."Tilmann Scheller2011-03-02
| | | | | | This reverts commit 126865. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126876 91177308-0d34-0410-b5e6-96231b3b80d8
* Add preliminary support for MSVC-style vtables.Tilmann Scheller2011-03-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126865 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CC_Win64ThisCall and set it in the necessary places.Tilmann Scheller2011-03-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126863 91177308-0d34-0410-b5e6-96231b3b80d8
* For consistency, use llvm::raw_ostream in the rest of the mangle api.Rafael Espindola2011-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125360 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorganize CodeGen{Function,Module} to eliminate the unfortunateJohn McCall2011-02-08
| | | | | | | | | | Block{Function,Module} base class. Minor other refactorings. Fixed a few address-space bugs while I was there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125085 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix self-host; if a thunk already exists and has available_externally ↵Anders Carlsson2011-02-06
| | | | | | linkage, we should change its linkage instead of asserting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124986 91177308-0d34-0410-b5e6-96231b3b80d8
* When building with optimizations, emit thunks with available_externally ↵Anders Carlsson2011-02-06
| | | | | | linkage so devirtualized function calls can also be de-thunked. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124984 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify thunks code.Anders Carlsson2011-02-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124983 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass a 'ForVTable' flag to GetAddrOfThunk and pass it along to ↵Anders Carlsson2011-02-05
| | | | | | | | | GetOrCreateLLVMFunction so that we won't assert when building a thunk for an implicit virtual member function that is not marked used. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124967 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-land r124768, with a fix for PR9130.Anders Carlsson2011-02-05
| | | | | | | We now emit everything except unused implicit virtual member functions when building the vtable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124935 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 124768.Rafael Espindola2011-02-03
| | | | | | | This reopens PR99114, but that one at least can be avoided with an #include. PR9130 cannot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124780 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to mark virtual members referenced for classes where the key functionAnders Carlsson2011-02-03
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124768 91177308-0d34-0410-b5e6-96231b3b80d8
* When building with optimizations, emit vtables where the key is not in the Anders Carlsson2011-01-30
| | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124565 91177308-0d34-0410-b5e6-96231b3b80d8
* Change CodeGenModule::setTypeVisibility to take a TypeVisibilityKind enum ↵Anders Carlsson2011-01-29
| | | | | | instead of an "IsForRTTI" flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124546 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of an unneeded parameter from setGlobalVisibility.Anders Carlsson2011-01-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124541 91177308-0d34-0410-b5e6-96231b3b80d8
* Make emitting a VTT a two-step process, much like emitting a VTable. You ↵Anders Carlsson2011-01-29
| | | | | | first get the address of the VTT, and then pass it to EmitVTTDefinition. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124539 91177308-0d34-0410-b5e6-96231b3b80d8
* Use CGM.CreateOrReplaceCXXRuntimeVariable in CGVTables.cppAnders Carlsson2011-01-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124538 91177308-0d34-0410-b5e6-96231b3b80d8