]> granicus.if.org Git - llvm/commitdiff
Fix typo in r366494. Spotted by Yuanfang Chen.
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 18 Jul 2019 21:03:37 +0000 (21:03 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 18 Jul 2019 21:03:37 +0000 (21:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366497 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/Constants.cpp

index 796703e716003cfc9f431b4d215345b2eb157782..cc1eaed1c4bb4138621c4e9ff2c8a0fb55c2661d 100644 (file)
@@ -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<BlockAddress>(LHSOp0) && isa<BlockAddress>(LHSOp0) &&
+        if (isa<BlockAddress>(LHSOp0) && isa<BlockAddress>(RHSOp0) &&
             cast<BlockAddress>(LHSOp0)->getFunction() ==
                 cast<BlockAddress>(RHSOp0)->getFunction())
           return false;