Skip to content

Commit cd22b53

Browse files
committed
[NFC][Cloning] Clean up comments in CloneFunctionInto
Summary: Some comments no longer make sense nor refer to an existing code path. Test Plan: ninja check-llvm-unit stack-info: PR: #129153, branch: users/artempyanykh/fast-coro-upstream-part2-take2/11
1 parent 6b37028 commit cd22b53

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

llvm/lib/Transforms/Utils/CloneFunction.cpp

-11
Original file line numberDiff line numberDiff line change
@@ -266,24 +266,13 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
266266
if (OldFunc->isDeclaration())
267267
return;
268268

269-
// When we remap instructions within the same module, we want to avoid
270-
// duplicating inlined DISubprograms, so record all subprograms we find as we
271-
// duplicate instructions and then freeze them in the MD map. We also record
272-
// information about dbg.value and dbg.declare to avoid duplicating the
273-
// types.
274269
DebugInfoFinder DIFinder;
275270

276-
// Track the subprogram attachment that needs to be cloned to fine-tune the
277-
// mapping within the same module.
278271
if (Changes < CloneFunctionChangeType::DifferentModule) {
279-
// Need to find subprograms, types, and compile units.
280-
281272
assert((NewFunc->getParent() == nullptr ||
282273
NewFunc->getParent() == OldFunc->getParent()) &&
283274
"Expected NewFunc to have the same parent, or no parent");
284275
} else {
285-
// Need to find all the compile units.
286-
287276
assert((NewFunc->getParent() == nullptr ||
288277
NewFunc->getParent() != OldFunc->getParent()) &&
289278
"Expected NewFunc to have different parents, or no parent");

0 commit comments

Comments
 (0)