[llvm] [SandboxIR][NFC] Fixes for LoadInst::create functions (PR #100955)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 28 21:46:51 PDT 2024


================
@@ -612,7 +612,19 @@ void BranchInst::dump() const {
 
 LoadInst *LoadInst::create(Type *Ty, Value *Ptr, MaybeAlign Align,
                            Instruction *InsertBefore, Context &Ctx,
-                           bool IsVolatile, const Twine &Name) {
+                           const Twine &Name) {
+  llvm::Instruction *BeforeIR = InsertBefore->getTopmostLLVMInstruction();
----------------
vporpo wrote:

No need to re-implement the function. Just `return create(Ty, Ptr, Align, InsertBefore, /*IsVolatile=*/false, Ctx, Name);`

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


More information about the llvm-commits mailing list