[PATCH] D133480: [llvm-dwp] Get the DWO file using relative path instead of absolute path to make it work for distribution build

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 8 16:20:06 PDT 2022


steven.zhang updated this revision to Diff 458909.
steven.zhang added a comment.

Address comments.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133480

Files:
  llvm/tools/llvm-dwp/llvm-dwp.cpp


Index: llvm/tools/llvm-dwp/llvm-dwp.cpp
===================================================================
--- llvm/tools/llvm-dwp/llvm-dwp.cpp
+++ llvm/tools/llvm-dwp/llvm-dwp.cpp
@@ -66,15 +66,7 @@
         Die.find({dwarf::DW_AT_dwo_name, dwarf::DW_AT_GNU_dwo_name}), "");
     if (DWOName.empty())
       continue;
-    std::string DWOCompDir =
-        dwarf::toString(Die.find(dwarf::DW_AT_comp_dir), "");
-    if (!DWOCompDir.empty()) {
-      SmallString<16> DWOPath(std::move(DWOName));
-      sys::fs::make_absolute(DWOCompDir, DWOPath);
-      DWOPaths.emplace_back(DWOPath.data(), DWOPath.size());
-    } else {
-      DWOPaths.push_back(std::move(DWOName));
-    }
+    DWOPaths.push_back(std::move(DWOName));
   }
   return std::move(DWOPaths);
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133480.458909.patch
Type: text/x-patch
Size: 763 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220908/a116aa0f/attachment.bin>


More information about the llvm-commits mailing list