<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
Sorry, forgot to change the description. Been busy switching to the newer version of the compiler.<br>
<br>
<div id="AppleMailSignature" dir="ltr">Best regards,
<div>Alexey Bataev</div>
</div>
<div dir="ltr"><br>
13 авг. 2019 г., в 21:32, Nico Weber <<a href="mailto:thakis@chromium.org">thakis@chromium.org</a>> написал(а):<br>
<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">From the review: This is for gcc 4.8 compat, not for the other reasons mentioned in the CL description.</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Aug 13, 2019 at 3:31 PM Alexey Bataev via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Author: abataev<br>
Date: Tue Aug 13 12:32:36 2019<br>
New Revision: 368739<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=368739&view=rev" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project?rev=368739&view=rev</a><br>
Log:<br>
Don't use std::errc<br>
<br>
Summary:<br>
As noted on Errc.h:<br>
<br>
// * std::errc is just marked with is_error_condition_enum. This means that<br>
//   common patters like AnErrorCode == errc::no_such_file_or_directory take<br>
//   4 virtual calls instead of two comparisons.<br>
<br>
And on some libstdc++ those virtual functions conclude that<br>
<br>
------------------------<br>
int main() {<br>
  std::error_code foo = std::make_error_code(std::errc::no_such_file_or_directory);<br>
  return foo == std::errc::no_such_file_or_directory;<br>
}<br>
-------------------------<br>
<br>
should exit with 0.<br>
<br>
Reviewers: thakis, rnk, jfb<br>
<br>
Reviewed By: thakis<br>
<br>
Subscribers: lebedev.ri, dexonsmith, xbolva00, cfe-commits, caomhin<br>
<br>
Tags: #clang<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D66143" rel="noreferrer" target="_blank">
https://reviews.llvm.org/D66143</a><br>
<br>
Modified:<br>
    cfe/trunk/lib/Lex/HeaderSearch.cpp<br>
<br>
Modified: cfe/trunk/lib/Lex/HeaderSearch.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/HeaderSearch.cpp?rev=368739&r1=368738&r2=368739&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/HeaderSearch.cpp?rev=368739&r1=368738&r2=368739&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Lex/HeaderSearch.cpp (original)<br>
+++ cfe/trunk/lib/Lex/HeaderSearch.cpp Tue Aug 13 12:32:36 2019<br>
@@ -30,6 +30,7 @@<br>
 #include "llvm/ADT/StringRef.h"<br>
 #include "llvm/Support/Allocator.h"<br>
 #include "llvm/Support/Capacity.h"<br>
+#include "llvm/Support/Errc.h"<br>
 #include "llvm/Support/ErrorHandling.h"<br>
 #include "llvm/Support/FileSystem.h"<br>
 #include "llvm/Support/Path.h"<br>
@@ -315,9 +316,9 @@ const FileEntry *HeaderSearch::getFileAn<br>
     // For rare, surprising errors (e.g. "out of file handles"), diag the EC<br>
     // message.<br>
     std::error_code EC = File.getError();<br>
-    if (EC != std::errc::no_such_file_or_directory &&<br>
-        EC != std::errc::invalid_argument && EC != std::errc::is_a_directory &&<br>
-        EC != std::errc::not_a_directory) {<br>
+    if (EC != llvm::errc::no_such_file_or_directory &&<br>
+        EC != llvm::errc::invalid_argument &&<br>
+        EC != llvm::errc::is_a_directory && EC != llvm::errc::not_a_directory) {<br>
       Diags.Report(IncludeLoc, diag::err_cannot_open_file)<br>
           << FileName << EC.message();<br>
     }<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote>
</div>
</div>
</blockquote>
</body>
</html>