Skip to content

Commit 1a9e134

Browse files
committed
SILBuilder: add comments to constructors.
1 parent c1164c0 commit 1a9e134

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

include/swift/SIL/SILBuilder.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,18 @@ class SILBuilder {
172172
/// Build instructions before the given insertion point, inheriting the debug
173173
/// location.
174174
///
175-
/// Clients should prefer this constructor.
175+
/// SILBuilderContext must outlive this SILBuilder instance.
176176
SILBuilder(SILInstruction *I, const SILDebugScope *DS, SILBuilderContext &C)
177177
: TempContext(C.getModule()), C(C), F(I->getFunction()) {
178178
assert(DS && "instruction has no debug scope");
179179
setCurrentDebugScope(DS);
180180
setInsertionPoint(I);
181181
}
182182

183+
/// Build instructions before the given insertion point, inheriting the debug
184+
/// location.
185+
///
186+
/// SILBuilderContext must outlive this SILBuilder instance.
183187
SILBuilder(SILBasicBlock *BB, const SILDebugScope *DS, SILBuilderContext &C)
184188
: TempContext(C.getModule()), C(C), F(BB->getParent()) {
185189
assert(DS && "block has no debug scope");

0 commit comments

Comments
 (0)