r175652 - Attempt to clean up tests for non-X86 platforms.

Bill Wendling isanbard at gmail.com
Wed Feb 20 11:30:02 PST 2013


Author: void
Date: Wed Feb 20 13:30:01 2013
New Revision: 175652

URL: http://llvm.org/viewvc/llvm-project?rev=175652&view=rev
Log:
Attempt to clean up tests for non-X86 platforms.

Modified:
    cfe/trunk/test/CXX/special/class.dtor/p3-0x.cpp
    cfe/trunk/test/CodeGen/address-safety-attr.cpp
    cfe/trunk/test/CodeGen/attr-coldhot.c
    cfe/trunk/test/CodeGen/attr-minsize.cpp
    cfe/trunk/test/CodeGen/code-coverage.c
    cfe/trunk/test/CodeGen/stack-protector.c
    cfe/trunk/test/CodeGenCXX/cxx11-noreturn.cpp
    cfe/trunk/test/CodeGenCXX/noinline-template.cpp
    cfe/trunk/test/CodeGenObjCXX/address-safety-attr.mm

Modified: cfe/trunk/test/CXX/special/class.dtor/p3-0x.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/special/class.dtor/p3-0x.cpp?rev=175652&r1=175651&r2=175652&view=diff
==============================================================================
--- cfe/trunk/test/CXX/special/class.dtor/p3-0x.cpp (original)
+++ cfe/trunk/test/CXX/special/class.dtor/p3-0x.cpp Wed Feb 20 13:30:01 2013
@@ -164,11 +164,11 @@ void tsw() {
   Sw<int> swi;
   Sw<B> swb;
 }
-// CHECK-NOT: define linkonce_odr {{.*}} @_ZN2SwI1BED1Ev({{.*}} #2
+// CHECK-NOT: define linkonce_odr {{.*}} @_ZN2SwI1BED1Ev({{.*}} #
 // CHECK: define linkonce_odr {{.*}} @_ZN2SwI1BED1Ev({{.*}}
 // CHECK: _ZTIi
 // CHECK: __cxa_call_unexpected
-// CHECK: define linkonce_odr {{.*}} @_ZN2SwIiED1Ev({{.*}} #2
+// CHECK: define linkonce_odr {{.*}} @_ZN2SwIiED1Ev({{.*}} [[ATTRGRP:#[0-9]+]]
 
 template <typename T>
 struct TVC : VX
@@ -176,7 +176,4 @@ struct TVC : VX
 template <typename T>
 TVC<T>::~TVC() {}
 
-// CHECK: attributes #0 = { "target-features"={{.*}} }
-// CHECK: attributes #1 = { noinline noreturn nounwind }
-// CHECK: attributes #2 = { nounwind "target-features"={{.*}} }
-// CHECK: attributes #3 = { inlinehint nounwind "target-features"={{.*}} }
+// CHECK: attributes [[ATTRGRP]] = { nounwind "target-features"={{.*}} }

Modified: cfe/trunk/test/CodeGen/address-safety-attr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/address-safety-attr.cpp?rev=175652&r1=175651&r2=175652&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/address-safety-attr.cpp (original)
+++ cfe/trunk/test/CodeGen/address-safety-attr.cpp Wed Feb 20 13:30:01 2013
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -o - %s -fsanitize=address | FileCheck -check-prefix ASAN %s
+// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck -check-prefix=WITHOUT %s
+// RUN: %clang_cc1 -emit-llvm -o - %s -fsanitize=address | FileCheck -check-prefix=ASAN %s
 // RUN: echo "src:%s" > %t
-// RUN: %clang_cc1 -emit-llvm -o - %s -fsanitize=address -fsanitize-blacklist=%t | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -o - %s -fsanitize=address -fsanitize-blacklist=%t | FileCheck -check-prefix=BL %s
 
 // FIXME: %t is like "src:x:\path\to\clang\test\CodeGen\address-safety-attr.cpp"
 // REQUIRES: shell
@@ -10,28 +10,33 @@
 // when AddressSanitizer is enabled, unless no_address_safety_analysis attribute
 // is present.
 
-// CHECK:  NoAddressSafety1{{.*}}#0
-// ASAN:  NoAddressSafety1{{.*}}#0
+// WITHOUT:  NoAddressSafety1{{.*}}) #[[NOATTR:[0-9]+]]
+// BL:  NoAddressSafety1{{.*}}) #[[NOATTR:[0-9]+]]
+// ASAN:  NoAddressSafety1{{.*}}) #[[NOATTR:[0-9]+]]
 __attribute__((no_address_safety_analysis))
 int NoAddressSafety1(int *a) { return *a; }
 
