Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv19619
Modified Files:
Compiler.cpp Compiler.h
Log Message:
Compiler can return a CompilerOptionDescriptions instance.
Index: Compiler.h
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Compiler.h 19 Feb 2007 18:43:38 -0000 1.5
--- Compiler.h 14 Mar 2007 20:35:40 -0000 1.6
***************
*** 18,26 ****
--- 18,29 ----
%{
#include <Plan/Plan.h>
+ #include <Compiler/Compiler-Option-Description.h>
%}
#define CBM_PLAN CBM::Plan
+ #define CBM_COD CBM::CompilerOptionDescriptions
#else
# define CBM_PLAN class Plan
+ # define CBM_COD class CompilerOptionDescriptions
#endif
***************
*** 97,100 ****
--- 100,108 ----
virtual std::string Language(void) = 0;
/** Virtual destructor */
+
+ /** Return (supported) option descriptions
+ \return Option descriptions */
+ virtual CBM_COD *OptionDescriptions(void);
+
virtual ~Compiler();
};
Index: Compiler.cpp
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Compiler.cpp 19 Feb 2007 18:43:38 -0000 1.4
--- Compiler.cpp 14 Mar 2007 20:35:40 -0000 1.5
***************
*** 10,13 ****
--- 10,14 ----
#include <Compiler/Compiler-GCC/Compiler-GCC.h>
#include <Compiler/Compiler-TCC/Compiler-TCC.h>
+ #include <Compiler/Compiler-Option-Description.h>
#include <Plan/Plan.h>
***************
*** 58,61 ****
--- 59,67 ----
}
+ CBM::CompilerOptionDescriptions *Compiler::OptionDescriptions(void)
+ {
+ return(new CBM::CompilerOptionDescriptions(compiler()));
+ }
+
Compiler::~Compiler()
{
***************
*** 83,99 ****
if ((int) raw.find("g++")>=0) {
return(new CompilerGCC_cpp(system,
! compilerBinary));
} else
return(new CompilerGCC(system,
! compilerBinary));
}
raw=compilerBinary;
if (((int) raw.find("g++")>0) || (raw=="g++")) {
return(new CompilerGCC_cpp(system,
! compilerBinary));
}
if (((int) raw.find("gcc")>0) || (raw=="gcc")) {
return(new CompilerGCC(system,
! compilerBinary));
}
}
--- 89,105 ----
if ((int) raw.find("g++")>=0) {
return(new CompilerGCC_cpp(system,
! compilerBinary));
} else
return(new CompilerGCC(system,
! compilerBinary));
}
raw=compilerBinary;
if (((int) raw.find("g++")>0) || (raw=="g++")) {
return(new CompilerGCC_cpp(system,
! compilerBinary));
}
if (((int) raw.find("gcc")>0) || (raw=="gcc")) {
return(new CompilerGCC(system,
! compilerBinary));
}
}
|