commit | 661a390b830fcdea13ed9daeaf4e6dbd1adcdca6 | [log] [tgz] |
---|---|---|
author | Cameron Zwarich <zwarich@apple.com> | Thu Mar 24 04:51:51 2011 +0000 |
committer | Cameron Zwarich <zwarich@apple.com> | Thu Mar 24 04:51:51 2011 +0000 |
tree | 7671f6e19f3be071ea8583771f54c7dcd7c34f42 | |
parent | e4000595fbaf018ce2922294dfb9a1c28532dab0 [diff] [blame] |
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
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index da29eb1..604e791 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -589,6 +589,9 @@ /// ret i32 %tmp2 /// bool CodeGenPrepare::DupRetToEnableTailCallOpts(ReturnInst *RI) { + if (!TLI) + return false; + Value *V = RI->getReturnValue(); if (!V) return false;