[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 13:23:49 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:

I'm not opinionated though, if folks would rather `fir.ref<T, volatile : true>` or something similar I'm happy to change it. I'll leave it as-is unless someone prefers the other way.

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


More information about the flang-commits mailing list