summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-11-01 21:05:36 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-11-01 21:05:36 +0000
commit8f3be7a32b631e9ba584872c1f0dde8fd8536c07 (patch)
treeb4cfca7eb1e0996decd88a2b1dd1954ff3d7ff28 /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
parent8487d22d12f5b7b5c745e5a5cdda61f8a07391e1 (diff)
downloadbcm5719-llvm-8f3be7a32b631e9ba584872c1f0dde8fd8536c07.tar.gz
bcm5719-llvm-8f3be7a32b631e9ba584872c1f0dde8fd8536c07.zip
[FileSystem] Move path resolution logic out of FileSpec
This patch removes the logic for resolving paths out of FileSpec and updates call sites to rely on the FileSystem class instead. Differential revision: https://reviews.llvm.org/D53915 llvm-svn: 345890
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp')
-rw-r--r--lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
index 8302a45166b..7e6a950cea4 100644
--- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
@@ -2529,7 +2529,8 @@ bool RenderScriptRuntime::LoadAllocation(Stream &strm, const uint32_t alloc_id,
"Allocation information not available");
// Check we can read from file
- FileSpec file(path, true);
+ FileSpec file(path);
+ FileSystem::Instance().Resolve(file);
if (!FileSystem::Instance().Exists(file)) {
strm.Printf("Error: File %s does not exist", path);
strm.EOL();
@@ -2753,7 +2754,8 @@ bool RenderScriptRuntime::SaveAllocation(Stream &strm, const uint32_t alloc_id,
"Allocation information not available");
// Check we can create writable file
- FileSpec file_spec(path, true);
+ FileSpec file_spec(path);
+ FileSystem::Instance().Resolve(file_spec);
File file(file_spec, File::eOpenOptionWrite | File::eOpenOptionCanCreate |
File::eOpenOptionTruncate);
if (!file) {
@@ -4651,7 +4653,8 @@ public:
switch (short_option) {
case 'f':
- m_outfile.SetFile(option_arg, true, FileSpec::Style::native);
+ m_outfile.SetFile(option_arg, FileSpec::Style::native);
+ FileSystem::Instance().Resolve(m_outfile);
if (FileSystem::Instance().Exists(m_outfile)) {
m_outfile.Clear();
err.SetErrorStringWithFormat("file already exists: '%s'",
OpenPOWER on IntegriCloud