[clang] bde15de - Revert "Allow remapping the sysroot with -fdebug-prefix-map."

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 21 19:51:43 PDT 2020


Please include the reason for the revert in the revert message (including
links/quotes from buildbots, etc)

On Fri, Mar 20, 2020 at 4:28 PM Adrian Prantl via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

>
> Author: Adrian Prantl
> Date: 2020-03-20T16:27:23-07:00
> New Revision: bde15de3cabff6363008e67a999e6e4559743867
>
> URL:
> https://github.com/llvm/llvm-project/commit/bde15de3cabff6363008e67a999e6e4559743867
> DIFF:
> https://github.com/llvm/llvm-project/commit/bde15de3cabff6363008e67a999e6e4559743867.diff
>
> LOG: Revert "Allow remapping the sysroot with -fdebug-prefix-map."
>
> This reverts commit 6725c4836a5b3c11227869a6f456019a244aa29f.
>
> Added:
>
>
> Modified:
>     clang/lib/CodeGen/CGDebugInfo.cpp
>     clang/test/CodeGen/debug-prefix-map.c
>     llvm/lib/DWARFLinker/DWARFLinker.cpp
>
> Removed:
>
>
>
>
> ################################################################################
> diff  --git a/clang/lib/CodeGen/CGDebugInfo.cpp
> b/clang/lib/CodeGen/CGDebugInfo.cpp
> index da6cb458982b..a98d82f7152c 100644
> --- a/clang/lib/CodeGen/CGDebugInfo.cpp
> +++ b/clang/lib/CodeGen/CGDebugInfo.cpp
> @@ -631,7 +631,7 @@ void CGDebugInfo::CreateCompileUnit() {
>            ? llvm::DICompileUnit::DebugNameTableKind::None
>            : static_cast<llvm::DICompileUnit::DebugNameTableKind>(
>                  CGOpts.DebugNameTable),
> -      CGOpts.DebugRangesBaseAddress, remapDIPath(Sysroot), SDK);
> +      CGOpts.DebugRangesBaseAddress, Sysroot, SDK);
>  }
>
>  llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) {
>
> diff  --git a/clang/test/CodeGen/debug-prefix-map.c
> b/clang/test/CodeGen/debug-prefix-map.c
> index 354110d1b0da..5366e19447ae 100644
> --- a/clang/test/CodeGen/debug-prefix-map.c
> +++ b/clang/test/CodeGen/debug-prefix-map.c
> @@ -2,7 +2,6 @@
>  // RUN: %clang_cc1 -debug-info-kind=standalone
> -fdebug-prefix-map=%p=/UNLIKELY_PATH=empty %s -emit-llvm -o - | FileCheck
> %s -check-prefix CHECK-EVIL
>  // RUN: %clang_cc1 -debug-info-kind=standalone
> -fdebug-prefix-map=%p=/UNLIKELY_PATH/empty %s -emit-llvm -o -
> -main-file-name debug-prefix-map.c | FileCheck %s
>  // RUN: %clang_cc1 -debug-info-kind=standalone
> -fdebug-prefix-map=%p=/UNLIKELY_PATH/empty %s -emit-llvm -o -
> -fdebug-compilation-dir %p | FileCheck %s -check-prefix
> CHECK-COMPILATION-DIR
> -// RUN: %clang_cc1 -debug-info-kind=standalone
> -fdebug-prefix-map=%p=/UNLIKELY_PATH/empty %s -emit-llvm -o - -isysroot %p
> -debugger-tuning=lldb | FileCheck %s -check-prefix CHECK-SYSROOT
>  // RUN: %clang -g -fdebug-prefix-map=%p=/UNLIKELY_PATH/empty -S -c %s
> -emit-llvm -o - | FileCheck %s
>  // RUN: %clang -g -ffile-prefix-map=%p=/UNLIKELY_PATH/empty -S -c %s
> -emit-llvm -o - | FileCheck %s
>
> @@ -41,4 +40,3 @@ void test_rewrite_includes() {
>  // CHECK-COMPILATION-DIR: !DIFile(filename: "{{.*}}", directory:
> "/UNLIKELY_PATH/empty")
>  // CHECK-COMPILATION-DIR: !DIFile(filename: "{{.*}}Inputs/stdio.h",
> directory: "/UNLIKELY_PATH/empty")
>  // CHECK-COMPILATION-DIR-NOT: !DIFile(filename:
> -// CHECK-SYSROOT: !DICompileUnit({{.*}}sysroot: "/UNLIKELY_PATH/empty"
>
> diff  --git a/llvm/lib/DWARFLinker/DWARFLinker.cpp
> b/llvm/lib/DWARFLinker/DWARFLinker.cpp
> index fbc3a3e60cc9..8464c04f801e 100644
> --- a/llvm/lib/DWARFLinker/DWARFLinker.cpp
> +++ b/llvm/lib/DWARFLinker/DWARFLinker.cpp
> @@ -1914,15 +1914,6 @@ static uint64_t getDwoId(const DWARFDie &CUDie,
> const DWARFUnit &Unit) {
>    return 0;
>  }
>
> -static std::string remapPath(std::string Path,
> -                             const objectPrefixMap &ObjectPrefixMap) {
> -  StringRef PathRef(Path);
> -  for (const auto &Entry : ObjectPrefixMap)
> -    if (PathRef.startswith(Entry.first))
> -      return (Twine(Entry.second) +
> PathRef.substr(Entry.first.size())).str();
> -  return Path;
> -}
> -
>  bool DWARFLinker::registerModuleReference(
>      DWARFDie CUDie, const DWARFUnit &Unit, const DwarfFile &File,
>      OffsetsStringPool &StringPool, UniquingStringPool &UniquingStringPool,
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200321/931b12f5/attachment.html>


More information about the cfe-commits mailing list