forked from OSchip/llvm-project
[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
This commit is contained in:
parent
280b43031c
commit
4606f838b2
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue