diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2012-11-24 21:09:32 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2012-11-24 21:09:32 +0100 |
commit | b2dcbac1d82fc2e502848a020ee1544a2626406a (patch) | |
tree | c49b906e0f08d7bd883f021a88c268ebfc8f3b1b /lib/AST/ASTContext.cpp | |
parent | 68ee9d9993baa7bc062d255517c5c4b654004bc2 (diff) | |
parent | b5fa2f04f037a5d5caa858daf270f9b7406a7a36 (diff) | |
download | clang-b2dcbac1d82fc2e502848a020ee1544a2626406a.tar.gz clang-b2dcbac1d82fc2e502848a020ee1544a2626406a.tar.bz2 clang-b2dcbac1d82fc2e502848a020ee1544a2626406a.tar.xz |
Merge branch 'release-3.2' into embtk-support-release-3.2
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 2f7288109c..1506197a47 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -4481,7 +4481,13 @@ std::string ASTContext::getObjCEncodingForBlock(const BlockExpr *Expr) const { QualType BlockTy = Expr->getType()->getAs<BlockPointerType>()->getPointeeType(); // Encode result type. - getObjCEncodingForType(BlockTy->getAs<FunctionType>()->getResultType(), S); + if (getLangOpts().EncodeExtendedBlockSig) + getObjCEncodingForMethodParameter(Decl::OBJC_TQ_None, + BlockTy->getAs<FunctionType>()->getResultType(), + S, true /*Extended*/); + else + getObjCEncodingForType(BlockTy->getAs<FunctionType>()->getResultType(), + S); // Compute size of all parameters. // Start with computing size of a pointer in number of bytes. // FIXME: There might(should) be a better way of doing this computation! @@ -4516,7 +4522,11 @@ std::string ASTContext::getObjCEncodingForBlock(const BlockExpr *Expr) const { PType = PVDecl->getType(); } else if (PType->isFunctionType()) PType = PVDecl->getType(); - getObjCEncodingForType(PType, S); + if (getLangOpts().EncodeExtendedBlockSig) + getObjCEncodingForMethodParameter(Decl::OBJC_TQ_None, PType, + S, true /*Extended*/); + else + getObjCEncodingForType(PType, S); S += charUnitsToString(ParmOffset); ParmOffset += getObjCEncodingTypeSize(PType); } |