Switch lto codegen to using diagnostic handlers.
authorYunzhong Gao <Yunzhong_Gao@playstation.sony.com>
Tue, 17 Nov 2015 19:48:12 +0000 (19:48 +0000)
committerYunzhong Gao <Yunzhong_Gao@playstation.sony.com>
Tue, 17 Nov 2015 19:48:12 +0000 (19:48 +0000)
commit576772b030398af6f21887d306d29ac3be988a72
treef77360c2a23e892749edd08123186140cdd3c3e2
parentd448978b61a742b533dde9e1be6475fa46aeccd5
Switch lto codegen to using diagnostic handlers.

This patch removes the std::string& argument from a number of C++ LTO API calls
and instead makes them use the installed diagnostic handler. This would also
improve consistency of diagnostic handling infrastructure: if an LTO client used
lto_codegen_set_diagnostic_handler() to install a custom error handler, we do
not want some error messages to go through the custom error handler, and some
other error messages to go into sLastErrorString.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253367 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/LTO/LTOCodeGenerator.h
lib/LTO/LTOCodeGenerator.cpp
tools/llvm-lto/llvm-lto.cpp
tools/lto/lto.cpp