[llvm] 675d52b - [llvm-dlltool] [test] Add a testcase for all machine option types. NFC.

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 17 03:02:52 PDT 2021


Author: Martin Storsjö
Date: 2021-06-17T13:02:35+03:00
New Revision: 675d52bc46ff7e618ffa2fb282d031e387e3a114

URL: https://github.com/llvm/llvm-project/commit/675d52bc46ff7e618ffa2fb282d031e387e3a114
DIFF: https://github.com/llvm/llvm-project/commit/675d52bc46ff7e618ffa2fb282d031e387e3a114.diff

LOG: [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

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

Modified: 
    

Removed: 
    


################################################################################
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 000000000000..6dce8255a43d
--- /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


        


More information about the llvm-commits mailing list