This paper proposes a novel topology optimization procedure for designing structures with infill-supported enclosed voids for additive manufacturing (AM). In such structures, the open and enclosed regions are separately treated, where the open regions are the standard voids but the enclosed ones are filled by porous materials. The applied porous infill can work as supports in the AM process, but at the same time be part of the final structures and will never be removed. In this way, the difficulty of removing the supports in enclosed voids can be naturally avoided. However, whether the enclosed voids should be removed or kept if the porous material must be filled inside becomes a challenging problem, and thus this work develops a rational procedure to automatically determine it, and optimize the layout of these kept enclosed voids with infill. In the proposed procedure, a nonlinear virtual temperature (N-VTM) filter is utilized to separate the enclosed voids and open regions. Then, by combining the N-VTM filter, PDE filter and projection, a novel interpolation for structures with infill-supported enclosed voids is proposed, which at the same time can be used to provide structures without enclosed voids. The robust topology optimization formulation is applied to enhance the performance of the proposed procedure, and the sensitivity equations are deduced based on the adjoint method. Several numerical and experimental examples in two and three dimensions illustrate the effectiveness of the procedure. The results show that the procedure is capable of automatically determining whether to directly eliminate an enclosed void or to use infill to support it.