[Lldb-commits] [lldb] r154688 - in /lldb/branches/lldb-platform-work: include/lldb/Host/FileSpec.h source/Host/common/FileSpec.cpp

Enrico Granata egranata at apple.com
Fri Apr 13 11:58:48 PDT 2012


Author: enrico
Date: Fri Apr 13 13:58:48 2012
New Revision: 154688

URL: http://llvm.org/viewvc/llvm-project?rev=154688&view=rev
Log:
Removing parameter 'bool resolve' from some of the new FileSpec calls. We prefer to keep our API simple and have the users call Resolve on the new FileSpec objects if/when they need to

Modified:
    lldb/branches/lldb-platform-work/include/lldb/Host/FileSpec.h
    lldb/branches/lldb-platform-work/source/Host/common/FileSpec.cpp

Modified: lldb/branches/lldb-platform-work/include/lldb/Host/FileSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/include/lldb/Host/FileSpec.h?rev=154688&r1=154687&r2=154688&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/include/lldb/Host/FileSpec.h (original)
+++ lldb/branches/lldb-platform-work/include/lldb/Host/FileSpec.h Fri Apr 13 13:58:48 2012
@@ -564,10 +564,10 @@
     Resolve (const char *src_path, char *dst_path, size_t dst_len);
 
     FileSpec
-    AppendPathComponent (const char *new_path, bool resolve = false);
+    AppendPathComponent (const char *new_path);
     
     FileSpec
-    RemoveLastPathComponent (bool resolve = false);
+    RemoveLastPathComponent ();
     
     const char*
     GetLastPathComponent () const;

Modified: lldb/branches/lldb-platform-work/source/Host/common/FileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/source/Host/common/FileSpec.cpp?rev=154688&r1=154687&r2=154688&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/source/Host/common/FileSpec.cpp (original)
+++ lldb/branches/lldb-platform-work/source/Host/common/FileSpec.cpp Fri Apr 13 13:58:48 2012
@@ -979,8 +979,9 @@
 }
 
 FileSpec
-FileSpec::AppendPathComponent (const char *new_path, bool resolve)
+FileSpec::AppendPathComponent (const char *new_path)
 {
+    const bool resolve = false;
     if (m_filename.IsEmpty() && m_directory.IsEmpty())
         return FileSpec(new_path,resolve);
     StreamString stream;
@@ -994,8 +995,9 @@
 }
 
 FileSpec
-FileSpec::RemoveLastPathComponent (bool resolve)
+FileSpec::RemoveLastPathComponent ()
 {
+    const bool resolve = false;
     if (m_filename.IsEmpty() && m_directory.IsEmpty())
         return FileSpec("",resolve);
     if (m_directory.IsEmpty())





More information about the lldb-commits mailing list