[Beignet] [PATCH] GBE: Output linkModules's error message.
He Junyan
junyan.he at inbox.com
Tue Sep 16 21:56:52 PDT 2014
LGTM
thanks
On 三, 2014-09-17 at 11:33 +0800, Ruiling Song wrote:
> Signed-off-by: Ruiling Song <ruiling.song at intel.com>
> ---
> backend/src/llvm/llvm_bitcode_link.cpp | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/backend/src/llvm/llvm_bitcode_link.cpp b/backend/src/llvm/llvm_bitcode_link.cpp
> index d845479..1365b32 100644
> --- a/backend/src/llvm/llvm_bitcode_link.cpp
> +++ b/backend/src/llvm/llvm_bitcode_link.cpp
> @@ -204,9 +204,10 @@ namespace gbe
>
> /* We use beignet's bitcode as dst because it will have a lot of
> lazy functions which will not be loaded. */
> - if(Linker::LinkModules(clonedLib, mod, Linker::DestroySource, NULL)) {
> + std::string errorMsg;
> + if(Linker::LinkModules(clonedLib, mod, Linker::DestroySource, &errorMsg)) {
> delete clonedLib;
> - printf("Fatal Error: link the bitcode error\n");
> + printf("Fatal Error: link the bitcode error:\n%s\n", errorMsg.c_str());
> return NULL;
> }
>
More information about the Beignet
mailing list