jdoerfert added inline comments.

================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:1063
+  // Initialize Types used in OpenMPIRBuilder from OMPKinds.def as well as load
+  // offload metadata for device from an OpenMP host IR file.
+  OMPBuilder.initialize(CGM.getLangOpts().OpenMPIsDevice
----------------
Move the additional comment to the initialize function instead to explain what 
the argument is for.


================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:452
+
+  if (!HostFilePath.empty()) {
+    auto Buf = llvm::MemoryBuffer::getFile(HostFilePath);
----------------
early exit plz.


================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:453
+  if (!HostFilePath.empty()) {
+    auto Buf = llvm::MemoryBuffer::getFile(HostFilePath);
+    if (auto Err = Buf.getError())
----------------
No llvm::


================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:455
+    if (auto Err = Buf.getError())
+      assert(false && ("error opening host file from host file path inside of "
+                       "OpenMPIRBuilder" +
----------------
no assert false please. Use unreachable or report fatal error.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148370

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to