@@ -1111,18 +1111,11 @@ void IRGenModule::setHasNoFramePointer(llvm::Function *F) {
11111111}
11121112
11131113// / Construct initial function attributes from options.
1114- void IRGenModule::constructInitialFnAttributes (
1115- llvm::AttrBuilder &Attrs, bool disablePtrAuthReturns,
1116- OptimizationMode FuncOptMode) {
1114+ void IRGenModule::constructInitialFnAttributes (llvm::AttrBuilder &Attrs,
1115+ OptimizationMode FuncOptMode) {
11171116 // Add the default attributes for the Clang configuration.
11181117 clang::CodeGen::addDefaultFunctionDefinitionAttributes (getClangCGM (), Attrs);
11191118
1120- // Disable `ptrauth-returns`. It does not work for swifttailcc lowering atm.
1121- // The `autibsp` instruction executed before a tail call that adjust the stack
1122- // will currently fail.
1123- if (disablePtrAuthReturns)
1124- Attrs.removeAttribute (" ptrauth-returns" );
1125-
11261119 // Add/remove MinSize based on the appropriate setting.
11271120 if (FuncOptMode == OptimizationMode::NotSet)
11281121 FuncOptMode = IRGen.Opts .OptMode ;
@@ -1135,10 +1128,9 @@ void IRGenModule::constructInitialFnAttributes(
11351128 }
11361129}
11371130
1138- llvm::AttributeList
1139- IRGenModule::constructInitialAttributes (bool disablePtrAuthReturns) {
1131+ llvm::AttributeList IRGenModule::constructInitialAttributes () {
11401132 llvm::AttrBuilder b;
1141- constructInitialFnAttributes (b, disablePtrAuthReturns );
1133+ constructInitialFnAttributes (b);
11421134 return llvm::AttributeList::get (getLLVMContext (),
11431135 llvm::AttributeList::FunctionIndex, b);
11441136}
0 commit comments