summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGVTables.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify/clean up debug info suppression in CodeGenFunctionDavid Blaikie2013-08-261-3/+0
| | | | | | | | | | CodeGenFunction is run on only one function - a new object is made for each new function. I would add an assertion/flag to this effect, but there's an exception: ObjC properties involve emitting helper functions that are all emitted by the same CodeGenFunction object, so such a check is not possible/correct. llvm-svn: 189277
* DebugInfo: emit the definition of types when construction vtables are ↵David Blaikie2013-08-221-3/+6
| | | | | | | | | | required as these types may never end up emitting the full class data This might be able to be optimized further by only doing this in the absence of a key function, but it doesn't look like GCC is doing that so I'm not rushing to do it just yet. llvm-svn: 189022
* Revert "Revert "Revert "Revert "DebugInfo: Omit debug info for dynamic ↵David Blaikie2013-08-201-0/+3
| | | | | | | | | | | | | | classes in TUs that do not have the vtable for that class"""" This reverts commit r188687 (reverts r188642 (reverts 188600 (reverts 188576))). With added test coverage & fix for -gline-tables-only. Thanks Michael Gottesman for reverting this patch when it demonstrated problems & providing a reproduction/details to help me track this down. llvm-svn: 188739
* Revert "Revert "Revert "DebugInfo: Omit debug info for dynamic classes in ↵Michael Gottesman2013-08-191-3/+0
| | | | | | | | | | | | | TUs that do not have the vtable for that class""" This reverts commit r188642. This change is causing LTO builds to cause our 16 GB machines to swap and OOM all weekend. I am going to work with Dave Blaikie to resolve the issue. Sorry Dave =(. llvm-svn: 188687
* Revert "Revert "DebugInfo: Omit debug info for dynamic classes in TUs that ↵David Blaikie2013-08-181-0/+3
| | | | | | | | | | | | do not have the vtable for that class"" This reverts commit r188600. r188640/r188639 fixed the root cause of the crash-on-valid that r188600 originally introduced. This now appears to bootstrap debug clang successfully to the best of my testing. llvm-svn: 188642
* Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not ↵David Blaikie2013-08-171-3/+0
| | | | | | | | | | have the vtable for that class" This reverts commit r188576. Reverting while I investigate a selfhosting buildbot failure on Darwin. llvm-svn: 188600
* DebugInfo: Omit debug info for dynamic classes in TUs that do not have the ↵David Blaikie2013-08-161-0/+3
| | | | | | | | | vtable for that class This reduces Clang's .dwo (fission debug info) size by 23% over Clang+LLVM. llvm-svn: 188576
* Add MicrosoftVFTableContext to ASTTimur Iskhodzhanov2013-07-301-1/+25
| | | | llvm-svn: 187409
* Restore r184205 and associated commits (after commit of r185290)Stephen Lin2013-06-301-1/+2
| | | | | | This allows clang to use the backend parameter attribute 'returned' when generating 'this'-returning constructors and destructors in ARM and MSVC C++ ABIs. llvm-svn: 185291
* Revert r184205 and associated patches while investigating issue with broken ↵Stephen Lin2013-06-191-2/+1
| | | | | | | | buildbot (possible interaction with LTO) <rdar://problem/14209661> llvm-svn: 184384
* [ms-cxxabi] Emit and install appropriately mangled vbtablesReid Kleckner2013-06-191-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | In Itanium, dynamic classes have one vtable with several different address points for dynamic base classes that can't share vtables. In the MS C++ ABI, each vbtable that can't be shared gets its own symbol, similar to how ctor vtables work in Itanium. However, instead of mangling the subobject offset into the symbol, the unique portions of the inheritance path are mangled into the symbol to make it unique. This patch implements the MSVC 2012 scheme for forming unique vbtable symbol names. MSVC 2010 use the same mangling with a different subset of the path. Implementing that mangling and possibly others is TODO. Each vbtable is an array of i32 offsets from the vbptr that points to it to another virtual base subobject. The first entry of a vbtable always points to the base of the current subobject, implying that it is the same no matter which parent class contains it. Reviewers: rjmccall Differential Revision: http://llvm-reviews.chandlerc.com/D636 llvm-svn: 184309
* CodeGen: Have 'this'-returning constructors and destructors to take ↵Stephen Lin2013-06-181-1/+2
| | | | | | | | | | advantage of the new backend 'returned' attribute. The backend will now use the generic 'returned' attribute to form tail calls where possible, as well as avoid save-restores of 'this' in some cases (specifically the cases that matter for the ARM C++ ABI). This patch also reverts a prior front-end only partial implementation of these optimizations, since it's no longer required. llvm-svn: 184205
* [ms-cxxabi] Thread GlobalDecls through to CodeGenModule::getFunctionLinkage.Peter Collingbourne2013-06-051-2/+2
| | | | | | | | This is so that we can give destructor variants different linkage later. Differential Revision: http://llvm-reviews.chandlerc.com/D819 llvm-svn: 183324
* Cleanup handling of UniqueExternalLinkage.Rafael Espindola2013-05-131-1/+1
| | | | | | | | | | | | | This patch renames getLinkage to getLinkageInternal. Only code that needs to handle UniqueExternalLinkage specially should call this. Linkage, as defined in the c++ standard, is provided by getFormalLinkage. It maps UniqueExternalLinkage to ExternalLinkage. Most places in the compiler actually want isExternallyVisible, which handles UniqueExternalLinkage as internal. llvm-svn: 181677
* Change hasAggregateLLVMType, which conflates complex andJohn McCall2013-03-071-1/+1
| | | | | | | | | | | | | | | aggregate types in a profoundly wrong way that has to be worked around in every call site, to getEvaluationKind, which classifies and distinguishes between all of these cases. Also, normalize the API for loading and storing complexes. I'm working on a larger patch and wanted to pull these changes out, but it would have be annoying to detangle them from each other. llvm-svn: 176656
* Better support for constructors with -cxx-abi microsoft, partly fixes PR12784Timur Iskhodzhanov2013-02-271-2/+6
| | | | llvm-svn: 176186
* Add a new 'type_visibility' attribute to allow users toJohn McCall2013-02-201-1/+1
| | | | | | | | | | | | | | control the visibility of a type for the purposes of RTTI and template argument restrictions independently of how visibility propagates to its non-type member declarations. Also fix r175326 to not ignore template argument visibility on a template explicit instantiation when a member has an explicit attribute but the instantiation does not. The type_visibility work is rdar://11880378 llvm-svn: 175587
* Emit vtables for an extern template class as available_externally, not asRichard Smith2013-02-161-8/+10
| | | | | | | linkonce_odr. Emit construction vtables as internal in this case, since the ABI does not guarantee that they will be availble externally. llvm-svn: 175330
* The standard ARM C++ ABI dictates that inline functions areJohn McCall2013-01-251-32/+176
| | | | | | | | never key functions. We did not implement that rule for the iOS ABI, which was driven by what was implemented in gcc-4.2. However, implement it now for other ARM-based platforms. llvm-svn: 173515
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-1/+1
| | | | | | | | | | | | | 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
* Initialize debug info for special cases of functions that lack declarations ↵Alexey Samsonov2012-10-251-1/+4
| | | | | | and are generated by Clang (global initializers/destructors, thunks) . Fixes PR13942. llvm-svn: 166676
* Remove the HiddenWeakTemplateVTables CodeGen option. It's currently unused.Douglas Gregor2012-10-241-2/+1
| | | | llvm-svn: 166561
* PR13684: Emit vtable entries for deleted functions as __cxa_deleted_function.David Blaikie2012-10-161-1/+12
| | | | | | | | This is consistent/interoperable with GCC 4.7 (& __cxa_deleted_function isn't present in 4.4 - not sure when it got added, but you'll need something with that function available for this to work). llvm-svn: 166069
* Call CGM.SetLLVMFunctionAttributesForDefinition on thunks so that they getRafael Espindola2012-09-211-0/+2
| | | | | | | attributes like uwtable. Without uwtable a stack unwinder would be unable to go past the thunks. llvm-svn: 164411
* Update clang for API change.Benjamin Kramer2012-09-191-1/+3
| | | | llvm-svn: 164218
* Fix thunk emission for covariant virtual functions in cases which requireEli Friedman2012-09-141-7/+16
| | | | | | both a virtual and a non-virtual offset. PR13832. llvm-svn: 163866
* Fix line endings.Eli Friedman2012-09-141-5/+5
| | | | llvm-svn: 163865
* Don't crash *or* insert a bogus autorelease when emitting aJohn McCall2012-07-311-0/+3
| | | | | | this-adjustment thunk in ARC++. llvm-svn: 161014
* Fixed whitespace issue introduced in r160373.Joao Matos2012-07-171-8/+7
| | | | llvm-svn: 160388
* [Windows] Abstract pure virtual method calls in the ABI. Fix the Windows ABI ↵Joao Matos2012-07-171-8/+8
| | | | | | to forward to the correct function. llvm-svn: 160373
* Distinguish more carefully between free functions and C++ instance methodsJohn McCall2012-07-071-3/+4
| | | | | | | | in the ABI arrangement, and leave a hook behind so that we can easily tweak CCs on platforms that use different CCs by default for C++ instance methods. llvm-svn: 159894
* Fix a use-after-free in thunk emission. EmitThunk may call RAUW on Init, ↵Benjamin Kramer2012-03-201-1/+1
| | | | | | | | invalidating the pointer. Fixes PR12284. The test case only triggered under asan/valgrind, but it's better than nothing. llvm-svn: 153120
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-1/+1
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Whether an argument is required (in contrast with being anJohn McCall2012-02-171-6/+6
| | | | | | | | | | | | | | | | | | | | | optional argument passed through the variadic ellipsis) potentially affects how we need to lower it. Propagate this information down to the various getFunctionInfo(...) overloads on CodeGenTypes. Furthermore, rename those overloads to clarify their distinct purposes, and make sure we're calling the right one in the right place. This has a nice side-effect of making it easier to construct a function type, since the 'variadic' bit is no longer separable. This shouldn't really change anything for our existing platforms, with one minor exception --- we should now call variadic ObjC methods with the ... in the "right place" (see the test case), which I guess matters for anyone running GNUStep on MIPS. Mostly it's just a substantial clean-up. llvm-svn: 150788
* Basic support for referring to captured variables from lambdas. Some simple ↵Eli Friedman2012-02-111-0/+1
| | | | | | examples seem to work. Tests coming up soon. llvm-svn: 150293
* simplify a bunch of code to use the well-known LLVM IR types computed by ↵Chris Lattner2012-02-071-10/+5
| | | | | | CodeGenModule. llvm-svn: 149943
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-3/+3
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Basic: import OwningPtr<> into clang namespaceDylan Noblesmith2012-02-051-1/+1
| | | | llvm-svn: 149798
* Move VTable builder to ASTPeter Collingbourne2011-09-261-2380/+0
| | | | llvm-svn: 140510
* Have CodeGenVTables::GenerateConstructionVTable use VTableLayoutPeter Collingbourne2011-09-261-18/+10
| | | | llvm-svn: 140509
* Move vtable dumper call to VTableBuilder ctorPeter Collingbourne2011-09-261-12/+3
| | | | llvm-svn: 140508
* Implement VTableContext::createConstructionVTableLayoutPeter Collingbourne2011-09-261-10/+23
| | | | llvm-svn: 140507
* Move all vtable layout data into new VTableLayout classPeter Collingbourne2011-09-261-59/+67
| | | | llvm-svn: 140506
* Move VTableComponent to header filePeter Collingbourne2011-09-261-167/+0
| | | | llvm-svn: 140505
* Move vtable component accessors to VTableContextPeter Collingbourne2011-09-261-41/+18
| | | | llvm-svn: 140504
* Remove CodeGenVTables::ComputeVTableRelatedInformation dependency on CodeGenPeter Collingbourne2011-09-261-23/+19
| | | | llvm-svn: 140503
* Create a VTableContext class and start moving CodeGenVTables methods to itPeter Collingbourne2011-09-261-16/+19
| | | | llvm-svn: 140502
* Removing a bunch of dead returns/breaks after llvm_unreachables.David Blaikie2011-09-231-3/+0
| | | | llvm-svn: 140407
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-7/+7
| | | | llvm-svn: 140367
* Extend the ASTContext constructor to delay the initialization ofDouglas Gregor2011-09-021-1/+1
| | | | | | | | builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
OpenPOWER on IntegriCloud