Skip to content

Commit 7e8c007

Browse files
committed
Remove unused parameter from helper function in Builtins.cpp
Intrinsics never have custom function type ExtInfo anymore. (This used to be where the "noreturn" bit lived, but now that's represented by Swift.Never.) No functionality change.
1 parent e786431 commit 7e8c007

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/AST/Builtins.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ getSwiftFunctionTypeForIntrinsic(llvm::Intrinsic::ID ID,
13221322
ArrayRef<Type> TypeArgs,
13231323
ASTContext &Context,
13241324
SmallVectorImpl<Type> &ArgElts,
1325-
Type &ResultTy, FunctionType::ExtInfo &Info) {
1325+
Type &ResultTy) {
13261326
typedef llvm::Intrinsic::IITDescriptor IITDescriptor;
13271327
SmallVector<IITDescriptor, 8> Table;
13281328
getIntrinsicInfoTableEntries(ID, Table);
@@ -1344,7 +1344,6 @@ getSwiftFunctionTypeForIntrinsic(llvm::Intrinsic::ID ID,
13441344
// Translate LLVM function attributes to Swift function attributes.
13451345
llvm::AttributeList attrs =
13461346
llvm::Intrinsic::getAttributes(getGlobalLLVMContext(), ID);
1347-
Info = FunctionType::ExtInfo();
13481347
if (attrs.hasAttribute(llvm::AttributeList::FunctionIndex,
13491348
llvm::Attribute::NoReturn)) {
13501349
ResultTy = Context.getNeverType();
@@ -1438,10 +1437,8 @@ ValueDecl *swift::getBuiltinValueDecl(ASTContext &Context, Identifier Id) {
14381437
if (llvm::Intrinsic::ID ID = getLLVMIntrinsicID(OperationName)) {
14391438
SmallVector<Type, 8> ArgElts;
14401439
Type ResultTy;
1441-
FunctionType::ExtInfo Info;
1442-
if (getSwiftFunctionTypeForIntrinsic(ID, Types, Context, ArgElts, ResultTy,
1443-
Info))
1444-
return getBuiltinFunction(Id, ArgElts, ResultTy, Info);
1440+
if (getSwiftFunctionTypeForIntrinsic(ID, Types, Context, ArgElts, ResultTy))
1441+
return getBuiltinFunction(Id, ArgElts, ResultTy);
14451442
}
14461443

14471444
// If this starts with fence, we have special suffixes to handle.

0 commit comments

Comments
 (0)