arichardson created this revision.
arichardson added reviewers: nikic, lebedev.ri, jdoerfert, spatel, sebastian-ne.
Herald added a project: All.
arichardson requested review of this revision.
Herald added subscribers: llvm-commits, cfe-commits, sstefan1.
Herald added projects: clang, LLVM.

This is the same as D140212 <https://reviews.llvm.org/D140212> just for the 
clang update script. Quite a
bit of churn in the internal tests since they used inputs without the
`autogenerated by` args.

Depends on D140212 <https://reviews.llvm.org/D140212>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140218

Files:
  clang/test/utils/update_cc_test_checks/Inputs/basic-cplusplus.cpp.expected
  
clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected
  
clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.plain.expected
  clang/test/utils/update_cc_test_checks/Inputs/def-and-decl.c.expected
  clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c
  
clang/test/utils/update_cc_test_checks/Inputs/explicit-template-instantiation.cpp
  clang/test/utils/update_cc_test_checks/Inputs/generated-funcs-regex.c.expected
  
clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.generated.expected
  
clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.no-generated.expected
  
clang/test/utils/update_cc_test_checks/Inputs/global-hex-value-regex.c.expected
  clang/test/utils/update_cc_test_checks/Inputs/global-value-regex.c.expected
  clang/test/utils/update_cc_test_checks/Inputs/ifdef.c.expected
  clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c
  clang/test/utils/update_cc_test_checks/Inputs/no-funcsig-for-existing-note.c
  
clang/test/utils/update_cc_test_checks/Inputs/no-funcsig-for-existing-note.c.expected-with-flag
  
clang/test/utils/update_cc_test_checks/Inputs/no-funcsig-for-existing-note.c.expected-with-negative-flag
  
clang/test/utils/update_cc_test_checks/Inputs/no-funcsig-for-existing-note.c.expected-with-unrelated-flag
  clang/test/utils/update_cc_test_checks/Inputs/on_the_fly_arg_change.c.expected
  
clang/test/utils/update_cc_test_checks/Inputs/prefix-never-matches.cpp.expected
  
clang/test/utils/update_cc_test_checks/Inputs/replace-value-regex-across-runs.c.expected
  
clang/test/utils/update_cc_test_checks/Inputs/resolve-tmp-conflict.cpp.expected
  clang/test/utils/update_cc_test_checks/check-globals.test
  clang/test/utils/update_cc_test_checks/mangled_names.test
  clang/test/utils/update_cc_test_checks/no-funcsig-for-existing-note.test
  llvm/utils/update_cc_test_checks.py

Index: llvm/utils/update_cc_test_checks.py
===================================================================
--- llvm/utils/update_cc_test_checks.py
+++ llvm/utils/update_cc_test_checks.py
@@ -165,14 +165,12 @@
   parser.add_argument(
       '--x86_extra_scrub', action='store_true',
       help='Use more regex for x86 matching to reduce diffs between various subtargets')
-  parser.add_argument('--function-signature', action='store_true',
-                      help='Keep function signature information around for the check line')
   parser.add_argument('--check-attributes', action='store_true',
                       help='Check "Function Attributes" for functions')
   parser.add_argument('--check-globals', action='store_true',
                       help='Check global entries (global variables, metadata, attribute sets, ...) for functions')
   parser.add_argument('tests', nargs='+')
-  args = common.parse_commandline_args(parser)
+  args = common.parse_commandline_args(parser, add_funcsig_flag=True)
   infer_dependent_args(args)
 
   if not find_executable(args.clang):
Index: clang/test/utils/update_cc_test_checks/no-funcsig-for-existing-note.test
===================================================================
--- /dev/null
+++ clang/test/utils/update_cc_test_checks/no-funcsig-for-existing-note.test
@@ -0,0 +1,31 @@
+## Check that we do not add function signature matches for tests that already
+## have an autogeneration note since that would cause lots of test churn.
+# RUN: cp -f %S/Inputs/no-funcsig-for-existing-note.c %t.c && %update_cc_test_checks %t.c
+# RUN: diff -u %t.c %S/Inputs/no-funcsig-for-existing-note.c
+## Check that running the script again does not change the result:
+# RUN: %update_cc_test_checks %t.c
+# RUN: diff -u %t.c %S/Inputs/no-funcsig-for-existing-note.c
+## Adding an explicit --function-signature flag should add the lines though:
+# RUN: %update_cc_test_checks %t.c --function-signature
+# RUN: diff -u %t.c %S/Inputs/no-funcsig-for-existing-note.c.expected-with-flag
+## Running the script without arguments again should keep the function signature
+# RUN: %update_cc_test_checks %t.c
+# RUN: diff -u %t.c %S/Inputs/no-funcsig-for-existing-note.c.expected-with-flag
+
+## Check that an unrelated flag in UTC_ARGS does not implicitly enable --function-signature
+# RUN: cp -f %S/Inputs/no-funcsig-for-existing-note.c.expected-with-unrelated-flag %t.c && %update_cc_test_checks %t.c
+# RUN: diff -u %t.c %S/Inputs/no-funcsig-for-existing-note.c.expected-with-unrelated-flag
+
+## Check that --function-signature is included in UTC_ARGS for newly generated check lines
+# RUN: sed '1d' %S/Inputs/no-funcsig-for-existing-note.c > %t.c
+# RUN: %update_cc_test_checks %t.c --update-only 2>&1 | FileCheck %s --check-prefix=SKIP
+# SKIP: Skipping test which isn't autogenerated: {{.+}}.c
+# RUN: %update_cc_test_checks %t.c
+# RUN: diff -u %t.c %S/Inputs/no-funcsig-for-existing-note.c.expected-with-flag
+
+## Finally also check --no-function-signature
+# RUN: cp -f %S/Inputs/no-funcsig-for-existing-note.c %t.c && %update_cc_test_checks %t.c --no-function-signature
+# RUN: diff -u %t.c %S/Inputs/no-funcsig-for-existing-note.c.expected-with-negative-flag
+## --no-function-signature on the command line does not override the value in UTC_ARGS:
+# RUN: cp -f %S/Inputs/no-funcsig-for-existing-note.c.expected-with-flag %t.c && %update_cc_test_checks %t.c --no-function-signature
+# RUN: diff -u %t.c %S/Inputs/no-funcsig-for-existing-note.c.expected-with-flag
Index: clang/test/utils/update_cc_test_checks/mangled_names.test
===================================================================
--- clang/test/utils/update_cc_test_checks/mangled_names.test
+++ clang/test/utils/update_cc_test_checks/mangled_names.test
@@ -3,7 +3,7 @@
 # RUN: cp -f %S/Inputs/mangled_names.c %t.c && %update_cc_test_checks -v %t.c
 # RUN: diff -u %t.c %S/Inputs/mangled_names.c.expected
 ## Check that running the script again does not change the result:
-# RUN: %update_cc_test_checks -v %t.c
+# RUN: %update_cc_test_checks %t.c
 # RUN: diff -u %t.c %S/Inputs/mangled_names.c.expected
 ## Also try the --function-signature flag
 # RUN: %update_cc_test_checks %t.c --function-signature
@@ -13,6 +13,6 @@
 # RUN: diff -u %t.c %S/Inputs/mangled_names.c.funcsig.expected
 ## Verify that running without the --function-signature flag removes the -SAME: lines:
 ## We have to remove the UTC_ARGS comment first:
-# RUN: grep -v UTC_ARGS %t.c > %t-no-args.c
+# RUN: sed 's/UTC_ARGS: --function-signature//g' %t.c > %t-no-args.c
 # RUN: %update_cc_test_checks %t-no-args.c
 # RUN: diff -u %t-no-args.c %S/Inputs/mangled_names.c.expected
Index: clang/test/utils/update_cc_test_checks/check-globals.test
===================================================================
--- clang/test/utils/update_cc_test_checks/check-globals.test
+++ clang/test/utils/update_cc_test_checks/check-globals.test
@@ -38,8 +38,8 @@
 END.
 
   BOTH-NOT:{{.}}
-       NRM:// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals
-       IGF:// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals --include-generated-funcs
+       NRM:// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals --function-signature
+       IGF:// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals --include-generated-funcs --function-signature
  BOTH-NEXT:// {{.*}}
  BOTH-NEXT:// RUN: true
  BOTH-NEXT:// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s
@@ -56,7 +56,8 @@
  BOTH-NEXT:// CHECK: @bar.i = internal global i32 0, align 4
  BOTH-NEXT:// CHECK: @bar.j = internal global i32 0, align 4
  BOTH-NEXT://.
- BOTH-NEXT:// CHECK-LABEL: @foo(
+ BOTH-NEXT:// CHECK-LABEL: define {{\{}}{[^@]+}}@foo
+ BOTH-NEXT:// CHECK-SAME: () #{{\[}}[ATTR0:[0-9]+]] {
  BOTH-NEXT:// CHECK-NEXT:  entry:
  BOTH-NEXT:// CHECK-NEXT:    ret void
  BOTH-NEXT://
@@ -64,7 +65,8 @@
   NRM-NEXT:  static int i, j;
   NRM-NEXT:}
   IGF-NEXT://
- BOTH-NEXT:// CHECK-LABEL: @bar(
+ BOTH-NEXT:// CHECK-LABEL: define {{\{}}{[^@]+}}@bar
+ BOTH-NEXT:// CHECK-SAME: () #{{\[}}[ATTR0]] {
  BOTH-NEXT:// CHECK-NEXT:  entry:
  BOTH-NEXT:// CHECK-NEXT:    ret void
  BOTH-NEXT://
Index: clang/test/utils/update_cc_test_checks/Inputs/resolve-tmp-conflict.cpp.expected
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/resolve-tmp-conflict.cpp.expected
+++ clang/test/utils/update_cc_test_checks/Inputs/resolve-tmp-conflict.cpp.expected
@@ -1,4 +1,4 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --prefix-filecheck-ir-name _
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --prefix-filecheck-ir-name _ --function-signature
 // RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s
 
 // CHECK-LABEL: define {{[^@]+}}@_Z3fooi
