aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
authorArtem Pianykh <artem.pyanykh@gmail.com>2025-03-15 19:28:23 +0000
committerGitHub <noreply@github.com>2025-03-15 19:28:23 +0000
commitfc6fd6a2f119c4d2666e0cb499c59068f39944e2 (patch)
treee6d584abfc975ef31a6624499f5dd3208be2f33d /llvm/lib/Transforms/Utils/CloneFunction.cpp
parent316811060775f3d6284b5bb21cf7ea727fc2254d (diff)
downloadllvm-fc6fd6a2f119c4d2666e0cb499c59068f39944e2.zip
llvm-fc6fd6a2f119c4d2666e0cb499c59068f39944e2.tar.gz
llvm-fc6fd6a2f119c4d2666e0cb499c59068f39944e2.tar.bz2
[NFC][Cloning] Clean up comments in CloneFunctionInto (#129153)
Summary: Some comments no longer make sense nor refer to an existing code path. Test Plan: ninja check-llvm-unit
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/CloneFunction.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index 3ccb532..cde1ce8 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -266,24 +266,13 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
if (OldFunc->isDeclaration())
return;
- // When we remap instructions within the same module, we want to avoid
- // duplicating inlined DISubprograms, so record all subprograms we find as we
- // duplicate instructions and then freeze them in the MD map. We also record
- // information about dbg.value and dbg.declare to avoid duplicating the
- // types.
DebugInfoFinder DIFinder;
- // Track the subprogram attachment that needs to be cloned to fine-tune the
- // mapping within the same module.
if (Changes < CloneFunctionChangeType::DifferentModule) {
- // Need to find subprograms, types, and compile units.
-
assert((NewFunc->getParent() == nullptr ||
NewFunc->getParent() == OldFunc->getParent()) &&
"Expected NewFunc to have the same parent, or no parent");
} else {
- // Need to find all the compile units.
-
assert((NewFunc->getParent() == nullptr ||
NewFunc->getParent() != OldFunc->getParent()) &&
"Expected NewFunc to have different parents, or no parent");