Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv15723
Modified Files:
Compiler-Option-Description.cpp Compiler-Option-Description.h
Log Message:
Logic() and logicAppendImplied() methods added to handle implied-by statements when the implied option comes first.
Index: Compiler-Option-Description.cpp
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option-Description.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Compiler-Option-Description.cpp 16 Apr 2007 20:38:13 -0000 1.8
--- Compiler-Option-Description.cpp 2 Oct 2007 17:32:08 -0000 1.9
***************
*** 106,109 ****
--- 106,118 ----
}
+ CBM::CompilerOptionLogic *CompilerOptionDescription::Logic(void)
+ {
+ if (!logic)
+ logic=new CBM::CompilerOptionLogic(parent,
+ this,
+ 0);
+ return(logic);
+ }
+
std::string CompilerOptionDescription::Id(void)
{
***************
*** 152,158 ****
std::string tmp;
! if (logic)
! return(logic->use());
! else {
tmp="Logic for option ";
tmp+=Id();
--- 161,168 ----
std::string tmp;
! if (logic) {
! tmp=logic->use();
! return(tmp);
! } else {
tmp="Logic for option ";
tmp+=Id();
***************
*** 269,272 ****
--- 279,288 ----
}
+ void CompilerOptionDescriptions::logicAppendImplied(CompilerOptionDescription *D,
+ std::string ref)
+ {
+ D->Logic()->appendCommand(RevImplied, 1, "", "", ref);
+ }
+
CBM::Compiler *CompilerOptionDescriptions::Compiler(void)
{
Index: Compiler-Option-Description.h
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option-Description.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** Compiler-Option-Description.h 4 Sep 2007 20:02:55 -0000 1.10
--- Compiler-Option-Description.h 2 Oct 2007 17:32:08 -0000 1.11
***************
*** 75,78 ****
--- 75,84 ----
CBM_CODs *_parent);
+ /** Returns option logics.
+ *
+ * \return Give option logics
+ */
+ virtual CBM_COL *Logic(void);
+
/** Get option's internal ID.
*
***************
*** 199,202 ****
--- 205,220 ----
virtual CompilerOptionDescription *DescriptionLitteral(std::string _litt);
+ /** Inserts a new logic constraints for forwardly implied options.
+ *
+ * Using gcc, option string '-fcse-skip-blocks -O3' is valid, because
+ * 'implied' operand on CSE option is checked before -O3 (which implies
+ * said CSE option). Thus, we must signal in -fcse-skip-blocks that
+ * a further -O3 will 'clash'.
+ *
+ * \param D Description concerned.
+ * \param ref Further option (not known/Used() at this time) to watch for
+ */
+ virtual void logicAppendImplied(CompilerOptionDescription *D,
+ std::string ref);
/** Retrieve associated compiler.
*
|