Revert r354244 "[DAGCombiner] Eliminate dead stores to stack."
[llvm-complete.git] / test / MC / AsmParser / macro-qualifier-diagnostics.s
blob4ebad2b69e48e4e13c00adae47328a433bf7e445
1 # RUN: not llvm-mc -triple i386 -o /dev/null %s 2>&1 | FileCheck %s
3 .macro missing_qualifier parameter:
5 # CHECK: error: missing parameter qualifier for 'parameter' in macro 'missing_qualifier'
6 # CHECK: .macro missing_qualifier parameter:
7 # CHECK: ^
9 .macro non_identifier_qualifier parameter:0
11 # CHECK: error: missing parameter qualifier for 'parameter' in macro 'non_identifier_qualifier'
12 # CHECK: .macro non_identifier_qualifier parameter:0
13 # CHECK: ^
15 .macro invalid_qualifier parameter:invalid_qualifier
17 # CHECK: error: invalid_qualifier is not a valid parameter qualifier for 'parameter' in macro 'invalid_qualifier'
18 # CHECK: .macro invalid_qualifier parameter:invalid_qualifier
19 # CHECK: ^
21 .macro pointless_default parameter:req=default
22 .endm
24 # CHECK: warning: pointless default value for required parameter 'parameter' in macro 'pointless_default'
25 # CHECK: .macro pointless_default parameter:req=default
26 # CHECK: ^
28 .macro missing_required_parameter parameter:req
29 .endm
31 missing_required_parameter
33 # CHECK: error: missing value for required parameter 'parameter' in macro 'missing_required_parameter'
34 # CHECK: missing_required_parameter
35 # CHECK: ^
37 .macro missing_second_required_argument first=0 second:req
38 .endm
40 missing_second_required_argument
42 # CHECK: error: missing value for required parameter 'second' in macro 'missing_second_required_argument'
43 # CHECK: missing_second_required_argument
44 # CHECK: ^
46 .macro second_third_required first=0 second:req third:req
47 .endm
49 second_third_required 0
51 # CHECK: error: missing value for required parameter 'second' in macro 'second_third_required'
52 # CHECK: second_third_required 0
53 # CHECK: ^
55 # CHECK: error: missing value for required parameter 'third' in macro 'second_third_required'
56 # CHECK: second_third_required 0
57 # CHECK: ^
59 second_third_required third=3 first=1
61 # CHECK: error: missing value for required parameter 'second' in macro 'second_third_required'
62 # CHECK: second_third_required third=3 first=1
63 # CHECK: ^