summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/Caching.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-03-17 21:49:09 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-03-17 21:49:09 +0000
commit6bfe4d369b40f8339fcec4888cb0db54da994dfe (patch)
treed7124229ad00718e967f0f1667739e5aa81ec85f /llvm/lib/LTO/Caching.cpp
parentdc01bb448f8c7abcf6bfee2f8623940c544c2b71 (diff)
downloadbcm5719-llvm-6bfe4d369b40f8339fcec4888cb0db54da994dfe.tar.gz
bcm5719-llvm-6bfe4d369b40f8339fcec4888cb0db54da994dfe.zip
LTO: Work around libstdc++ version mismatch bug, see D31063 review thread.
llvm-svn: 298127
Diffstat (limited to 'llvm/lib/LTO/Caching.cpp')
-rw-r--r--llvm/lib/LTO/Caching.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/LTO/Caching.cpp b/llvm/lib/LTO/Caching.cpp
index d8b91c48ee3..16edbece145 100644
--- a/llvm/lib/LTO/Caching.cpp
+++ b/llvm/lib/LTO/Caching.cpp
@@ -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");
OpenPOWER on IntegriCloud