[PATCH] D22625: [ELF] Support PROVIDE and PROVIDE_HIDDEN within SECTIONS {} block
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 21 15:04:25 PDT 2016
ruiu 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 == ";")
----------------
evgeny777 wrote:
> ruiu wrote:
> > Can you remove it?
> What exactly? The "if (Tok == ";")" ? If so, how will we handle normal symbol assignments then? Like **"mysym = 0;"**
I meant the new code you added to this function in this patch.
Repository:
rL LLVM
https://reviews.llvm.org/D22625
More information about the llvm-commits
mailing list