[PATCH] D113716: sys::path: Detect posix paths starting with ~ as absolute

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 12 15:08:33 PST 2021


dexonsmith requested changes to this revision.
dexonsmith added a comment.
This revision now requires changes to proceed.

I agree with @labath; we shouldn't change `sys::path` APIs to do have implicit knowledge of shell-specific behaviours (or to guess at what they might be).



================
Comment at: llvm/test/tools/llvm-dwarfdump/AArch64/tilde.s:4
+# RUN: | FileCheck %s
+# CHECK: DW_AT_decl_file ("~user/foo/t.c")
+.section    __TEXT,__text,regular,pure_instructions
----------------
Seems potentially like a bug in whatever generated the DWARF for this location to appear un-expanded; or, potentially a response to an interesting user request, such as specifying `-fdebug-prefix-map="some/path=~user"`.


================
Comment at: llvm/test/tools/llvm-dwarfdump/AArch64/tilde.s:102
+Linfo_string:
+.asciz    "clang version 14.0.0 (git at github.com:llvm/llvm-project d56b171ee965eba9ba30f4a479a9f2e1703105cf)" ; string offset=0
+.asciz    "~user/foo/t.c"                 ; string offset=97
----------------
Maybe this testcase could be stripped down to skip the d56b171ee965eba9ba30f4a479a9f2e1703105cf?



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113716/new/

https://reviews.llvm.org/D113716



More information about the llvm-commits mailing list