Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UpdateTestChecks] Make generation of UTC_ARGS: comment more robust
We now use the argparse Action objects to determine the name of the flags. This fixes cases where the key for the stored result ('dest') is not the same as the command line flag (e.g. --enable/--disable). Also add a test that --disabled can be part of the initial UTC_ARGS. This is split out from D78478 Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D78617
- Loading branch information
1 parent
bbcfce4
commit f50bc82
Showing
3 changed files
with
75 additions
and
12 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
...TestChecks/update_test_checks/Inputs/on_the_fly_arg_change.ll.initially_disabled.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes --disable | ||
; RUN: opt -S < %s | FileCheck %s | ||
|
||
declare void @foo() | ||
|
||
define void @check_lines_1() { | ||
ret void | ||
} | ||
|
||
; UTC_ARGS: --disable | ||
|
||
; A check line that would not be auto generated. | ||
; CHECK: define void @no_check_lines() { | ||
define void @no_check_lines() { | ||
ret void | ||
} | ||
|
||
; UTC_ARGS: --enable | ||
|
||
define void @check_lines_2() { | ||
; CHECK-LABEL: define {{[^@]+}}@check_lines_2() | ||
; CHECK-NEXT: ret void | ||
; | ||
ret void | ||
} | ||
|
||
define void @scrub() { | ||
; CHECK-LABEL: define {{[^@]+}}@scrub() | ||
; CHECK-NEXT: call void @foo() | ||
; CHECK-NEXT: ret void | ||
; | ||
call void @foo() readnone | ||
ret void | ||
} | ||
|
||
define i32 @signature(i32 %arg) { | ||
; CHECK-LABEL: define {{[^@]+}}@signature | ||
; CHECK-SAME: (i32 [[ARG:%.*]]) | ||
; CHECK-NEXT: ret i32 [[ARG]] | ||
; | ||
ret i32 %arg | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters