Lines Matching full:semantics

38 #include "flang/Semantics/tools.h"
39 #include "flang/Semantics/type.h"
284 static const Fortran::semantics::Symbol &
296 const Fortran::lower::SomeExpr *expr = Fortran::semantics::GetExpr(allocObj);
329 const Fortran::semantics::DeclTypeSpec &type;
338 const Fortran::semantics::Symbol &getSymbol() const {
348 const Fortran::semantics::Symbol &symbol = unwrapSymbol(allocObj);
362 statExpr = Fortran::semantics::GetExpr(statVar);
365 errMsgExpr = Fortran::semantics::GetExpr(errMsgVar);
371 sourceExpr = Fortran::semantics::GetExpr(source.v.value());
374 moldExpr = Fortran::semantics::GetExpr(mold.v.value());
377 streamExpr = Fortran::semantics::GetExpr(stream.v.value());
380 pinnedExpr = Fortran::semantics::GetExpr(pinned.v.value());
428 loc, Fortran::semantics::GetExpr(*lbExpr), stmtCtx));
436 loc, Fortran::semantics::GetExpr(std::get<1>(shapeSpec.t)), stmtCtx));
452 if (alloc.getSymbol().test(Fortran::semantics::Symbol::Flag::AccDeclare))
472 bool isCudaSymbol = Fortran::semantics::HasCUDAAttr(alloc.getSymbol());
514 const Fortran::semantics::DeclTypeSpec *typeSpec =
518 if (const Fortran::semantics::DerivedTypeSpec *derived =
520 if (Fortran::semantics::CountLenParameters(*derived) > 0)
523 Fortran::semantics::DeclTypeSpec::Category::Character) {
524 Fortran::semantics::ParamValue lenParam =
526 if (Fortran::semantics::MaybeIntExpr intExpr = lenParam.GetExplicit()) {
581 loc, Fortran::semantics::GetExpr(*lbExpr), stmtCtx));
585 loc, Fortran::semantics::GetExpr(std::get<1>(bounds)), stmtCtx));
635 if (Fortran::semantics::HasCUDAAttr(alloc.getSymbol())) {
711 const Fortran::semantics::DeclTypeSpec *typeSpec =
749 const Fortran::semantics::DeclTypeSpec *getIfAllocateStmtTypeSpec() const {
759 const Fortran::semantics::Symbol &sym) {
818 const Fortran::semantics::Symbol &sym) {
819 if (sym.test(Fortran::semantics::Symbol::Flag::AccDeclare))
826 const Fortran::semantics::Symbol &sym) {
827 if (sym.test(Fortran::semantics::Symbol::Flag::AccDeclare))
835 const Fortran::semantics::Symbol &sym) {
859 const Fortran::semantics::Symbol *symbol = nullptr) {
860 bool isCudaSymbol = symbol && Fortran::semantics::HasCUDAAttr(*symbol);
895 const Fortran::semantics::Symbol *sym, mlir::Value declaredTypeDesc) {
908 const Fortran::semantics::Symbol *sym) {
936 statExpr = Fortran::semantics::GetExpr(statVar);
939 errMsgExpr = Fortran::semantics::GetExpr(errMsgVar);
949 const Fortran::semantics::Symbol &symbol = unwrapSymbol(allocateObject);
956 if (const Fortran::semantics::DerivedTypeSpec *derivedTypeSpec =
976 isNonContiguousArrayPointer(const Fortran::semantics::Symbol &sym) {
977 return Fortran::semantics::IsPointer(sym) && sym.Rank() != 0 &&
978 !sym.attrs().test(Fortran::semantics::Attr::CONTIGUOUS);
982 static inline bool isPolymorphicPointer(const Fortran::semantics::Symbol &sym) {
983 return Fortran::semantics::IsPointer(sym) &&
984 Fortran::semantics::IsPolymorphic(sym);
989 isPolymorphicAllocatable(const Fortran::semantics::Symbol &sym) {
990 return Fortran::semantics::IsAllocatable(sym) &&
991 Fortran::semantics::IsPolymorphic(sym);
996 static bool mayBeCapturedInInternalProc(const Fortran::semantics::Symbol &sym) {
997 const Fortran::semantics::Scope &owner = sym.owner();
998 Fortran::semantics::Scope::Kind kind = owner.kind();
1001 if (kind == Fortran::semantics::Scope::Kind::Subprogram ||
1002 kind == Fortran::semantics::Scope::Kind::MainProgram)
1003 for (const Fortran::semantics::Scope &childScope : owner.children())
1004 if (childScope.kind() == Fortran::semantics::Scope::Kind::Subprogram)
1005 if (const Fortran::semantics::Symbol *childSym = childScope.symbol())
1007 childSym->detailsIf<Fortran::semantics::SubprogramDetails>())
1022 const Fortran::semantics::Symbol &sym = var.getSymbol();
1034 if (alwaysUseBox || var.isGlobal() || Fortran::semantics::IsDummy(sym) ||
1035 Fortran::semantics::IsFunctionResult(sym) ||
1036 sym.attrs().test(Fortran::semantics::Attr::VOLATILE) ||
1092 if (!var.isGlobal() && !Fortran::semantics::IsDummy(var.getSymbol()))
1139 if (const Fortran::semantics::Symbol *sym =
1141 return Fortran::semantics::IsAllocatable(sym->GetUltimate());
1146 if (const Fortran::semantics::Symbol *sym =
1148 return Fortran::semantics::IsPointer(sym->GetUltimate());
1154 const Fortran::semantics::Symbol &sym, mlir::Value box) {
1162 if (Fortran::semantics::IsOptional(sym)) {
1187 const Fortran::semantics::DerivedTypeSpec &typeSpec) {