]> granicus.if.org Git - clang/commit
Improve key-function computation for templates. In particular:
authorDouglas Gregor <dgregor@apple.com>
Tue, 5 Jan 2010 19:06:31 +0000 (19:06 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 5 Jan 2010 19:06:31 +0000 (19:06 +0000)
commitbd6d6197fcfc98356ea60e816365eb0648b69556
treef917c297d0e6751c05d05a7bd4fca29581c99673
parentef372018c2dc0f8c2e5c34698401b87077eef6ed
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92753 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/DeclCXX.cpp
lib/AST/RecordLayoutBuilder.cpp
lib/CodeGen/CGVtable.cpp
lib/CodeGen/CodeGenModule.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
test/CodeGenCXX/vtable-key-function.cpp
test/CodeGenCXX/vtable-linkage.cpp