Commit c4a9d976 authored by Alexey Bataev's avatar Alexey Bataev
Browse files

[LIBOMPTARGET]Lower priority of global constructor/destructor to silence the warning from gcc.

Summary: fixed the warning from gcc since prios 0-100 are reserved for the internal use.

Reviewers: grokos

Subscribers: kkwli0, caomhin, openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D75458
parent 1bacdcf4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ std::mutex *TrlTblMtx;
HostPtrToTableMapTy *HostPtrToTableMap;
std::mutex *TblMapMtx;

__attribute__((constructor(0))) void init() {
__attribute__((constructor(101))) void init() {
  DP("Init target library!\n");
  RTLs = new RTLsTy();
  RTLsMtx = new std::mutex();
@@ -47,7 +47,7 @@ __attribute__((constructor(0))) void init() {
  TblMapMtx = new std::mutex();
}

__attribute__((destructor(0))) void deinit() {
__attribute__((destructor(101))) void deinit() {
  DP("Deinit target library!\n");
  delete RTLs;
  delete RTLsMtx;