Skip to content

Commit 2d56785

Browse files
dstuttFlakebi
authored andcommitted
Cater for llvm versions
1 parent f91574a commit 2d56785

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/TableGen/Operations.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,13 @@ void OperationBase::parseValueTraits(raw_ostream &errs, RecordTy *record,
322322
}
323323

324324
const ListInit *List = record->getValueAsListInit("value_traits");
325-
for (const Init *I : List->getElements()) {
325+
for (const Init *I : List->
326+
#if LLVM_MAIN_REVISION && LLVM_MAIN_REVISION < 538013
327+
getValues()
328+
#else
329+
getElements()
330+
#endif
331+
) {
326332
if (const DagInit *DI = dyn_cast<DagInit>(I)) {
327333
if (DI->getNumArgs() != 1) {
328334
errs << "value_traits " << *DI << " is missing argument name";

0 commit comments

Comments
 (0)