[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option
Andrzej Warzynski via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 19 07:17:13 PDT 2021
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
More information about the cfe-commits
mailing list