Make FileSpec handling platform-independent
authorPavel Labath <labath@google.com>
Mon, 4 Apr 2016 14:39:12 +0000 (14:39 +0000)
committerPavel Labath <labath@google.com>
Mon, 4 Apr 2016 14:39:12 +0000 (14:39 +0000)
commit144119b86d647f405159259bf4fbf5499578d648
treefb961cf682fd35dd03348281de58e0d4f263e9d2
parent09464e63d842e1e0e6be300b6bb59bc9c1e7ecdf
Make FileSpec handling platform-independent

Summary:
Even though FileSpec attempted to handle both kinds of path syntaxes (posix and windows) on both
platforms, it relied on the llvm path library to do its work, whose behavior differed on
different platforms. This led to subtle differences in FileSpec behavior between platforms. This
replaces the pieces of the llvm library with our own implementations. The functions are simply
copied from llvm, with #ifdefs replaced by runtime checks for ePathSyntaxWindows.

Reviewers: zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D18689

llvm-svn: 265299
lldb/source/Host/common/FileSpec.cpp
lldb/unittests/Host/FileSpecTest.cpp