[llvm] [Dwarf] Support `__ptrauth` qualifier in metadata nodes (PR #82363)

Daniil Kovalev via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 14:48:54 PST 2024


================
@@ -1048,6 +1096,48 @@ class DIDerivedType : public DIType {
     return DWARFAddressSpace;
   }
 
+  std::optional<PtrAuthData> getPtrAuthData() const {
+    return getTag() == dwarf::DW_TAG_LLVM_ptrauth_type
+               ? std::optional<PtrAuthData>(PtrAuthData(SubclassData32))
+               : std::nullopt;
+  }
+
+  /// \returns The PointerAuth key.
+  std::optional<unsigned> getPtrAuthKey() const {
+    if (auto PtrAuthData = getPtrAuthData())
+      return (unsigned)PtrAuthData->Payload.Data.Key;
+    else
+      return std::nullopt;
----------------
kovdan01 wrote:

Fixed in 57e86f68e3a83165efa521138b1646ad6a463317, thanks

https://github.com/llvm/llvm-project/pull/82363


More information about the llvm-commits mailing list