]> granicus.if.org Git - llvm/commitdiff
Try using llvm::errc, should hopefully fix version mismatch problem on clang-s390x...
authorPeter Collingbourne <peter@pcc.me.uk>
Mon, 20 Mar 2017 18:19:41 +0000 (18:19 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Mon, 20 Mar 2017 18:19:41 +0000 (18:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298285 91177308-0d34-0410-b5e6-96231b3b80d8

lib/LTO/Caching.cpp

index 00373ddd1c4050ae46df8070c616817ec4d9ad66..e32e46c4c3c8d9070a407d95edef6640e973e090 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "llvm/LTO/Caching.h"
 #include "llvm/ADT/StringExtras.h"
+#include "llvm/Support/Errc.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Path.h"
@@ -39,10 +40,7 @@ Expected<NativeObjectCache> lto::localCache(StringRef CacheDirectoryPath,
       return AddStreamFn();
     }
 
-    // FIXME: Workaround for libstdc++ version mismatch bug, see D31063 review
-    // thread.
-    if ((std::errc)MBOrErr.getError().value() !=
-        std::errc::no_such_file_or_directory)
+    if (MBOrErr.getError() != errc::no_such_file_or_directory)
       report_fatal_error(Twine("Failed to open cache file ") + EntryPath +
                          ": " + MBOrErr.getError().message() + "\n");