Use diagnostic handler in the LLVMContext
[oota-llvm.git] / include / llvm / Transforms / IPO / FunctionImport.h
index e3da8a79c23ebb450da73e881d6843acbfea2f6d..0f857d70073065e7f8d204b91be555f5a9232fcc 100644 (file)
@@ -10,7 +10,6 @@
 #ifndef LLVM_FUNCTIONIMPORT_H
 #define LLVM_FUNCTIONIMPORT_H
 
-#include "llvm/IR/DiagnosticInfo.h"
 #include "llvm/ADT/StringMap.h"
 
 namespace llvm {
@@ -25,9 +24,6 @@ class FunctionImporter {
   /// The summaries index used to trigger importing.
   const FunctionInfoIndex &Index;
 
-  /// Diagnostic will be sent to this handler.
-  DiagnosticHandlerFunction DiagnosticHandler;
-
   /// Factory function to load a Module for a given identifier
   std::function<std::unique_ptr<Module>(StringRef Identifier)> ModuleLoader;
 
@@ -35,10 +31,8 @@ public:
   /// Create a Function Importer.
   FunctionImporter(
       const FunctionInfoIndex &Index,
-      DiagnosticHandlerFunction DiagnosticHandler,
       std::function<std::unique_ptr<Module>(StringRef Identifier)> ModuleLoader)
-      : Index(Index), DiagnosticHandler(DiagnosticHandler),
-        ModuleLoader(ModuleLoader) {}
+      : Index(Index), ModuleLoader(ModuleLoader) {}
 
   /// Import functions in Module \p M based on the summary informations.
   bool importFunctions(Module &M);