diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-12 21:46:39 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-12 21:46:39 +0000 |
commit | 3acea39853d1a5ef2f3920c27f5748778fe53af9 (patch) | |
tree | f93b4e1c0fcdb02cf6c80b8e894f0f3b92f1bcac /llvm/lib/Support | |
parent | b6e7d64f3070db641c332ca495215b8c3b887882 (diff) | |
download | llvm-3acea39853d1a5ef2f3920c27f5748778fe53af9.zip llvm-3acea39853d1a5ef2f3920c27f5748778fe53af9.tar.gz llvm-3acea39853d1a5ef2f3920c27f5748778fe53af9.tar.bz2 |
Don't use 'using std::error_code' in include/llvm.
This should make sure that most new uses use the std prefix.
llvm-svn: 210835
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/DataStream.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/Support/FileOutputBuffer.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/Support/FileUtilities.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/Support/GraphWriter.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Support/LockFileManager.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/Support/MemoryBuffer.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/Support/Path.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/Support/Unix/Memory.inc | 1 | ||||
-rw-r--r-- | llvm/lib/Support/Unix/Process.inc | 2 | ||||
-rw-r--r-- | llvm/lib/Support/Unix/Program.inc | 2 | ||||
-rw-r--r-- | llvm/lib/Support/Windows/Memory.inc | 1 | ||||
-rw-r--r-- | llvm/lib/Support/Windows/Process.inc | 2 | ||||
-rw-r--r-- | llvm/lib/Support/Windows/Program.inc | 1 | ||||
-rw-r--r-- | llvm/lib/Support/YAMLTraits.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/Support/raw_ostream.cpp | 2 |
15 files changed, 16 insertions, 4 deletions
diff --git a/llvm/lib/Support/DataStream.cpp b/llvm/lib/Support/DataStream.cpp index 830bd8a..0d8a800 100644 --- a/llvm/lib/Support/DataStream.cpp +++ b/llvm/lib/Support/DataStream.cpp @@ -28,6 +28,7 @@ #include <io.h> #endif using namespace llvm; +using std::error_code; #define DEBUG_TYPE "Data-stream" diff --git a/llvm/lib/Support/FileOutputBuffer.cpp b/llvm/lib/Support/FileOutputBuffer.cpp index 96fa587..68f6fa1 100644 --- a/llvm/lib/Support/FileOutputBuffer.cpp +++ b/llvm/lib/Support/FileOutputBuffer.cpp @@ -17,6 +17,7 @@ #include <system_error> using llvm::sys::fs::mapped_file_region; +using std::error_code; namespace llvm { FileOutputBuffer::FileOutputBuffer(mapped_file_region * R, diff --git a/llvm/lib/Support/FileUtilities.cpp b/llvm/lib/Support/FileUtilities.cpp index 68953d3..729e447 100644 --- a/llvm/lib/Support/FileUtilities.cpp +++ b/llvm/lib/Support/FileUtilities.cpp @@ -22,6 +22,7 @@ #include <cstring> #include <system_error> using namespace llvm; +using std::error_code; static bool isSignedChar(char C) { return (C == '+' || C == '-'); diff --git a/llvm/lib/Support/GraphWriter.cpp b/llvm/lib/Support/GraphWriter.cpp index 306f3e8..e68ee43 100644 --- a/llvm/lib/Support/GraphWriter.cpp +++ b/llvm/lib/Support/GraphWriter.cpp @@ -68,7 +68,7 @@ StringRef llvm::DOT::getColorString(unsigned ColorNumber) { std::string llvm::createGraphFilename(const Twine &Name, int &FD) { FD = -1; SmallString<128> Filename; - error_code EC = sys::fs::createTemporaryFile(Name, "dot", FD, Filename); + std::error_code EC = sys::fs::createTemporaryFile(Name, "dot", FD, Filename); if (EC) { errs() << "Error: " << EC.message() << "\n"; return ""; diff --git a/llvm/lib/Support/LockFileManager.cpp b/llvm/lib/Support/LockFileManager.cpp index b050e5d..0204e75 100644 --- a/llvm/lib/Support/LockFileManager.cpp +++ b/llvm/lib/Support/LockFileManager.cpp @@ -22,6 +22,7 @@ #include <unistd.h> #endif using namespace llvm; +using std::error_code; /// \brief Attempt to read the lock file with the given name, if it exists. /// diff --git a/llvm/lib/Support/MemoryBuffer.cpp b/llvm/lib/Support/MemoryBuffer.cpp index 0164443..c395ce7 100644 --- a/llvm/lib/Support/MemoryBuffer.cpp +++ b/llvm/lib/Support/MemoryBuffer.cpp @@ -33,6 +33,7 @@ #include <io.h> #endif using namespace llvm; +using std::error_code; //===----------------------------------------------------------------------===// // MemoryBuffer implementation itself. diff --git a/llvm/lib/Support/Path.cpp b/llvm/lib/Support/Path.cpp index dabf763..13e3a8a 100644 --- a/llvm/lib/Support/Path.cpp +++ b/llvm/lib/Support/Path.cpp @@ -28,6 +28,7 @@ #endif using namespace llvm; +using std::error_code; namespace { using llvm::StringRef; diff --git a/llvm/lib/Support/Unix/Memory.inc b/llvm/lib/Support/Unix/Memory.inc index 10de038..cca3782 100644 --- a/llvm/lib/Support/Unix/Memory.inc +++ b/llvm/lib/Support/Unix/Memory.inc @@ -37,6 +37,7 @@ extern "C" void sys_icache_invalidate(const void *Addr, size_t len); #else extern "C" void __clear_cache(void *, void*); #endif +using std::error_code; namespace { diff --git a/llvm/lib/Support/Unix/Process.inc b/llvm/lib/Support/Unix/Process.inc index d927bb5..ea2b8dc 100644 --- a/llvm/lib/Support/Unix/Process.inc +++ b/llvm/lib/Support/Unix/Process.inc @@ -46,7 +46,7 @@ using namespace llvm; using namespace sys; - +using std::error_code; process::id_type self_process::get_id() { return getpid(); diff --git a/llvm/lib/Support/Unix/Program.inc b/llvm/lib/Support/Unix/Program.inc index f4c6cdf..d850664 100644 --- a/llvm/lib/Support/Unix/Program.inc +++ b/llvm/lib/Support/Unix/Program.inc @@ -48,6 +48,8 @@ #endif namespace llvm { +using std::error_code; + using namespace sys; ProcessInfo::ProcessInfo() : Pid(0), ReturnCode(0) {} diff --git a/llvm/lib/Support/Windows/Memory.inc b/llvm/lib/Support/Windows/Memory.inc index d410df3..431cfb6 100644 --- a/llvm/lib/Support/Windows/Memory.inc +++ b/llvm/lib/Support/Windows/Memory.inc @@ -19,6 +19,7 @@ // The Windows.h header must be the last one included. #include "WindowsSupport.h" +using std::error_code; namespace { diff --git a/llvm/lib/Support/Windows/Process.inc b/llvm/lib/Support/Windows/Process.inc index 0be871c..c88557c 100644 --- a/llvm/lib/Support/Windows/Process.inc +++ b/llvm/lib/Support/Windows/Process.inc @@ -48,7 +48,7 @@ using namespace llvm; using namespace sys; - +using std::error_code; process::id_type self_process::get_id() { return GetCurrentProcessId(); diff --git a/llvm/lib/Support/Windows/Program.inc b/llvm/lib/Support/Windows/Program.inc index 6c7ddbd..8d1df5f 100644 --- a/llvm/lib/Support/Windows/Program.inc +++ b/llvm/lib/Support/Windows/Program.inc @@ -24,6 +24,7 @@ //===----------------------------------------------------------------------===// namespace llvm { +using std::error_code; using namespace sys; ProcessInfo::ProcessInfo() : ProcessHandle(0), Pid(0), ReturnCode(0) {} diff --git a/llvm/lib/Support/YAMLTraits.cpp b/llvm/lib/Support/YAMLTraits.cpp index 66af336..0042c29 100644 --- a/llvm/lib/Support/YAMLTraits.cpp +++ b/llvm/lib/Support/YAMLTraits.cpp @@ -18,6 +18,7 @@ #include <cstring> using namespace llvm; using namespace yaml; +using std::error_code; //===----------------------------------------------------------------------===// // IO diff --git a/llvm/lib/Support/raw_ostream.cpp b/llvm/lib/Support/raw_ostream.cpp index 6a61b1b..f7c213a 100644 --- a/llvm/lib/Support/raw_ostream.cpp +++ b/llvm/lib/Support/raw_ostream.cpp @@ -450,7 +450,7 @@ raw_fd_ostream::raw_fd_ostream(const char *Filename, std::string &ErrorInfo, return; } - error_code EC = sys::fs::openFileForWrite(Filename, FD, Flags); + std::error_code EC = sys::fs::openFileForWrite(Filename, FD, Flags); if (EC) { ErrorInfo = "Error opening output file '" + std::string(Filename) + "': " + |