[cfe-commits] r92069 - in /cfe/trunk: lib/CodeGen/Mangle.cpp test/CodeGenCXX/mangle.cpp
Anders Carlsson
andersca at mac.com
Wed Dec 23 14:31:45 PST 2009
Author: andersca
Date: Wed Dec 23 16:31:44 2009
New Revision: 92069
URL: http://llvm.org/viewvc/llvm-project?rev=92069&view=rev
Log:
Mangle block pointer types. Fixes PR5858.
Modified:
cfe/trunk/lib/CodeGen/Mangle.cpp
cfe/trunk/test/CodeGenCXX/mangle.cpp
Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=92069&r1=92068&r2=92069&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Wed Dec 23 16:31:44 2009
@@ -990,7 +990,8 @@
}
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) {
Modified: cfe/trunk/test/CodeGenCXX/mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle.cpp?rev=92069&r1=92068&r2=92069&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/mangle.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/mangle.cpp Wed Dec 23 16:31:44 2009
@@ -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 @@
// 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
More information about the cfe-commits
mailing list