Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 64a1faee authored by kraus's avatar kraus
Browse files

update the attribute values of OPTION

parent 0ac8551a
No related branches found
No related tags found
1 merge request!472Resolve "Get correct output of VALUE, OPTION->AUTOPHASE"
......@@ -18,6 +18,7 @@
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
//
#include "BasicActions/Option.h"
#include "AbstractObjects/OpalData.h"
#include "Attributes/Attributes.h"
#include "Parser/FileStream.h"
#include "Utilities/OpalException.h"
......@@ -65,7 +66,7 @@ namespace {
AUTOPHASE,
SURFDUMPFREQ,
NUMBLOCKS,
RECYCLEBLOCKS,
RECYCLEBLOCKS,
NLHS,
CZERO,
RNGTYPE,
......@@ -491,6 +492,11 @@ void Option::execute() {
if(Attributes::getBool(itsAttr[TELL])) {
*gmsg << "\nCurrent settings of options:\n" << *this << endl;
}
Option* main = dynamic_cast<Option*>(OpalData::getInstance()->find("OPTION"));
if (main) {
main->update(itsAttr);
}
}
void Option::handlePsDumpFrame(const std::string &dumpFrame) {
......@@ -518,4 +524,10 @@ std::string DumpFrameToString(DumpFrame df) {
default:
return std::string("GLOBAL");
}
}
void Option::update(const std::vector<Attribute>& othersAttributes) {
for (int i = 0; i < SIZE; ++ i) {
itsAttr[i] = othersAttributes[i];
}
}
\ No newline at end of file
......@@ -39,6 +39,7 @@ public:
private:
void handlePsDumpFrame(const std::string &dumpFrame);
void update(const std::vector<Attribute>&);
// Not implemented.
Option(const Option &);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment