summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/VTableBuilder.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [ms-cxxabi] Move VBTableBuilder from CodeGen over to AST/VTableBuilder.cppReid Kleckner2014-01-031-21/+251
| | | | | | | | | | | | | | | | | | | | | Summary: No functionality change. This code should live here long-term because we should be able to use it to compute correct vftable names. It turns out that the most natural way to implement the naming algorithm is to use a caching layer similar to what we already have for virtual table info in VTableContext. Subsequent changes will take advantage of this to fix PR17748, where we have a vbtable name collision. Reviewers: majnemer CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2499 llvm-svn: 198380
* Reduce indentation of some VFTableBuilder code.Reid Kleckner2013-12-271-24/+24
| | | | | | No functionality change. llvm-svn: 198085
* Fix incorrect copy-pasted method decl that MSVC allowed.Reid Kleckner2013-12-271-1/+1
| | | | llvm-svn: 198081
* [ms-cxxabi] Emit fewer trivial return adjusting thunksReid Kleckner2013-12-271-2/+23
| | | | | | | | | | | Most importantly, this makes our vtable layout match MSVC's. Previously we would emit a return adjusting thunk whenever the return types differed, even if the adjustment would have been trivial. MSVC does emit some trivial return adjusting thunks, but only if there was already an overridden method that required a return adjustment. llvm-svn: 198080
* Eliminate the ItaniumVTableContext object from CodeGenVTablesReid Kleckner2013-12-201-4/+1
| | | | | | | | | | | | | Now CodeGenVTables has only one VTableContext object, which is either Itanium or Microsoft. Fixes a FIXME with no functionality change intended. Ideally we could avoid the downcasts by pushing the things that reference the Itanium vtable context into ItaniumCXXABI.cpp, but we're not there yet. llvm-svn: 197845
* Compare canonical return types when generating MS C++ ABI vtable thunksReid Kleckner2013-12-201-1/+2
| | | | | | | | This was part of the cause for PR17655. We were generating thunks when we shouldn't have. I suspect that if we tweak the test case for PR17655 to actually require thunks, we can reproduce the same crash. llvm-svn: 197836
* Make -fdump-vtable-layouts print to stdout, not stderrReid Kleckner2013-11-081-3/+3
| | | | | | | | | | | | | This makes it consistent with -fdump-record-layouts, which was moved to outs() in r186219. My reasoning for going with stdout is that when one of these options is present, the layouts are really a program output, and shouldn't be interleaved with diagnostics, which are on stderr. Reviewers: timurrrr Differential Revision: http://llvm-reviews.chandlerc.com/D2127 llvm-svn: 194279
* Thread the info about vbptr sharing through ASTRecordLayoutTimur Iskhodzhanov2013-11-081-21/+8
| | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D2120 llvm-svn: 194256
* Minor refinement of VTableBuilder.h: fix wrong indentation, rename a struct ↵Timur Iskhodzhanov2013-11-071-2/+2
| | | | | | field with a more appropriate name llvm-svn: 194202
* Fix PR17738 - add support for vtordisp thunks when using -cxx-abi microsoftTimur Iskhodzhanov2013-11-061-23/+86
| | | | llvm-svn: 194132
* Fix vbtable indices when a class shares the vbptr with a non-virtual baseTimur Iskhodzhanov2013-11-051-38/+80
| | | | llvm-svn: 194082
* Make thunk this/return adjustment ABI-specific. Also, fix the return ↵Timur Iskhodzhanov2013-10-301-54/+44
| | | | | | | | adjustment when using -cxx-abi microsoft Reviewed at http://llvm-reviews.chandlerc.com/D2026 llvm-svn: 193679
* Fix an assertion when handling a custom case of virtual inheritance; also ↵Timur Iskhodzhanov2013-10-291-24/+2
| | | | | | reduce code duplication llvm-svn: 193610
* Drop the unneeded VBase field from MethodInfo in the VFTableBuilder classTimur Iskhodzhanov2013-10-221-12/+5
| | | | llvm-svn: 193164
* [-cxx-abi microsoft] Fix this argument/parameter offsets for virtual ↵Timur Iskhodzhanov2013-10-161-5/+13
| | | | | | | | destructors in the presence of virtual bases Reviewed at http://llvm-reviews.chandlerc.com/D1939 llvm-svn: 192822
* Reduce double set lookups by using the result of insert.Benjamin Kramer2013-10-141-2/+1
| | | | | | No functionality change. llvm-svn: 192598
* Code cleanup: rename VTableContext to ItaniumVTableContext, VTableBuilder to ↵Timur Iskhodzhanov2013-10-091-84/+79
| | | | | | ItaniumVTableBuilder and clang-format code around llvm-svn: 192288
* Reland 192220 "Abstract out parts of thunk emission code, add support for ↵Timur Iskhodzhanov2013-10-091-16/+58
| | | | | | simple thunks when using -cxx-abi microsoft" with relaxed assertions llvm-svn: 192285
* Revert 192220 as it fails on an assertionTimur Iskhodzhanov2013-10-081-56/+16
| | | | llvm-svn: 192225
* Abstract out parts of thunk emission code, add support for simple thunks ↵Timur Iskhodzhanov2013-10-081-16/+56
| | | | | | | | when using -cxx-abi microsoft Reviewed at http://llvm-reviews.chandlerc.com/D1787 llvm-svn: 192220
* Fix PR17382 - properly group virtual method overloads in the vftableTimur Iskhodzhanov2013-10-061-6/+38
| | | | llvm-svn: 192067
* Abstract out the emission of vtables, add basic support for vtable emission ↵Timur Iskhodzhanov2013-09-271-52/+74
| | | | | | | | when using -cxx-abi microsoft Reviewed at http://llvm-reviews.chandlerc.com/D1532 llvm-svn: 191523
* Abstract out virtual calls and virtual function prologue code generation; ↵Timur Iskhodzhanov2013-08-211-6/+13
| | | | | | implement them for -cxx-abi microsoft llvm-svn: 188870
* Make helper function static.Benjamin Kramer2013-08-011-2/+2
| | | | llvm-svn: 187574
* Add MicrosoftVFTableContext to ASTTimur Iskhodzhanov2013-07-301-16/+906
| | | | llvm-svn: 187409
* Use SmallVectorImpl& for function arguments instead of SmallVector.Craig Topper2013-07-051-2/+2
| | | | llvm-svn: 185715
* Simplify getting CXXRecordDecl from a base iteratorTimur Iskhodzhanov2013-07-021-21/+11
| | | | llvm-svn: 185438
* Fix a trivial typo, add a FIXME to have more test coverage for VTableBuilderTimur Iskhodzhanov2013-06-281-1/+3
| | | | llvm-svn: 185159
* Delete dead code.Eli Friedman2013-06-271-10/+1
| | | | llvm-svn: 185101
* Recommit r183298+r183300 'Get rid of ↵Timur Iskhodzhanov2013-06-051-159/+96
| | | | | | | | | VTableContext::ComputeMethodVTableIndices() and VTableContext::getNumVirtualFunctionPointers()' In r183298, I've used llvm::SmallPtrSet<..., 8> instead of llvm::SmallVector<..., 8> for NewVirtualFunctionsTy by mistake. This only manifested when a class had more than 8 virtual functions, which wasn't covered by unit-tests llvm-svn: 183310
* Revert r183298 and r183300 as the former broke the virtual function lookup ↵Timur Iskhodzhanov2013-06-051-96/+159
| | | | | | in libcxx __locale llvm-svn: 183305
* Fix fallout from r183298, unused function (CollectPrimaryBases) causing the ↵David Blaikie2013-06-051-15/+0
| | | | | | -Werror build to fail llvm-svn: 183300
* Fix the DUMP_OVERRIDERS macro in the VTableBuilder.cppTimur Iskhodzhanov2013-06-051-3/+1
| | | | llvm-svn: 183299
* Get rid of VTableContext::ComputeMethodVTableIndices() and ↵Timur Iskhodzhanov2013-06-051-144/+96
| | | | | | VTableContext::getNumVirtualFunctionPointers(); also add some tests for the VTable indices output to make sure we don't regress llvm-svn: 183298
* Fix one FIXME in VTableBuilderTimur Iskhodzhanov2013-05-081-8/+8
| | | | llvm-svn: 181396
* Emit virtual/deleting destructors properly with -cxx-abi microsoft, PR15058Timur Iskhodzhanov2013-02-131-14/+13
| | | | llvm-svn: 175045
* CodeGen: Remove unnecessary const_casts. No functionality change.Benjamin Kramer2013-02-031-7/+3
| | | | llvm-svn: 174292
* First pass at abstracting out a class for the target C++ ABI.John McCall2013-01-251-1/+2
| | | | llvm-svn: 173514
* First step towards vftable generation with -cxx-abi microsoft PR13231Timur Iskhodzhanov2013-01-211-29/+86
| | | | llvm-svn: 173035
* Include pruning and general cleanup.Benjamin Kramer2012-12-011-0/+1
| | | | llvm-svn: 169095
* Note deleted functions when dumping vtables.David Blaikie2012-10-161-0/+3
| | | | llvm-svn: 166056
* Fix a typo (the the => the)Sylvestre Ledru2012-07-231-1/+1
| | | | llvm-svn: 160622
* Remove get(V)BaseClassOffsetInBits, the CharUnit functions should be used ↵Benjamin Kramer2012-07-041-7/+8
| | | | | | | | instead. No functionality change. llvm-svn: 159719
* Revert Decl's iterators back to pointer value_type rather than reference ↵David Blaikie2012-06-061-5/+5
| | | | | | | | | | | | | | value_type In addition, I've made the pointer and reference typedef 'void' rather than T* just so they can't get misused. I would've omitted them entirely but std::distance likes them to be there even if it doesn't use them. This rolls back r155808 and r155869. Review by Doug Gregor incorporating feedback from Chandler Carruth. llvm-svn: 158104
* Remove the ref/value inconsistency in filter_decl_iterator.David Blaikie2012-04-301-5/+5
| | | | | | | | | | | | | filter_decl_iterator had a weird mismatch where both op* and op-> returned T* making it difficult to generalize this filtering behavior into a reusable library of any kind. This change errs on the side of value, making op-> return T* and op* return T&. (reviewed by Richard Smith) llvm-svn: 155808
* Replace manual delete[] with OwningArrayPtr.Benjamin Kramer2012-04-141-6/+4
| | | | llvm-svn: 154748
* Don't leak vtable thunks.Benjamin Kramer2012-04-141-0/+1
| | | | llvm-svn: 154747
* For the annals of subtle but terrible bugs: fix a longstanding bugJohn McCall2012-03-211-5/+5
| | | | | | | | | | | | | | | | | | | | in vtable layout where virtual methods inherited from virtual bases could be assigned the same vcall adjustment slot if they shared a name and parameter signature but differed in their cv-qualification. The code was already trying to handle this case, but unfortunately used the ordinary type qualifiers (which are always empty here) instead of the method qualifiers. This seems like something that the API should discourage, but I don't know how to carry that principle out in this instance. Eliminate this function's need for an ASTContext while we're at it. This bug affects the ABI, and fixing it brings us into accord with the Itanium ABI (and GCC's implementation of it), but, obviously, technically breaks full compatibility with previous releases of Clang. Just letting you know. llvm-svn: 153168
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-2/+2
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Fix a use of the C99 PRI format macros not to conflict with C++11 UDLs.Benjamin Kramer2012-03-101-1/+2
| | | | llvm-svn: 152475
OpenPOWER on IntegriCloud