llvm/test/MC/AsmParser/macro-qualifier.s
Saleem Abdulrasool 156f2a1f5d MCAsmParser: support required parameters
This enhances the macro parser to parse and handle parameter qualifications,
which is needed to support required formal parameters in macro definitions.  A
required parameter may not be defaulted (though providing a default value is
accepted with a warning).  This improves GAS compatibility.

Partially addresses PR9248.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201630 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19 03:00:29 +00:00

17 lines
243 B
ArmAsm

# RUN: llvm-mc -triple i386 -o - %s | FileCheck %s
.macro required parameter:req
.long \parameter
.endm
required 0
# CHECK: .long 0
.macro required_with_default parameter:req=0
.long \parameter
.endm
required 1
# CHECK: .long 1