[OPENMP] Codegen for 'private' clause in 'sections' directive.
authorAlexey Bataev <a.bataev@hotmail.com>
Mon, 27 Apr 2015 04:12:12 +0000 (04:12 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Mon, 27 Apr 2015 04:12:12 +0000 (04:12 +0000)
commit7387083d95d595f4d5e883bd4cb20781c1b4e72b
tree75afdfa2be980de60612456aa3bb35cbf03b64d4
parent59c654aa43756d91da5b5df206db4328936291a5
[OPENMP] Codegen for 'private' clause in 'sections' directive.

If there are 2 or more sections in a 'section' directive the following code is generated:

<default init for privates>
@__kmpc_for_static_init_4();
<BODY for sections directive>
@__kmpc_for_static_fini()
If there is only one section, the following code is generated:

if (@__kmpc_single()) {
  <default init for privates>
  @__kmpc_end_single();
}
Differential Revision: http://reviews.llvm.org/D9239

llvm-svn: 235833
clang/lib/CodeGen/CGStmtOpenMP.cpp
clang/test/OpenMP/sections_private_codegen.cpp [new file with mode: 0644]