summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX
Commit message (Collapse)AuthorAgeFilesLines
* Make that test case actually test something, and add another test.John McCall2011-02-011-2/+12
| | | | llvm-svn: 124654
* The code trying to assign a typedef to an anonymous tag declaration wasJohn McCall2011-02-011-0/+11
| | | | | | | | extremely rambunctious, both on parsing and on template instantiation. Calm it down, fixing an internal consistency assert on anonymous enum instantiation manglings. llvm-svn: 124653
* Revert 124633. The linker has been told how to merge available_externally.Rafael Espindola2011-02-011-1/+1
| | | | llvm-svn: 124651
* Set visibility for available_externally globals. This is important for two ↵Rafael Espindola2011-02-011-1/+1
| | | | | | | | | | reasons: * llvm-link would complains about mismatched visibility * If we produce a relocation with an available_externally, it is good to know that it is hidden. llvm-svn: 124633
* Amazing that there are still issues with the fields of anonymous struct/unions..Argyrios Kyrtzidis2011-01-311-0/+14
| | | | | | Allow taking the address of such a field for a pointer-to-member constant. Fixes rdar://8818236. llvm-svn: 124575
* Fix test that didn't actually test what it wanted to test.Argyrios Kyrtzidis2011-01-311-4/+4
| | | | llvm-svn: 124574
* When building with optimizations, emit vtables where the key is not in the Anders Carlsson2011-01-301-0/+55
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fix test.Anders Carlsson2011-01-291-2/+2
| | | | llvm-svn: 124555
* When emitting RTTI for a non-class type, compute the visibility of the RTTI ↵Anders Carlsson2011-01-292-2/+2
| | | | | | data based on the explicit visibility of the type. llvm-svn: 124553
* Update tests.Anders Carlsson2011-01-292-2/+2
| | | | | | I'm still not sure if having the typenames be visible with -hidden-weak-vtables, but I think it makes sense. llvm-svn: 124549
* Add a test for RTTI visibility.Anders Carlsson2011-01-291-0/+35
| | | | llvm-svn: 124543
* Give VTTs the right visibility.Anders Carlsson2011-01-291-1/+3
| | | | llvm-svn: 124540
* Make emitting a VTT a two-step process, much like emitting a VTable. You ↵Anders Carlsson2011-01-291-3/+3
| | | | | | first get the address of the VTT, and then pass it to EmitVTTDefinition. llvm-svn: 124539
* When trying to get the most derived class, don't assume that we can ignore ↵Anders Carlsson2011-01-291-0/+12
| | | | | | all casts. We can only ignore derived-to-base and no-op casts. Fixes selfhost. llvm-svn: 124528
* When calling a virtual member function on a base class and the most derived ↵Anders Carlsson2011-01-291-0/+14
| | | | | | class is marked 'final', we can devirtualize the call. llvm-svn: 124524
* When doing a derived-to-base class through a virtual class, we don't have to ↵Anders Carlsson2011-01-291-0/+16
| | | | | | get the vbase offset from the vtable if the derived class is marked final. llvm-svn: 124523
* More work to support -fapple-kext regarding Fariborz Jahanian2011-01-281-0/+77
| | | | | | | indirect vf calls and addition of extra entry at bottom of vtbls. llvm-svn: 124507
* Convert the exception-freeing cleanup over to the conditional cleanups code,John McCall2011-01-281-31/+53
| | | | | | | | | fixing a crash which probably nobody was ever going to see. In doing so, fix a horrendous number of problems with the conditional-cleanups code. Also, make conditional cleanups re-use the cleanup's activation variable, which avoids some unfortunate repetitiveness. llvm-svn: 124481
* Allow elision of invocations of move constructors from temporary objects.Douglas Gregor2011-01-271-6/+3
| | | | llvm-svn: 124455
* When producing IR for a lvalue-to-rvalue cast *as an lvalue*, onlyDouglas Gregor2011-01-271-0/+52
| | | | | | | | | non-class prvalues actually require the realization of a temporary. For everything else, we already have an lvalue (or class prvalue) in the subexpression. Note: we're missing some move elision in this case. I'll tackle that next. llvm-svn: 124453
* Do a proper recursive lookup when deciding whether a class's usualJohn McCall2011-01-271-3/+67
| | | | | | | | | deallocation function has a two-argument form. Store the result of this check in new[] and delete[] nodes. Fixes rdar://problem/8913519 llvm-svn: 124373
* When mangling a qualified array type, push the qualifiers down to theJohn McCall2011-01-261-0/+12
| | | | | | element type. Fixes rdar://problem/8913416. llvm-svn: 124315
* Fix some obvious bugs in the conditional-cleanup code and then make theJohn McCall2011-01-262-5/+3
| | | | | | dtor cleanup use it. llvm-svn: 124309
* Rvalue references for *this: add name mangling for ref-qualifiers,Douglas Gregor2011-01-261-0/+16
| | | | | | | | using rules that I just made up this morning. This encoding has now been proposed to the Itanium C++ ABI group for inclusion, but of course it's still possible that the mangling will change. llvm-svn: 124296
* Better framework for conditional cleanups; untested as yet.John McCall2011-01-261-4/+1
| | | | | | | | I'm separately committing this because it incidentally changes some block orderings and minor IR issues, like using a phi instead of an unnecessary alloca. llvm-svn: 124277
* Move unnamed_addr after the function arguments on Sabre's request.Rafael Espindola2011-01-2528-79/+79
| | | | llvm-svn: 124210
* When performing a glvalue-to-xvalue static_cast that involves aDouglas Gregor2011-01-251-0/+36
| | | | | | | derived-to-base conversion, set the cast kind and base path appropriately. llvm-svn: 124189
* Mark VTables and RTTI data linkonce_odr instead of weak_odr, with the ↵Anders Carlsson2011-01-249-58/+58
| | | | | | | | exception of explicit template instantiations, which have to be weak_odr. This fixes PR6996. llvm-svn: 124089
* Get rid of the [[final]] C++0x attribute.Anders Carlsson2011-01-231-6/+6
| | | | llvm-svn: 124083
* Promote the static getNRVOCandidate() function, which computed theDouglas Gregor2011-01-211-0/+13
| | | | | | | | | | | | | NRVO candidate for a return statement, to Sema::getCopyElisionCandidate(), and teach it enough to also determine the NRVO candidate for a throw expression. We still don't use the latter information, however. Along the way, implement core issue 1148, which eliminates copy elision from catch parameters and clarifies that copy elision cannot occur from function parameters (which we already implemented). llvm-svn: 123982
* Move cheking of kext into canDevirtualizeMemberFunctionCalls().Fariborz Jahanian2011-01-211-2/+1
| | | | | | Improve on test case. Per Doug's comment. wip. llvm-svn: 123954
* apple kext abi requires all vf calls, including qualifiedFariborz Jahanian2011-01-201-0/+15
| | | | | | vf calls, be made indirect. This patch is towards that goal. llvm-svn: 123922
* Add unnamed_addr in CreateRuntimeVariable.Rafael Espindola2011-01-181-0/+1
| | | | llvm-svn: 123773
* Fix newlines.Daniel Dunbar2011-01-181-60/+60
| | | | llvm-svn: 123742
* tests: Force a triple.Daniel Dunbar2011-01-181-1/+1
| | | | llvm-svn: 123741
* Add support for explicit constructor calls in Microsoft mode.Francois Pichet2011-01-181-0/+60
| | | | | | | | | | | | | | | | | | | For example: class A{ public: A& operator=(const A& that) { if (this != &that) { this->A::~A(); this->A::A(that); // <=== explicit constructor call. } return *this; } }; More work will be needed to support an explicit call to a template constructor. llvm-svn: 123735
* Also set unnamed_addr on declarations.Rafael Espindola2011-01-152-5/+5
| | | | llvm-svn: 123531
* Fixed by r123477.Owen Anderson2011-01-141-1/+0
| | | | llvm-svn: 123478
* temporarily xfail, this was broken by r123418 Chris Lattner2011-01-141-0/+1
| | | | llvm-svn: 123430
* Fix a test caseDouglas Gregor2011-01-131-1/+1
| | | | llvm-svn: 123382
* When your comments and your code are out-of-sync, the test case is wrong.Douglas Gregor2011-01-131-10/+10
| | | | llvm-svn: 123379
* Add tests for name mangling of variadic templates.Douglas Gregor2011-01-131-1/+55
| | | | llvm-svn: 123378
* Only add unnamed_addr to definitions.Rafael Espindola2011-01-132-5/+5
| | | | llvm-svn: 123354
* Add IR generation support for SizeOfPackExpr.Douglas Gregor2011-01-121-0/+12
| | | | llvm-svn: 123332
* Set unnamed_addr in every type info.Rafael Espindola2011-01-115-96/+96
| | | | llvm-svn: 123293
* Set unnamed_addr in VTTs.Rafael Espindola2011-01-113-8/+8
| | | | llvm-svn: 123280
* Set unnamed_addr for type infos that we are confortable marking as hidden. IRafael Espindola2011-01-112-6/+6
| | | | | | think it is safe to mark all type infos with unnamed_addr, but I am not sure. llvm-svn: 123275
* Add unnamed_addr to vtables.Rafael Espindola2011-01-117-35/+35
| | | | llvm-svn: 123272
* Add unnamed_addr to constructors and destructors.Rafael Espindola2011-01-1128-79/+79
| | | | llvm-svn: 123197
* Add unnamed_addr when creating artificial string globals. For example, inRafael Espindola2011-01-101-53/+53
| | | | | | | | | static const char foo[] = "foo"; static const char *bar = "bar"; the global created to hold "bar" will have it, but foo will not. llvm-svn: 123192
OpenPOWER on IntegriCloud