aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/TestModuleFileExtension.cpp
diff options
context:
space:
mode:
authorStephen Tozer <stephen.tozer@sony.com>2025-07-17 11:40:43 +0100
committerGitHub <noreply@github.com>2025-07-17 11:40:43 +0100
commitb7c14b6ded300b9190fe0b65881d04c54b2a9fbd (patch)
tree07485256a850030000a6d00f027ee7f5d4a481bc /clang/lib/Frontend/TestModuleFileExtension.cpp
parentb1fca543f7c34012697afd99c3dfe1306aa2acab (diff)
downloadllvm-b7c14b6ded300b9190fe0b65881d04c54b2a9fbd.zip
llvm-b7c14b6ded300b9190fe0b65881d04c54b2a9fbd.tar.gz
llvm-b7c14b6ded300b9190fe0b65881d04c54b2a9fbd.tar.bz2
[Debugify] Add 'acceptance-test' mode for the debugify report script (#147574)
For the purposes of setting up CI that makes use of debugify, this patch adds an alternative mode for the llvm-original-di-preservation.py script, which produces terminal-friendly(-ish) YAML output instead of an HTML report, and sets the return code to 1 if the input file contains errors, or 0 if the input file contains no errors or does not exist, making it simple to use it in CI. This introduces a small change in existing usage, in that the path for the HTML report file is now passed with `--report-file <path>` rather than as a positional argument; I could make the argparse logic work without this change, but I believe that is simpler to understand this way, and to my knowledge debugify isn't currently being used in automated environments where changing this might cause issues. As a small change while passing by, I also changed `-compress` to `--compress`, for consistency. As a note for reviewers, the reason that we treat a non-existent input file as a pass is that this is actually the expected state: we use clang to compile numerous files, passing a filepath for debugify errors. Any errors found by debugify will be written to this file; if none are found, the file is untouched. This is also mentioned in a code comment, but I think it useful to state upfront. Finally, the justification for adding a new mode to this script instead of adding a separate script for the separate functionality is that this script understands debugify's output, and performs some deduplication that is useful for clarifying the resulting output. Writing a new script would require duplicating logic unnecessarily, and risks the scripts falling out-of-sync if changes are made to debugify's output.
Diffstat (limited to 'clang/lib/Frontend/TestModuleFileExtension.cpp')
0 files changed, 0 insertions, 0 deletions