[Mlir-commits] [llvm] [mlir] [Dwarf] Support `__ptrauth` qualifier in metadata nodes (PR #83862)
David Blaikie
llvmlistbot at llvm.org
Mon Mar 4 13:42:46 PST 2024
================
@@ -1048,6 +1088,39 @@ class DIDerivedType : public DIType {
return DWARFAddressSpace;
}
+ std::optional<PtrAuthData> getPtrAuthData() const;
+
+ /// \returns The PointerAuth key.
+ std::optional<unsigned> getPtrAuthKey() const {
----------------
dwblaikie wrote:
Are these helpers particularly useful? It seems like they change the usage code from this:
```
if (auto PtrAuthData = getPtrAuthData())
do_something_with(PtrAuthData->Key());
```
to
```
if (auto Key = getPtrAuthKey())
do_something_with(*Key);
```
Which doesn't seem like a huge win?
https://github.com/llvm/llvm-project/pull/83862
More information about the Mlir-commits
mailing list