summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Errno.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/Errno.cpp')
-rw-r--r--llvm/lib/Support/Errno.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/Support/Errno.cpp b/llvm/lib/Support/Errno.cpp
index 3ba2a1277d0..888887cb938 100644
--- a/llvm/lib/Support/Errno.cpp
+++ b/llvm/lib/Support/Errno.cpp
@@ -14,11 +14,9 @@
#include "llvm/Support/Errno.h"
#include "llvm/Config/config.h" // Get autoconf configuration settings
#include "llvm/Support/raw_ostream.h"
-#include <string.h>
-
-#if HAVE_ERRNO_H
-#include <errno.h>
-#endif
+#include <cerrno>
+#include <cstring>
+#include <string>
//===----------------------------------------------------------------------===//
//=== WARNING: Implementation here must contain only TRULY operating system
@@ -32,7 +30,7 @@ namespace sys {
std::string StrError() {
return StrError(errno);
}
-#endif // HAVE_ERRNO_H
+#endif // HAVE_ERRNO_H
std::string StrError(int errnum) {
std::string str;
@@ -72,5 +70,5 @@ std::string StrError(int errnum) {
return str;
}
-} // namespace sys
-} // namespace llvm
+} // namespace sys
+} // namespace llvm
OpenPOWER on IntegriCloud