[Lldb-commits] [lldb] r199504 - Rename Platform::GetFile (3-arg version) to GetFileWithUUID

Steve Pucci spucci at google.com
Fri Jan 17 10:18:32 PST 2014


Author: spucci
Date: Fri Jan 17 12:18:31 2014
New Revision: 199504

URL: http://llvm.org/viewvc/llvm-project?rev=199504&view=rev
Log:
Rename Platform::GetFile (3-arg version) to GetFileWithUUID

This rename was suggested by gclayton as a way to silence gcc
warnings; the warning is emitted when there is an overloaded function
in a base class (Platform) for which a derived class redefines one of
the overloads but not the other (because doing so hides the other
overload from users of the derived class).  By giving the two methods
different names, the situation is avoided.


Modified:
    lldb/trunk/include/lldb/Target/Platform.h
    lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
    lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
    lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
    lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
    lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
    lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h
    lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
    lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
    lldb/trunk/source/Target/Platform.cpp
    lldb/trunk/source/Target/Target.cpp

Modified: lldb/trunk/include/lldb/Target/Platform.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Platform.h?rev=199504&r1=199503&r2=199504&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Platform.h (original)
+++ lldb/trunk/include/lldb/Target/Platform.h Fri Jan 17 12:18:31 2014
@@ -314,9 +314,9 @@ namespace lldb_private {
         ///     An error object.
         //------------------------------------------------------------------
         virtual Error
-        GetFile (const FileSpec &platform_file, 
-                 const UUID *uuid_ptr,
-                 FileSpec &local_file);
+        GetFileWithUUID (const FileSpec &platform_file, 
+                         const UUID *uuid_ptr,
+                         FileSpec &local_file);
 
         //----------------------------------------------------------------------
         // Locate the scripting resource given a module specification.

Modified: lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp?rev=199504&r1=199503&r2=199504&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp Fri Jan 17 12:18:31 2014
@@ -571,14 +571,14 @@ PlatformFreeBSD::GetGroupName (uint32_t
 
 // From PlatformMacOSX only
 Error
-PlatformFreeBSD::GetFile (const FileSpec &platform_file,
-                          const UUID *uuid_ptr,
-                          FileSpec &local_file)
+PlatformFreeBSD::GetFileWithUUID (const FileSpec &platform_file,
+                                  const UUID *uuid_ptr,
+                                  FileSpec &local_file)
 {
     if (IsRemote())
     {
         if (m_remote_platform_sp)
-            return m_remote_platform_sp->GetFile (platform_file, uuid_ptr, local_file);
+            return m_remote_platform_sp->GetFileWithUUID (platform_file, uuid_ptr, local_file);
     }
 
     // Default to the local case

Modified: lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h?rev=199504&r1=199503&r2=199504&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h (original)
+++ lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h Fri Jan 17 12:18:31 2014
@@ -144,8 +144,8 @@ public:
 
     // Only on PlatformMacOSX:
     virtual lldb_private::Error
-    GetFile (const lldb_private::FileSpec &platform_file,
-             const lldb_private::UUID* uuid, lldb_private::FileSpec &local_file);
+    GetFileWithUUID (const lldb_private::FileSpec &platform_file,
+                     const lldb_private::UUID* uuid, lldb_private::FileSpec &local_file);
 
     lldb_private::Error
     GetSharedModule (const lldb_private::ModuleSpec &module_spec,

Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=199504&r1=199503&r2=199504&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Fri Jan 17 12:18:31 2014
@@ -285,13 +285,13 @@ PlatformLinux::ResolveExecutable (const
 }
 
 Error
-PlatformLinux::GetFile (const FileSpec &platform_file, 
-                        const UUID *uuid_ptr, FileSpec &local_file)
+PlatformLinux::GetFileWithUUID (const FileSpec &platform_file, 
+                                const UUID *uuid_ptr, FileSpec &local_file)
 {
     if (IsRemote())
     {
         if (m_remote_platform_sp)
-            return m_remote_platform_sp->GetFile (platform_file, uuid_ptr, local_file);
+            return m_remote_platform_sp->GetFileWithUUID (platform_file, uuid_ptr, local_file);
     }
 
     // Default to the local case

Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h?rev=199504&r1=199503&r2=199504&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h Fri Jan 17 12:18:31 2014
@@ -73,8 +73,8 @@ namespace lldb_private {
         GetStatus (Stream &strm);
 
         virtual Error
-        GetFile (const FileSpec &platform_file,
-                 const UUID* uuid, FileSpec &local_file);
+        GetFileWithUUID (const FileSpec &platform_file,
+                         const UUID* uuid, FileSpec &local_file);
 
         virtual bool
         GetProcessInfo (lldb::pid_t pid, ProcessInstanceInfo &proc_info);

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp?rev=199504&r1=199503&r2=199504&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp Fri Jan 17 12:18:31 2014
@@ -249,7 +249,7 @@ PlatformMacOSX::GetSymbolFile (const Fil
     if (IsRemote())
     {
         if (m_remote_platform_sp)
-            return m_remote_platform_sp->GetFile (platform_file, uuid_ptr, local_file);
+            return m_remote_platform_sp->GetFileWithUUID (platform_file, uuid_ptr, local_file);
     }
 
     // Default to the local case
@@ -258,9 +258,9 @@ PlatformMacOSX::GetSymbolFile (const Fil
 }
 
 lldb_private::Error
-PlatformMacOSX::GetFile (const lldb_private::FileSpec &platform_file,
-                         const lldb_private::UUID *uuid_ptr,
-                         lldb_private::FileSpec &local_file)
+PlatformMacOSX::GetFileWithUUID (const lldb_private::FileSpec &platform_file,
+                                 const lldb_private::UUID *uuid_ptr,
+                                 lldb_private::FileSpec &local_file)
 {
     if (IsRemote() && m_remote_platform_sp)
     {

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h?rev=199504&r1=199503&r2=199504&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h Fri Jan 17 12:18:31 2014
@@ -87,9 +87,9 @@ public:
     }
     
     virtual lldb_private::Error
-    GetFile (const lldb_private::FileSpec &platform_file, 
-             const lldb_private::UUID *uuid_ptr,
-             lldb_private::FileSpec &local_file);
+    GetFileWithUUID (const lldb_private::FileSpec &platform_file, 
+                     const lldb_private::UUID *uuid_ptr,
+                     lldb_private::FileSpec &local_file);
     
     virtual bool
     GetSupportedArchitectureAtIndex (uint32_t idx, 

Modified: lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp?rev=199504&r1=199503&r2=199504&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp Fri Jan 17 12:18:31 2014
@@ -542,14 +542,14 @@ PlatformWindows::GetGroupName (uint32_t
 }
 
 Error
-PlatformWindows::GetFile (const FileSpec &platform_file,
-                          const UUID *uuid_ptr,
-                          FileSpec &local_file)
+PlatformWindows::GetFileWithUUID (const FileSpec &platform_file,
+                                  const UUID *uuid_ptr,
+                                  FileSpec &local_file)
 {
     if (IsRemote())
     {
         if (m_remote_platform_sp)
-            return m_remote_platform_sp->GetFile (platform_file, uuid_ptr, local_file);
+            return m_remote_platform_sp->GetFileWithUUID (platform_file, uuid_ptr, local_file);
     }
 
     // Default to the local case

Modified: lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h?rev=199504&r1=199503&r2=199504&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h (original)
+++ lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h Fri Jan 17 12:18:31 2014
@@ -125,8 +125,8 @@ public:
            lldb_private::Error &error);
 
     virtual lldb_private::Error
-    GetFile(const lldb_private::FileSpec &platform_file,
-            const lldb_private::UUID* uuid, lldb_private::FileSpec &local_file);
+    GetFileWithUUID(const lldb_private::FileSpec &platform_file,
+                    const lldb_private::UUID* uuid, lldb_private::FileSpec &local_file);
 
     lldb_private::Error
     GetSharedModule(const lldb_private::ModuleSpec &module_spec,

Modified: lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp?rev=199504&r1=199503&r2=199504&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp Fri Jan 17 12:18:31 2014
@@ -119,9 +119,9 @@ PlatformRemoteGDBServer::ResolveExecutab
 }
 
 Error
-PlatformRemoteGDBServer::GetFile (const FileSpec &platform_file, 
-                                  const UUID *uuid_ptr,
-                                  FileSpec &local_file)
+PlatformRemoteGDBServer::GetFileWithUUID (const FileSpec &platform_file, 
+                                          const UUID *uuid_ptr,
+                                          FileSpec &local_file)
 {
     // Default to the local case
     local_file = platform_file;

Modified: lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h?rev=199504&r1=199503&r2=199504&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h (original)
+++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h Fri Jan 17 12:18:31 2014
@@ -73,9 +73,9 @@ public:
     GetDescription ();
 
     virtual lldb_private::Error
-    GetFile (const lldb_private::FileSpec &platform_file, 
-             const lldb_private::UUID *uuid_ptr,
-             lldb_private::FileSpec &local_file);
+    GetFileWithUUID (const lldb_private::FileSpec &platform_file, 
+                     const lldb_private::UUID *uuid_ptr,
+                     lldb_private::FileSpec &local_file);
 
     virtual bool
     GetProcessInfo (lldb::pid_t pid, 

Modified: lldb/trunk/source/Target/Platform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Platform.cpp?rev=199504&r1=199503&r2=199504&view=diff
==============================================================================
--- lldb/trunk/source/Target/Platform.cpp (original)
+++ lldb/trunk/source/Target/Platform.cpp Fri Jan 17 12:18:31 2014
@@ -81,9 +81,9 @@ Platform::SetDefaultPlatform (const lldb
 }
 
 Error
-Platform::GetFile (const FileSpec &platform_file, 
-                   const UUID *uuid_ptr,
-                   FileSpec &local_file)
+Platform::GetFileWithUUID (const FileSpec &platform_file, 
+                           const UUID *uuid_ptr,
+                           FileSpec &local_file)
 {
     // Default to the local case
     local_file = platform_file;

Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=199504&r1=199503&r2=199504&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Fri Jan 17 12:18:31 2014
@@ -1067,7 +1067,7 @@ Target::SetExecutableModule (ModuleSP& e
                 FileSpec dependent_file_spec (dependent_files.GetFileSpecPointerAtIndex(i));
                 FileSpec platform_dependent_file_spec;
                 if (m_platform_sp)
-                    m_platform_sp->GetFile (dependent_file_spec, NULL, platform_dependent_file_spec);
+                    m_platform_sp->GetFileWithUUID (dependent_file_spec, NULL, platform_dependent_file_spec);
                 else
                     platform_dependent_file_spec = dependent_file_spec;
 





More information about the lldb-commits mailing list