We consider the design of a Dual-Function Radar-Communication (DFRC) system, aided by an Intelligent Reflecting Surface (IRS). The radar precoding matrix and the IRS parameters are designed to maximize the weighted sum of the signal-to-noise ratio (SNR) at the radar receiver and the signal to interference and noise ratio (SINR) at the communication receivers subject to power constraints, beampattern error constraint, and constant modulus constraints on the IRS parameters. The key challenge in this maximization problem arises due to the doubly reflected echo, which makes the SNR a non-convex quartic function of the IRS parameters. The problem is decoupled into two sub-problems, namely, waveform design and IRS parameter design, and is solved via alternating optimization. The former sub-problem is solved via semi-definite programming. The latter sub-problem, encompassing a non-convex quartic polynomial and unit modulus IRS parameter constraints, is solved via Riemannian manifold optimization (RMO). Unlike prior methods, our approach does not involve bounds or a surrogate function construction, but rather optimizes directly the original objective, thus providing more accurate evaluation of the system performance metrics. Design insights are drawn, related to the choice of IRS size, IRS location, and comparison among paths with single or double IRS reflections.INDEX TERMS DFRC, IRS, alternating optimization, Riemannian manifold optimization (RMO)