[PATCH] D149584: [MC] Remove dead code, NFC

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 1 07:02:33 PDT 2023

pengfei created this revision.
pengfei added a reviewer: majnemer.
Herald added a subscriber: hiraditya.
Herald added a project: All.
pengfei requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This code was added in 408b5e660300f9, but neither the return value nor
`Res` was used in the following code.

  rG LLVM Github Monorepo



Index: llvm/lib/MC/MCCodeView.cpp
--- llvm/lib/MC/MCCodeView.cpp
+++ llvm/lib/MC/MCCodeView.cpp
@@ -649,8 +649,6 @@
       const MCSymbolRefExpr *SRE = MCSymbolRefExpr::create(RangeBegin, Ctx);
       const MCBinaryExpr *BE =
           MCBinaryExpr::createAdd(SRE, MCConstantExpr::create(Bias, Ctx), Ctx);
-      MCValue Res;
-      BE->evaluateAsRelocatable(Res, &Layout, /*Fixup=*/nullptr);
       // Each record begins with a 2-byte number indicating how large the record
       // is.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149584.518431.patch
Type: text/x-patch
Size: 560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230501/d5c90499/attachment.bin>

More information about the llvm-commits mailing list