[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:47:46 PDT 2025
================
@@ -912,6 +912,11 @@ class BlockAddress final : public Constant {
/// block must be embedded into a function.
static BlockAddress *get(BasicBlock *BB);
+ /// Return a BlockAddress for the specified basic block, which may not be
+ /// part of a function. The specified type must match the type of the function
+ /// the block will be inserted into.
+ static BlockAddress *get(Type *Ty, BasicBlock *BB);
----------------
arsenm wrote:
I think block address should be explicitly disallowed for unparented blocks
https://github.com/llvm/llvm-project/pull/137958
More information about the cfe-commits
mailing list