Skip to content

Commit 1e6402a

Browse files
authored
Merge pull request swiftlang#38670 from MaskRay/noreturn
Replace LLVM_ATTRIBUTE_NORETURN with C++11 [[noreturn]]
2 parents 69bdaad + 801df74 commit 1e6402a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/IRGen/IRGenModule.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ class IRGenModule {
852852
llvm::PointerType *getEnumValueWitnessTablePtrTy();
853853

854854
void unimplemented(SourceLoc, StringRef Message);
855-
LLVM_ATTRIBUTE_NORETURN
855+
[[noreturn]]
856856
void fatal_unimplemented(SourceLoc, StringRef Message);
857857
void error(SourceLoc loc, const Twine &message);
858858

lib/Serialization/ModuleFile.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ class ModuleFile
333333

334334
/// Emits one last diagnostic, adds the current module details and errors to
335335
/// the pretty stack trace, and then aborts.
336-
LLVM_ATTRIBUTE_NORETURN void fatal(llvm::Error error) const;
336+
[[noreturn]] void fatal(llvm::Error error) const;
337337
void fatalIfNotSuccess(llvm::Error error) const {
338338
if (error)
339339
fatal(std::move(error));
@@ -344,7 +344,7 @@ class ModuleFile
344344
fatal(expected.takeError());
345345
}
346346

347-
LLVM_ATTRIBUTE_NORETURN void fatal() const {
347+
[[noreturn]] void fatal() const {
348348
fatal(llvm::make_error<llvm::StringError>(
349349
"(see \"While...\" info below)", llvm::inconvertibleErrorCode()));
350350
}

lib/Serialization/ModuleFileSharedCore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ class ModuleFileSharedCore {
371371

372372
/// Emits one last diagnostic, logs the error, and then aborts for the stack
373373
/// trace.
374-
LLVM_ATTRIBUTE_NORETURN void fatal(llvm::Error error) const;
374+
[[noreturn]] void fatal(llvm::Error error) const;
375375
void fatalIfNotSuccess(llvm::Error error) const {
376376
if (error)
377377
fatal(std::move(error));

0 commit comments

Comments
 (0)