@@ -1225,10 +1225,7 @@ static const char *const IntrinsicNameTable[] = {
1225
1225
#include " llvm/IR/IntrinsicImpl.inc"
1226
1226
#undef GET_INTRINSIC_TARGET_DATA
1227
1227
1228
- // / getLLVMIntrinsicID - Given an LLVM IR intrinsic name with argument types
1229
- // / removed (e.g. like "bswap") return the LLVM IR IntrinsicID for the intrinsic
1230
- // / or 0 if the intrinsic name doesn't match anything.
1231
- unsigned swift::getLLVMIntrinsicID (StringRef InName) {
1228
+ llvm::Intrinsic::ID swift::getLLVMIntrinsicID (StringRef InName) {
1232
1229
using namespace llvm ;
1233
1230
1234
1231
// Swift intrinsic names start with int_.
@@ -1321,12 +1318,11 @@ static Type DecodeIntrinsicType(ArrayRef<llvm::Intrinsic::IITDescriptor> &Table,
1321
1318
1322
1319
// / \returns true on success, false on failure.
1323
1320
static bool
1324
- getSwiftFunctionTypeForIntrinsic (unsigned iid, ArrayRef<Type> TypeArgs,
1321
+ getSwiftFunctionTypeForIntrinsic (llvm::Intrinsic::ID ID,
1322
+ ArrayRef<Type> TypeArgs,
1325
1323
ASTContext &Context,
1326
1324
SmallVectorImpl<Type> &ArgElts,
1327
1325
Type &ResultTy, FunctionType::ExtInfo &Info) {
1328
- llvm::Intrinsic::ID ID = (llvm::Intrinsic::ID)iid;
1329
-
1330
1326
typedef llvm::Intrinsic::IITDescriptor IITDescriptor;
1331
1327
SmallVector<IITDescriptor, 8 > Table;
1332
1328
getIntrinsicInfoTableEntries (ID, Table);
@@ -1439,7 +1435,7 @@ ValueDecl *swift::getBuiltinValueDecl(ASTContext &Context, Identifier Id) {
1439
1435
1440
1436
// If this is the name of an LLVM intrinsic, cons up a swift function with a
1441
1437
// type that matches the IR types.
1442
- if (unsigned ID = getLLVMIntrinsicID (OperationName)) {
1438
+ if (llvm::Intrinsic::ID ID = getLLVMIntrinsicID (OperationName)) {
1443
1439
SmallVector<Type, 8 > ArgElts;
1444
1440
Type ResultTy;
1445
1441
FunctionType::ExtInfo Info;
0 commit comments