forked from OSchip/llvm-project
llvm-lto2: Print diagnostics before exiting (NFC)
llvm-svn: 290463
This commit is contained in:
parent
4c80946850
commit
14f19bd012
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "llvm/LTO/Caching.h"
|
||||
#include "llvm/CodeGen/CommandFlags.h"
|
||||
#include "llvm/IR/DiagnosticPrinter.h"
|
||||
#include "llvm/LTO/LTO.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/TargetSelect.h"
|
||||
|
@ -157,7 +158,10 @@ int main(int argc, char **argv) {
|
|||
std::vector<std::unique_ptr<MemoryBuffer>> MBs;
|
||||
|
||||
Config Conf;
|
||||
Conf.DiagHandler = [](const DiagnosticInfo &) {
|
||||
Conf.DiagHandler = [](const DiagnosticInfo &DI) {
|
||||
DiagnosticPrinterRawOStream DP(errs());
|
||||
DI.print(DP);
|
||||
errs() << '\n';
|
||||
exit(1);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue