diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-02-09 19:24:12 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-02-09 19:24:12 +0000 |
commit | 58604cd944eec4a75046076cb53eb708aaf2ee09 (patch) | |
tree | a739bf5bdf6be6dfb032bba9eea7cb2baa98eac7 /lib/Support/FileUtilities.cpp | |
parent | e7c2c15b0cfa14d6b273e0e95d9de133cc958da8 (diff) |
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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150197 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/FileUtilities.cpp')
-rw-r--r-- | lib/Support/FileUtilities.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/Support/FileUtilities.cpp b/lib/Support/FileUtilities.cpp index 4c8c0c63ff..f9e9cf0366 100644 --- a/lib/Support/FileUtilities.cpp +++ b/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<MemoryBuffer> F1; if (error_code ec = MemoryBuffer::getFile(FileA.c_str(), F1)) { if (Error) |