hazzlim wrote: > > `CGBuilder` is just aiming to provide an `Address` overload of LLVM's > > `CreateStructGEP`. It seems wrong for two overloads to have subtly > > different behavior. > > Is there a reason why LLVM's `CreateStructGEP` doesn't add `nuw` itself? > > Good point - I can see that it makes more sense to add the flag there. > > I can rework this patch to do this. Before doing so - do people think it > still makes sense to do add the flag in ‘llvm::CreateStructGEP’, given that > as @nikic points out we can infer the flag at the IR level?
@rjmccall I've reworked this patch so that the nuw flag is added in LLVM's `CreateStructGEP` directly. https://github.com/llvm/llvm-project/pull/99538 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits