mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Revert "arm64e: Workaround ptrauth-returns failure for swifttailcc"
This reverts commit 3c125a74f0.
This commit is contained in:
@@ -1111,18 +1111,11 @@ void IRGenModule::setHasNoFramePointer(llvm::Function *F) {
|
||||
}
|
||||
|
||||
/// Construct initial function attributes from options.
|
||||
void IRGenModule::constructInitialFnAttributes(
|
||||
llvm::AttrBuilder &Attrs, bool disablePtrAuthReturns,
|
||||
OptimizationMode FuncOptMode) {
|
||||
void IRGenModule::constructInitialFnAttributes(llvm::AttrBuilder &Attrs,
|
||||
OptimizationMode FuncOptMode) {
|
||||
// Add the default attributes for the Clang configuration.
|
||||
clang::CodeGen::addDefaultFunctionDefinitionAttributes(getClangCGM(), Attrs);
|
||||
|
||||
// Disable `ptrauth-returns`. It does not work for swifttailcc lowering atm.
|
||||
// The `autibsp` instruction executed before a tail call that adjust the stack
|
||||
// will currently fail.
|
||||
if (disablePtrAuthReturns)
|
||||
Attrs.removeAttribute("ptrauth-returns");
|
||||
|
||||
// Add/remove MinSize based on the appropriate setting.
|
||||
if (FuncOptMode == OptimizationMode::NotSet)
|
||||
FuncOptMode = IRGen.Opts.OptMode;
|
||||
@@ -1135,10 +1128,9 @@ void IRGenModule::constructInitialFnAttributes(
|
||||
}
|
||||
}
|
||||
|
||||
llvm::AttributeList
|
||||
IRGenModule::constructInitialAttributes(bool disablePtrAuthReturns) {
|
||||
llvm::AttributeList IRGenModule::constructInitialAttributes() {
|
||||
llvm::AttrBuilder b;
|
||||
constructInitialFnAttributes(b, disablePtrAuthReturns);
|
||||
constructInitialFnAttributes(b);
|
||||
return llvm::AttributeList::get(getLLVMContext(),
|
||||
llvm::AttributeList::FunctionIndex, b);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user