[PATCH] D92612: [MC] Consume EndOfStatement in .cfi_{sections,endproc}

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 3 18:43:14 PST 2020


MaskRay added a comment.

> Previously these directives were always interpreted as having an extra blank line after them.

EndOfStatement was not consumed and the next `AsmParser::parseStatement` would consume EndOfStatement and add a blank line.



================
Comment at: llvm/test/MC/AsmParser/directive-parse-err.s:1
+// RUN: not llvm-mc -triple i386-unknown-unknown %s 2>&1 | FileCheck %s
+// RUN: not llvm-mc -triple i386-unknown-unknown %s 2>&1 | grep "error:" | count 6
----------------
Please merge this into a `.cfi_*` parsing test. You can leverage `-defsym ERR=1` to check errors. See `MC/ELF/reloc-directive.s` for an example


================
Comment at: llvm/test/MC/AsmParser/directive-parse-err.s:6
+
+// CHECK: [[@LINE+1]]:15: error: Expected an identifier
+.cfi_sections $
----------------
`[[@LINE+1]]` is deprecated. Use `[[#@LINE+1]]`


================
Comment at: llvm/test/MC/AsmParser/round-trip.s:16
+.cfi_endproc
+.cfi_startproc
+.cfi_endproc
----------------
One pair .cfi_startproc of should be sufficient.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92612



More information about the llvm-commits mailing list