Skip to content

Commit f015f68

Browse files
committed
Fix small compilation from MSVC.
1 parent 3b8e384 commit f015f68

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/SILOptimizer/Utils/PartitionUtils.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ void PartitionOpError::NonSendableIsolationCrossingResultError::print(
107107
//===----------------------------------------------------------------------===//
108108

109109
void PartitionOp::print(llvm::raw_ostream &os, bool extraSpace) const {
110+
constexpr static char extraSpaceLiteral[10] = " ";
110111
switch (opKind) {
111112
case PartitionOpKind::Assign: {
112-
constexpr static char extraSpaceLiteral[10] = " ";
113113
os << "assign ";
114114
if (extraSpace)
115115
os << extraSpaceLiteral;
@@ -120,31 +120,27 @@ void PartitionOp::print(llvm::raw_ostream &os, bool extraSpace) const {
120120
os << "assign_fresh %%" << opArgs[0];
121121
break;
122122
case PartitionOpKind::Send: {
123-
constexpr static char extraSpaceLiteral[10] = " ";
124123
os << "send ";
125124
if (extraSpace)
126125
os << extraSpaceLiteral;
127126
os << "%%" << opArgs[0];
128127
break;
129128
}
130129
case PartitionOpKind::UndoSend: {
131-
constexpr static char extraSpaceLiteral[10] = " ";
132130
os << "undo_send ";
133131
if (extraSpace)
134132
os << extraSpaceLiteral;
135133
os << "%%" << opArgs[0];
136134
break;
137135
}
138136
case PartitionOpKind::Merge: {
139-
constexpr static char extraSpaceLiteral[10] = " ";
140137
os << "merge ";
141138
if (extraSpace)
142139
os << extraSpaceLiteral;
143140
os << "%%" << opArgs[0] << " with %%" << opArgs[1];
144141
break;
145142
}
146143
case PartitionOpKind::Require: {
147-
constexpr static char extraSpaceLiteral[10] = " ";
148144
os << "require ";
149145
if (extraSpace)
150146
os << extraSpaceLiteral;
@@ -156,14 +152,15 @@ void PartitionOp::print(llvm::raw_ostream &os, bool extraSpace) const {
156152
os << "%%" << opArgs[0];
157153
break;
158154
case PartitionOpKind::InOutSendingAtFunctionExit:
159-
constexpr static char extraSpaceLiteral[10] = " ";
160155
os << "inout_sending_at_function_exit ";
161156
if (extraSpace)
162157
os << extraSpaceLiteral;
163158
os << "%%" << opArgs[0];
164159
break;
165160
case PartitionOpKind::NonSendableIsolationCrossingResult:
166161
os << "nonsendable_isolationcrossing_result ";
162+
if (extraSpace)
163+
os << extraSpaceLiteral;
167164
os << "%%" << opArgs[0];
168165
break;
169166
}

0 commit comments

Comments
 (0)