diff options
Diffstat (limited to 'llvm/lib/MC/MCExpr.cpp')
| -rw-r--r-- | llvm/lib/MC/MCExpr.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp index a19659174409..a877eb7938eb 100644 --- a/llvm/lib/MC/MCExpr.cpp +++ b/llvm/lib/MC/MCExpr.cpp @@ -361,6 +361,9 @@ static void attemptToFoldSymbolOffsetDifference(const MCAssembler *Asm, if (BBeforeRelax && AAfterRelax) return; } + const auto *RF = dyn_cast<MCRelaxableFragment>(F); + if (RF && RF->isLinkerRelaxable()) + return; if (&*F == FA) { // If FA and FB belong to the same subsection, the loop will find FA and // we can resolve the difference. |
