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
This commit is contained in:
Rafael Espindola
2014-06-13 03:20:08 +00:00
parent 1ad45020ec
commit 250305156a
8 changed files with 72 additions and 78 deletions

View File

@ -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;