summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGVTables.h
Commit message (Collapse)AuthorAgeFilesLines
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-3/+3
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. ↵Sylvestre Ledru2012-09-271-1/+1
| | | | | | See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766 llvm-svn: 164769
* Fix a typo 'iff' => 'if'Sylvestre Ledru2012-09-271-1/+1
| | | | llvm-svn: 164766
* Move VTable builder to ASTPeter Collingbourne2011-09-261-327/+1
| | | | llvm-svn: 140510
* Have CodeGenVTables::GenerateConstructionVTable use VTableLayoutPeter Collingbourne2011-09-261-0/+4
| | | | llvm-svn: 140509
* Implement VTableContext::createConstructionVTableLayoutPeter Collingbourne2011-09-261-0/+6
| | | | llvm-svn: 140507
* Move all vtable layout data into new VTableLayout classPeter Collingbourne2011-09-261-53/+76
| | | | llvm-svn: 140506
* Move VTableComponent to header filePeter Collingbourne2011-09-261-0/+167
| | | | llvm-svn: 140505
* Move vtable component accessors to VTableContextPeter Collingbourne2011-09-261-52/+85
| | | | llvm-svn: 140504
* Remove CodeGenVTables::ComputeVTableRelatedInformation dependency on CodeGenPeter Collingbourne2011-09-261-9/+5
| | | | llvm-svn: 140503
* Create a VTableContext class and start moving CodeGenVTables methods to itPeter Collingbourne2011-09-261-27/+40
| | | | llvm-svn: 140502
* Move BaseSubobject class to ASTPeter Collingbourne2011-09-261-66/+1
| | | | llvm-svn: 140500
* Make the VTTBuilder class independent of LLVM corePeter Collingbourne2011-09-261-0/+1
| | | | llvm-svn: 140498
* now that we have a centralized place to do so, add some using declarations forChris Lattner2011-07-201-2/+2
| | | | | | | some common llvm types: stringref and smallvector. This cleans up the codebase quite a bit. llvm-svn: 135576
* Move GlobalDecl to ASTPeter Collingbourne2011-06-141-1/+1
| | | | llvm-svn: 132973
* [Reapply r128776, modified so that it does not break debug info.]Ken Dyck2011-04-071-3/+3
| | | | | | | Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() to CharUnits. No change in functionality intended. llvm-svn: 129072
* [Reapply r128773. This is not the source of the issues Devang was seeingKen Dyck2011-04-071-2/+2
| | | | | | | | | with debug info.] Use CharUnits for the offsets in the VirtualBaseClassOffsetOffsetsMapTy. No change in functionality intended. llvm-svn: 129048
* Revert r128770, r128771, r128773 and r128776 for now. It breaks debug info.Devang Patel2011-04-041-5/+5
| | | | llvm-svn: 128842
* Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() toKen Dyck2011-04-021-3/+3
| | | | | | CharUnits. No change in functionality intended. llvm-svn: 128776
* Use CharUnits for the offsets in the VirtualBaseClassOffsetOffsetsMapTy. NoKen Dyck2011-04-021-2/+2
| | | | | | change in functionality intended. llvm-svn: 128773
* We were emitting construction v-tables with internal linkage all the time.John McCall2011-03-271-1/+2
| | | | | | | | | | | | | | | 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. llvm-svn: 128374
* Convert the BaseOffset member of BaseSubobject to CharUnits from bits. NoKen Dyck2011-03-241-6/+7
| | | | | | change in functionality intended. llvm-svn: 128190
* When building with optimizations, emit thunks with available_externally ↵Anders Carlsson2011-02-061-2/+9
| | | | | | linkage so devirtualized function calls can also be de-thunked. llvm-svn: 124984
* Make emitting a VTT a two-step process, much like emitting a VTable. You ↵Anders Carlsson2011-01-291-6/+9
| | | | | | first get the address of the VTT, and then pass it to EmitVTTDefinition. llvm-svn: 124539
* Move name mangling support from CodeGen to AST. In thePeter Collingbourne2011-01-131-88/+1
| | | | | | | | | | | | | | process, perform a number of refactorings: - Move MiscNameMangler member functions to MangleContext - Remove GlobalDecl dependency from MangleContext - Make MangleContext abstract and move Itanium/Microsoft functionality to their own classes/files - Implement ASTContext::createMangleContext and have CodeGen use it No (intended) functionality change. llvm-svn: 123386
* Make sure the VTables for template instantiations are emitted even if the ↵Argyrios Kyrtzidis2010-10-111-8/+3
| | | | | | key function doesn't have a body. llvm-svn: 116186
* Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead ↵Argyrios Kyrtzidis2010-07-071-1/+1
| | | | | | | | of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH. Makes de-serialization of the function body even more "lazier". llvm-svn: 107768
* Don't try to emit the vtable for a class just because we're emitting aJohn McCall2010-06-021-5/+10
| | | | | | | | virtual function from it. Fixes PR7241. llvm-svn: 105345
* Rework when and how vtables are emitted, by tracking where vtables areDouglas Gregor2010-05-131-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "used" (e.g., we will refer to the vtable in the generated code) and when they are defined (i.e., because we've seen the key function definition). Previously, we were effectively tracking "potential definitions" rather than uses, so we were a bit too eager about emitting vtables for classes without key functions. The new scheme: - For every use of a vtable, Sema calls MarkVTableUsed() to indicate the use. For example, this occurs when calling a virtual member function of the class, defining a constructor of that class type, dynamic_cast'ing from that type to a derived class, casting to/through a virtual base class, etc. - For every definition of a vtable, Sema calls MarkVTableUsed() to indicate the definition. This happens at the end of the translation unit for classes whose key function has been defined (so we can delay computation of the key function; see PR6564), and will also occur with explicit template instantiation definitions. - For every vtable defined/used, we mark all of the virtual member functions of that vtable as defined/used, unless we know that the key function is in another translation unit. This instantiates virtual member functions when needed. - At the end of the translation unit, Sema tells CodeGen (via the ASTConsumer) which vtables must be defined (CodeGen will define them) and which may be used (for which CodeGen will define the vtables lazily). From a language perspective, both the old and the new schemes are permissible: we're allowed to instantiate virtual member functions whenever we want per the standard. However, all other C++ compilers were more lazy than we were, and our eagerness was both a performance issue (we instantiated too much) and a portability problem (we broke Boost test cases, which now pass). Notes: (1) There's a ton of churn in the tests, because the order in which vtables get emitted to IR has changed. I've tried to isolate some of the larger tests from these issues. (2) Some diagnostics related to implicitly-instantiated/implicitly-defined virtual member functions have moved to the point of first use/definition. It's better this way. (3) I could use a review of the places where we MarkVTableUsed, to see if I missed any place where the language effectively requires a vtable. Fixes PR7114 and PR6564. llvm-svn: 103718
* Store the entire base subobject in SubVTTIndices.Anders Carlsson2010-05-031-6/+4
| | | | llvm-svn: 102890
* Have getSubVTTIndex take a BaseSubobject instead of just a base.Anders Carlsson2010-05-021-1/+1
| | | | llvm-svn: 102885
* If a method is virtual and the class key function is in another file, emit ↵Rafael Espindola2010-04-191-0/+9
| | | | | | | | the method as available_externally. Fixes PR6747 llvm-svn: 101757
* Vtable -> VTable renames across the board.Anders Carlsson2010-04-171-8/+8
| | | | llvm-svn: 101666
* Rename CGVtable files to CGVTables.Anders Carlsson2010-04-081-0/+361
llvm-svn: 100778
OpenPOWER on IntegriCloud