Skip to content

Commit

Permalink
Remove system_error.h.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
espindola committed Jun 12, 2014
1 parent f58ab6b commit d5132f9
Show file tree
Hide file tree
Showing 58 changed files with 73 additions and 91 deletions.
4 changes: 2 additions & 2 deletions include/llvm/IR/GVMaterializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/IR/Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
3 changes: 2 additions & 1 deletion include/llvm/Object/Error.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions include/llvm/ProfileData/InstrProf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion include/llvm/Support/ErrorOr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
3 changes: 2 additions & 1 deletion include/llvm/Support/FileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -46,6 +46,7 @@
#endif

namespace llvm {
using std::error_code;
namespace sys {
namespace fs {

Expand Down
4 changes: 2 additions & 2 deletions include/llvm/Support/LockFileManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down
3 changes: 2 additions & 1 deletion include/llvm/Support/Memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion include/llvm/Support/MemoryBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Support/Process.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion include/llvm/Support/Program.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Support/YAMLTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
23 changes: 0 additions & 23 deletions include/llvm/Support/system_error.h

This file was deleted.

2 changes: 1 addition & 1 deletion lib/AsmParser/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lib/Bitcode/Reader/BitcodeReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions lib/IR/Core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion lib/IR/GCOV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

//===----------------------------------------------------------------------===//
Expand Down
2 changes: 1 addition & 1 deletion lib/IRReader/IRReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion lib/LTO/LTOCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
#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"
#include "llvm/Target/TargetRegisterInfo.h"
#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() {
Expand Down
2 changes: 1 addition & 1 deletion lib/LTO/LTOModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/Object/ObjectFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/Support/CommandLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion lib/Support/DataStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/Support/FileOutputBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion lib/Support/FileUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Support/MemoryBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/Support/Program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion lib/Support/SourceMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/Support/Windows/WindowsSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion lib/Support/raw_ostream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/TableGen/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading

0 comments on commit d5132f9

Please sign in to comment.