[lldb-dev] Platform::GetFile overloaded virtual function
Steve Pucci
spucci at google.com
Wed Jan 15 08:37:44 PST 2014
Hi all,
Platform::GetFile is an overloaded method with two signatures:
virtual Error
GetFile (const FileSpec &platform_file,
const UUID *uuid_ptr,
FileSpec &local_file);
...
virtual Error
GetFile (const FileSpec& source,
const FileSpec& destination);
The first has a large comment block and a working base-class
implementation. The second has an error implementation in the base class
and no documentation. Only PlatformPosix redefines the second one, but
API/SBPlatform.cpp uses it, which seems to imply that SBPlatform.cpp will
only work with PosixPlatform. I'm not sure what SBPlatform's intended use
is but it uses base-class PlatformSP pointers so it seems like this might
be a bug.
As you may know this situation results in the second signature being hidden
in all derived classes that implement the first signature but not the
second, which is most of them. gcc gives a warning about this hiding,
which is one reason I'm trying to track it down, but it seems like
something's not quite right about this anyway... I could silence gcc's
warnings by a "using Platform::GetFile" in the derived classes, but I want
to verify if there's a real problem before I do that.
Thanks,
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140115/cc088ef7/attachment.html>
More information about the lldb-dev
mailing list