Merge "Switch to C++11 style [[noreturn]]."
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index d782aeb..7be4349 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -90,8 +90,7 @@
   va_end(ap);
 }
 
-static void Usage(const char* fmt, ...) NO_RETURN;
-static void Usage(const char* fmt, ...) {
+[[noreturn]] static void Usage(const char* fmt, ...) {
   va_list ap;
   va_start(ap, fmt);
   UsageErrorV(fmt, ap);
@@ -663,7 +662,7 @@
     Message('W', message);
   }
 
-  static void Fatal(const std::string& message) NO_RETURN {
+  [[noreturn]] static void Fatal(const std::string& message) {
     Message('F', message);
     exit(1);
   }
diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc
index 2d165b0..4ed428c 100644
--- a/patchoat/patchoat.cc
+++ b/patchoat/patchoat.cc
@@ -644,8 +644,7 @@
   va_end(ap);
 }
 
-static void Usage(const char *fmt, ...) NO_RETURN;
-static void Usage(const char *fmt, ...) {
+[[noreturn]] static void Usage(const char *fmt, ...) {
   va_list ap;
   va_start(ap, fmt);
   UsageErrorV(fmt, ap);
diff --git a/runtime/base/macros.h b/runtime/base/macros.h
index bbe0f5a..f5a38bb 100644
--- a/runtime/base/macros.h
+++ b/runtime/base/macros.h
@@ -177,7 +177,6 @@
 
 #define PURE __attribute__ ((__pure__))
 #define WARN_UNUSED __attribute__((warn_unused_result))
-#define NO_RETURN __attribute__((noreturn))
 
 template<typename T> void UNUSED(const T&) {}
 #define UNREACHABLE  __builtin_unreachable
diff --git a/runtime/native/java_lang_Runtime.cc b/runtime/native/java_lang_Runtime.cc
index 62ca14d..f9a1cee 100644
--- a/runtime/native/java_lang_Runtime.cc
+++ b/runtime/native/java_lang_Runtime.cc
@@ -37,8 +37,7 @@
   Runtime::Current()->GetHeap()->CollectGarbage(false);
 }
 
-static void Runtime_nativeExit(JNIEnv*, jclass, jint status) NO_RETURN;
-static void Runtime_nativeExit(JNIEnv*, jclass, jint status) {
+[[noreturn]] static void Runtime_nativeExit(JNIEnv*, jclass, jint status) {
   LOG(INFO) << "System.exit called, status: " << status;
   Runtime::Current()->CallExitHook(status);
   exit(status);
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 30dabe7..7bffc33 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -177,10 +177,7 @@
 
   // Aborts semi-cleanly. Used in the implementation of LOG(FATAL), which most
   // callers should prefer.
-  // This isn't marked ((noreturn)) because then gcc will merge multiple calls
-  // in a single function together. This reduces code size slightly, but means
-  // that the native stack trace we get may point at the wrong call site.
-  static void Abort() NO_RETURN LOCKS_EXCLUDED(Locks::abort_lock_);
+  [[noreturn]] static void Abort() LOCKS_EXCLUDED(Locks::abort_lock_);
 
   // Returns the "main" ThreadGroup, used when attaching user threads.
   jobject GetMainThreadGroup() const;