diff --git a/lib/Sema/CSApply.cpp b/lib/Sema/CSApply.cpp index 5e16e5a016669..644a885c3ce49 100644 --- a/lib/Sema/CSApply.cpp +++ b/lib/Sema/CSApply.cpp @@ -23,7 +23,6 @@ #include "swift/Basic/StringExtras.h" #include "llvm/ADT/APFloat.h" #include "llvm/ADT/APInt.h" -#include "llvm/ADT/Fixnum.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/SaveAndRestore.h" @@ -1119,10 +1118,12 @@ namespace { /// \param locator Locator used to describe where in this expression we are. /// /// \returns the coerced expression, which will have type \c ToType. - Expr *coerceCallArguments(Expr *arg, Type paramType, - llvm::PointerUnion> - applyOrLevel, - ConstraintLocatorBuilder locator); + using LevelTy = llvm::PointerEmbeddedInt; + + Expr * + coerceCallArguments(Expr *arg, Type paramType, + llvm::PointerUnion applyOrLevel, + ConstraintLocatorBuilder locator); /// \brief Coerce the given object argument (e.g., for the base of a /// member expression) to the given type. @@ -1191,9 +1192,9 @@ namespace { } // Coerce the index argument. - index = coerceCallArguments(index, indexTy, /*level=*/llvm::Fixnum<2>(1), - locator.withPathElement( - ConstraintLocator::SubscriptIndex)); + index = coerceCallArguments( + index, indexTy, LevelTy(1), + locator.withPathElement(ConstraintLocator::SubscriptIndex)); if (!index) return nullptr; @@ -4545,7 +4546,7 @@ static bool isReferenceToMetatypeMember(Expr *expr) { Expr *ExprRewriter::coerceCallArguments( Expr *arg, Type paramType, - llvm::PointerUnion> applyOrLevel, + llvm::PointerUnion applyOrLevel, ConstraintLocatorBuilder locator) { bool allParamsMatch = arg->getType()->isEqual(paramType); @@ -4556,9 +4557,9 @@ Expr *ExprRewriter::coerceCallArguments( // Determine the level, unsigned level = 0; - if (applyOrLevel.is>()) { + if (applyOrLevel.is()) { // Level specified by caller. - level = applyOrLevel.get>(); + level = applyOrLevel.get(); } else if (callee) { // Determine the level based on the application itself. auto apply = applyOrLevel.get();