Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv6136
Modified Files:
Compiler-Option-Description.cpp Compiler-Option-Description.h
Log Message:
Two-pass compilations detected (e.g for -fuse-profile and related options).
Index: Compiler-Option-Description.cpp
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option-Description.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Compiler-Option-Description.cpp 12 Apr 2007 19:55:37 -0000 1.6
--- Compiler-Option-Description.cpp 16 Apr 2007 16:53:47 -0000 1.7
***************
*** 44,54 ****
CompilerOptionDescriptions *_parent)
{
! int i;
! int n = _from->nodeNumber();
! CBM::XMLNode *N;
! CBM::XMLAttribute *A;
logic=0;
parent=_parent;
A=_from->getAttribute("id");
if (A)
--- 44,60 ----
CompilerOptionDescriptions *_parent)
{
! int i;
! int n = _from->nodeNumber();
! CBM::XMLNode *N;
! CBM::XMLAttribute *A;
! CompilerOptionDescription *D;
logic=0;
parent=_parent;
+ twoPassNeeded=0;
+ firstPass=0;
+ secondPass=0;
+ firstPassOption="";
+
A=_from->getAttribute("id");
if (A)
***************
*** 61,66 ****
if (N->Name() == "short-description")
shortDescription=N->Value();
! if (N->Name() == "editor-description")
! editorDescription=N->Value();
if (N->Name() == "logic") {
logic=new CBM::CompilerOptionLogic(_parent,
--- 67,82 ----
if (N->Name() == "short-description")
shortDescription=N->Value();
! if (N->Name() == "editor-description") {
! A=N->getAttribute("copy-id");
! if (!A)
! editorDescription=N->Value();
! else {
! D=_parent->Description(A->Value());
! if (D)
! editorDescription=D->EditorDescription();
! else
! editorDescription="";
! }
! }
if (N->Name() == "logic") {
logic=new CBM::CompilerOptionLogic(_parent,
***************
*** 68,71 ****
--- 84,106 ----
N);
}
+
+ if (N->Name() == "compilation") {
+ A=N->getAttribute("type");
+ if (A) {
+ if (A->Value()=="first-pass") {
+ twoPassNeeded=1;
+ firstPass=1;
+ }
+ if (A->Value()=="second-pass") {
+ A=N->getAttribute("first-pass");
+ if (A) {
+ twoPassNeeded=1;
+ secondPass=1;
+
+ firstPassOption=A->Value();
+ }
+ }
+ }
+ }
}
}
***************
*** 91,94 ****
--- 126,152 ----
}
+ int CompilerOptionDescription::CompilationTwoPassNeeded(void)
+ {
+ return(twoPassNeeded);
+ }
+
+ int CompilerOptionDescription::CompilationPass(void)
+ {
+ if (CompilationTwoPassNeeded()) {
+ if (firstPass)
+ return(1);
+
+ if (secondPass)
+ return(2);
+ }
+ return(0);
+ }
+
+ std::string CompilerOptionDescription::CompilationFirstPassOption(void)
+ {
+ return(firstPassOption);
+ }
+
+
std::string CompilerOptionDescription::Use(void)
{
Index: Compiler-Option-Description.h
===================================================================
RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option-Description.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Compiler-Option-Description.h 12 Apr 2007 19:55:37 -0000 1.6
--- Compiler-Option-Description.h 16 Apr 2007 16:53:47 -0000 1.7
***************
*** 56,59 ****
--- 56,64 ----
std::string option;
+ int twoPassNeeded;
+ int firstPass;
+ int secondPass;
+ std::string firstPassOption;
+
CBM_CODs *parent;
CBM_COL *logic;
***************
*** 84,87 ****
--- 89,97 ----
virtual std::string Option(void);
+ virtual int CompilationTwoPassNeeded(void);
+ virtual int CompilationPass(void);
+ virtual std::string CompilationFirstPassOption(void);
+
+
virtual std::string Use(void);
|