Commit | Line | Data |
---|---|---|
b32b108a WT |
1 | /* Producer string parsers for GDB. |
2 | ||
3666a048 | 3 | Copyright (C) 2012-2021 Free Software Foundation, Inc. |
b32b108a WT |
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 | ||
5230b05a | 33 | /* Returns true if the given PRODUCER string is Intel or false |
fbb3bcfc | 34 | otherwise. Sets the MAJOR and MINOR versions when not NULL. */ |
5230b05a WT |
35 | extern bool producer_is_icc (const char *producer, int *major, int *minor); |
36 | ||
c2fd7fae AKS |
37 | /* Returns true if the given PRODUCER string is LLVM (clang/flang) or |
38 | false otherwise.*/ | |
39 | extern bool producer_is_llvm (const char *producer); | |
40 | ||
b32b108a | 41 | #endif |