diff options
author | Andrzej Warzynski <andrzej.warzynski@arm.com> | 2022-01-27 16:44:44 +0000 |
---|---|---|
committer | Andrzej Warzynski <andrzej.warzynski@arm.com> | 2022-01-31 10:36:18 +0000 |
commit | 4606f838b2b60ce7d3995adf194eee470bf2395b (patch) | |
tree | 8421c185b3c0c1ca9936594d901aabf2692d5965 | |
parent | 280b43031ca05bfb674017f91988b7c9b659a820 (diff) |
[flang][driver][nfc] Fix capitalisation
As pointed out in https://reviews.llvm.org/D93401, some methods in the
Flang driver are named inconsistently. The driver strives to follow
Flang's C++ style [1] and this patch updates these methods accordingly.
[1]
https://github.com/llvm/llvm-project/blob/main/flang/docs/C%2B%2Bstyle.md
Differential Revision: https://reviews.llvm.org/D118381
-rw-r--r-- | flang/include/flang/Frontend/CompilerInstance.h | 2 | ||||
-rw-r--r-- | flang/include/flang/Frontend/CompilerInvocation.h | 8 | ||||
-rw-r--r-- | flang/lib/Frontend/CompilerInstance.cpp | 4 | ||||
-rw-r--r-- | flang/lib/Frontend/CompilerInvocation.cpp | 8 | ||||
-rw-r--r-- | flang/lib/Frontend/FrontendAction.cpp | 6 |
5 files changed, 14 insertions, 14 deletions
diff --git a/flang/include/flang/Frontend/CompilerInstance.h b/flang/include/flang/Frontend/CompilerInstance.h index 2871fdcadf22..ce1e46cab314 100644 --- a/flang/include/flang/Frontend/CompilerInstance.h +++ b/flang/include/flang/Frontend/CompilerInstance.h @@ -125,7 +125,7 @@ public: Fortran::semantics::Semantics &semantics() { return *semantics_; } const Fortran::semantics::Semantics &semantics() const { return *semantics_; } - void setSemantics(std::unique_ptr<Fortran::semantics::Semantics> semantics) { + void SetSemantics(std::unique_ptr<Fortran::semantics::Semantics> semantics) { semantics_ = std::move(semantics); } diff --git a/flang/include/flang/Frontend/CompilerInvocation.h b/flang/include/flang/Frontend/CompilerInvocation.h index 16b069e9a328..0b59da690c87 100644 --- a/flang/include/flang/Frontend/CompilerInvocation.h +++ b/flang/include/flang/Frontend/CompilerInvocation.h @@ -191,18 +191,18 @@ public: 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 index 20a9b58a5a3c..bae7ea6a77d6 100644 --- a/flang/lib/Frontend/CompilerInstance.cpp +++ b/flang/lib/Frontend/CompilerInstance.cpp @@ -142,11 +142,11 @@ bool CompilerInstance::ExecuteAction(FrontendAction &act) { // 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 index 4525130e5c2e..2d8c9e386fce 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -565,7 +565,7 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &res, 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 @@ void CompilerInvocation::SetDefaultFortranOpts() { // 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::setDefaultPredefinitions() { } } -void CompilerInvocation::setFortranOpts() { +void CompilerInvocation::SetFortranOpts() { auto &fortranOptions = fortranOpts(); const auto &frontendOptions = frontendOpts(); const auto &preprocessorOptions = preprocessorOpts(); @@ -677,7 +677,7 @@ void CompilerInvocation::setFortranOpts() { } } -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 index 5285681e2904..762cbc8fc47b 100644 --- a/flang/lib/Frontend/FrontendAction.cpp +++ b/flang/lib/Frontend/FrontendAction.cpp @@ -79,8 +79,8 @@ bool FrontendAction::BeginSourceFile( 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 @@ bool FrontendAction::RunSemanticChecks() { assert(parseTree && "Cannot run semantic checks without a parse tree!"); // Prepare semantics - ci.setSemantics(std::make_unique<Fortran::semantics::Semantics>( + ci.SetSemantics(std::make_unique<Fortran::semantics::Semantics>( ci.invocation().semanticsContext(), *parseTree, ci.invocation().debugModuleDir())); auto &semantics = ci.semantics(); |