<div dir="ltr">Are you saying that there is a situation where you are given a path, and you have no idea whether it is a posix path or a windows path?  That seems strange to me.  Surely you must know (or be able to find out) if the computer you are interfacing with is running Windows or non-Windows, right?</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 18, 2015 at 3:58 PM Dawn Perchik <<a href="mailto:dawn%2Bllvm@burble.org">dawn+llvm@burble.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">dawn added a comment.<br>
<br>
In <a href="http://reviews.llvm.org/D12115#226962" rel="noreferrer" target="_blank">http://reviews.llvm.org/D12115#226962</a>, @zturner wrote:<br>
<br>
> Rather than all of this ugly error-prone code, can we instead use<br>
>  llvm::sys::fs::root_name to check whether the path contains a drive letter?<br>
<br>
<br>
Sadly no, because root_name only parses c:\ correctly if the platform is Windows.  Our IDE is hosted on Windows but talks to lldb running on OSX.  I've had this path problem with the DWARF reader and FileSpec - lldb has a core assumption that you only want to support Windows paths if you run on Windows.  At least with FileSpec you can pass a PathSyntax, but you have to choose either Windows or Posix, not both.  We want to support both Posix and Windows style paths.  I've not come up with a clean patch for this problem so none have been submitted.  We should start another thread about how to resolve this problem...<br>
<br>
For now, would it be OK to put a FIXME comment in the source?<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D12115" rel="noreferrer" target="_blank">http://reviews.llvm.org/D12115</a><br>
<br>
<br>
<br>
</blockquote></div>