summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/mangle-ref-qualifiers.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-26 17:36:28 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-26 17:36:28 +0000
commit0a9a6d68979619a621fedc5089674487f720f765 (patch)
treee00fb3abc819917dde97db76c2e9561d8094a20d /test/CodeGenCXX/mangle-ref-qualifiers.cpp
parente3c7a7ca66c02567543dbb5ec493818e00e8b177 (diff)
Rvalue references for *this: add name mangling for ref-qualifiers,
using rules that I just made up this morning. This encoding has now been proposed to the Itanium C++ ABI group for inclusion, but of course it's still possible that the mangling will change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124296 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/mangle-ref-qualifiers.cpp')
-rw-r--r--test/CodeGenCXX/mangle-ref-qualifiers.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle-ref-qualifiers.cpp b/test/CodeGenCXX/mangle-ref-qualifiers.cpp
new file mode 100644
index 0000000000..b3f37d7db3
--- /dev/null
+++ b/test/CodeGenCXX/mangle-ref-qualifiers.cpp
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -std=c++0x -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
+struct X {
+ int f() &;
+ int g() &&;
+ int h() const &&;
+};
+
+// CHECK: define i32 @_ZNR1X1fEv
+int X::f() & { return 0; }
+// CHECK: define i32 @_ZNO1X1gEv
+int X::g() && { return 0; }
+// CHECK: define i32 @_ZNKO1X1hEv
+int X::h() const && { return 0; }
+
+// CHECK: define void @_Z1fM1XRFivEMS_OFivEMS_KOFivE
+void f(int (X::*)() &, int (X::*)() &&, int (X::*)() const&&) { }