]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/producer.h
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / producer.h
CommitLineData
b32b108a
WT
1/* Producer string parsers for GDB.
2
213516ef 3 Copyright (C) 2012-2023 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. */
26extern 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. */
31extern int producer_is_gcc (const char *producer, int *major, int *minor);
32
16e311ab
FW
33/* Check for Intel compilers >= 19.0. */
34extern bool producer_is_icc_ge_19 (const char *producer);
35
5230b05a 36/* Returns true if the given PRODUCER string is Intel or false
fbb3bcfc 37 otherwise. Sets the MAJOR and MINOR versions when not NULL. */
5230b05a
WT
38extern bool producer_is_icc (const char *producer, int *major, int *minor);
39
c2fd7fae
AKS
40/* Returns true if the given PRODUCER string is LLVM (clang/flang) or
41 false otherwise.*/
42extern bool producer_is_llvm (const char *producer);
43
e7e7469e
BL
44/* Returns true if the given PRODUCER string is clang, false otherwise.
45 Sets MAJOR and MINOR accordingly, if not NULL. */
46extern bool producer_is_clang (const char *producer, int *major, int *minor);
47
b32b108a 48#endif