[flang-commits] [flang] [flang][rfc] Add represention of volatile references (PR #132486)

Asher Mancinelli via flang-commits flang-commits at lists.llvm.org
Mon Mar 24 10:49:19 PDT 2025


================
@@ -1057,18 +1062,38 @@ unsigned fir::RecordType::getFieldIndex(llvm::StringRef ident) {
 // ReferenceType
 //===----------------------------------------------------------------------===//
 
-// `ref` `<` type `>`
+// `ref` `<` type (`, volatile` $volatile^)? `>`
 mlir::Type fir::ReferenceType::parse(mlir::AsmParser &parser) {
-  return parseTypeSingleton<fir::ReferenceType>(parser);
+  if (parser.parseLess())
----------------
ashermancinelli wrote:

Yes, I was curious why so many parsers are written manually instead of in ODS. If there's no reason to avoid tablegen I'll move the definitions there.

https://github.com/llvm/llvm-project/pull/132486


More information about the flang-commits mailing list