[cfe-commits] r58430 - /cfe/trunk/Driver/RewriteObjC.cpp
Steve Naroff
snaroff at apple.com
Thu Oct 30 07:45:30 PDT 2008
Author: snaroff
Date: Thu Oct 30 09:45:29 2008
New Revision: 58430
URL: http://llvm.org/viewvc/llvm-project?rev=58430&view=rev
Log:
Make sure RewriteObjCMethodDecl() does a block pointer rewrite.
Modified:
cfe/trunk/Driver/RewriteObjC.cpp
Modified: cfe/trunk/Driver/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteObjC.cpp?rev=58430&r1=58429&r2=58430&view=diff
==============================================================================
--- cfe/trunk/Driver/RewriteObjC.cpp (original)
+++ cfe/trunk/Driver/RewriteObjC.cpp Thu Oct 30 09:45:29 2008
@@ -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;
}
}
More information about the cfe-commits
mailing list