summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/ArchiveWriter.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-06-13 17:23:04 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-06-13 17:23:04 +0000
commit74f293249d9e60e3631fc8b08148ef3d8a4df72d (patch)
tree8d85e53c7147f1a63ef6acee449d99283dedf5b9 /llvm/lib/Object/ArchiveWriter.cpp
parentd3f64274462e500724ae2df9d7b590094eff87b4 (diff)
downloadbcm5719-llvm-74f293249d9e60e3631fc8b08148ef3d8a4df72d.tar.gz
bcm5719-llvm-74f293249d9e60e3631fc8b08148ef3d8a4df72d.zip
Don't use std::errc.
As noted on Errc.h: // * std::errc is just marked with is_error_condition_enum. This means that // common patters like AnErrorCode == errc::no_such_file_or_directory take // 4 virtual calls instead of two comparisons. And on some libstdc++ those virtual functions conclude that ------------------------ int main() { std::error_code foo = std::make_error_code(std::errc::no_such_file_or_directory); return foo == std::errc::no_such_file_or_directory; } ------------------------- should exit with 0. llvm-svn: 239683
Diffstat (limited to 'llvm/lib/Object/ArchiveWriter.cpp')
-rw-r--r--llvm/lib/Object/ArchiveWriter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Object/ArchiveWriter.cpp b/llvm/lib/Object/ArchiveWriter.cpp
index 90a736f3baf..dcd6ad73e23 100644
--- a/llvm/lib/Object/ArchiveWriter.cpp
+++ b/llvm/lib/Object/ArchiveWriter.cpp
@@ -18,6 +18,7 @@
#include "llvm/Object/Archive.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Object/SymbolicFile.h"
+#include "llvm/Support/Errc.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/Path.h"
@@ -70,7 +71,7 @@ NewArchiveIterator::getFD(sys::fs::file_status &NewStatus) const {
// Linux cannot open directories with open(2), although
// cygwin and *bsd can.
if (NewStatus.type() == sys::fs::file_type::directory_file)
- return make_error_code(std::errc::is_a_directory);
+ return make_error_code(errc::is_a_directory);
return NewFD;
}
OpenPOWER on IntegriCloud