summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/include/lld/Core/Error.h24
-rw-r--r--lld/include/lld/Core/LLVM.h2
-rw-r--r--lld/lib/Core/Error.cpp9
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp2
-rw-r--r--lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp2
-rw-r--r--lld/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp2
6 files changed, 20 insertions, 21 deletions
diff --git a/lld/include/lld/Core/Error.h b/lld/include/lld/Core/Error.h
index e2732c83b0b..e6c0c71418d 100644
--- a/lld/include/lld/Core/Error.h
+++ b/lld/include/lld/Core/Error.h
@@ -30,8 +30,8 @@ enum class NativeReaderError {
memory_error,
};
-inline llvm::error_code make_error_code(NativeReaderError e) {
- return llvm::error_code(static_cast<int>(e), native_reader_category());
+inline std::error_code make_error_code(NativeReaderError e) {
+ return std::error_code(static_cast<int>(e), native_reader_category());
}
const std::error_category &YamlReaderCategory();
@@ -42,8 +42,8 @@ enum class YamlReaderError {
illegal_value
};
-inline llvm::error_code make_error_code(YamlReaderError e) {
- return llvm::error_code(static_cast<int>(e), YamlReaderCategory());
+inline std::error_code make_error_code(YamlReaderError e) {
+ return std::error_code(static_cast<int>(e), YamlReaderCategory());
}
const std::error_category &LinkerScriptReaderCategory();
@@ -53,8 +53,8 @@ enum class LinkerScriptReaderError {
parse_error
};
-inline llvm::error_code make_error_code(LinkerScriptReaderError e) {
- return llvm::error_code(static_cast<int>(e), LinkerScriptReaderCategory());
+inline std::error_code make_error_code(LinkerScriptReaderError e) {
+ return std::error_code(static_cast<int>(e), LinkerScriptReaderCategory());
}
/// \brief Errors returned by InputGraph functionality
@@ -67,8 +67,8 @@ enum class InputGraphError {
no_more_files
};
-inline llvm::error_code make_error_code(InputGraphError e) {
- return llvm::error_code(static_cast<int>(e), InputGraphErrorCategory());
+inline std::error_code make_error_code(InputGraphError e) {
+ return std::error_code(static_cast<int>(e), InputGraphErrorCategory());
}
/// \brief Errors returned by Reader.
@@ -79,8 +79,8 @@ enum class ReaderError {
unknown_file_format = 1
};
-inline llvm::error_code make_error_code(ReaderError e) {
- return llvm::error_code(static_cast<int>(e), ReaderErrorCategory());
+inline std::error_code make_error_code(ReaderError e) {
+ return std::error_code(static_cast<int>(e), ReaderErrorCategory());
}
@@ -90,8 +90,8 @@ inline llvm::error_code make_error_code(ReaderError e) {
/// supplied error string.
/// Note: Once ErrorOr<> is updated to work with errors other than error_code,
/// this can be updated to return some other kind of error.
-llvm::error_code make_dynamic_error_code(StringRef msg);
-llvm::error_code make_dynamic_error_code(const Twine &msg);
+std::error_code make_dynamic_error_code(StringRef msg);
+std::error_code make_dynamic_error_code(const Twine &msg);
} // end namespace lld
diff --git a/lld/include/lld/Core/LLVM.h b/lld/include/lld/Core/LLVM.h
index ed974213335..d388d86dd81 100644
--- a/lld/include/lld/Core/LLVM.h
+++ b/lld/include/lld/Core/LLVM.h
@@ -61,7 +61,7 @@ namespace lld {
using llvm::SaveAndRestore;
using llvm::ErrorOr;
- using llvm::error_code;
+ using std::error_code;
using llvm::raw_ostream;
} // end namespace lld.
diff --git a/lld/lib/Core/Error.cpp b/lld/lib/Core/Error.cpp
index 210f1ebc62b..25da2b396b2 100644
--- a/lld/lib/Core/Error.cpp
+++ b/lld/lib/Core/Error.cpp
@@ -209,13 +209,12 @@ private:
static dynamic_error_category categorySingleton;
-
-llvm::error_code make_dynamic_error_code(StringRef msg) {
- return llvm::error_code(categorySingleton.add(msg), categorySingleton);
+std::error_code make_dynamic_error_code(StringRef msg) {
+ return std::error_code(categorySingleton.add(msg), categorySingleton);
}
-llvm::error_code make_dynamic_error_code(const Twine &msg) {
- return llvm::error_code(categorySingleton.add(msg.str()), categorySingleton);
+std::error_code make_dynamic_error_code(const Twine &msg) {
+ return std::error_code(categorySingleton.add(msg.str()), categorySingleton);
}
}
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
index d792975dc71..f5c3c4d12da 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
@@ -36,7 +36,7 @@
using llvm::StringRef;
-using llvm::error_code;
+using std::error_code;
using namespace llvm::yaml;
using namespace llvm::MachO;
using namespace lld::mach_o::normalized;
diff --git a/lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp b/lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp
index 36869c0ae56..ff8106020c3 100644
--- a/lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp
+++ b/lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp
@@ -24,7 +24,7 @@ using llvm::MemoryBuffer;
using llvm::SmallString;
using llvm::Twine;
using llvm::ErrorOr;
-using llvm::error_code;
+using std::error_code;
using namespace llvm::MachO;
using namespace lld::mach_o::normalized;
diff --git a/lld/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp b/lld/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp
index 0ad787dafbd..79d56034237 100644
--- a/lld/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp
+++ b/lld/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp
@@ -35,7 +35,7 @@ static std::unique_ptr<NormalizedFile> fromYAML(StringRef str) {
static void toYAML(const NormalizedFile &f, std::string &out) {
llvm::raw_string_ostream ostr(out);
- llvm::error_code ec = lld::mach_o::normalized::writeYaml(f, ostr);
+ std::error_code ec = lld::mach_o::normalized::writeYaml(f, ostr);
EXPECT_TRUE(!ec);
}
OpenPOWER on IntegriCloud