Make sure RewriteObjCMethodDecl() does a block pointer rewrite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58430 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp
index b5efd4f..39f4f15 100644
--- a/Driver/RewriteObjC.cpp
+++ b/Driver/RewriteObjC.cpp
@@ -794,7 +794,12 @@
ResultStr += PDecl->getName();
} else {
std::string Name = PDecl->getName();
- PDecl->getType().getAsStringInternal(Name);
+ if (isBlockPointerType(PDecl->getType())) {
+ // Make sure we convert "t (^)(...)" to "t (*)(...)".
+ const BlockPointerType *BPT = PDecl->getType()->getAsBlockPointerType();
+ Context->getPointerType(BPT->getPointeeType()).getAsStringInternal(Name);
+ } else
+ PDecl->getType().getAsStringInternal(Name);
ResultStr += Name;
}
}