CodeGen: Mark functions used in vtables as unnamed_addr.
authorPeter Collingbourne <peter@pcc.me.uk>
Mon, 14 Mar 2016 18:41:59 +0000 (18:41 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Mon, 14 Mar 2016 18:41:59 +0000 (18:41 +0000)
commit0446e7cfae9fb33c367dceaac17fe40391f21e7c
treecd0ca40fadb25fc5bac00fa2814314494e1ff8c0
parentb7860fedd45a197215b5ce27ece92502f0fa4c98
CodeGen: Mark functions used in vtables as unnamed_addr.

This marks virtual function declarations, as well as runtime library functions
__cxa_pure_virtual, __cxa_deleted_virtual and _purecall, as unnamed_addr. This
will allow us to correctly form relative references to them from vtables in
the relative vtable ABI.

Differential Revision: http://reviews.llvm.org/D18071

llvm-svn: 263464
clang/lib/CodeGen/CGVTables.cpp
clang/lib/CodeGen/CodeGenModule.cpp
clang/test/CodeGenCXX/virtual-function-attrs.cpp [new file with mode: 0644]
clang/test/CodeGenCXX/vtt-layout.cpp