FileSpec: make matching separator-agnostic again
authorPavel Labath <labath@google.com>
Thu, 14 Apr 2016 09:38:06 +0000 (09:38 +0000)
committerPavel Labath <labath@google.com>
Thu, 14 Apr 2016 09:38:06 +0000 (09:38 +0000)
commita212c58db07b31311e2e7f6a76bf444ccc482f16
tree4f11cebe6de413e918d37c3e4679e0c68ddfb49d
parentd10ce392540a9121c16916c2cf23f1843131247b
FileSpec: make matching separator-agnostic again

Summary:
In D18689, I removed the call to Normalize() in FileSpec::SetFile, because it no longer seemed
needed, and it resolved a quirk in the FileSpec API (spec.GetCString() returnes a path with
backslashes, but spec.GetDirectory().GetCString() has forward slashes). This turned out to be a
problem because we would consider paths with different separators as different (which led to
unresolved breakpoints for instance).

Here, I am putting back in the call to Normalize() and adding a unittest for FileSpec::Equal. I
am commenting out the GetDirectory unittests until we figure out the what is the expected
behaviour here.

Reviewers: zturner

Subscribers: lldb-commits

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

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