Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/android_camera/app/src/main/jni/tvm_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ namespace tvm {
namespace runtime {
namespace detail {
// Override logging mechanism
void LogFatalImpl(const std::string& file, int lineno, const std::string& message) {
[[noreturn]] void LogFatalImpl(const std::string& file, int lineno, const std::string& message) {
std::string m = file + ":" + std::to_string(lineno) + ": " + message;
__android_log_write(ANDROID_LOG_DEBUG, "TVM_RUNTIME", m.c_str());
throw InternalError(file, lineno, message);
Expand Down
2 changes: 1 addition & 1 deletion apps/android_rpc/app/src/main/jni/tvm_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace tvm {
namespace runtime {
namespace detail {
// Override logging mechanism
void LogFatalImpl(const std::string& file, int lineno, const std::string& message) {
[[noreturn]] void LogFatalImpl(const std::string& file, int lineno, const std::string& message) {
std::string m = file + ":" + std::to_string(lineno) + ": " + message;
__android_log_write(ANDROID_LOG_DEBUG, "TVM_RUNTIME", m.c_str());
throw InternalError(file, lineno, message);
Expand Down
2 changes: 1 addition & 1 deletion apps/ios_rpc/tvmrpc/TVMRuntime.mm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
namespace detail {

// Override logging mechanism
void LogFatalImpl(const std::string& file, int lineno, const std::string& message) {
[[noreturn]] void LogFatalImpl(const std::string& file, int lineno, const std::string& message) {
throw tvm::runtime::InternalError(file, lineno, message);
}

Expand Down
5 changes: 3 additions & 2 deletions include/tvm/runtime/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ namespace detail {
*
* \sa TVM_LOG_CUSTOMIZE
*/
TVM_DLL void LogFatalImpl(const std::string& file, int lineno, const std::string& message);
[[noreturn]] TVM_DLL void LogFatalImpl(const std::string& file, int lineno,
const std::string& message);

/*!
* \brief Custom implementations of LogMessage.
Expand All @@ -306,7 +307,7 @@ class LogFatal {
#pragma disagnostic push
#pragma warning(disable : 4722)
#endif
~LogFatal() TVM_THROW_EXCEPTION { LogFatalImpl(file_, lineno_, stream_.str()); }
[[noreturn]] ~LogFatal() TVM_THROW_EXCEPTION { LogFatalImpl(file_, lineno_, stream_.str()); }
#ifdef _MSC_VER
#pragma disagnostic pop
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/hexagon/hexagon_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void HexagonLog(const std::string& file, int lineno, const std::string& message)
} // namespace

namespace detail {
void LogFatalImpl(const std::string& file, int lineno, const std::string& message) {
[[noreturn]] void LogFatalImpl(const std::string& file, int lineno, const std::string& message) {
HexagonLog(file, lineno, message);
throw InternalError(file, lineno, message);
}
Expand Down
2 changes: 1 addition & 1 deletion web/emcc/wasm_runtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ namespace tvm {
namespace runtime {
namespace detail {
// Override logging mechanism
void LogFatalImpl(const std::string& file, int lineno, const std::string& message) {
[[noreturn]] void LogFatalImpl(const std::string& file, int lineno, const std::string& message) {
std::cerr << "[FATAL] " << file << ":" << lineno << ": " << message << std::endl;
abort();
}
Expand Down