diff --git a/flang/include/flang/Frontend/CompilerInstance.h b/flang/include/flang/Frontend/CompilerInstance.h --- a/flang/include/flang/Frontend/CompilerInstance.h +++ b/flang/include/flang/Frontend/CompilerInstance.h @@ -125,7 +125,7 @@ Fortran::semantics::Semantics &semantics() { return *semantics_; } const Fortran::semantics::Semantics &semantics() const { return *semantics_; } - void setSemantics(std::unique_ptr semantics) { + void SetSemantics(std::unique_ptr semantics) { semantics_ = std::move(semantics); } diff --git a/flang/include/flang/Frontend/CompilerInvocation.h b/flang/include/flang/Frontend/CompilerInvocation.h --- a/flang/include/flang/Frontend/CompilerInvocation.h +++ b/flang/include/flang/Frontend/CompilerInvocation.h @@ -191,18 +191,18 @@ void SetDefaultFortranOpts(); /// Set the default predefinitions. - void setDefaultPredefinitions(); + void SetDefaultPredefinitions(); /// Collect the macro definitions from preprocessorOpts_ and prepare them for /// the parser (i.e. copy into parserOpts_) - void collectMacroDefinitions(); + void CollectMacroDefinitions(); /// Set the Fortran options to user-specified values. /// These values are found in the preprocessor options. - void setFortranOpts(); + void SetFortranOpts(); /// Set the Semantic Options - void setSemanticsOpts(Fortran::parser::AllCookedSources &); + void SetSemanticsOpts(Fortran::parser::AllCookedSources &); }; } // end namespace Fortran::frontend diff --git a/flang/lib/Frontend/CompilerInstance.cpp b/flang/lib/Frontend/CompilerInstance.cpp --- a/flang/lib/Frontend/CompilerInstance.cpp +++ b/flang/lib/Frontend/CompilerInstance.cpp @@ -142,11 +142,11 @@ // Set some sane defaults for the frontend. invoc.SetDefaultFortranOpts(); // Update the fortran options based on user-based input. - invoc.setFortranOpts(); + invoc.SetFortranOpts(); // Set the encoding to read all input files in based on user input. allSources_->set_encoding(invoc.fortranOpts().encoding); // Create the semantics context and set semantic options. - invoc.setSemanticsOpts(*this->allCookedSources_); + invoc.SetSemanticsOpts(*this->allCookedSources_); // Run the frontend action `act` for every input file. for (const FrontendInputFile &fif : frontendOpts().inputs) { diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -565,7 +565,7 @@ return success; } -void CompilerInvocation::collectMacroDefinitions() { +void CompilerInvocation::CollectMacroDefinitions() { auto &ppOpts = this->preprocessorOpts(); for (unsigned i = 0, n = ppOpts.macros.size(); i != n; ++i) { @@ -607,7 +607,7 @@ // TODO: When expanding this method, consider creating a dedicated API for // this. Also at some point we will need to differentiate between different // targets and add dedicated predefines for each. -void CompilerInvocation::setDefaultPredefinitions() { +void CompilerInvocation::SetDefaultPredefinitions() { auto &fortranOptions = fortranOpts(); const auto &frontendOptions = frontendOpts(); @@ -631,7 +631,7 @@ } } -void CompilerInvocation::setFortranOpts() { +void CompilerInvocation::SetFortranOpts() { auto &fortranOptions = fortranOpts(); const auto &frontendOptions = frontendOpts(); const auto &preprocessorOptions = preprocessorOpts(); @@ -677,7 +677,7 @@ } } -void CompilerInvocation::setSemanticsOpts( +void CompilerInvocation::SetSemanticsOpts( Fortran::parser::AllCookedSources &allCookedSources) { const auto &fortranOptions = fortranOpts(); diff --git a/flang/lib/Frontend/FrontendAction.cpp b/flang/lib/Frontend/FrontendAction.cpp --- a/flang/lib/Frontend/FrontendAction.cpp +++ b/flang/lib/Frontend/FrontendAction.cpp @@ -79,8 +79,8 @@ if ((invoc.preprocessorOpts().macrosFlag == PPMacrosFlag::Include) || (invoc.preprocessorOpts().macrosFlag == PPMacrosFlag::Unknown && currentInput().MustBePreprocessed())) { - invoc.setDefaultPredefinitions(); - invoc.collectMacroDefinitions(); + invoc.SetDefaultPredefinitions(); + invoc.CollectMacroDefinitions(); } // Decide between fixed and free form (if the user didn't express any @@ -162,7 +162,7 @@ assert(parseTree && "Cannot run semantic checks without a parse tree!"); // Prepare semantics - ci.setSemantics(std::make_unique( + ci.SetSemantics(std::make_unique( ci.invocation().semanticsContext(), *parseTree, ci.invocation().debugModuleDir())); auto &semantics = ci.semantics();