aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGVtable.cpp
AgeCommit message (Collapse)Author
2010-02-13More work on return type adjustments in the new vtable builder.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96070 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13Switch the standard DeclarationName comparator to be a tri-valued comparator.John McCall
Use that while fixing a nasty misuse of qsort in vtable codegen which, somehow, has not actually caused a crash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96062 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-13if-0 out printf.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96052 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12Fix a refacto that broke the clang-on-clang build.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95994 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12Start stubbing out more of the covariant thunk support.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95990 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12Keep track of whether a final overrider needs a return type adjustment.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95985 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12Move overrider out into a separate struct.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95984 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12Keep track of the address points for all primary bases, and add the ability ↵Anders Carlsson
to dump multiple address points for a single offset. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95970 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12Fix a bug causing an assertion when a covariant return type differed fromJohn McCall
an overriden type only by reduced qualification. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95968 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12More work on vtable layout. We can now layout vtables with primary bases.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95965 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12When dumping vtables, dump whether a virtual member function is pure or not.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95963 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-12More work on the final overriders.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95954 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11Stub out the final overriders class.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95922 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11Use getAs instead of cast/dyn_cast on types. (I'm sure Doug will appreciate ↵Anders Carlsson
this). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95911 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11Move two functions to the top. No functionality change.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95908 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11More vtable layout dumper improvements. Handle destructors, dump the ↵Anders Carlsson
complete function type of the member functions (using PredefinedExpr::ComputeName. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95887 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11Keep track of, and dump, vtable address points.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95874 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11Check in the beginnings of my new vtable layout builder idea.Anders Carlsson
Right now, it's off by default but can be tested by passing -fdump-vtable-layouts to clang -cc1. This option will cause all vtables that will normally be emitted as part of codegen to also be dumped using the new layout code. I've also added a very simple new vtable layout test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95865 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03remove a big chunk of #if 0 code.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95201 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-26Refine the non-virtual this adjustments for thunks by using the offsetMike Stump
to the declaring class from the nearest virtual base class. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94606 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26Refine the non-virtual this adjustments for thunks by using the offsetMike Stump
to the declaring class from the nearest virtual base class. WIP. This fixes 40% of all the problems remaining in one of my testcases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94592 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26Change getUnique to return a GlobalDecl. Fixes PR6147.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94554 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26Be sure to track the non-virtual part of the vcall offset in complexMike Stump
multiple inheritance cases. WIP. This fixes 20% of the outstanding problems found by the randomized tester. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94499 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26Fixup a missing vcall entry. WIP.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94478 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22Finish off fixing up debug information.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94193 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22Ensure we output all non-virtual base vtables. Fixes PR5890.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94163 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22Update debugging code.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94145 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21Move the VTT related code into its own file, CGVTT.cppAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94079 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18More VTT builder fixes. With these fixes we now correctly handle the very ↵Anders Carlsson
complex VTT example from the Itanium ABI spec. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93725 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18Move some common code into BuildVTT.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93710 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-18Fix a bunch of VTT layout bugs, add simple tests for VTT layout.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93709 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17Minor VTT builder cleanup, no functionality change.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93696 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-17Get the ctor vtable address points directly from the VTT builder.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93681 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14Store the address points for constructor vtables directly in the VTT ↵Anders Carlsson
builder, because that's the only time they're needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93412 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-06Fix (invalid) may-be-uninitialized warning.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92828 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06Revert my available_externally vtables experiment. It's breaking the ↵Douglas Gregor
LLVM-with-Clang build with linker errors that I have yet to investigate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92822 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06Reorder to avoid invalidating idx which is an accessor into VCall.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92819 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05Silence bogus GCC warningDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92787 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05Make use of available_externally linkage for vtables when theDouglas Gregor
non-inline key function of a class template instantiation, when no key function is present, the class template instantiation itself was instantiated with an explicit instantiation declaration (aka extern template). I'm fairly certain that the C++0x specification gives us this lattitude, although GCC doesn't take advantage of it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92779 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05Improve key-function computation for templates. In particular:Douglas Gregor
- All classes can have a key function; templates don't change that. non-template classes when computing the key function. - We always mark all of the virtual member functions of class template instantiations. - The vtable for an instantiation of a class template has weak linkage. We could probably use available_externally linkage for vtables of classes instantiated by explicit instantiation declarations (extern templates), but GCC doesn't do this and I'm not 100% that the ABI permits it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92753 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
2010-01-02Correctly pass VTT parameters to constructors and destructors. The VTTs ↵Anders Carlsson
aren't yet used in the ctors/dtors, but that will follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92409 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-01Move a few more functions away from CGCXX and to CGClass and CGExprCXX.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92399 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-30Fix a bunch of bugs with VMI RTTI building, and add a whole bunch of tests.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92319 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-24Remove some dead code.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92123 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-15Fix a small bug in ComputeMethodVtableIndices.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91411 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11Fix linkage of type info and vtable for classes without linkage.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91152 91177308-0d34-0410-b5e6-96231b3b80d8