[PATCH] D43197: [OpenMP] Add flag for linking runtime bitcode library

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 6 06:33:05 PST 2018


ABataev added inline comments.


================
Comment at: lib/Driver/ToolChains/Cuda.cpp:535
+    SmallVector<std::string, 8> LibraryPaths;
+    if (char *env = ::getenv("LIBRARY_PATH")) {
+      StringRef CompilerPath = env;
----------------
1. `char *`->`const char *`
2. `::getenv`->`llvm::Process::GetEnv`


================
Comment at: lib/Driver/ToolChains/Cuda.cpp:539
+        std::pair<StringRef, StringRef> Split =
+            CompilerPath.split(llvm::sys::EnvPathSeparator);
+        LibraryPaths.push_back(Split.first);
----------------
Use `llvm::SplitString` instead


================
Comment at: lib/Driver/ToolChains/Cuda.cpp:548
+    bool FoundBCLibrary = false;
+    for (std::string LibraryPath : LibraryPaths) {
+      SmallString<128> LibOmpTargetFile(LibraryPath);
----------------
`const std::string &`


Repository:
  rC Clang

https://reviews.llvm.org/D43197





More information about the cfe-commits mailing list