LTO: Work around libstdc++ version mismatch bug, see D31063 review thread.

llvm-svn: 298127
diff --git a/llvm/lib/LTO/Caching.cpp b/llvm/lib/LTO/Caching.cpp
index d8b91c4..16edbec 100644
--- a/llvm/lib/LTO/Caching.cpp
+++ b/llvm/lib/LTO/Caching.cpp
@@ -37,7 +37,10 @@
       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");