Mercurial > hg > CbC > CbC_gcc
comparison gcc/jit/libgccjit++.h @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 /* A C++ API for libgccjit, purely as inline wrapper functions. | 1 /* A C++ API for libgccjit, purely as inline wrapper functions. |
2 Copyright (C) 2014-2018 Free Software Foundation, Inc. | 2 Copyright (C) 2014-2020 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GCC. | 4 This file is part of GCC. |
5 | 5 |
6 GCC is free software; you can redistribute it and/or modify it | 6 GCC is free software; you can redistribute it and/or modify it |
7 under the terms of the GNU General Public License as published by | 7 under the terms of the GNU General Public License as published by |
125 | 125 |
126 void set_bool_allow_unreachable_blocks (int bool_value); | 126 void set_bool_allow_unreachable_blocks (int bool_value); |
127 void set_bool_use_external_driver (int bool_value); | 127 void set_bool_use_external_driver (int bool_value); |
128 | 128 |
129 void add_command_line_option (const char *optname); | 129 void add_command_line_option (const char *optname); |
130 void add_driver_option (const char *optname); | |
130 | 131 |
131 void set_timer (gccjit::timer t); | 132 void set_timer (gccjit::timer t); |
132 gccjit::timer get_timer () const; | 133 gccjit::timer get_timer () const; |
133 | 134 |
134 location | 135 location |
148 type new_array_type (type element_type, int num_elements, | 149 type new_array_type (type element_type, int num_elements, |
149 location loc = location ()); | 150 location loc = location ()); |
150 | 151 |
151 field new_field (type type_, const std::string &name, | 152 field new_field (type type_, const std::string &name, |
152 location loc = location ()); | 153 location loc = location ()); |
154 | |
155 field new_bitfield (type type_, int width, const std::string &name, | |
156 location loc = location ()); | |
153 | 157 |
154 struct_ new_struct_type (const std::string &name, | 158 struct_ new_struct_type (const std::string &name, |
155 std::vector<field> &fields, | 159 std::vector<field> &fields, |
156 location loc = location ()); | 160 location loc = location ()); |
157 | 161 |
685 { | 689 { |
686 gcc_jit_context_add_command_line_option (m_inner_ctxt, optname); | 690 gcc_jit_context_add_command_line_option (m_inner_ctxt, optname); |
687 } | 691 } |
688 | 692 |
689 inline void | 693 inline void |
694 context::add_driver_option (const char *optname) | |
695 { | |
696 gcc_jit_context_add_driver_option (m_inner_ctxt, optname); | |
697 } | |
698 | |
699 inline void | |
690 context::set_timer (gccjit::timer t) | 700 context::set_timer (gccjit::timer t) |
691 { | 701 { |
692 gcc_jit_context_set_timer (m_inner_ctxt, t.get_inner_timer ()); | 702 gcc_jit_context_set_timer (m_inner_ctxt, t.get_inner_timer ()); |
693 } | 703 } |
694 | 704 |
746 { | 756 { |
747 return field (gcc_jit_context_new_field (m_inner_ctxt, | 757 return field (gcc_jit_context_new_field (m_inner_ctxt, |
748 loc.get_inner_location (), | 758 loc.get_inner_location (), |
749 type_.get_inner_type (), | 759 type_.get_inner_type (), |
750 name.c_str ())); | 760 name.c_str ())); |
761 } | |
762 | |
763 inline field | |
764 context::new_bitfield (type type_, int width, const std::string &name, | |
765 location loc) | |
766 { | |
767 return field (gcc_jit_context_new_bitfield (m_inner_ctxt, | |
768 loc.get_inner_location (), | |
769 type_.get_inner_type (), | |
770 width, | |
771 name.c_str ())); | |
751 } | 772 } |
752 | 773 |
753 inline struct_ | 774 inline struct_ |
754 context::new_struct_type (const std::string &name, | 775 context::new_struct_type (const std::string &name, |
755 std::vector<field> &fields, | 776 std::vector<field> &fields, |