================
@@ -1567,68 +1242,33 @@ void LoadInst::AssertOK() {
"Ptr must have pointer type.");
}
-static Align computeLoadStoreDefaultAlign(Type *Ty, BasicBlock *BB) {
- assert(BB && "Insertion BB cannot be null when alignment not provided!");
+static Align computeLoadStoreDefaultAlign(Type *Ty, InsertPosition Pos) {
+ assert(Pos.isValid() &&
+ "Insertion position cannot be null when alignment not provided!");
+ BasicBlock *BB = ((BasicBlock::iterator)Pos).getNodeParent();
----------------
nikic wrote:
```suggestion
BasicBlock *BB = Pos.getBasicBlock();
```
https://github.com/llvm/llvm-project/pull/94226
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits