diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2009-07-01 18:11:20 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2009-07-01 18:11:20 +0000 |
commit | ed1c0ffe0b2287deaee7cba7506c93aa34c6d4b7 (patch) | |
tree | aacc869a6945fbd60630f775bd2530fa3d2eaed9 /tools/gold/gold-plugin.cpp | |
parent | b1d7a5d1146c30a54002b7ab49daf024e3174b95 (diff) | |
download | llvm-ed1c0ffe0b2287deaee7cba7506c93aa34c6d4b7.tar.gz llvm-ed1c0ffe0b2287deaee7cba7506c93aa34c6d4b7.tar.bz2 llvm-ed1c0ffe0b2287deaee7cba7506c93aa34c6d4b7.tar.xz |
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
Diffstat (limited to 'tools/gold/gold-plugin.cpp')
-rw-r--r-- | tools/gold/gold-plugin.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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; } |