diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp --- a/llvm/lib/TableGen/Record.cpp +++ b/llvm/lib/TableGen/Record.cpp @@ -856,12 +856,12 @@ const StringInit *Delim) { if (List->size() == 0) return StringInit::get(""); - SmallString<80> Result(dyn_cast(List->getElement(0))->getValue()); + SmallString<80> Result(cast(List->getElement(0))->getValue()); StringInit::StringFormat Fmt = StringInit::SF_String; - + for (unsigned I = 1, E = List->size(); I < E; ++I) { Result.append(Delim->getValue()); - auto *StrInit = dyn_cast(List->getElement(I)); + auto *StrInit = cast(List->getElement(I)); Result.append(StrInit->getValue()); Fmt = StringInit::determineFormat(Fmt, StrInit->getFormat()); } @@ -872,13 +872,14 @@ const StringInit *Delim) { if (List->size() == 0) return StringInit::get(""); - SmallString<80> Result(dyn_cast(List->getElement(0)-> - getCastTo(IntRecTy::get()))->getAsString()); - + SmallString<80> Result( + cast(List->getElement(0)->getCastTo(IntRecTy::get())) + ->getAsString()); + for (unsigned I = 1, E = List->size(); I < E; ++I) { Result.append(Delim->getValue()); - Result.append(dyn_cast(List->getElement(I)-> - getCastTo(IntRecTy::get()))->getAsString()); + Result.append(cast(List->getElement(I)->getCastTo(IntRecTy::get())) + ->getAsString()); } return StringInit::get(Result); }