[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 07:39:51 PST 2020
ABataev created this revision.
ABataev added a reviewer: grokos.
Herald added a project: OpenMP.
fixed the warning from gcc since prios 0-100 are reserved for the internal use.
Repository:
rG LLVM Github Monorepo
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.247646.patch
Type: text/x-patch
Size: 672 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200302/606abd31/attachment.bin>
More information about the Openmp-commits
mailing list