Skip to content

Commit 4d48d4b

Browse files
author
git apple-llvm automerger
committed
Merge commit '3c754bfd9b2e' from llvm.org/release/21.x into stable/21.x
2 parents 6d5370e + 3c754bf commit 4d48d4b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

clang/lib/CodeGen/CGExprCXX.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2314,7 +2314,8 @@ llvm::Value *CodeGenFunction::EmitDynamicCast(Address ThisAddr,
23142314
bool IsExact = !IsDynamicCastToVoid &&
23152315
CGM.getCodeGenOpts().OptimizationLevel > 0 &&
23162316
DestRecordTy->getAsCXXRecordDecl()->isEffectivelyFinal() &&
2317-
CGM.getCXXABI().shouldEmitExactDynamicCast(DestRecordTy);
2317+
CGM.getCXXABI().shouldEmitExactDynamicCast(DestRecordTy) &&
2318+
!getLangOpts().PointerAuthCalls;
23182319

23192320
// C++ [expr.dynamic.cast]p4:
23202321
// If the value of v is a null pointer value in the pointer case, the result

clang/test/CodeGenCXX/dynamic-cast-exact-disabled.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// RUN: %clang_cc1 -I%S %s -triple x86_64-apple-darwin10 -O1 -fvisibility=hidden -emit-llvm -std=c++11 -o - | FileCheck %s --check-prefixes=CHECK,INEXACT
44
// RUN: %clang_cc1 -I%S %s -triple x86_64-apple-darwin10 -O1 -fapple-kext -emit-llvm -std=c++11 -o - | FileCheck %s --check-prefixes=CHECK,INEXACT
55
// RUN: %clang_cc1 -I%S %s -triple x86_64-apple-darwin10 -O1 -fno-assume-unique-vtables -emit-llvm -std=c++11 -o - | FileCheck %s --check-prefixes=CHECK,INEXACT
6+
// RUN: %clang_cc1 -I%S %s -triple arm64e-apple-darwin10 -O1 -fptrauth-calls -emit-llvm -std=c++11 -o - | FileCheck %s --check-prefixes=CHECK,INEXACT
67

78
struct A { virtual ~A(); };
89
struct B final : A { };

0 commit comments

Comments
 (0)