Lines Matching +full:build +full:- +full:std
1 //===-- lib/Semantics/program-tree.cpp ------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "program-tree.h"
11 #include "flang/Parser/char-block.h"
18 const auto &spec{std::get<parser::SpecificationPart>(x.t)}; in BuildSubprogramTree()
19 const auto &exec{std::get<parser::ExecutionPart>(x.t)}; in BuildSubprogramTree()
21 std::get<std::optional<parser::InternalSubprogramPart>>(x.t)}; in BuildSubprogramTree()
25 std::get<std::list<parser::InternalSubprogram>>(subps->t)) { in BuildSubprogramTree()
26 std::visit( in BuildSubprogramTree()
27 [&](const auto &y) { node.AddChild(ProgramTree::Build(y.value())); }, in BuildSubprogramTree()
36 const auto &spec{std::get<parser::SpecificationPart>(x.t)}; in BuildSubprogramTree()
42 const auto &spec{std::get<parser::SpecificationPart>(x.t)}; in BuildModuleTree()
43 const auto &subps{std::get<std::optional<parser::ModuleSubprogramPart>>(x.t)}; in BuildModuleTree()
47 std::get<std::list<parser::ModuleSubprogram>>(subps->t)) { in BuildModuleTree()
48 std::visit( in BuildModuleTree()
49 [&](const auto &y) { node.AddChild(ProgramTree::Build(y.value())); }, in BuildModuleTree()
56 ProgramTree ProgramTree::Build(const parser::ProgramUnit &x) { in Build() function in Fortran::semantics::ProgramTree
57 return std::visit([](const auto &y) { return Build(y.value()); }, x.u); in Build()
60 ProgramTree ProgramTree::Build(const parser::MainProgram &x) { in Build() function in Fortran::semantics::ProgramTree
62 std::get<std::optional<parser::Statement<parser::ProgramStmt>>>(x.t)}; in Build()
63 const auto &end{std::get<parser::Statement<parser::EndProgramStmt>>(x.t)}; in Build()
65 auto result{stmt ? BuildSubprogramTree(stmt->statement.v, x).set_stmt(*stmt) in Build()
70 ProgramTree ProgramTree::Build(const parser::FunctionSubprogram &x) { in Build() function in Fortran::semantics::ProgramTree
71 const auto &stmt{std::get<parser::Statement<parser::FunctionStmt>>(x.t)}; in Build()
72 const auto &end{std::get<parser::Statement<parser::EndFunctionStmt>>(x.t)}; in Build()
73 const auto &name{std::get<parser::Name>(stmt.statement.t)}; in Build()
77 ProgramTree ProgramTree::Build(const parser::SubroutineSubprogram &x) { in Build() function in Fortran::semantics::ProgramTree
78 const auto &stmt{std::get<parser::Statement<parser::SubroutineStmt>>(x.t)}; in Build()
79 const auto &end{std::get<parser::Statement<parser::EndSubroutineStmt>>(x.t)}; in Build()
80 const auto &name{std::get<parser::Name>(stmt.statement.t)}; in Build()
84 ProgramTree ProgramTree::Build(const parser::SeparateModuleSubprogram &x) { in Build() function in Fortran::semantics::ProgramTree
85 const auto &stmt{std::get<parser::Statement<parser::MpSubprogramStmt>>(x.t)}; in Build()
87 std::get<parser::Statement<parser::EndMpSubprogramStmt>>(x.t)}; in Build()
92 ProgramTree ProgramTree::Build(const parser::Module &x) { in Build() function in Fortran::semantics::ProgramTree
93 const auto &stmt{std::get<parser::Statement<parser::ModuleStmt>>(x.t)}; in Build()
94 const auto &end{std::get<parser::Statement<parser::EndModuleStmt>>(x.t)}; in Build()
99 ProgramTree ProgramTree::Build(const parser::Submodule &x) { in Build() function in Fortran::semantics::ProgramTree
100 const auto &stmt{std::get<parser::Statement<parser::SubmoduleStmt>>(x.t)}; in Build()
101 const auto &end{std::get<parser::Statement<parser::EndSubmoduleStmt>>(x.t)}; in Build()
102 const auto &name{std::get<parser::Name>(stmt.statement.t)}; in Build()
106 ProgramTree ProgramTree::Build(const parser::BlockData &x) { in Build() function in Fortran::semantics::ProgramTree
107 const auto &stmt{std::get<parser::Statement<parser::BlockDataStmt>>(x.t)}; in Build()
108 const auto &end{std::get<parser::Statement<parser::EndBlockDataStmt>>(x.t)}; in Build()
115 ProgramTree ProgramTree::Build(const parser::CompilerDirective &) { in Build() function in Fortran::semantics::ProgramTree
116 DIE("ProgramTree::Build() called for CompilerDirective"); in Build()
121 std::get<const parser::Statement<parser::SubmoduleStmt> *>(stmt_)}; in GetParentId()
122 return std::get<parser::ParentIdentifier>(stmt->statement.t); in GetParentId()
136 using ListType = std::list<parser::PrefixSpec>; in HasModulePrefix()
138 std::visit(common::visitors{ in HasModulePrefix()
140 return &std::get<ListType>(x->statement.t); in HasModulePrefix()
143 return &std::get<ListType>(x->statement.t); in HasModulePrefix()
145 [](const auto *) -> const ListType * { return nullptr; }, in HasModulePrefix()
150 if (std::holds_alternative<parser::PrefixSpec::Module>(prefix.u)) { in HasModulePrefix()
159 return std::visit( in GetKind()
193 children_.emplace_back(std::move(child)); in AddChild()