summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-12 21:46:39 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-12 21:46:39 +0000
commit3acea39853d1a5ef2f3920c27f5748778fe53af9 (patch)
treef93b4e1c0fcdb02cf6c80b8e894f0f3b92f1bcac /llvm/lib/Support
parentb6e7d64f3070db641c332ca495215b8c3b887882 (diff)
downloadbcm5719-llvm-3acea39853d1a5ef2f3920c27f5748778fe53af9.tar.gz
bcm5719-llvm-3acea39853d1a5ef2f3920c27f5748778fe53af9.zip
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.cpp1
-rw-r--r--llvm/lib/Support/FileOutputBuffer.cpp1
-rw-r--r--llvm/lib/Support/FileUtilities.cpp1
-rw-r--r--llvm/lib/Support/GraphWriter.cpp2
-rw-r--r--llvm/lib/Support/LockFileManager.cpp1
-rw-r--r--llvm/lib/Support/MemoryBuffer.cpp1
-rw-r--r--llvm/lib/Support/Path.cpp1
-rw-r--r--llvm/lib/Support/Unix/Memory.inc1
-rw-r--r--llvm/lib/Support/Unix/Process.inc2
-rw-r--r--llvm/lib/Support/Unix/Program.inc2
-rw-r--r--llvm/lib/Support/Windows/Memory.inc1
-rw-r--r--llvm/lib/Support/Windows/Process.inc2
-rw-r--r--llvm/lib/Support/Windows/Program.inc1
-rw-r--r--llvm/lib/Support/YAMLTraits.cpp1
-rw-r--r--llvm/lib/Support/raw_ostream.cpp2
15 files changed, 16 insertions, 4 deletions
diff --git a/llvm/lib/Support/DataStream.cpp b/llvm/lib/Support/DataStream.cpp
index 830bd8adb9b..0d8a800d70e 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 96fa58767ed..68f6fa16f96 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 68953d347fe..729e44789cd 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 306f3e89d0d..e68ee434dd5 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 b050e5de8d4..0204e75f84e 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 0164443ad5f..c395ce72b8d 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 dabf763c8db..13e3a8ad02f 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 10de038f437..cca37829497 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 d927bb539ed..ea2b8dcda26 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 f4c6cdf7e99..d8506643349 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 d410df35aa0..431cfb6cf99 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 0be871c695c..c88557c5eef 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 6c7ddbde332..8d1df5ffc92 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 66af33693d6..0042c290362 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 6a61b1b2a6c..f7c213ac2b8 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) + "': " +
OpenPOWER on IntegriCloud