Front-end: pass down main executable path to the sub-ASTContext for building module interfaces. NFC

This commit is contained in:
Xi Ge
2020-07-30 12:04:53 -07:00
parent 3ee162dc94
commit bfacad6f43
4 changed files with 8 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ void CompilerInvocation::computeRuntimeResourcePathFromExecutablePath(
}
void CompilerInvocation::setMainExecutablePath(StringRef Path) {
FrontendOpts.MainExecutablePath = Path.str();
llvm::SmallString<128> LibPath;
computeRuntimeResourcePathFromExecutablePath(Path, LibPath);
setRuntimeResourcePath(LibPath.str());