diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2016-04-27 07:56:03 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2016-04-27 07:56:03 +0000 |
commit | 4ba78a46ff760b254d4853e676e12ce35b4f65ac (patch) | |
tree | df50a2666cd6cc7703443edffa600a505ae78f65 /clang/test/OpenMP/critical_codegen.cpp | |
parent | a2d72377a111b96f22b780e0573bbc79fe005729 (diff) | |
download | bcm5719-llvm-4ba78a46ff760b254d4853e676e12ce35b4f65ac.tar.gz bcm5719-llvm-4ba78a46ff760b254d4853e676e12ce35b4f65ac.zip |
[OPENMP] Fix for codegen of captured variables in inlined directives.
Currently there is a problem with codegen of inlined directives inside
lambdas, it may cause a crash during codegen because of incorrect
capturing of variables. Patch fixes this problem.
llvm-svn: 267677
Diffstat (limited to 'clang/test/OpenMP/critical_codegen.cpp')
-rw-r--r-- | clang/test/OpenMP/critical_codegen.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/OpenMP/critical_codegen.cpp b/clang/test/OpenMP/critical_codegen.cpp index aad60cfd4f7..be749a65f0c 100644 --- a/clang/test/OpenMP/critical_codegen.cpp +++ b/clang/test/OpenMP/critical_codegen.cpp @@ -64,6 +64,8 @@ void critical_ref(S &s) { // CHECK: [[S_REF:%.+]] = load %struct.S*, %struct.S** [[S_ADDR]], // CHECK: [[S_A_REF:%.+]] = getelementptr inbounds %struct.S, %struct.S* [[S_REF]], i32 0, i32 0 ++s.a; + // CHECK: [[S_REF:%.+]] = load %struct.S*, %struct.S** [[S_ADDR]], + // CHECK: store %struct.S* [[S_REF]], %struct.S** [[S_ADDR:%.+]], // CHECK: call void @__kmpc_critical( #pragma omp critical // CHECK: [[S_REF:%.+]] = load %struct.S*, %struct.S** [[S_ADDR]], |