Skip to content

Commit c99b654

Browse files
committed
IRGen: Method implementations for elided vtable entries are direct and don't need ptrauth
1 parent 2dac584 commit c99b654

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/IRGen/GenClass.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2526,11 +2526,9 @@ FunctionPointer irgen::emitVirtualMethodValue(IRGenFunction &IGF,
25262526
return FunctionPointer(fnPtr, authInfo, signature);
25272527
}
25282528
case ClassMetadataLayout::MethodInfo::Kind::DirectImpl: {
2529-
auto fnPtr = IGF.Builder.CreateBitCast(methodInfo.getDirectImpl(),
2529+
auto fnPtr = llvm::ConstantExpr::getBitCast(methodInfo.getDirectImpl(),
25302530
signature.getType()->getPointerTo());
2531-
2532-
auto authInfo = PointerAuthInfo::forFunctionPointer(IGF.IGM, methodType);
2533-
return FunctionPointer(fnPtr, authInfo, signature);
2531+
return FunctionPointer::forDirect(fnPtr, signature);
25342532
}
25352533
}
25362534

0 commit comments

Comments
 (0)