[llvm] [GSYM] Remove redundant getInliningInfoForAddress call (PR #111136)
David Stenberg via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 04:29:54 PDT 2024
https://github.com/dstenb created https://github.com/llvm/llvm-project/pull/111136
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.
>From add0a04ce4bbbc6a6f74cf95ddf646c1f857f716 Mon Sep 17 00:00:00 2001
From: David Stenberg <david.stenberg at ericsson.com>
Date: Mon, 30 Sep 2024 14:30:50 +0200
Subject: [PATCH] [GSYM] Remove redundant getInliningInfoForAddress call
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.
---
llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp | 1 -
1 file changed, 1 deletion(-)
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;
More information about the llvm-commits
mailing list