aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2017-01-31 01:00:51 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2017-01-31 01:00:51 +0000
commit3b5c10724d7a0c29ae613bee7a0822131b06b5a8 (patch)
tree527bb62c7f3019515db3568acbcb3b35bd60842e /include
parent023721aab10f963e82eee27d732d2397c44af1de (diff)
downloadgcc-3b5c10724d7a0c29ae613bee7a0822131b06b5a8.zip
gcc-3b5c10724d7a0c29ae613bee7a0822131b06b5a8.tar.gz
gcc-3b5c10724d7a0c29ae613bee7a0822131b06b5a8.tar.bz2
libcc1 base API: add set_verbose and new version of compile
for include/ChangeLog * gcc-interface.h (enum gcc_base_api_version): Add comment to GCC_FE_VERSION_1. (struct gcc_base_vtable): Rename compile to compile_v0. Update comment for compile. New methods set_verbose and compile. for libcc1/ChangeLog * libcc1.cc: Include intl.h. (struct libcc1): Add field verbose. (libcc1::libcc1): Initialize it. (libcc1_set_verbose): New function. (libcc1_set_arguments): Print messages for VERBOSE. (libcc1_compile): Remove parameter verbose. Use VERBOSE from SELF. (libcc1_compile_v0): New function. (vtable): Use libcc1_compile_v0 and add libcc1_compile and libcc1_set_verbose. From-SVN: r245048
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog6
-rw-r--r--include/gcc-interface.h33
2 files changed, 32 insertions, 7 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 75a9a59..5284f10 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,5 +1,11 @@
2017-01-30 Jan Kratochvil <jan.kratochvil@redhat.com>
+ * gcc-interface.h (enum gcc_base_api_version): Add comment to
+ GCC_FE_VERSION_1.
+ (struct gcc_base_vtable): Rename compile to compile_v0.
+ Update comment for compile. New methods set_verbose and
+ compile.
+
* gcc-interface.h (enum gcc_base_api_version): Add
GCC_FE_VERSION_1.
diff --git a/include/gcc-interface.h b/include/gcc-interface.h
index 4c712d3..c98f078 100644
--- a/include/gcc-interface.h
+++ b/include/gcc-interface.h
@@ -45,6 +45,8 @@ struct gcc_base_context;
enum gcc_base_api_version
{
GCC_FE_VERSION_0 = 0,
+
+ /* Deprecated method compile_v0. Added method set_verbose and compile. */
GCC_FE_VERSION_1 = 1,
};
@@ -94,18 +96,35 @@ struct gcc_base_vtable
const char *message),
void *datum);
- /* Perform the compilation. FILENAME is the name of the resulting
- object file. VERBOSE can be set to cause GCC to print some
- information as it works. Returns true on success, false on
- error. */
+ /* Deprecated GCC_FE_VERSION_0 variant of the GCC_FE_VERSION_1
+ compile method. GCC_FE_VERSION_0 version verbose parameter has
+ been replaced by the set_verbose method. */
- int /* bool */ (*compile) (struct gcc_base_context *self,
- const char *filename,
- int /* bool */ verbose);
+ int /* bool */ (*compile_v0) (struct gcc_base_context *self,
+ const char *filename,
+ int /* bool */ verbose);
/* Destroy this object. */
void (*destroy) (struct gcc_base_context *self);
+
+ /* VERBOSE can be set to non-zero to cause GCC to print some
+ information as it works. Calling this method overrides its
+ possible previous calls.
+
+ This method is only available since GCC_FE_VERSION_1. */
+
+ void (*set_verbose) (struct gcc_base_context *self,
+ int /* bool */ verbose);
+
+ /* Perform the compilation. FILENAME is the name of the resulting
+ object file. Either set_triplet_regexp or set_driver_filename must
+ be called before. Returns true on success, false on error.
+
+ This method is only available since GCC_FE_VERSION_1. */
+
+ int /* bool */ (*compile) (struct gcc_base_context *self,
+ const char *filename);
};
/* The GCC object. */