Don't use std::errc.
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 13 Jun 2015 17:23:04 +0000 (17:23 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 13 Jun 2015 17:23:04 +0000 (17:23 +0000)
commit803fe1968007aa7a9c4f9674af648c9840f02a11
tree0a64a3b26d26064e42fff7efd20bba8adc138ff9
parent4692cb130377785e6fb7e5e476b44dc9e67ee764
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239683 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Object/ArchiveWriter.cpp
lib/ProfileData/CoverageMapping.cpp
lib/Support/Unix/Program.inc
lib/Support/Windows/Program.inc
unittests/Support/ErrorOrTest.cpp