[PATCH] D74687: [LLD][ELF] - Linker script: do not fail parsing when "/DISCARD/" follows the fill expression.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 03:51:20 PST 2020


grimar added a comment.

In D74687#1893064 <https://reviews.llvm.org/D74687#1893064>, @psmith wrote:

> Would it make sense to make /DISCARD/ its own token recognised by the Lexer? I believe that is what BFD does. It would prevent it from being recognised as "/" "DISCARD" "/". Apologies if this is not appropriate, I'm not too familiar with this part of the code.


It is what my patch does :) "/DISCARD/" is a single token initially, but during parsing of the FILL expression,
we call `tokenizeExpr` to return "3", "*" and "5" tokens for "3*5", for example.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74687/new/

https://reviews.llvm.org/D74687





More information about the llvm-commits mailing list