The sun won't (potentially) swallow up the Earth for about 8 billion more years. The carbon cycle on this planet will have ended about 7 billion years before then; the increased output of the sun will have boiled away the oceans; plate tectonics will stop, etc. There won't be anything alive on this planet left to see the sun burn out.