[llvm-branch-commits] [UpdateTestChecks] Cleanly support .ifdef and .macros in update_mc_test_checks.py (PR #199305)

Alexander Richardson via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri May 22 17:16:07 PDT 2026


https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/199305

This simplifies update_mc_test_checks.py to feed the entire input file
into llvm-mc, rather than invoking it line-by-line. It leverages the new
--show-source-loc option in llvm-mc to map generated instruction outputs
back to their original lines. Line comments corresponding to MacroLoc
are automatically filtered out during test generation so they do not
clutter generated checks.

We also add a combined test case covering both ifdefs, macros, and .include
directives to maintain robust automated test coverage.





More information about the llvm-branch-commits mailing list