[llvm] [GSYM] Remove redundant getInliningInfoForAddress call (PR #111136)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 04:30:27 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-debuginfo

Author: David Stenberg (dstenb)

<details>
<summary>Changes</summary>

In DwarfTransformer::verify() line number information is retrieved for
each address using:

  auto DwarfInlineInfos =
      DICtx.getInliningInfoForAddress(SectAddr, DLIS);

Later down the loop, another such invocation was made before:

  Gsym->dump(Log, *FI);

There is a continue after that, DwarfInlineInfos do not affect the
dump() invocation, I am not aware of any other side effects that is
needed from the extra getInliningInfoForAddress() invocation, and tests
pass without it, so just remove it.


---
Full diff: https://github.com/llvm/llvm-project/pull/111136.diff


1 Files Affected:

- (modified) llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp (-1) 


``````````diff
diff --git a/llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp b/llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
index 894abf5777f161..3f5604e6aa4b06 100644
--- a/llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
+++ b/llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
@@ -699,7 +699,6 @@ llvm::Error DwarfTransformer::verify(StringRef GsymPath,
             Log << "    [" << Idx << "]: " << gii.Name << " @ " << gii.Dir
                 << '/' << gii.Base << ':' << gii.Line << '\n';
           }
-          DwarfInlineInfos = DICtx.getInliningInfoForAddress(SectAddr, DLIS);
           Gsym->dump(Log, *FI);
         }
         continue;

``````````

</details>


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


More information about the llvm-commits mailing list