diff options
author | Rui Ueyama <ruiu@google.com> | 2017-08-30 22:11:03 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2017-08-30 22:11:03 +0000 |
commit | 01d026510630203b1217a0d5550a86e6eaa05b12 (patch) | |
tree | 6c5e5726bd9586e8cd3c258b943e6f3b918b0ecf /llvm/lib/Object/COFFImportFile.cpp | |
parent | fbe9041a37d937bed8f0d64aa8497c7d6add691a (diff) | |
download | llvm-01d026510630203b1217a0d5550a86e6eaa05b12.zip llvm-01d026510630203b1217a0d5550a86e6eaa05b12.tar.gz llvm-01d026510630203b1217a0d5550a86e6eaa05b12.tar.bz2 |
Simplify writeArchive return type.
writeArchive returned a pair, but the first element of the pair is always
its first argument on failure, so it doesn't make sense to return it from
the function. This patch change the return type so that it does't return it.
Differential Revision: https://reviews.llvm.org/D37313
llvm-svn: 312177
Diffstat (limited to 'llvm/lib/Object/COFFImportFile.cpp')
-rw-r--r-- | llvm/lib/Object/COFFImportFile.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Object/COFFImportFile.cpp b/llvm/lib/Object/COFFImportFile.cpp index 8383edf..5f4b890 100644 --- a/llvm/lib/Object/COFFImportFile.cpp +++ b/llvm/lib/Object/COFFImportFile.cpp @@ -604,11 +604,9 @@ std::error_code writeImportLibrary(StringRef ImportName, StringRef Path, OF.createShortImport(*Name, E.Ordinal, ImportType, NameType)); } - std::pair<StringRef, std::error_code> Result = - writeArchive(Path, Members, /*WriteSymtab*/ true, object::Archive::K_GNU, - /*Deterministic*/ true, /*Thin*/ false); - - return Result.second; + return writeArchive(Path, Members, /*WriteSymtab*/ true, + object::Archive::K_GNU, + /*Deterministic*/ true, /*Thin*/ false); } } // namespace object |