Revise r110163: don't mark weak functions nounwind, because the optimizer
treats that as a contract to be fulfilled by any replacements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110864 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/unwind-attr.c b/test/CodeGen/unwind-attr.c
index 459176c..c588ca8 100644
--- a/test/CodeGen/unwind-attr.c
+++ b/test/CodeGen/unwind-attr.c
@@ -15,3 +15,10 @@
 int test1(void) {
   return 0;
 }
+
+// <rdar://problem/8283071>: not for weak functions
+// CHECK:       define weak [[INT:i.*]] @test2() {
+// CHECK-NOEXC: define weak [[INT:i.*]] @test2() nounwind {
+__attribute__((weak)) int test2(void) {
+  return 0;
+}