summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* When copying a partial diagnostic into a DependentDiagnostic, allocateDouglas Gregor2010-03-291-13/+6
| | | | | | | | | storage for that partial diagnostic via the ASTContext's BumpPtrAllocator rather than using up slots in the ASTContext's cache. Now that we do this, we don't have to worry about destroying dependent diagnostics when destroying a DependentStoredDeclsMap. llvm-svn: 99854
* Optimize PartialDiagnostic's memory-allocation behavior by placing aDouglas Gregor2010-03-2912-64/+105
| | | | | | | | | | | | | | cache of PartialDiagnostic::Storage objects into an allocator within the ASTContext. This eliminates a significant amount of malloc traffic, for a 10% performance improvement in -fsyntax-only wall-clock time with 403.gcc's combine.c. Also, eliminate the RequireNonAbstractType hack I put in earlier, which was but a symptom of this larger problem. Fixes <rdar://problem/7806091>. llvm-svn: 99849
* Exit early from the simple form of Sema::RequireNonAbstractType(), forDouglas Gregor2010-03-291-0/+3
| | | | | | a 2.47% speedup in 403.gcc. llvm-svn: 99830
* When collecting virtual bases it's very important to use the canonical type ↵Anders Carlsson2010-03-291-3/+3
| | | | | | of the base class. Otherwise, we might add the same virtual base class twice if the virtual base is an instantiated template. Fixes PR6251. llvm-svn: 99829
* Remove FIXME comment.Ted Kremenek2010-03-291-1/+0
| | | | llvm-svn: 99828
* Change 'TypeCache' from being an std::map to a llvm::DenseMap. This reduces ↵Ted Kremenek2010-03-292-2/+2
| | | | | | | | codegen time on one .i file from 403.gcc by 0.5%. llvm-svn: 99823
* add support for -MQ flag to quote targets in dependency file,Chris Lattner2010-03-291-6/+52
| | | | | | PR6661, patch by Ori Avtalion! llvm-svn: 99821
* emit signed integer subtractions as 'sub nsw', patch byChris Lattner2010-03-291-0/+5
| | | | | | Anton Yartsev! llvm-svn: 99817
* Another vtable layout fix, making us match gcc better.Anders Carlsson2010-03-291-2/+9
| | | | llvm-svn: 99812
* Support __attribute__((packed)) (along with other attributes) at theDouglas Gregor2010-03-293-5/+8
| | | | | | end of a struct/class/union in C++, from Justin Bogner! llvm-svn: 99811
* Handle pure virtual member functions.Anders Carlsson2010-03-291-16/+33
| | | | llvm-svn: 99807
* Fix a nasty bug in the virtual base computation which would lead to us ↵Anders Carlsson2010-03-291-49/+37
| | | | | | initializing virtual bases in the wrong order. llvm-svn: 99806
* Be a bit more consistent in using operator->Rafael Espindola2010-03-294-5/+5
| | | | | | | This patch moves some methods from QualType to Type and changes the users to use -> instead of . llvm-svn: 99805
* More vtable work - it's not possible to use the new vtable code for ↵Anders Carlsson2010-03-292-22/+78
| | | | | | everything by setting a flag inside CGVtable.cpp. My plan is to run some tests and bootstrap and once that's done flip the bit. llvm-svn: 99804
* Only add thunks for the most derived class. This fixes some link errors I ↵Anders Carlsson2010-03-291-2/+3
| | | | | | was seeing in files generated by the vtable tester utility. llvm-svn: 99801
* Flip the switch to always get vtables from the VTT when necessary, I've ↵Anders Carlsson2010-03-291-7/+3
| | | | | | verified that clang bootstraps with this. llvm-svn: 99800
* Use the newly added function in the VTT builder.Anders Carlsson2010-03-291-3/+2
| | | | llvm-svn: 99799
* Cleanup, no functionality change.Anders Carlsson2010-03-293-6/+18
| | | | llvm-svn: 99798
* Add the thunks needed by this vtable.Anders Carlsson2010-03-291-0/+11
| | | | llvm-svn: 99793
* Make sure to sort the vtable thunks by their vtable index :) With this we ↵Anders Carlsson2010-03-291-0/+3
| | | | | | now pass the test from http://www.codesourcery.com/public/cxx-abi/abi-examples.html#vtable-ctor successfully. llvm-svn: 99792
* Fix another thinko, so that flags don't depend on previous bases.Anders Carlsson2010-03-291-5/+7
| | | | llvm-svn: 99791
* When generating base ctors/dtors, we need to lookup virtual bases using the ↵Anders Carlsson2010-03-291-4/+15
| | | | | | vtable. llvm-svn: 99790
* Fix thinko.Anders Carlsson2010-03-291-1/+1
| | | | llvm-svn: 99788
* Use construction vtables when needed. This is currently guarded by ↵Anders Carlsson2010-03-291-5/+29
| | | | | | -fdump-vtable-layouts since it doesn't work 100% yet :) llvm-svn: 99787
* Two bug fixes, we weren't updating the thunk index when creating the vtable ↵Anders Carlsson2010-03-292-0/+9
| | | | | | initializer and we weren't storing the secondary virtual pointer indices. llvm-svn: 99786
* Reapply r99775 with a fix for a silly bug - we were setting the vtable ↵Anders Carlsson2010-03-282-51/+64
| | | | | | pointer for all bases, even those without a vtable pointer :) llvm-svn: 99777
* Looks like I broke self-host again :(.Anders Carlsson2010-03-282-59/+50
| | | | llvm-svn: 99776
* More improvements to setting the vtable pointer. We now no longer set the ↵Anders Carlsson2010-03-282-50/+59
| | | | | | vtable pointer for non-virtual primary bases. We also do a pre-order traversal of the class hierarchy; this is necessary in order to get the right vbase offset offsets in base ctors/dtors. llvm-svn: 99775
* Factor vtable pointer setting code out into a separate function.Anders Carlsson2010-03-282-22/+45
| | | | llvm-svn: 99773
* After performing template argument deduction for a function template,Douglas Gregor2010-03-286-137/+365
| | | | | | | | | | | | | | | | | | | | check deduced non-type template arguments and template template arguments against the template parameters for which they were deduced, performing conversions as appropriate so that deduced template arguments get the same treatment as explicitly-specified template arguments. This is the bulk of PR6723. Also keep track of whether deduction of a non-type template argument came from an array bound (vs. anywhere else). With this information, we enforce C++ [temp.deduct.type]p17, which requires exact type matches when deduction deduces a non-type template argument from something that is not an array bound. Finally, when in a SFINAE context, translate the "zero sized arrays are an extension" extension diagnostic into a hard error (for better standard conformance), which was a minor part of PR6723. llvm-svn: 99734
* Checker: random include cleanup.Benjamin Kramer2010-03-2732-43/+49
| | | | llvm-svn: 99731
* Further improvement to point to categoryFariborz Jahanian2010-03-272-4/+11
| | | | | | whose protocolls methods needs implementation. llvm-svn: 99730
* Give thunks the same linkage as their original methods.Anders Carlsson2010-03-271-8/+1
| | | | llvm-svn: 99729
* Improve diagnostics on incomplete implementationFariborz Jahanian2010-03-271-3/+10
| | | | | | | | of objc classes; including which methods need be implemented and where they come from. WIP. llvm-svn: 99724
* Accumulate all functions and classes that the effective context isJohn McCall2010-03-271-35/+51
| | | | | | | | nested within, and suddenly local classes start working. Wouldn't be necessary if I hadn't used local classes in Clang in the first place. Or, well, wouldn't be necessary yet. :) llvm-svn: 99709
* Implement method friends in class templates and fix a few related problems.John McCall2010-03-272-31/+79
| | | | llvm-svn: 99708
* When given the magic class __cxxabiv1::__fundamental_type_info, produceRafael Espindola2010-03-273-6/+72
| | | | | | | | the typeinfo for the fundamental types. Fixes PR6685. llvm-svn: 99701
* When mapping restrict to noalias, look for 'restrict' on the parameter variableJohn McCall2010-03-271-2/+6
| | | | | | | instead of the canonical parameter type (which has correctly dropped all such direct qualifiers). Fixes PR6695. llvm-svn: 99688
* Remove unused static functionDouglas Gregor2010-03-261-17/+0
| | | | llvm-svn: 99666
* Put function templates instantiated from friend declarations in the correctJohn McCall2010-03-261-6/+15
| | | | | | lexical context. This is required for ADL to work properly; fixes PR6716. llvm-svn: 99665
* Compare namespaces properly when looking for redeclarations ofDouglas Gregor2010-03-261-1/+3
| | | | | | namespace aliases. Fixes PR6341. llvm-svn: 99664
* Fix NoReturnFunctionChecker to properly look at a function's typeTed Kremenek2010-03-261-41/+41
| | | | | | when determining if it returns. Fixes <rdar://problem/7796563>. llvm-svn: 99663
* Add comment indicating that we intentionally don't add the noreturnTed Kremenek2010-03-261-0/+3
| | | | | | attribute to a FunctionDecl. llvm-svn: 99662
* When adding initializers to a constructor, be sure that we are lookingDouglas Gregor2010-03-261-1/+5
| | | | | | | | through the bases and fields of the definition of the class in which the constructor is declared, rather than some other declaration of that class. llvm-svn: 99661
* Driver/Darwin: Support CCC_ENABLE_NEW_DARWIN_TOOLCHAIN as an environmentDaniel Dunbar2010-03-261-4/+6
| | | | | | | override to enable use of the DarwinClang tool chain on all platforms (not just ARM). llvm-svn: 99660
* Properly account for redeclarations when explicitly instantiating class ↵John McCall2010-03-261-4/+2
| | | | | | | | | | | | | templates. What happens here is that we actually turn the first declaration into a definition, regardless of whether it was actually originally a definition, and furthermore we do this all after we've instantiated all the declarations. This exposes a bug in my DefinitionData patch where it was only setting the DefinitionData for previous declarations, not future declarations. Fortunately, there's an iterator for that. llvm-svn: 99657
* When trying to determine whether one operand of a conditionalDouglas Gregor2010-03-261-7/+9
| | | | | | | | | expression can be converted to the type of another, only apply the lvalue-to-rvalue conversion to the type of the expression we're converting, *not* the array-to-pointer or function-to-pointer conversions. Fixes PR6595. llvm-svn: 99652
* Eliminate the non-InitializedEntity PerformCopyInitialization() andDouglas Gregor2010-03-263-44/+8
| | | | | | | | re-route its only caller to the newer PerformCopyInitialization(). We're down to one remaining caller of Sema::CheckReferenceInit. llvm-svn: 99650
* Fix 80 col violations.Daniel Dunbar2010-03-261-3/+6
| | | | llvm-svn: 99648
* Switch semantic analysis of the conditional operator from usingDouglas Gregor2010-03-263-88/+112
| | | | | | CheckReferenceInit to using the new initialization sequence code. llvm-svn: 99647
OpenPOWER on IntegriCloud