diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-13 03:20:08 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-06-13 03:20:08 +0000 |
commit | c049c6574b93d774e572f13db1e8cea7bdb2d982 (patch) | |
tree | 3d400b852ce1e644e4d1164484f8c69a23f6a1f8 /llvm/utils | |
parent | 4453e4294515bfc0cff16fdd7278f217d9efba4f (diff) | |
download | bcm5719-llvm-c049c6574b93d774e572f13db1e8cea7bdb2d982.tar.gz bcm5719-llvm-c049c6574b93d774e572f13db1e8cea7bdb2d982.zip |
Remove the last uses of 'using std::error_code'
This finishes the transition to std::error_code.
llvm-svn: 210877
Diffstat (limited to 'llvm/utils')
-rw-r--r-- | llvm/utils/FileCheck/FileCheck.cpp | 7 | ||||
-rw-r--r-- | llvm/utils/FileUpdate/FileUpdate.cpp | 3 |
2 files changed, 3 insertions, 7 deletions
diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp index 190a2ad52d9..978e05f4f2c 100644 --- a/llvm/utils/FileCheck/FileCheck.cpp +++ b/llvm/utils/FileCheck/FileCheck.cpp @@ -34,7 +34,6 @@ #include <system_error> #include <vector> using namespace llvm; -using std::error_code; static cl::opt<std::string> CheckFilename(cl::Positional, cl::desc("<check-file>"), cl::Required); @@ -822,8 +821,7 @@ static StringRef FindFirstMatchingPrefix(StringRef &Buffer, static bool ReadCheckFile(SourceMgr &SM, std::vector<CheckString> &CheckStrings) { std::unique_ptr<MemoryBuffer> File; - if (error_code ec = - MemoryBuffer::getFileOrSTDIN(CheckFilename, File)) { + if (std::error_code ec = MemoryBuffer::getFileOrSTDIN(CheckFilename, File)) { errs() << "Could not open check file '" << CheckFilename << "': " << ec.message() << '\n'; return true; @@ -1226,8 +1224,7 @@ int main(int argc, char **argv) { // Open the file to check and add it to SourceMgr. std::unique_ptr<MemoryBuffer> File; - if (error_code ec = - MemoryBuffer::getFileOrSTDIN(InputFilename, File)) { + if (std::error_code ec = MemoryBuffer::getFileOrSTDIN(InputFilename, File)) { errs() << "Could not open input file '" << InputFilename << "': " << ec.message() << '\n'; return 2; diff --git a/llvm/utils/FileUpdate/FileUpdate.cpp b/llvm/utils/FileUpdate/FileUpdate.cpp index 2bf5e067a4e..c185dd05e0e 100644 --- a/llvm/utils/FileUpdate/FileUpdate.cpp +++ b/llvm/utils/FileUpdate/FileUpdate.cpp @@ -21,7 +21,6 @@ #include "llvm/Support/ToolOutputFile.h" #include <system_error> using namespace llvm; -using std::error_code; static cl::opt<bool> Quiet("quiet", cl::desc("Don't print unnecessary status information"), @@ -46,7 +45,7 @@ int main(int argc, char **argv) { // Get the input data. std::unique_ptr<MemoryBuffer> In; - if (error_code ec = MemoryBuffer::getFileOrSTDIN(InputFilename, In)) { + if (std::error_code ec = MemoryBuffer::getFileOrSTDIN(InputFilename, In)) { errs() << argv[0] << ": error: Unable to get input '" << InputFilename << "': " << ec.message() << '\n'; return 1; |