Index: clang/test/utils/update_cc_test_checks/Inputs/replace-value-regex-across-runs.c.expected
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/replace-value-regex-across-runs.c.expected
+++ clang/test/utils/update_cc_test_checks/Inputs/replace-value-regex-across-runs.c.expected
@@ -1,10 +1,11 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+"
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" --function-signature
 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm -o - %s | \
 // RUN:     FileCheck %s
 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -emit-llvm -o - %s | \
 // RUN:     FileCheck %s
 
-// CHECK-LABEL: @foo(
+// CHECK-LABEL: define {{[^@]+}}@foo
+// CHECK-SAME: () #[[ATTR0:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    call void @{{__omp_offloading_[0-9a-z]+_[0-9a-z]+}}_foo_l7() #[[ATTR2:[0-9]+]]
 // CHECK-NEXT:    ret void
Index: clang/test/utils/update_cc_test_checks/Inputs/prefix-never-matches.cpp.expected
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/prefix-never-matches.cpp.expected
+++ clang/test/utils/update_cc_test_checks/Inputs/prefix-never-matches.cpp.expected
@@ -1,4 +1,4 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature
 // RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -O0 -o - %s | FileCheck %s -check-prefix=A
 // RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -O3 -o - %s | FileCheck %s -check-prefix=A
 
Index: clang/test/utils/update_cc_test_checks/Inputs/on_the_fly_arg_change.c.expected
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/on_the_fly_arg_change.c.expected
+++ clang/test/utils/update_cc_test_checks/Inputs/on_the_fly_arg_change.c.expected
@@ -1,7 +1,8 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature
 // RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
 
-// CHECK-LABEL: @checks_please(
+// CHECK-LABEL: define {{[^@]+}}@checks_please
+// CHECK-SAME: () #[[ATTR0:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 1
 //
@@ -20,7 +21,8 @@
 // UTC_ARGS: --enable
 
 
-// CHECK-LABEL: @checks_again(
+// CHECK-LABEL: define {{[^@]+}}@checks_again
+// CHECK-SAME: () #[[ATTR0]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 2
 //
Index: clang/test/utils/update_cc_test_checks/Inputs/no-funcsig-for-existing-note.c.expected-with-unrelated-flag
===================================================================
--- /dev/null
+++ clang/test/utils/update_cc_test_checks/Inputs/no-funcsig-for-existing-note.c.expected-with-unrelated-flag
@@ -0,0 +1,13 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --functions "foo"
+// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
+
+// CHECK-LABEL: @foo(
+// CHECK-NEXT:  entry:
+// CHECK-NEXT:    [[A_ADDR:%.*]] = alloca i32, align 4
+// CHECK-NEXT:    store i32 [[A:%.*]], ptr [[A_ADDR]], align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
+// CHECK-NEXT:    ret i32 [[TMP0]]
+//
+int foo(int a) {
+  return a;
+}
Index: clang/test/utils/update_cc_test_checks/Inputs/no-funcsig-for-existing-note.c.expected-with-negative-flag
===================================================================
--- /dev/null
+++ clang/test/utils/update_cc_test_checks/Inputs/no-funcsig-for-existing-note.c.expected-with-negative-flag
@@ -0,0 +1,13 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --no-function-signature
+// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
+
+// CHECK-LABEL: @foo(
+// CHECK-NEXT:  entry:
+// CHECK-NEXT:    [[A_ADDR:%.*]] = alloca i32, align 4
+// CHECK-NEXT:    store i32 [[A:%.*]], ptr [[A_ADDR]], align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
+// CHECK-NEXT:    ret i32 [[TMP0]]
+//
+int foo(int a) {
+  return a;
+}
Index: clang/test/utils/update_cc_test_checks/Inputs/no-funcsig-for-existing-note.c.expected-with-flag
===================================================================
--- /dev/null
+++ clang/test/utils/update_cc_test_checks/Inputs/no-funcsig-for-existing-note.c.expected-with-flag
@@ -0,0 +1,14 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature
+// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
+
+// CHECK-LABEL: define {{[^@]+}}@foo
+// CHECK-SAME: (i32 noundef [[A:%.*]]) #[[ATTR0:[0-9]+]] {
+// CHECK-NEXT:  entry:
+// CHECK-NEXT:    [[A_ADDR:%.*]] = alloca i32, align 4
+// CHECK-NEXT:    store i32 [[A]], ptr [[A_ADDR]], align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
+// CHECK-NEXT:    ret i32 [[TMP0]]
+//
+int foo(int a) {
+  return a;
+}
Index: clang/test/utils/update_cc_test_checks/Inputs/no-funcsig-for-existing-note.c
===================================================================
--- /dev/null
+++ clang/test/utils/update_cc_test_checks/Inputs/no-funcsig-for-existing-note.c
@@ -0,0 +1,13 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
+// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
+
+// CHECK-LABEL: @foo(
+// CHECK-NEXT:  entry:
+// CHECK-NEXT:    [[A_ADDR:%.*]] = alloca i32, align 4
+// CHECK-NEXT:    store i32 [[A:%.*]], ptr [[A_ADDR]], align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
+// CHECK-NEXT:    ret i32 [[TMP0]]
+//
+int foo(int a) {
+  return a;
+}
Index: clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c
+++ clang/test/utils/update_cc_test_checks/Inputs/mangled_names.c
@@ -1,3 +1,4 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
 // Example input for update_cc_test_checks
 // RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
 
Index: clang/test/utils/update_cc_test_checks/Inputs/ifdef.c.expected
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/ifdef.c.expected
+++ clang/test/utils/update_cc_test_checks/Inputs/ifdef.c.expected
@@ -1,9 +1,10 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature
 // RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck -check-prefixes=CHECK %s
 // RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s -DFOO | FileCheck -check-prefixes=CHECK,FOO %s
 
 #ifdef FOO
-// FOO-LABEL: @foo(
+// FOO-LABEL: define {{[^@]+}}@foo
+// FOO-SAME: () #[[ATTR0:[0-9]+]] {
 // FOO-NEXT:  entry:
 // FOO-NEXT:    ret i32 1
 //
@@ -12,7 +13,8 @@
 }
 #endif
 
-// CHECK-LABEL: @bar(
+// CHECK-LABEL: define {{[^@]+}}@bar
+// CHECK-SAME: () #[[ATTR0:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i32 2
 //
Index: clang/test/utils/update_cc_test_checks/Inputs/global-value-regex.c.expected
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/global-value-regex.c.expected
+++ clang/test/utils/update_cc_test_checks/Inputs/global-value-regex.c.expected
@@ -1,18 +1,20 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals --global-value-regex "foo\.."
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals --global-value-regex "foo\.." --function-signature
 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s
 
 //.
 // CHECK: @foo.i = internal global i32 0, align 4
 // CHECK: @foo.j = internal global i32 0, align 4
 //.
-// CHECK-LABEL: @foo(
+// CHECK-LABEL: define {{[^@]+}}@foo
+// CHECK-SAME: () #[[ATTR0:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret void
 //
 void foo(void) {
   static int i, j;
 }
-// CHECK-LABEL: @bar(
+// CHECK-LABEL: define {{[^@]+}}@bar
+// CHECK-SAME: () #[[ATTR0]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret void
 //
Index: clang/test/utils/update_cc_test_checks/Inputs/global-hex-value-regex.c.expected
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/global-hex-value-regex.c.expected
+++ clang/test/utils/update_cc_test_checks/Inputs/global-hex-value-regex.c.expected
@@ -1,4 +1,4 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals --global-value-regex "foo\..*" "bar\..*" --global-hex-value-regex ".*\.hex"
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals --global-value-regex "foo\..*" "bar\..*" --global-hex-value-regex ".*\.hex" --function-signature
 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s
 
 //.
@@ -7,7 +7,8 @@
 // CHECK: @bar.hex = internal global i32 [[#0x20]], align 4
 // CHECK: @bar.dec = internal global i32 20, align 4
 //.
-// CHECK-LABEL: @foo(
+// CHECK-LABEL: define {{[^@]+}}@foo
+// CHECK-SAME: () #[[ATTR0:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret void
 //
@@ -15,7 +16,8 @@
   static int hex = 0x10;
   static int dec = 10;
 }
-// CHECK-LABEL: @bar(
+// CHECK-LABEL: define {{[^@]+}}@bar
+// CHECK-SAME: () #[[ATTR0]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret void
 //
Index: clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.no-generated.expected
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.no-generated.expected
+++ clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.no-generated.expected
@@ -1,4 +1,4 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature
 // Check that the CHECK lines are generated for clang-generated functions
 // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu -fopenmp %s -emit-llvm -o - | FileCheck --check-prefix=OMP %s
 // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu %s -emit-llvm -o - | FileCheck --check-prefix=NOOMP %s
@@ -9,7 +9,8 @@
 
 void foo(void);
 
-// OMP-LABEL: @main(
+// OMP-LABEL: define {{[^@]+}}@main
+// OMP-SAME: () #[[ATTR0:[0-9]+]] {
 // OMP-NEXT:  entry:
 // OMP-NEXT:    [[RETVAL:%.*]] = alloca i32, align 4
 // OMP-NEXT:    [[I:%.*]] = alloca i32, align 4
@@ -19,7 +20,8 @@
 // OMP-NEXT:    call void @foo()
 // OMP-NEXT:    ret i32 0
 //
-// NOOMP-LABEL: @main(
+// NOOMP-LABEL: define {{[^@]+}}@main
+// NOOMP-SAME: () #[[ATTR0:[0-9]+]] {
 // NOOMP-NEXT:  entry:
 // NOOMP-NEXT:    [[RETVAL:%.*]] = alloca i32, align 4
 // NOOMP-NEXT:    [[I:%.*]] = alloca i32, align 4
@@ -59,14 +61,16 @@
   return 0;
 }
 
-// OMP-LABEL: @foo(
+// OMP-LABEL: define {{[^@]+}}@foo
+// OMP-SAME: () #[[ATTR0]] {
 // OMP-NEXT:  entry:
 // OMP-NEXT:    [[I:%.*]] = alloca i32, align 4
 // OMP-NEXT:    store i32 0, i32* [[I]], align 4
 // OMP-NEXT:    call void (%struct.ident_t*, i32, void (i32*, i32*, ...)*, ...) @__kmpc_fork_call(%struct.ident_t* @[[GLOB2]], i32 0, void (i32*, i32*, ...)* bitcast (void (i32*, i32*)* @.omp_outlined..1 to void (i32*, i32*, ...)*))
 // OMP-NEXT:    ret void
 //
-// NOOMP-LABEL: @foo(
+// NOOMP-LABEL: define {{[^@]+}}@foo
+// NOOMP-SAME: () #[[ATTR0]] {
 // NOOMP-NEXT:  entry:
 // NOOMP-NEXT:    [[I:%.*]] = alloca i32, align 4
 // NOOMP-NEXT:    store i32 0, i32* [[I]], align 4
Index: clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.generated.expected
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.generated.expected
+++ clang/test/utils/update_cc_test_checks/Inputs/generated-funcs.c.generated.expected
@@ -1,4 +1,4 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --include-generated-funcs
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --include-generated-funcs --function-signature
 // Check that the CHECK lines are generated for clang-generated functions
 // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu -fopenmp %s -emit-llvm -o - | FileCheck --check-prefix=OMP %s
 // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu %s -emit-llvm -o - | FileCheck --check-prefix=NOOMP %s
@@ -30,7 +30,8 @@
     A[i] = 1.0;
   }
 }
-// OMP-LABEL: @main(
+// OMP-LABEL: define {{[^@]+}}@main
+// OMP-SAME: () #[[ATTR0:[0-9]+]] {
 // OMP-NEXT:  entry:
 // OMP-NEXT:    [[RETVAL:%.*]] = alloca i32, align 4
 // OMP-NEXT:    [[I:%.*]] = alloca i32, align 4
@@ -41,7 +42,8 @@
 // OMP-NEXT:    ret i32 0
 //
 //
-// OMP-LABEL: @.omp_outlined.(
+// OMP-LABEL: define {{[^@]+}}@.omp_outlined.
+// OMP-SAME: (i32* noalias noundef [[DOTGLOBAL_TID_:%.*]], i32* noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1:[0-9]+]] {
 // OMP-NEXT:  entry:
 // OMP-NEXT:    [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
 // OMP-NEXT:    [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
@@ -52,8 +54,8 @@
 // OMP-NEXT:    [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
 // OMP-NEXT:    [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
 // OMP-NEXT:    [[I:%.*]] = alloca i32, align 4
-// OMP-NEXT:    store i32* [[DOTGLOBAL_TID_:%.*]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
-// OMP-NEXT:    store i32* [[DOTBOUND_TID_:%.*]], i32** [[DOTBOUND_TID__ADDR]], align 8
+// OMP-NEXT:    store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
+// OMP-NEXT:    store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
 // OMP-NEXT:    store i32 0, i32* [[DOTOMP_LB]], align 4
 // OMP-NEXT:    store i32 33554431, i32* [[DOTOMP_UB]], align 4
 // OMP-NEXT:    store i32 1, i32* [[DOTOMP_STRIDE]], align 4
@@ -104,7 +106,8 @@
 // OMP-NEXT:    ret void
 //
 //
-// OMP-LABEL: @foo(
+// OMP-LABEL: define {{[^@]+}}@foo
+// OMP-SAME: () #[[ATTR0]] {
 // OMP-NEXT:  entry:
 // OMP-NEXT:    [[I:%.*]] = alloca i32, align 4
 // OMP-NEXT:    store i32 0, i32* [[I]], align 4
@@ -112,7 +115,8 @@
 // OMP-NEXT:    ret void
 //
 //
-// OMP-LABEL: @.omp_outlined..1(
+// OMP-LABEL: define {{[^@]+}}@.omp_outlined..1
+// OMP-SAME: (i32* noalias noundef [[DOTGLOBAL_TID_:%.*]], i32* noalias noundef [[DOTBOUND_TID_:%.*]]) #[[ATTR1]] {
 // OMP-NEXT:  entry:
 // OMP-NEXT:    [[DOTGLOBAL_TID__ADDR:%.*]] = alloca i32*, align 8
 // OMP-NEXT:    [[DOTBOUND_TID__ADDR:%.*]] = alloca i32*, align 8
@@ -123,8 +127,8 @@
 // OMP-NEXT:    [[DOTOMP_STRIDE:%.*]] = alloca i32, align 4
 // OMP-NEXT:    [[DOTOMP_IS_LAST:%.*]] = alloca i32, align 4
 // OMP-NEXT:    [[I:%.*]] = alloca i32, align 4
-// OMP-NEXT:    store i32* [[DOTGLOBAL_TID_:%.*]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
-// OMP-NEXT:    store i32* [[DOTBOUND_TID_:%.*]], i32** [[DOTBOUND_TID__ADDR]], align 8
+// OMP-NEXT:    store i32* [[DOTGLOBAL_TID_]], i32** [[DOTGLOBAL_TID__ADDR]], align 8
+// OMP-NEXT:    store i32* [[DOTBOUND_TID_]], i32** [[DOTBOUND_TID__ADDR]], align 8
 // OMP-NEXT:    store i32 0, i32* [[DOTOMP_LB]], align 4
 // OMP-NEXT:    store i32 33554431, i32* [[DOTOMP_UB]], align 4
 // OMP-NEXT:    store i32 1, i32* [[DOTOMP_STRIDE]], align 4
