aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/Compiler.h
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2009-07-07 17:32:34 +0000
committerTorok Edwin <edwintorok@gmail.com>2009-07-07 17:32:34 +0000
commit31e2466f159a887fed9139067a676f65adf2a8c3 (patch)
tree038fcdc29c6f146048427213045ae05a3e4fe0b8 /include/llvm/Support/Compiler.h
parent9903527c142a37a25ea3b2212cb04a182331fbfa (diff)
Introduce new error handling API.
This will replace exit()/abort() style error handling with an API that allows clients to register custom error handling hooks. The default is to call exit(1) when no error handler is provided. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74922 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/Compiler.h')
-rw-r--r--include/llvm/Support/Compiler.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h
index 90292df381..853324611b 100644
--- a/include/llvm/Support/Compiler.h
+++ b/include/llvm/Support/Compiler.h
@@ -56,4 +56,10 @@
#define DISABLE_INLINE
#endif
+#ifdef __GNUC__
+#define NORETURN __attribute__((noreturn))
+#else
+#define NORETURN
+#endif
+
#endif