[PATCH] D150190: [llvm-debuginfo-analyzer] Include linkage names while evaluating `--select`
Nabeel Omer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 9 03:35:27 PDT 2023
n-omer created this revision.
n-omer added a reviewer: CarlosAlbertoEnciso.
n-omer added a project: debug-info.
Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware.
Herald added a project: All.
n-omer requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch allows mangled names to be passed to --select.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D150190
Files:
llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h
llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-select-logical-elements.test
Index: llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-select-logical-elements.test
===================================================================
--- llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-select-logical-elements.test
+++ llvm/test/tools/llvm-debuginfo-analyzer/DWARF/01-dwarf-select-logical-elements.test
@@ -71,3 +71,23 @@
; TWO-NEXT: [001] {CompileUnit} 'test.cpp'
; TWO-NEXT: [004] 4 {TypeAlias} 'INTEGER' -> 'int'
; TWO-NEXT: [004] 5 {Variable} 'CONSTANT' -> 'const INTEGER'
+
+; RUN: llvm-debuginfo-analyzer --attribute=level \
+; RUN: --select=_Z3fooPKijb \
+; RUN: --report=list \
+; RUN: --print=symbols,types \
+; RUN: %p/Inputs/pr-57040-test-dwarf-clang.o \
+; RUN: %p/Inputs/pr-57040-test-dwarf-gcc.o 2>&1 | \
+; RUN: FileCheck --strict-whitespace -check-prefix=THREE %s
+
+; THREE: Logical View:
+; THREE-NEXT: [000] {File} 'pr-57040-test-dwarf-clang.o'
+; THREE-EMPTY:
+; THREE-NEXT: [001] {CompileUnit} 'test.cpp'
+; THREE-NEXT: [002] 2 {Function} extern not_inlined 'foo' -> 'int'
+; THREE-EMPTY:
+; THREE: Logical View:
+; THREE-NEXT: [000] {File} 'pr-57040-test-dwarf-gcc.o'
+; THREE-EMPTY:
+; THREE-NEXT: [001] {CompileUnit} 'test.cpp'
+; THREE-NEXT: [002] 2 {Function} extern not_inlined 'foo' -> 'int'
Index: llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h
===================================================================
--- llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h
+++ llvm/include/llvm/DebugInfo/LogicalView/Core/LVOptions.h
@@ -511,7 +511,7 @@
void resolveGenericPatternMatch(T *Element, const U &Requests) {
assert(Element && "Element must not be nullptr");
auto CheckPattern = [=]() -> bool {
- return (Element->isNamed() && matchGenericPattern(Element->getName())) ||
+ return (Element->isNamed() && (matchGenericPattern(Element->getName()) || matchGenericPattern(Element->getLinkageName()))) ||
(Element->isTyped() &&
matchGenericPattern(Element->getTypeName()));
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150190.520647.patch
Type: text/x-patch
Size: 2225 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230509/65655c5d/attachment.bin>
More information about the llvm-commits
mailing list