Implement C++11 semantics for [[noreturn]] attribute. This required splitting
it apart from [[gnu::noreturn]] / __attribute__((noreturn)), since their
semantics are not equivalent (for instance, we treat [[gnu::noreturn]] as
affecting the function type, whereas [[noreturn]] does not).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172691 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 878b73d..d9a0045 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -989,7 +989,8 @@
         FuncAttrs.addAttribute(llvm::Attribute::NoUnwind);
     }
 
-    if (TargetDecl->hasAttr<NoReturnAttr>())
+    if (TargetDecl->hasAttr<NoReturnAttr>() ||
+        TargetDecl->hasAttr<CXX11NoReturnAttr>())
       FuncAttrs.addAttribute(llvm::Attribute::NoReturn);
 
     if (TargetDecl->hasAttr<ReturnsTwiceAttr>())