Add the 'target-cpu' and 'target-features' attributes to functions.

The back-end will use these values to reconfigure code generation for different
features.

llvm-svn: 175308
diff --git a/clang/test/CodeGenCXX/cxx11-exception-spec.cpp b/clang/test/CodeGenCXX/cxx11-exception-spec.cpp
index 194b80c..03b17d1 100644
--- a/clang/test/CodeGenCXX/cxx11-exception-spec.cpp
+++ b/clang/test/CodeGenCXX/cxx11-exception-spec.cpp
@@ -10,9 +10,9 @@
   static void g() noexcept(sizeof(T) == 4);
 };
 
-// CHECK: define {{.*}} @_Z1fIsEvv() {
+// CHECK: define {{.*}} @_Z1fIsEvv() "target-features"={{.*}} {
 template<> void f<short>() { h(); }
-// CHECK: define {{.*}} @_Z1fIA2_sEvv() nounwind {
+// CHECK: define {{.*}} @_Z1fIA2_sEvv() nounwind "target-features"={{.*}} {
 template<> void f<short[2]>() noexcept { h(); }
 
 // CHECK: define {{.*}} @_ZN1SIsE1fEv()
@@ -21,9 +21,9 @@
 // CHECK: define {{.*}} @_ZN1SIA2_sE1fEv() nounwind
 template<> void S<short[2]>::f() noexcept { h(); }
 
-// CHECK: define {{.*}} @_Z1fIDsEvv() {
+// CHECK: define {{.*}} @_Z1fIDsEvv() "target-features"={{.*}} {
 template void f<char16_t>();
-// CHECK: define {{.*}} @_Z1fIA2_DsEvv() nounwind {
+// CHECK: define {{.*}} @_Z1fIA2_DsEvv() nounwind "target-features"={{.*}}  {
 template void f<char16_t[2]>();
 
 // CHECK: define {{.*}} @_ZN1SIDsE1fEv()
@@ -33,9 +33,9 @@
 template void S<char16_t[2]>::f();
 
 void h() {
-  // CHECK: define {{.*}} @_Z1fIiEvv() nounwind {
+  // CHECK: define {{.*}} @_Z1fIiEvv() nounwind "target-features"={{.*}} {
   f<int>();
-  // CHECK: define {{.*}} @_Z1fIA2_iEvv() {
+  // CHECK: define {{.*}} @_Z1fIA2_iEvv() "target-features"={{.*}} {
   f<int[2]>();
 
   // CHECK: define {{.*}} @_ZN1SIiE1fEv() nounwind
@@ -44,9 +44,9 @@
   // CHECK-NOT: nounwind
   S<int[2]>::f();
 
-  // CHECK: define {{.*}} @_Z1fIfEvv() nounwind {
+  // CHECK: define {{.*}} @_Z1fIfEvv() nounwind "target-features"={{.*}} {
   void (*f1)() = &f<float>;
-  // CHECK: define {{.*}} @_Z1fIdEvv() {
+  // CHECK: define {{.*}} @_Z1fIdEvv() "target-features"={{.*}} {
   void (*f2)() = &f<double>;
 
   // CHECK: define {{.*}} @_ZN1SIfE1fEv() nounwind
@@ -55,9 +55,9 @@
   // CHECK-NOT: nounwind
   void (*f4)() = &S<double>::f;
 
-  // CHECK: define {{.*}} @_Z1fIA4_cEvv() nounwind {
+  // CHECK: define {{.*}} @_Z1fIA4_cEvv() nounwind "target-features"={{.*}} {
   (void)&f<char[4]>;
-  // CHECK: define {{.*}} @_Z1fIcEvv() {
+  // CHECK: define {{.*}} @_Z1fIcEvv() "target-features"={{.*}} {
   (void)&f<char>;
 
   // CHECK: define {{.*}} @_ZN1SIA4_cE1fEv() nounwind