replace unreachable returns by aborts

functionally identical but nicer, as discussed in PR
This commit is contained in:
jgehw 2020-08-28 18:26:11 +02:00
parent 8445db1f63
commit 786c85a58b
3 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ class RemoteDevice : public Device {
ResourceMgr* resource_manager() override { ResourceMgr* resource_manager() override {
LOG(FATAL) << "Accessing the resource manager of a remote device is not " LOG(FATAL) << "Accessing the resource manager of a remote device is not "
<< "supported."; << "supported.";
return nullptr; std::abort();
} }
bool IsLocal() const override { return false; } bool IsLocal() const override { return false; }

View File

@ -70,7 +70,7 @@ const DeviceAttributes& DeviceBase::attributes() const {
const string& DeviceBase::name() const { const string& DeviceBase::name() const {
LOG(FATAL) << "Device does not implement name()"; LOG(FATAL) << "Device does not implement name()";
return ""; std::abort();
} }
void DeviceBase::set_eigen_cpu_device(Eigen::ThreadPoolDevice* d) { void DeviceBase::set_eigen_cpu_device(Eigen::ThreadPoolDevice* d) {

View File

@ -328,7 +328,7 @@ string GetTempFilename(const string& extension) {
} }
} }
LOG(FATAL) << "No temp directory found."; LOG(FATAL) << "No temp directory found.";
return ""; std::abort();
#endif #endif
} }