diff options
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.cpp | 21 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGDeclCXX.cpp | 3 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 8 |
3 files changed, 18 insertions, 14 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 941410a7416..56c8a07140b 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -841,8 +841,8 @@ llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) { } else { // Fake up a new variable so that EmitScalarInit doesn't think // we're referring to the variable in its own initializer. - ImplicitParamDecl blockFieldPseudoVar(/*DC*/ 0, SourceLocation(), - /*name*/ 0, type); + ImplicitParamDecl blockFieldPseudoVar(getContext(), /*DC*/ 0, + SourceLocation(), /*name*/ 0, type); // We use one of these or the other depending on whether the // reference is nested. @@ -1108,7 +1108,7 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD, QualType selfTy = getContext().VoidPtrTy; IdentifierInfo *II = &CGM.getContext().Idents.get(".block_descriptor"); - ImplicitParamDecl selfDecl(const_cast<BlockDecl*>(blockDecl), + ImplicitParamDecl selfDecl(getContext(), const_cast<BlockDecl*>(blockDecl), SourceLocation(), II, selfTy); args.push_back(&selfDecl); @@ -1279,9 +1279,9 @@ CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) { ASTContext &C = getContext(); FunctionArgList args; - ImplicitParamDecl dstDecl(0, SourceLocation(), 0, C.VoidPtrTy); + ImplicitParamDecl dstDecl(getContext(), 0, SourceLocation(), 0, C.VoidPtrTy); args.push_back(&dstDecl); - ImplicitParamDecl srcDecl(0, SourceLocation(), 0, C.VoidPtrTy); + ImplicitParamDecl srcDecl(getContext(), 0, SourceLocation(), 0, C.VoidPtrTy); args.push_back(&srcDecl); const CGFunctionInfo &FI = CGM.getTypes().arrangeFreeFunctionDeclaration( @@ -1453,7 +1453,7 @@ CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) { ASTContext &C = getContext(); FunctionArgList args; - ImplicitParamDecl srcDecl(0, SourceLocation(), 0, C.VoidPtrTy); + ImplicitParamDecl srcDecl(getContext(), 0, SourceLocation(), 0, C.VoidPtrTy); args.push_back(&srcDecl); const CGFunctionInfo &FI = CGM.getTypes().arrangeFreeFunctionDeclaration( @@ -1738,10 +1738,12 @@ generateByrefCopyHelper(CodeGenFunction &CGF, QualType R = Context.VoidTy; FunctionArgList args; - ImplicitParamDecl dst(0, SourceLocation(), 0, Context.VoidPtrTy); + ImplicitParamDecl dst(CGF.getContext(), 0, SourceLocation(), 0, + Context.VoidPtrTy); args.push_back(&dst); - ImplicitParamDecl src(0, SourceLocation(), 0, Context.VoidPtrTy); + ImplicitParamDecl src(CGF.getContext(), 0, SourceLocation(), 0, + Context.VoidPtrTy); args.push_back(&src); const CGFunctionInfo &FI = CGF.CGM.getTypes().arrangeFreeFunctionDeclaration( @@ -1810,7 +1812,8 @@ generateByrefDisposeHelper(CodeGenFunction &CGF, QualType R = Context.VoidTy; FunctionArgList args; - ImplicitParamDecl src(0, SourceLocation(), 0, Context.VoidPtrTy); + ImplicitParamDecl src(CGF.getContext(), 0, SourceLocation(), 0, + Context.VoidPtrTy); args.push_back(&src); const CGFunctionInfo &FI = CGF.CGM.getTypes().arrangeFreeFunctionDeclaration( diff --git a/clang/lib/CodeGen/CGDeclCXX.cpp b/clang/lib/CodeGen/CGDeclCXX.cpp index 59129f6aeea..0cc9330a866 100644 --- a/clang/lib/CodeGen/CGDeclCXX.cpp +++ b/clang/lib/CodeGen/CGDeclCXX.cpp @@ -522,7 +522,8 @@ llvm::Function *CodeGenFunction::generateDestroyHelper( llvm::Constant *addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray, const VarDecl *VD) { FunctionArgList args; - ImplicitParamDecl dst(0, SourceLocation(), 0, getContext().VoidPtrTy); + ImplicitParamDecl dst(getContext(), 0, SourceLocation(), 0, + getContext().VoidPtrTy); args.push_back(&dst); const CGFunctionInfo &FI = CGM.getTypes().arrangeFreeFunctionDeclaration( diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index 47a096d5404..d1cfddce9f1 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -2901,9 +2901,9 @@ CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction( SrcTy = C.getPointerType(SrcTy); FunctionArgList args; - ImplicitParamDecl dstDecl(FD, SourceLocation(), 0, DestTy); + ImplicitParamDecl dstDecl(getContext(), FD, SourceLocation(), 0, DestTy); args.push_back(&dstDecl); - ImplicitParamDecl srcDecl(FD, SourceLocation(), 0, SrcTy); + ImplicitParamDecl srcDecl(getContext(), FD, SourceLocation(), 0, SrcTy); args.push_back(&srcDecl); const CGFunctionInfo &FI = CGM.getTypes().arrangeFreeFunctionDeclaration( @@ -2980,9 +2980,9 @@ CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction( SrcTy = C.getPointerType(SrcTy); FunctionArgList args; - ImplicitParamDecl dstDecl(FD, SourceLocation(), 0, DestTy); + ImplicitParamDecl dstDecl(getContext(), FD, SourceLocation(), 0, DestTy); args.push_back(&dstDecl); - ImplicitParamDecl srcDecl(FD, SourceLocation(), 0, SrcTy); + ImplicitParamDecl srcDecl(getContext(), FD, SourceLocation(), 0, SrcTy); args.push_back(&srcDecl); const CGFunctionInfo &FI = CGM.getTypes().arrangeFreeFunctionDeclaration( |