Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
Richard Smith ff817f7070 When marking virtual functions as used for a class' vtable, mark all functions
which will appear in the vtable as used, not just those ones which were
declared within the class itself. Fixes an issue reported as comment#3 in
PR12763 -- we sometimes assert in codegen if we try to emit a reference to a
function declaration which we've not marked as referenced. This also matches
gcc's observed behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159895 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-07 06:59:51 +00:00
Anders Carlsson f502d93b0e Mark VTables and RTTI data linkonce_odr instead of weak_odr, with the exception of explicit template instantiations, which have to be weak_odr.
This fixes PR6996.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124089 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-24 00:46:19 +00:00
Rafael Espindola 9f959db60e Add unnamed_addr to vtables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123272 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-11 21:10:26 +00:00
John McCall 279b5eb691 Just disable the hidden-visibility optimization for now by hiding it behind
a -cc1 option.  The Darwin linker complains about mixed visibility when linking
gcc-built objects with clang-built objects, and the optimization isn't really
that valuable.  Platforms with less ornery linkers can feel free to enable this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110979 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 23:36:15 +00:00
John McCall 7a536907da It turns out that linkers (at least, the Darwin linker) don't necessarily
do the right thing with mixed-visibility symbols, so disable the visibility
optimization where that's possible, i.e. with template classes (since it's
possible that an arbitrary template might be subject to an explicit
instantiation elsewhere).  447.dealII actually does this.

I've put the code under an option that's currently not hooked up to anything.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110374 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 20:39:18 +00:00
John McCall 0c7d32bde0 Extend the hidden-visibility vtables optimization to template classes that
haven't been explicitly instantiated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110189 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 06:38:15 +00:00
John McCall 3d640e6061 Emit weak vtables of non-template classes with hidden visibility.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110107 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03 07:24:12 +00:00
John McCall 7002f4c03c Turn access control on by default in -cc1.
Remove -faccess-control from -cc1; add -fno-access-control.
Make the driver pass -fno-access-control by default.
Update a bunch of tests to be correct under access control.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100880 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-09 19:03:51 +00:00
Daniel Dunbar a5728872c7 Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 20:14:24 +00:00
Anders Carlsson 891c8b7399 If a class does not have a key function, its linkage should be weak_odr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90680 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 22:24:38 +00:00
Eli Friedman 378fe06b93 Tweak "key function" rules so that they work for templates with virtual
inline functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90645 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-05 04:55:55 +00:00