[PATCH] D81034: [flang] add ConvertType to lowering
Eric Schweitz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 5 11:16:32 PDT 2020
schweitz marked 4 inline comments as done.
schweitz added inline comments.
================
Comment at: flang/lib/Lower/ConvertType.cpp:263
+ //===--------------------------------------------------------------------===//
+ // Generate type helpers
+ //===--------------------------------------------------------------------===//
----------------
kiranchandramohan wrote:
> What are the possible parameter types for the type helper function gen?
Your questions got lost in the general shuffle.
I don't understand this question.
================
Comment at: flang/lib/Lower/ConvertType.cpp:301
+ mlir::Type gen(const Fortran::evaluate::BOZLiteralConstant &) {
+ return genTypelessPtr();
+ }
----------------
kiranchandramohan wrote:
> Why is it a TypelessPtr for BOZLiteralConstant?
A BOZ constant is a string of bits and has no type.
================
Comment at: flang/lib/Lower/ConvertType.cpp:378
+ ty = rec;
+ } else {
+ emitError("symbol's type must have a type spec");
----------------
kiranchandramohan wrote:
> Are the polymorphic or class stars missing?
Yes. (We're focused on F77 end-to-end.)
================
Comment at: flang/lib/Lower/ConvertType.cpp:388
+ if (symbol.GetType()->category() ==
+ Fortran::semantics::DeclTypeSpec::Character) {
+ auto charLen = fir::SequenceType::getUnknownExtent();
----------------
kiranchandramohan wrote:
> Isn't similar processing required for non-character sequences?
> If yes, can a TODO be added?
CHARACTER is a strange intrinsic type indeed. We have to handle it special in the bridge. Line 399 handles the common case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81034/new/
https://reviews.llvm.org/D81034
More information about the llvm-commits
mailing list