summaryrefslogtreecommitdiffstats
path: root/clang/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
commitf3ea1ed1ad2d72f472ed672dd0118ad1a7cf39f4 (patch)
treea136850b482170cdb371c4a6ec30e5bd7e0a6db2 /clang/test/CodeGenCXX/mangle-ref-qualifiers.cpp
parent54e462ac6ec9140c75d670cfa640ffb0aded114c (diff)
downloadbcm5719-llvm-f3ea1ed1ad2d72f472ed672dd0118ad1a7cf39f4.tar.gz
bcm5719-llvm-f3ea1ed1ad2d72f472ed672dd0118ad1a7cf39f4.zip
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. llvm-svn: 124296
Diffstat (limited to 'clang/test/CodeGenCXX/mangle-ref-qualifiers.cpp')
-rw-r--r--clang/test/CodeGenCXX/mangle-ref-qualifiers.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/mangle-ref-qualifiers.cpp b/clang/test/CodeGenCXX/mangle-ref-qualifiers.cpp
new file mode 100644
index 00000000000..b3f37d7db31
--- /dev/null
+++ b/clang/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&&) { }
OpenPOWER on IntegriCloud