[PATCH] D71849: Don't rely on '%l' modifiers to indicate a label reference
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 13:29:50 PST 2020
nickdesaulniers added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp:437
unsigned OpNo = InlineAsm::MIOp_FirstOperand;
+ const auto Operand = MI->getOperand(OpNo);
----------------
I feel like the check that `OpNo >= MI->getNumOperands()` should probably guard any calls to `MI->getOperand(OpNo)` (or that we should check the output of `MI->getOperand(OpNo)` for validity. Otherwise, `getOperand` will assert. This would allow you to hoist the two `OpNo >= MI->getNumOperands()` guards below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71849/new/
https://reviews.llvm.org/D71849
More information about the llvm-commits
mailing list