diff options
author | Samuel Antao <sfantao@us.ibm.com> | 2016-06-16 15:09:31 +0000 |
---|---|---|
committer | Samuel Antao <sfantao@us.ibm.com> | 2016-06-16 15:09:31 +0000 |
commit | 49516179808549288e6426b7f2f7e1db343062b4 (patch) | |
tree | fd6cef08e3d34b7aeb8f3c5068d30bd617969c49 /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 43ed08efa30a9626bcddabad4bf78239c48d7f5d (diff) | |
download | bcm5719-llvm-49516179808549288e6426b7f2f7e1db343062b4.tar.gz bcm5719-llvm-49516179808549288e6426b7f2f7e1db343062b4.zip |
[OpenMP] Cast captures by copy when passed to fork call so that they are compatible to what the runtime library expects.
Summary:
This patch fixes an issue detected when firstprivate variables are passed to an OpenMP outlined function vararg list. Currently they are not compatible with what the runtime library expects causing malfunction in some targets.
This patch fixes the issue by moving the casting logic already in place for offloading to the common code that creates the outline function and arguments and updates the regression tests accordingly.
Reviewers: hfinkel, arpith-jacob, carlo.bertolli, kkwli0, ABataev
Subscribers: cfe-commits, caomhin
Differential Revision: http://reviews.llvm.org/D21150
llvm-svn: 272900
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 478093aa0aa..b96e6bad8a1 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -2230,8 +2230,7 @@ public: llvm::Function *EmitCapturedStmt(const CapturedStmt &S, CapturedRegionKind K); llvm::Function *GenerateCapturedStmtFunction(const CapturedStmt &S); Address GenerateCapturedStmtArgument(const CapturedStmt &S); - llvm::Function *GenerateOpenMPCapturedStmtFunction(const CapturedStmt &S, - bool CastValToPtr = false); + llvm::Function *GenerateOpenMPCapturedStmtFunction(const CapturedStmt &S); void GenerateOpenMPCapturedVars(const CapturedStmt &S, SmallVectorImpl<llvm::Value *> &CapturedVars); void emitOMPSimpleStore(LValue LVal, RValue RVal, QualType RValTy, |