ychen added inline comments.

================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2257
+
+  F->setPrefixData(CreateKCFITypeId(FD->getType()));
+  F->addFnAttr("kcfi-target");
----------------
FYI: using prefix data may not work for the C++ coroutine. 
(https://github.com/llvm/llvm-project/issues/49689) because corosplit pass may 
clone coro functions and change its function type. But prefix data is opaque, 
so there is no way to detect this, and then drop the prefix data in the 
corosplit pass.

If this is a concern for now or for the near future, it might be better to use 
alternative approaches like D115844.


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

Reply via email to