Potential is defined as the negative of the work done in moving unit charge at zero acceleration from reference to that point in field where the potential is being calculated. So dl represents a differential movement from reference (here infinity) towards r' (assumed straight line path, else tangential to path towards r'). On the other hand, since r' is being measured from origin so its differential dr' is directed in the incresing direction of r'--from r' towards reference point(infinity). Hence, if the path connecting the two points between which the test charge is being moved is a straight line, the differentials only differ in sign so that dr'=-dl.
Hence
$$V
=-\int_\mathbf{reference}^\mathbf{target}\mathbf{E(r').}\,\mathbf{dl}
$$
At this point instead of proceeding as
$$
\begin{align}
V
&=-\int_\mathbf{\infty}^\mathbf{r}\mathbf{E(r').}\,\mathbf{dl}\\
&=-\int_\mathbf{-\infty}^\mathbf{-r}\mathbf{E(r').}\,(-\mathbf{dr'})\\
&=\int_{-\infty}^{-r}\frac{1}{4 \pi \epsilon_0} \frac{q}{r'^2} \,dr'\\
&=\frac{1}{4 \pi \epsilon_0} \frac{q}{r} \\
\end{align}
$$
most books follow (as @Bio suggests)
$$
\begin{align}
V
&=+\int_\mathbf{target}^\mathbf{reference}\mathbf{E(r').}\,\mathbf{dr'}\\
&=\int_\mathbf{r}^\mathbf{\infty}\mathbf{E(r').}\,\mathbf{dr'}\\
&=\int_r^\infty\frac{1}{4 \pi \epsilon_0} \frac{q}{r'^2} \,dr\\
&=\frac{1}{4 \pi \epsilon_0} \frac{q}{r} \\
\end{align}
$$
This is imho, probably because in the former way there is an implicit substitution changing l to r' but without the proper use of limits(as in $lim_{}$), the negation in limits(as in $\int_a^b\,$) cannot be explained.
$$
\\
\\
\\
$$
This becomes clearer when one considers doing the integral this way--
$$
V=
-\int_\mathbf{reference}^\mathbf{target}\mathbf{E(l).}\,\mathbf{dl}
$$
Since there exists dl so must l. Hence it should be possible to do the RHS without converting to r' coords. Doing this is a bit tricky as the limits would be
$$
\begin{align}
\mathbf{reference}&=\mathbf{0}\\
\mathbf{target}&=\lim_{h\to \infty}(h-r)\mathbf{\hat{l}}\\
\end{align}
$$
while
$$
\mathbf{E(l)}=\lim_{h\to \infty}\frac{-1}{4\pi\epsilon_{0}}\frac{q\mathbf{\hat{l}}}{(h-l)^2}
$$
Then
$$
\begin{align}
V&=-\int_\mathbf{reference}^\mathbf{target}\mathbf{E(l).}\,\mathbf{dl}\\
&=-
\lim_{h\to \infty}
\int_
0^{h-r}
\lim_{h'\to h}
\frac{-1}{4\pi\epsilon_{0}}\frac{q\mathbf{\hat{l}.dl}}{(h'-l)^2}
\,\\
&=\frac{q}{4\pi\epsilon_{0}}\lim_{h\to \infty}\lim_{h'\to h}(\frac{1}{0-h'}+\frac{1}{h'-(h-r)})\\
&=\frac{1}{4 \pi \epsilon_0} \frac{q}{r}
\end{align}
$$
The integration performed in line 3 above is obtained from Mathematica as
$$
\int_a^b \frac{1}{(A-x)^2} \, dx=\frac{1}{a-A}+\frac
{1}{A-b}, \quad\quad\quad(a\geq A\lor A\geq b)\land a<b
$$