diff options
Diffstat (limited to 'gdb/compile/compile-internal.h')
-rw-r--r-- | gdb/compile/compile-internal.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/compile/compile-internal.h b/gdb/compile/compile-internal.h index 66ea864..5a7bf14 100644 --- a/gdb/compile/compile-internal.h +++ b/gdb/compile/compile-internal.h @@ -152,4 +152,29 @@ extern const char *c_get_mode_for_size (int size); struct dynamic_prop; extern char *c_get_range_decl_name (const struct dynamic_prop *prop); +/* Type used to hold and pass around the source and object file names + to use for compilation. */ +class compile_file_names +{ +public: + compile_file_names (std::string source_file, std::string object_file) + : m_source_file (source_file), m_object_file (object_file) + {} + + /* Provide read-only views only. Return 'const char *' instead of + std::string to avoid having to use c_str() everywhere in client + code. */ + + const char *source_file () const + { return m_source_file.c_str (); } + + const char *object_file () const + { return m_object_file.c_str (); } + +private: + /* Storage for the file names. */ + std::string m_source_file; + std::string m_object_file; +}; + #endif /* GDB_COMPILE_INTERNAL_H */ |