Skip to content

Commit d3d7342

Browse files
author
Davide Italiano
committed
[SILInstruction] Remove unused arg in setDebugScope()
1 parent 9c46b2a commit d3d7342

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

include/swift/SIL/SILInstruction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ class SILInstruction
326326
/// Update this instruction's SILDebugScope. This function should
327327
/// never be called directly. Use SILBuilder, SILBuilderWithScope or
328328
/// SILClonerWithScope instead.
329-
void setDebugScope(SILBuilder &B, const SILDebugScope *DS);
329+
void setDebugScope(const SILDebugScope *DS);
330330

331331
/// Total number of created and deleted SILInstructions.
332332
/// It is used only for collecting the compiler statistics.

lib/SIL/SILBasicBlock.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,7 @@ void SILBasicBlock::moveTo(SILBasicBlock::iterator To, SILInstruction *I) {
264264
assert(I->getParent() != this && "Must move from different basic block");
265265
InstList.splice(To, I->getParent()->InstList, I);
266266
ScopeCloner ScopeCloner(*Parent);
267-
SILBuilder B(*Parent);
268-
I->setDebugScope(B, ScopeCloner.getOrCreateClonedScope(I->getDebugScope()));
267+
I->setDebugScope(ScopeCloner.getOrCreateClonedScope(I->getDebugScope()));
269268
}
270269

271270
void
@@ -281,14 +280,12 @@ transferNodesFromList(llvm::ilist_traits<SILBasicBlock> &SrcTraits,
281280
return;
282281

283282
ScopeCloner ScopeCloner(*Parent);
284-
SILBuilder B(*Parent);
285283

286284
// If splicing blocks not in the same function, update the parent pointers.
287285
for (; First != Last; ++First) {
288286
First->Parent = Parent;
289287
for (auto &II : *First)
290-
II.setDebugScope(B,
291-
ScopeCloner.getOrCreateClonedScope(II.getDebugScope()));
288+
II.setDebugScope(ScopeCloner.getOrCreateClonedScope(II.getDebugScope()));
292289
}
293290
}
294291

lib/SIL/SILInstruction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const SILDebugScope *SILInstruction::getDebugScope() const {
4141
return Location.getScope();
4242
}
4343

44-
void SILInstruction::setDebugScope(SILBuilder &B, const SILDebugScope *DS) {
44+
void SILInstruction::setDebugScope(const SILDebugScope *DS) {
4545
if (getDebugScope() && getDebugScope()->InlinedCallSite)
4646
assert(DS->InlinedCallSite && "throwing away inlined scope info");
4747

0 commit comments

Comments
 (0)