aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDave Brolley <brolley@gcc.gnu.org>1998-06-10 06:22:54 -0400
committerDave Brolley <brolley@gcc.gnu.org>1998-06-10 06:22:54 -0400
commitcff559bcf04d458e886a61933641150cf4012ae8 (patch)
tree457bf2888453ef09bf7ae0eca265e873910f6151 /gcc
parentab9e0ff9c7fc514f6e5cfcadef49b233a706917b (diff)
downloadgcc-cff559bcf04d458e886a61933641150cf4012ae8.zip
gcc-cff559bcf04d458e886a61933641150cf4012ae8.tar.gz
gcc-cff559bcf04d458e886a61933641150cf4012ae8.tar.bz2
New interface for lang_decode_option Wed Jun 10 13:07:02 1998 Dave Brolley <brolley@cygnus.com>
New interface for lang_decode_option Wed Jun 10 13:07:02 1998 Dave Brolley <brolley@cygnus.com> * objc/objc-act.c: Add cpplib declarations. (lang_decode_option): Initialize cpplib if necessary. (lang_decode_option): New argc/argv interface. From-SVN: r20410
Diffstat (limited to 'gcc')
-rw-r--r--gcc/objc/objc-act.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index b7bbd62..e1cde90 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -51,6 +51,13 @@ Boston, MA 02111-1307, USA. */
#include "output.h"
#include "toplev.h"
+#if USE_CPPLIB
+#include "cpplib.h"
+extern cpp_reader parse_in;
+extern cpp_options parse_options;
+static int cpp_initialized;
+#endif
+
/* This is the default way of generating a method name. */
/* I am not sure it is really correct.
Perhaps there's a danger that it will make name conflicts
@@ -666,9 +673,20 @@ lang_identify ()
}
int
-lang_decode_option (p)
- char *p;
+lang_decode_option (argc, argv)
+ int argc;
+ char **argv;
{
+ char *p = argv[0];
+#if USE_CPPLIB
+ if (! cpp_initialized)
+ {
+ cpp_reader_init (&parse_in);
+ parse_in.data = &parse_options;
+ cpp_options_init (&parse_options);
+ cpp_initialized = 1;
+ }
+#endif
if (!strcmp (p, "-lang-objc"))
doing_objc_thang = 1;
else if (!strcmp (p, "-gen-decls"))
@@ -692,7 +710,7 @@ lang_decode_option (p)
else if (!strcmp (p, "-print-objc-runtime-info"))
print_struct_values = 1;
else
- return c_decode_option (p);
+ return c_decode_option (argc, argv);
return 1;
}