summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGRTTI.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Don't treat a non-deduced 'auto' type as being type-dependent. Instead, thereRichard Smith2013-04-301-0/+6
| | | | | | | | are now two distinct canonical 'AutoType's: one is the undeduced 'auto' placeholder type, and the other is a deduced-but-dependent type. All deduced-to-a-non-dependent-type cases are still non-canonical. llvm-svn: 180789
* Add OpenCL samplers as Clang builtin types and check sampler related ↵Guy Benyei2013-02-071-0/+1
| | | | | | restrictions. llvm-svn: 174601
* The standard ARM C++ ABI dictates that inline functions areJohn McCall2013-01-251-3/+7
| | | | | | | | 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
* Implement OpenCL event_t as Clang builtin type, including event_t related ↵Guy Benyei2013-01-201-0/+1
| | | | | | OpenCL restrictions (OpenCL 1.2 spec 6.9) llvm-svn: 172973
* Re-commit r170428 changes with Linux style file endings.Guy Benyei2012-12-181-0/+6
| | | | | | Add OpenCL images as clang builtin types. llvm-svn: 170432
* Revert changes from r170428, as I accidentally changed the line endings of ↵Guy Benyei2012-12-181-1017/+1011
| | | | | | these files to Windows style. llvm-svn: 170431
* Add OpenCL images as clang builtin types.Guy Benyei2012-12-181-1011/+1017
| | | | llvm-svn: 170428
* 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
* Simplify: replace getContext().getLangOpts() with just getLangOpts().Richard Smith2012-11-011-1/+1
| | | | llvm-svn: 167261
* Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. ↵Sylvestre Ledru2012-09-271-2/+2
| | | | | | See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766 llvm-svn: 164769
* Fix a typo 'iff' => 'if'Sylvestre Ledru2012-09-271-2/+2
| | | | llvm-svn: 164766
* Fix integer unsigned behavior in clang due to signed left shift overflow.Richard Smith2012-08-241-1/+1
| | | | llvm-svn: 162626
* Fix a few -Wdocumentation warnings.Dmitri Gribenko2012-08-241-1/+0
| | | | llvm-svn: 162506
* Reduce duplicated hash map lookups.Benjamin Kramer2012-08-221-8/+4
| | | | llvm-svn: 162361
* Restructure how the driver communicates information about theJohn McCall2012-06-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. llvm-svn: 158793
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-4/+4
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* simplify a bunch of code to use the well-known LLVM IR types computed by ↵Chris Lattner2012-02-071-17/+11
| | | | | | CodeGenModule. llvm-svn: 149943
* reapply the patches reverted in r149477, which enable ConstantDataArray.Chris Lattner2012-02-051-1/+2
| | | | llvm-svn: 149801
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-4/+4
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Revert r149363 which was part a series of commits that were reverted in llvmArgyrios Kyrtzidis2012-02-011-2/+1
| | | | | | | | | | | | | | | | | commit 149470. This fixes test/CodeGen/PR3589-freestanding-libcalls.c. Original log: ConstantArray::get() (for strings) is going away, use ConstantDataArray::getString instead. Many instances of ConstantArray::get() could be moved to use more efficient ConstantDataArray methods that avoid a ton of intermediate Constant*'s for each element (e.g. GetConstantArrayFromStringLiteral). I don't plan on doing this in the short-term though. llvm-svn: 149477
* ConstantArray::get() (for strings) is going away, useChris Lattner2012-01-311-1/+2
| | | | | | | | | | | | ConstantDataArray::getString instead. Many instances of ConstantArray::get() could be moved to use more efficient ConstantDataArray methods that avoid a ton of intermediate Constant*'s for each element (e.g. GetConstantArrayFromStringLiteral). I don't plan on doing this in the short-term though. llvm-svn: 149363
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-4/+3
| | | | llvm-svn: 148577
* 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
OpenPOWER on IntegriCloud