[PATCH] D87393: Enhance TableGen error message capabilities
Madhur Amilkanthwar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 14 05:36:58 PDT 2020
madhur13490 added inline comments.
================
Comment at: llvm/lib/TableGen/Record.cpp:2071
+// location in the RecordVal.
+bool RecordVal::setValue(Init *V, SMLoc NewLoc) {
+ Loc = NewLoc;
----------------
I think function can be very well written with early-return pattern i.e. check for the condition, if fails, return false. This way you can avoid nested "if" blocks.
================
Comment at: llvm/lib/TableGen/Record.cpp:2082
+ Bits.reserve(BTy->getNumBits());
+ for (unsigned i = 0, e = BTy->getNumBits(); i < e; ++i)
+ Bits.push_back(Value->getBit(i));
----------------
Please capitalize induction variable.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87393/new/
https://reviews.llvm.org/D87393
More information about the llvm-commits
mailing list