How to differentiate between external and internal calls in llc?

I have a MachineFunctionPass plugged into llc during LLVMTargetMachine::addPreRegAlloc. In this Pass I need to extend calls (i. e. CALL32m, CALL32r) iff they call function within the program.

CALL32m has, I think, ten different possibilities for the four operands giving the target address. At the moment I have excluded calls that give the displacement as GlobalAddress or JumpTableIndex (although I am not sure whether this is actually right or whether I exclude to many calls this way).

But there appear to be CALL32r instructions that also call locations outside the program.
Is there any way to determine the location of the call target more precisely? I tried

for (MachineBasicBlock::succ_iterator SI = BB->succ_begin(), SE = BB->succ_end(); SI != SE; ++SI) {
	MachineBasicBlock *SBB = *SI;
	if (SBB->getParent()->getFunction()->isDeclaration())
		skip = true;

but it seems not to do what I intended.