nickdesaulniers accepted this revision. nickdesaulniers added inline comments. This revision is now accepted and ready to land.
================ Comment at: llvm/lib/Transforms/Instrumentation/KCFI.cpp:48-49 + SmallVector<CallInst *, 8> KCFICalls; + for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) { + if (auto *CI = dyn_cast<CallInst>(&*I)) + if (CI->getOperandBundle(LLVMContext::OB_kcfi)) ---------------- prefer a range-for here ``` for (Instruction &I : F) if (auto &CI = dyn_cast<CallInst>(I); ``` ================ Comment at: llvm/lib/Transforms/Instrumentation/KCFI.cpp:77 + // Drop the KCFI operand bundle. + auto *Call = CallBase::removeOperandBundle(CI, LLVMContext::OB_kcfi, CI); + assert(Call != CI); ---------------- `CallBase *Call = ...` ================ Comment at: llvm/test/Transforms/KCFI/kcfi-supported.ll:4 + +; COM: If the back-end supports KCFI operand bundle lowering, KCFIPass should be a no-op. + ---------------- COM? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135411/new/ https://reviews.llvm.org/D135411 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits