summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGVTT.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update clang for D20348Peter Collingbourne2016-06-141-1/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D20339 llvm-svn: 272710
* CodeGen: Use 32-bit gep offsets to address vtable address points.Peter Collingbourne2016-03-141-3/+3
| | | | | | | | | | | | | | | | | The relative vtable ABI will use a struct rather than an array as the type of a vtable. LLVM only allows 32-bit integers as struct indices, so we need to use 32-bit integers to get addresses of address points. In order to keep the code simple, we might as well do that unconditionally. It's probably a reasonable implementation limit to support no more than 2 billion virtual functions per class. This change causes quite a bit of churn in the test suite, so I'm making it separately. Differential Revision: http://reviews.llvm.org/D18113 llvm-svn: 263469
* Remove and forbid raw_svector_ostream::flush() calls.Yaron Keren2015-08-131-1/+0
| | | | | | | | | | After r244870 flush() will only compare two null pointers and return, doing nothing but wasting run time. The call is not required any more as the stream and its SmallString are always in sync. Thanks to David Blaikie for reviewing. llvm-svn: 244928
* Prune trailing LF.NAKAMURA Takumi2015-05-091-1/+0
| | | | llvm-svn: 236938
* Revert r236879, "Do not emit thunks with available_externally linkage in ↵NAKAMURA Takumi2015-05-091-1/+3
| | | | | | | | comdats" It broke pecoff, at least i686-cygwin. llvm-svn: 236937
* Do not emit thunks with available_externally linkage in comdatsDerek Schuff2015-05-081-3/+1
| | | | | | | | | | | | | | Functions with available_externally linkage will not be emitted to object files (they will just be undefined symbols), so it does not make sense to put them in comdats. Creates a second overload of maybeSetTrivialComdat that uses the GlobalObject instead of the Decl, and uses that in several places that had the faulty logic. Differential Revision: http://reviews.llvm.org/D9580 llvm-svn: 236879
* [opaque pointer type] Update for GEP API changes in LLVMDavid Blaikie2015-04-021-6/+6
| | | | | | | | | | Now the GEP constant utility functions require the type to be explicitly passed (since eventually the pointer type will be opaque and not convey the required type information). For now callers can still pass nullptr (though none were needed here in Clang, which is nice) if convenienc/necessary, but eventually that will be disallowed as well. llvm-svn: 233937
* Use a trivial comdat for C++ tables.Rafael Espindola2015-01-151-0/+3
| | | | | | | | | This produces comdats for vtables, typeinfo, typeinfo names, and vtts. When combined with llvm not producing implicit comdats, not doing this would cause code bloat on ELF and link errors on COFF. llvm-svn: 226227
* Remove the -fhidden-weak-vtables -cc1 option. It was dead,John McCall2014-02-081-1/+1
| | | | | | gross, and increasingly replaced through other mechanisms. llvm-svn: 201011
* Eliminate the ItaniumVTableContext object from CodeGenVTablesReid Kleckner2013-12-201-1/+2
| | | | | | | | | | | | | 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
* Fix vbtable indices when a class shares the vbptr with a non-virtual baseTimur Iskhodzhanov2013-11-051-2/+2
| | | | llvm-svn: 194082
* Extract ABI-specific parts of MangleContext into separate classesTimur Iskhodzhanov2013-10-031-1/+2
| | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D1807 llvm-svn: 191878
* Abstract out the emission of vtables, add basic support for vtable emission ↵Timur Iskhodzhanov2013-09-271-4/+5
| | | | | | | | when using -cxx-abi microsoft Reviewed at http://llvm-reviews.chandlerc.com/D1532 llvm-svn: 191523
* [ms-cxxabi] Move CodeGenVTables::needsVTTParameter to ItaniumCXXABI.Peter Collingbourne2013-06-281-18/+0
| | | | | | | | | This function only makes sense there. Eventually it should no longer be part of the CGCXXABI interface, as it is an Itanium-specific detail. Differential Revision: http://llvm-reviews.chandlerc.com/D821 llvm-svn: 185213
* simplify a bunch of code to use the well-known LLVM IR types computed by ↵Chris Lattner2012-02-071-5/+2
| | | | | | CodeGenModule. llvm-svn: 149943
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-1/+1
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Remove obsolete debugging macro, make helper static.Benjamin Kramer2011-10-221-7/+5
| | | | llvm-svn: 142730
* Move all vtable layout data into new VTableLayout classPeter Collingbourne2011-09-261-1/+2
| | | | llvm-svn: 140506
* Move vtable component accessors to VTableContextPeter Collingbourne2011-09-261-1/+1
| | | | llvm-svn: 140504
* Remove CodeGenVTables::ComputeVTableRelatedInformation dependency on CodeGenPeter Collingbourne2011-09-261-1/+2
| | | | llvm-svn: 140503
* Move VTT builder to ASTPeter Collingbourne2011-09-261-337/+1
| | | | llvm-svn: 140501
* Remove CodeGenModule field from VTTBuilderPeter Collingbourne2011-09-261-11/+11
| | | | llvm-svn: 140499
* Make the VTTBuilder class independent of LLVM corePeter Collingbourne2011-09-261-95/+128
| | | | llvm-svn: 140498
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-2/+2
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Convert ConstantExpr::getGetElementPtr andJay Foad2011-07-211-1/+1
| | | | | | ConstantExpr::getInBoundsGetElementPtr to use ArrayRef. llvm-svn: 135673
* de-constify llvm::Type, patch by David Blaikie!Chris Lattner2011-07-181-5/+5
| | | | llvm-svn: 135370
* Replace the existing forms of ConstantArray::get() with a single formJay Foad2011-06-221-2/+1
| | | | | | that takes an ArrayRef. llvm-svn: 133615
* Fix another regression from the "skip vtable pointer initialization"Anders Carlsson2011-05-161-0/+2
| | | | | | | optimization. Make sure to require a vtable when trying to get the address of a VTT, otherwise we would never end up emitting the VTT. llvm-svn: 131400
* We were emitting construction v-tables with internal linkage all the time.John McCall2011-03-271-4/+16
| | | | | | | | | | | | | | | 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-12/+13
| | | | | | change in functionality intended. llvm-svn: 128190
* For consistency, use llvm::raw_ostream in the rest of the mangle api.Rafael Espindola2011-02-111-1/+3
| | | | llvm-svn: 125360
* Change CodeGenModule::setTypeVisibility to take a TypeVisibilityKind enum ↵Anders Carlsson2011-01-291-1/+1
| | | | | | instead of an "IsForRTTI" flag. llvm-svn: 124546
* Give VTTs the right visibility.Anders Carlsson2011-01-291-0/+3
| | | | llvm-svn: 124540
* Make emitting a VTT a two-step process, much like emitting a VTable. You ↵Anders Carlsson2011-01-291-42/+31
| | | | | | first get the address of the VTT, and then pass it to EmitVTTDefinition. llvm-svn: 124539
* Also set unnamed_addr on declarations.Rafael Espindola2011-01-151-2/+1
| | | | llvm-svn: 123531
* Only add unnamed_addr to definitions.Rafael Espindola2011-01-131-1/+2
| | | | llvm-svn: 123354
* Set unnamed_addr in VTTs.Rafael Espindola2011-01-111-0/+1
| | | | llvm-svn: 123280
* Rename RecordLayout::getPrimaryBaseWasVirtual to isPrimaryBaseVirtual.Anders Carlsson2010-11-241-1/+1
| | | | llvm-svn: 120133
* Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a ↵Anders Carlsson2010-10-311-4/+5
| | | | | | getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset. llvm-svn: 117881
* Better solution: calculate the visibility of functions and variablesJohn McCall2010-10-301-1/+1
| | | | | | | | | | independently of whether they're definitions, then teach IR generation to ignore non-explicit visibility when emitting declarations. Use this to make sure that RTTI, vtables, and VTTs get the right visibility. More of rdar://problem/8613093 llvm-svn: 117781
* Teach IR generation to return 'this' from constructors and destructorsJohn McCall2010-08-311-1/+2
| | | | | | under the ARM ABI. llvm-svn: 112588
* The global variable for the VTT might not have external linkage; allowDouglas Gregor2010-05-061-1/+1
| | | | | | | us to find local variables, too. Fixes the last remaining Boost.Rational failure. llvm-svn: 103203
* Store the entire base subobject in SubVTTIndices.Anders Carlsson2010-05-031-10/+9
| | | | llvm-svn: 102890
* Have getSubVTTIndex take a BaseSubobject instead of just a base.Anders Carlsson2010-05-021-2/+2
| | | | llvm-svn: 102885
* Clarify an assertion.Anders Carlsson2010-04-111-1/+2
| | | | llvm-svn: 100986
* Remove the old vtable layout code.Anders Carlsson2010-03-301-3/+0
| | | | llvm-svn: 99869
* Use the newly added function in the VTT builder.Anders Carlsson2010-03-291-3/+2
| | | | llvm-svn: 99799
* Fix thinko.Anders Carlsson2010-03-291-1/+1
| | | | llvm-svn: 99788
* Two bug fixes, we weren't updating the thunk index when creating the vtable ↵Anders Carlsson2010-03-291-0/+7
| | | | | | initializer and we weren't storing the secondary virtual pointer indices. llvm-svn: 99786
* Add and implement CodeGenVTables::getSecondaryVirtualPointerIndex (not used ↵Anders Carlsson2010-03-261-9/+50
| | | | | | yet). llvm-svn: 99608
OpenPOWER on IntegriCloud