Commit Graph

7 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 5696d6d316 Emit weak vtables of non-template classes with hidden visibility.
llvm-svn: 110107
2010-08-03 07:24:12 +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
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 e1b3e6292a It's OK to try to emit a vtable definition more than once. Fixes PR5697.
llvm-svn: 90751
2009-12-07 07:59:52 +00:00