Add the --include-generated-funcs option to update_cc_test_checks.py so that any functions created by the compiler that don't exist in the source will also be checked. We need to maintain the output order of generated function checks so that CHECK-LABEL works properly. To do so, maintain a list of functions output for each prefix in the order they are output. Use this list to output checks for generated functions in the proper order. Differential Revision: https://reviews.llvm.org/D83004
16 lines
789 B
Plaintext
16 lines
789 B
Plaintext
## Check that generated functions are included.
|
|
# RUN: cp -f %S/Inputs/generated_funcs.ll %t.ll && %update_test_checks --include-generated-funcs %t.ll
|
|
# RUN: diff -u %t.ll %S/Inputs/generated_funcs.ll.generated.expected
|
|
|
|
## Check that running the script again does not change the result:
|
|
# RUN: %update_test_checks --include-generated-funcs %t.ll
|
|
# RUN: diff -u %t.ll %S/Inputs/generated_funcs.ll.generated.expected
|
|
|
|
## Check that generated functions are not included.
|
|
# RUN: cp -f %S/Inputs/generated_funcs.ll %t.ll && %update_test_checks %t.ll
|
|
# RUN: diff -u %t.ll %S/Inputs/generated_funcs.ll.nogenerated.expected
|
|
|
|
## Check that running the script again does not change the result:
|
|
# RUN: %update_test_checks %t.ll
|
|
# RUN: diff -u %t.ll %S/Inputs/generated_funcs.ll.nogenerated.expected
|