PR rtl-optimization/82913
[official-gcc.git] / gcc / go / go-gcc-diagnostics.cc
blobb12773f455b325ab37993e0a946faf1392e6ccb2
1 // go-gcc-diagnostics.cc -- GCC implementation of go diagnostics interface.
2 // Copyright (C) 2016-2017 Free Software Foundation, Inc.
3 // Contributed by Than McIntosh, Google.
5 // This file is part of GCC.
7 // GCC is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU General Public License as published by the Free
9 // Software Foundation; either version 3, or (at your option) any later
10 // version.
12 // GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 // for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with GCC; see the file COPYING3. If not see
19 // <http://www.gnu.org/licenses/>.
21 #include "go-system.h"
22 #include "go-diagnostics.h"
24 void
25 go_be_error_at(const Location location, const std::string& errmsg)
27 source_location gcc_loc = location.gcc_location();
28 error_at(gcc_loc, "%s", errmsg.c_str());
32 void
33 go_be_warning_at(const Location location,
34 int opt, const std::string& warningmsg)
36 source_location gcc_loc = location.gcc_location();
37 warning_at(gcc_loc, opt, "%s", warningmsg.c_str());
40 void
41 go_be_fatal_error(const Location location,
42 const std::string& fatalmsg)
44 source_location gcc_loc = location.gcc_location();
45 fatal_error(gcc_loc, "%s", fatalmsg.c_str());
48 void
49 go_be_inform(const Location location,
50 const std::string& infomsg)
52 source_location gcc_loc = location.gcc_location();
53 inform(gcc_loc, "%s", infomsg.c_str());
56 void
57 go_be_get_quotechars(const char** open_qu, const char** close_qu)
59 *open_qu = open_quote;
60 *close_qu = close_quote;