There are no illegitimate children, there are only illegitimate parents.
How can a child be illegitimate? And who are the illegitimate parents? - not necessarily those who are not married. Any child who is not born of love makes the parents illegitimate. Whether they are married or not is irrelevant - but the child certainly is never illegitimate.