From 675d52bc46ff7e618ffa2fb282d031e387e3a114 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Storsj=C3=B6?= Date: Mon, 14 Jun 2021 13:28:33 +0300 Subject: [PATCH] [llvm-dlltool] [test] Add a testcase for all machine option types. NFC. 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. Differential Revision: https://reviews.llvm.org/D104215 --- llvm/test/tools/llvm-dlltool/machine-opt.def | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 llvm/test/tools/llvm-dlltool/machine-opt.def diff --git a/llvm/test/tools/llvm-dlltool/machine-opt.def b/llvm/test/tools/llvm-dlltool/machine-opt.def new file mode 100644 index 0000000..6dce825 --- /dev/null +++ b/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 -- 2.7.4