benlangmuir added inline comments.
================ Comment at: clang/lib/Basic/FileManager.cpp:655 + SmallString<4096> AbsPathBuf = Name; + SmallString<4096> RealPathBuf; + if (!FS->makeAbsolute(AbsPathBuf)) { ---------------- 8k is a lot of stack space. The only reason this was 4k in the first place is it was originally using `char[PATH_MAX]` and unix `realpath` directly. I'd suggest just dropping to 128 per path. ================ Comment at: clang/lib/Basic/FileManager.cpp:663 + } else { + llvm::sys::path::remove_dots(AbsPathBuf, /*remove_dot_dot=*/true); + CanonicalName = AbsPathBuf.str().copy(CanonicalNameStorage); ---------------- Removing .. can change where the path points in the presence of symlinks; is this needed? ================ Comment at: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp:190 - StringRef FileName = File->tryGetRealPathName().empty() - ? File->getName() - : File->tryGetRealPathName(); + StringRef FileName = SM.getFileManager().getCanonicalName(File); ---------------- Why is this change needed? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154130/new/ https://reviews.llvm.org/D154130 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits