diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-09-28 22:46:07 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-09-28 22:46:07 +0000 |
commit | ef4d5ced04bf0b3d987e6b0e931f43125492f50c (patch) | |
tree | b918266bedba6722e2d9e2b70049c2ebc39ebac0 /test/CodeGenCXX/member-functions.cpp | |
parent | b6d80fe68d30ebd14b20c96643c252c36041df8d (diff) |
PR13941: Mark all virtual functions as unnamed_addr. It's not possible to
observe their addresses (taking their address gives the vtable slot) so we are
free to merge their definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164864 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/member-functions.cpp')
-rw-r--r-- | test/CodeGenCXX/member-functions.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/CodeGenCXX/member-functions.cpp b/test/CodeGenCXX/member-functions.cpp index b95763c0ff..1310eb08d3 100644 --- a/test/CodeGenCXX/member-functions.cpp +++ b/test/CodeGenCXX/member-functions.cpp @@ -35,6 +35,9 @@ struct S { static void g() { } static void f(); + + // RUN: grep "define linkonce_odr void @_ZN1S1vEv.*unnamed_addr" %t + virtual void v() {} }; // RUN: grep "define void @_ZN1S1fEv" %t |