summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Platform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/Platform.cpp')
-rw-r--r--lldb/source/Target/Platform.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index d92bf12dffa..ac8a168b93e 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -1346,10 +1346,13 @@ lldb_private::Error Platform::RunShellCommand(
bool Platform::CalculateMD5(const FileSpec &file_spec, uint64_t &low,
uint64_t &high) {
- if (IsHost())
- return FileSystem::CalculateMD5(file_spec, low, high);
- else
+ if (!IsHost())
return false;
+ auto Result = llvm::sys::fs::md5_contents(file_spec.GetPath());
+ if (!Result)
+ return false;
+ std::tie(high, low) = Result->words();
+ return true;
}
void Platform::SetLocalCacheDirectory(const char *local) {
OpenPOWER on IntegriCloud