stigger added inline comments.

================
Comment at: include/lldb/Host/FileSpec.h:712
@@ +711,3 @@
+             PathSyntax syntax = ePathSyntaxHostNative,
+             llvm::Triple *triple = nullptr);
+
----------------
labath wrote:
> I don't think the default-null parameter here is a good idea. This means some 
> of your file-specs will be case-sensitive and some will not (depending on 
> whether the the person who created the FileSpec remembered to pass in the 
> triple).
> 
> If it were up to me, I wouldn't even make case-sensitivity a property of the 
> file spec. I think it should be a property of the comparison between them. 
> Otherwise, what are you going to do when someone asks you to compare a 
> case-insensitive "/foo/bar" with a case-sensitive "/Foo/Bar" ?
If we get rid of `PathSyntax`, then default-null is going to be an equivalent 
of `ePathSyntaxHostNative`, meaning "use host triple".

> Otherwise, what are you going to do when someone asks you to compare a 
> case-insensitive "/foo/bar" with a case-sensitive "/Foo/Bar" ?

That's already handled in `FileSpec::Equal` and `FileSpec::Compare`: the 
comparison is case-insensitive only when both operands are case-insensitive.


https://reviews.llvm.org/D20041



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to