[llvm] [MC][DWARF] Consider non-native path separators when building DWARF directory-tables (PR #115888)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 12 08:07:00 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff a7b249e4708d61e491390773d3bb1ee88db91a57 bfdc8d60e2ce18b8d254556c1e68c6444efb0196 --extensions h,cpp -- llvm/include/llvm/MC/MCContext.h llvm/include/llvm/MC/MCDwarf.h llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp llvm/lib/MC/MCContext.cpp llvm/lib/MC/MCDwarf.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/MC/MCDwarf.h b/llvm/include/llvm/MC/MCDwarf.h
index 58e93d7903..1533608409 100644
--- a/llvm/include/llvm/MC/MCDwarf.h
+++ b/llvm/include/llvm/MC/MCDwarf.h
@@ -399,8 +399,7 @@ public:
 
   void setRootFile(StringRef Directory, StringRef FileName,
                    std::optional<MD5::MD5Result> Checksum,
-                   std::optional<StringRef> Source,
-                   llvm::sys::path::Style S) {
+                   std::optional<StringRef> Source, llvm::sys::path::Style S) {
     Header.PathStyle = S;
     Header.CompilationDir = std::string(Directory);
     Header.RootFile.Name = std::string(FileName);
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp
index e1e3f9ddfe..14ed6803e0 100644
--- a/llvm/lib/MC/MCContext.cpp
+++ b/llvm/lib/MC/MCContext.cpp
@@ -59,9 +59,10 @@
 
 using namespace llvm;
 
-cl::opt<bool> ForceDWARFWindowsPathSeps ("force-dwarf-windows-path-seps",
-   cl::desc("Use Windows path separators when building DWARF linetables"),
-   cl::Hidden);
+cl::opt<bool> ForceDWARFWindowsPathSeps(
+    "force-dwarf-windows-path-seps",
+    cl::desc("Use Windows path separators when building DWARF linetables"),
+    cl::Hidden);
 
 static void defaultDiagHandler(const SMDiagnostic &SMD, bool, const SourceMgr &,
                                std::vector<const MDNode *> &) {

``````````

</details>


https://github.com/llvm/llvm-project/pull/115888


More information about the llvm-commits mailing list