To design out-of-plane loaded masonry cladding panels, as well as modern non-loadbearing masonry panels, the yield-line method has become widely used by engineers, and features in various design codes. However, the traditional hand-based yield-line analysis method can be challenging to apply to complex or irregular shapes, since the form of the critical yield-line pattern will generally not be known in advance. The discontinuity layout optimization (DLO) procedure, previously applied to reinforced concrete slabs, is here extended to treat masonry wall panels, with (i) the flexural moment capacity modified to take account of vertical dead loads from above; and (ii) shear failure also modelled, if critical (e.g., at damp proof course level). A key benefit of DLO is that the critical yield-line pattern can be identified automatically, with a rigorous linear programming-based formulation employed to ensure that a globally optimal solution is obtained for any given numerical discretization. Given the power of modern desktop PCs, this effectively eliminates the possibility of the critical yield-line failure mechanism being missed, allowing the presented method to be applied with confidence to both regular and complex-shaped masonry panels. A range of examples are used to demonstrate the efficacy of the approach, with solutions compared with those from analytical models and experimental tests.