Change the ObjC type encoding for block pointer types to "@?" (for consistency with GCC).

This fixes <rdar://problem/6538564> clang ObjC rewriter: Wrong encoding emitted for methods with Block parameters.

llvm-svn: 63534
This commit is contained in:
Steve Naroff
2009-02-02 18:24:29 +00:00
parent c81fdd1773
commit 49140cb544

View File

@@ -2100,7 +2100,7 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S,
else
S += 'i';
} else if (T->isBlockPointerType()) {
S += '^'; // This type string is the same as general pointers.
S += "@?"; // Unlike a pointer-to-function, which is "^?".
} else if (T->isObjCInterfaceType()) {
// @encode(class_name)
ObjCInterfaceDecl *OI = T->getAsObjCInterfaceType()->getDecl();