From dcae6caf46a63657f23a807251c50647207ddb2c Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Fri, 17 Mar 2017 21:49:09 +0000 Subject: [PATCH] LTO: Work around libstdc++ version mismatch bug, see D31063 review thread. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298127 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/LTO/Caching.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/LTO/Caching.cpp b/lib/LTO/Caching.cpp index d8b91c48ee3..16edbece145 100644 --- a/lib/LTO/Caching.cpp +++ b/lib/LTO/Caching.cpp @@ -37,7 +37,10 @@ Expected 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"); -- 2.50.1