Fix a missing check from my last commit.
authorEvan Cheng <evan.cheng@apple.com>
Sun, 31 Jan 2010 07:27:31 +0000 (07:27 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Sun, 31 Jan 2010 07:27:31 +0000 (07:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94949 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index e27d93cf7c8ce18477eeba3b84509080eb958177..e272d9b92af9ddfa96665bc757e39be139f8d636 100644 (file)
@@ -2270,7 +2270,8 @@ X86TargetLowering::IsEligibleForTailCallOptimization(SDValue Callee,
     return false;
   // If it's an indirect call, conversatively return false if the caller's
   // address is taken.
-  if (!isa<ExternalSymbolSDNode>(Callee) && CallerF->hasAddressTaken())
+  if (!CalleeF &&
+      !isa<ExternalSymbolSDNode>(Callee) && CallerF->hasAddressTaken())
     return false;
 
   // Look for obvious safe cases to perform tail call optimization.