summaryrefslogtreecommitdiff
path: root/unittests/Target/ModuleCacheTest.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-07-28 11:09:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-07-28 11:09:23 +0000
commitf73363f1dd94996356cefbf24388f561891acf0b (patch)
treee3c31248bdb36eaec5fd833490d4278162dba2a0 /unittests/Target/ModuleCacheTest.cpp
parent160ee69dd7ae18978f4068116777639ea98dc951 (diff)
Notes
Diffstat (limited to 'unittests/Target/ModuleCacheTest.cpp')
-rw-r--r--unittests/Target/ModuleCacheTest.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/unittests/Target/ModuleCacheTest.cpp b/unittests/Target/ModuleCacheTest.cpp
index de07648ae00b..0b9e02df7817 100644
--- a/unittests/Target/ModuleCacheTest.cpp
+++ b/unittests/Target/ModuleCacheTest.cpp
@@ -44,7 +44,7 @@ static const uint32_t uuid_bytes = 20;
static const size_t module_size = 5602;
static FileSpec GetDummyRemotePath() {
- FileSpec fs("/", false, FileSpec::ePathSyntaxPosix);
+ FileSpec fs("/", false, FileSpec::Style::posix);
fs.AppendPathComponent(dummy_remote_dir);
fs.AppendPathComponent(module_name);
return fs;
@@ -68,8 +68,7 @@ void ModuleCacheTest::SetUpTestCase() {
HostInfo::Initialize();
ObjectFileELF::Initialize();
- FileSpec tmpdir_spec;
- HostInfo::GetLLDBPath(lldb::ePathTypeLLDBTempSystemDir, s_cache_dir);
+ s_cache_dir = HostInfo::GetProcessTempDir();
s_test_executable = GetInputFilePath(module_name);
}
@@ -94,7 +93,7 @@ void ModuleCacheTest::TryGetAndPut(const FileSpec &cache_dir,
ModuleCache mc;
ModuleSpec module_spec;
module_spec.GetFileSpec() = GetDummyRemotePath();
- module_spec.GetUUID().SetFromCString(module_uuid, uuid_bytes);
+ module_spec.GetUUID().SetFromStringRef(module_uuid, uuid_bytes);
module_spec.SetObjectSize(module_size);
ModuleSP module_sp;
bool did_create;
@@ -102,8 +101,8 @@ void ModuleCacheTest::TryGetAndPut(const FileSpec &cache_dir,
Status error = mc.GetAndPut(
cache_dir, hostname, module_spec,
- [this, &download_called](const ModuleSpec &module_spec,
- const FileSpec &tmp_download_file_spec) {
+ [&download_called](const ModuleSpec &module_spec,
+ const FileSpec &tmp_download_file_spec) {
download_called = true;
EXPECT_STREQ(GetDummyRemotePath().GetCString(),
module_spec.GetFileSpec().GetCString());