[llvm] [DebugInfo][RemoveDIs] Handle non-instr debug-info in GlobalISel (PR #75228)

via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 09:54:39 PST 2023


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 6ab663be8da2b2f0a3a59d1ab6935100fb832049 d2bf6b44693f0350bcdf5737eff2af8a084e3fbd -- llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h b/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
index 51c7c26282..133585faf2 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
@@ -206,16 +206,15 @@ private:
 
   /// Examine any debug-info attached to the instruction (in the form of
   /// DPValues) and translate it.
-  void translateDbgInfo(const Instruction &Inst,
-                          MachineIRBuilder &MIRBuilder);
+  void translateDbgInfo(const Instruction &Inst, MachineIRBuilder &MIRBuilder);
 
   /// Translate a debug-info record: either a dbg.declare or dbg.value
   /// equivalent. Pass in all the contents of the record, rather than relying
   /// on how it's stored.
   void translateDbgRecord(bool isDeclare, Value *V, bool hasArgList,
-                         const DILocalVariable *Variable,
-                         const DIExpression *Expression, const DebugLoc &DL,
-                         MachineIRBuilder &MIRBuilder);
+                          const DILocalVariable *Variable,
+                          const DIExpression *Expression, const DebugLoc &DL,
+                          MachineIRBuilder &MIRBuilder);
 
   // Translate U as a copy of V.
   bool translateCopy(const User &U, const Value &V,
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
index 40c9256532..33ca120fcf 100644
--- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -3118,10 +3118,10 @@ void IRTranslator::finishPendingPhis() {
 }
 
 void IRTranslator::translateDbgRecord(bool isDeclare, Value *V, bool hasArgList,
-                                     const DILocalVariable *Variable,
-                                     const DIExpression *Expression,
-                                     const DebugLoc &DL,
-                                     MachineIRBuilder &MIRBuilder) {
+                                      const DILocalVariable *Variable,
+                                      const DIExpression *Expression,
+                                      const DebugLoc &DL,
+                                      MachineIRBuilder &MIRBuilder) {
   assert(Variable->isValidLocationForIntrinsic(DL) &&
          "Expected inlined-at fields to agree");
   // Act as if we're handling a debug intrinsic.
@@ -3165,7 +3165,7 @@ void IRTranslator::translateDbgRecord(bool isDeclare, Value *V, bool hasArgList,
 }
 
 void IRTranslator::translateDbgInfo(const Instruction &Inst,
-                                      MachineIRBuilder &MIRBuilder) {
+                                    MachineIRBuilder &MIRBuilder) {
   for (DPValue &DPV : Inst.getDbgValueRange()) {
     const DILocalVariable *Variable = DPV.getVariable();
     const DIExpression *Expression = DPV.getExpression();

``````````

</details>


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


More information about the llvm-commits mailing list