@@ -1111,18 +1111,11 @@ void IRGenModule::setHasNoFramePointer(llvm::Function *F) {
1111
1111
}
1112
1112
1113
1113
// / 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) {
1117
1116
// Add the default attributes for the Clang configuration.
1118
1117
clang::CodeGen::addDefaultFunctionDefinitionAttributes (getClangCGM (), Attrs);
1119
1118
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
-
1126
1119
// Add/remove MinSize based on the appropriate setting.
1127
1120
if (FuncOptMode == OptimizationMode::NotSet)
1128
1121
FuncOptMode = IRGen.Opts .OptMode ;
@@ -1135,10 +1128,9 @@ void IRGenModule::constructInitialFnAttributes(
1135
1128
}
1136
1129
}
1137
1130
1138
- llvm::AttributeList
1139
- IRGenModule::constructInitialAttributes (bool disablePtrAuthReturns) {
1131
+ llvm::AttributeList IRGenModule::constructInitialAttributes () {
1140
1132
llvm::AttrBuilder b;
1141
- constructInitialFnAttributes (b, disablePtrAuthReturns );
1133
+ constructInitialFnAttributes (b);
1142
1134
return llvm::AttributeList::get (getLLVMContext (),
1143
1135
llvm::AttributeList::FunctionIndex, b);
1144
1136
}
0 commit comments