[PATCH] D100492: [OpenCL] Change OpenCL builtin version encoding

Steven Johnson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 26 10:25:52 PDT 2021


srj added a comment.

>From experimentation, it appears that just pulling the MinVersion and MaxVersion expressions from `BuiltinNameEmitter::EmitBuiltinTable` into separate statements will pacify MSVC, e.g.

  auto MinVersion = Overload.first->getValueAsDef("MinVersion")->getValueAsInt("ID");
  auto MaxVersion = Overload.first->getValueAsDef("MaxVersion")->getValueAsInt("ID");
  OS << "  { " << Overload.second << ", "
     << Overload.first->getValueAsListOfDefs("Signature").size() << ", "
     << (Overload.first->getValueAsBit("IsPure")) << ", "
     << (Overload.first->getValueAsBit("IsConst")) << ", "
     << (Overload.first->getValueAsBit("IsConv")) << ", "
     << FunctionExtensionIndex[ExtName] << ", "
     << MinVersion 
     << ", "
     << MaxVersion 
     << " },\n";


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100492/new/

https://reviews.llvm.org/D100492



More information about the cfe-commits mailing list