[PATCH] D104215: [llvm-dlltool] [test] Add a testcase for all machine option types. NFC.

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 14 03:41:44 PDT 2021


mstorsjo created this revision.
mstorsjo added reviewers: rnk, mati865.
Herald added subscribers: ormris, steven_wu, hiraditya, kristof.beyls, inglorion.
mstorsjo requested review of this revision.
Herald added a project: LLVM.

The existing tests only test that some options (but not e.g. arm)
are accepted, but it doesn't test their functional effect of
affecting the generated object files.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104215

Files:
  llvm/test/tools/llvm-dlltool/machine-opt.def


Index: llvm/test/tools/llvm-dlltool/machine-opt.def
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-dlltool/machine-opt.def
@@ -0,0 +1,17 @@
+; RUN: llvm-dlltool -m i386 -d %s -l %t.a
+; RUN: llvm-readobj %t.a | FileCheck --check-prefix=I386 %s
+; RUN: llvm-dlltool -m i386:x86-64 -d %s -l %t.a
+; RUN: llvm-readobj %t.a | FileCheck --check-prefix=X86_64 %s
+; RUN: llvm-dlltool -m arm -d %s -l %t.a
+; RUN: llvm-readobj %t.a | FileCheck --check-prefix=ARM %s
+; RUN: llvm-dlltool -m arm64 -d %s -l %t.a
+; RUN: llvm-readobj %t.a | FileCheck --check-prefix=ARM64 %s
+
+LIBRARY test.dll
+EXPORTS
+TestFunction
+
+; I386: Format: COFF-i386
+; X86_64: Format: COFF-x86-64
+; ARM: Format: COFF-ARM{{$}}
+; ARM64: Format: COFF-ARM64


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104215.351818.patch
Type: text/x-patch
Size: 787 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210614/a57941e0/attachment.bin>


More information about the llvm-commits mailing list