summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-13 03:20:08 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-13 03:20:08 +0000
commit250305156a998db624f93d9aab919c9ed7be27aa (patch)
treefffe91d86df70097576d5b2281836263ed989d7a /utils
parent1ad45020ec8518a5c9bea7ec1007798a456bff56 (diff)
downloadllvm-250305156a998db624f93d9aab919c9ed7be27aa.tar.gz
llvm-250305156a998db624f93d9aab919c9ed7be27aa.tar.bz2
llvm-250305156a998db624f93d9aab919c9ed7be27aa.tar.xz
Remove the last uses of 'using std::error_code'
This finishes the transition to std::error_code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210877 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/FileCheck/FileCheck.cpp7
-rw-r--r--utils/FileUpdate/FileUpdate.cpp3
2 files changed, 3 insertions, 7 deletions
diff --git a/utils/FileCheck/FileCheck.cpp b/utils/FileCheck/FileCheck.cpp
index 190a2ad52d..978e05f4f2 100644
--- a/utils/FileCheck/FileCheck.cpp
+++ b/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/utils/FileUpdate/FileUpdate.cpp b/utils/FileUpdate/FileUpdate.cpp
index 2bf5e067a4..c185dd05e0 100644
--- a/utils/FileUpdate/FileUpdate.cpp
+++ b/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;