Just wondering what would be the rights of somebody to stay in the UK if there will still under immigration control but had a british child.

For example if the marriage broke down would they be entitled to stay and how probable would this be?