[PATCH] D122608: Fix behavior of ifuncs with 'used' extern "C" static functions

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 30 08:21:28 PDT 2022


erichkeane updated this revision to Diff 419143.
erichkeane added a comment.

Going through @tahonermann 's comments to attempt to allow multiple ifunc references, I ended up down the rabbit hole.

Turns out there are ways for there to be a ConstantExpr bitcast in the way that needs to be corrected (the 'first' one is never created this way, as the type is derived directly from the ifunc's type).  I did a significant refactor to attempt to make this as clean as possible.

Note that the diagnostics for ifuncs are still bad, but I make no attempts to fix that here.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122608/new/

https://reviews.llvm.org/D122608

Files:
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/CodeGen/CodeGenModule.h
  clang/test/CodeGenCXX/externc-ifunc-resolver.cpp
  clang/test/SemaCXX/externc-ifunc-resolver.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122608.419143.patch
Type: text/x-patch
Size: 7001 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220330/a11625bd/attachment-0001.bin>


More information about the cfe-commits mailing list