Skip to content

Commit 0b95f59

Browse files
committed
Revert the ranged-for/ListSep change.
Causes output difference on Win. I don't have Windows locally to debug/repro. So just leave the main part of the patch.
1 parent 5469237 commit 0b95f59

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

llvm/utils/TableGen/CallingConvEmitter.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,13 @@ void CallingConvEmitter::emitAction(const Record *Action, indent Indent,
204204

205205
if (Action->isSubClassOf("CCIfType")) {
206206
const ListInit *VTs = Action->getValueAsListInit("VTs");
207-
ListSeparator LS(" ||\n " + std::string(Indent.NumIndents, ' '));
208-
for (const Init *I : VTs->getValues()) {
209-
const Record *VT = cast<DefInit>(I)->getDef();
210-
O << LS << "LocVT == " << getEnumName(getValueType(VT));
207+
for (unsigned I = 0, E = VTs->size(); I != E; ++I) {
208+
const Record *VT = VTs->getElementAsRecord(I);
209+
if (I != 0)
210+
O << " ||\n " << Indent;
211+
O << "LocVT == " << getEnumName(getValueType(VT));
211212
}
213+
212214
} else if (Action->isSubClassOf("CCIf")) {
213215
O << Action->getValueAsString("Predicate");
214216
} else {

0 commit comments

Comments
 (0)