diff options
-rw-r--r-- | llvm/lib/IR/Constants.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp index 796703e7160..cc1eaed1c4b 100644 --- a/llvm/lib/IR/Constants.cpp +++ b/llvm/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<BlockAddress>(LHSOp0) && isa<BlockAddress>(LHSOp0) && + if (isa<BlockAddress>(LHSOp0) && isa<BlockAddress>(RHSOp0) && cast<BlockAddress>(LHSOp0)->getFunction() == cast<BlockAddress>(RHSOp0)->getFunction()) return false; |