Commit Graph

10 Commits

Author SHA1 Message Date
Anders Carlsson 571e2ad042 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.

llvm-svn: 124089
2011-01-24 00:46:19 +00:00
Rafael Espindola 5674c644cf Add unnamed_addr to vtables.
llvm-svn: 123272
2011-01-11 21:10:26 +00:00
John McCall b3732bb3b7 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.

llvm-svn: 110979
2010-08-12 23:36:15 +00:00
John McCall 5513fce96b 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.

llvm-svn: 110374
2010-08-05 20:39:18 +00:00
John McCall 8a705c15d9 Extend the hidden-visibility vtables optimization to template classes that
haven't been explicitly instantiated.

llvm-svn: 110189
2010-08-04 06:38:15 +00:00
John McCall 5696d6d316 Emit weak vtables of non-template classes with hidden visibility.
llvm-svn: 110107
2010-08-03 07:24:12 +00:00
John McCall 3155f573f5 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.

llvm-svn: 100880
2010-04-09 19:03:51 +00:00
Daniel Dunbar 8fbe78f6fc 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).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Anders Carlsson 0ab79e22ab If a class does not have a key function, its linkage should be weak_odr.
llvm-svn: 90680
2009-12-05 22:24:38 +00:00
Eli Friedman 0846d52f70 Tweak "key function" rules so that they work for templates with virtual
inline functions.

llvm-svn: 90645
2009-12-05 04:55:55 +00:00