[PATCH] D41606: [COFF] support /ignore:4217

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 31 06:32:23 PST 2017


smeenai added a comment.

In https://reviews.llvm.org/D41606#964885, @mstorsjo wrote:

> In https://reviews.llvm.org/D41606#964821, @smeenai wrote:
>
> > General question: it looks like a lot of COFF tests are written using yaml2obj, whereas ELF always uses assembly files and llvm-mc (and I've been following that pattern for the few COFF patches I've written as well). Is there an actual preference for yaml2obj tests in COFF, or is it just a historic artifact? I personally find assembly tests a lot easier to understand.
>
>
> I also agree that .s tests are easier. I remember some of the tests I've added recently where I despite that ended up using yaml2obj for features that weren't quite as easy to express in .s form.


Yup, there are definitely tests that aren't easily expressed (or aren't expressible at all) in assembly in COFF; I think ELF assembly directives are a bit richer (and clang's COFF assembly is still more expressive than MSVC's). I do think it's worthwhile to use them where they work though; for example, I believe the test in this file could be expressed as something like:

  .globl foo
  foo:
          ret
  
  .globl main
  main:
          jmp     *__imp_foo(%rip)


Repository:
  rL LLVM

https://reviews.llvm.org/D41606





More information about the llvm-commits mailing list