]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgomp/libgomp-plugin.c
tree-optimization/95495 - use SLP_TREE_REPRESENTATIVE in assertion
[thirdparty/gcc.git] / libgomp / libgomp-plugin.c
CommitLineData
8d9254fc 1/* Copyright (C) 2014-2020 Free Software Foundation, Inc.
1df3f842 2
41dbbb37
TS
3 Contributed by Mentor Embedded.
4
f1f3453e
TS
5 This file is part of the GNU Offloading and Multi Processing Library
6 (libgomp).
1df3f842
JJ
7
8 Libgomp is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
11 any later version.
12
13 Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 more details.
17
18 Under Section 7 of GPL version 3, you are granted additional
19 permissions described in the GCC Runtime Library Exception, version
20 3.1, as published by the Free Software Foundation.
21
22 You should have received a copy of the GNU General Public License and
23 a copy of the GCC Runtime Library Exception along with this program;
24 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
25 <http://www.gnu.org/licenses/>. */
26
41dbbb37
TS
27/* Exported (non-hidden) functions exposing libgomp interface for plugins. */
28
29#include <stdlib.h>
30
31#include "libgomp.h"
32#include "libgomp-plugin.h"
33
34void *
35GOMP_PLUGIN_malloc (size_t size)
36{
37 return gomp_malloc (size);
38}
39
40void *
41GOMP_PLUGIN_malloc_cleared (size_t size)
42{
43 return gomp_malloc_cleared (size);
44}
1df3f842 45
41dbbb37
TS
46void *
47GOMP_PLUGIN_realloc (void *ptr, size_t size)
1df3f842 48{
41dbbb37
TS
49 return gomp_realloc (ptr, size);
50}
51
52void
53GOMP_PLUGIN_debug (int kind, const char *msg, ...)
54{
55 va_list ap;
56
57 va_start (ap, msg);
a2818955 58 gomp_vdebug (kind, msg, ap);
41dbbb37
TS
59 va_end (ap);
60}
61
62void
63GOMP_PLUGIN_error (const char *msg, ...)
64{
65 va_list ap;
66
67 va_start (ap, msg);
68 gomp_verror (msg, ap);
69 va_end (ap);
70}
1df3f842 71
41dbbb37
TS
72void
73GOMP_PLUGIN_fatal (const char *msg, ...)
1df3f842 74{
41dbbb37 75 va_list ap;
1df3f842 76
41dbbb37
TS
77 va_start (ap, msg);
78 gomp_vfatal (msg, ap);
79 va_end (ap);
80}