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

Hongyu Chen via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 22:34:06 PDT 2024


================
@@ -131,6 +131,156 @@ uint64_t ExprValue::getSectionOffset() const {
   return getValue() - getSecAddr();
 }
 
+std::function<ExprValue()> ScriptExpr::getExpr() const {
+  switch (kind_) {
+  case ExprKind::Constant:
+    return static_cast<const ConstantExpr *>(this)->getConstantExpr();
+  case ExprKind::Dynamic: {
----------------
yugier wrote:

I changed the name to `FallbackExpr` but we can always change it if we have a better one.

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


More information about the llvm-commits mailing list