瀏覽代碼

Remove system_error.h.

This is a minimal change to remove the header. I will remove the occurrences
of "using std::error_code" in a followup patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210803 91177308-0d34-0410-b5e6-96231b3b80d8
Rafael Espindola 11 年之前
父節點
當前提交
d5132f9073
共有 58 個文件被更改,包括 73 次插入91 次删除
  1. 2 2
      include/llvm/IR/GVMaterializer.h
  2. 1 1
      include/llvm/IR/Module.h
  3. 2 1
      include/llvm/Object/Error.h
  4. 2 2
      include/llvm/ProfileData/InstrProf.h
  5. 2 1
      include/llvm/Support/ErrorOr.h
  6. 2 1
      include/llvm/Support/FileSystem.h
  7. 2 2
      include/llvm/Support/LockFileManager.h
  8. 2 1
      include/llvm/Support/Memory.h
  9. 2 1
      include/llvm/Support/MemoryBuffer.h
  10. 1 1
      include/llvm/Support/Process.h
  11. 2 1
      include/llvm/Support/Program.h
  12. 1 1
      include/llvm/Support/YAMLTraits.h
  13. 0 23
      include/llvm/Support/system_error.h
  14. 1 1
      lib/AsmParser/Parser.cpp
  15. 1 1
      lib/Bitcode/Reader/BitcodeReader.h
  16. 1 1
      lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
  17. 2 2
      lib/IR/Core.cpp
  18. 1 1
      lib/IR/GCOV.cpp
  19. 1 1
      lib/IRReader/IRReader.cpp
  20. 1 1
      lib/LTO/LTOCodeGenerator.cpp
  21. 1 1
      lib/LTO/LTOModule.cpp
  22. 1 1
      lib/Object/ObjectFile.cpp
  23. 1 1
      lib/Support/CommandLine.cpp
  24. 1 1
      lib/Support/DataStream.cpp
  25. 1 1
      lib/Support/FileOutputBuffer.cpp
  26. 1 1
      lib/Support/FileUtilities.cpp
  27. 1 1
      lib/Support/MemoryBuffer.cpp
  28. 1 1
      lib/Support/Program.cpp
  29. 1 1
      lib/Support/SourceMgr.cpp
  30. 1 1
      lib/Support/Windows/WindowsSupport.h
  31. 1 1
      lib/Support/raw_ostream.cpp
  32. 1 1
      lib/TableGen/Main.cpp
  33. 1 1
      lib/Transforms/Instrumentation/AddressSanitizer.cpp
  34. 1 1
      lib/Transforms/Utils/SpecialCaseList.cpp
  35. 1 1
      tools/gold/gold-plugin.cpp
  36. 1 1
      tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
  37. 1 1
      tools/llvm-cov/llvm-cov.cpp
  38. 1 1
      tools/llvm-dis/llvm-dis.cpp
  39. 1 1
      tools/llvm-dwarfdump/llvm-dwarfdump.cpp
  40. 1 1
      tools/llvm-mcmarkup/llvm-mcmarkup.cpp
  41. 1 1
      tools/llvm-nm/llvm-nm.cpp
  42. 1 1
      tools/llvm-objdump/COFFDump.cpp
  43. 1 1
      tools/llvm-objdump/MachODump.cpp
  44. 1 1
      tools/llvm-objdump/llvm-objdump.cpp
  45. 2 2
      tools/llvm-readobj/COFFDumper.cpp
  46. 2 2
      tools/llvm-readobj/Error.h
  47. 2 3
      tools/llvm-readobj/ObjDumper.h
  48. 1 1
      tools/llvm-readobj/llvm-readobj.cpp
  49. 1 1
      tools/llvm-rtdyld/llvm-rtdyld.cpp
  50. 1 1
      tools/llvm-size/llvm-size.cpp
  51. 1 1
      tools/macho-dump/macho-dump.cpp
  52. 2 2
      tools/obj2yaml/Error.h
  53. 1 1
      tools/obj2yaml/obj2yaml.h
  54. 2 2
      tools/yaml2obj/yaml2obj.cpp
  55. 1 1
      utils/FileCheck/FileCheck.cpp
  56. 1 1
      utils/FileUpdate/FileUpdate.cpp
  57. 2 2
      utils/KillTheDoctor/KillTheDoctor.cpp
  58. 1 1
      utils/yaml-bench/YAMLBench.cpp

+ 2 - 2
include/llvm/IR/GVMaterializer.h

@@ -18,10 +18,10 @@
 #ifndef LLVM_IR_GVMATERIALIZER_H
 #define LLVM_IR_GVMATERIALIZER_H
 
-#include "llvm/Support/system_error.h"
+#include <system_error>
 
 namespace llvm {
-
+using std::error_code;
 class Function;
 class GlobalValue;
 class Module;

+ 1 - 1
include/llvm/IR/Module.h

@@ -23,7 +23,7 @@
 #include "llvm/IR/Metadata.h"
 #include "llvm/Support/CBindingWrapping.h"
 #include "llvm/Support/DataTypes.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 
 namespace llvm {
 

+ 2 - 1
include/llvm/Object/Error.h

@@ -14,9 +14,10 @@
 #ifndef LLVM_OBJECT_ERROR_H
 #define LLVM_OBJECT_ERROR_H
 
-#include "llvm/Support/system_error.h"
+#include <system_error>
 
 namespace llvm {
+using std::error_code;
 namespace object {
 
 const std::error_category &object_category();

+ 2 - 2
include/llvm/ProfileData/InstrProf.h

@@ -16,10 +16,10 @@
 #ifndef LLVM_PROFILEDATA_INSTRPROF_H_
 #define LLVM_PROFILEDATA_INSTRPROF_H_
 
-#include "llvm/Support/system_error.h"
+#include <system_error>
 
 namespace llvm {
-
+using std::error_code;
 const std::error_category &instrprof_category();
 
 enum class instrprof_error {

+ 2 - 1
include/llvm/Support/ErrorOr.h

@@ -18,11 +18,12 @@
 
 #include "llvm/ADT/PointerIntPair.h"
 #include "llvm/Support/AlignOf.h"
-#include "llvm/Support/system_error.h"
 #include <cassert>
+#include <system_error>
 #include <type_traits>
 
 namespace llvm {
+using std::error_code;
 template<class T, class V>
 typename std::enable_if< std::is_constructible<T, V>::value
                        , typename std::remove_reference<V>::type>::type &&

+ 2 - 1
include/llvm/Support/FileSystem.h

@@ -33,11 +33,11 @@
 #include "llvm/Support/DataTypes.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/TimeValue.h"
-#include "llvm/Support/system_error.h"
 #include <ctime>
 #include <iterator>
 #include <stack>
 #include <string>
+#include <system_error>
 #include <tuple>
 #include <vector>
 
@@ -46,6 +46,7 @@
 #endif
 
 namespace llvm {
+using std::error_code;
 namespace sys {
 namespace fs {
 

+ 2 - 2
include/llvm/Support/LockFileManager.h

@@ -12,11 +12,11 @@
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/StringRef.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 #include <utility> // for std::pair
 
 namespace llvm {
-
+using std::error_code;
 /// \brief Class that manages the creation of a lock file to aid
 /// implicit coordination between different processes.
 ///

+ 2 - 1
include/llvm/Support/Memory.h

@@ -15,10 +15,11 @@
 #define LLVM_SUPPORT_MEMORY_H
 
 #include "llvm/Support/DataTypes.h"
-#include "llvm/Support/system_error.h"
 #include <string>
+#include <system_error>
 
 namespace llvm {
+using std::error_code;
 namespace sys {
 
   /// This class encapsulates the notion of a memory block which has an address

+ 2 - 1
include/llvm/Support/MemoryBuffer.h

@@ -19,10 +19,11 @@
 #include "llvm/Support/CBindingWrapping.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/DataTypes.h"
-#include "llvm/Support/system_error.h"
 #include <memory>
+#include <system_error>
 
 namespace llvm {
+using std::error_code;
 /// MemoryBuffer - This interface provides simple read-only access to a block
 /// of memory, and provides simple methods for reading files and standard input
 /// into a memory buffer.  In addition to basic access to the characters in the

+ 1 - 1
include/llvm/Support/Process.h

@@ -31,7 +31,7 @@
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/DataTypes.h"
 #include "llvm/Support/TimeValue.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 
 namespace llvm {
 class StringRef;

+ 2 - 1
include/llvm/Support/Program.h

@@ -16,9 +16,10 @@
 
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/Support/Path.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 
 namespace llvm {
+using std::error_code;
 namespace sys {
 
   /// This is the OS-specific separator for PATH like environment variables:

+ 1 - 1
include/llvm/Support/YAMLTraits.h

@@ -24,7 +24,7 @@
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/YAMLParser.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 
 namespace llvm {
 namespace yaml {

+ 0 - 23
include/llvm/Support/system_error.h

@@ -1,23 +0,0 @@
-//===---------------------------- system_error ------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This is a temporary file to help with the transition to std::error_code.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_SUPPORT_SYSTEM_ERROR_H
-#define LLVM_SUPPORT_SYSTEM_ERROR_H
-
-#include <system_error>
-
-namespace llvm {
-using std::error_code;
-}
-
-#endif

+ 1 - 1
lib/AsmParser/Parser.cpp

@@ -17,8 +17,8 @@
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include <cstring>
+#include <system_error>
 using namespace llvm;
 
 Module *llvm::ParseAssembly(MemoryBuffer *F,

+ 1 - 1
lib/Bitcode/Reader/BitcodeReader.h

@@ -22,7 +22,7 @@
 #include "llvm/IR/OperandTraits.h"
 #include "llvm/IR/Type.h"
 #include "llvm/IR/ValueHandle.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 #include <vector>
 
 namespace llvm {

+ 1 - 1
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h

@@ -28,8 +28,8 @@
 #include "llvm/Support/Mutex.h"
 #include "llvm/Support/SwapByteOrder.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include <map>
+#include <system_error>
 
 using namespace llvm;
 using namespace llvm::object;

+ 2 - 2
lib/IR/Core.cpp

@@ -17,9 +17,9 @@
 #include "llvm/IR/Attributes.h"
 #include "llvm/IR/CallSite.h"
 #include "llvm/IR/Constants.h"
+#include "llvm/IR/DerivedTypes.h"
 #include "llvm/IR/DiagnosticInfo.h"
 #include "llvm/IR/DiagnosticPrinter.h"
-#include "llvm/IR/DerivedTypes.h"
 #include "llvm/IR/GlobalAlias.h"
 #include "llvm/IR/GlobalVariable.h"
 #include "llvm/IR/IRBuilder.h"
@@ -35,10 +35,10 @@
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Threading.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include <cassert>
 #include <cstdlib>
 #include <cstring>
+#include <system_error>
 
 using namespace llvm;
 

+ 1 - 1
lib/IR/GCOV.cpp

@@ -19,8 +19,8 @@
 #include "llvm/Support/Format.h"
 #include "llvm/Support/MemoryObject.h"
 #include "llvm/Support/Path.h"
-#include "llvm/Support/system_error.h"
 #include <algorithm>
+#include <system_error>
 using namespace llvm;
 
 //===----------------------------------------------------------------------===//

+ 1 - 1
lib/IRReader/IRReader.cpp

@@ -18,7 +18,7 @@
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/Timer.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 
 using namespace llvm;
 

+ 1 - 1
lib/LTO/LTOCodeGenerator.cpp

@@ -44,7 +44,6 @@
 #include "llvm/Support/TargetSelect.h"
 #include "llvm/Support/ToolOutputFile.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include "llvm/Target/TargetLibraryInfo.h"
 #include "llvm/Target/TargetLowering.h"
 #include "llvm/Target/TargetOptions.h"
@@ -52,6 +51,7 @@
 #include "llvm/Transforms/IPO.h"
 #include "llvm/Transforms/IPO/PassManagerBuilder.h"
 #include "llvm/Transforms/ObjCARC.h"
+#include <system_error>
 using namespace llvm;
 
 const char* LTOCodeGenerator::getVersionString() {

+ 1 - 1
lib/LTO/LTOModule.cpp

@@ -37,11 +37,11 @@
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/TargetRegistry.h"
 #include "llvm/Support/TargetSelect.h"
-#include "llvm/Support/system_error.h"
 #include "llvm/Target/TargetLowering.h"
 #include "llvm/Target/TargetLoweringObjectFile.h"
 #include "llvm/Target/TargetRegisterInfo.h"
 #include "llvm/Transforms/Utils/GlobalStatus.h"
+#include <system_error>
 using namespace llvm;
 
 LTOModule::LTOModule(llvm::Module *m, llvm::TargetMachine *t)

+ 1 - 1
lib/Object/ObjectFile.cpp

@@ -16,7 +16,7 @@
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 
 using namespace llvm;
 using namespace object;

+ 1 - 1
lib/Support/CommandLine.cpp

@@ -31,10 +31,10 @@
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include <cerrno>
 #include <cstdlib>
 #include <map>
+#include <system_error>
 using namespace llvm;
 using namespace cl;
 

+ 1 - 1
lib/Support/DataStream.cpp

@@ -18,10 +18,10 @@
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Program.h"
-#include "llvm/Support/system_error.h"
 #include <cerrno>
 #include <cstdio>
 #include <string>
+#include <system_error>
 #if !defined(_MSC_VER) && !defined(__MINGW32__)
 #include <unistd.h>
 #else

+ 1 - 1
lib/Support/FileOutputBuffer.cpp

@@ -14,7 +14,7 @@
 #include "llvm/Support/FileOutputBuffer.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 
 using llvm::sys::fs::mapped_file_region;
 

+ 1 - 1
lib/Support/FileUtilities.cpp

@@ -17,10 +17,10 @@
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include <cctype>
 #include <cstdlib>
 #include <cstring>
+#include <system_error>
 using namespace llvm;
 
 static bool isSignedChar(char C) {

+ 1 - 1
lib/Support/MemoryBuffer.cpp

@@ -20,13 +20,13 @@
 #include "llvm/Support/Path.h"
 #include "llvm/Support/Process.h"
 #include "llvm/Support/Program.h"
-#include "llvm/Support/system_error.h"
 #include <cassert>
 #include <cerrno>
 #include <cstdio>
 #include <cstring>
 #include <new>
 #include <sys/types.h>
+#include <system_error>
 #if !defined(_MSC_VER) && !defined(__MINGW32__)
 #include <unistd.h>
 #else

+ 1 - 1
lib/Support/Program.cpp

@@ -13,7 +13,7 @@
 
 #include "llvm/Support/Program.h"
 #include "llvm/Config/config.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 using namespace llvm;
 using namespace sys;
 

+ 1 - 1
lib/Support/SourceMgr.cpp

@@ -20,7 +20,7 @@
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 using namespace llvm;
 
 static const size_t TabStop = 8;

+ 1 - 1
lib/Support/Windows/WindowsSupport.h

@@ -32,7 +32,7 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Config/config.h" // Get build system configuration settings
 #include "llvm/Support/Compiler.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 #include <windows.h>
 #include <wincrypt.h>
 #include <cassert>

+ 1 - 1
lib/Support/raw_ostream.cpp

@@ -22,10 +22,10 @@
 #include "llvm/Support/Format.h"
 #include "llvm/Support/Process.h"
 #include "llvm/Support/Program.h"
-#include "llvm/Support/system_error.h"
 #include <cctype>
 #include <cerrno>
 #include <sys/stat.h>
+#include <system_error>
 
 // <fcntl.h> may provide O_BINARY.
 #if defined(HAVE_FCNTL_H)

+ 1 - 1
lib/TableGen/Main.cpp

@@ -20,12 +20,12 @@
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/ToolOutputFile.h"
-#include "llvm/Support/system_error.h"
 #include "llvm/TableGen/Error.h"
 #include "llvm/TableGen/Main.h"
 #include "llvm/TableGen/Record.h"
 #include <algorithm>
 #include <cstdio>
+#include <system_error>
 using namespace llvm;
 
 namespace {

+ 1 - 1
lib/Transforms/Instrumentation/AddressSanitizer.cpp

@@ -39,7 +39,6 @@
 #include "llvm/Support/DataTypes.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/Endian.h"
-#include "llvm/Support/system_error.h"
 #include "llvm/Transforms/Utils/ASanStackFrameLayout.h"
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
 #include "llvm/Transforms/Utils/Cloning.h"
@@ -48,6 +47,7 @@
 #include "llvm/Transforms/Utils/SpecialCaseList.h"
 #include <algorithm>
 #include <string>
+#include <system_error>
 
 using namespace llvm;
 

+ 1 - 1
lib/Transforms/Utils/SpecialCaseList.cpp

@@ -26,8 +26,8 @@
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Regex.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include <string>
+#include <system_error>
 #include <utility>
 
 namespace llvm {

+ 1 - 1
tools/gold/gold-plugin.cpp

@@ -21,13 +21,13 @@
 #include "llvm/Support/Path.h"
 #include "llvm/Support/Program.h"
 #include "llvm/Support/ToolOutputFile.h"
-#include "llvm/Support/system_error.h"
 #include <cerrno>
 #include <cstdlib>
 #include <cstring>
 #include <fstream>
 #include <list>
 #include <plugin-api.h>
+#include <system_error>
 #include <vector>
 
 // Support Windows/MinGW crazyness.

+ 1 - 1
tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp

@@ -38,10 +38,10 @@
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include <algorithm>
 #include <cctype>
 #include <map>
+#include <system_error>
 using namespace llvm;
 
 static cl::opt<std::string>

+ 1 - 1
tools/llvm-cov/llvm-cov.cpp

@@ -20,7 +20,7 @@
 #include "llvm/Support/Path.h"
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Signals.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 using namespace llvm;
 
 static cl::opt<std::string> SourceFile(cl::Positional, cl::Required,

+ 1 - 1
tools/llvm-dis/llvm-dis.cpp

@@ -32,7 +32,7 @@
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/ToolOutputFile.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 using namespace llvm;
 
 static cl::opt<std::string>

+ 1 - 1
tools/llvm-dwarfdump/llvm-dwarfdump.cpp

@@ -25,11 +25,11 @@
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include <algorithm>
 #include <cstring>
 #include <list>
 #include <string>
+#include <system_error>
 
 using namespace llvm;
 using namespace object;

+ 1 - 1
tools/llvm-mcmarkup/llvm-mcmarkup.cpp

@@ -19,7 +19,7 @@
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 using namespace llvm;
 
 static cl::list<std::string>

+ 1 - 1
tools/llvm-nm/llvm-nm.cpp

@@ -37,11 +37,11 @@
 #include "llvm/Support/Program.h"
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include <algorithm>
 #include <cctype>
 #include <cerrno>
 #include <cstring>
+#include <system_error>
 #include <vector>
 using namespace llvm;
 using namespace object;

+ 1 - 1
tools/llvm-objdump/COFFDump.cpp

@@ -22,9 +22,9 @@
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/Win64EH.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include <algorithm>
 #include <cstring>
+#include <system_error>
 
 using namespace llvm;
 using namespace object;

+ 1 - 1
tools/llvm-objdump/MachODump.cpp

@@ -37,9 +37,9 @@
 #include "llvm/Support/TargetRegistry.h"
 #include "llvm/Support/TargetSelect.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include <algorithm>
 #include <cstring>
+#include <system_error>
 using namespace llvm;
 using namespace object;
 

+ 1 - 1
tools/llvm-objdump/llvm-objdump.cpp

@@ -57,10 +57,10 @@
 #include "llvm/Support/TargetRegistry.h"
 #include "llvm/Support/TargetSelect.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include <algorithm>
 #include <cctype>
 #include <cstring>
+#include <system_error>
 
 using namespace llvm;
 using namespace object;

+ 2 - 2
tools/llvm-readobj/COFFDumper.cpp

@@ -13,10 +13,10 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm-readobj.h"
+#include "ARMWinEHPrinter.h"
 #include "Error.h"
 #include "ObjDumper.h"
 #include "StreamWriter.h"
-#include "ARMWinEHPrinter.h"
 #include "Win64EHDumper.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/SmallString.h"
@@ -30,9 +30,9 @@
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/Win64EH.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include <algorithm>
 #include <cstring>
+#include <system_error>
 #include <time.h>
 
 using namespace llvm;

+ 2 - 2
tools/llvm-readobj/Error.h

@@ -14,10 +14,10 @@
 #ifndef LLVM_READOBJ_ERROR_H
 #define LLVM_READOBJ_ERROR_H
 
-#include "llvm/Support/system_error.h"
+#include <system_error>
 
 namespace llvm {
-
+using std::error_code;
 const std::error_category &readobj_category();
 
 enum class readobj_error {

+ 2 - 3
tools/llvm-readobj/ObjDumper.h

@@ -10,12 +10,11 @@
 #ifndef LLVM_READOBJ_OBJDUMPER_H
 #define LLVM_READOBJ_OBJDUMPER_H
 
-#include "llvm/Support/system_error.h"
-
 #include <memory>
+#include <system_error>
 
 namespace llvm {
-
+using std::error_code;
 namespace object {
   class ObjectFile;
 }

+ 1 - 1
tools/llvm-readobj/llvm-readobj.cpp

@@ -35,8 +35,8 @@
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/TargetRegistry.h"
 #include "llvm/Support/TargetSelect.h"
-#include "llvm/Support/system_error.h"
 #include <string>
+#include <system_error>
 
 
 using namespace llvm;

+ 1 - 1
tools/llvm-rtdyld/llvm-rtdyld.cpp

@@ -25,7 +25,7 @@
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 using namespace llvm;
 using namespace llvm::object;
 

+ 1 - 1
tools/llvm-size/llvm-size.cpp

@@ -25,9 +25,9 @@
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include <algorithm>
 #include <string>
+#include <system_error>
 using namespace llvm;
 using namespace object;
 

+ 1 - 1
tools/macho-dump/macho-dump.cpp

@@ -20,7 +20,7 @@
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 using namespace llvm;
 using namespace llvm::object;
 

+ 2 - 2
tools/obj2yaml/Error.h

@@ -10,10 +10,10 @@
 #ifndef LLVM_TOOLS_ERROR_H
 #define LLVM_TOOLS_ERROR_H
 
-#include "llvm/Support/system_error.h"
+#include <system_error>
 
 namespace llvm {
-
+using std::error_code;
 const std::error_category &obj2yaml_category();
 
 enum class obj2yaml_error {

+ 1 - 1
tools/obj2yaml/obj2yaml.h

@@ -15,7 +15,7 @@
 
 #include "llvm/Object/COFF.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 
 std::error_code coff2yaml(llvm::raw_ostream &Out,
                           const llvm::object::COFFObjectFile &Obj);

+ 2 - 2
tools/yaml2obj/yaml2obj.cpp

@@ -22,10 +22,10 @@
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Signals.h"
-#include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include "llvm/Support/ToolOutputFile.h"
 #include "llvm/Support/YAMLTraits.h"
+#include "llvm/Support/raw_ostream.h"
+#include <system_error>
 
 using namespace llvm;
 

+ 1 - 1
utils/FileCheck/FileCheck.cpp

@@ -27,11 +27,11 @@
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include <algorithm>
 #include <cctype>
 #include <map>
 #include <string>
+#include <system_error>
 #include <vector>
 using namespace llvm;
 

+ 1 - 1
utils/FileUpdate/FileUpdate.cpp

@@ -19,7 +19,7 @@
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/ToolOutputFile.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 using namespace llvm;
 
 static cl::opt<bool>

+ 2 - 2
utils/KillTheDoctor/KillTheDoctor.cpp

@@ -40,15 +40,15 @@
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Signals.h"
+#include "llvm/Support/WindowsError.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
 #include "llvm/Support/type_traits.h"
-#include "llvm/Support/WindowsError.h"
 #include <algorithm>
 #include <cerrno>
 #include <cstdlib>
 #include <map>
 #include <string>
+#include <system_error>
 
 // These includes must be last.
 #include <Windows.h>

+ 1 - 1
utils/yaml-bench/YAMLBench.cpp

@@ -21,7 +21,7 @@
 #include "llvm/Support/Timer.h"
 #include "llvm/Support/YAMLParser.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Support/system_error.h"
+#include <system_error>
 
 using namespace llvm;