With two outs in the second, Padres pitcher Tim Stauffer smacked Cain's 35th pitch of the game up the middle, hitting Cain near his right elbow. X-rays were negative, ruling out any chance of a fracture.
After the Giants' 2-1 win against the Padres, Cain said he'll take a wait-and-see approach when it comes to his availability for Tuesday's All-Star Game.
Manager Bruce Bochy took it another step further, saying his pitcher was "doubtful."
"It's probable," said Cain, who will attend the festivities in St. Louis even if he's unable to pitch. "I'm going to try to stay more hopeful than 'doubtful.' It'd be great to go and throw [Tuesday], but for the situation we're in here, playing ball real well, it'd be better to take that time and get it right."
Cain and the Giants' training staff will get together Sunday and re-evalauate the pitcher's status.
Cain said the line drive hit him just below his right elbow, leaving him numb. He regained feeling in the arm a half-hour after his exit.
Bochy, joined by pitching coach Dave Righetti and the team's trainer, immediately walked out to the mound and huddled with the right-hander behind the mound following the play.
The trainer massaged Cain's throwing arm and the pitcher stretched the arm out, holding a ball in his palm. His one practice pitch to catcher Eli Whiteside sailed above Whiteside's head and hit the net behind home plate.
Bochy then lifted Cain in favor of reliever Justin Miller. Cain had allowed four hits in 1 2/3 innings. He struck out two batters.
Andrew Pentis is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.