[Openmp-commits] [PATCH] D102230: [libomptarget][amdgpu][nfc] Expand errorcheck macros

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed May 12 02:44:55 PDT 2021


JonChesterfield added a comment.

This patch doesn't fix any of the control flow, just expands macros and deletes else{}; clauses



================
Comment at: openmp/libomptarget/plugins/amdgpu/impl/data.cpp:52-54
+    printf("[%s:%d] %s failed: %s\n", __FILE__, __LINE__, "atmi_malloc",
+           get_error_string(err));
+    exit(1);
----------------
pdhaliwal wrote:
> Will it be better to use assert's here?
No, malloc can fail, and its failure can be handled. Assert might be better than exit, but what we actually need is return some-error-code


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102230



More information about the Openmp-commits mailing list