devel/llvm18: backport llvm19 fixes
Pull in the patch from llvm1[567] and manually patch fold-logical.cpp
(there's nothing sensible to back port because the offending code was
rewritten in a commit that doesn't apply easily between 18 and 19.)
PR: 283966, 285195
Submitted by: milios@ccsys.com (fixed backport patch)