llvm.org GIT mirror llvm / afd693c
report_fatal_error: Simplify a possible ambiguity. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118972 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 9 years ago
2 changed file(s) with 6 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1515 #define LLVM_SUPPORT_ERRORHANDLING_H
1616
1717 #include "llvm/Support/Compiler.h"
18 #include "llvm/ADT/StringRef.h"
1819 #include
1920
2021 namespace llvm {
7374 /// does not return.
7475 LLVM_ATTRIBUTE_NORETURN void report_fatal_error(const char *reason);
7576 LLVM_ATTRIBUTE_NORETURN void report_fatal_error(const std::string &reason);
77 LLVM_ATTRIBUTE_NORETURN void report_fatal_error(StringRef reason);
7678 LLVM_ATTRIBUTE_NORETURN void report_fatal_error(const Twine &reason);
7779
7880 /// This function calls abort(), and prints the optional message to stderr.
5757 report_fatal_error(Twine(Reason));
5858 }
5959
60 void llvm::report_fatal_error(StringRef Reason) {
61 report_fatal_error(Twine(Reason));
62 }
63
6064 void llvm::report_fatal_error(const Twine &Reason) {
6165 if (ErrorHandler) {
6266 ErrorHandler(ErrorHandlerUserData, Reason.str());