nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land.
LGTM; it would be good if you could provide steps to test this on the Linux kernel. (i.e. what kernel patches are needed). Consider waiting for at least one additional review sign off. ================ Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2268-2272 + if (!AddressTaken && F.hasLocalLinkage()) { + F.setPrefixData(nullptr); + F.removeFnAttr("kcfi"); + continue; + } ---------------- Can we not compute whether the address was taken BEFORE adding the prefix + Fn Attr and avoid adding these only to remove them later? ================ Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2271 + F.removeFnAttr("kcfi"); + continue; + } ---------------- You could probably drop this `continue`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119296/new/ https://reviews.llvm.org/D119296 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits