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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user