From 4469c94646757c64cf0a7053351027e22cde5fdc Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Sun, 5 Mar 2006 06:37:18 +0000 Subject: [PATCH] add -O git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8962 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/Modules/main.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SWIG/Source/Modules/main.cxx b/SWIG/Source/Modules/main.cxx index 0d64943b5..abeb2c786 100644 --- a/SWIG/Source/Modules/main.cxx +++ b/SWIG/Source/Modules/main.cxx @@ -108,6 +108,8 @@ static const char *usage2 = (const char*)"\ static const char *usage3 = (const char*)"\ -notemplatereduce - Disable reduction of the typedefs in templates\n\ + -O - Enable the optimizations options: \n\ + -fastdispatch -fvirtual \n\ -o - Set name of the output file to \n\ -oh - Set name of the output header file to \n\ -outdir - Set language specific files output directory \n\ @@ -713,6 +715,10 @@ void SWIG_getoptions(int argc, char *argv[]) } else if (strcmp(argv[i],"-Fmicrosoft") == 0) { Swig_error_msg_format(EMF_MICROSOFT); Swig_mark_arg(i); + } else if (strcmp(argv[i],"-O") == 0) { + Wrapper_virtual_elimination_mode_set(1); + Wrapper_fast_dispatch_mode_set(1); + Swig_mark_arg(i); } else if ((strcmp(argv[i],"-help") == 0) || (strcmp(argv[i],"--help") == 0)) { fputs(usage1,stdout); fputs(usage2,stdout);