nickdesaulniers added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/MisExpect.cpp:150
+ // Operand 0 is a string tag "branch_weights"
+ if (MDString *Tag = cast<MDString>(MD->getOperand(0))) {
+ unsigned NOps = MD->getNumOperands();
----------------
Sorry if I'm going back and forth on this, but it may make sense to check the
number of operands first, before accessing any.
================
Comment at: llvm/lib/Transforms/Utils/MisExpect.cpp:159
+ }
+ misexpect::verifyMisExpect(&I, RealWeights, I.getContext());
+ }
----------------
do you need the `misexpect::` qualifier here? I think your `using` statement
above should make this one unnecessary?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66324/new/
https://reviews.llvm.org/D66324
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits