Gabor Greif
bf82f94d35
provide a simpler way to get to the headers
...
llvm-svn: 99843
2010-03-29 21:36:06 +00:00
Douglas Gregor
7ec3d11d16
Exit early from the simple form of Sema::RequireNonAbstractType(), for
...
a 2.47% speedup in 403.gcc.
llvm-svn: 99830
2010-03-29 20:28:52 +00:00
Anders Carlsson
e47380fb19
When collecting virtual bases it's very important to use the canonical type 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
2010-03-29 19:49:09 +00:00
Ted Kremenek
ac031880af
Remove FIXME comment.
...
llvm-svn: 99828
2010-03-29 19:10:41 +00:00
Ted Kremenek
23c29f0cbe
Change 'TypeCache' from being an std::map to a llvm::DenseMap. This reduces codegen time
...
on one .i file from 403.gcc by 0.5%.
llvm-svn: 99823
2010-03-29 18:29:57 +00:00
Chris Lattner
bf2803fb20
add support for -MQ flag to quote targets in dependency file,
...
PR6661, patch by Ori Avtalion!
llvm-svn: 99821
2010-03-29 17:55:58 +00:00
Chris Lattner
5902e7bb22
emit signed integer subtractions as 'sub nsw', patch by
...
Anton Yartsev!
llvm-svn: 99817
2010-03-29 17:28:16 +00:00
Anders Carlsson
eba1a60ef0
Another vtable layout fix, making us match gcc better.
...
llvm-svn: 99812
2010-03-29 15:08:41 +00:00
Douglas Gregor
c48a10d652
Support __attribute__((packed)) (along with other attributes) at the
...
end of a struct/class/union in C++, from Justin Bogner!
llvm-svn: 99811
2010-03-29 14:42:08 +00:00
Anders Carlsson
cb6207f723
Handle pure virtual member functions.
...
llvm-svn: 99807
2010-03-29 05:40:50 +00:00
Anders Carlsson
abb20e6249
Fix a nasty bug in the virtual base computation which would lead to us initializing virtual bases in the wrong order.
...
llvm-svn: 99806
2010-03-29 05:13:12 +00:00
Rafael Espindola
8756268ee5
Be a bit more consistent in using operator->
...
This patch moves some methods from QualType to Type and changes the users to
use -> instead of .
llvm-svn: 99805
2010-03-29 03:39:46 +00:00
Anders Carlsson
a627ac7ee6
More vtable work - it's not possible to use the new vtable code for 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
2010-03-29 03:38:52 +00:00
Anders Carlsson
5a9754187d
More magic.
...
llvm-svn: 99803
2010-03-29 03:26:49 +00:00
Anders Carlsson
473444e05c
Sprinkle some sed dust over check-ztt to make it work with newer clang asm output. (I am not a sed expert so this might be terribly inefficient :)
...
llvm-svn: 99802
2010-03-29 03:21:40 +00:00
Anders Carlsson
800ded68b5
Only add thunks for the most derived class. This fixes some link errors I was seeing in files generated by the vtable tester utility.
...
llvm-svn: 99801
2010-03-29 02:53:58 +00:00
Anders Carlsson
383f4cc8b9
Flip the switch to always get vtables from the VTT when necessary, I've verified that clang bootstraps with this.
...
llvm-svn: 99800
2010-03-29 02:38:51 +00:00
Anders Carlsson
2d016af623
Use the newly added function in the VTT builder.
...
llvm-svn: 99799
2010-03-29 02:14:35 +00:00
Anders Carlsson
f6f24c609b
Cleanup, no functionality change.
...
llvm-svn: 99798
2010-03-29 02:08:26 +00:00
Anders Carlsson
9a97e2ef95
Add the thunks needed by this vtable.
...
llvm-svn: 99793
2010-03-29 01:38:05 +00:00
Anders Carlsson
848d86e5c4
Make sure to sort the vtable thunks by their vtable index :) With this we now pass the test from http://www.codesourcery.com/public/cxx-abi/abi-examples.html#vtable-ctor successfully.
...
llvm-svn: 99792
2010-03-29 01:28:05 +00:00
Anders Carlsson
948d3f4ec6
Fix another thinko, so that flags don't depend on previous bases.
...
llvm-svn: 99791
2010-03-29 01:16:41 +00:00
Anders Carlsson
74d7dfcf8e
When generating base ctors/dtors, we need to lookup virtual bases using the vtable.
...
llvm-svn: 99790
2010-03-29 01:14:25 +00:00
Anders Carlsson
27d86bddfe
Fix thinko.
...
llvm-svn: 99788
2010-03-29 01:12:13 +00:00
Anders Carlsson
5889027ccc
Use construction vtables when needed. This is currently guarded by -fdump-vtable-layouts since it doesn't work 100% yet :)
...
llvm-svn: 99787
2010-03-29 01:08:49 +00:00
Anders Carlsson
8baeaf0a26
Two bug fixes, we weren't updating the thunk index when creating the vtable initializer and we weren't storing the secondary virtual pointer indices.
...
llvm-svn: 99786
2010-03-29 01:04:16 +00:00
Rafael Espindola
3e69c3ed31
Make default arguments to getFunctionNoProtoType an all or nothing option (as they already are in practise).
...
llvm-svn: 99785
2010-03-28 22:48:23 +00:00
Rafael Espindola
2ac0582419
Drop default arguments no one is using.
...
llvm-svn: 99783
2010-03-28 22:19:17 +00:00
Anders Carlsson
d589593c93
Reapply r99775 with a fix for a silly bug - we were setting the vtable pointer for all bases, even those without a vtable pointer :)
...
llvm-svn: 99777
2010-03-28 21:07:49 +00:00
Anders Carlsson
fcc9f91287
Looks like I broke self-host again :(.
...
llvm-svn: 99776
2010-03-28 20:55:21 +00:00
Anders Carlsson
74eab715ae
More improvements to setting the vtable pointer. We now no longer set the 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
2010-03-28 20:34:31 +00:00
Anders Carlsson
e87fae9afa
Factor vtable pointer setting code out into a separate function.
...
llvm-svn: 99773
2010-03-28 19:40:00 +00:00
Douglas Gregor
d5cb1ddb2c
After performing template argument deduction for a function template,
...
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
2010-03-28 02:42:43 +00:00
Benjamin Kramer
c048322523
Checker: random include cleanup.
...
llvm-svn: 99731
2010-03-27 21:19:47 +00:00
Fariborz Jahanian
2e8074bfc3
Further improvement to point to category
...
whose protocolls methods needs implementation.
llvm-svn: 99730
2010-03-27 21:10:05 +00:00
Anders Carlsson
174376629a
Give thunks the same linkage as their original methods.
...
llvm-svn: 99729
2010-03-27 20:50:27 +00:00
Fariborz Jahanian
97752f7c95
Improve diagnostics on incomplete implementation
...
of objc classes; including which methods
need be implemented and where they come from.
WIP.
llvm-svn: 99724
2010-03-27 19:02:17 +00:00
Ted Kremenek
344242f1e4
Remove VS information for analyzer until we have more real support.
...
llvm-svn: 99720
2010-03-27 16:56:20 +00:00
Kovarththanan Rajaratnam
bfc61ea0a7
s/Clangify2010.py/clangify2010.py
...
llvm-svn: 99712
2010-03-27 08:21:15 +00:00
John McCall
3dc81f77f6
Accumulate all functions and classes that the effective context is
...
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
2010-03-27 06:55:49 +00:00
John McCall
2f88d7d72c
Implement method friends in class templates and fix a few related problems.
...
llvm-svn: 99708
2010-03-27 05:57:59 +00:00
Rafael Espindola
6e281ffdc0
Test for the previous commit.
...
llvm-svn: 99702
2010-03-27 02:52:40 +00:00
Rafael Espindola
adcc1d18e2
When given the magic class __cxxabiv1::__fundamental_type_info, produce
...
the typeinfo for the fundamental types.
Fixes PR6685.
llvm-svn: 99701
2010-03-27 02:52:14 +00:00
Ted Kremenek
c59230a7d7
Add initial draft of web page on 'clangifty2010.py' script for analyzing VS projects.
...
llvm-svn: 99691
2010-03-27 01:06:58 +00:00
John McCall
39ec71f2e9
When mapping restrict to noalias, look for 'restrict' on the parameter variable
...
instead of the canonical parameter type (which has correctly dropped all such
direct qualifiers). Fixes PR6695.
llvm-svn: 99688
2010-03-27 00:47:27 +00:00
Ted Kremenek
d76197a271
scan-build: set environment variable LDPLUSPLUS to 'c++-analyzer' to correctly link projects
...
with c++ code.
llvm-svn: 99684
2010-03-27 00:20:01 +00:00
Ted Kremenek
0785d92cae
Fix comparison in isDiagnosticInFlight().
...
llvm-svn: 99667
2010-03-26 23:36:48 +00:00
Douglas Gregor
78d315f646
Remove unused static function
...
llvm-svn: 99666
2010-03-26 23:25:35 +00:00
John McCall
30837102a2
Put function templates instantiated from friend declarations in the correct
...
lexical context. This is required for ADL to work properly; fixes PR6716.
llvm-svn: 99665
2010-03-26 23:10:15 +00:00
Douglas Gregor
4667effa8b
Compare namespaces properly when looking for redeclarations of
...
namespace aliases. Fixes PR6341.
llvm-svn: 99664
2010-03-26 22:59:39 +00:00