From 9d2bfc48741a5c0c3a3eb455959a627afcc3b722 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 14 Dec 2015 23:17:03 +0000 Subject: 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 --- llvm/lib/LTO/LTOModule.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'llvm/lib/LTO/LTOModule.cpp') diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp index a6a3002e457..409b9490233 100644 --- a/llvm/lib/LTO/LTOModule.cpp +++ b/llvm/lib/LTO/LTOModule.cpp @@ -172,9 +172,8 @@ parseBitcodeFileImpl(MemoryBufferRef Buffer, LLVMContext &Context, // Parse lazily. std::unique_ptr LightweightBuf = MemoryBuffer::getMemBuffer(*MBOrErr, false); - ErrorOr> M = - getLazyBitcodeModule(std::move(LightweightBuf), Context, nullptr, - true /*ShouldLazyLoadMetadata*/); + ErrorOr> M = getLazyBitcodeModule( + std::move(LightweightBuf), Context, true /*ShouldLazyLoadMetadata*/); if (std::error_code EC = M.getError()) return EC; return std::move(*M); -- cgit v1.2.3