]> granicus.if.org Git - llvm/commitdiff
LTO: Work around libstdc++ version mismatch bug, see D31063 review thread.
authorPeter Collingbourne <peter@pcc.me.uk>
Fri, 17 Mar 2017 21:49:09 +0000 (21:49 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Fri, 17 Mar 2017 21:49:09 +0000 (21:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298127 91177308-0d34-0410-b5e6-96231b3b80d8

lib/LTO/Caching.cpp

index d8b91c48ee306c2f97d99ef272b54db9a9d6a7f3..16edbece145ec53a7d340c7af3ffef2f13dc8751 100644 (file)
@@ -37,7 +37,10 @@ Expected<NativeObjectCache> lto::localCache(StringRef CacheDirectoryPath,
       return AddStreamFn();
     }
 
-    if (MBOrErr.getError() != std::errc::no_such_file_or_directory)
+    // FIXME: Workaround for libstdc++ version mismatch bug, see D31063 review
+    // thread.
+    if ((std::errc)MBOrErr.getError().value() !=
+        std::errc::no_such_file_or_directory)
       report_fatal_error(Twine("Failed to open cache file ") + EntryPath +
                          ": " + MBOrErr.getError().message() + "\n");