summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/LowerInvoke.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-01-05 13:12:22 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-01-05 13:12:22 +0000
commitf012705c7e4ca8cf90b6b734ce1d5355daca5ba5 (patch)
treed1bcdd1cfc5ddc28894a9b9d6cbb2875d922e437 /lib/Transforms/Utils/LowerInvoke.cpp
parent804272c8d6fd960c47c8cbc1603aba3fe5a65ea8 (diff)
downloadllvm-f012705c7e4ca8cf90b6b734ce1d5355daca5ba5.tar.gz
llvm-f012705c7e4ca8cf90b6b734ce1d5355daca5ba5.tar.bz2
llvm-f012705c7e4ca8cf90b6b734ce1d5355daca5ba5.tar.xz
Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerInvoke.cpp')
-rw-r--r--lib/Transforms/Utils/LowerInvoke.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp
index 6e6e8d2287..766c4d99a8 100644
--- a/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/lib/Transforms/Utils/LowerInvoke.cpp
@@ -255,7 +255,7 @@ bool LowerInvoke::insertCheapEHSupport(Function &F) {
// Insert a return instruction. This really should be a "barrier", as it
// is unreachable.
ReturnInst::Create(F.getContext(),
- F.getReturnType() == Type::getVoidTy(F.getContext()) ?
+ F.getReturnType()->isVoidTy() ?
0 : Constant::getNullValue(F.getReturnType()), UI);
// Remove the unwind instruction now.