diff options
author | Chaoren Lin <chaorenl@google.com> | 2015-06-09 17:54:27 +0000 |
---|---|---|
committer | Chaoren Lin <chaorenl@google.com> | 2015-06-09 17:54:27 +0000 |
commit | 372e9067a7594afda771769d9cf5ee1d30a7c831 (patch) | |
tree | 75bf212e183c754d52e8a634bc00a1e5cc16e32e /lldb/source/Host/common/FileSpec.cpp | |
parent | efba7812cc8a2e4d544a8dbe4b7b32eb86e88716 (diff) | |
download | llvm-372e9067a7594afda771769d9cf5ee1d30a7c831.zip llvm-372e9067a7594afda771769d9cf5ee1d30a7c831.tar.gz llvm-372e9067a7594afda771769d9cf5ee1d30a7c831.tar.bz2 |
Rename `FileSpec::IsRelativeToCurrentWorkingDirectory` to `IsRelative`.
Summary:
`IsRelativeToCurrentWorkingDirectory` was misleading, because relative paths
are sometimes appended to other directories, not just the cwd. Plus, the new
name is shorter. Also added `IsAbsolute` for completeness.
Reviewers: clayborg, ovyalov
Reviewed By: ovyalov
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10262
llvm-svn: 239419
Diffstat (limited to 'lldb/source/Host/common/FileSpec.cpp')
-rw-r--r-- | lldb/source/Host/common/FileSpec.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp index c3b6aa5..d988b7f 100644 --- a/lldb/source/Host/common/FileSpec.cpp +++ b/lldb/source/Host/common/FileSpec.cpp @@ -1484,7 +1484,7 @@ FileSpec::IsSourceImplementationFile () const } bool -FileSpec::IsRelativeToCurrentWorkingDirectory () const +FileSpec::IsRelative() const { const char *dir = m_directory.GetCString(); llvm::StringRef directory(dir ? dir : ""); @@ -1519,3 +1519,9 @@ FileSpec::IsRelativeToCurrentWorkingDirectory () const } return false; } + +bool +FileSpec::IsAbsolute() const +{ + return !FileSpec::IsRelative(); +} |