summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/VTableBuilder.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Make the 'for (auto ...)' names more readableTimur Iskhodzhanov2014-03-261-34/+35
| | | | llvm-svn: 204787
* Fix PR19066 - 0-sized vftable in the presence of virtual inheritanceTimur Iskhodzhanov2014-03-261-1/+10
| | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D3181 llvm-svn: 204786
* MS ABI: Mark direct virtual bases as visted when building vtable pathsReid Kleckner2014-03-251-0/+2
| | | | | | Fixes PR19240. In retrospect, this is a fairly obvious bug. :) llvm-svn: 204744
* Fix PR19172 - wrong this adjustment calculated for virtual destructor in a ↵Timur Iskhodzhanov2014-03-201-8/+14
| | | | | | | | class with complex inheritance Reviewed at http://llvm-reviews.chandlerc.com/D3128 llvm-svn: 204394
* Flust stdout after each vftable dumped to simplify debuggingTimur Iskhodzhanov2014-03-201-0/+4
| | | | llvm-svn: 204341
* [C++11] Replacing CXXRecordDecl iterators method_begin() and method_end() ↵Aaron Ballman2014-03-131-21/+6
| | | | | | with iterator_range methods(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203812
* [C++11] Replacing CXXRecordDecl iterators vbases_begin() and vbases_end() ↵Aaron Ballman2014-03-131-8/+4
| | | | | | with iterator_range vbases(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203808
* [C++11] Replacing CXXRecordDecl iterators bases_begin() and bases_end() with ↵Aaron Ballman2014-03-131-36/+26
| | | | | | iterator_range bases(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203803
* [C++11] Convert sort predicates into lambdas.Benjamin Kramer2014-03-071-5/+4
| | | | | | No functionality change. llvm-svn: 203289
* Fix PR18967 -- Bad this adjustment for virtual methods in a diamond virtual ↵Timur Iskhodzhanov2014-03-071-91/+37
| | | | | | inheritance hierarchy llvm-svn: 203222
* Style fix: replace "1 entries" with "1 entry" in the vftable layout dumping codeTimur Iskhodzhanov2014-03-051-2/+4
| | | | llvm-svn: 202978
* First step towards fixing PR18967 - simplify the ComputeThisOffset interfaceTimur Iskhodzhanov2014-03-041-15/+11
| | | | llvm-svn: 202870
* [C++11] Simplify compare operators with std::tie.Benjamin Kramer2014-03-031-7/+2
| | | | | | No functionality change. llvm-svn: 202755
* [C++11] Replace llvm::tie with std::tie.Benjamin Kramer2014-03-021-1/+1
| | | | llvm-svn: 202639
* [C++11] Replace verbose functors with succinct lambdasBenjamin Kramer2014-03-011-45/+20
| | | | | | No functionality change. llvm-svn: 202590
* Fix leak in MicrosoftVTableContextReid Kleckner2014-02-281-0/+1
| | | | llvm-svn: 202558
* MS ABI: Attempt to fix DenseMap entry reference invalidationReid Kleckner2014-02-271-4/+5
| | | | llvm-svn: 202441
* MS ABI: Fix vftable mangling by using the vbtable name algorithmReid Kleckner2014-02-271-162/+60
| | | | | | | | | | | | | | | | | | Summary: This merges VFPtrInfo and VBTableInfo into VPtrInfo, since they hold almost the same information. With that change, the vbtable mangling code can easily be applied to vftable data and we magically get the correct, unambiguous vftable names. Fixes PR17748. Reviewers: timurrrr, majnemer CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2893 llvm-svn: 202425
* [MS ABI] Error instead of generating bad vftables for certain virtual ↵Hans Wennborg2014-02-271-0/+37
| | | | | | | | | | | hierarchies (PR18967) Erroring out until we fix the bug means we don't have to keep chasing down this same miscompile in a bunch of different places. Differential Revision: http://llvm-reviews.chandlerc.com/D2890 llvm-svn: 202331
* MS ABI: Let non-virtual method overloads participate in vftable orderingReid Kleckner2014-02-191-5/+3
| | | | | | | | | | | | | In the Microsoft ABI, the vftable is laid out as if all methods in every overload set were declared in reverse order of declaration at the point of declaration of the first overload in the set. Previously we only considered virtual methods in an overload set, but MSVC includes non-virtual methods for ordering purposes. Fixes PR18902. llvm-svn: 201722
* Rename getResultType() on function and method declarations to getReturnType()Alp Toker2014-01-251-5/+5
| | | | | | | | | | | | | | | A return type is the declared or deduced part of the function type specified in the declaration. A result type is the (potentially adjusted) type of the value of an expression that calls the function. Rule of thumb: * Declarations have return types and parameters. * Expressions have result types and arguments. llvm-svn: 200082
* Rename FunctionProtoType accessors from 'arguments' to 'parameters'Alp Toker2014-01-201-3/+3
| | | | | | | | | | | | | | | | | Fix a perennial source of confusion in the clang type system: Declarations and function prototypes have parameters to which arguments are supplied, so calling these 'arguments' was a stretch even in C mode, let alone C++ where default arguments, templates and overloading make the distinction important to get right. Readability win across the board, especially in the casting, ADL and overloading implementations which make a lot more sense at a glance now. Will keep an eye on the builders and update dependent projects shortly. No functional change. llvm-svn: 199686
* Make helper function static.Benjamin Kramer2014-01-111-1/+1
| | | | llvm-svn: 199013
* [ms-cxxabi] Improve vbtable name mangling accuracyReid Kleckner2014-01-031-162/+101
| | | | | | | | | | | | | | | | | | | | | | Summary: This makes us more compatible with MSVC 2012+ and fixes PR17748 where we would give two tables the same name. Rather than doing a fresh depth-first traversal of the inheritance graph for every record's vbtables, now we memoize vbtable paths for each record. By doing memoization, we end up considering virtual bases of subobjects that come later in the depth-first traversal. Where previously we would have ignored a virtual base that we'd already seen, we now consider it for name mangling purposes without emitting a duplicate vbtable for it. Reviewers: majnemer CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2509 llvm-svn: 198462
* Removed one of the string versions of getQualifiedNameAsString, and switched ↵Aaron Ballman2014-01-031-18/+33
| | | | | | over to using printQualifiedName where possible. No functional changes intended. llvm-svn: 198433
* [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
OpenPOWER on IntegriCloud