From: River Riddle Date: Wed, 29 May 2019 20:23:47 +0000 (-0700) Subject: Add an example of accessing the impl storage to the 'DefiningAttributesAndTypes... X-Git-Tag: llvmorg-11-init~1466^2~1567 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c455ecef22960f7a6d5a44917d86fb1733736f98;p=platform%2Fupstream%2Fllvm.git Add an example of accessing the impl storage to the 'DefiningAttributesAndTypes' document. -- PiperOrigin-RevId: 250553898 --- diff --git a/mlir/g3doc/DefiningAttributesAndTypes.md b/mlir/g3doc/DefiningAttributesAndTypes.md index 22dec18..82399e3 100644 --- a/mlir/g3doc/DefiningAttributesAndTypes.md +++ b/mlir/g3doc/DefiningAttributesAndTypes.md @@ -232,6 +232,18 @@ public: } return success(); } + + /// Return the parameter value. + unsigned getParameter() { + // 'getImpl' returns a pointer to our internal storage instance. + return getImpl()->nonZeroParam; + } + + /// Return the integer parameter type. + IntegerType getParameterType() { + // 'getImpl' returns a pointer to our internal storage instance. + return getImpl()->integerType; + } }; ```