[Openmp-commits] [PATCH] D95486: [libomptarget][NFC] Avoid gcc 5/6 issue with lambda captures.
Vyacheslav Zakharin via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jan 26 16:08:19 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3caa2d3354e3: [libomptarget][NFC] Avoid gcc 5/6 issue with lambda captures. (authored by vzakhari).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95486/new/
https://reviews.llvm.org/D95486
Files:
openmp/libomptarget/include/Debug.h
Index: openmp/libomptarget/include/Debug.h
===================================================================
--- openmp/libomptarget/include/Debug.h
+++ openmp/libomptarget/include/Debug.h
@@ -53,7 +53,8 @@
OMP_INFOTYPE_ALL = 0xffffffff,
};
-static inline uint32_t getInfoLevel() {
+// Add __attribute__((used)) to work around a bug in gcc 5/6.
+static inline uint32_t __attribute__((used)) getInfoLevel() {
static uint32_t InfoLevel = 0;
static std::once_flag Flag{};
std::call_once(Flag, []() {
@@ -64,7 +65,8 @@
return InfoLevel;
}
-static inline uint32_t getDebugLevel() {
+// Add __attribute__((used)) to work around a bug in gcc 5/6.
+static inline uint32_t __attribute__((used)) getDebugLevel() {
static uint32_t DebugLevel = 0;
static std::once_flag Flag{};
std::call_once(Flag, []() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95486.319427.patch
Type: text/x-patch
Size: 826 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210127/a0c915d4/attachment.bin>
More information about the Openmp-commits
mailing list