diff --git a/include/clang/Basic/ObjCRuntime.h b/include/clang/Basic/ObjCRuntime.h
index da3ecca..7e4249b 100644
--- a/include/clang/Basic/ObjCRuntime.h
+++ b/include/clang/Basic/ObjCRuntime.h
@@ -170,6 +170,26 @@ public:
     llvm_unreachable("bad kind");
   }
 
+  /// \brief Does this runtime allow pointer arithmetic on objects?
+  bool allowsPointerArithmetic() const {
+    switch (getKind()) {
+    case FragileMacOSX:
+    case GCC:
+      return true;
+    case MacOSX:
+    case iOS:
+    case GNUstep:
+    case ObjFW:
+      return false;
+    }
+    llvm_unreachable("bad kind");
+  }
+
+  /// \brief Is subscripting pointer arithmetic?
+  bool isSubscriptPointerArithmetic() const {
+    return allowsPointerArithmetic();
+  }
+
   /// \brief Does this runtime provide an objc_terminate function?
   ///
   /// This is used in handlers for exceptions during the unwind process;
diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp
index 9993f44..3ab11e6 100644
--- a/lib/CodeGen/CGObjCGNU.cpp
+++ b/lib/CodeGen/CGObjCGNU.cpp
@@ -654,6 +654,7 @@ class CGObjCGNUstep : public CGObjCGNU {
 };
 
 /// Class used when targeting the ObjFW runtime.
+// ObjFW runtime support is maintained by Jonathan Schleifer <js@webkeks.org>
 class CGObjCObjFW: public CGObjCGCC {
   virtual llvm::Value *GetClassNamed(CGBuilderTy &Builder,
                                      const std::string &Name, bool isWeak) {
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index fbd70a8..c2ae73e 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -6257,7 +6257,8 @@ static bool checkArithmethicPointerOnNonFragileABI(Sema &S,
                                                    Expr *Op) {
   assert(Op->getType()->isAnyPointerType());
   QualType PointeeTy = Op->getType()->getPointeeType();
-  if (!PointeeTy->isObjCObjectType() || S.LangOpts.ObjCRuntime.isFragile())
+  if (!PointeeTy->isObjCObjectType() ||
+      !S.LangOpts.ObjCRuntime.isSubscriptPointerArithmetic())
     return true;
 
   S.Diag(OpLoc, diag::err_arithmetic_nonfragile_interface)
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index a3fe7d3..c5c9a41 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -579,8 +579,7 @@ ExprResult Sema::BuildObjCSubscriptExpression(SourceLocation RB, Expr *BaseExpr,
                                         Expr *IndexExpr,
                                         ObjCMethodDecl *getterMethod,
                                         ObjCMethodDecl *setterMethod) {
-  // Subscripting is only supported in the non-fragile ABI.
-  if (LangOpts.ObjCRuntime.isFragile())
+  if (!LangOpts.ObjCRuntime.hasSubscripting())
     return ExprError();
 
   // If the expression is type-dependent, there's nothing for us to do.
