summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index 573c0777ab5..c5066f48296 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -1816,7 +1816,7 @@ CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) {
/*IsCopyHelper*/ true, CGM);
if (llvm::GlobalValue *Func = CGM.getModule().getNamedValue(FuncName))
- return Func;
+ return llvm::ConstantExpr::getBitCast(Func, VoidPtrTy);
ASTContext &C = getContext();
@@ -2010,7 +2010,7 @@ CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) {
/*IsCopyHelper*/ false, CGM);
if (llvm::GlobalValue *Func = CGM.getModule().getNamedValue(FuncName))
- return Func;
+ return llvm::ConstantExpr::getBitCast(Func, VoidPtrTy);
ASTContext &C = getContext();
OpenPOWER on IntegriCloud