[PATCH] D76114: [MC] Recalculate fragment offsets after relaxation

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 12 22:36:41 PDT 2020


MaskRay added inline comments.


================
Comment at: llvm/test/MC/X86/relax-offset.s:15
+.Lint80_keep_stack:
+# CHECK-NOT: error: Assertion `OS.tell() - Start == Layout.getSectionAddressSize(Sec)' failed
----------------
NOT pattern should be carefully used. Without a positive check with the same diagnostic, a negative check can easily get stale and don't check anything.

For this case (a regression test), an error will cause `llvm-mc` to return 1 instead of 0,

`llvm-mc -filetype=obj -triple=i386 %s -o /dev/null` is sufficient.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76114





More information about the llvm-commits mailing list