summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/mangle-address-space.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/mangle-address-space.cpp')
-rw-r--r--clang/test/CodeGenCXX/mangle-address-space.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/mangle-address-space.cpp b/clang/test/CodeGenCXX/mangle-address-space.cpp
new file mode 100644
index 0000000..ff23c20
--- /dev/null
+++ b/clang/test/CodeGenCXX/mangle-address-space.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+
+// CHECK: define void @_Z2f0Pc
+void f0(char *p) { }
+// CHECK: define void @_Z2f0PU3AS1c
+void f0(char __attribute__((address_space(1))) *p) { }
+
+struct OpaqueType;
+typedef OpaqueType __attribute__((address_space(100))) * OpaqueTypePtr;
+
+// CHECK: define void @_Z2f0PU5AS10010OpaqueType
+void f0(OpaqueTypePtr) { }