From 1d2bf885dd9f3175a5a2f6c4389eb5acbc180182 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Mon, 6 Nov 2006 18:47:14 +0000 Subject: [PATCH] Fix a small bug noticed on code review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31476 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/PatternMatch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/Support/PatternMatch.h b/include/llvm/Support/PatternMatch.h index bee416a24e7..2d498a35616 100644 --- a/include/llvm/Support/PatternMatch.h +++ b/include/llvm/Support/PatternMatch.h @@ -310,7 +310,7 @@ struct cast_match { return Op.match(I->getOperand(0)); } else if (ConstantExpr *CE = dyn_cast(V)) { if (CE->getOpcode() == Instruction::Cast) { - if (DestTy) *DestTy = I->getType(); + if (DestTy) *DestTy = CE->getType(); return Op.match(CE->getOperand(0)); } }