[OpenMP][IRBuilder] Fix createSections
authorShraiysh Vaishay <Shraiysh.Vaishay@amd.com>
Wed, 1 Dec 2021 07:52:56 +0000 (13:22 +0530)
committerShraiysh Vaishay <Shraiysh.Vaishay@amd.com>
Wed, 1 Dec 2021 09:41:54 +0000 (15:11 +0530)
commitec97e1206abd6f30a1b549db62e87bea8dee0082
tree523a8ea0506645b3143fbe5f8fcba17c1786dbc3
parent84b978da3b80b986327a830c01e32f12cefe86b3
[OpenMP][IRBuilder] Fix createSections

Fix for the case when there are no instructions in the entry basic block before the call
to `createSections`

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D114143
clang/test/OpenMP/cancel_codegen.cpp
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp