[lld] r336199 - [ELF] - Add a comment. NFC.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 3 07:16:19 PDT 2018


Author: grimar
Date: Tue Jul  3 07:16:19 2018
New Revision: 336199

URL: http://llvm.org/viewvc/llvm-project?rev=336199&view=rev
Log:
[ELF] - Add a comment. NFC.

Minor follow up for r336197
"[ELF] - Add support for '||' and '&&' in linker scripts."

Modified:
    lld/trunk/ELF/ScriptLexer.cpp

Modified: lld/trunk/ELF/ScriptLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/ScriptLexer.cpp?rev=336199&r1=336198&r2=336199&view=diff
==============================================================================
--- lld/trunk/ELF/ScriptLexer.cpp (original)
+++ lld/trunk/ELF/ScriptLexer.cpp Tue Jul  3 07:16:19 2018
@@ -116,6 +116,7 @@ void ScriptLexer::tokenize(MemoryBufferR
     }
 
     // ">foo" is parsed to ">" and "foo", but ">>" is parsed to ">>".
+    // "|", "||", "&" and "&&" are different operators.
     if (S.startswith("<<") || S.startswith("<=") || S.startswith(">>") ||
         S.startswith(">=") || S.startswith("||") || S.startswith("&&")) {
       Vec.push_back(S.substr(0, 2));




More information about the llvm-commits mailing list