Check for TLI so that -codegenprepare can be used from opt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128194 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Cameron Zwarich 2011-03-24 04:51:51 +00:00
parent e4000595fb
commit 661a390b83

View File

@ -589,6 +589,9 @@ bool CodeGenPrepare::OptimizeCallInst(CallInst *CI) {
/// ret i32 %tmp2
///
bool CodeGenPrepare::DupRetToEnableTailCallOpts(ReturnInst *RI) {
if (!TLI)
return false;
Value *V = RI->getReturnValue();
if (!V)
return false;