The variables used in atomic construct should be captured in outer task-based regions implicitly. Otherwise, the compiler will crash trying to find the address of the local variable. Differential Revision: https://reviews.llvm.org/D92682