aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
authorVladislav Dzhidzhoev <vdzhidzhoev@accesssoftek.com>2023-11-08 00:29:24 +0100
committerVladislav Dzhidzhoev <vdzhidzhoev@accesssoftek.com>2023-11-08 00:29:24 +0100
commit6beddd668adf8e6bddbbc58ec02e4728dd889e9e (patch)
tree4e579c9d7a07953ab336e5e8dba929439f87d73d /llvm/lib/Transforms/Utils/CloneFunction.cpp
parent086b65340cca2648a2a91a0a47d28c7d9bafd1e5 (diff)
downloadllvm-6beddd668adf8e6bddbbc58ec02e4728dd889e9e.zip
llvm-6beddd668adf8e6bddbbc58ec02e4728dd889e9e.tar.gz
llvm-6beddd668adf8e6bddbbc58ec02e4728dd889e9e.tar.bz2
Revert "[DebugMetadata][DwarfDebug] Support function-local types in lexical block scopes (4/7)"
This caused assert: llvm/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp:110: void llvm::DwarfFile::addScopeVariable(LexicalScope *, DbgVariable *): Assertion `Ret.second' failed. See comments https://reviews.llvm.org/D144006#4656350. This reverts commit 3b449bd46a11a55a40cbc0016a99b202fa05248e.
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/CloneFunction.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index 39ac48c..d552086 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -244,12 +244,7 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
mapToSelfIfNew(CU);
for (DIType *Type : DIFinder->types())
- // Don't skip subprogram's local types.
- if (!isa_and_present<DILocalScope>(Type->getScope()) ||
- SPClonedWithinModule == nullptr ||
- dyn_cast<DILocalScope>(Type->getScope())->getSubprogram() !=
- SPClonedWithinModule)
- mapToSelfIfNew(Type);
+ mapToSelfIfNew(Type);
} else {
assert(!SPClonedWithinModule &&
"Subprogram should be in DIFinder->subprogram_count()...");