[AsmParser] Fix a warning

This patch fixes:

  llvm/lib/AsmParser/LLParser.cpp:466:34: error: moving a temporary
  object prevents copy elision [-Werror,-Wpessimizing-move]
This commit is contained in:
Kazu Hirata 2022-07-13 01:52:53 -07:00
parent 307ace7f20
commit e28375d3f2
1 changed files with 1 additions and 1 deletions

View File

@ -463,7 +463,7 @@ bool LLParser::parseTargetDefinition() {
return true;
Expected<DataLayout> MaybeDL = DataLayout::parse(Str);
if (!MaybeDL)
return error(Loc, toString(std::move(MaybeDL.takeError())));
return error(Loc, toString(MaybeDL.takeError()));
M->setDataLayout(MaybeDL.get());
return false;
}