diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2016-04-22 09:05:03 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2016-04-22 09:05:03 +0000 |
commit | feddd64bff4232c3211fa57eb11084c64ccf3bf9 (patch) | |
tree | aaebb765b97272371c85a656cac84752e58afe95 /clang/lib/CodeGen/CGStmtOpenMP.cpp | |
parent | 69ef42cc424d33d9cd5f3f7151557aa66b393b57 (diff) | |
download | bcm5719-llvm-feddd64bff4232c3211fa57eb11084c64ccf3bf9.tar.gz bcm5719-llvm-feddd64bff4232c3211fa57eb11084c64ccf3bf9.zip |
[OPENMP] Fix for PR27463: Privatizing struct fields with array type
causes code generation failure.
The codegen part of firstprivate clause for member decls used type of
original variable without skipping reference type from
OMPCapturedExprDecl. Patch fixes this problem.
llvm-svn: 267125
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index 1b4a5ffd52f..c4f8311f2ea 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -548,7 +548,7 @@ bool CodeGenFunction::EmitOMPFirstprivateClause(const OMPExecutableDirective &D, OrigVD) != nullptr, (*IRef)->getType(), VK_LValue, (*IRef)->getExprLoc()); Address OriginalAddr = EmitLValue(&DRE).getAddress(); - QualType Type = OrigVD->getType(); + QualType Type = VD->getType(); if (Type->isArrayType()) { // Emit VarDecl with copy init for arrays. // Get the address of the original variable captured in current |