aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@chromium.org>2023-09-29 14:09:04 +0200
committerHans Wennborg <hans@chromium.org>2023-09-29 14:23:31 +0200
commiteee1f7cef856241ad7d66b715c584d29b1c89ca9 (patch)
tree8201bea81903f1dc28b2921b79611efc1f5e39b0 /llvm/lib/IR/DebugInfo.cpp
parent00f2d9b0ebcd3a4d56945c5260b8e891087a7861 (diff)
downloadllvm-eee1f7cef856241ad7d66b715c584d29b1c89ca9.zip
llvm-eee1f7cef856241ad7d66b715c584d29b1c89ca9.tar.gz
llvm-eee1f7cef856241ad7d66b715c584d29b1c89ca9.tar.bz2
Revert "[DebugMetadata][DwarfDebug] Support function-local types in lexical block scopes (4/7)"
This caused asserts: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:2331: virtual void llvm::DwarfDebug::endFunctionImpl(const llvm::MachineFunction *): Assertion `LScopes.getAbstractScopesList().size() == NumAbstractSubprograms && "getOrCreateAbstractScope() inserted an abstract subprogram scope"' failed. See comment on the code review for reproducer. > RFC https://discourse.llvm.org/t/rfc-dwarfdebug-fix-and-improve-handling-imported-entities-types-and-static-local-in-subprogram-and-lexical-block-scopes/68544 > > Similar to imported declarations, the patch tracks function-local types in > DISubprogram's 'retainedNodes' field. DwarfDebug is adjusted in accordance with > the aforementioned metadata change and provided a support of function-local > types scoped within a lexical block. > > The patch assumes that DICompileUnit's 'enums field' no longer tracks local > types and DwarfDebug would assert if any locally-scoped types get placed there. > > Reviewed By: jmmartinez > > Differential Revision: https://reviews.llvm.org/D144006 This reverts commit f8aab289b5549086062588fba627b0e4d3a5ab15.
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index f95388c..48b5501 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -267,12 +267,6 @@ void DebugInfoFinder::processSubprogram(DISubprogram *SP) {
processType(TVal->getType());
}
}
-
- for (auto *N : SP->getRetainedNodes()) {
- if (auto *Var = dyn_cast<DILocalVariable>(N)) {
- processLocalVariable(Var);
- }
- }
}
void DebugInfoFinder::processVariable(const Module &M,
@@ -281,10 +275,7 @@ void DebugInfoFinder::processVariable(const Module &M,
if (!N)
return;
- processLocalVariable(dyn_cast<DILocalVariable>(N));
-}
-
-void DebugInfoFinder::processLocalVariable(DILocalVariable *DV) {
+ auto *DV = dyn_cast<DILocalVariable>(N);
if (!DV)
return;