| 1 | /* Producer string parsers for GDB. |
| 2 | |
| 3 | Copyright (C) 2012-2021 Free Software Foundation, Inc. |
| 4 | |
| 5 | This file is part of GDB. |
| 6 | |
| 7 | This program is free software; you can redistribute it and/or modify |
| 8 | it under the terms of the GNU General Public License as published by |
| 9 | the Free Software Foundation; either version 3 of the License, or |
| 10 | (at your option) any later version. |
| 11 | |
| 12 | This program is distributed in the hope that it will be useful, |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. |
| 16 | |
| 17 | You should have received a copy of the GNU General Public License |
| 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 19 | |
| 20 | #ifndef PRODUCER_H |
| 21 | #define PRODUCER_H |
| 22 | |
| 23 | /* Check for GCC >= 4.x according to the symtab->producer string. Return minor |
| 24 | version (x) of 4.x in such case. If it is not GCC or it is GCC older than |
| 25 | 4.x return -1. If it is GCC 5.x or higher return INT_MAX. */ |
| 26 | extern int producer_is_gcc_ge_4 (const char *producer); |
| 27 | |
| 28 | /* Returns nonzero if the given PRODUCER string is GCC and sets the MAJOR |
| 29 | and MINOR versions when not NULL. Returns zero if the given PRODUCER |
| 30 | is NULL or it isn't GCC. */ |
| 31 | extern int producer_is_gcc (const char *producer, int *major, int *minor); |
| 32 | |
| 33 | /* Check for Intel compilers >= 19.0. */ |
| 34 | extern bool producer_is_icc_ge_19 (const char *producer); |
| 35 | |
| 36 | /* Returns true if the given PRODUCER string is Intel or false |
| 37 | otherwise. Sets the MAJOR and MINOR versions when not NULL. */ |
| 38 | extern bool producer_is_icc (const char *producer, int *major, int *minor); |
| 39 | |
| 40 | /* Returns true if the given PRODUCER string is LLVM (clang/flang) or |
| 41 | false otherwise.*/ |
| 42 | extern bool producer_is_llvm (const char *producer); |
| 43 | |
| 44 | #endif |