ABataev added inline comments.
================ Comment at: lib/Driver/ToolChains/Cuda.cpp:595-596 + // Add user defined library paths from LIBRARY_PATH. + if (llvm::Optional<std::string> LibPath = + llvm::sys::Process::GetEnv("LIBRARY_PATH")) { + SmallVector<StringRef, 8> Frags; ---------------- Move the definition of `LibPath` out of `if` statement scope. ================ Comment at: lib/Driver/ToolChains/Cuda.cpp:600 + llvm::SplitString(*LibPath, Frags, EnvPathSeparatorStr); + for (auto Path : Frags) + LibraryPaths.emplace_back(Path.trim()); ---------------- `auto`->`StringRef` ================ Comment at: lib/Driver/ToolChains/Cuda.cpp:607 + bool FoundBCLibrary = false; + for (const std::string &LibraryPath : LibraryPaths) { + SmallString<128> LibOmpTargetFile(LibraryPath); ---------------- `const std::string &`->`StringRef` Repository: rC Clang https://reviews.llvm.org/D43197 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits