[clang] [PAC] Implement function pointer re-signing (PR #98847)

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 16 16:37:47 PDT 2024


================
@@ -2373,7 +2373,9 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
       DestLV.setTBAAInfo(TBAAAccessInfo::getMayAliasInfo());
       return EmitLoadOfLValue(DestLV, CE->getExprLoc());
     }
-    return Builder.CreateBitCast(Src, DstTy);
+
+    llvm::Value *Result = Builder.CreateBitCast(Src, DstTy);
----------------
ahatanak wrote:

Yes, a couple of tests including `test_cast_from_opaque` test this path.

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


More information about the cfe-commits mailing list