aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGVTables.cpp
AgeCommit message (Collapse)Author
2011-04-07Reapply r128770. It's not the cause of the issues Devang saw with debug info. Ken Dyck
Use CharUnits for the offsets in the VBaseOffsetOffsetsMapTy types. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129043 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-04Revert r128770, r128771, r128773 and r128776 for now. It breaks debug info.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128842 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() toKen Dyck
CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128776 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02Use CharUnits for the offsets in the VirtualBaseClassOffsetOffsetsMapTy. NoKen Dyck
change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128773 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02Use CharUnits for the offset type in the ClassNamesAndOffsets map inKen Dyck
dumpLayout(). No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128771 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02Use CharUnits for the offsets in the VBaseOffsetOffsetsMapTy types. NoKen Dyck
change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128770 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02Convert BaseOffset::NonVirtualOffset to CharUnits. No change inKen Dyck
functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128756 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02Convert offset parameters and return values of VTableComponent methods toKen Dyck
CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128754 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02Convert the offsets in VCallOffsetMap to CharUnits. No change inKen Dyck
functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128753 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-02Convert offset parameters of VTableBuilder::IsOverriderUsed() to CharUnits.Ken Dyck
No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128752 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-31Convert the return value ofKen Dyck
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
2011-03-31Convert the OffsetInLayoutClass parameter ofKen Dyck
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
2011-03-31Convert the OffsetInLayoutClass of the VCallAndVBaseOffsetBuilderKen Dyck
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
2011-03-31Convert the RealBaseOffset parameter ofKen Dyck
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
2011-03-30Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad
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
2011-03-30Convert the offset parameter ofKen Dyck
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
2011-03-30Convert local offset variable to CharUnits in AddVCallOffsets. No change inKen Dyck
functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128522 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-30Convert a local offset variable to CharUnits. No change in functionalityKen Dyck
intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128521 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-30Convert the OffsetInLayoutClass parameter of DeterminePrimaryVirtualBases()Ken Dyck
to CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128520 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-30Convert the OffsetInLayoutClass parameter of LayoutSecondaryVTables toKen Dyck
CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128516 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-27Convert offset parameter in LayoutPrimaryAndSecondaryVTables() to CharUnits.Ken Dyck
No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128393 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-27Convert VTableBuilder::MostDerivedClassOffset to CharUnits. No change inKen Dyck
functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128392 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-27Convert FinalOverriders::MostDerivedClassOffset to CharUnits. No change inKen Dyck
functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128391 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-27Remove a fixed FIXME comment (the base offset has already been converted toKen Dyck
CharUnits). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128386 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-27Convert the offset parameters of AddMethods() to CharUnits. No change inKen Dyck
functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128385 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-27Convert the BaseOffsetInLayoutClass parameter of ComputeThisAdjustment() toKen Dyck
CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128384 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-27Convert offset members in MethodInfo to CharUnits. No change inKen Dyck
functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128383 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-27We were emitting construction v-tables with internal linkage all the time.John McCall
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
2011-03-26On Mac OS X, the presence of an 'availability' attribute for thatDouglas Gregor
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
2011-03-26Convert the OffsetInLayoutClass parameter ofKen Dyck
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
2011-03-26Convert FinalOverriders::Offset to CharUnits. No change in functionalityKen Dyck
intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128321 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-26Convert offset in MethodBaseOffsetPairTy to CharUnits. No change inKen Dyck
functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128318 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-26Convert the offsets in SubobjectOffsetMapTy to CharUnits. No change inKen Dyck
functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128317 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-26Convert several local variables to CharUnits. No change in functionalityKen Dyck
intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128315 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-24Convert the BaseOffset member of BaseSubobject to CharUnits from bits. NoKen Dyck
change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128190 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-11Use a slightly more semantic interface for emitting call arguments.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127494 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-09Tame this assert, hopefully fixing self-host.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127319 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-09Use the "undergoes default argument promotion" bit on parameters toJohn McCall
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
2011-03-02Revert "Add CC_Win64ThisCall and set it in the necessary places."Tilmann Scheller
This reverts commit 126863. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126886 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-02Revert "Add preliminary support for MSVC-style vtables."Tilmann Scheller
This reverts commit 126865. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126876 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-02Add preliminary support for MSVC-style vtables.Tilmann Scheller
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126865 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-02Add CC_Win64ThisCall and set it in the necessary places.Tilmann Scheller
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126863 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-11For consistency, use llvm::raw_ostream in the rest of the mangle api.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125360 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-08Reorganize CodeGen{Function,Module} to eliminate the unfortunateJohn McCall
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
2011-02-06Fix self-host; if a thunk already exists and has available_externally ↵Anders Carlsson
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
2011-02-06When building with optimizations, emit thunks with available_externally ↵Anders Carlsson
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
2011-02-06Simplify thunks code.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124983 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-05Pass a 'ForVTable' flag to GetAddrOfThunk and pass it along to ↵Anders Carlsson
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
2011-02-05Re-land r124768, with a fix for PR9130.Anders Carlsson
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
2011-02-03Revert 124768.Rafael Espindola
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