summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGRTTI.cpp
Commit message (Collapse)AuthorAgeFilesLines
* c++: support gcc's application of weak attribute onFariborz Jahanian2011-10-211-0/+2
| | | | | | | | | | | | | class declaration which forces any such class and any class that inherits from such a class to have their typeinfo symbols be marked as weak. // rdar://10246395 A test/CodeGenCXX/weak-extern-typeinfo.cpp M lib/Sema/SemaDeclCXX.cpp M lib/Sema/SemaDeclAttr.cpp M lib/CodeGen/CGRTTI.cpp llvm-svn: 142693
* More metaprogramming with builtin types.John McCall2011-10-181-4/+4
| | | | llvm-svn: 142433
* Add a new placeholder type to represent "unbridged"John McCall2011-10-171-0/+1
| | | | | | | | casts in ARC. No semantic analysis yet. llvm-svn: 142208
* Provide half floating point support as a storage only type.Anton Korobeynikov2011-10-141-0/+1
| | | | | | Lack of half FP was a regression compared to llvm-gcc. llvm-svn: 142016
* Rename TagDecl::isDefinition -> isCompleteDefinitionJohn McCall2011-10-071-1/+1
| | | | | | | for better self-documenting code, since the semantics are subtly different from getDefinition(). llvm-svn: 141355
* Support for C1x _Atomic specifier (see testcase). This is primarily being ↵Eli Friedman2011-10-061-0/+5
| | | | | | | | committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic. Thanks to Jeffrey Yasskin for the thorough review! llvm-svn: 141330
* Create a VTableContext class and start moving CodeGenVTables methods to itPeter Collingbourne2011-09-261-1/+1
| | | | llvm-svn: 140502
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-5/+5
| | | | llvm-svn: 140367
* CodeGen: rename CodeGenModule::Runtime to ObjCRuntimePeter Collingbourne2011-07-271-1/+1
| | | | llvm-svn: 136254
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-5/+5
| | | | | | | | 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-8/+8
| | | | llvm-svn: 135370
* Update to match mainline ConstantStruct::get API change. Also, use Chris Lattner2011-06-201-3/+1
| | | | | | | | | | | ConvertType on InitListExprs as they are being converted. This is needed for a forthcoming patch, and improves the IR generated anyway (see additional type names in testcases). This patch also converts a bunch of std::vector's in CGObjCMac to use C arrays. There are a ton more that should be converted as well. llvm-svn: 133413
* Make yet another placeholder type, this one marking that an expression is a ↵John McCall2011-04-261-1/+2
| | | | | | | | | | | bound member function, i.e. something of the form 'x.f' where 'f' is a non-static member function. Diagnose this in the general case. Some of the new diagnostics are probably worse than the old ones, but we now get this right much more universally, and there's certainly room for improvement in the diagnostics. llvm-svn: 130239
* Eliminate a divide-by-8 in BuildVMIClassTypeInfo() by using CharUnits forKen Dyck2011-04-091-4/+5
| | | | | | the base offset. No change in functionality intended. llvm-svn: 129179
* [Reapply r128776, modified so that it does not break debug info.]Ken Dyck2011-04-071-1/+2
| | | | | | | Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() to CharUnits. No change in functionality intended. llvm-svn: 129072
* Basic, untested implementation for an "unknown any" type requested by LLDB.John McCall2011-04-071-0/+1
| | | | | | | | | | | | The idea is that you can create a VarDecl with an unknown type, or a FunctionDecl with an unknown return type, and it will still be valid to access that object as long as you explicitly cast it at every use. I'm still going back and forth about how I want to test this effectively, but I wanted to go ahead and provide a skeletal implementation for the LLDB folks' benefit and because it also improves some diagnostic goodness for placeholder expressions. llvm-svn: 129065
* Revert r128770, r128771, r128773 and r128776 for now. It breaks debug info.Devang Patel2011-04-041-2/+1
| | | | llvm-svn: 128842
* Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() toKen Dyck2011-04-021-1/+2
| | | | | | CharUnits. No change in functionality intended. llvm-svn: 128776
* Fix Objective-C++ exceptions (GNU runtime).David Chisnall2011-03-201-0/+5
| | | | llvm-svn: 127980
* Implement the C++0x deduced 'auto' feature.Richard Smith2011-02-201-1/+0
| | | | | | This fixes PR 8738, 9060 and 9132. llvm-svn: 126069
* For consistency, use llvm::raw_ostream in the rest of the mangle api.Rafael Espindola2011-02-111-4/+12
| | | | llvm-svn: 125360
* When building with optimizations, emit vtables where the key is not in the Anders Carlsson2011-01-301-1/+56
| | | | | | | | | | | | | | | | | | | | | | | current translation unit as available_externally. This helps devirtualize the second example in PR3100, comment 18: struct S { S() {}; virtual void xyzzy(); }; inline void foo(S *s) { s->xyzzy(); } void bar() { S s; foo(&s); } This involved four major changes: 1. In DefineUsedVTables, always mark virtual member functions as referenced for non-template classes and class template specializations. 2. In CodeGenVTables::ShouldEmitVTableInThisTU return true if optimizations are enabled, even if the key function is not implemented in this translation unit. We don't ever do this for code compiled with -fapple-kext, because we don't ever want to devirtualize virtual member function calls in that case. 3. Give the correct linkage for vtables where the key function is not defined. 4. Update the linkage for RTTI structures when necessary. llvm-svn: 124565
* Remove dead code.Anders Carlsson2011-01-291-57/+3
| | | | llvm-svn: 124554
* When emitting RTTI for a non-class type, compute the visibility of the RTTI ↵Anders Carlsson2011-01-291-10/+15
| | | | | | data based on the explicit visibility of the type. llvm-svn: 124553
* Add RTTIBuilder::GetAddrOfTypeName which uses the newly added ↵Anders Carlsson2011-01-291-5/+38
| | | | | | | | CreateOrReplaceCXXRuntimeVariable. Set the visibility for typeinfo names. llvm-svn: 124548
* Change CodeGenModule::setTypeVisibility to take a TypeVisibilityKind enum ↵Anders Carlsson2011-01-291-1/+1
| | | | | | instead of an "IsForRTTI" flag. llvm-svn: 124546
* Make emitting a VTT a two-step process, much like emitting a VTable. You ↵Anders Carlsson2011-01-291-1/+1
| | | | | | first get the address of the VTT, and then pass it to EmitVTTDefinition. llvm-svn: 124539
* Remove IsDefinition from CodeGenModule::setTypeVisibility; it is always true.Anders Carlsson2011-01-291-1/+1
| | | | llvm-svn: 124529
* When building a type info struct for EH, we always want it to have ↵Anders Carlsson2011-01-241-0/+6
| | | | | | linkonce_odr linkage. llvm-svn: 124096
* Change CodeGenModule::getVTableLinkage to be a non-static member function.Anders Carlsson2011-01-241-3/+4
| | | | llvm-svn: 124095
* Mark VTables and RTTI data linkonce_odr instead of weak_odr, with the ↵Anders Carlsson2011-01-241-3/+3
| | | | | | | | exception of explicit template instantiations, which have to be weak_odr. This fixes PR6996. llvm-svn: 124089
* Set unnamed_addr in every type info.Rafael Espindola2011-01-111-4/+2
| | | | llvm-svn: 123293
* Set unnamed_addr for type infos that we are confortable marking as hidden. IRafael Espindola2011-01-111-1/+5
| | | | | | think it is safe to mark all type infos with unnamed_addr, but I am not sure. llvm-svn: 123275
* The -fshort-wchar option causes wchar_t to become unsigned, in addition to beingChris Lattner2010-12-251-1/+2
| | | | | | | 16-bits in size. Implement this by splitting WChar into two enums, like we have for char. This fixes a miscompmilation of XULRunner, PR8856. llvm-svn: 122558
* Give hidden visibility to RTTI for derived types. This is kindof a hackyJohn McCall2010-12-171-3/+5
| | | | | | way to do this, but it fixes rdar://problem/8778973 llvm-svn: 122033
* std::nullptr_t is a fundamental type for RTTI purposes.Anders Carlsson2010-11-041-18/+16
| | | | llvm-svn: 118238
* Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a ↵Anders Carlsson2010-10-311-1/+1
| | | | | | 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
* Substantially revise how clang computes the visibility of a declaration toJohn McCall2010-10-221-1/+1
| | | | | | | | more closely parallel the computation of linkage. This gets us to a state much closer to what gcc emits, modulo bugs, which will undoubtedly arise in abundance. llvm-svn: 117147
* More class anonymization.Benjamin Kramer2010-10-221-6/+8
| | | | llvm-svn: 117106
* Make sure the VTables for template instantiations are emitted even if the ↵Argyrios Kyrtzidis2010-10-111-11/+5
| | | | | | key function doesn't have a body. llvm-svn: 116186
* Don't let typeinfo name symbols be 'internal hidden', it can lead to linker ↵Argyrios Kyrtzidis2010-10-111-1/+1
| | | | | | | | conflicts with similarly named classes in anonymous namespaces. llvm-svn: 116185
* Petty optimization.John McCall2010-09-041-1/+1
| | | | llvm-svn: 113049
* Teach IR generation to return 'this' from constructors and destructorsJohn McCall2010-08-311-3/+4
| | | | | | under the ARM ABI. llvm-svn: 112588
* Detabify.Eli Friedman2010-08-221-1/+1
| | | | llvm-svn: 111768
* Explicitly handle every case in the switch in RTTIBuilder::BuildTypeInfo.Eli Friedman2010-08-151-2/+15
| | | | llvm-svn: 111085
* Just disable the hidden-visibility optimization for now by hiding it behindJohn McCall2010-08-121-3/+8
| | | | | | | | a -cc1 option. The Darwin linker complains about mixed visibility when linking gcc-built objects with clang-built objects, and the optimization isn't really that valuable. Platforms with less ornery linkers can feel free to enable this. llvm-svn: 110979
* Implement RTTI generation for Objective C types. Fixes PR7864.John McCall2010-08-121-16/+73
| | | | llvm-svn: 110900
* Work in progress for PR7864. Someone more familiar with ObjC++ needs to fillEli Friedman2010-08-111-3/+24
| | | | | | in the code after the "FIXME: Needs to be written". llvm-svn: 110849
OpenPOWER on IntegriCloud