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

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 28 12:38:16 PDT 2016


ruiu added a comment.

Last time we made a decision not to implement ASSERT, but now we have a good codebase to support arbitrary functions, it is probably time to do it. Thank you for doing this.


================
Comment at: ELF/LinkerScript.cpp:909
@@ +908,3 @@
+        error(Msg);
+      return Dot;
+    };
----------------
Is it true that ASSERT() returns the current value of "."?

================
Comment at: test/ELF/linkerscript/linkerscript-assert.s:4
@@ +3,3 @@
+
+# RUN: echo "SECTIONS { \
+# RUN:  .aaa         : { *(.aaa) } \
----------------
I don't think we need this complex test case. This can just be something like

  ASSERT(0, "fail");

and

  ASSERT(1, "success");


https://reviews.llvm.org/D22912





More information about the llvm-commits mailing list