[lld] [LLD] Fix crash on parsing ':ALIGN' in linker script (PR #146723)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 2 13:02:32 PDT 2025
================
@@ -1229,6 +1229,9 @@ SymbolAssignment *ScriptParser::readSymbolAssignment(StringRef name) {
// This is an operator-precedence parser to parse a linker
// script expression.
Expr ScriptParser::readExpr() {
+ // Do not try to read expression if an error has already been encountered.
+ if (atEOF())
----------------
parth-07 wrote:
> I've got a small suggestion that means we don't need the comment.
I agree that the comment was a little redundant. I have removed the comment.
https://github.com/llvm/llvm-project/pull/146723
More information about the llvm-commits
mailing list