summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/android
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2015-10-15 14:46:46 +0000
committerPavel Labath <labath@google.com>2015-10-15 14:46:46 +0000
commit141051027bdb9beaa4cb0a93c15e8cf3fbc64510 (patch)
tree7f45a9d6f03fdf015d8b96ff89bc48929b753150 /lldb/source/Host/android
parent668af71b828691ff4b49a43e53a6783dad0a16f7 (diff)
downloadbcm5719-llvm-141051027bdb9beaa4cb0a93c15e8cf3fbc64510.tar.gz
bcm5719-llvm-141051027bdb9beaa4cb0a93c15e8cf3fbc64510.zip
Revert "Fix temporary directory computation on linux (pr25147)"
I actually did not want to commit this without review, but I mistyped. :/ llvm-svn: 250412
Diffstat (limited to 'lldb/source/Host/android')
-rw-r--r--lldb/source/Host/android/HostInfoAndroid.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/lldb/source/Host/android/HostInfoAndroid.cpp b/lldb/source/Host/android/HostInfoAndroid.cpp
index 3fa50ec8ddf..a5695f686a3 100644
--- a/lldb/source/Host/android/HostInfoAndroid.cpp
+++ b/lldb/source/Host/android/HostInfoAndroid.cpp
@@ -91,14 +91,11 @@ HostInfoAndroid::ResolveLibraryPath(const std::string& module_path, const ArchSp
bool
HostInfoAndroid::ComputeTempFileBaseDirectory(FileSpec &file_spec)
{
- bool success = HostInfoLinux::ComputeTempFileBaseDirectory(file_spec);
+ if (HostInfoLinux::ComputeTempFileBaseDirectory(file_spec))
+ return true;
- // On Android, there is no path which is guaranteed to be writable. If the user has not
- // provided a path via an environment variable, the generic algorithm will deduce /tmp, which
- // is plain wrong. In that case we have an invalid directory, we substitute the path with
- // /data/local/tmp, which is correct at least in some cases (i.e., when running as shell user).
- if (!success || !file_spec.Exists())
- file_spec = FileSpec("/data/local/tmp", false);
-
- return file_spec.Exists();
+ // If the default mechanism for computing the temp directory failed then
+ // fall back to /data/local/tmp
+ file_spec = FileSpec("/data/local/tmp", false);
+ return true;
}
OpenPOWER on IntegriCloud