rsmith accepted this revision. ================ Comment at: lib/Frontend/TextDiagnostic.cpp:770-777 @@ +769,10 @@ + if (DiagOpts->AbsolutePath) { + const DirectoryEntry *Dir = SM.getFileManager().getDirectory( + llvm::sys::path::parent_path(Filename)); + if (Dir) { + StringRef DirName = SM.getFileManager().getCanonicalName(Dir); + llvm::sys::path::append(AbsoluteFilename, DirName, + llvm::sys::path::filename(Filename)); + Filename = StringRef(AbsoluteFilename.data(), AbsoluteFilename.size()); + } + } ---------------- Why split off the filename and rejoin it here? Is this to better handle cases where the directory exists but the file doesn't, or an attempt to avoid resolving file symlinks? A comment in the code explaining this would be useful.
https://reviews.llvm.org/D23816 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits