diff options
author | Fangrui Song <i@maskray.me> | 2024-07-01 16:45:57 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2024-07-01 16:45:57 -0700 |
commit | bd3215149aa16428666e520ddc94a638e1178437 (patch) | |
tree | 0ad0ac080ed5fef794aee1eafabbbc1446bc7068 /llvm/lib/MC/MCCodeView.cpp | |
parent | cbd3f252e3ff2115497c771590f69f1c989b402e (diff) | |
download | llvm-bd3215149aa16428666e520ddc94a638e1178437.zip llvm-bd3215149aa16428666e520ddc94a638e1178437.tar.gz llvm-bd3215149aa16428666e520ddc94a638e1178437.tar.bz2 |
MCExpr::evaluateKnownAbsolute: replace the MCAsmLayout parameter with MCAssembler
and add a comment.
Diffstat (limited to 'llvm/lib/MC/MCCodeView.cpp')
-rw-r--r-- | llvm/lib/MC/MCCodeView.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCCodeView.cpp b/llvm/lib/MC/MCCodeView.cpp index 89b28b4..a47a07b 100644 --- a/llvm/lib/MC/MCCodeView.cpp +++ b/llvm/lib/MC/MCCodeView.cpp @@ -474,7 +474,8 @@ static unsigned computeLabelDiff(MCAsmLayout &Layout, const MCSymbol *Begin, const MCExpr *AddrDelta = MCBinaryExpr::create(MCBinaryExpr::Sub, EndRef, BeginRef, Ctx); int64_t Result; - bool Success = AddrDelta->evaluateKnownAbsolute(Result, Layout); + bool Success = + AddrDelta->evaluateKnownAbsolute(Result, Layout.getAssembler()); assert(Success && "failed to evaluate label difference as absolute"); (void)Success; assert(Result >= 0 && "negative label difference requested"); |