[PATCH] D111579: [clang] Fix DIFile directory root on Windows
Martin Storsjö via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 15 04:38:41 PDT 2021
mstorsjo added inline comments.
================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:439
+ if (llvm::sys::path::root_path(DirBuf) == DirBuf) {
+ // Don't strip the common prefix if it is only the root ("/" or "C:\")
// since that would make LLVM diagnostic locations confusing.
----------------
This change is correct IMO.
================
Comment at: clang/test/CodeGen/debug-prefix-map.c:24
+// CHECK-NO-MAIN-FILE-NAME: !DIFile(filename: "{{/|C:\\\\}}UNLIKELY_PATH{{/|\\\\}}empty{{/|\\\\}}{{.*}}",
+// CHECK-NO-MAIN-FILE-NAME-SAME: directory: "")
+// CHECK-NO-MAIN-FILE-NAME: !DIFile(filename: "{{/|C:\\\\}}UNLIKELY_PATH{{/|\\\\}}empty{{/|\\\\}}Inputs{{/|\\\\}}stdio.h",
----------------
I presume that this patch goes on top of D111457? It might be good to set that one as the parent revision of this one, so that the premerge test runs applies them on top of each other (right now, this one failed to apply).
Isn't this particular change present (`directory` being `""` here) already after the previous patch?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111579/new/
https://reviews.llvm.org/D111579
More information about the cfe-commits
mailing list