File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
openmp/libomptarget/include Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,8 @@ enum OpenMPInfoType : uint32_t {
53
53
OMP_INFOTYPE_ALL = 0xffffffff ,
54
54
};
55
55
56
- static inline uint32_t getInfoLevel () {
56
+ // Add __attribute__((used)) to work around a bug in gcc 5/6.
57
+ static inline uint32_t __attribute__ ((used)) getInfoLevel() {
57
58
static uint32_t InfoLevel = 0 ;
58
59
static std::once_flag Flag{};
59
60
std::call_once (Flag, []() {
@@ -64,7 +65,8 @@ static inline uint32_t getInfoLevel() {
64
65
return InfoLevel;
65
66
}
66
67
67
- static inline uint32_t getDebugLevel () {
68
+ // Add __attribute__((used)) to work around a bug in gcc 5/6.
69
+ static inline uint32_t __attribute__ ((used)) getDebugLevel() {
68
70
static uint32_t DebugLevel = 0 ;
69
71
static std::once_flag Flag{};
70
72
std::call_once (Flag, []() {
You can’t perform that action at this time.
0 commit comments