[PATCH] D46942: Add vfs::FileSystem::getRealPath

Benjamin Kramer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 17 02:45:36 PDT 2018


bkramer accepted this revision.
bkramer added a comment.
This revision is now accepted and ready to land.

Looks good. Please watch the windows buildbots carefully after landing this.



================
Comment at: lib/Basic/FileManager.cpp:537
 
-#ifdef LLVM_ON_UNIX
-  char CanonicalNameBuf[PATH_MAX];
-  if (realpath(Dir->getName().str().c_str(), CanonicalNameBuf))
+  SmallString<PATH_MAX> CanonicalNameBuf;
+  if (!FS->getRealPath(Dir->getName(), CanonicalNameBuf))
----------------
PATH_MAX is not a standard thing and probably not there on windows. I'd just hardcode it to 256.


Repository:
  rC Clang

https://reviews.llvm.org/D46942





More information about the cfe-commits mailing list