-// CHECK:  NoAddressSafety2{{.*}}#0
-// ASAN:  NoAddressSafety2{{.*}}#0
+// WITHOUT:  NoAddressSafety2{{.*}}) #[[NOATTR]]
+// BL:  NoAddressSafety2{{.*}}) #[[NOATTR]]
+// ASAN:  NoAddressSafety2{{.*}}) #[[NOATTR]]
 __attribute__((no_address_safety_analysis))
 int NoAddressSafety2(int *a);
 int NoAddressSafety2(int *a) { return *a; }
 
-// CHECK:  AddressSafetyOk{{.*}}#0
-// ASAN: AddressSafetyOk{{.*}}#1
+// WITHOUT:  AddressSafetyOk{{.*}}) #[[NOATTR]]
+// BL:  AddressSafetyOk{{.*}}) #[[NOATTR]]
+// ASAN: AddressSafetyOk{{.*}}) #[[WITH:[0-9]+]]
 int AddressSafetyOk(int *a) { return *a; }
 
-// CHECK:  TemplateAddressSafetyOk{{.*}}#0
-// ASAN: TemplateAddressSafetyOk{{.*}}#1
+// WITHOUT:  TemplateAddressSafetyOk{{.*}}) #[[NOATTR]]
+// BL:  TemplateAddressSafetyOk{{.*}}) #[[NOATTR]]
+// ASAN: TemplateAddressSafetyOk{{.*}}) #[[WITH]]
 template<int i>
 int TemplateAddressSafetyOk() { return i; }
 
-// CHECK:  TemplateNoAddressSafety{{.*}}#0
-// ASAN: TemplateNoAddressSafety{{.*}}#0
+// WITHOUT:  TemplateNoAddressSafety{{.*}}) #[[NOATTR]]
+// BL:  TemplateNoAddressSafety{{.*}}) #[[NOATTR]]
+// ASAN: TemplateNoAddressSafety{{.*}}) #[[NOATTR]]
 template<int i>
 __attribute__((no_address_safety_analysis))
 int TemplateNoAddressSafety() { return i; }
@@ -42,12 +47,12 @@ int force_instance = TemplateAddressSafe
 // Check that __cxx_global_var_init* get the address_safety attribute.
 int global1 = 0;
 int global2 = *(int*)((char*)&global1+1);
-// CHECK: @__cxx_global_var_init{{.*}}#1
+// WITHOUT: @__cxx_global_var_init{{.*}}#1
+// BL: @__cxx_global_var_init{{.*}}#1
 // ASAN: @__cxx_global_var_init{{.*}}#2
 
-// CHECK: attributes #0 = { nounwind "target-features"={{.*}} }
-// CHECK: attributes #1 = { nounwind }
+// WITHOUT: attributes #[[NOATTR]] = { nounwind "target-features"={{.*}} }
+// BL: attributes #[[NOATTR]] = { nounwind "target-features"={{.*}} }
 
-// ASAN: attributes #0 = { nounwind "target-features"={{.*}} }
-// ASAN: attributes #1 = { address_safety nounwind "target-features"={{.*}} }
-// ASAN: attributes #2 = { address_safety nounwind }
+// ASAN: attributes #[[NOATTR]] = { nounwind "target-features"={{.*}} }
+// ASAN: attributes #[[WITH]] = { address_safety nounwind "target-features"={{.*}} }

Modified: cfe/trunk/test/CodeGen/attr-coldhot.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/attr-coldhot.c?rev=175652&r1=175651&r2=175652&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/attr-coldhot.c (original)
+++ cfe/trunk/test/CodeGen/attr-coldhot.c Wed Feb 20 13:30:01 2013
@@ -4,8 +4,8 @@ int test1() __attribute__((__cold__)) {
   return 42;
 
 // Check that we set the optsize attribute on the function.
-// CHECK: @test1{{.*}}#0
+// CHECK: @test1{{.*}}[[ATTR:#[0-9]+]]
 // CHECK: ret
 }
 
-// CHECK: attributes #0 = { nounwind optsize "target-features"={{.*}} }
+// CHECK: attributes [[ATTR]] = { {{.*}}optsize{{.*}} }

Modified: cfe/trunk/test/CodeGen/attr-minsize.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/attr-minsize.cpp?rev=175652&r1=175651&r2=175652&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/attr-minsize.cpp (original)
+++ cfe/trunk/test/CodeGen/attr-minsize.cpp Wed Feb 20 13:30:01 2013
@@ -7,29 +7,29 @@
 // Check that we set the minsize attribute on each function
 // when Oz optimization level is set.
 