@@ -175,7 +179,8 @@
 // OMP-NEXT:    ret void
 //
 //
-// NOOMP-LABEL: @main(
+// NOOMP-LABEL: define {{[^@]+}}@main
+// NOOMP-SAME: () #[[ATTR0:[0-9]+]] {
 // NOOMP-NEXT:  entry:
 // NOOMP-NEXT:    [[RETVAL:%.*]] = alloca i32, align 4
 // NOOMP-NEXT:    [[I:%.*]] = alloca i32, align 4
@@ -203,7 +208,8 @@
 // NOOMP-NEXT:    ret i32 0
 //
 //
-// NOOMP-LABEL: @foo(
+// NOOMP-LABEL: define {{[^@]+}}@foo
+// NOOMP-SAME: () #[[ATTR0]] {
 // NOOMP-NEXT:  entry:
 // NOOMP-NEXT:    [[I:%.*]] = alloca i32, align 4
 // NOOMP-NEXT:    store i32 0, i32* [[I]], align 4
Index: clang/test/utils/update_cc_test_checks/Inputs/generated-funcs-regex.c.expected
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/generated-funcs-regex.c.expected
+++ clang/test/utils/update_cc_test_checks/Inputs/generated-funcs-regex.c.expected
@@ -1,4 +1,4 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --include-generated-funcs --replace-value-regex "__([a-z]+)_offloading_[a-z0-9]+_[a-z0-9]+_(.*)_l[0-9]+" "somevar_[a-z0-9]+_"
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --include-generated-funcs --replace-value-regex "__([a-z]+)_offloading_[a-z0-9]+_[a-z0-9]+_(.*)_l[0-9]+" "somevar_[a-z0-9]+_" --function-signature
 // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu -fopenmp %s -emit-llvm -o - | FileCheck %s
 
 void __test_offloading_42_abcdef_bar_l123(void);
@@ -12,12 +12,13 @@
     __test_offloading_42_abcdef_bar_l123();
     int somevar_abc123_;
 }
-// CHECK-LABEL: @foo(
+// CHECK-LABEL: define {{[^@]+}}@foo
+// CHECK-SAME: (i32 noundef [[A:%.*]]) #[[ATTR0:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[A_ADDR:%.*]] = alloca i32, align 4
 // CHECK-NEXT:    [[A_CASTED:%.*]] = alloca i64, align 8
 // CHECK-NEXT:    %{{somevar_[a-z0-9]+_}} = alloca i32, align 4
-// CHECK-NEXT:    store i32 [[A:%.*]], i32* [[A_ADDR]], align 4
+// CHECK-NEXT:    store i32 [[A]], i32* [[A_ADDR]], align 4
 // CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* [[A_ADDR]], align 4
 // CHECK-NEXT:    [[CONV:%.*]] = bitcast i64* [[A_CASTED]] to i32*
 // CHECK-NEXT:    store i32 [[TMP0]], i32* [[CONV]], align 4
@@ -27,10 +28,11 @@
 // CHECK-NEXT:    ret void
 //
 //
-// CHECK-LABEL: @{{__omp_offloading_[a-z0-9]+_[a-z0-9]+_foo_l[0-9]+}}(
+// CHECK-LABEL: define {{[^@]+}}@{{__omp_offloading_[a-z0-9]+_[a-z0-9]+_foo_l[0-9]+}}
+// CHECK-SAME: (i64 noundef [[A:%.*]]) #[[ATTR1:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[A_ADDR:%.*]] = alloca i64, align 8
-// CHECK-NEXT:    store i64 [[A:%.*]], i64* [[A_ADDR]], align 8
+// CHECK-NEXT:    store i64 [[A]], i64* [[A_ADDR]], align 8
 // CHECK-NEXT:    [[CONV:%.*]] = bitcast i64* [[A_ADDR]] to i32*
 // CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CONV]], align 4
 // CHECK-NEXT:    call void @use(i32 noundef [[TMP0]])
Index: clang/test/utils/update_cc_test_checks/Inputs/explicit-template-instantiation.cpp
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/explicit-template-instantiation.cpp
+++ clang/test/utils/update_cc_test_checks/Inputs/explicit-template-instantiation.cpp
@@ -1,3 +1,4 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
 // RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
 
 template <typename T>
Index: clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c
+++ clang/test/utils/update_cc_test_checks/Inputs/exec-all-runlines.c
@@ -1,3 +1,4 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
 // Check that the non-clang/non-filechecked runlines execute
 // RUN: cp %s %S/../Output/execute-all-runlines.copy.c
 // RUN: cp %S/../Output/execute-all-runlines.copy.c %s.copy.c
Index: clang/test/utils/update_cc_test_checks/Inputs/def-and-decl.c.expected
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/def-and-decl.c.expected
+++ clang/test/utils/update_cc_test_checks/Inputs/def-and-decl.c.expected
@@ -1,4 +1,4 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature
 // Check that the CHECK lines are generated before the definition and not the declaration
 // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s
 
