mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-24 03:25:00 +00:00
report_fatal_error: Simplify a possible ambiguity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118972 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5b1d431217
commit
afd693cff3
@ -16,6 +16,7 @@
|
||||
#define LLVM_SUPPORT_ERRORHANDLING_H
|
||||
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include <string>
|
||||
|
||||
namespace llvm {
|
||||
@ -74,6 +75,7 @@ namespace llvm {
|
||||
/// does not return.
|
||||
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(const char *reason);
|
||||
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(const std::string &reason);
|
||||
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(StringRef reason);
|
||||
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(const Twine &reason);
|
||||
|
||||
/// This function calls abort(), and prints the optional message to stderr.
|
||||
|
@ -58,6 +58,10 @@ void llvm::report_fatal_error(const std::string &Reason) {
|
||||
report_fatal_error(Twine(Reason));
|
||||
}
|
||||
|
||||
void llvm::report_fatal_error(StringRef Reason) {
|
||||
report_fatal_error(Twine(Reason));
|
||||
}
|
||||
|
||||
void llvm::report_fatal_error(const Twine &Reason) {
|
||||
if (ErrorHandler) {
|
||||
ErrorHandler(ErrorHandlerUserData, Reason.str());
|
||||
|
Loading…
x
Reference in New Issue
Block a user