diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-05-21 09:47:46 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-05-21 09:47:46 +0000 |
commit | 5129d3a4f58c7514a31d49da5c7c70c17aaa9a8f (patch) | |
tree | 949ba9c1c89f75d50cc59e708639b8a4db3e0a74 /clang/lib/CodeGen/CGOpenMPRuntime.cpp | |
parent | 2db1a03b07ce4d22ad32ebbecdc2099b0e67524e (diff) | |
download | bcm5719-llvm-5129d3a4f58c7514a31d49da5c7c70c17aaa9a8f.tar.gz bcm5719-llvm-5129d3a4f58c7514a31d49da5c7c70c17aaa9a8f.zip |
[OPENMP] Fixed codegen for parameters privatization.
For parameters we shall take a derived type of parameters, not the original one.
llvm-svn: 237882
Diffstat (limited to 'clang/lib/CodeGen/CGOpenMPRuntime.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntime.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index a8665254545..789302c8855 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -1289,9 +1289,6 @@ static llvm::Value *emitCopyprivateCopyFunction( CGF.ConvertTypeForMem(C.getPointerType(SrcExprs[I]->getType()))); auto *VD = cast<DeclRefExpr>(CopyprivateVars[I])->getDecl(); QualType Type = VD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(VD)) { - Type = PVD->getOriginalType(); - } CGF.EmitOMPCopy(CGF, Type, DestAddr, SrcAddr, cast<VarDecl>(cast<DeclRefExpr>(DestExprs[I])->getDecl()), cast<VarDecl>(cast<DeclRefExpr>(SrcExprs[I])->getDecl()), @@ -1671,9 +1668,6 @@ createPrivatesRecordDecl(CodeGenModule &CGM, RD->startDefinition(); for (auto &&Pair : Privates) { auto Type = Pair.second.Original->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(Pair.second.Original)) { - Type = PVD->getOriginalType(); - } Type = Type.getNonReferenceType(); addFieldToRecordDecl(C, RD, Type); } @@ -1960,9 +1954,6 @@ void CGOpenMPRuntime::emitTaskCall( auto SharedRefLValue = CGF.EmitLValueForField(SharedsBase, SharedField); QualType Type = OriginalVD->getType(); - if (auto *PVD = dyn_cast<ParmVarDecl>(OriginalVD)) { - Type = PVD->getOriginalType(); - } if (Type->isArrayType()) { // Initialize firstprivate array. if (!isa<CXXConstructExpr>(Init) || |