<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 25, 2013 at 7:13 PM, Thomas Schwinge <span dir="ltr"><<a href="mailto:thomas@codesourcery.com" target="_blank">thomas@codesourcery.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi!<br>
<div><div class="h5"><br>
On Mon, 25 Mar 2013 15:51:10 -0400, Sean Silva <<a href="mailto:silvas@purdue.edu">silvas@purdue.edu</a>> wrote:<br>
> We generally try to avoid putting platform-specific #ifdef's in the core<br>
> code, and instead prefer to keep it in libSupport. It would be great if you<br>
> pulled this code into libSupport by implementing FileSystem.h's function<br>
> `error_code canonicalize(const Twine &path, SmallVectorImpl<char><br>
> &result);` and addressed the nearby FIXME.<br>
<br>
</div></div>OK, that makes sense -- also in context of the LLVM patch<br>
<<a href="http://news.gmane.org/find-root.php?message_id=%3C1364227290-13977-1-git-send-email-thomas%40codesourcery.com%3E" target="_blank">http://news.gmane.org/find-root.php?message_id=%3C1364227290-13977-1-git-send-email-thomas%40codesourcery.com%3E</a>><br>
that can then (partly) be rewritten to use this function, too.<br>
<br>
What would be the convention to indicate that a host system does have<br>
non-canonical paths (Unix) or does not (Windows)?<br>
FileManager::getCanonicalName would use this information to enable usage<br>
of CanonicalDirNames (currently based on LLVM_ON_UNIX being defined) --<br>
on the other hand, has this caching of canonical names actually been<br>
profiled to be of any real benefit? (Perhaps in cases where network<br>
filesystem and similar "extravagances" are involved, though, I would<br>
expect the operating system to cache expansions of symbolic links in such<br>
cases.)<br>
<br><br>
</blockquote></div><br></div><div class="gmail_extra" style>It's probably enough to just call canonicalize() unconditionally, and add a comment to the declaration of canonicalize() that it may be a noop if no such concept exists on the host.</div>
<div class="gmail_extra" style><br></div><div class="gmail_extra" style>-- Sean Silva</div></div>