[flang-commits] [flang] [flang][rfc] Add represention of volatile references (PR #132486)
via flang-commits
flang-commits at lists.llvm.org
Mon Mar 24 10:15:01 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:
Maybe the assembly format could be moved into the tablegen declaration with something like below:
```
let assemblyFormat = [{
`<` $eleTy (`,` `volatile` $volatile^)? `>`
}];
```
https://github.com/llvm/llvm-project/pull/132486
More information about the flang-commits
mailing list