From ed1c0ffe0b2287deaee7cba7506c93aa34c6d4b7 Mon Sep 17 00:00:00 2001 From: Jeffrey Yasskin Date: Wed, 1 Jul 2009 18:11:20 +0000 Subject: Add a portable strerror*() wrapper, llvm::sys::StrError(). This includes the Windows variant, strerror_s, but I couldn't test that. I'll update configure and config.h.in in a subsequent patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74621 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/gold/gold-plugin.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/gold/gold-plugin.cpp') diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp index 8d8fcd2f44..146c53fbb7 100644 --- a/tools/gold/gold-plugin.cpp +++ b/tools/gold/gold-plugin.cpp @@ -17,6 +17,7 @@ #include "llvm-c/lto.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/System/Errno.h" #include "llvm/System/Path.h" #include "llvm/System/Program.h" @@ -183,7 +184,7 @@ ld_plugin_status claim_file_hook(const ld_plugin_input_file *file, (*message)(LDPL_ERROR, "Failed to seek to archive member of %s at offset %d: %s\n", file->name, - file->offset, strerror(errno)); + file->offset, sys::StrError(errno).c_str()); return LDPS_ERR; } buf = malloc(file->filesize); @@ -198,7 +199,7 @@ ld_plugin_status claim_file_hook(const ld_plugin_input_file *file, "Failed to read archive member of %s at offset %d: %s\n", file->name, file->offset, - strerror(errno)); + sys::StrError(errno).c_str()); free(buf); return LDPS_ERR; } -- cgit v1.2.3