[lld] [LLD] Improve linker script handing in LLD (PR #106334)

Daniel Thornburgh via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 28 11:13:47 PDT 2024


================
@@ -131,6 +131,156 @@ uint64_t ExprValue::getSectionOffset() const {
   return getValue() - getSecAddr();
 }
 
+std::function<ExprValue()> ScriptExpr::getExpr() const {
----------------
mysterymath wrote:

This isn't used, and wherever it's needed, `expr->getExpr()` can be written as `[expr]() { return expr->getExprValue(); }`. Accordingly, this pulls very little weight as an abstraction, and it can be removed. Same for `getConstantExpr()`.

https://github.com/llvm/llvm-project/pull/106334


More information about the llvm-commits mailing list