Jeremiah Chapter 1, verse 5. Before I formed you in the womb, "I knew you".
Children born out of wedlock throughout history, have been called some pretty nasty things, and have been referred to as "illegitimate". I would contend that, given God's view of innocent babies throughout history, that man's disgust toward children born out of wedlock is, misdirected toward the victim, rather than the perpetrator. Given God's view, and my own personal belief that God is truly incapable of being wrong, that it is the parents that are illegitimate, and at fault "IN GOD'S EYES, so therefore in mine also.
But still, the child ends up as usual, by paying for the indiscretions of the parents. Many times they pay, with their lives.