]> granicus.if.org Git - llvm/commitdiff
simplify COFF module assembly test and move it to Object
authorBob Haarman <llvm@inglorion.net>
Fri, 25 Jan 2019 00:33:05 +0000 (00:33 +0000)
committerBob Haarman <llvm@inglorion.net>
Fri, 25 Jan 2019 00:33:05 +0000 (00:33 +0000)
Reviewers: pcc, rnk

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D57192

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352142 91177308-0d34-0410-b5e6-96231b3b80d8

test/MC/COFF/module-asm-coff.ll [deleted file]
test/Object/X86/coff-asm.ll [new file with mode: 0644]

diff --git a/test/MC/COFF/module-asm-coff.ll b/test/MC/COFF/module-asm-coff.ll
deleted file mode 100644 (file)
index 38e1080..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-; Tests COFF-specific directives in module level assembly.
-
-; RUN: llc -filetype=obj %s -o %t.obj
-; RUN: llvm-readobj -t %t.obj | FileCheck %s
-; RUN: opt -thinlto-bc %s -o %t.thinlto.bc
-; RUN: llvm-lto2 run %t.thinlto.bc -o %t.thinlto.obj -r=%t.thinlto.bc,foo,plx
-; RUN: llvm-readobj -t %t.thinlto.obj.1 | FileCheck %s
-
-target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-pc-windows-msvc19.0.24210"
-
-module asm ".text"
-module asm ".def foo; .scl 3; .type 32; .endef"
-module asm ".global foo"
-module asm "foo:"
-module asm "  ret"
-
-; CHECK: Symbol {
-; CHECK:   Name: foo
-; CHECK:   StorageClass:
-; CHECK-SAME: Static (0x3)
diff --git a/test/Object/X86/coff-asm.ll b/test/Object/X86/coff-asm.ll
new file mode 100644 (file)
index 0000000..e6e4bc1
--- /dev/null
@@ -0,0 +1,13 @@
+; Check that llvm-nm doesn't crash on COFF-specific assembly directives
+; (PR36789).
+
+; RUN: llvm-as %s -o %t.bc
+; RUN: llvm-nm %t.bc
+
+target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-pc-windows-msvc19.0.24210"
+
+module asm ".text"
+module asm ".def foo; .scl 2; .type 32; .endef"
+module asm "foo:"
+module asm "  ret"