[clang] [llvm] [IR] Do not store Function inside BlockAddress (PR #137958)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 30 06:54:44 PDT 2025


================
@@ -920,8 +925,8 @@ class BlockAddress final : public Constant {
   /// Transparently provide more efficient getOperand methods.
   DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
 
-  Function *getFunction() const { return (Function *)Op<0>().get(); }
-  BasicBlock *getBasicBlock() const { return (BasicBlock *)Op<1>().get(); }
+  BasicBlock *getBasicBlock() const { return (BasicBlock *)Op<0>().get(); }
----------------
arsenm wrote:

`cast` or `static_cast`?

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


More information about the cfe-commits mailing list