[clang] [llvm] [IR] Do not store Function inside BlockAddress (PR #137958)
Yingwei Zheng via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 30 06:25:02 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);
----------------
dtcxzyw wrote:
Should we also add a corresponding helper for SandboxIR? It is the only way to create a blockaddress if it has not been inserted.
https://github.com/llvm/llvm-project/pull/137958
More information about the cfe-commits
mailing list