[PATCH] D22912: [ELF] - Linkerscript: implemented ASSERT() keyword.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 10:38:59 PDT 2016


ruiu added a comment.

Almost looking good, but looks like there is a bug.


================
Comment at: ELF/LinkerScript.cpp:675-676
@@ -665,1 +674,4 @@
   while (!Error && !skip("}")) {
+    if (peek() == "ASSERT") {
+      Opt.Commands.emplace_back(new AssertCommand(readExpr()));
+      continue;
----------------
Is this correct? I mean, you didn't consume the token "ASSERT", so readExpr() will read "ASSERT" as an expression, no?


https://reviews.llvm.org/D22912





More information about the llvm-commits mailing list