[PATCH] D91054: [Clang][OpenMP] Frontend work for sections - D89671

Chirag Khandelwal via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 23 04:33:33 PST 2020


AMDChirag added inline comments.


================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:3576
+    } else {
+      auto SectionCB = [this, CS](InsertPointTy AllocaIP,
+                                  InsertPointTy CodeGenIP,
----------------
Meinersbur wrote:
> In what situation would there be no `#pragma omp section` children?
You are correct - I could not find a scenario where `CS` would be a `nullptr`.
However, the original implementation `EmitSections()` handles the `CS == nullptr` case as well. Also, if `CS` is `nullptr`, the software will exit with an assertion failure anyway (`CodeGenFunction::EmitStmt()`).
Should I just remove the `else` block altogether? I think an `assert` statement instead, for checking `CS == nullptr` should suffice.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91054/new/

https://reviews.llvm.org/D91054



More information about the cfe-commits mailing list