Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12152
Modified Files:
Compiler.cpp
Log Message:
Two-pass options are more deeply analyzed.
Index: Compiler.cpp
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Compiler.cpp 16 Apr 2007 20:15:44 -0000 1.12
--- Compiler.cpp 17 Apr 2007 17:53:43 -0000 1.13
***************
*** 228,231 ****
--- 228,235 ----
CompilerOptionDescriptions *OD;
CompilerOptionDescription *D;
+ CompilerOptionDescription *D2;
+ int i2;
+ int i3;
+ int n2;
std::string r;
int times = 0;
***************
*** 254,257 ****
--- 258,289 ----
tmp=D->Use();
lastOk=(tmp=="1");
+
+ if (D->CompilationTwoPassNeeded()) {
+ if (D->CompilationPass()==1) {
+ tmp+="\nAdvice : ";
+ tmp+=D->Option();
+ tmp+=" is revelent in a first pass compilation process. Related option(s) for second pass are : ";
+ i3=0;
+ n2=OD->DescriptionNumber();
+ for(i2=0;i2<n2;i2++) {
+ if (i3)
+ tmp+=",";
+ D2=OD->Description(i2);
+ if ((D2->CompilationTwoPassNeeded()) &&
+ (D2->CompilationPass()==2) &&
+ (D2->CompilationFirstPassOption()==D->Id())) {
+ tmp+=D2->Option();
+ i3++;
+ }
+ }
+ }
+ if (D->CompilationPass()==2) {
+ tmp+="\nAdvice : ";
+ tmp+=D->Option();
+ tmp+=" is revelent in a second-pass compilation; it requires ";
+ tmp+=OD->Description(D->CompilationFirstPassOption())->Option();
+ tmp+=" in first pass.";
+ }
+ }
r+=tmp;
r+="\n";
|