forked from OSchip/llvm-project
Replace LLVM_ATTRIBUTE_NORETURN with C++11 [[noreturn]]. NFC
[[noreturn]] can be used since Oct 2016 when the minimum compiler requirement was bumped to GCC 4.8/MSVC 2015.
This commit is contained in:
parent
172a55e7a4
commit
72a83674dd
|
@ -69,7 +69,7 @@ static cl::opt<std::string> OutputFileName(
|
|||
cl::desc("Output trace to the given file name or '-' for stdout."),
|
||||
cl::cat(Cat));
|
||||
|
||||
LLVM_ATTRIBUTE_NORETURN static void error(Twine Message) {
|
||||
[[noreturn]] static void error(Twine Message) {
|
||||
WithColor::error() << Message << '\n';
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -614,7 +614,7 @@ struct DiagnosticTextBuilder {
|
|||
return It->second.Root;
|
||||
}
|
||||
|
||||
LLVM_ATTRIBUTE_NORETURN void PrintFatalError(llvm::Twine const &Msg) const {
|
||||
[[noreturn]] void PrintFatalError(llvm::Twine const &Msg) const {
|
||||
assert(EvaluatingRecord && "not evaluating a record?");
|
||||
llvm::PrintFatalError(EvaluatingRecord->getLoc(), Msg);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace fir {
|
|||
|
||||
/// Fatal error reporting helper. Report a fatal error with a source location
|
||||
/// and immediately abort flang.
|
||||
LLVM_ATTRIBUTE_NORETURN inline void emitFatalError(mlir::Location loc,
|
||||
[[noreturn]] inline void emitFatalError(mlir::Location loc,
|
||||
const llvm::Twine &message) {
|
||||
mlir::emitError(loc, message);
|
||||
llvm::report_fatal_error("aborting");
|
||||
|
|
|
@ -46,7 +46,7 @@ static void FixupEnvironment(Environment &env) {
|
|||
#endif
|
||||
}
|
||||
|
||||
static void LLVM_ATTRIBUTE_NORETURN ExitWithError(int error_fd,
|
||||
[[noreturn]] static void ExitWithError(int error_fd,
|
||||
const char *operation) {
|
||||
int err = errno;
|
||||
llvm::raw_fd_ostream os(error_fd, true);
|
||||
|
@ -88,7 +88,7 @@ static void DupDescriptor(int error_fd, const FileSpec &file_spec, int fd,
|
|||
return;
|
||||
}
|
||||
|
||||
static void LLVM_ATTRIBUTE_NORETURN ChildFunc(int error_fd,
|
||||
[[noreturn]] static void ChildFunc(int error_fd,
|
||||
const ProcessLaunchInfo &info) {
|
||||
if (info.GetFlags().Test(eLaunchFlagLaunchInSeparateProcessGroup)) {
|
||||
if (setpgid(0, 0) != 0)
|
||||
|
|
|
@ -29,7 +29,7 @@ using namespace lldb_private::process_linux;
|
|||
#if defined(__arm64__) || defined(__aarch64__)
|
||||
namespace {
|
||||
|
||||
void LLVM_ATTRIBUTE_NORETURN Child() {
|
||||
[[noreturn]] void Child() {
|
||||
if (ptrace(PTRACE_TRACEME, 0, nullptr, nullptr) == -1)
|
||||
_exit(1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue