Skip to content

Commit e2aef42

Browse files
committed
[NFC][Cloning] Remove now unused CollectDebugInfoForCloning
Summary: This function is no longer used, let's remove it from the header and impl. Test Plan: ninja check-llvm-unit stack-info: PR: #129152, branch: users/artempyanykh/fast-coro-upstream-part2-take2/10
1 parent 18be509 commit e2aef42

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

llvm/include/llvm/Transforms/Utils/Cloning.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -230,20 +230,6 @@ void CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc,
230230
const char *NameSuffix = "",
231231
ClonedCodeInfo *CodeInfo = nullptr);
232232

233-
/// Collect debug information such as types, compile units, and other
234-
/// subprograms that are reachable from \p F and can be considered global for
235-
/// the purposes of cloning (and hence not needing to be cloned).
236-
///
237-
/// What debug information should be processed depends on \p Changes: when
238-
/// cloning into the same module we process \p F's subprogram and instructions;
239-
/// when into a cloned module, neither of those.
240-
///
241-
/// Returns DISubprogram of the cloned function when cloning into the same
242-
/// module or nullptr otherwise.
243-
DISubprogram *CollectDebugInfoForCloning(const Function &F,
244-
CloneFunctionChangeType Changes,
245-
DebugInfoFinder &DIFinder);
246-
247233
/// This class captures the data input to the InlineFunction call, and records
248234
/// the auxiliary results produced by it.
249235
class InlineFunctionInfo {

llvm/lib/Transforms/Utils/CloneFunction.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -168,27 +168,6 @@ void llvm::CloneFunctionAttributesInto(Function *NewFunc,
168168
OldAttrs.getRetAttrs(), NewArgAttrs));
169169
}
170170

171-
DISubprogram *llvm::CollectDebugInfoForCloning(const Function &F,
172-
CloneFunctionChangeType Changes,
173-
DebugInfoFinder &DIFinder) {
174-
// CloneModule takes care of cloning debug info for ClonedModule. Cloning into
175-
// DifferentModule is taken care of separately in ClonedFunctionInto as part
176-
// of llvm.dbg.cu update.
177-
if (Changes >= CloneFunctionChangeType::DifferentModule)
178-
return nullptr;
179-
180-
DISubprogram *SPClonedWithinModule = nullptr;
181-
if (Changes < CloneFunctionChangeType::DifferentModule) {
182-
SPClonedWithinModule = F.getSubprogram();
183-
}
184-
if (SPClonedWithinModule)
185-
DIFinder.processSubprogram(SPClonedWithinModule);
186-
187-
collectDebugInfoFromInstructions(F, DIFinder);
188-
189-
return SPClonedWithinModule;
190-
}
191-
192171
void llvm::CloneFunctionMetadataInto(Function &NewFunc, const Function &OldFunc,
193172
ValueToValueMapTy &VMap,
194173
RemapFlags RemapFlag,

0 commit comments

Comments
 (0)