@@ -6,7 +6,8 @@
 
 void empty_function(void);
 
-// CHECK-LABEL: @main(
+// CHECK-LABEL: define {{[^@]+}}@main
+// CHECK-SAME: () #[[ATTR0:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[RETVAL:%.*]] = alloca i32, align 4
 // CHECK-NEXT:    store i32 0, i32* [[RETVAL]], align 4
@@ -19,10 +20,11 @@
   return foo(1);
 }
 
-// CHECK-LABEL: @foo(
+// CHECK-LABEL: define {{[^@]+}}@foo
+// CHECK-SAME: (i32 noundef [[ARG:%.*]]) #[[ATTR0]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[ARG_ADDR:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    store i32 [[ARG:%.*]], i32* [[ARG_ADDR]], align 4
+// CHECK-NEXT:    store i32 [[ARG]], i32* [[ARG_ADDR]], align 4
 // CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* [[ARG_ADDR]], align 4
 // CHECK-NEXT:    ret i32 [[TMP0]]
 //
@@ -30,7 +32,8 @@
   return arg;
 }
 
-// CHECK-LABEL: @empty_function(
+// CHECK-LABEL: define {{[^@]+}}@empty_function
+// CHECK-SAME: () #[[ATTR0]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret void
 //
Index: clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.plain.expected
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.plain.expected
+++ clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.plain.expected
@@ -1,4 +1,4 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature
 // RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
 struct RT {
   char A;
@@ -11,10 +11,11 @@
   struct RT Z;
 };
 
-// CHECK-LABEL: @_Z3fooP2ST(
+// CHECK-LABEL: define {{[^@]+}}@_Z3fooP2ST
+// CHECK-SAME: (%struct.ST* noundef [[S:%.*]]) #[[ATTR0:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[S_ADDR:%.*]] = alloca %struct.ST*, align 8
-// CHECK-NEXT:    store %struct.ST* [[S:%.*]], %struct.ST** [[S_ADDR]], align 8
+// CHECK-NEXT:    store %struct.ST* [[S]], %struct.ST** [[S_ADDR]], align 8
 // CHECK-NEXT:    [[TMP0:%.*]] = load %struct.ST*, %struct.ST** [[S_ADDR]], align 8
 // CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], %struct.ST* [[TMP0]], i64 1
 // CHECK-NEXT:    [[Z:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ARRAYIDX]], i32 0, i32 2
Index: clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected
+++ clang/test/utils/update_cc_test_checks/Inputs/check-attributes.cpp.funcattrs.expected
@@ -1,4 +1,4 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-attributes
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-attributes --function-signature
 // RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
 struct RT {
   char A;
@@ -12,10 +12,11 @@
 };
 
 // CHECK: Function Attrs: mustprogress noinline nounwind optnone
-// CHECK-LABEL: @_Z3fooP2ST(
+// CHECK-LABEL: define {{[^@]+}}@_Z3fooP2ST
+// CHECK-SAME: (%struct.ST* noundef [[S:%.*]]) #[[ATTR0:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[S_ADDR:%.*]] = alloca %struct.ST*, align 8
-// CHECK-NEXT:    store %struct.ST* [[S:%.*]], %struct.ST** [[S_ADDR]], align 8
+// CHECK-NEXT:    store %struct.ST* [[S]], %struct.ST** [[S_ADDR]], align 8
 // CHECK-NEXT:    [[TMP0:%.*]] = load %struct.ST*, %struct.ST** [[S_ADDR]], align 8
 // CHECK-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [[STRUCT_ST:%.*]], %struct.ST* [[TMP0]], i64 1
 // CHECK-NEXT:    [[Z:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[ARRAYIDX]], i32 0, i32 2
Index: clang/test/utils/update_cc_test_checks/Inputs/basic-cplusplus.cpp.expected
===================================================================
--- clang/test/utils/update_cc_test_checks/Inputs/basic-cplusplus.cpp.expected
+++ clang/test/utils/update_cc_test_checks/Inputs/basic-cplusplus.cpp.expected
@@ -1,4 +1,4 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature
 // Basic C++ test for update_cc_test_checks
 // RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
 
@@ -8,12 +8,13 @@
 public:
   explicit Foo(int x);
   ~Foo();
-// CHECK-LABEL: @_ZNK3Foo23function_defined_inlineEi(
+// CHECK-LABEL: define {{[^@]+}}@_ZNK3Foo23function_defined_inlineEi
+// CHECK-SAME: (%class.Foo* noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef [[ARG:%.*]]) #[[ATTR2:[0-9]+]] comdat align 2 {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %class.Foo*, align 8
 // CHECK-NEXT:    [[ARG_ADDR:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    store %class.Foo* [[THIS:%.*]], %class.Foo** [[THIS_ADDR]], align 8
