diff options
author | Anders Carlsson <andersca@mac.com> | 2011-01-23 21:07:30 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2011-01-23 21:07:30 +0000 |
commit | f89e0424b8903438179f4a2f16dddd5e5bdc814e (patch) | |
tree | 713f8065268178762184e29dde6e959c8a7bb91e /test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp | |
parent | 3176cca2fe2bb9ab061e8e5fc05b4d59403fcf19 (diff) |
Get rid of the [[final]] C++0x attribute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp')
-rw-r--r-- | test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp b/test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp new file mode 100644 index 0000000000..f6f2a49133 --- /dev/null +++ b/test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp @@ -0,0 +1,25 @@ +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s + +namespace Test1 { + struct A { + virtual int f() final; + }; + + // CHECK: define i32 @_ZN5Test11fEPNS_1AE + int f(A *a) { + // CHECK: call i32 @_ZN5Test11A1fEv + return a->f(); + } +} + +namespace Test2 { + struct A final { + virtual int f(); + }; + + // CHECK: define i32 @_ZN5Test21fEPNS_1AE + int f(A *a) { + // CHECK: call i32 @_ZN5Test21A1fEv + return a->f(); + } +} |