SWDEV-421102 - make clr compatible with c++20
Change-Id: Ia692817232caa3ee97dc0b2139645a0474b582e1
This commit is contained in:
@@ -440,7 +440,7 @@ hipError_t CodeObject::ExtractCodeObjectFromFile(
|
||||
std::vector<std::pair<const void*, size_t>>& code_objs) {
|
||||
hipError_t hip_error = hipSuccess;
|
||||
|
||||
if (fdesc < 0) {
|
||||
if (!amd::Os::isValidFileDesc(fdesc)) {
|
||||
return hipErrorFileNotFound;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ FatBinaryInfo::~FatBinaryInfo() {
|
||||
|
||||
} else {
|
||||
// Using Runtime Unbundler
|
||||
if (fdesc_ > 0) {
|
||||
if (amd::Os::isValidFileDesc(fdesc_)) {
|
||||
if (fsize_ && !amd::Os::MemoryUnmapFile(image_, fsize_)) {
|
||||
LogPrintfError("Cannot unmap file for fdesc: %d fsize: %d", fdesc_, fsize_);
|
||||
assert(false);
|
||||
@@ -183,7 +183,7 @@ hipError_t FatBinaryInfo::ExtractFatBinaryUsingCOMGR(const std::vector<hip::Devi
|
||||
|
||||
#if !defined(_WIN32)
|
||||
// Using the file descriptor and file size, map the data object.
|
||||
if (fdesc_ > 0) {
|
||||
if (amd::Os::isValidFileDesc(fdesc_)) {
|
||||
guarantee(fsize_ > 0, "Cannot have a file size of 0, fdesc: %d fname: %s \n",
|
||||
fdesc_, fname_.c_str());
|
||||
if ((comgr_status = amd_comgr_set_data_from_file_slice(data_object, fdesc_, foffset_,
|
||||
|
||||
Reference in New Issue
Block a user