summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* If there were errors, disable 'unused' warnings since they will mostly be noise.Argyrios Kyrtzidis2011-01-312-19/+31
| | | | | | Fixes rdar://8736362. llvm-svn: 124577
* Error for use of field from anonymous struct or union should say "invalid ↵Argyrios Kyrtzidis2011-01-312-1/+13
| | | | | | | | use of nonstatic data member" not "call to non-static member function without an object argument". llvm-svn: 124576
* Amazing that there are still issues with the fields of anonymous struct/unions..Argyrios Kyrtzidis2011-01-314-14/+65
| | | | | | 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
* Allow Microsoft attributes in a constructor's parameter list.Francois Pichet2011-01-312-0/+12
| | | | | | This fixes a few compile errors when parsing <regex> from MSVC 2008 with clang. llvm-svn: 124573
* When building with optimizations, emit vtables where the key is not in the Anders Carlsson2011-01-305-1/+130
| | | | | | | | | | | | | | | | | | | | | | | 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
* Add hardcoded -L/usr/lib after all -L options to the FreeBSD linkerRoman Divacky2011-01-302-1/+2
| | | | | | | | invocation. This mimics what gcc does and fixes libtool check for libraries. llvm-svn: 124558
* Fix test.Anders Carlsson2011-01-291-2/+2
| | | | llvm-svn: 124555
* 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-293-12/+17
| | | | | | data based on the explicit visibility of the type. llvm-svn: 124553
* Support for -plugin-arg- with -add-pluginNico Weber2011-01-293-2/+17
| | | | llvm-svn: 124551
* Move GetLLVMVisibility to CodeGenModule.Anders Carlsson2011-01-292-11/+10
| | | | llvm-svn: 124550
* 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 RTTIBuilder::GetAddrOfTypeName which uses the newly added ↵Anders Carlsson2011-01-292-5/+42
| | | | | | | | CreateOrReplaceCXXRuntimeVariable. Set the visibility for typeinfo names. llvm-svn: 124548
* Change CodeGenModule::setTypeVisibility to take a TypeVisibilityKind enum ↵Anders Carlsson2011-01-295-6/+16
| | | | | | instead of an "IsForRTTI" flag. llvm-svn: 124546
* Add a test for RTTI visibility.Anders Carlsson2011-01-291-0/+35
| | | | llvm-svn: 124543
* Replace an isa/cast with a dyn_cast.Anders Carlsson2011-01-291-2/+2
| | | | llvm-svn: 124542
* Get rid of an unneeded parameter from setGlobalVisibility.Anders Carlsson2011-01-293-10/+7
| | | | llvm-svn: 124541
* Give VTTs the right visibility.Anders Carlsson2011-01-292-1/+6
| | | | llvm-svn: 124540
* Make emitting a VTT a two-step process, much like emitting a VTable. You ↵Anders Carlsson2011-01-296-54/+49
| | | | | | first get the address of the VTT, and then pass it to EmitVTTDefinition. llvm-svn: 124539
* Use CGM.CreateOrReplaceCXXRuntimeVariable in CGVTables.cppAnders Carlsson2011-01-292-48/+5
| | | | llvm-svn: 124538
* Add a new function, to be used by CGRTTI, CGVTables and CGVTT (which each ↵Anders Carlsson2011-01-292-0/+47
| | | | | | has their own copy of this code). llvm-svn: 124537
* Replace a literal '8' with getCharWidth().Ken Dyck2011-01-291-2/+3
| | | | llvm-svn: 124536
* Remove IsDefinition from CodeGenModule::setTypeVisibility; it is always true.Anders Carlsson2011-01-294-6/+5
| | | | llvm-svn: 124529
* When trying to get the most derived class, don't assume that we can ignore ↵Anders Carlsson2011-01-292-1/+29
| | | | | | 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-292-1/+38
| | | | | | 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-292-2/+27
| | | | | | 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-284-1/+88
| | | | | | | indirect vf calls and addition of extra entry at bottom of vtbls. llvm-svn: 124507
* Document how to add an attribute to clang. This should be reviewed by someoneJeffrey Yasskin2011-01-281-0/+76
| | | | | | who actually knows how it works. llvm-svn: 124506
* Fix some corner cases in the __is_base_of logic.John McCall2011-01-284-26/+46
| | | | llvm-svn: 124505
* Add my new file to the CMake lists, sorry about that.John McCall2011-01-281-0/+1
| | | | llvm-svn: 124503
* Make the FreeBSD driver test more robust so it doesn't fail when there's a ↵Benjamin Kramer2011-01-281-1/+1
| | | | | | single lib32 path. llvm-svn: 124494
* Move all the cleanups framework code into a single file.John McCall2011-01-288-1661/+1710
| | | | | | Pure motion. llvm-svn: 124484
* Reorganize the value-dominance metaprogram and introduce a specializationJohn McCall2011-01-282-121/+119
| | | | | | for CodeGen's RValue type. llvm-svn: 124483
* Convert the exception-freeing cleanup over to the conditional cleanups code,John McCall2011-01-285-150/+141
| | | | | | | | | 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
* PR9037: Allow override, final, and new as an extension on inline members.Nico Weber2011-01-287-7/+65
| | | | llvm-svn: 124477
* Not really any point to testing control flow in this test withoutJohn McCall2011-01-281-8/+1
| | | | | | ret duplication. llvm-svn: 124476
* Update exceptions.m for r124462.Eric Christopher2011-01-281-4/+7
| | | | llvm-svn: 124474
* Give OpaqueValueExpr a source location, because its source locationDouglas Gregor2011-01-2810-12/+34
| | | | | | | | might be queried in places where we absolutely require a valid location (e.g., for template instantiation). Fixes some major brokenness in the use of __is_convertible_to. llvm-svn: 124465
* Allow elision of invocations of move constructors from temporary objects.Douglas Gregor2011-01-272-7/+4
| | | | llvm-svn: 124455
* When producing IR for a lvalue-to-rvalue cast *as an lvalue*, onlyDouglas Gregor2011-01-272-2/+55
| | | | | | | | | 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
* Fix an objective-c rewriter bug rewriting a __block Fariborz Jahanian2011-01-272-5/+24
| | | | | | | variable declaration of a struct declared type. // rdar://8918702 llvm-svn: 124451
* Teach the evaluation of the __is_convertible_to trait to translateDouglas Gregor2011-01-275-39/+122
| | | | | | | | | | | | | | | access control errors into SFINAE errors, so that the trait provides enough support to implement the C++0x std::is_convertible type trait. To get there, the SFINAETrap now knows how to set up a SFINAE context independent of any template instantiations or template argument deduction steps, and (separately) can set a Sema flag to translate access control errors into SFINAE errors. The latter can also be useful if we decide that access control errors during template argument deduction should cause substitution failure (rather than a hard error) as has been proposed for C++0x. llvm-svn: 124446
* Adjust casing of attributes in examples.Ted Kremenek2011-01-271-2/+2
| | | | llvm-svn: 124445
* Separate the access-control diagnostics from other diagnostics that do not ↵Douglas Gregor2011-01-2712-36/+50
| | | | | | have SFINAE behavior. llvm-svn: 124441
* Document some serious badness in our evaluation of the type traits: we need ↵Douglas Gregor2011-01-271-0/+2
| | | | | | to be sure we have complete types in many cases llvm-svn: 124428
* Implement the Microsoft __is_convertible_to type trait, modeling theDouglas Gregor2011-01-278-6/+85
| | | | | | | | | | semantics after the C++0x is_convertible type trait. This implementation is not 100% complete, because it allows access errors to be hard errors (rather than just evaluating false). Original patch by Steven Watanabe! llvm-svn: 124425
* Fixed parameter names.Abramo Bagnara2011-01-273-13/+13
| | | | llvm-svn: 124408
* Fix download link.Ted Kremenek2011-01-271-1/+1
| | | | llvm-svn: 124405
* Add missing </a>Ted Kremenek2011-01-271-1/+1
| | | | llvm-svn: 124403
OpenPOWER on IntegriCloud