Skip to content

Commit 0897748

Browse files
committed
[SIL] BitfieldRef forwards arbitrary args.
Previously, when constructing a container within a StackState, a SILFunction that was passed to the StackState's constructor was passed along. Here, arbitrary arguments are forwarded along.
1 parent 2c08dc2 commit 0897748

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/swift/SIL/SILBitfield.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,9 @@ template <typename BitfieldContainer> struct BitfieldRef {
186186
BitfieldRef &ref;
187187
BitfieldContainer container;
188188

189-
StackState(BitfieldRef &ref, SILFunction *function)
190-
: ref(ref), container(function) {
189+
template <typename... ArgTypes>
190+
StackState(BitfieldRef &ref, ArgTypes &&...Args)
191+
: ref(ref), container(std::forward<ArgTypes>(Args)...) {
191192
ref.ref = &container;
192193
}
193194

0 commit comments

Comments
 (0)