+__attribute__((minsize))
 int test1() {
   return 42;
-// Oz: @{{.*}}test1{{.*}}#0
-// Oz: ret
-// OTHER: @{{.*}}test1
-// OTHER-NOT: #1
-// OTHER: ret
+// Oz: @{{.*}}test1{{.*}}[[MINSIZE:#[0-9]+]]
+// OTHER: @{{.*}}test1{{.*}}[[MS:#[0-9]+]]
 }
 
 int test2() {
   return 42;
-// Oz: @{{.*}}test2{{.*}}#0
+// Oz: @{{.*}}test2{{.*}}[[MINSIZE]]
 // Oz: ret
 // OTHER: @{{.*}}test2
-// OTHER-NOT: #1
+// OTHER-NOT: [[MS]]
 // OTHER: ret
 }
 
-__attribute__((minsize))
 int test3() {
   return 42;
-// Oz: @{{.*}}test3{{.*}}#0
-// OTHER: @{{.*}}test3{{.*}}#1
+// Oz: @{{.*}}test3{{.*}}[[MINSIZE]]
+// Oz: ret
+// OTHER: @{{.*}}test3
+// OTHER-NOT: [[MS]]
+// OTHER: ret
 }
 
 // Check that the minsize attribute is well propagated through
@@ -44,16 +44,16 @@ void test4(T arg) {
 template
 void test4<int>(int arg);
 // Oz: define{{.*}}void @{{.*}}test4
-// Oz: #0
+// Oz: [[MINSIZE]]
 // OTHER: define{{.*}}void @{{.*}}test4
-// OTHER: #1
+// OTHER: [[MS]]
 
 template
 void test4<float>(float arg);
 // Oz: define{{.*}}void @{{.*}}test4
-// Oz: #0
+// Oz: [[MINSIZE]]
 // OTHER: define{{.*}}void @{{.*}}test4
-// OTHER: #1
+// OTHER: [[MS]]
 
 template<typename T>
 void test5(T arg) {
@@ -63,18 +63,17 @@ void test5(T arg) {
 template
 void test5<int>(int arg);
 // Oz: define{{.*}}void @{{.*}}test5
-// Oz: #0
+// Oz: [[MINSIZE]]
 // OTHER: define{{.*}}void @{{.*}}test5
-// OTHER-NOT: define{{.*}}void @{{.*}}test5{{.*}}#1
+// OTHER-NOT: define{{.*}}void @{{.*}}test5{{.*}}[[MS]]
 
 template
 void test5<float>(float arg);
 // Oz: define{{.*}}void @{{.*}}test5
-// Oz: #0
+// Oz: [[MINSIZE]]
 // OTHER: define{{.*}}void @{{.*}}test5
-// OTHER-NOT: define{{.*}}void @{{.*}}test5{{.*}}#1
+// OTHER-NOT: define{{.*}}void @{{.*}}test5{{.*}}[[MS]]
 
-// Oz: attributes #0 = { minsize nounwind optsize readnone "target-features"={{.*}} }
+// Oz: attributes [[MINSIZE]] = { minsize{{.*}} }
 
-// OTHER: attributes #0 = { nounwind {{.*}}"target-features"={{.*}} }
-// OTHER: attributes #1 = { minsize nounwind {{.*}}"target-features"={{.*}} }
+// OTHER: attributes [[MS]] = { minsize nounwind{{.*}} }

Modified: cfe/trunk/test/CodeGen/code-coverage.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/code-coverage.c?rev=175652&r1=175651&r2=175652&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/code-coverage.c (original)
+++ cfe/trunk/test/CodeGen/code-coverage.c Wed Feb 20 13:30:01 2013
@@ -14,10 +14,9 @@ int test1(int a) {
 
 // Check that the noredzone flag is set on the generated functions.
 
-// CHECK: void @__llvm_gcov_indirect_counter_increment(i32* %{{.*}}, i64** %{{.*}}) unnamed_addr #1
-// CHECK: void @__llvm_gcov_writeout() unnamed_addr #1
-// CHECK: void @__llvm_gcov_init() unnamed_addr #1
-// CHECK: void @__gcov_flush() unnamed_addr #1
+// CHECK: void @__llvm_gcov_indirect_counter_increment(i32* %{{.*}}, i64** %{{.*}}) unnamed_addr [[NRZ:#[0-9]+]]
+// CHECK: void @__llvm_gcov_writeout() unnamed_addr [[NRZ]]
+// CHECK: void @__llvm_gcov_init() unnamed_addr [[NRZ]]
+// CHECK: void @__gcov_flush() unnamed_addr [[NRZ]]
 
-// CHECK: attributes #0 = { noredzone nounwind "target-features"={{.*}} }
-// CHECK: attributes #1 = { noinline noredzone }
+// CHECK: attributes [[NRZ]] = { {{.*}}noredzone{{.*}} }

Modified: cfe/trunk/test/CodeGen/stack-protector.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/stack-protector.c?rev=175652&r1=175651&r2=175652&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/stack-protector.c (original)
+++ cfe/trunk/test/CodeGen/stack-protector.c Wed Feb 20 13:30:01 2013
@@ -17,14 +17,8 @@ void test1(const char *msg) {
   printf("%s\n", a);
 }
 
-// NOSSP: attributes #0 = { nounwind "target-features"={{.*}} }
-// NOSSP: attributes #1 = { "target-features"={{.*}} }
-// NOSSP: attributes #2 = { nounwind }
+// NOSSP: attributes #{{.*}} = { nounwind{{.*}} }
 
-// WITHSSP: attributes #0 = { nounwind ssp "target-features"={{.*}} }
-// WITHSSP: attributes #1 = { "target-features"={{.*}} }
-// WITHSSP: attributes #2 = { nounwind }
+// WITHSSP: attributes #{{.*}} = { nounwind ssp{{.*}} }
 
-// SSPREQ: attributes #0 = { nounwind sspreq "target-features"={{.*}} }
-// SSPREQ: attributes #1 = { "target-features"={{.*}} }
-// SSPREQ: attributes #2 = { nounwind }
+// SSPREQ: attributes #{{.*}} = { nounwind sspreq{{.*}} }

Modified: cfe/trunk/test/CodeGenCXX/cxx11-noreturn.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/cxx11-noreturn.cpp?rev=175652&r1=175651&r2=175652&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/cxx11-noreturn.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/cxx11-noreturn.cpp Wed Feb 20 13:30:01 2013
@@ -2,11 +2,9 @@
 
 int g();
 
-// CHECK: _Z1fv(){{.*}} #0
+// CHECK: _Z1fv(){{.*}} [[NR:#[0-9]+]]
 [[noreturn]] int f() {
   while (g()) {}
 }
 
-// CHECK: attributes #0 = { noreturn nounwind "target-features"={{.*}} }
-// CHECK: attributes #1 = { "target-features"={{.*}} }
-// CHECK: attributes #2 = { noreturn nounwind }
+// CHECK: attributes [[NR]] = { noreturn nounwind{{.*}} }

Modified: cfe/trunk/test/CodeGenCXX/noinline-template.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/noinline-template.cpp?rev=175652&r1=175651&r2=175652&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/noinline-template.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/noinline-template.cpp Wed Feb 20 13:30:01 2013
@@ -3,7 +3,7 @@
 // This was a problem in Sema, but only shows up as noinline missing
 // in CodeGen.
 
-// CHECK: define linkonce_odr void @_ZN6VectorIiE13growStorageByEv(%struct.Vector* %this) #1
+// CHECK: define linkonce_odr void @_ZN6VectorIiE13growStorageByEv(%struct.Vector* %this) [[NI:#[0-9]+]]
 
 template <class Ty> struct Vector  {
   void growStorageBy();
@@ -15,5 +15,4 @@ void foo() {
  strs.growStorageBy();
 }
 
-// CHECK: attributes #0 = { nounwind "target-features"={{.*}} }
-// CHECK: attributes #1 = { noinline nounwind "target-features"={{.*}} }
+// CHECK: attributes [[NI]] = { noinline nounwind{{.*}} }

Modified: cfe/trunk/test/CodeGenObjCXX/address-safety-attr.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/address-safety-attr.mm?rev=175652&r1=175651&r2=175652&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/address-safety-attr.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/address-safety-attr.mm Wed Feb 20 13:30:01 2013
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -o - %s -fsanitize=address | FileCheck -check-prefix ASAN %s
+// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck -check-prefix=WITHOUT %s
+// RUN: %clang_cc1 -emit-llvm -o - %s -fsanitize=address | FileCheck -check-prefix=ASAN %s
 
 @interface MyClass
 + (int) addressSafety:(int*)a;
@@ -7,15 +7,15 @@
 
 @implementation MyClass
 
-// CHECK:  +[MyClass load]{{.*}}#0
+// WITHOUT:  +[MyClass load]{{.*}}#0
 // ASAN: +[MyClass load]{{.*}}#0
 +(void) load { }
 
-// CHECK:  +[MyClass addressSafety:]{{.*}}#0
+// WITHOUT:  +[MyClass addressSafety:]{{.*}}#0
 // ASAN:  +[MyClass addressSafety:]{{.*}}#0
 + (int) addressSafety:(int*)a { return *a; }
 
 @end
 
-// CHECK: attributes #0 = { nounwind "target-features"={{.*}} }
-// ASAN: attributes #0 = { address_safety nounwind "target-features"={{.*}} }
+// WITHOUT: attributes #0 = { nounwind{{.*}} }
+// ASAN: attributes #0 = { address_safety nounwind{{.*}} }





More information about the cfe-commits mailing list