summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Constants.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r--llvm/lib/IR/Constants.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp
index a78de6a0c84..ee0c1e1f5f6 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -521,10 +521,8 @@ bool Constant::needsRelocation() const {
return false;
// Relative pointers do not need to be dynamically relocated.
- if (auto *LHSGV = dyn_cast<GlobalValue>(
- LHSOp0->stripPointerCastsNoFollowAliases()))
- if (auto *RHSGV = dyn_cast<GlobalValue>(
- RHSOp0->stripPointerCastsNoFollowAliases()))
+ if (auto *LHSGV = dyn_cast<GlobalValue>(LHSOp0->stripPointerCasts()))
+ if (auto *RHSGV = dyn_cast<GlobalValue>(RHSOp0->stripPointerCasts()))
if (LHSGV->isDSOLocal() && RHSGV->isDSOLocal())
return false;
}
OpenPOWER on IntegriCloud