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(
2141
2141
return this ->emitConst (ASTCtx.toCharUnitsFromBits (Bits).getQuantity (), E);
2142
2142
}
2143
2143
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
+
2144
2154
return false ;
2145
2155
}
2146
2156
Original file line number Diff line number Diff line change 1
1
// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++17 -Wno-vla -fsyntax-only -verify -fptrauth-intrinsics %s
2
2
// RUN: %clang_cc1 -triple aarch64-linux-gnu -std=c++17 -Wno-vla -fsyntax-only -verify -fptrauth-intrinsics %s
3
3
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
+
4
7
// RUN: not %clang_cc1 -triple arm64-apple-ios -std=c++17 -Wno-vla -fsyntax-only %s 2>&1 | FileCheck %s
5
8
// CHECK: this target does not support pointer authentication
6
9
You can’t perform that action at this time.
0 commit comments