================ @@ -1279,6 +1279,37 @@ def GlobalOp : CIR_Op<"global"> { let hasVerifier = 1; } +//===----------------------------------------------------------------------===// +// GetGlobalOp +//===----------------------------------------------------------------------===// + +def GetGlobalOp : CIR_Op<"get_global", + [Pure, DeclareOpInterfaceMethods<SymbolUserOpInterface>]> { + let summary = "Get the address of a global variable"; + let description = [{ + The `cir.get_global` operation retrieves the address pointing to a + named global variable. If the global variable is marked constant, writing + to the resulting address (such as through a `cir.store` operation) is + undefined. Resulting type must always be a `!cir.ptr<...>` type with the ---------------- erichkeane wrote:
```suggestion undefined. The resulting type must always be a `!cir.ptr<...>` type with the ``` https://github.com/llvm/llvm-project/pull/135095 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits