Update copyright year range in all GDB files.
[deliverable/binutils-gdb.git] / gdb / compile / compile-internal.h
index 89dd1e58f27fe59ae95c4ca3c4f7d398d057d671..90e829259d9c92035d6480024a25a7601ff58a2b 100644 (file)
@@ -1,5 +1,5 @@
 /* Header file for GDB compile command and supporting functions.
-   Copyright (C) 2014-2018 Free Software Foundation, Inc.
+   Copyright (C) 2014-2019 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,6 +25,19 @@ extern int compile_debug;
 
 struct block;
 
+/* An object that maps a gdb type to a gcc type.  */
+
+struct type_map_instance
+{
+  /* The gdb type.  */
+
+  struct type *type;
+
+  /* The corresponding gcc type handle.  */
+
+  gcc_type gcc_type_handle;
+};
+
 /* An object of this type holds state associated with a given
    compilation job.  */
 
@@ -36,9 +49,6 @@ public:
   virtual ~compile_instance ()
   {
     m_gcc_fe->ops->destroy (m_gcc_fe);
-    htab_delete (m_type_map);
-    if (m_symbol_err_map != NULL)
-      htab_delete (m_symbol_err_map);
   }
 
   /* Returns the GCC options to be passed during compilation.  */
@@ -49,7 +59,7 @@ public:
 
   /* Query the type cache for TYPE, returning the compiler's
      type for it in RET.  */
-  bool get_cached_type (struct type *type, gcc_type &ret) const;
+  bool get_cached_type (struct type *type, gcc_type *ret) const;
 
   /* Insert GCC_TYPE into the type cache for TYPE.
 
@@ -135,10 +145,10 @@ protected:
   std::string m_gcc_target_options;
 
   /* Map from gdb types to gcc types.  */
-  htab_t m_type_map;
+  htab_up m_type_map;
 
   /* Map from gdb symbols to gcc error messages to emit.  */
-  htab_t m_symbol_err_map;
+  htab_up m_symbol_err_map;
 };
 
 /* Define header and footers for different scopes.  */
@@ -154,6 +164,10 @@ protected:
 #define COMPILE_I_EXPR_VAL "__gdb_expr_val"
 #define COMPILE_I_EXPR_PTR_TYPE "__gdb_expr_ptr_type"
 
+/* A "type" to indicate a NULL type.  */
+
+const gcc_type GCC_TYPE_NONE = (gcc_type) -1;
+
 /* Call gdbarch_register_name (GDBARCH, REGNUM) and convert its result
    to a form suitable for the compiler source.  The register names
    should not clash with inferior defined macros. */
This page took 0.025483 seconds and 4 git commands to generate.