-// CHECK-NEXT:    store i32 [[ARG:%.*]], i32* [[ARG_ADDR]], align 4
+// CHECK-NEXT:    store %class.Foo* [[THIS]], %class.Foo** [[THIS_ADDR]], align 8
+// CHECK-NEXT:    store i32 [[ARG]], i32* [[ARG_ADDR]], align 4
 // CHECK-NEXT:    [[THIS1:%.*]] = load %class.Foo*, %class.Foo** [[THIS_ADDR]], align 8
 // CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* [[ARG_ADDR]], align 4
 // CHECK-NEXT:    [[X:%.*]] = getelementptr inbounds [[CLASS_FOO:%.*]], %class.Foo* [[THIS1]], i32 0, i32 0
@@ -27,33 +28,36 @@
   inline int function_defined_out_of_line(int arg) const;
 };
 
-// CHECK-LABEL: @_ZN3FooC1Ei(
+// CHECK-LABEL: define {{[^@]+}}@_ZN3FooC1Ei
+// CHECK-SAME: (%class.Foo* noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef [[X:%.*]]) unnamed_addr #[[ATTR0:[0-9]+]] align 2 {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %class.Foo*, align 8
 // CHECK-NEXT:    [[X_ADDR:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    store %class.Foo* [[THIS:%.*]], %class.Foo** [[THIS_ADDR]], align 8
-// CHECK-NEXT:    store i32 [[X:%.*]], i32* [[X_ADDR]], align 4
+// CHECK-NEXT:    store %class.Foo* [[THIS]], %class.Foo** [[THIS_ADDR]], align 8
+// CHECK-NEXT:    store i32 [[X]], i32* [[X_ADDR]], align 4
 // CHECK-NEXT:    [[THIS1:%.*]] = load %class.Foo*, %class.Foo** [[THIS_ADDR]], align 8
 // CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* [[X_ADDR]], align 4
 // CHECK-NEXT:    call void @_ZN3FooC2Ei(%class.Foo* noundef nonnull align 4 dereferenceable(4) [[THIS1]], i32 noundef [[TMP0]])
 // CHECK-NEXT:    ret void
 //
 Foo::Foo(int x) : x(x) {}
-// CHECK-LABEL: @_ZN3FooD1Ev(
+// CHECK-LABEL: define {{[^@]+}}@_ZN3FooD1Ev
+// CHECK-SAME: (%class.Foo* noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]]) unnamed_addr #[[ATTR0]] align 2 {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %class.Foo*, align 8
-// CHECK-NEXT:    store %class.Foo* [[THIS:%.*]], %class.Foo** [[THIS_ADDR]], align 8
+// CHECK-NEXT:    store %class.Foo* [[THIS]], %class.Foo** [[THIS_ADDR]], align 8
 // CHECK-NEXT:    [[THIS1:%.*]] = load %class.Foo*, %class.Foo** [[THIS_ADDR]], align 8
 // CHECK-NEXT:    call void @_ZN3FooD2Ev(%class.Foo* noundef nonnull align 4 dereferenceable(4) [[THIS1]]) #[[ATTR3:[0-9]+]]
 // CHECK-NEXT:    ret void
 //
 Foo::~Foo() {}
-// CHECK-LABEL: @_ZNK3Foo28function_defined_out_of_lineEi(
+// CHECK-LABEL: define {{[^@]+}}@_ZNK3Foo28function_defined_out_of_lineEi
+// CHECK-SAME: (%class.Foo* noundef nonnull align 4 dereferenceable(4) [[THIS:%.*]], i32 noundef [[ARG:%.*]]) #[[ATTR2]] comdat align 2 {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[THIS_ADDR:%.*]] = alloca %class.Foo*, align 8
 // CHECK-NEXT:    [[ARG_ADDR:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    store %class.Foo* [[THIS:%.*]], %class.Foo** [[THIS_ADDR]], align 8
-// CHECK-NEXT:    store i32 [[ARG:%.*]], i32* [[ARG_ADDR]], align 4
+// CHECK-NEXT:    store %class.Foo* [[THIS]], %class.Foo** [[THIS_ADDR]], align 8
+// CHECK-NEXT:    store i32 [[ARG]], i32* [[ARG_ADDR]], align 4
 // CHECK-NEXT:    [[THIS1:%.*]] = load %class.Foo*, %class.Foo** [[THIS_ADDR]], align 8
 // CHECK-NEXT:    [[X:%.*]] = getelementptr inbounds [[CLASS_FOO:%.*]], %class.Foo* [[THIS1]], i32 0, i32 0
 // CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* [[X]], align 4
@@ -64,7 +68,8 @@
 int Foo::function_defined_out_of_line(int arg) const { return x - arg; }
 
 // Call the inline methods to ensure the LLVM IR is generated:
-// CHECK-LABEL: @main(
+// CHECK-LABEL: define {{[^@]+}}@main
+// CHECK-SAME: () #[[ATTR1:[0-9]+]] {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[F:%.*]] = alloca [[CLASS_FOO:%.*]], align 4
 // CHECK-NEXT:    call void @_ZN3FooC1Ei(%class.Foo* noundef nonnull align 4 dereferenceable(4) [[F]], i32 noundef 1)
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D140218: [upd... Alexander Richardson via Phabricator via cfe-commits

Reply via email to