[Openmp-commits] [PATCH] D75458: p[LIBOMPTARGET]Lower priority of global constructor/destructor to silence the warning from gcc.

Alexey Bataev via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Mar 2 12:30:19 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGc4a9d976c139: [LIBOMPTARGET]Lower priority of  global constructor/destructor to silence theā€¦ (authored by ABataev).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75458/new/

https://reviews.llvm.org/D75458

Files:
  openmp/libomptarget/src/rtl.cpp


Index: openmp/libomptarget/src/rtl.cpp
===================================================================
--- openmp/libomptarget/src/rtl.cpp
+++ openmp/libomptarget/src/rtl.cpp
@@ -37,7 +37,7 @@
 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 @@
   TblMapMtx = new std::mutex();
 }
 
-__attribute__((destructor(0))) void deinit() {
+__attribute__((destructor(101))) void deinit() {
   DP("Deinit target library!\n");
   delete RTLs;
   delete RTLsMtx;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75458.247708.patch
Type: text/x-patch
Size: 672 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200302/df162e27/attachment.bin>


More information about the Openmp-commits mailing list