[Openmp-commits] [openmp] c4a9d97 - [LIBOMPTARGET]Lower priority of global constructor/destructor to silence the warning from gcc.
Alexey Bataev via Openmp-commits
openmp-commits at lists.llvm.org
Mon Mar 2 12:21:42 PST 2020
Author: Alexey Bataev
Date: 2020-03-02T15:15:11-05:00
New Revision: c4a9d976c139f4dc7241809aa965fbc5355314fc
URL: https://github.com/llvm/llvm-project/commit/c4a9d976c139f4dc7241809aa965fbc5355314fc
DIFF: https://github.com/llvm/llvm-project/commit/c4a9d976c139f4dc7241809aa965fbc5355314fc.diff
LOG: [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
Added:
Modified:
openmp/libomptarget/src/rtl.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/src/rtl.cpp b/openmp/libomptarget/src/rtl.cpp
index 3e1b52718e2e..3b9efd6ecbdf 100644
--- a/openmp/libomptarget/src/rtl.cpp
+++ b/openmp/libomptarget/src/rtl.cpp
@@ -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;
More information about the Openmp-commits
mailing list