File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -2141,6 +2141,16 @@ bool Compiler<Emitter>::VisitUnaryExprOrTypeTraitExpr(
21412141 return this ->emitConst (ASTCtx.toCharUnitsFromBits (Bits).getQuantity (), E);
21422142 }
21432143
2144+ if (Kind == UETT_PtrAuthTypeDiscriminator) {
2145+ if (E->getArgumentType ()->isDependentType ())
2146+ return this ->emitInvalid (E);
2147+
2148+ return this ->emitConst (
2149+ const_cast <ASTContext &>(ASTCtx).getPointerAuthTypeDiscriminator (
2150+ E->getArgumentType ()),
2151+ E);
2152+ }
2153+
21442154 return false ;
21452155}
21462156
Original file line number Diff line number Diff line change 11// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++17 -Wno-vla -fsyntax-only -verify -fptrauth-intrinsics %s
22// RUN: %clang_cc1 -triple aarch64-linux-gnu -std=c++17 -Wno-vla -fsyntax-only -verify -fptrauth-intrinsics %s
33
4+ // RUN: %clang_cc1 -triple arm64-apple-ios -std=c++17 -Wno-vla -fsyntax-only -verify -fptrauth-intrinsics -fexperimental-new-constant-interpreter %s
5+ // RUN: %clang_cc1 -triple aarch64-linux-gnu -std=c++17 -Wno-vla -fsyntax-only -verify -fptrauth-intrinsics -fexperimental-new-constant-interpreter %s
6+
47// RUN: not %clang_cc1 -triple arm64-apple-ios -std=c++17 -Wno-vla -fsyntax-only %s 2>&1 | FileCheck %s
58// CHECK: this target does not support pointer authentication
69
You can’t perform that action at this time.
0 commit comments