mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Make NORETURN working with MSVC. MSVC only accepts NORETURN in front of the
decl so move it there. GCC accepts it both in front and after decls. llvm-svn: 88791
This commit is contained in:
parent
59040c2825
commit
521985553a
@ -58,6 +58,8 @@
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define NORETURN __attribute__((noreturn))
|
||||
#elif defined(_MSC_VER)
|
||||
#define NORETURN __declspec(noreturn)
|
||||
#else
|
||||
#define NORETURN
|
||||
#endif
|
||||
|
@ -60,15 +60,15 @@ namespace llvm {
|
||||
/// standard error, followed by a newline.
|
||||
/// After the error handler is called this function will call exit(1), it
|
||||
/// does not return.
|
||||
void llvm_report_error(const char *reason) NORETURN;
|
||||
void llvm_report_error(const std::string &reason) NORETURN;
|
||||
void llvm_report_error(const Twine &reason) NORETURN;
|
||||
NORETURN void llvm_report_error(const char *reason);
|
||||
NORETURN void llvm_report_error(const std::string &reason);
|
||||
NORETURN void llvm_report_error(const Twine &reason);
|
||||
|
||||
/// This function calls abort(), and prints the optional message to stderr.
|
||||
/// Use the llvm_unreachable macro (that adds location info), instead of
|
||||
/// calling this function directly.
|
||||
void llvm_unreachable_internal(const char *msg=0, const char *file=0,
|
||||
unsigned line=0) NORETURN;
|
||||
NORETURN void llvm_unreachable_internal(const char *msg=0,
|
||||
const char *file=0, unsigned line=0);
|
||||
}
|
||||
|
||||
/// Prints the message and location info to stderr in !NDEBUG builds.
|
||||
|
Loading…
Reference in New Issue
Block a user