[PATCH] D96678: [llvm-dwp] Join dwo paths correctly when DWOPath is absolute

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 15 13:48:44 PST 2021


dblaikie added a comment.

Please add/include test coverage.



================
Comment at: llvm/tools/llvm-dwp/llvm-dwp.cpp:529
     if (!DWOCompDir.empty()) {
-      SmallString<16> DWOPath;
-      sys::path::append(DWOPath, DWOCompDir, DWOName);
+      SmallString<16> DWOPath{std::move(DWOName)};
+      sys::fs::make_absolute(DWOCompDir, DWOPath);
----------------
Generally prefer `=` init syntax over `{}` or `()` (this avoids any invocation of explicit conversions, for instance - making the code a bit simpler/easier to understand)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96678



More information about the llvm-commits mailing list