[OpenMP] Fixed an issue that taskwait doesn't work on detachable task

D77609 mistakenly changed the bebavior of task waiting on detachable task that a detachable task is not waited, based on https://lists.llvm.org/pipermail/openmp-dev/2021-February/003836.html. This patch fixed it. Thank Raúl for the report.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D95798

GitOrigin-RevId: 3c31b78455dac6e94ba182b02ecf2a58253b0811
2 files changed