summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/for_lastprivate_codegen.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-05-31 00:45:10 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-05-31 00:45:10 +0000
commit0621a8f353631c72e497dba01790b39f83943679 (patch)
treec4dbd8e392f5c177ca2477e670bf8c68f99d3db5 /clang/test/OpenMP/for_lastprivate_codegen.cpp
parent2fdd95c1c823ebafc9286f7b730339c38636c5a8 (diff)
downloadbcm5719-llvm-0621a8f353631c72e497dba01790b39f83943679.tar.gz
bcm5719-llvm-0621a8f353631c72e497dba01790b39f83943679.zip
Defer capture initialization for captured regions until after we've left
the captured region scope. This removes a case where we would build expressions (and mark declarations odr-used) in the wrong scope. Remove the now-unused 'capture initializer' field on sema::Capture (except for 'this' captures, which still need to be cleaned up). No functionality change intended (except that we now very slightly more precisely determine whether we need to use a capture or not when another captured region encloses an OpenMP captured region). llvm-svn: 362179
Diffstat (limited to 'clang/test/OpenMP/for_lastprivate_codegen.cpp')
-rw-r--r--clang/test/OpenMP/for_lastprivate_codegen.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/test/OpenMP/for_lastprivate_codegen.cpp b/clang/test/OpenMP/for_lastprivate_codegen.cpp
index 57fb4ad9d58..b7c82c2f303 100644
--- a/clang/test/OpenMP/for_lastprivate_codegen.cpp
+++ b/clang/test/OpenMP/for_lastprivate_codegen.cpp
@@ -193,10 +193,13 @@ int main() {
// LAMBDA-LABEL: @main
// LAMBDA: alloca [[SS_TY]],
// LAMBDA: alloca [[CAP_TY:%.+]],
+ // FIXME: The outer lambda should not capture 'sivar'; that capture is not
+ // used for anything.
+ // LAMBDA: store {{.*}}@_ZZ4mainE5sivar,
// LAMBDA: call void [[OUTER_LAMBDA:@.+]]([[CAP_TY]]*
[&]() {
// LAMBDA: define{{.*}} internal{{.*}} void [[OUTER_LAMBDA]](
- // LAMBDA: call void {{.+}} @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i32* %{{.+}})
+ // LAMBDA: call void {{.+}} @__kmpc_fork_call({{.+}}, i32 1, {{.+}}* [[OMP_REGION:@.+]] to {{.+}}, i32* @_ZZ4mainE5sivar)
#pragma omp parallel
#pragma omp for lastprivate(g, g1, sivar)
for (int i = 0; i < 2; ++i) {
OpenPOWER on IntegriCloud