================ @@ -1460,56 +1184,29 @@ static Value *getAISize(LLVMContext &Context, Value *Amt) { return Amt; } -static Align computeAllocaDefaultAlign(Type *Ty, BasicBlock *BB) { - assert(BB && "Insertion BB cannot be null when alignment not provided!"); +static Align computeAllocaDefaultAlign(Type *Ty, InsertPosition Pos) { + assert(Pos.IsValid() && + "Insertion position cannot be null when alignment not provided!"); + BasicBlock *BB = ((BasicBlock::iterator)Pos).getNodeParent(); ---------------- nikic wrote:
Maybe add a getParent() method on InsertPosition? https://github.com/llvm/llvm-project/pull/94226 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits