Skip to content

Commit

Permalink
[OpenMP][libomptarget] Minor fix in x86_64 plugin
Browse files Browse the repository at this point in the history
Call to remove() was passing invalid address for the file name.

Differential Revision: https://reviews.llvm.org/D109846
  • Loading branch information
hansangbae committed Sep 15, 2021
1 parent d249200 commit ae2a5fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openmp/libomptarget/plugins/generic-elf-64bit/src/rtl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

/// Array of Dynamic libraries loaded for this target.
struct DynLibTy {
char *FileName;
std::string FileName;
void *Handle;
};

Expand Down Expand Up @@ -100,7 +100,7 @@ class RTLDeviceInfoTy {
for (auto &lib : DynLibs) {
if (lib.Handle) {
dlclose(lib.Handle);
remove(lib.FileName);
remove(lib.FileName.c_str());
}
}
}
Expand Down

0 comments on commit ae2a5fa

Please sign in to comment.