Revert "Support for ThinLTO function importing and symbol linking."
[oota-llvm.git] / include / llvm / IR / FunctionInfo.h
index e265ad3709637b5a8bd2d1b964cf3bd1153e1060..264954757cfcefe661f356d47f969b2c660dc076 100644 (file)
@@ -165,18 +165,8 @@ private:
   /// Holds strings for combined index, mapping to the corresponding module ID.
   ModulePathStringTableTy ModulePathStringTable;
 
-  /// The main module being compiled, that we are importing into, if applicable.
-  /// Used to check if any of its functions are in the index and therefore
-  /// potentially exported.
-  const Module *ExportingModule;
-
-  /// Flag indicating whether the exporting module has any functions in the
-  /// index and therefore potentially exported (imported into another module).
-  bool HasExportedFunctions;
-
 public:
-  FunctionInfoIndex(const Module *M = nullptr)
-      : ExportingModule(M), HasExportedFunctions(false){};
+  FunctionInfoIndex() = default;
   ~FunctionInfoIndex() = default;
 
   // Disable the copy constructor and assignment operators, so
@@ -196,12 +186,6 @@ public:
 
   /// Add a function info for a function of the given name.
   void addFunctionInfo(StringRef FuncName, std::unique_ptr<FunctionInfo> Info) {
-    if (ExportingModule) {
-      assert(Info->functionSummary());
-      if (ExportingModule->getModuleIdentifier() ==
-          Info->functionSummary()->modulePath())
-        HasExportedFunctions = true;
-    }
     FunctionMap[FuncName].push_back(std::move(Info));
   }
 
@@ -239,14 +223,6 @@ public:
     return ModulePathStringTable.insert(std::make_pair(ModPath, ModId))
         .first->first();
   }
-
-  /// Check if the given Module has any functions available for exporting
-  /// in the index.
-  bool hasExportedFunctions(const Module *M) {
-    assert(M == ExportingModule &&
-           "Checking for exported functions on unexpected module");
-    return HasExportedFunctions;
-  }
 };
 
 } // End llvm namespace