[llvm] [MC] Increase asm-macro-max-nesting-depth default to 100 (PR #218455)
Matt Turner via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 7 10:56:51 PDT 2026
================
@@ -1,20 +1,25 @@
-// RUN: llvm-mc -triple x86_64-unknown-unknown -asm-macro-max-nesting-depth=42 %s | FileCheck %s -check-prefix=CHECK_PASS
-// RUN: not llvm-mc -triple x86_64-unknown-unknown %s 2> %t
-// RUN: FileCheck -check-prefix=CHECK_FAIL < %t %s
+// RUN: llvm-mc -triple x86_64 -defsym DEPTH=30 %s \
+// RUN: | FileCheck %s --check-prefix=PASS
+// RUN: llvm-mc -triple x86_64 -defsym DEPTH=99 %s \
+// RUN: | FileCheck %s --check-prefix=PASS
+// RUN: not llvm-mc -triple x86_64 -defsym DEPTH=100 %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=TOODEEP-DEFAULT
-.macro rec head, tail:vararg
- .ifnb \tail
- rec \tail
+// RUN: llvm-mc -triple x86_64 -asm-macro-max-nesting-depth=42 \
+// RUN: -defsym DEPTH=41 %s | FileCheck %s --check-prefix=PASS
+// RUN: not llvm-mc -triple x86_64 -asm-macro-max-nesting-depth=42 \
+// RUN: -defsym DEPTH=42 %s 2>&1 | FileCheck %s --check-prefix=TOODEEP-FLAG
+
+.macro rec n
+ .if \n > 0
+ rec "(\n - 1)"
----------------
mattst88 wrote:
Sorry, unsure what you mean. Some problem with the test?
https://github.com/llvm/llvm-project/pull/218455
More information about the llvm-commits
mailing list