Skip to content

Commit 3e6ac93

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 f952b0c commit 3e6ac93

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
@@ -188,8 +188,9 @@ template <typename BitfieldContainer> struct BitfieldRef {
188188
BitfieldRef &ref;
189189
BitfieldContainer container;
190190

191-
StackState(BitfieldRef &ref, SILFunction *function)
192-
: ref(ref), container(function) {
191+
template <typename... ArgTypes>
192+
StackState(BitfieldRef &ref, ArgTypes &&...Args)
193+
: ref(ref), container(std::forward<ArgTypes>(Args)...) {
193194
ref.ref = &container;
194195
}
195196

0 commit comments

Comments
 (0)