# Does emitc dialect support member access opeartor?

**URL:** <https://discourse.llvm.org/t/does-emitc-dialect-support-member-access-opeartor/79600>\
**Category:** MLIR\
**Created:** [June 14, 2024, 5:58am UTC](https://discourse.llvm.org/t/does-emitc-dialect-support-member-access-opeartor/79600 "2024-06-14T05:58:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![feiyulv](https://sea1.discourse-cdn.com/flex021/user_avatar/discourse.llvm.org/feiyulv/32/16931_2.png) [@feiyulv](https://discourse.llvm.org/u/feiyulv)\
**Post date:** [June 14, 2024, 5:58am UTC](https://discourse.llvm.org/t/does-emitc-dialect-support-member-access-opeartor/79600/1 "2024-06-14T05:58:23Z")

</div>

Hi, the latest mlir emitc support `opaque type`, which we can use to generate self define struct like this.

```auto
!emitc.opaque<"MyStruct">

```

But how to access the struct member using `.`? The subscript operator only support `[]`

---

<div class="post-metadata">

**Author:** ![marbre](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@marbre](https://discourse.llvm.org/u/marbre)\
**Post date:** [July 13, 2024, 10:06am UTC](https://discourse.llvm.org/t/does-emitc-dialect-support-member-access-opeartor/79600/2 "2024-07-13T10:06:17Z")

</div>

Hey @feiyulv,

This will be possible as soon as [[mlir][EmitC] Add member access ops by marbre · Pull Request #98460 · llvm/llvm-project · GitHub](https://github.com/llvm/llvm-project/pull/98460) lands which adds a `emitc.member` operation.

---

<div class="post-metadata">

**Author:** ![feiyulv](https://sea1.discourse-cdn.com/flex021/user_avatar/discourse.llvm.org/feiyulv/32/16931_2.png) [@feiyulv](https://discourse.llvm.org/u/feiyulv)\
**Post date:** [July 16, 2024, 7:37am UTC](https://discourse.llvm.org/t/does-emitc-dialect-support-member-access-opeartor/79600/3 "2024-07-16T07:37:38Z")

</div>

Thank you
