[PATCH] D87946: [OpenMP] Add Location Fields to Libomptarget Runtime for Debugging

George Rokos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 05:37:07 PDT 2020


grokos added inline comments.


================
Comment at: openmp/libomptarget/include/Ident.h:48-51
+    auto removePath = [](const std::string &path) {
+        std::size_t pos = path.rfind('/');
+        return path.substr(pos + 1);
+    };
----------------
jhuber6 wrote:
> This will probably break with a Windows file path, but I don't think you can even build most offloading if you're on Windows. Should I just add a processor check?
> 
> ```
> #ifdef _WIN32
> #define PATH_DELIMITER '\\'
> #else
> #define PATH_DELIMITER '/'
> #endif
> ```
You are right, libomptarget does not run on Windows, but some fork which stays in sync with upstream libomptarget may do so and this change may break it. Can you add the proposed pre-processor check?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87946



More information about the llvm-commits mailing list