This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Fix mapping of scalars for combined directives
ClosedPublic

Authored by Hahnfeld on Jun 30 2017, 7:51 AM.

Details

Summary

Combined directives like 'target parallel' have two captured statements. Sema has to check the right one from the right direction.

Previously, Sema::IsOpenMPCapturedByRef would return false for mapped scalars on combined directives. This results in a wrong signature of the outlined function which triggers an assertion:

void llvm::CallInst::init(llvm::FunctionType *, llvm::Value *, ArrayRef<llvm::Value *>, ArrayRef<OperandBundleDef>, const llvm::Twine &): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed.

Fixes PR30975 (and PR31985). New function was taken from clang-ykt.

Diff Detail

Repository
rL LLVM