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

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 17 03:05:50 PDT 2018


ioeric added inline comments.


================
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))
----------------
bkramer wrote:
> PATH_MAX is not a standard thing and probably not there on windows. I'd just hardcode it to 256.
PATH_MAX on unit is 4096. Let's go with 4096.


Repository:
  rC Clang

https://reviews.llvm.org/D46942





More information about the cfe-commits mailing list