[modules] Flatten -fmodule-name= and -fmodule-implementation-of= into a single

option. Previously these options could both be used to specify that you were
compiling the implementation file of a module, with a different set of minor
bugs in each case.

This change removes -fmodule-implementation-of, and instead tracks a flag to
determine whether we're currently building a module. -fmodule-name now behaves
the same way that -fmodule-implementation-of previously did.

llvm-svn: 261372
This commit is contained in:
Richard Smith
2016-02-19 22:25:36 +00:00
parent a8f1f2efaf
commit 7e82e019c6
22 changed files with 67 additions and 104 deletions

View File

@@ -477,7 +477,7 @@ void Preprocessor::CreateString(StringRef Str, Token &Tok,
}
Module *Preprocessor::getCurrentModule() {
if (getLangOpts().CurrentModule.empty())
if (!getLangOpts().CompilingModule)
return nullptr;
return getHeaderSearchInfo().lookupModule(getLangOpts().CurrentModule);