Pass around arguments for primary-specific filenames.

Get rid of IRGenOpts attributes that won’t work for batch mode and also remove fakeNamesStub.
This commit is contained in:
David Ungar
2018-02-07 18:57:01 -08:00
parent 1e32ff31b7
commit 1f9a4f3591
24 changed files with 327 additions and 219 deletions

View File

@@ -53,6 +53,16 @@ std::string CompilerInvocation::getPCHHash() const {
return llvm::APInt(64, Code).toString(36, /*Signed=*/false);
}
PrimarySpecificPaths
CompilerInvocation::getPrimarySpecificPathsForAtMostOnePrimary() {
return getFrontendOptions().getPrimarySpecificPathsForAtMostOnePrimary();
}
PrimarySpecificPaths
CompilerInvocation::getPrimarySpecificPathsForPrimary(StringRef filename) {
return getFrontendOptions().getPrimarySpecificPathsForPrimary(filename);
}
void CompilerInstance::createSILModule() {
assert(MainModule && "main module not created yet");
// Assume WMO if a -primary-file option was not provided.
@@ -825,3 +835,16 @@ void CompilerInstance::freeASTContext() {
}
void CompilerInstance::freeSILModule() { TheSILModule.reset(); }
PrimarySpecificPaths
CompilerInstance::getPrimarySpecificPathsForWholeModuleOptimizationMode() {
return getPrimarySpecificPathsForAtMostOnePrimary();
}
PrimarySpecificPaths
CompilerInstance::getPrimarySpecificPathsForAtMostOnePrimary() {
return Invocation.getPrimarySpecificPathsForAtMostOnePrimary();
}
PrimarySpecificPaths
CompilerInstance::getPrimarySpecificPathsForPrimary(StringRef filename) {
return Invocation.getPrimarySpecificPathsForPrimary(filename);
}