Chromium Code Reviews| Index: src/PNaClTranslator.cpp |
| diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp |
| index ce7e09c8cc7bcb9bcc0a870d50c8ec4fd0bf99f2..0cdb79bf4ca15c48cfca533c8ae2e74ab9c02656 100644 |
| --- a/src/PNaClTranslator.cpp |
| +++ b/src/PNaClTranslator.cpp |
| @@ -191,7 +191,7 @@ public: |
| /// Returns true if generation of Subzero IR is disabled. |
| bool isIRGenerationDisabled() const { |
| - return ALLOW_DISABLE_IR_GEN ? Translator.getFlags().DisableIRGeneration |
| + return ALLOW_DISABLE_IR_GEN ? Translator.getFlags().getDisableIRGeneration() |
|
Jim Stichnoth
2015/02/05 22:30:09
Change to
return ALLOW_DISABLE_IR_GEN && getTran
Karl
2015/02/05 23:57:38
Done. Also did similar changes to: getDumpStats, g
|
| : false; |
| } |
| @@ -458,7 +458,7 @@ bool TopLevelParser::Error(const std::string &Message) { |
| raw_ostream &OldErrStream = setErrStream(Context->getStrDump()); |
| NaClBitcodeParser::Error(Message); |
| setErrStream(OldErrStream); |
| - if (!Translator.getFlags().AllowErrorRecovery) |
| + if (!Translator.getFlags().getAllowErrorRecovery()) |
| report_fatal_error("Unable to continue"); |
| return true; |
| } |
| @@ -552,8 +552,9 @@ protected: |
| const Ice::ClFlags &getFlags() const { return getTranslator().getFlags(); } |
| bool isIRGenerationDisabled() const { |
| - return ALLOW_DISABLE_IR_GEN ? getTranslator().getFlags().DisableIRGeneration |
| - : false; |
| + return ALLOW_DISABLE_IR_GEN |
| + ? getTranslator().getFlags().getDisableIRGeneration() |
| + : false; |
| } |
| // Default implementation. Reports that block is unknown and skips |
| @@ -632,7 +633,7 @@ bool BlockParserBaseClass::Error(const std::string &Message) { |
| // Note: If dump routines have been turned off, the error messages |
| // will not be readable. Hence, replace with simple error. We also |
| // use the simple form for unit tests. |
| - if (ALLOW_DUMP && !getFlags().GenerateUnitTestMessages) { |
| + if (ALLOW_DUMP && !getFlags().getGenerateUnitTestMessages()) { |
| StrBuf << Message; |
| } else { |
| StrBuf << "Invalid " << getBlockName() << " record: <" << Record.GetCode(); |
| @@ -1091,7 +1092,8 @@ public: |
| bool convertFunction() { |
| const Ice::TimerStackIdT StackID = Ice::GlobalContext::TSK_Funcs; |
| Ice::TimerIdT TimerID = 0; |
| - const bool TimeThisFunction = ALLOW_DUMP && getFlags().TimeEachFunction; |
| + const bool TimeThisFunction = |
| + ALLOW_DUMP && getFlags().getTimeEachFunction(); |
| if (TimeThisFunction) { |
| TimerID = getTranslator().getContext()->getTimerID(StackID, |
| FuncDecl->getName()); |
| @@ -2461,7 +2463,7 @@ void FunctionParser::ProcessRecord() { |
| } |
| } |
| } else { |
| - if (getFlags().StubConstantCalls && |
| + if (getFlags().getStubConstantCalls() && |
| llvm::isa<Ice::ConstantInteger32>(Callee)) { |
| Callee = Context->getStubbedConstCallValue(Callee); |
| } |
| @@ -2811,14 +2813,15 @@ private: |
| void InstallGlobalNamesAndGlobalVarInitializers() { |
| if (!GlobalDeclarationNamesAndInitializersInstalled) { |
| Ice::Translator &Trans = getTranslator(); |
| - const Ice::IceString &GlobalPrefix = getFlags().DefaultGlobalPrefix; |
| + const Ice::IceString &GlobalPrefix = getFlags().getDefaultGlobalPrefix(); |
| if (!GlobalPrefix.empty()) { |
| uint32_t NameIndex = 0; |
| for (Ice::VariableDeclaration *Var : Context->getGlobalVariables()) { |
| installDeclarationName(Trans, Var, GlobalPrefix, "global", NameIndex); |
| } |
| } |
| - const Ice::IceString &FunctionPrefix = getFlags().DefaultFunctionPrefix; |
| + const Ice::IceString &FunctionPrefix = |
| + getFlags().getDefaultFunctionPrefix(); |
| if (!FunctionPrefix.empty()) { |
| uint32_t NameIndex = 0; |
| for (Ice::FunctionDeclaration *Func : |