Home | History | Annotate | Download | only in AsmParser
      1 // RUN: llvm-mc -triple x86_64-unknown-unknown -asm-macro-max-nesting-depth=42 %s | FileCheck %s -check-prefix=CHECK_PASS
      2 // RUN: not llvm-mc -triple x86_64-unknown-unknown %s 2> %t
      3 // RUN: FileCheck -check-prefix=CHECK_FAIL < %t %s
      4 
      5 .macro rec head, tail:vararg
      6  .ifnb \tail
      7  rec \tail
      8  .else
      9  .long 42
     10  .endif
     11 .endm
     12 
     13 .macro amplify macro, args:vararg
     14  \macro  \args \args \args \args
     15 .endm
     16 
     17 amplify rec 0 0 0 0 0 0 0 0 0 0
     18 
     19 // CHECK_PASS: .long 42
     20 // CHECK_FAIL: error: macros cannot be nested more than {{[0-9]+}} levels deep. Use -asm-macro-max-nesting-depth to increase this limit.
     21