diff gcc/jit/libgccjit++.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line diff
--- a/gcc/jit/libgccjit++.h	Thu Oct 25 07:37:49 2018 +0900
+++ b/gcc/jit/libgccjit++.h	Thu Feb 13 11:34:05 2020 +0900
@@ -1,5 +1,5 @@
 /* A C++ API for libgccjit, purely as inline wrapper functions.
-   Copyright (C) 2014-2018 Free Software Foundation, Inc.
+   Copyright (C) 2014-2020 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -127,6 +127,7 @@
     void set_bool_use_external_driver (int bool_value);
 
     void add_command_line_option (const char *optname);
+    void add_driver_option (const char *optname);
 
     void set_timer (gccjit::timer t);
     gccjit::timer get_timer () const;
@@ -151,6 +152,9 @@
     field new_field (type type_, const std::string &name,
 		     location loc = location ());
 
+    field new_bitfield (type type_, int width, const std::string &name,
+			location loc = location ());
+
     struct_ new_struct_type (const std::string &name,
 			     std::vector<field> &fields,
 			     location loc = location ());
@@ -687,6 +691,12 @@
 }
 
 inline void
+context::add_driver_option (const char *optname)
+{
+  gcc_jit_context_add_driver_option (m_inner_ctxt, optname);
+}
+
+inline void
 context::set_timer (gccjit::timer t)
 {
   gcc_jit_context_set_timer (m_inner_ctxt, t.get_inner_timer ());
@@ -750,6 +760,17 @@
 					   name.c_str ()));
 }
 
+inline field
+context::new_bitfield (type type_, int width, const std::string &name,
+		       location loc)
+{
+  return field (gcc_jit_context_new_bitfield (m_inner_ctxt,
+					      loc.get_inner_location (),
+					      type_.get_inner_type (),
+					      width,
+					      name.c_str ()));
+}
+
 inline struct_
 context::new_struct_type (const std::string &name,
 			  std::vector<field> &fields,