Merge pull request #19517 from apple/xcode-10-swift-4.2

Update ARKit and Metal for Xcode 10
diff --git a/stdlib/public/SDK/ARKit/ARKit.swift b/stdlib/public/SDK/ARKit/ARKit.swift
index 4d1b3c9..f09ab01 100644
--- a/stdlib/public/SDK/ARKit/ARKit.swift
+++ b/stdlib/public/SDK/ARKit/ARKit.swift
@@ -190,3 +190,60 @@
         return Array(buffer)
     }
 }
+
+@available(iOS, introduced: 12.0)
+extension ARPlaneAnchor {
+    /**
+     A value describing the classification of a plane anchor.
+     */
+    public enum Classification {
+        
+        public enum Status {
+            
+            /** Plane classification is currently unavailable. */
+            case notAvailable
+            
+            /** ARKit has not yet determined the classification of this plane. */
+            case undetermined
+            
+            /** ARKit is confident the plane is not any of the known classes. */
+            case unknown
+        }
+        
+        /** The classification is not any of the known classes. */
+        case none(Status)
+        
+        case wall
+        
+        case floor
+        
+        case ceiling
+        
+        case table
+        
+        case seat
+    }
+    
+    
+    /**
+     Classification of the plane.
+     */
+    public var classification: ARPlaneAnchor.Classification {
+        switch __classification {
+        case .wall: return .wall
+        case .floor: return .floor
+        case .ceiling: return .ceiling
+        case .table: return .table
+        case .seat: return .seat
+        case .none: fallthrough
+        default:
+            switch __classificationStatus {
+            case .notAvailable: return .none(.notAvailable)
+            case .unknown: return .none(.unknown)
+            case .undetermined: fallthrough
+            case .known: fallthrough
+            default: return .none(.undetermined)
+            }
+        }
+    }
+}
diff --git a/stdlib/public/SDK/Metal/Metal.swift b/stdlib/public/SDK/Metal/Metal.swift
index 586e244..c1f24c8 100644
--- a/stdlib/public/SDK/Metal/Metal.swift
+++ b/stdlib/public/SDK/Metal/Metal.swift
@@ -156,14 +156,14 @@
     public func useHeaps(_ heaps: [MTLHeap]) {
         __use(heaps, count: heaps.count)
     }
-    
-#if os(macOS)
-    @available(macOS 10.13, *)
+
+#if os(macOS) || os(iOS)
+    @available(macOS 10.13, iOS 12.0, *)
     public func setViewports(_ viewports: [MTLViewport]) {
         __setViewports(viewports, count: viewports.count)
     }
     
-    @available(macOS 10.13, *)
+    @available(macOS 10.13, iOS 12.0, *)
     public func setScissorRects(_ scissorRects: [MTLScissorRect]) {
         __setScissorRects(scissorRects, count: scissorRects.count)
     }