diff options
author | dim <dim@FreeBSD.org> | 2015-12-25 21:39:45 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-12-25 21:39:45 +0000 |
commit | 6f44a590dad07c47cdc2fc19861574af1da36963 (patch) | |
tree | 3570671d3fc79afee8f95c67867446e3151a9d94 /contrib/llvm/lib/LTO/LTOCodeGenerator.cpp | |
parent | 0efa1469be94566c09b9f4ce538c28e92d26026c (diff) | |
download | FreeBSD-src-6f44a590dad07c47cdc2fc19861574af1da36963.zip FreeBSD-src-6f44a590dad07c47cdc2fc19861574af1da36963.tar.gz |
Upgrade our copies of clang and llvm to 3.7.1 release. This is a
bugfix-only release, with no new features.
Please note that from 3.5.0 onwards, clang and llvm require C++11
support to build; see UPDATING for more information.
Diffstat (limited to 'contrib/llvm/lib/LTO/LTOCodeGenerator.cpp')
-rw-r--r-- | contrib/llvm/lib/LTO/LTOCodeGenerator.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/contrib/llvm/lib/LTO/LTOCodeGenerator.cpp b/contrib/llvm/lib/LTO/LTOCodeGenerator.cpp index 149ec6a..25ae4ac 100644 --- a/contrib/llvm/lib/LTO/LTOCodeGenerator.cpp +++ b/contrib/llvm/lib/LTO/LTOCodeGenerator.cpp @@ -63,14 +63,21 @@ const char* LTOCodeGenerator::getVersionString() { #endif } +static void handleLTODiagnostic(const DiagnosticInfo &DI) { + DiagnosticPrinterRawOStream DP(errs()); + DI.print(DP); + errs() << "\n"; +} + LTOCodeGenerator::LTOCodeGenerator() - : Context(getGlobalContext()), IRLinker(new Module("ld-temp.o", Context)) { + : Context(getGlobalContext()), IRLinker(new Module("ld-temp.o", Context), + handleLTODiagnostic) { initializeLTOPasses(); } LTOCodeGenerator::LTOCodeGenerator(std::unique_ptr<LLVMContext> Context) : OwnedContext(std::move(Context)), Context(*OwnedContext), - IRLinker(new Module("ld-temp.o", *OwnedContext)) { + IRLinker(new Module("ld-temp.o", *OwnedContext), handleLTODiagnostic) { initializeLTOPasses(); } |