diff --git a/llvm/include/llvm/CodeGen/FastISel.h b/llvm/include/llvm/CodeGen/FastISel.h
index f91bd692accad80d81bc44b4825ffa1f8ba3b6b9..95e8004cc09c7a6d519e97bfdceaff161339548f 100644
--- a/llvm/include/llvm/CodeGen/FastISel.h
+++ b/llvm/include/llvm/CodeGen/FastISel.h
@@ -278,9 +278,7 @@ public:
   Register getRegForGEPIndex(MVT PtrVT, const Value *Idx);
 
   /// Retained for ABI compatibility in release branch.
-  Register getRegForGEPIndex(const Value *Idx) {
-    return getRegForGEPIndex(TLI.getPointerTy(DL), Idx);
-  }
+  Register getRegForGEPIndex(const Value *Idx);
 
   /// We're checking to see if we can fold \p LI into \p FoldInst. Note
   /// that we could have a sequence where multiple LLVM IR instructions are
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index 246acc7f4058372893821d030bce15efda3374e8..398381a8164b2b780357926e0c4bdb7d889ece0d 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -397,6 +397,10 @@ Register FastISel::getRegForGEPIndex(MVT PtrVT, const Value *Idx) {
   return IdxN;
 }
 
+Register FastISel::getRegForGEPIndex(const Value *Idx) {
+  return getRegForGEPIndex(TLI.getPointerTy(DL), Idx);
+}
+
 void FastISel::recomputeInsertPt() {
   if (getLastLocalValue()) {
     FuncInfo.InsertPt = getLastLocalValue();