diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-04-02 08:55:10 +0000 | 
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-04-02 08:55:10 +0000 | 
| commit | 11d2b2d2bb706fca0656f2760839721bb7f6cb6f (patch) | |
| tree | d374cdca417e76f1bf101f139dba2db1d10ee8f7 /lib/CodeGen/CGBlocks.cpp | |
| parent | c0c7bca4e5b8d12699dc93a0da49e9e4bb79671b (diff) | |
Notes
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
| -rw-r--r-- | lib/CodeGen/CGBlocks.cpp | 20 | 
1 files changed, 10 insertions, 10 deletions
| diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index c10a401d8abfa..509734123b0c7 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -17,6 +17,7 @@  #include "CodeGenModule.h"  #include "clang/AST/DeclObjC.h"  #include "llvm/Module.h" +#include "llvm/ADT/SmallSet.h"  #include "llvm/Target/TargetData.h"  #include <algorithm> @@ -192,7 +193,7 @@ llvm::Value *CodeGenFunction::BuildBlockLiteralTmp(const BlockExpr *BE) {        CallArgList Args;        CodeGenTypes &Types = CGM.getTypes();        const CGFunctionInfo &FnInfo = Types.getFunctionInfo(ResultType, Args, -                                                       CC_Default, false); +                                                       FunctionType::ExtInfo());        if (CGM.ReturnTypeUsesSret(FnInfo))          flags |= BLOCK_USE_STRET;      } @@ -472,8 +473,8 @@ RValue CodeGenFunction::EmitBlockCallExpr(const CallExpr* E,    QualType ResultType = FuncTy->getResultType();    const CGFunctionInfo &FnInfo = -    CGM.getTypes().getFunctionInfo(ResultType, Args, FuncTy->getCallConv(), -                                   FuncTy->getNoReturnAttr()); +    CGM.getTypes().getFunctionInfo(ResultType, Args, +                                   FuncTy->getExtInfo());    // Cast the function pointer to the right type.    const llvm::Type *BlockFTy = @@ -678,8 +679,7 @@ CodeGenFunction::GenerateBlockFunction(const BlockExpr *BExpr,    const FunctionType *BlockFunctionType = BExpr->getFunctionType();    QualType ResultType; -  CallingConv CC = BlockFunctionType->getCallConv(); -  bool NoReturn = BlockFunctionType->getNoReturnAttr(); +  FunctionType::ExtInfo EInfo = getFunctionExtInfo(*BlockFunctionType);    bool IsVariadic;    if (const FunctionProtoType *FTy =        dyn_cast<FunctionProtoType>(BlockFunctionType)) { @@ -718,7 +718,7 @@ CodeGenFunction::GenerateBlockFunction(const BlockExpr *BExpr,      Args.push_back(std::make_pair(*i, (*i)->getType()));    const CGFunctionInfo &FI = -    CGM.getTypes().getFunctionInfo(ResultType, Args, CC, NoReturn); +    CGM.getTypes().getFunctionInfo(ResultType, Args, EInfo);    CodeGenTypes &Types = CGM.getTypes();    const llvm::FunctionType *LTy = Types.GetFunctionType(FI, IsVariadic); @@ -843,7 +843,7 @@ GenerateCopyHelperFunction(bool BlockHasCopyDispose, const llvm::StructType *T,    Args.push_back(std::make_pair(Src, Src->getType()));    const CGFunctionInfo &FI = -    CGM.getTypes().getFunctionInfo(R, Args, CC_Default, false); +      CGM.getTypes().getFunctionInfo(R, Args, FunctionType::ExtInfo());    // FIXME: We'd like to put these into a mergable by content, with    // internal linkage. @@ -924,7 +924,7 @@ GenerateDestroyHelperFunction(bool BlockHasCopyDispose,    Args.push_back(std::make_pair(Src, Src->getType()));    const CGFunctionInfo &FI = -    CGM.getTypes().getFunctionInfo(R, Args, CC_Default, false); +      CGM.getTypes().getFunctionInfo(R, Args, FunctionType::ExtInfo());    // FIXME: We'd like to put these into a mergable by content, with    // internal linkage. @@ -1008,7 +1008,7 @@ GeneratebyrefCopyHelperFunction(const llvm::Type *T, int flag) {    Args.push_back(std::make_pair(Src, Src->getType()));    const CGFunctionInfo &FI = -    CGM.getTypes().getFunctionInfo(R, Args, CC_Default, false); +      CGM.getTypes().getFunctionInfo(R, Args, FunctionType::ExtInfo());    CodeGenTypes &Types = CGM.getTypes();    const llvm::FunctionType *LTy = Types.GetFunctionType(FI, false); @@ -1071,7 +1071,7 @@ BlockFunction::GeneratebyrefDestroyHelperFunction(const llvm::Type *T,    Args.push_back(std::make_pair(Src, Src->getType()));    const CGFunctionInfo &FI = -    CGM.getTypes().getFunctionInfo(R, Args, CC_Default, false); +      CGM.getTypes().getFunctionInfo(R, Args, FunctionType::ExtInfo());    CodeGenTypes &Types = CGM.getTypes();    const llvm::FunctionType *LTy = Types.GetFunctionType(FI, false); | 
