summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Platform.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-03-20 23:54:54 +0000
committerZachary Turner <zturner@google.com>2017-03-20 23:54:54 +0000
commit076a2599388d8a9efa90207291310c16b9322b1a (patch)
tree60698a8ab77e2bd51bbba70deadbd8f9daa5e717 /lldb/source/Target/Platform.cpp
parent7e3050ca1a3612e4d306d0ac405ebdbb989261cf (diff)
downloadbcm5719-llvm-076a2599388d8a9efa90207291310c16b9322b1a.tar.gz
bcm5719-llvm-076a2599388d8a9efa90207291310c16b9322b1a.zip
Delete LLDB's MD5 code. Use LLVM instead.
Differential Revision: https://reviews.llvm.org/D31108 llvm-svn: 298325
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