From 18544b96148ffe0232bd5db84eea52ac01ca21c8 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 9 Feb 2012 19:24:12 +0000 Subject: Change default error_code ctor to a 'named ctor' so it's more self-documenting. Unify default construction of error_code uses on this idiom so that users don't feel compelled to make static globals for naming convenience. (unfortunately I couldn't make the original ctor private as some APIs don't return their result, instead using an out parameter (that makes sense to default construct) - which is a bit of a pity. I did, however, find/fix some cases of unnecessary default construction of error_code before I hit the unfixable cases) llvm-svn: 150197 --- llvm/lib/Support/FileUtilities.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'llvm/lib/Support/FileUtilities.cpp') diff --git a/llvm/lib/Support/FileUtilities.cpp b/llvm/lib/Support/FileUtilities.cpp index 4c8c0c63ffc..f9e9cf03660 100644 --- a/llvm/lib/Support/FileUtilities.cpp +++ b/llvm/lib/Support/FileUtilities.cpp @@ -200,7 +200,6 @@ int llvm::DiffFilesWithTolerance(const sys::PathWithStatus &FileA, // Now its safe to mmap the files into memory because both files // have a non-zero size. - error_code ec; OwningPtr F1; if (error_code ec = MemoryBuffer::getFile(FileA.c_str(), F1)) { if (Error) -- cgit v1.2.3