[PATCH] D22625: [ELF] Support PROVIDE and PROVIDE_HIDDEN within SECTIONS {} block
Eugene Leviant via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 21 13:27:59 PDT 2016
evgeny777 added inline comments.
================
Comment at: ELF/LinkerScript.cpp:803-811
@@ -778,5 +802,11 @@
std::vector<StringRef> ScriptParser::readSectionsCommandExpr() {
+ int Braces = 0;
std::vector<StringRef> Expr;
while (!Error) {
- StringRef Tok = next();
+ StringRef Tok = peek();
+ Braces += (Tok == "(");
+ Braces -= (Tok == ")");
+ if (Braces < 0)
+ break;
+ next();
if (Tok == ";")
----------------
ruiu wrote:
> Can you remove it?
What exactly? The "if (Tok == ";")" ? If so, how will we handle normal symbol assignments then? Like **"mysym = 0;"**
Repository:
rL LLVM
https://reviews.llvm.org/D22625
More information about the llvm-commits
mailing list