[PATCH] D97982: [MC] Introduce NeverAlign fragment type

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 4 12:39:02 PDT 2021


MaskRay added inline comments.


================
Comment at: llvm/include/llvm/MC/MCObjectStreamer.h:142
                          unsigned MaxBytesToEmit = 0) override;
+  void emitNeverAlignCodeAtEnd(unsigned ByteAlignment) override;
   void emitValueToOffset(const MCExpr *Offset, unsigned char Value,
----------------
Why "AtEnd"?


================
Comment at: llvm/test/MC/X86/x86_64-directive-avoid_end_align_errors.s:1
+# RUN: not llvm-mc -triple x86_64-unknown-unknown %s 2> %t.err
+# RUN: FileCheck < %t.err %s
----------------
You can use `.ifdef ERR` to place negative tests into the main test file.


================
Comment at: llvm/test/MC/X86/x86_64-directive-avoid_end_align_errors.s:5
+.avoid_end_align
+# CHECK: unknown token in expression
+.avoid_end_align x
----------------
See `[[#@LINE+1]]` in existing tests how to attach line/column information properly.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97982/new/

https://reviews.llvm.org/D97982



More information about the llvm-commits mailing list