]> granicus.if.org Git - clang/commit
[OPENMP]Do not crash for const firstprivates.
authorAlexey Bataev <a.bataev@hotmail.com>
Thu, 23 May 2019 22:30:43 +0000 (22:30 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Thu, 23 May 2019 22:30:43 +0000 (22:30 +0000)
commit84a84885cd7fe255973f6ca01bfd7852f9e214dd
tree9becacfeea95c51bd533d90a6e825cf2f60ae6e6
parent3a70b6af7190906fa822ed08e2d137cc4293e82b
[OPENMP]Do not crash for const firstprivates.

If the variable is a firstprivate variable and it was not emitted beause
this a constant variable with the constant initializer, we can use the
initial value instead of the variable itself. It also fixes the problem
with the compiler crash in this case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361564 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGStmtOpenMP.cpp
test/OpenMP/parallel_firstprivate_codegen.cpp