[PATCH] D115128: [TableGen][CodeEmitter] Introducing the VarLenCodeEmitterGen infrastructure
Sheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 6 03:26:02 PST 2021
0x59616e added inline comments.
================
Comment at: llvm/utils/TableGen/VarLenCodeEmitterGen.cpp:46-48
+ if (!isa<StringInit>(OperandName) && !isa<IntInit>(HiBit) &&
+ (LoBit && !isa<IntInit>(LoBit)))
+ PrintFatalError("Invalid format for operand");
----------------
Hi,
First off, I want to appreciate for all of your hard work. That's awesome. Really.
I have a question: shouldn't that `&&` be `||` ?
My understanding is: We have to make sure that every argument is what it should be.
In this case, the first argument should be StringInit, the second should be IntInit, etc.
So, if one of them is incorret, then it is fatal error.
But this logic in the if statement won't fail unless all of the two (or three) arguments are not what they should be.
Thanks for reading this comment :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115128/new/
https://reviews.llvm.org/D115128
More information about the llvm-commits
mailing list