summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/BugDriver.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-12-14 23:17:03 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-12-14 23:17:03 +0000
commit9d2bfc48741a5c0c3a3eb455959a627afcc3b722 (patch)
treefe5cca4dadc85dbb69e9636da588d269ba63b92c /llvm/tools/bugpoint/BugDriver.cpp
parent2cb8a51c1f771437a0207c4c71e2d6273a4a3550 (diff)
downloadbcm5719-llvm-9d2bfc48741a5c0c3a3eb455959a627afcc3b722.tar.gz
bcm5719-llvm-9d2bfc48741a5c0c3a3eb455959a627afcc3b722.zip
Use diagnostic handler in the LLVMContext
This patch converts code that has access to a LLVMContext to not take a diagnostic handler. This has a few advantages * It is easier to use a consistent diagnostic handler in a single program. * Less clutter since we are not passing a handler around. It does make it a bit awkward to implement some C APIs that return a diagnostic string. I will propose new versions of these APIs and deprecate the current ones. llvm-svn: 255571
Diffstat (limited to 'llvm/tools/bugpoint/BugDriver.cpp')
-rw-r--r--llvm/tools/bugpoint/BugDriver.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/tools/bugpoint/BugDriver.cpp b/llvm/tools/bugpoint/BugDriver.cpp
index 9edc242d470..39887d5d59d 100644
--- a/llvm/tools/bugpoint/BugDriver.cpp
+++ b/llvm/tools/bugpoint/BugDriver.cpp
@@ -15,7 +15,6 @@
#include "BugDriver.h"
#include "ToolRunner.h"
-#include "llvm/IR/DiagnosticPrinter.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Verifier.h"
#include "llvm/IRReader/IRReader.h"
@@ -113,12 +112,6 @@ std::unique_ptr<Module> llvm::parseInputFile(StringRef Filename,
return Result;
}
-static void diagnosticHandler(const DiagnosticInfo &DI) {
- DiagnosticPrinterRawOStream DP(errs());
- DI.print(DP);
- errs() << '\n';
-}
-
// This method takes the specified list of LLVM input files, attempts to load
// them, either as assembly or bitcode, then link them together. It returns
// true on failure (if, for example, an input bitcode file could not be
@@ -139,7 +132,7 @@ bool BugDriver::addSources(const std::vector<std::string> &Filenames) {
if (!M.get()) return true;
outs() << "Linking in input file: '" << Filenames[i] << "'\n";
- if (Linker::linkModules(*Program, *M, diagnosticHandler))
+ if (Linker::linkModules(*Program, *M))
return true;
}
OpenPOWER on IntegriCloud