llvm-6502/test/MC/ELF/gnu-type-diagnostics.s
Saleem Abdulrasool eb5f5ae200 MC: make ELF .type handling more GNU AS compatible
GAS documents the .type directive as having an optional comma following the key
symbol name when using the STT_<TYPE_IN_UPPER_CASE> form.  However, it treats
the comma as optional in all cases.  This makes the IAS support both forms of
inputs.  Furthermore, the prefixed forms take either the upper case name or the
lower case alias.

The tests are split into two separate sets as the hash character serves as a
comment character on x86, which is tested in the second set by using arm-elf
which uses the at symbol as a comment character.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210407 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-08 00:34:34 +00:00

19 lines
516 B
ArmAsm

// RUN: not llvm-mc -triple i686-elf -filetype asm -o /dev/null %s 2>&1 | FileCheck %s
.type TYPE FUNC
// CHECK: error: unsupported attribute in '.type' directive
// CHECK: .type TYPE FUNC
// CHECK: ^
.type type stt_func
// CHECK: error: unsupported attribute in '.type' directive
// CHECK: .type type stt_func
// CHECK: ^
.type symbol 32
// CHECK: error: expected STT_<TYPE_IN_UPPER_CASE>, '#<type>', '@<type>', '%<type>' or "<type>"
// CHECK: .type symbol 32
// CHECK: ^