diff options
author | Artem Pianykh <artem.pyanykh@gmail.com> | 2025-03-15 11:44:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-15 11:44:34 +0000 |
commit | 1e6ba3cd2fe96be00b6ed6ba28b3d9f9271d784d (patch) | |
tree | 2ea6c59e998046b47fbf098e508e1c99578485e4 /llvm/lib/Transforms/Utils/CloneFunction.cpp | |
parent | 6a030b300547233dc5fb023a893737fa75bf60dc (diff) | |
download | llvm-1e6ba3cd2fe96be00b6ed6ba28b3d9f9271d784d.zip llvm-1e6ba3cd2fe96be00b6ed6ba28b3d9f9271d784d.tar.gz llvm-1e6ba3cd2fe96be00b6ed6ba28b3d9f9271d784d.tar.bz2 |
[NFC][Cloning] Remove now unused FindDebugInfoToIdentityMap (#129151)
Summary:
This function is no longer needed.
Test Plan:
ninja check-llvm-unit
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index bdabe0e..249bef4 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -189,40 +189,6 @@ DISubprogram *llvm::CollectDebugInfoForCloning(const Function &F, return SPClonedWithinModule; } -MetadataSetTy -llvm::FindDebugInfoToIdentityMap(CloneFunctionChangeType Changes, - DebugInfoFinder &DIFinder, - DISubprogram *SPClonedWithinModule) { - if (Changes >= CloneFunctionChangeType::DifferentModule) - return {}; - - if (DIFinder.subprogram_count() == 0) - assert(!SPClonedWithinModule && - "Subprogram should be in DIFinder->subprogram_count()..."); - - MetadataSetTy MD; - - // Avoid cloning types, compile units, and (other) subprograms. - for (DISubprogram *ISP : DIFinder.subprograms()) - if (ISP != SPClonedWithinModule) - MD.insert(ISP); - - // If a subprogram isn't going to be cloned skip its lexical blocks as well. - for (DIScope *S : DIFinder.scopes()) { - auto *LScope = dyn_cast<DILocalScope>(S); - if (LScope && LScope->getSubprogram() != SPClonedWithinModule) - MD.insert(S); - } - - for (DICompileUnit *CU : DIFinder.compile_units()) - MD.insert(CU); - - for (DIType *Type : DIFinder.types()) - MD.insert(Type); - - return MD; -} - void llvm::CloneFunctionMetadataInto(Function &NewFunc, const Function &OldFunc, ValueToValueMapTy &VMap, RemapFlags RemapFlag, |