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

via flang-commits flang-commits at lists.llvm.org
Tue Mar 25 04:13:00 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())
----------------
jeanPerier wrote:

Thanks for testing! OK with keeping the C++, I see this is also the case for the hlfir.expr type.

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


More information about the flang-commits mailing list