Lines Matching refs:o
23 llvm::raw_ostream &o, const ConstantSubscripts &shape) { in ShapeAsFortran() argument
25 o << ",shape="; in ShapeAsFortran()
28 o << ch << dim; in ShapeAsFortran()
31 o << "])"; in ShapeAsFortran()
37 llvm::raw_ostream &o) const { in AsFortran()
39 o << "reshape("; in AsFortran()
42 o << '[' << GetType().AsFortran() << "::"; in AsFortran()
49 o << ','; in AsFortran()
52 o << value.SignedDecimal() << '_' << Result::kind; in AsFortran()
55 value.AsFortran(o, Result::kind); in AsFortran()
57 o << Result::kind << '_' << parser::QuoteCharacterLiteral(value, true); in AsFortran()
60 o << "transfer(" << value.word().ToInt64() << "_8,.false._" in AsFortran()
63 o << ".true." << '_' << Result::kind; in AsFortran()
65 o << ".false." << '_' << Result::kind; in AsFortran()
68 StructureConstructor{result_.derivedTypeSpec(), value}.AsFortran(o); in AsFortran()
72 o << ']'; in AsFortran()
74 ShapeAsFortran(o, shape()); in AsFortran()
75 return o; in AsFortran()
80 llvm::raw_ostream &o) const { in AsFortran()
82 o << "reshape("; in AsFortran()
85 o << '[' << GetType().AsFortran(std::to_string(length_)) << "::"; in AsFortran()
91 o << ','; in AsFortran()
94 o << Result::kind << '_'; in AsFortran()
96 o << parser::QuoteCharacterLiteral(value); in AsFortran()
99 o << ']'; in AsFortran()
101 ShapeAsFortran(o, shape()); in AsFortran()
102 return o; in AsFortran()
106 llvm::raw_ostream &o) const { in AsFortran()
107 return o << symbol_->name().ToString(); in AsFortran()
110 llvm::raw_ostream &ActualArgument::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
112 o << keyword_->ToString() << '='; in AsFortran()
117 expr.value().AsFortran(o); in AsFortran()
119 [&](const AssumedType &assumedType) { assumedType.AsFortran(o); }, in AsFortran()
120 [&](const common::Label &label) { o << '*' << label; }, in AsFortran()
123 return o; in AsFortran()
126 llvm::raw_ostream &SpecificIntrinsic::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
127 return o << name; in AsFortran()
130 llvm::raw_ostream &ProcedureRef::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
133 arg->AsFortran(o) << '%'; in AsFortran()
137 proc_.AsFortran(o); in AsFortran()
141 arg->AsFortran(o << separator); in AsFortran()
146 o << '('; in AsFortran()
148 return o << ')'; in AsFortran()
323 llvm::raw_ostream &o) const { in AsFortran()
326 o << spelling.prefix; in AsFortran()
330 left().AsFortran(o << '(') << ')'; in AsFortran()
332 left().AsFortran(o); in AsFortran()
338 left().AsFortran(o << '(') << ')'; in AsFortran()
340 left().AsFortran(o); in AsFortran()
342 o << spelling.infix; in AsFortran()
345 right().AsFortran(o << '(') << ')'; in AsFortran()
347 right().AsFortran(o); in AsFortran()
350 return o << spelling.suffix; in AsFortran()
354 llvm::raw_ostream &Convert<TO, FROMCAT>::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
362 this->left().AsFortran(o << "achar(iachar(") << ')'; in AsFortran()
364 this->left().AsFortran(o << "int("); in AsFortran()
366 this->left().AsFortran(o << "real("); in AsFortran()
368 this->left().AsFortran(o << "cmplx("); in AsFortran()
370 this->left().AsFortran(o << "logical("); in AsFortran()
372 return o << ",kind=" << TO::kind << ')'; in AsFortran()
375 llvm::raw_ostream &Relational<SomeType>::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
376 common::visit([&](const auto &rel) { rel.AsFortran(o); }, u); in AsFortran()
377 return o; in AsFortran()
381 llvm::raw_ostream &EmitArray(llvm::raw_ostream &o, const Expr<T> &expr) { in EmitArray() argument
382 return expr.AsFortran(o); in EmitArray()
390 llvm::raw_ostream &EmitArray(llvm::raw_ostream &o, const ImpliedDo<T> &implDo) { in EmitArray() argument
391 o << '('; in EmitArray()
392 EmitArray(o, implDo.values()); in EmitArray()
393 o << ',' << ImpliedDoIndex::Result::AsFortran() in EmitArray()
395 implDo.lower().AsFortran(o) << ','; in EmitArray()
396 implDo.upper().AsFortran(o) << ','; in EmitArray()
397 implDo.stride().AsFortran(o) << ')'; in EmitArray()
398 return o; in EmitArray()
403 llvm::raw_ostream &o, const ArrayConstructorValues<T> &values) { in EmitArray() argument
406 o << sep; in EmitArray()
407 common::visit([&](const auto &x) { EmitArray(o, x); }, value.u); in EmitArray()
410 return o; in EmitArray()
414 llvm::raw_ostream &ArrayConstructor<T>::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
415 o << '[' << GetType().AsFortran() << "::"; in AsFortran()
416 EmitArray(o, *this); in AsFortran()
417 return o << ']'; in AsFortran()
423 llvm::raw_ostream &o) const { in AsFortran()
424 o << '[' << GetType().AsFortran(LEN().AsFortran()) << "::"; in AsFortran()
425 EmitArray(o, *this); in AsFortran()
426 return o << ']'; in AsFortran()
430 llvm::raw_ostream &o) const { in AsFortran()
431 o << '[' << GetType().AsFortran() << "::"; in AsFortran()
432 EmitArray(o, *this); in AsFortran()
433 return o << ']'; in AsFortran()
446 llvm::raw_ostream &o) const { in AsFortran()
449 o << "z'" << x.Hexadecimal() << "'"; in AsFortran()
451 [&](const NullPointer &) { o << "NULL()"; }, in AsFortran()
453 s.value().AsFortran(o); in AsFortran()
455 [&](const ImpliedDoIndex &i) { o << i.name.ToString(); }, in AsFortran()
456 [&](const auto &x) { x.AsFortran(o); }, in AsFortran()
459 return o; in AsFortran()
462 llvm::raw_ostream &StructureConstructor::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
463 o << DerivedTypeSpecAsFortran(result_.derivedTypeSpec()); in AsFortran()
465 o << '('; in AsFortran()
469 value.value().AsFortran(o << ch << symbol->name().ToString() << '='); in AsFortran()
473 return o << ')'; in AsFortran()
543 llvm::raw_ostream &EmitVar(llvm::raw_ostream &o, const Symbol &symbol) { in EmitVar() argument
544 return o << symbol.name().ToString(); in EmitVar()
547 llvm::raw_ostream &EmitVar(llvm::raw_ostream &o, const std::string &lit) { in EmitVar() argument
548 return o << parser::QuoteCharacterLiteral(lit); in EmitVar()
551 llvm::raw_ostream &EmitVar(llvm::raw_ostream &o, const std::u16string &lit) { in EmitVar() argument
552 return o << parser::QuoteCharacterLiteral(lit); in EmitVar()
555 llvm::raw_ostream &EmitVar(llvm::raw_ostream &o, const std::u32string &lit) { in EmitVar() argument
556 return o << parser::QuoteCharacterLiteral(lit); in EmitVar()
560 llvm::raw_ostream &EmitVar(llvm::raw_ostream &o, const A &x) { in EmitVar() argument
561 return x.AsFortran(o); in EmitVar()
565 llvm::raw_ostream &EmitVar(llvm::raw_ostream &o, common::Reference<A> x) { in EmitVar() argument
566 return EmitVar(o, *x); in EmitVar()
571 llvm::raw_ostream &o, const A *p, const char *kw = nullptr) { in EmitVar() argument
574 o << kw; in EmitVar()
576 EmitVar(o, *p); in EmitVar()
578 return o; in EmitVar()
583 llvm::raw_ostream &o, const std::optional<A> &x, const char *kw = nullptr) { in EmitVar() argument
586 o << kw; in EmitVar()
588 EmitVar(o, *x); in EmitVar()
590 return o; in EmitVar()
594 llvm::raw_ostream &EmitVar(llvm::raw_ostream &o, in EmitVar() argument
597 o << kw; in EmitVar()
599 EmitVar(o, p.value()); in EmitVar()
600 return o; in EmitVar()
604 llvm::raw_ostream &EmitVar(llvm::raw_ostream &o, const std::shared_ptr<A> &p) { in EmitVar() argument
606 return EmitVar(o, *p); in EmitVar()
610 llvm::raw_ostream &EmitVar(llvm::raw_ostream &o, const std::variant<A...> &u) { in EmitVar() argument
611 common::visit([&](const auto &x) { EmitVar(o, x); }, u); in EmitVar()
612 return o; in EmitVar()
615 llvm::raw_ostream &BaseObject::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
616 return EmitVar(o, u); in AsFortran()
619 llvm::raw_ostream &TypeParamInquiry::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
621 base_.value().AsFortran(o) << '%'; in AsFortran()
623 return EmitVar(o, parameter_); in AsFortran()
626 llvm::raw_ostream &Component::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
627 base_.value().AsFortran(o); in AsFortran()
628 return EmitVar(o << '%', symbol_); in AsFortran()
631 llvm::raw_ostream &NamedEntity::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
633 [&](SymbolRef s) { EmitVar(o, s); }, in AsFortran()
634 [&](const Component &c) { c.AsFortran(o); }, in AsFortran()
637 return o; in AsFortran()
640 llvm::raw_ostream &Triplet::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
641 EmitVar(o, lower_) << ':'; in AsFortran()
642 EmitVar(o, upper_); in AsFortran()
643 EmitVar(o << ':', stride_.value()); in AsFortran()
644 return o; in AsFortran()
647 llvm::raw_ostream &Subscript::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
648 return EmitVar(o, u); in AsFortran()
651 llvm::raw_ostream &ArrayRef::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
652 base_.AsFortran(o); in AsFortran()
655 ss.AsFortran(o << separator); in AsFortran()
658 return o << ')'; in AsFortran()
661 llvm::raw_ostream &CoarrayRef::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
667 o << '%'; in AsFortran()
669 EmitVar(o, part); in AsFortran()
673 EmitVar(o << separator, sscript); in AsFortran()
677 o << ')'; in AsFortran()
681 EmitVar(o << separator, css); in AsFortran()
685 EmitVar(o << separator, stat_, "STAT="); in AsFortran()
690 o << separator, team_, teamIsTeamNumber_ ? "TEAM_NUMBER=" : "TEAM="); in AsFortran()
692 return o << ']'; in AsFortran()
695 llvm::raw_ostream &DataRef::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
696 return EmitVar(o, u); in AsFortran()
699 llvm::raw_ostream &Substring::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
700 EmitVar(o, parent_) << '('; in AsFortran()
701 EmitVar(o, lower_) << ':'; in AsFortran()
702 return EmitVar(o, upper_) << ')'; in AsFortran()
705 llvm::raw_ostream &ComplexPart::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
706 return complex_.AsFortran(o) << '%' << EnumToString(part_); in AsFortran()
709 llvm::raw_ostream &ProcedureDesignator::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
710 return EmitVar(o, u); in AsFortran()
714 llvm::raw_ostream &Designator<T>::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
716 [&](SymbolRef symbol) { EmitVar(o, symbol); }, in AsFortran()
717 [&](const auto &x) { x.AsFortran(o); }, in AsFortran()
720 return o; in AsFortran()
723 llvm::raw_ostream &DescriptorInquiry::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
726 o << "lbound("; in AsFortran()
729 o << "size("; in AsFortran()
732 o << "%STRIDE("; in AsFortran()
735 o << "int(rank("; in AsFortran()
738 o << "int("; in AsFortran()
741 base_.AsFortran(o); in AsFortran()
743 o << "%len"; in AsFortran()
745 o << ")"; in AsFortran()
748 o << ",dim=" << (dimension_ + 1); in AsFortran()
751 return o << ",kind=" << DescriptorInquiry::Result::kind << ")"; in AsFortran()
754 llvm::raw_ostream &Assignment::AsFortran(llvm::raw_ostream &o) const { in AsFortran()
758 rhs.AsFortran(lhs.AsFortran(o) << '='); in AsFortran()
760 [&](const ProcedureRef &proc) { proc.AsFortran(o << "CALL "); }, in AsFortran()
762 lhs.AsFortran(o); in AsFortran()
766 bound.AsFortran(o << sep) << ':'; in AsFortran()
769 o << ')'; in AsFortran()
771 rhs.AsFortran(o << " => "); in AsFortran()
774 lhs.AsFortran(o); in AsFortran()
778 bound.first.AsFortran(o << sep) << ':'; in AsFortran()
779 bound.second.AsFortran(o); in AsFortran()
782 o << ')'; in AsFortran()
784 rhs.AsFortran(o << " => "); in AsFortran()
788 return o; in AsFortran()