summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/LTO/LTOCodeGenerator.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-12-25 21:39:45 +0000
committerdim <dim@FreeBSD.org>2015-12-25 21:39:45 +0000
commit6f44a590dad07c47cdc2fc19861574af1da36963 (patch)
tree3570671d3fc79afee8f95c67867446e3151a9d94 /contrib/llvm/lib/LTO/LTOCodeGenerator.cpp
parent0efa1469be94566c09b9f4ce538c28e92d26026c (diff)
downloadFreeBSD-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.cpp11
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();
}
OpenPOWER on IntegriCloud