aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/Mangle.cpp3
-rw-r--r--test/CodeGenCXX/mangle.cpp5
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp
index 367c868ba9..f4c6ffeeda 100644
--- a/lib/CodeGen/Mangle.cpp
+++ b/lib/CodeGen/Mangle.cpp
@@ -990,7 +990,8 @@ void CXXNameMangler::mangleType(const ObjCInterfaceType *T) {
}
void CXXNameMangler::mangleType(const BlockPointerType *T) {
- assert(false && "can't mangle block pointer types yet");
+ Out << "U13block_pointer";
+ mangleType(T->getPointeeType());
}
void CXXNameMangler::mangleType(const FixedWidthIntType *T) {
diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp
index e57fbe3433..e8770dfec3 100644
--- a/test/CodeGenCXX/mangle.cpp
+++ b/test/CodeGenCXX/mangle.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -fblocks | FileCheck %s
struct X { };
struct Y { };
@@ -306,3 +306,6 @@ template<typename T, typename = Policy<P, true> > class Alloc
// CHECK: define i8* @_ZN6PR58615AllocIcNS_6PolicyINS_1PELb1EEEE8allocateEiPKv
template class Alloc<char>;
}
+
+// CHECK: define void @_Z1fU13block_pointerFiiiE
+void f(int (^)(int, int)) { } \ No newline at end of file