awarzynski added inline comments.
================ Comment at: flang/lib/Frontend/CompilerInvocation.cpp:292 + std::string driverPath = llvm::sys::fs::getMainExecutable(nullptr, nullptr); + driverPath = driverPath.substr(0, driverPath.size() - 9); + return driverPath.append("/../include/flang/"); ---------------- arnamoy10 wrote: > bryanpkc wrote: > > Can you use `llvm::sys::path::remove_filename` here? > Thank you. This seems like a better option, but I could not make it work. > For the sake of time I am keeping this hard coded manipulation. It can be > improved in a later revision. It would be really nice to use `llvm::sys::path::remove_filename` instead. Perhaps something like this: ``` llvm::SmallString<128> driverPath; driverPath.assign(llvm::sys::fs::getMainExecutable(nullptr, nullptr)); llvm::sys::path::remove_filename(driverPath); ``` ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97080/new/ https://reviews.llvm.org/D97080 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits