[llvm] [CFI][annotation] Leave alone function pointers in function annotations (PR #80173)

via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 09:44:16 PST 2024


================
@@ -1392,6 +1402,10 @@ void LowerTypeTestsModule::replaceWeakDeclarationWithJumpTablePtr(
   // Don't use range based loop, because use list will be modified.
   while (!PlaceholderFn->use_empty()) {
     Use &U = *PlaceholderFn->use_begin();
+    if (isFunctionAnnotation(U.getUser())) {
+      U.set(F);
+      continue;
+    }
----------------
yozhu wrote:

Right, this is not needed.  I was originally only considering the function declaration case, and later added code in replaceCfiUses() to cover function definition case.

https://github.com/llvm/llvm-project/pull/80173


More information about the llvm-commits mailing list