Use diagnostic handler in the LLVMContext
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 14 Dec 2015 23:17:03 +0000 (23:17 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 14 Dec 2015 23:17:03 +0000 (23:17 +0000)
commit7a1fc2d33e22333b6ebe8f1ef2f6c14ad82bd114
treee1e664377457567029f570b7483288082199f350
parent265bc7dab126aadfb12f7ea40f25ae0bf85cff33
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255571 91177308-0d34-0410-b5e6-96231b3b80d8
18 files changed:
include/llvm/Bitcode/ReaderWriter.h
include/llvm/Linker/IRMover.h
include/llvm/Linker/Linker.h
include/llvm/Transforms/IPO/FunctionImport.h
lib/Bitcode/Reader/BitReader.cpp
lib/Bitcode/Reader/BitcodeReader.cpp
lib/LTO/LTOCodeGenerator.cpp
lib/LTO/LTOModule.cpp
lib/Linker/IRMover.cpp
lib/Linker/LinkModules.cpp
lib/Object/IRObjectFile.cpp
lib/Transforms/IPO/FunctionImport.cpp
test/Linker/drop-debug.ll
tools/bugpoint/BugDriver.cpp
tools/bugpoint/Miscompilation.cpp
tools/gold/gold-plugin.cpp
tools/llvm-link/llvm-link.cpp
unittests/Linker/LinkModulesTest.cpp