[cfe-commits] r139829 - in /cfe/trunk: include/clang/Frontend/PreprocessorOptions.h lib/Frontend/FrontendAction.cpp

Douglas Gregor dgregor at apple.com
Thu Sep 15 12:48:59 PDT 2011


Author: dgregor
Date: Thu Sep 15 14:48:59 2011
New Revision: 139829

URL: http://llvm.org/viewvc/llvm-project?rev=139829&view=rev
Log:
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).

Modified:
    cfe/trunk/include/clang/Frontend/PreprocessorOptions.h
    cfe/trunk/lib/Frontend/FrontendAction.cpp

Modified: cfe/trunk/include/clang/Frontend/PreprocessorOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/PreprocessorOptions.h?rev=139829&r1=139828&r2=139829&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/PreprocessorOptions.h (original)
+++ cfe/trunk/include/clang/Frontend/PreprocessorOptions.h Thu Sep 15 14:48:59 2011
@@ -41,7 +41,6 @@
 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 @@
   void resetNonModularOptions() {
     Macros.clear();
     Includes.clear();
-    Modules.clear();
     MacroIncludes.clear();
     ChainedIncludes.clear();
     DumpDeserializedPCHDecls = false;

Modified: cfe/trunk/lib/Frontend/FrontendAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FrontendAction.cpp?rev=139829&r1=139828&r2=139829&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/FrontendAction.cpp (original)
+++ cfe/trunk/lib/Frontend/FrontendAction.cpp Thu Sep 15 14:48:59 2011
@@ -240,30 +240,6 @@
                                 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());





More information about the cfe-commits mailing list