[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

Daniil Kovalev via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 2 01:12:55 PDT 2024


================
@@ -2190,6 +2198,15 @@ RValue CodeGenFunction::EmitLoadOfAnyValue(LValue LV, AggValueSlot Slot,
 /// method emits the address of the lvalue, then loads the result as an rvalue,
 /// returning the rvalue.
 RValue CodeGenFunction::EmitLoadOfLValue(LValue LV, SourceLocation Loc) {
+  // Load from __ptrauth.
+  if (PointerAuthQualifier PtrAuth = LV.getQuals().getPointerAuth()) {
+    LV.getQuals().removePointerAuth();
+    auto value = EmitLoadOfLValue(LV, Loc).getScalarVal();
----------------
kovdan01 wrote:

Nit

```suggestion
    auto Value = EmitLoadOfLValue(LV, Loc).getScalarVal();
```

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


More information about the cfe-commits mailing list