forked from OSchip/llvm-project
Eliminate the list of modules from the preprocessor options. This was
used back when we had an -import-module command-line option, but it's no longer used (or useful). llvm-svn: 139829
This commit is contained in:
parent
4cbe06e7f8
commit
900d4bf80a
|
@ -41,7 +41,6 @@ class PreprocessorOptions {
|
|||
public:
|
||||
std::vector<std::pair<std::string, bool/*isUndef*/> > Macros;
|
||||
std::vector<std::string> Includes;
|
||||
std::vector<std::string> Modules;
|
||||
std::vector<std::string> MacroIncludes;
|
||||
|
||||
unsigned UsePredefines : 1; /// Initialize the preprocessor with the compiler
|
||||
|
@ -196,7 +195,6 @@ public:
|
|||
void resetNonModularOptions() {
|
||||
Macros.clear();
|
||||
Includes.clear();
|
||||
Modules.clear();
|
||||
MacroIncludes.clear();
|
||||
ChainedIncludes.clear();
|
||||
DumpDeserializedPCHDecls = false;
|
||||
|
|
|
@ -240,30 +240,6 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
|
|||
DeserialListener);
|
||||
if (!CI.getASTContext().getExternalSource())
|
||||
goto failure;
|
||||
} else if (!CI.getPreprocessorOpts().Modules.empty()) {
|
||||
// Use PCH.
|
||||
assert(hasPCHSupport() && "This action does not have PCH support!");
|
||||
ASTDeserializationListener *DeserialListener =
|
||||
Consumer->GetASTDeserializationListener();
|
||||
if (CI.getPreprocessorOpts().DumpDeserializedPCHDecls)
|
||||
DeserialListener = new DeserializedDeclsDumper(DeserialListener);
|
||||
if (!CI.getPreprocessorOpts().DeserializedPCHDeclsToErrorOn.empty())
|
||||
DeserialListener = new DeserializedDeclsChecker(CI.getASTContext(),
|
||||
CI.getPreprocessorOpts().DeserializedPCHDeclsToErrorOn,
|
||||
DeserialListener);
|
||||
|
||||
CI.createPCHExternalASTSource(CI.getPreprocessorOpts().Modules[0],
|
||||
true, true, DeserialListener);
|
||||
|
||||
for (unsigned I = 1, E = CI.getPreprocessorOpts().Modules.size(); I != E;
|
||||
++I) {
|
||||
|
||||
ASTReader *ModMgr = CI.getModuleManager();
|
||||
ModMgr->ReadAST(CI.getPreprocessorOpts().Modules[I],
|
||||
serialization::MK_Module);
|
||||
}
|
||||
if (!CI.getASTContext().getExternalSource())
|
||||
goto failure;
|
||||
}
|
||||
|
||||
CI.setASTConsumer(Consumer.take());
|
||||
|
|
Loading…
Reference in New Issue