Modify the tests to use attribute group references instead of listing the
function attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175606 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/address-safety-attr.cpp b/test/CodeGen/address-safety-attr.cpp
index d6832a4..aedbbc2 100644
--- a/test/CodeGen/address-safety-attr.cpp
+++ b/test/CodeGen/address-safety-attr.cpp
@@ -10,37 +10,44 @@
 // when AddressSanitizer is enabled, unless no_address_safety_analysis attribute
 // is present.
 
-// CHECK-NOT:  NoAddressSafety1{{.*}} address_safety
-// ASAN-NOT:  NoAddressSafety1{{.*}} address_safety
+// CHECK:  NoAddressSafety1{{.*}}#0
+// ASAN:  NoAddressSafety1{{.*}}#0
 __attribute__((no_address_safety_analysis))
 int NoAddressSafety1(int *a) { return *a; }
 
-// CHECK-NOT:  NoAddressSafety2{{.*}} address_safety
-// ASAN-NOT:  NoAddressSafety2{{.*}} address_safety
+// CHECK:  NoAddressSafety2{{.*}}#0
+// ASAN:  NoAddressSafety2{{.*}}#0
 __attribute__((no_address_safety_analysis))
 int NoAddressSafety2(int *a);
 int NoAddressSafety2(int *a) { return *a; }
 
-// CHECK-NOT:  AddressSafetyOk{{.*}} address_safety
-// ASAN: AddressSafetyOk{{.*}} address_safety
+// CHECK:  AddressSafetyOk{{.*}}#0
+// ASAN: AddressSafetyOk{{.*}}#1
 int AddressSafetyOk(int *a) { return *a; }
 
-// CHECK-NOT:  TemplateNoAddressSafety{{.*}} address_safety
-// ASAN-NOT: TemplateNoAddressSafety{{.*}} address_safety
+// CHECK:  TemplateAddressSafetyOk{{.*}}#0
+// ASAN: TemplateAddressSafetyOk{{.*}}#1
+template<int i>
+int TemplateAddressSafetyOk() { return i; }
+
+// CHECK:  TemplateNoAddressSafety{{.*}}#0
+// ASAN: TemplateNoAddressSafety{{.*}}#0
 template<int i>
 __attribute__((no_address_safety_analysis))
 int TemplateNoAddressSafety() { return i; }
 
-// CHECK-NOT:  TemplateAddressSafetyOk{{.*}} address_safety
-// ASAN: TemplateAddressSafetyOk{{.*}} address_safety
-template<int i>
-int TemplateAddressSafetyOk() { return i; }
-
 int force_instance = TemplateAddressSafetyOk<42>()
                    + TemplateNoAddressSafety<42>();
 
 // Check that __cxx_global_var_init* get the address_safety attribute.
 int global1 = 0;
 int global2 = *(int*)((char*)&global1+1);
-// CHECK-NOT: @__cxx_global_var_init{{.*}}address_safety
-// ASAN: @__cxx_global_var_init{{.*}}address_safety
+// CHECK: @__cxx_global_var_init{{.*}}#1
+// ASAN: @__cxx_global_var_init{{.*}}#2
+
+// CHECK: attributes #0 = { nounwind "target-features"={{.*}} }
+// CHECK: attributes #1 = { nounwind }
+
+// ASAN: attributes #0 = { nounwind "target-features"={{.*}} }
+// ASAN: attributes #1 = { address_safety nounwind "target-features"={{.*}} }
+// ASAN: attributes #2 = { address_safety nounwind }