From 69aa934fb407997cf4a364a161fcb2bae2ad0e19 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Thu, 18 Jul 2019 21:03:37 +0000 Subject: [PATCH] Fix typo in r366494. Spotted by Yuanfang Chen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366497 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/Constants.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/IR/Constants.cpp b/lib/IR/Constants.cpp index 796703e7160..cc1eaed1c4b 100644 --- a/lib/IR/Constants.cpp +++ b/lib/IR/Constants.cpp @@ -515,7 +515,7 @@ bool Constant::needsRelocation() const { // between two of them don't when they are for labels in the same // function. This is a common idiom when creating a table for the // indirect goto extension, so we handle it efficiently here. - if (isa(LHSOp0) && isa(LHSOp0) && + if (isa(LHSOp0) && isa(RHSOp0) && cast(LHSOp0)->getFunction() == cast(RHSOp0)->getFunction()) return false; -- 2.40.0