[PATCH] D119684: [TableGen][VarLenCodeEmitterGen] Improve the error message

Min-Yih Hsu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 15 13:07:50 PST 2022


myhsu added inline comments.


================
Comment at: llvm/utils/TableGen/VarLenCodeEmitterGen.cpp:95
   public:
     VarLenInst() : NumBits(0U), HasDynamicSegment(false) {}
 
----------------
please initialize TheDef with nullptr in default ctor.


================
Comment at: llvm/utils/TableGen/VarLenCodeEmitterGen.cpp:141
   std::string Op = DI->getOperator()->getAsString();
 
   if (Op == "ascend" || Op == "descend") {
----------------
just want to be safe, maybe we should assert on TheDef here to make sure it's not null.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119684



More information about the llvm-commits mailing list