diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-13 02:24:39 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-13 02:24:39 +0000 |
commit | 4e2b922131ae617cb8738d1871e9d918c44bdb69 (patch) | |
tree | d7ce433d5ae4fb27277c6d3777ca12199ffd51ac /lib/IR | |
parent | e431884ed751a78941cb32835d82dda24c839a1e (diff) | |
download | llvm-4e2b922131ae617cb8738d1871e9d918c44bdb69.tar.gz llvm-4e2b922131ae617cb8738d1871e9d918c44bdb69.tar.bz2 llvm-4e2b922131ae617cb8738d1871e9d918c44bdb69.tar.xz |
Remove 'using std::errro_code' from lib.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210871 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r-- | lib/IR/Core.cpp | 5 | ||||
-rw-r--r-- | lib/IR/GCOV.cpp | 3 | ||||
-rw-r--r-- | lib/IR/Module.cpp | 13 |
3 files changed, 9 insertions, 12 deletions
diff --git a/lib/IR/Core.cpp b/lib/IR/Core.cpp index 5dfe9a68a2..197b6cb905 100644 --- a/lib/IR/Core.cpp +++ b/lib/IR/Core.cpp @@ -41,7 +41,6 @@ #include <system_error> using namespace llvm; -using std::error_code; #define DEBUG_TYPE "ir" @@ -2602,7 +2601,7 @@ LLVMBool LLVMCreateMemoryBufferWithContentsOfFile( char **OutMessage) { std::unique_ptr<MemoryBuffer> MB; - error_code ec; + std::error_code ec; if (!(ec = MemoryBuffer::getFile(Path, MB))) { *OutMemBuf = wrap(MB.release()); return 0; @@ -2615,7 +2614,7 @@ LLVMBool LLVMCreateMemoryBufferWithContentsOfFile( LLVMBool LLVMCreateMemoryBufferWithSTDIN(LLVMMemoryBufferRef *OutMemBuf, char **OutMessage) { std::unique_ptr<MemoryBuffer> MB; - error_code ec; + std::error_code ec; if (!(ec = MemoryBuffer::getSTDIN(MB))) { *OutMemBuf = wrap(MB.release()); return 0; diff --git a/lib/IR/GCOV.cpp b/lib/IR/GCOV.cpp index c8dc951a9b..b4c7977d52 100644 --- a/lib/IR/GCOV.cpp +++ b/lib/IR/GCOV.cpp @@ -22,7 +22,6 @@ #include <algorithm> #include <system_error> using namespace llvm; -using std::error_code; //===----------------------------------------------------------------------===// // GCOVFile implementation. @@ -439,7 +438,7 @@ class LineConsumer { StringRef Remaining; public: LineConsumer(StringRef Filename) { - if (error_code EC = MemoryBuffer::getFileOrSTDIN(Filename, Buffer)) { + if (std::error_code EC = MemoryBuffer::getFileOrSTDIN(Filename, Buffer)) { errs() << Filename << ": " << EC.message() << "\n"; Remaining = ""; } else diff --git a/lib/IR/Module.cpp b/lib/IR/Module.cpp index bc72a67917..6a5b386c19 100644 --- a/lib/IR/Module.cpp +++ b/lib/IR/Module.cpp @@ -28,7 +28,6 @@ #include <cstdarg> #include <cstdlib> using namespace llvm; -using std::error_code; //===----------------------------------------------------------------------===// // Methods to implement the globals and functions lists. @@ -382,7 +381,7 @@ bool Module::Materialize(GlobalValue *GV, std::string *ErrInfo) { if (!Materializer) return false; - error_code EC = Materializer->Materialize(GV); + std::error_code EC = Materializer->Materialize(GV); if (!EC) return false; if (ErrInfo) @@ -395,18 +394,18 @@ void Module::Dematerialize(GlobalValue *GV) { return Materializer->Dematerialize(GV); } -error_code Module::materializeAll() { +std::error_code Module::materializeAll() { if (!Materializer) - return error_code(); + return std::error_code(); return Materializer->MaterializeModule(this); } -error_code Module::materializeAllPermanently() { - if (error_code EC = materializeAll()) +std::error_code Module::materializeAllPermanently() { + if (std::error_code EC = materializeAll()) return EC; Materializer.reset(); - return error_code(); + return std::error_code(); } //===----------------------------------------------------------------------===// |