samitolvanen added inline comments.

================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2257
+
+  F->setPrefixData(CreateKCFITypeId(FD->getType()));
+  F->addFnAttr("kcfi-target");
----------------
ychen wrote:
> 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.
> FYI: using prefix data may not work for the C++ coroutine.

Thanks for the link, that's interesting. The Linux kernel doesn't use C++ so 
this isn't a concern there, but I suppose there could theoretically also be C++ 
users for this feature. @pcc, any thoughts if we should just switch from prefix 
data to a metadata node here?


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