Chris Lattner
5e536d85ad
allow this test to pass, even with the recent .s printer changes.
...
Have I ever mentioned that clang regtests should not be grepping .s files??
llvm-svn: 93998
2010-01-20 07:45:09 +00:00
Anders Carlsson
07894e8a0e
More VTT builder fixes. With these fixes we now correctly handle the very complex VTT example from the Itanium ABI spec.
...
llvm-svn: 93725
2010-01-18 17:13:59 +00:00
Anders Carlsson
1af3df854f
Fix a bunch of VTT layout bugs, add simple tests for VTT layout.
...
llvm-svn: 93709
2010-01-18 04:25:18 +00:00
Anders Carlsson
25933d4ecd
Update virt.cpp for changes to the LLVM asm printer (?) This test should really be all LLVM IR...
...
llvm-svn: 93707
2010-01-18 03:58:13 +00:00
Eli Friedman
8fdc2cb46a
Fix crash generating debug info for constructor for anonymous struct.
...
llvm-svn: 93601
2010-01-16 00:43:13 +00:00
Eli Friedman
1fcf66b0dd
Make the AST explicitly represent the cast of the first operand of a
...
pointer-to-member operator.
llvm-svn: 93592
2010-01-16 00:00:48 +00:00
Eli Friedman
cab014721b
Fix a couple bugs in copy assignment operator synthesis.
...
llvm-svn: 93546
2010-01-15 20:06:11 +00:00
Mike Stump
fc4daba5e0
Fix Release-Asserts for the time being.
...
llvm-svn: 93493
2010-01-15 00:50:35 +00:00
Mike Stump
6f0bf82622
Fix Release-Asserts.
...
llvm-svn: 93353
2010-01-13 21:23:04 +00:00
Mike Stump
8521f06ced
Fix for Release-Assert.
...
llvm-svn: 93348
2010-01-13 20:58:35 +00:00
Mike Stump
2f7b246a47
Fix for Release-Asserts.
...
llvm-svn: 93347
2010-01-13 20:57:29 +00:00
Mike Stump
5c1e7259f1
Fix Release-Asserts.
...
llvm-svn: 93346
2010-01-13 20:43:31 +00:00
Chandler Carruth
04bdce6407
Fix the CodeGen half of PR5911 by changing reference initialization to
...
correctly look through arrays to see cv-qualifiers. Also enhances the routine
for doing this to preserve more type sugaring for diagnostics.
llvm-svn: 93252
2010-01-12 20:32:25 +00:00
Chris Lattner
bb8976e36e
implement codegen support for preinc as an lvalue, PR5514.
...
llvm-svn: 93076
2010-01-09 21:44:40 +00:00
Eli Friedman
5866fe306d
Fix for PR5967: Make const-marking for LLVM globals correct for cases requiring
...
run-time initialization, and emit run-time initializers aggresively to avoid
ordering issues with deferred globals.
llvm-svn: 92976
2010-01-08 00:50:11 +00:00
Nuno Lopes
950d5b2cd3
fix PR5869: mangle static symbols like gcc does to make it easier to diff symbol tables
...
llvm-svn: 92911
2010-01-07 09:36:51 +00:00
Douglas Gregor
3a08dcc156
Test linkage of typeinfo and typeinfo names for class templates
...
llvm-svn: 92897
2010-01-07 04:09:30 +00:00
Douglas Gregor
d01472beee
Revert my available_externally vtables experiment. It's breaking the LLVM-with-Clang build with linker errors that I have yet to investigate.
...
llvm-svn: 92822
2010-01-06 04:50:56 +00:00
Douglas Gregor
1a68ab6c83
Make use of available_externally linkage for vtables when the
...
non-inline key function of a class template instantiation, when no key
function is present, the class template instantiation itself was
instantiated with an explicit instantiation declaration (aka extern
template). I'm fairly certain that the C++0x specification gives us
this lattitude, although GCC doesn't take advantage of it.
llvm-svn: 92779
2010-01-05 21:40:05 +00:00
Douglas Gregor
a318efd1f2
Improve key-function computation for templates. In particular:
...
- All classes can have a key function; templates don't change that.
non-template classes when computing the key function.
- We always mark all of the virtual member functions of class
template instantiations.
- The vtable for an instantiation of a class template has weak
linkage.
We could probably use available_externally linkage for vtables of
classes instantiated by explicit instantiation declarations (extern
templates), but GCC doesn't do this and I'm not 100% that the ABI
permits it.
llvm-svn: 92753
2010-01-05 19:06:31 +00:00
Anders Carlsson
a0b025e40f
When emitting member function pointers, use the canonical decl if the member function is virtual. Fixes PR5940.
...
llvm-svn: 92680
2010-01-05 05:04:05 +00:00
Eli Friedman
50f6aa11cf
Improve coverage for test.
...
llvm-svn: 92440
2010-01-03 01:20:41 +00:00
Anders Carlsson
e36a6b3e44
Correctly pass VTT parameters to constructors and destructors. The VTTs aren't yet used in the ctors/dtors, but that will follow.
...
llvm-svn: 92409
2010-01-02 01:01:18 +00:00
Anders Carlsson
2d21394190
If the key function of a record is inline, then the RTTI data should have weak_odr linkage.
...
llvm-svn: 92371
2009-12-31 19:36:25 +00:00
Anders Carlsson
bc7def9850
Remove rtti.cpp, it's very fragile and has been marked XFAIL for a while now. Between rtti-layout.cpp and rtti-linkage.cpp, RTTI testing should be covered.
...
llvm-svn: 92361
2009-12-31 17:44:32 +00:00
Anders Carlsson
a442499072
Fix a bunch of bugs with VMI RTTI building, and add a whole bunch of tests.
...
llvm-svn: 92319
2009-12-30 23:47:56 +00:00
Anders Carlsson
1e4cd33f13
Add base class checks.
...
llvm-svn: 92286
2009-12-30 01:29:05 +00:00
Anders Carlsson
a4bbe58c3b
Add more vtable tests.
...
llvm-svn: 92285
2009-12-30 01:25:42 +00:00
Anders Carlsson
ac2f681777
More RTTI cleanup, test that RTTI classes have the correct vtables.
...
llvm-svn: 92284
2009-12-30 01:00:12 +00:00
Anders Carlsson
ef88695860
Handle enum types as well.
...
llvm-svn: 92276
2009-12-29 22:13:01 +00:00
Anders Carlsson
26cf4ab8e2
Fix function type RTTI linkage and add tests.
...
llvm-svn: 92266
2009-12-29 20:20:19 +00:00
Sam Weinig
b999f68ed9
Fix for PR5871. Make __PRETTY_FUNCTION__ work for member functions defined in a class local to a function.
...
llvm-svn: 92200
2009-12-28 03:19:38 +00:00
Eli Friedman
e513c6af97
Fix runline.
...
llvm-svn: 92174
2009-12-27 05:59:41 +00:00
Eli Friedman
847a2bce04
Fix PointerExprEvaluator::VisitCastExpr so it doesn't misfold C++ casts which
...
it doesn't know how to fold, like derived-to-base casts.
llvm-svn: 92173
2009-12-27 05:43:15 +00:00
Sam Weinig
4e83bd2795
Fix for PR5872. Add static specifier and const/volatile qualifiers to member functions in __PRETTY_FUNCTION__ predefined expressions.
...
llvm-svn: 92171
2009-12-27 01:38:20 +00:00
Eli Friedman
fddc26cc64
Make copy constructor elimination work in more cases; the case in question
...
here affects clang-on-clang.
llvm-svn: 92151
2009-12-24 23:33:34 +00:00
Sam Weinig
07d211ea40
Fix for PR5844. Be explicit about anonymous struct/class/union/namespaces in __PRETTY_FUNCTION__ predefined expression.
...
llvm-svn: 92149
2009-12-24 23:15:03 +00:00
Douglas Gregor
363b151ff7
When transforming CXXExprWithTemporaries and CXXBindTemporaryExpr
...
expressions (e.g., for template instantiation), just transform the
subexpressions and return those, since the temporary-related nodes
will be implicitly regenerated. Fixes PR5867, but I said that
before...
llvm-svn: 92135
2009-12-24 18:51:59 +00:00
Douglas Gregor
f82bead3fd
InitializationSequence handles binding to temporaries, so that
...
argument-passing doesn't have to. Fixes PR5867, where we were binding
a temporary twice in the AST and, therefore, calling its destructor
twice.
llvm-svn: 92131
2009-12-24 17:16:46 +00:00
Anders Carlsson
a88d197284
Mangle block pointer types. Fixes PR5858.
...
llvm-svn: 92069
2009-12-23 22:31:44 +00:00
Douglas Gregor
247894b361
There is no such thing as typeinfo for a cv-qualified type. Assert
...
that this is true when mangling, then fix up the various places in
Sema and/or CodeGen that need to remove qualifiers. Addresses a
linking issue when building LLVM with Clang.
llvm-svn: 92064
2009-12-23 22:04:40 +00:00
Douglas Gregor
f45f6828c6
Remove cv-qualifiers from the argument to typeid
...
llvm-svn: 92041
2009-12-23 20:51:04 +00:00
Anders Carlsson
910847c149
Mangle template template parameters. Fixes PR5861.
...
llvm-svn: 92030
2009-12-23 19:30:55 +00:00
Douglas Gregor
19fc0b753a
Make sure that reinterpret_cast gets a CastKind on all successful
...
paths. Fixes "cannot compile this unexpected cast lvalue yet" error in
llvm/lib/Analysis/IPA/GlobalsModRef.cpp.
llvm-svn: 91932
2009-12-22 22:47:22 +00:00
Anders Carlsson
8a35c7982c
Make sure that we mangle overloaded operators that are member functions correctly, giving them the correct arity.
...
With this seemingly insignificant fix, we are now able to build and link clang using clang itself! (LLVM still has to be built with gcc for the time being).
llvm-svn: 91893
2009-12-22 06:36:32 +00:00
Daniel Dunbar
3780f0b680
x86_64: Structures with no fields but which have padding should be classified as
...
integer.
- This is consistent, but may not be correct. I will revisit x86_64 ABI handling for C++ as a whole at some point.
- PR5831.
llvm-svn: 91874
2009-12-22 01:19:25 +00:00
Douglas Gregor
4141d5bea2
When converting from a type to itself or one of its base classes via a
...
constructor call, the conversion is only a standard conversion
sequence if that constructor is a copy constructor. This fixes PR5834
in a semi-lame way, because the "real" fix will be to move over to
InitializationSequence. That will happen "soonish", but not now.
llvm-svn: 91861
2009-12-22 00:21:20 +00:00
Anders Carlsson
9a98ac993f
Add tests for structs inside anonymous namespaces.
...
llvm-svn: 91806
2009-12-21 00:57:38 +00:00
Anders Carlsson
2b7f444366
Incomplete structs should also have internal linkage.
...
llvm-svn: 91805
2009-12-21 00:41:42 +00:00
Anders Carlsson
18e6ee1b20
Correcly handle pointers to member pointer types where the class or the pointee is incomplete.
...
llvm-svn: 91804
2009-12-20 23:37:55 +00:00