From: Bill Wendling Date: Wed, 20 Feb 2013 19:30:01 +0000 (+0000) Subject: Attempt to clean up tests for non-X86 platforms. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4467d79ad4e477b6aec02b9886b4434affa7de2a;p=platform%2Fupstream%2Fllvm.git Attempt to clean up tests for non-X86 platforms. llvm-svn: 175652 --- diff --git a/clang/test/CXX/special/class.dtor/p3-0x.cpp b/clang/test/CXX/special/class.dtor/p3-0x.cpp index a3d890b..c3d3f6a 100644 --- a/clang/test/CXX/special/class.dtor/p3-0x.cpp +++ b/clang/test/CXX/special/class.dtor/p3-0x.cpp @@ -164,11 +164,11 @@ void tsw() { Sw swi; Sw 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 struct TVC : VX @@ -176,7 +176,4 @@ struct TVC : VX template TVC::~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"={{.*}} } diff --git a/clang/test/CodeGen/address-safety-attr.cpp b/clang/test/CodeGen/address-safety-attr.cpp index aedbbc2..827f8d1 100644 --- a/clang/test/CodeGen/address-safety-attr.cpp +++ b/clang/test/CodeGen/address-safety-attr.cpp @@ -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 TemplateAddressSafetyOk() { return i; } -// CHECK: TemplateNoAddressSafety{{.*}}#0 -// ASAN: TemplateNoAddressSafety{{.*}}#0 +// WITHOUT: TemplateNoAddressSafety{{.*}}) #[[NOATTR]] +// BL: TemplateNoAddressSafety{{.*}}) #[[NOATTR]] +// ASAN: TemplateNoAddressSafety{{.*}}) #[[NOATTR]] template __attribute__((no_address_safety_analysis)) int TemplateNoAddressSafety() { return i; } @@ -42,12 +47,12 @@ int force_instance = TemplateAddressSafetyOk<42>() // 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"={{.*}} } diff --git a/clang/test/CodeGen/attr-coldhot.c b/clang/test/CodeGen/attr-coldhot.c index f553b13..a277119 100644 --- a/clang/test/CodeGen/attr-coldhot.c +++ b/clang/test/CodeGen/attr-coldhot.c @@ -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{{.*}} } diff --git a/clang/test/CodeGen/attr-minsize.cpp b/clang/test/CodeGen/attr-minsize.cpp index 5611916..997194d 100644 --- a/clang/test/CodeGen/attr-minsize.cpp +++ b/clang/test/CodeGen/attr-minsize.cpp @@ -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 arg); // Oz: define{{.*}}void @{{.*}}test4 -// Oz: #0 +// Oz: [[MINSIZE]] // OTHER: define{{.*}}void @{{.*}}test4 -// OTHER: #1 +// OTHER: [[MS]] template void test4(float arg); // Oz: define{{.*}}void @{{.*}}test4 -// Oz: #0 +// Oz: [[MINSIZE]] // OTHER: define{{.*}}void @{{.*}}test4 -// OTHER: #1 +// OTHER: [[MS]] template void test5(T arg) { @@ -63,18 +63,17 @@ void test5(T arg) { template void test5(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 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{{.*}} } diff --git a/clang/test/CodeGen/code-coverage.c b/clang/test/CodeGen/code-coverage.c index 3c9392d..f165e30 100644 --- a/clang/test/CodeGen/code-coverage.c +++ b/clang/test/CodeGen/code-coverage.c @@ -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{{.*}} } diff --git a/clang/test/CodeGen/stack-protector.c b/clang/test/CodeGen/stack-protector.c index b4e20cd..e47e5b3 100644 --- a/clang/test/CodeGen/stack-protector.c +++ b/clang/test/CodeGen/stack-protector.c @@ -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{{.*}} } diff --git a/clang/test/CodeGenCXX/cxx11-noreturn.cpp b/clang/test/CodeGenCXX/cxx11-noreturn.cpp index fe67a29..31c651d 100644 --- a/clang/test/CodeGenCXX/cxx11-noreturn.cpp +++ b/clang/test/CodeGenCXX/cxx11-noreturn.cpp @@ -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{{.*}} } diff --git a/clang/test/CodeGenCXX/noinline-template.cpp b/clang/test/CodeGenCXX/noinline-template.cpp index af88a84..51a84f7 100644 --- a/clang/test/CodeGenCXX/noinline-template.cpp +++ b/clang/test/CodeGenCXX/noinline-template.cpp @@ -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 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{{.*}} } diff --git a/clang/test/CodeGenObjCXX/address-safety-attr.mm b/clang/test/CodeGenObjCXX/address-safety-attr.mm index a2d9aa7..cd9abaf 100644 --- a/clang/test/CodeGenObjCXX/address-safety-attr.mm +++ b/clang/test/CodeGenObjCXX/address-safety-attr.mm @@ -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{{.*}} }