Merge pull request #9193 from palimondo/SR-4572

[benchmark] SR-4572 Remove jinja2 dependency from test harness generation
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 568d02e..f8097f8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,12 @@
 Swift 4.0
 ---------
 
+* Core Foundation types implicitly conform to Hashable (and Equatable), using
+  CFHash and CFEqual as the implementation. This change applies even to "Swift
+  3 mode", so if you were previously adding this conformance yourself, use
+  `#if swift(>=3.2)` to restrict the extension to Swift 3.1 and below.
+  ([SR-2388](https://bugs.swift.org/browse/SR-2388))
+
 * [SE-0156][]
 
   Protocol composition types can now contain one or more class type terms,
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf0bb45..7070608 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -105,8 +105,11 @@
 set_property(CACHE SWIFT_ANALYZE_CODE_COVERAGE PROPERTY
     STRINGS FALSE "NOT-MERGED" "MERGED")
 
-set(SWIFT_VERSION "4.0" CACHE STRING
-    "The user-visible version of the Swift compiler")
+# SWIFT_VERSION is deliberately /not/ cached so that an existing build directory
+# can be reused when a new version of Swift comes out (assuming the user hasn't
+# manually set it as part of their own CMake configuration).
+set(SWIFT_VERSION "4.0")
+
 set(SWIFT_VENDOR "" CACHE STRING
     "The vendor name of the Swift compiler")
 set(SWIFT_COMPILER_VERSION "" CACHE STRING
@@ -416,6 +419,7 @@
 include(SwiftConfigureSDK)
 include(SwiftComponents)
 include(SwiftList)
+include(AddSwiftRuntime)
 
 # Configure swift include, install, build components.
 swift_configure_components()
@@ -494,6 +498,7 @@
 #     ...
 #  endif()
 set(SWIFT_DARWIN_VARIANTS "^(macosx|iphoneos|iphonesimulator|appletvos|appletvsimulator|watchos|watchsimulator)")
+set(SWIFT_DARWIN_EMBEDDED_VARIANTS "^(iphoneos|iphonesimulator|appletvos|appletvsimulator|watchos|watchsimulator)")
 
 # A convenient list to match Darwin SDKs. Example:
 #  if("${SWIFT_HOST_VARIANT_SDK}" IN_LIST SWIFT_APPLE_PLATFORMS)
@@ -785,6 +790,17 @@
   set(CMAKE_OSX_DEPLOYMENT_TARGET "")
 endif()
 
+swift_runtime_enable_backtrace_reporting(SWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING_default)
+set(SWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING
+    ${SWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING_default}
+    CACHE BOOL "Enable simple backtrace printing using dladdr")
+set(SWIFT_RUNTIME_DLADDR_ALLOWED
+    ${SWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING_default}
+    CACHE BOOL "Is dladdr allowed to be used in the code base. Must be TRUE if SWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING is set to TRUE")
+if ("${SWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING}" AND NOT "${SWIFT_RUNTIME_DLADDR_ALLOWED}")
+  message(FATAL "Can not enable backtrace reporting without allowing dladdr to be used by the runtime")
+endif()
+
 message(STATUS "Building host Swift tools for ${SWIFT_HOST_VARIANT_SDK} ${SWIFT_HOST_VARIANT_ARCH}")
 message(STATUS "  Build type: ${CMAKE_BUILD_TYPE}")
 message(STATUS "  Assertions: ${LLVM_ENABLE_ASSERTIONS}")
@@ -798,6 +814,8 @@
 
 message(STATUS "Building Swift runtime with:")
 message(STATUS "  Leak Detection Checker Entrypoints: ${SWIFT_RUNTIME_ENABLE_LEAK_CHECKER}")
+message(STATUS "  Backtraces:                         ${SWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING}")
+message(STATUS "  DLAddr Allowed:                     ${SWIFT_RUNTIME_DLADDR_ALLOWED}")
 message(STATUS "")
 
 #
diff --git a/CODE_OWNERS.TXT b/CODE_OWNERS.TXT
index 3e641a7..d2d13f2 100644
--- a/CODE_OWNERS.TXT
+++ b/CODE_OWNERS.TXT
@@ -11,6 +11,10 @@
 E: dabrahams@apple.com
 D: Swift standard library
 
+N: Erik Eckstein
+E: eeckstein@apple.com
+D: SILOptimizer
+
 N: David Farler
 E: dfarler@apple.com
 D: Markup, lib/Syntax, Swift Linux port
@@ -39,10 +43,6 @@
 E: jordan_rose@apple.com
 D: ClangImporter, Serialization, (Objective-)C printer, Driver
 
-N: Erik Eckstein
-E: eeckstein@apple.com
-D: SILOptimizer
-
 N: Anna Zaks
 E: ganna@apple.com
 D: SIL diagnostics passes
diff --git a/benchmark/scripts/Benchmark_Driver b/benchmark/scripts/Benchmark_Driver
index 905dfa4..f4f8343 100755
--- a/benchmark/scripts/Benchmark_Driver
+++ b/benchmark/scripts/Benchmark_Driver
@@ -121,8 +121,10 @@
 def get_tests(driver_path, args):
     """Return a list of available performance tests"""
     tests = subprocess.check_output([driver_path, '--list']).split()[2:]
-    if args.filter:
-        return filter(lambda name: name.startswith(args.filter), tests)
+    if args.filters:
+        regexes = [re.compile(pattern) for pattern in args.filters]
+        return sorted(list(set([name for pattern in regexes
+                                for name in tests if pattern.match(name)])))
     if not args.benchmarks:
         return tests
     return sorted(list(set(tests).intersection(set(args.benchmarks))))
@@ -362,7 +364,7 @@
 
 def main():
     parser = argparse.ArgumentParser(
-        epilog='Example: ./Benchmark_Driver run -i 5 -f Array'
+        epilog='Example: ./Benchmark_Driver run -i 5 -f Prefix -f .*Suffix.*'
     )
     subparsers = parser.add_subparsers(
         title='Swift benchmark driver commands',
@@ -375,8 +377,9 @@
         default=[],
         help='benchmark to run (default: all)', nargs='*', metavar="BENCHMARK")
     benchmarks_group.add_argument(
-        '-f', '--filter',
-        help='run all tests whose name starts with PREFIX', metavar="PREFIX")
+        '-f', '--filter', dest='filters', action='append',
+        help='run all tests whose name match regular expression PATTERN, ' +
+        'multiple filters are supported', metavar="PATTERN")
     parent_parser.add_argument(
         '-t', '--tests',
         help='directory containing Benchmark_O{,none,unchecked} ' +
diff --git a/benchmark/scripts/compare_perf_tests.py b/benchmark/scripts/compare_perf_tests.py
index 0aa3dd5..8f63636 100755
--- a/benchmark/scripts/compare_perf_tests.py
+++ b/benchmark/scripts/compare_perf_tests.py
@@ -43,10 +43,6 @@
         return (0 if self.samples < 2 else
                 sqrt(self.S_runtime / (self.samples - 1)))
 
-    @property
-    def cv(self):  # Coeficient of Variation (%)
-        return self.sd / self.mean
-
     # Compute running variance, B. P. Welford's method
     # See Knuth TAOCP vol 2, 3rd edition, page 232, or
     # https://www.johndcook.com/blog/standard_deviation/
@@ -79,7 +75,7 @@
     # (name, min value, max value, mean value, max_rss)
     def values(self):
         return (self.name, str(self.min), str(self.max), str(int(self.mean)),
-                str(self.max_rss) if self.max_rss else '—')
+                str(self.max_rss) if self.max_rss else '-')
 
 
 class ResultComparison:
@@ -254,7 +250,7 @@
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <style>
         body {{ font-family: -apple-system, sans-serif; font-size: 14px; }}
-        table {{ border-spacing: 2px; border-color: grey; border-spacing: 0;
+        table {{ border-spacing: 2px; border-color: gray; border-spacing: 0;
                 border-collapse: collapse; }}
         table tr {{ background-color: #fff; border-top: 1px solid #c6cbd1; }}
         table th, table td {{ padding: 6px 13px; border: 1px solid #dfe2e5; }}
@@ -299,7 +295,6 @@
                 name, old, new, delta, speedup_color, speedup)
 
         def header(contents):
-            # exit(contents)
             return self.HTML_HEADER_ROW.format(* contents)
 
         def table(title, results, speedup_color):
diff --git a/benchmark/single-source/Ackermann.swift b/benchmark/single-source/Ackermann.swift
index ad33af9..460e622 100644
--- a/benchmark/single-source/Ackermann.swift
+++ b/benchmark/single-source/Ackermann.swift
@@ -42,6 +42,5 @@
       break
     }
   }
-  CheckResults(result == ref_result[n],
-      "IncorrectResults in Ackermann: \(result) != \(ref_result[n]).")
+  CheckResults(result == ref_result[n])
 }
diff --git a/benchmark/single-source/ArrayLiteral.swift b/benchmark/single-source/ArrayLiteral.swift
index 8a4bdda..60ab3d1 100644
--- a/benchmark/single-source/ArrayLiteral.swift
+++ b/benchmark/single-source/ArrayLiteral.swift
@@ -40,7 +40,7 @@
     res += addLiteralArray()
     res -= addLiteralArray()
   }
-  CheckResults(res == 123, "Wrong result in ArrayValueProp 123 != \(res)")
+  CheckResults(res == 123)
 }
 
 
@@ -81,7 +81,7 @@
     res += addLiteralArray2()
     res -= addLiteralArray2()
   }
-  CheckResults(res == 123, "Wrong result in ArrayValueProp 123 != \(res)")
+  CheckResults(res == 123)
 }
 
 @inline(never)
@@ -91,7 +91,7 @@
     res += addLiteralArray3()
     res -= addLiteralArray3()
   }
-  CheckResults(res == 123, "Wrong result in ArrayValueProp 123 != \(res)")
+  CheckResults(res == 123)
 }
 
 @inline(never)
@@ -101,5 +101,5 @@
     res += addLiteralArray4()
     res -= addLiteralArray4()
   }
-  CheckResults(res == 123, "Wrong result in ArrayValueProp 123 != \(res)")
+  CheckResults(res == 123)
 }
diff --git a/benchmark/single-source/ArraySubscript.swift b/benchmark/single-source/ArraySubscript.swift
index a5a3d47..2e857b0 100644
--- a/benchmark/single-source/ArraySubscript.swift
+++ b/benchmark/single-source/ArraySubscript.swift
@@ -34,6 +34,5 @@
     arrays[i][bound(i)] =
       max(arrays[i-1][bound(i-1)], arrays[i][bound(i)])
   }
-  CheckResults(arrays[0][0] <= arrays[numArrays-1][bound(numArrays-1)],
-               "Incorrect results in QuickSort.")
+  CheckResults(arrays[0][0] <= arrays[numArrays-1][bound(numArrays-1)])
 }
diff --git a/benchmark/single-source/BitCount.swift b/benchmark/single-source/BitCount.swift
index e0b4c27..8d5194b 100644
--- a/benchmark/single-source/BitCount.swift
+++ b/benchmark/single-source/BitCount.swift
@@ -33,8 +33,8 @@
 public func run_BitCount(_ N: Int) {
   for _ in 1...100*N {
     // Check some results.
-    CheckResults(countBitSet(1) == 1, "Incorrect results in BitCount.")
-    CheckResults(countBitSet(2) == 1, "Incorrect results in BitCount.")
-    CheckResults(countBitSet(2457) == 6, "Incorrect results in BitCount.")
+    CheckResults(countBitSet(1) == 1)
+    CheckResults(countBitSet(2) == 1)
+    CheckResults(countBitSet(2457) == 6)
   }
 }
diff --git a/benchmark/single-source/ByteSwap.swift b/benchmark/single-source/ByteSwap.swift
index b1a83c5..c59c927 100644
--- a/benchmark/single-source/ByteSwap.swift
+++ b/benchmark/single-source/ByteSwap.swift
@@ -42,8 +42,8 @@
 public func run_ByteSwap(_ N: Int) {
   for _ in 1...100*N {
     // Check some results.
-    CheckResults(byteswap_logn(byteswap_n(2457)) == 2457, "Incorrect results in ByteSwap.")
-    CheckResults(byteswap_logn(byteswap_n(9129)) == 9129, "Incorrect results in ByteSwap.")
-    CheckResults(byteswap_logn(byteswap_n(3333)) == 3333, "Incorrect results in ByteSwap.")
+    CheckResults(byteswap_logn(byteswap_n(2457)) == 2457)
+    CheckResults(byteswap_logn(byteswap_n(9129)) == 9129)
+    CheckResults(byteswap_logn(byteswap_n(3333)) == 3333)
   }
 }
diff --git a/benchmark/single-source/CString.swift b/benchmark/single-source/CString.swift
index bdbe28f..0f242e8 100644
--- a/benchmark/single-source/CString.swift
+++ b/benchmark/single-source/CString.swift
@@ -36,7 +36,7 @@
     // static string to c -> from c to String -> implicit conversion
     res &= strlen(ascii.withCString(String.init(cString:)))
   }
-  CheckResults(res == 0, "IncorrectResults in run_CStringLongAscii: \(res) != \(refResult)")
+  CheckResults(res == 0)
 }
 
 @inline(never)
@@ -46,7 +46,7 @@
   for _ in 1...N*500 {
     res &= strlen(japanese.withCString(String.init(cString:)))
   }
-  CheckResults(res == 0, "IncorrectResults in run_CStringLongAscii: \(res) != \(refResult)")
+  CheckResults(res == 0)
 }
 
 
@@ -84,6 +84,6 @@
     }
     res = res & DoOneIter(strings)
   }
-  assert(res == reference, "IncorrectResults in StrToInt: \(res) != \(reference)")
+  assert(res == reference)
 }
 
diff --git a/benchmark/single-source/Calculator.swift b/benchmark/single-source/Calculator.swift
index 3430eb5..00b3de4 100644
--- a/benchmark/single-source/Calculator.swift
+++ b/benchmark/single-source/Calculator.swift
@@ -36,6 +36,6 @@
   for _ in 1...N*5000 {
       c += my_atoi_impl("10")
   }
-  CheckResults(c == 0, "IncorrectResults in run_Calculator")
+  CheckResults(c == 0)
 }
 
diff --git a/benchmark/single-source/CharacterLiteralsSmall.swift b/benchmark/single-source/CharacterLiteralsSmall.swift
index b04daff..0156c3b 100644
--- a/benchmark/single-source/CharacterLiteralsSmall.swift
+++ b/benchmark/single-source/CharacterLiteralsSmall.swift
@@ -55,15 +55,20 @@
   return "\u{00a9}\u{0300}\u{0301}\u{0302}"
 }
 
+@inline(never)
+func makeLiterals() {
+  blackHole(makeCharacter_UTF8Length1())
+  blackHole(makeCharacter_UTF8Length2())
+  blackHole(makeCharacter_UTF8Length3())
+  blackHole(makeCharacter_UTF8Length4())
+  blackHole(makeCharacter_UTF8Length5())
+  blackHole(makeCharacter_UTF8Length6())
+  blackHole(makeCharacter_UTF8Length7())
+  blackHole(makeCharacter_UTF8Length8())
+}
+
 public func run_CharacterLiteralsSmall(_ N: Int) {
   for _ in 0...10000 * N {
-    _ = makeCharacter_UTF8Length1()
-    _ = makeCharacter_UTF8Length2()
-    _ = makeCharacter_UTF8Length3()
-    _ = makeCharacter_UTF8Length4()
-    _ = makeCharacter_UTF8Length5()
-    _ = makeCharacter_UTF8Length6()
-    _ = makeCharacter_UTF8Length7()
-    _ = makeCharacter_UTF8Length8()
+    makeLiterals()
   }
 }
diff --git a/benchmark/single-source/DeadArray.swift b/benchmark/single-source/DeadArray.swift
index d40b031..a7466fa 100644
--- a/benchmark/single-source/DeadArray.swift
+++ b/benchmark/single-source/DeadArray.swift
@@ -35,5 +35,5 @@
     Count = 0
     runLoop(0, var2: 0)
   }
-  CheckResults(Count == 100_000, "Incorrect number of calls in loop")
+  CheckResults(Count == 100_000)
 }
diff --git a/benchmark/single-source/DictTest.swift b/benchmark/single-source/DictTest.swift
index d93bb6f..4a926b8 100644
--- a/benchmark/single-source/DictTest.swift
+++ b/benchmark/single-source/DictTest.swift
@@ -122,8 +122,7 @@
       Dict[word] = true
     }
   }
-  CheckResults(Dict.count == 270,
-               "IncorrectResults in DictTest: \(Dict.count) != 270.")
+  CheckResults(Dict.count == 270)
 
   // Check performance of searching in the dictionary:
   // Fill the dictionary with words from the first half of the text
@@ -142,8 +141,7 @@
       }
     }
   }
-  CheckResults(count == N*541,
-               "IncorrectResults in DictTest: \(count) != \(N*541).")
+  CheckResults(count == N*541)
 }
 
 class Box<T : Hashable> : Hashable {
@@ -272,8 +270,7 @@
       Dict[Box(word)] = Box(true)
     }
   }
-  CheckResults(Dict.count == 270,
-               "IncorrectResults in DictTest: \(Dict.count) != 270.")
+  CheckResults(Dict.count == 270)
 
   // Check performance of searching in the dictionary:
   // Fill the dictionary with words from the first half of the text
@@ -292,6 +289,5 @@
       }
     }
   }
-  CheckResults(count == N*541,
-               "IncorrectResults in DictTestAllObjects: \(count) != \(N*541).")
+  CheckResults(count == N*541)
 }
diff --git a/benchmark/single-source/DictTest2.swift b/benchmark/single-source/DictTest2.swift
index f5b2273..9f2f4ef 100644
--- a/benchmark/single-source/DictTest2.swift
+++ b/benchmark/single-source/DictTest2.swift
@@ -34,7 +34,7 @@
       break
     }
   }
-  CheckResults(res == ref_result, "Incorrect results in Dictionary2: \(res) != \(ref_result)")
+  CheckResults(res == ref_result)
 }
 
 class Box<T : Hashable> : Hashable {
@@ -75,5 +75,5 @@
       break
     }
   }
-  CheckResults(res == ref_result, "Incorrect results in Dictionary2AllObjects: \(res) != \(ref_result)")
+  CheckResults(res == ref_result)
 }
diff --git a/benchmark/single-source/DictTest3.swift b/benchmark/single-source/DictTest3.swift
index 0ecbb80..92c6e3e 100644
--- a/benchmark/single-source/DictTest3.swift
+++ b/benchmark/single-source/DictTest3.swift
@@ -41,7 +41,7 @@
       break
     }
   }
-  CheckResults(res == ref_result, "Incorrect results in Dictionary3: \(res) != \(ref_result)")
+  CheckResults(res == ref_result)
 }
 
 class Box<T : Hashable> : Hashable {
@@ -89,5 +89,5 @@
       break
     }
   }
-  CheckResults(res == ref_result, "Incorrect results in Dictionary3OfObject: \(res) != \(ref_result)")
+  CheckResults(res == ref_result)
 }
diff --git a/benchmark/single-source/DictionaryBridge.swift b/benchmark/single-source/DictionaryBridge.swift
index 7a80a3b..999f89b 100644
--- a/benchmark/single-source/DictionaryBridge.swift
+++ b/benchmark/single-source/DictionaryBridge.swift
@@ -21,7 +21,7 @@
 
   required override init() {
     let c = type(of: self).col()
-    CheckResults(c!.count == 10, "The rules of the universe apply")
+    CheckResults(c!.count == 10)
   }
 
   private class func col() -> [String : AnyObject]? {
diff --git a/benchmark/single-source/DictionaryRemove.swift b/benchmark/single-source/DictionaryRemove.swift
index a35df73..64a2f7c 100644
--- a/benchmark/single-source/DictionaryRemove.swift
+++ b/benchmark/single-source/DictionaryRemove.swift
@@ -23,8 +23,7 @@
     for i in 1...size {
         dict[i] = i
     }
-    CheckResults(dict.count == size,
-                 "Incorrect dict count: \(dict.count) != \(size).")
+    CheckResults(dict.count == size)
 
     var tmpDict = dict
     for _ in 1...1000*N {
@@ -38,8 +37,7 @@
         }
     }
 
-    CheckResults(tmpDict.isEmpty,
-                 "tmpDict should be empty: \(tmpDict.count) != 0.")
+    CheckResults(tmpDict.isEmpty)
 }
 
 class Box<T : Hashable> : Hashable {
@@ -67,8 +65,7 @@
     for i in 1...size {
         dict[Box(i)] = Box(i)
     }
-    CheckResults(dict.count == size,
-                 "Incorrect dict count: \(dict.count) != \(size).")
+    CheckResults(dict.count == size)
 
     var tmpDict = dict
     for _ in 1...1000*N {
@@ -82,6 +79,5 @@
         }
     }
 
-    CheckResults(tmpDict.isEmpty,
-                 "tmpDict should be empty: \(tmpDict.count) != 0.")
+    CheckResults(tmpDict.isEmpty)
 }
diff --git a/benchmark/single-source/DictionarySwap.swift b/benchmark/single-source/DictionarySwap.swift
index 5072368..969722a 100644
--- a/benchmark/single-source/DictionarySwap.swift
+++ b/benchmark/single-source/DictionarySwap.swift
@@ -23,8 +23,7 @@
     for i in 1...size {
         dict[i] = i
     }
-    CheckResults(dict.count == size,
-                 "Incorrect dict count: \(dict.count) != \(size).")
+    CheckResults(dict.count == size)
 
     var swapped = false
     for _ in 1...10000*N {
@@ -35,8 +34,7 @@
         }
     }
 
-    CheckResults(swappedCorrectly(swapped, dict[25]!, dict[75]!),
-                 "Dictionary value swap failed")
+    CheckResults(swappedCorrectly(swapped, dict[25]!, dict[75]!))
 }
 
 // Return true if correctly swapped, false otherwise
@@ -70,8 +68,7 @@
     for i in 1...size {
         dict[Box(i)] = Box(i)
     }
-    CheckResults(dict.count == size,
-                 "Incorrect dict count: \(dict.count) != \(size).")
+    CheckResults(dict.count == size)
 
     var swapped = false
     for _ in 1...10000*N {
@@ -82,6 +79,5 @@
         }
     }
 
-    CheckResults(swappedCorrectly(swapped, dict[Box(25)]!.value, dict[Box(75)]!.value),
-                 "Dictionary value swap failed")
+    CheckResults(swappedCorrectly(swapped, dict[Box(25)]!.value, dict[Box(75)]!.value))
 }
diff --git a/benchmark/single-source/DropFirst.swift b/benchmark/single-source/DropFirst.swift
index 611143f..7baca6f 100644
--- a/benchmark/single-source/DropFirst.swift
+++ b/benchmark/single-source/DropFirst.swift
@@ -31,8 +31,7 @@
     for element in s.dropFirst(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropFirstCountableRange: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -43,8 +42,7 @@
     for element in s.dropFirst(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropFirstSequence: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -55,8 +53,7 @@
     for element in s.dropFirst(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropFirstAnySequence: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -67,8 +64,7 @@
     for element in s.dropFirst(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropFirstAnySeqCntRange: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -79,8 +75,7 @@
     for element in s.dropFirst(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropFirstAnySeqCRangeIter: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -91,8 +86,7 @@
     for element in s.dropFirst(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropFirstAnyCollection: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -103,8 +97,7 @@
     for element in s.dropFirst(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropFirstArray: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -115,8 +108,7 @@
     for element in s.dropFirst(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropFirstCountableRangeLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -127,8 +119,7 @@
     for element in s.dropFirst(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropFirstSequenceLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -139,8 +130,7 @@
     for element in s.dropFirst(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropFirstAnySequenceLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -151,8 +141,7 @@
     for element in s.dropFirst(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropFirstAnySeqCntRangeLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -163,8 +152,7 @@
     for element in s.dropFirst(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropFirstAnySeqCRangeIterLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -175,8 +163,7 @@
     for element in s.dropFirst(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropFirstAnyCollectionLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -187,7 +174,6 @@
     for element in s.dropFirst(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropFirstArrayLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
diff --git a/benchmark/single-source/DropFirst.swift.gyb b/benchmark/single-source/DropFirst.swift.gyb
index d28d7b2..d3df5bd 100644
--- a/benchmark/single-source/DropFirst.swift.gyb
+++ b/benchmark/single-source/DropFirst.swift.gyb
@@ -51,8 +51,7 @@
     for element in s.dropFirst(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropFirst${Name}: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 % end
diff --git a/benchmark/single-source/DropLast.swift b/benchmark/single-source/DropLast.swift
index b1950af..f97e6d2 100644
--- a/benchmark/single-source/DropLast.swift
+++ b/benchmark/single-source/DropLast.swift
@@ -31,8 +31,7 @@
     for element in s.dropLast(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropLastCountableRange: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -43,8 +42,7 @@
     for element in s.dropLast(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropLastSequence: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -55,8 +53,7 @@
     for element in s.dropLast(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropLastAnySequence: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -67,8 +64,7 @@
     for element in s.dropLast(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropLastAnySeqCntRange: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -79,8 +75,7 @@
     for element in s.dropLast(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropLastAnySeqCRangeIter: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -91,8 +86,7 @@
     for element in s.dropLast(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropLastAnyCollection: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -103,8 +97,7 @@
     for element in s.dropLast(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropLastArray: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -115,8 +108,7 @@
     for element in s.dropLast(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropLastCountableRangeLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -127,8 +119,7 @@
     for element in s.dropLast(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropLastSequenceLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -139,8 +130,7 @@
     for element in s.dropLast(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropLastAnySequenceLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -151,8 +141,7 @@
     for element in s.dropLast(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropLastAnySeqCntRangeLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -163,8 +152,7 @@
     for element in s.dropLast(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropLastAnySeqCRangeIterLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -175,8 +163,7 @@
     for element in s.dropLast(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropLastAnyCollectionLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -187,7 +174,6 @@
     for element in s.dropLast(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropLastArrayLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
diff --git a/benchmark/single-source/DropLast.swift.gyb b/benchmark/single-source/DropLast.swift.gyb
index 3f75a7a..0a9a6ff 100644
--- a/benchmark/single-source/DropLast.swift.gyb
+++ b/benchmark/single-source/DropLast.swift.gyb
@@ -51,8 +51,7 @@
     for element in s.dropLast(dropCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropLast${Name}: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 % end
diff --git a/benchmark/single-source/DropWhile.swift b/benchmark/single-source/DropWhile.swift
index 7ba81a6..51d6d7d 100644
--- a/benchmark/single-source/DropWhile.swift
+++ b/benchmark/single-source/DropWhile.swift
@@ -31,8 +31,7 @@
     for element in s.drop(while: {$0 < dropCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropWhileCountableRange: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -43,8 +42,7 @@
     for element in s.drop(while: {$0 < dropCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropWhileSequence: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -55,8 +53,7 @@
     for element in s.drop(while: {$0 < dropCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropWhileAnySequence: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -67,8 +64,7 @@
     for element in s.drop(while: {$0 < dropCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropWhileAnySeqCntRange: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -79,8 +75,7 @@
     for element in s.drop(while: {$0 < dropCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropWhileAnySeqCRangeIter: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -91,8 +86,7 @@
     for element in s.drop(while: {$0 < dropCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropWhileAnyCollection: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -103,8 +97,7 @@
     for element in s.drop(while: {$0 < dropCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropWhileArray: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -115,8 +108,7 @@
     for element in s.drop(while: {$0 < dropCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropWhileCountableRangeLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -127,8 +119,7 @@
     for element in s.drop(while: {$0 < dropCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropWhileSequenceLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -139,8 +130,7 @@
     for element in s.drop(while: {$0 < dropCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropWhileAnySequenceLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -151,8 +141,7 @@
     for element in s.drop(while: {$0 < dropCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropWhileAnySeqCntRangeLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -163,8 +152,7 @@
     for element in s.drop(while: {$0 < dropCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropWhileAnySeqCRangeIterLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -175,8 +163,7 @@
     for element in s.drop(while: {$0 < dropCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropWhileAnyCollectionLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -187,7 +174,6 @@
     for element in s.drop(while: {$0 < dropCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropWhileArrayLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
diff --git a/benchmark/single-source/DropWhile.swift.gyb b/benchmark/single-source/DropWhile.swift.gyb
index e26c08d..20df6e0 100644
--- a/benchmark/single-source/DropWhile.swift.gyb
+++ b/benchmark/single-source/DropWhile.swift.gyb
@@ -51,8 +51,7 @@
     for element in s.drop(while: {$0 < dropCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in DropWhile${Name}: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 % end
diff --git a/benchmark/single-source/Fibonacci.swift b/benchmark/single-source/Fibonacci.swift
index 138631e..044fb98 100644
--- a/benchmark/single-source/Fibonacci.swift
+++ b/benchmark/single-source/Fibonacci.swift
@@ -38,6 +38,5 @@
       break
     }
   }
-  CheckResults(result == ref_result,
-               "Incorrect results in Fibonacci: \(result) != \(ref_result)")
+  CheckResults(result == ref_result)
 }
diff --git a/benchmark/single-source/Hash.swift b/benchmark/single-source/Hash.swift
index aa22f33..b813be8 100644
--- a/benchmark/single-source/Hash.swift
+++ b/benchmark/single-source/Hash.swift
@@ -587,8 +587,7 @@
     let MD = MD5()
     for (K, V) in TestMD5 {
       MD.update(K)
-      CheckResults(MD.digest() == V,
-                   "Incorrect result in Hash: check 1 failed.")
+      CheckResults(MD.digest() == V)
       MD.reset()
     }
 
@@ -609,8 +608,7 @@
     }
     let MD2 = MD5()
     MD2.update(L)
-    CheckResults(MD.digest() == MD2.digest(),
-                 "Incorrect result in Hash: check 2 failed.")
+    CheckResults(MD.digest() == MD2.digest())
 
     // Test the famous MD5 collision from 2009: http://www.mscs.dal.ca/~selinger/md5collision/
     let Src1 : [UInt8] =
@@ -632,10 +630,8 @@
     H2.update(Src2)
     let A1 = H1.digest()
     let A2 = H2.digest()
-    CheckResults(A1 == A2,
-                 "Incorrect result in Hash: check 3 failed.")
-    CheckResults(A1 == "79054025255fb1a26e4bc422aef54eb4",
-                 "Incorrect result in Hash: check 4 failed.")
+    CheckResults(A1 == A2)
+    CheckResults(A1 == "79054025255fb1a26e4bc422aef54eb4")
     H1.reset()
     H2.reset()
 
@@ -643,15 +639,13 @@
     let SH256 = SHA256()
     for (K, V) in TestSHA1 {
       SH.update(K)
-      CheckResults(SH.digest() == V,
-                   "Incorrect result in Hash: check 5 failed.")
+      CheckResults(SH.digest() == V)
       SH.reset()
     }
 
     for (K, V) in TestSHA256 {
       SH256.update(K)
-      CheckResults(SH256.digest() == V,
-                   "Incorrect result in Hash: check 5 failed.")
+      CheckResults(SH256.digest() == V)
       SH256.reset()
     }
 
@@ -672,7 +666,6 @@
     }
     let SH2 = SHA1()
     SH2.update(L)
-    CheckResults(SH.digest() == SH2.digest(),
-                 "Incorrect result in Hash: check 5 failed.")
+    CheckResults(SH.digest() == SH2.digest())
   }
 }
diff --git a/benchmark/single-source/HashQuadratic.swift b/benchmark/single-source/HashQuadratic.swift
index 0895aad..6be3f60 100644
--- a/benchmark/single-source/HashQuadratic.swift
+++ b/benchmark/single-source/HashQuadratic.swift
@@ -27,7 +27,6 @@
             dict2[k] = v
         }
     
-        CheckResults(dict1[size/2] == dict2[size/2],
-            "Incorrect results in HashQuadratic")
+        CheckResults(dict1[size/2] == dict2[size/2])
     }
 }
diff --git a/benchmark/single-source/Integrate.swift b/benchmark/single-source/Integrate.swift
index 40987ec..b10c5fb 100644
--- a/benchmark/single-source/Integrate.swift
+++ b/benchmark/single-source/Integrate.swift
@@ -63,6 +63,5 @@
     }
   }
 
-  CheckResults(abs(result - ref_result) < bound,
-               "Incorrect results in Integrate: abs(\(result) - \(ref_result)) > \(bound)")
+  CheckResults(abs(result - ref_result) < bound)
 }
diff --git a/benchmark/single-source/LazyFilter.swift b/benchmark/single-source/LazyFilter.swift
index 677c28c..27f56e1 100644
--- a/benchmark/single-source/LazyFilter.swift
+++ b/benchmark/single-source/LazyFilter.swift
@@ -22,7 +22,7 @@
     res += Array(c).count
     res -= Array(c).count
   }
-  CheckResults(res == 123, "Wrong result in LazilyFilteredRange 123 != \(res)")
+  CheckResults(res == 123)
 }
 
 @inline(never)
@@ -33,6 +33,6 @@
     res += Array(c).count
     res -= Array(c).count
   }
-  CheckResults(res == 123, "Wrong result in LazilyFilteredArray 123 != \(res)")
+  CheckResults(res == 123)
 }
 
diff --git a/benchmark/single-source/LinkedList.swift b/benchmark/single-source/LinkedList.swift
index a83d207..2bc7811 100644
--- a/benchmark/single-source/LinkedList.swift
+++ b/benchmark/single-source/LinkedList.swift
@@ -46,6 +46,5 @@
       break
     }
   }
-  CheckResults(sum == ref_result,
-               "Incorrect results in LinkedList: \(sum) != \(ref_result)")
+  CheckResults(sum == ref_result)
 }
diff --git a/benchmark/single-source/MapReduce.swift b/benchmark/single-source/MapReduce.swift
index 576e47a..dd396b0 100644
--- a/benchmark/single-source/MapReduce.swift
+++ b/benchmark/single-source/MapReduce.swift
@@ -22,7 +22,7 @@
     numbers = numbers.map { $0 &+ 5 }
     c += numbers.reduce(0, &+)
   }
-  CheckResults(c != 0, "IncorrectResults in MapReduce")
+  CheckResults(c != 0)
 }
 
 @inline(never)
@@ -34,7 +34,7 @@
     let mapped = numbers.map { $0 &+ 5 }
     c += mapped.reduce(0, &+)
   }
-  CheckResults(c != 0, "IncorrectResults in MapReduce")
+  CheckResults(c != 0)
 }
 
 @inline(never)
@@ -46,7 +46,7 @@
     let mapped = numbers.map { $0 &+ 5 }
     c += mapped.reduce(0, &+)
   }
-  CheckResults(c != 0, "IncorrectResults in MapReduce")
+  CheckResults(c != 0)
 }
 
 @inline(never)
@@ -58,7 +58,7 @@
     numbers = numbers.map { $0 &+ 5 }
     c += numbers.reduce(0, &+)
   }
-  CheckResults(c != 0, "IncorrectResults in MapReduce")
+  CheckResults(c != 0)
 }
 
 @inline(never)
@@ -70,7 +70,7 @@
     let mapped = numbers.map { $0 &+ 5 }
     c += mapped.reduce(0, &+)
   }
-  CheckResults(c != 0, "IncorrectResults in MapReduce")
+  CheckResults(c != 0)
 }
 
 @inline(never)
@@ -82,7 +82,7 @@
     let mapped = numbers.lazy.map { $0 &+ 5 }
     c += mapped.reduce(0, &+)
   }
-  CheckResults(c != 0, "IncorrectResults in MapReduce")
+  CheckResults(c != 0)
 }
 
 @inline(never)
@@ -94,7 +94,7 @@
     let mapped = numbers.lazy.map { $0 &+ 5 }
     c += mapped.reduce(0, &+)
   }
-  CheckResults(c != 0, "IncorrectResults in MapReduce")
+  CheckResults(c != 0)
 }
 
 @inline(never)
@@ -106,7 +106,7 @@
     let mapped = numbers.lazy.map { $0 &+ 5 }
     c += mapped.reduce(0, &+)
   }
-  CheckResults(c != 0, "IncorrectResults in MapReduce")
+  CheckResults(c != 0)
 }
 
 @inline(never)
@@ -117,7 +117,7 @@
   for _ in 1...N*100 {
     c += s.utf8.map { UInt64($0 &+ 5) }.reduce(0, &+)
   }
-  CheckResults(c != 0, "IncorrectResults in MapReduce")
+  CheckResults(c != 0)
 }
 
 @inline(never)
@@ -128,7 +128,7 @@
   for _ in 1...N*100 {
     c += s.utf8.map { UInt64($0 &+ 5) }.reduce(0, &+)
   }
-  CheckResults(c != 0, "IncorrectResults in MapReduce")
+  CheckResults(c != 0)
 }
 
 @inline(never)
@@ -141,7 +141,7 @@
     let mapped = numbers.map { $0.intValue &+ 5 }
     c += mapped.reduce(0, &+)
   }
-  CheckResults(c != 0, "IncorrectResults in MapReduce")
+  CheckResults(c != 0)
 #endif
 }
 
@@ -155,7 +155,7 @@
     let mapped = numbers.map { $0.intValue &+ 5 }
     c += mapped.reduce(0, &+)
   }
-  CheckResults(c != 0, "IncorrectResults in MapReduce")
+  CheckResults(c != 0)
 #endif
 }
 
diff --git a/benchmark/single-source/Memset.swift b/benchmark/single-source/Memset.swift
index 1c5237a..c7ae7b2 100644
--- a/benchmark/single-source/Memset.swift
+++ b/benchmark/single-source/Memset.swift
@@ -26,5 +26,5 @@
     memset(&a, 1)
     memset(&a, 0)
   }
-  CheckResults(a[87] == 0, "Incorrect result in Memset.")
+  CheckResults(a[87] == 0)
 }
diff --git a/benchmark/single-source/MonteCarloE.swift b/benchmark/single-source/MonteCarloE.swift
index 1b3b608..148b37d 100644
--- a/benchmark/single-source/MonteCarloE.swift
+++ b/benchmark/single-source/MonteCarloE.swift
@@ -29,10 +29,8 @@
   let numEmptyIntervals = intervals.filter{!$0}.count
   // If there are no empty intervals, then obviously the random generator is
   // not 'random' enough.
-  CheckResults(numEmptyIntervals != N,
-               "Incorrect results in MonteCarloE: no empty intervals.")
+  CheckResults(numEmptyIntervals != N)
   let e_estimate = Double(N)/Double(numEmptyIntervals)
   let e = 2.71828
-  CheckResults(abs(e_estimate - e) < 0.1,
-               "Incorrect results in MonteCarloE: e_estimate == \(e_estimate)")
+  CheckResults(abs(e_estimate - e) < 0.1)
 }
diff --git a/benchmark/single-source/MonteCarloPi.swift b/benchmark/single-source/MonteCarloPi.swift
index 14cabcb..00dd0c0 100644
--- a/benchmark/single-source/MonteCarloPi.swift
+++ b/benchmark/single-source/MonteCarloPi.swift
@@ -25,6 +25,5 @@
   }
   let pi_estimate: Double = Double(pointsInside)*4.0/Double(N)
   let pi = 3.1415
-  CheckResults(abs(pi_estimate - pi) < 0.1,
-               "Incorrect results in MonteCarloPi: pi_estimate == \(pi_estimate)")
+  CheckResults(abs(pi_estimate - pi) < 0.1)
 }
diff --git a/benchmark/single-source/NSDictionaryCastToSwift.swift b/benchmark/single-source/NSDictionaryCastToSwift.swift
index 41fd814..e88495a 100644
--- a/benchmark/single-source/NSDictionaryCastToSwift.swift
+++ b/benchmark/single-source/NSDictionaryCastToSwift.swift
@@ -29,8 +29,6 @@
             break
         }
     }
-    CheckResults(swiftDict.isEmpty,
-            "Incorrect result in swiftDict.isEmpty: " +
-            "\(swiftDict.isEmpty) != true\n")
+    CheckResults(swiftDict.isEmpty)
 #endif
 }
diff --git a/benchmark/single-source/NopDeinit.swift b/benchmark/single-source/NopDeinit.swift
index 15ff074..7311162 100644
--- a/benchmark/single-source/NopDeinit.swift
+++ b/benchmark/single-source/NopDeinit.swift
@@ -30,7 +30,6 @@
     let size = 500
     for i in 1...size { arr.append(X(i)) }
     arr.removeAll()
-    CheckResults(arr.count == 0,
-                 "Incorrect results in NopDeinit: \(arr.count) != 0.")
+    CheckResults(arr.count == 0)
   }
 }
diff --git a/benchmark/single-source/ObjectAllocation.swift b/benchmark/single-source/ObjectAllocation.swift
index 89340fb..f4ee428 100644
--- a/benchmark/single-source/ObjectAllocation.swift
+++ b/benchmark/single-source/ObjectAllocation.swift
@@ -123,13 +123,9 @@
     ArrayResult = testArray()
   }
 
-  CheckResults(SingleObjectResult == 499500,
-               "Incorrect results in testSingleObject")
-  CheckResults(TreeResult == 90000,
-               "Incorrect results in testTree")
-  CheckResults(ListResult == 48375,
-               "Incorrect results in testList")
-  CheckResults(ArrayResult == 3000,
-               "Incorrect results in testArray")
+  CheckResults(SingleObjectResult == 499500)
+  CheckResults(TreeResult == 90000)
+  CheckResults(ListResult == 48375)
+  CheckResults(ArrayResult == 3000)
 }
 
diff --git a/benchmark/single-source/ObjectiveCBridging.swift b/benchmark/single-source/ObjectiveCBridging.swift
index 11f9c0f..ac3594b 100644
--- a/benchmark/single-source/ObjectiveCBridging.swift
+++ b/benchmark/single-source/ObjectiveCBridging.swift
@@ -45,7 +45,7 @@
       s = n!
     }
   }
-  CheckResults(s != nil && s == "NSString that does not fit in tagged pointer", "Expected results did not match")
+  CheckResults(s != nil && s == "NSString that does not fit in tagged pointer")
 }
 #endif
 
@@ -70,7 +70,7 @@
     // Call _forceBridgeFromObjectiveC
     s = forcedCast(nsString)
   }
-  CheckResults(s != nil && s == "NSString that does not fit in tagged pointer", "Expected results did not match")
+  CheckResults(s != nil && s == "NSString that does not fit in tagged pointer")
 }
 #endif
 
@@ -95,7 +95,7 @@
     // Call _BridgedToObjectiveC
     s = nativeString as NSString
   }
-  CheckResults(s != nil && s == "Native", "Expected results did not match")
+  CheckResults(s != nil && s == "Native")
 }
 #endif
 
@@ -140,7 +140,7 @@
        nativeString = forcedCast(nativeArray[0])
     }
   }
-  CheckResults(nativeString != nil && nativeString! == "NSString that does not fit in tagged pointer", "Expected results did not match")
+  CheckResults(nativeString != nil && nativeString! == "NSString that does not fit in tagged pointer")
 }
 #endif
 
@@ -165,7 +165,7 @@
     let nativeArray : [NSString] = forcedCast(nsArray)
     nativeString = forcedCast(nativeArray[0])
   }
-  CheckResults(nativeString != nil && nativeString! == "NSString that does not fit in tagged pointer", "Expected results did not match")
+  CheckResults(nativeString != nil && nativeString! == "NSString that does not fit in tagged pointer")
 }
 #endif
 
@@ -191,7 +191,7 @@
     let nsArray = nativeArray as NSArray
     nsString = nsArray.object(at: 0)
   }
-  CheckResults(nsString != nil && (nsString! as! NSString).isEqual("abcde"), "Expected results did not match")
+  CheckResults(nsString != nil && (nsString! as! NSString).isEqual("abcde"))
 }
 #endif
 
@@ -217,7 +217,7 @@
       nativeString = nativeArray[0]
     }
   }
-  CheckResults(nativeString != nil && nativeString == "NSString that does not fit in tagged pointer", "Expected results did not match")
+  CheckResults(nativeString != nil && nativeString == "NSString that does not fit in tagged pointer")
 }
 #endif
 
@@ -242,7 +242,7 @@
     let nativeArray : [String] = forcedCast(nsArray)
     nativeString = nativeArray[0]
   }
-  CheckResults(nativeString != nil && nativeString == "NSString that does not fit in tagged pointer", "Expected results did not match")
+  CheckResults(nativeString != nil && nativeString == "NSString that does not fit in tagged pointer")
 }
 #endif
 
@@ -297,7 +297,7 @@
        nativeInt = forcedCast(nativeDictionary[nsString])
     }
   }
-  CheckResults(nativeInt != nil && nativeInt == 1, "Expected results did not match")
+  CheckResults(nativeInt != nil && nativeInt == 1)
 }
 #endif
 
@@ -324,7 +324,7 @@
        nativeInt = forcedCast(nativeDictionary[nsString])
     }
   }
-  CheckResults(nativeInt != nil && nativeInt == 1, "Expected results did not match")
+  CheckResults(nativeInt != nil && nativeInt == 1)
 }
 #endif
 
@@ -352,7 +352,7 @@
     let nsDict = nativeDictionary as NSDictionary
     nsNumber = nsDict.object(forKey: key)
   }
-  CheckResults(nsNumber != nil && (nsNumber as! Int) == 1, "Expected results did not match")
+  CheckResults(nsNumber != nil && (nsNumber as! Int) == 1)
 }
 #endif
 
@@ -380,7 +380,7 @@
        nativeInt = nativeDictionary[nativeString]
     }
   }
-  CheckResults(nativeInt != nil && nativeInt == 1, "Expected results did not match")
+  CheckResults(nativeInt != nil && nativeInt == 1)
 }
 #endif
 
@@ -408,7 +408,7 @@
        nativeInt = nativeDictionary[nativeString]
     }
   }
-  CheckResults(nativeInt != nil && nativeInt == 1, "Expected results did not match")
+  CheckResults(nativeInt != nil && nativeInt == 1)
 }
 #endif
 
@@ -464,7 +464,7 @@
        result = nativeSet.contains(nsString)
     }
   }
-  CheckResults(result != nil && result!, "Expected results did not match")
+  CheckResults(result != nil && result!)
 }
 #endif
 
@@ -491,7 +491,7 @@
        result = nativeSet.contains(nsString)
     }
   }
-  CheckResults(result != nil && result!, "Expected results did not match")
+  CheckResults(result != nil && result!)
 }
 #endif
 
@@ -518,7 +518,7 @@
     let nsDict = nativeSet as NSSet
     nsString = nsDict.member(key)
   }
-  CheckResults(nsString != nil && (nsString as! String) == "abcde1", "Expected results did not match")
+  CheckResults(nsString != nil && (nsString as! String) == "abcde1")
 }
 #endif
 
@@ -546,7 +546,7 @@
        result = nativeSet.contains(nativeString)
     }
   }
-  CheckResults(result != nil && result!, "Expected results did not match")
+  CheckResults(result != nil && result!)
 }
 #endif
 
@@ -574,7 +574,7 @@
        result = nativeSet.contains(nativeString)
     }
   }
-  CheckResults(result != nil && result!, "Expected results did not match")
+  CheckResults(result != nil && result!)
 }
 #endif
 
diff --git a/benchmark/single-source/ObjectiveCBridgingStubs.swift b/benchmark/single-source/ObjectiveCBridgingStubs.swift
index c8200ae..430ed66 100644
--- a/benchmark/single-source/ObjectiveCBridgingStubs.swift
+++ b/benchmark/single-source/ObjectiveCBridgingStubs.swift
@@ -24,7 +24,7 @@
    for _ in 0 ..< 10_000 {
      str = b.testToString()
    }
-   CheckResults(str != "" && str == "Default string value no tagged pointer", "Wrong value returned")
+   CheckResults(str != "" && str == "Default string value no tagged pointer")
 }
 #endif
 
@@ -71,7 +71,7 @@
      arr = b.testToArrayOfStrings()
      str = arr[0]
    }
-   CheckResults(str != "" && str == "Default string value no tagged pointer", "Wrong value returned")
+   CheckResults(str != "" && str == "Default string value no tagged pointer")
 }
 #endif
 
diff --git a/benchmark/single-source/ObjectiveCNoBridgingStubs.swift b/benchmark/single-source/ObjectiveCNoBridgingStubs.swift
index 19a6bc9..e77534a 100644
--- a/benchmark/single-source/ObjectiveCNoBridgingStubs.swift
+++ b/benchmark/single-source/ObjectiveCNoBridgingStubs.swift
@@ -29,7 +29,7 @@
   for _ in 0 ..< 10_000 {
     nsString = b.testToString()
   }
-  CheckResults(nsString.isEqual(to: "Default string value no tagged pointer" as NSString), "Wrong value returned")
+  CheckResults(nsString.isEqual(to: "Default string value no tagged pointer" as NSString))
 }
 #endif
 
diff --git a/benchmark/single-source/OpenClose.swift b/benchmark/single-source/OpenClose.swift
index 289bfab..7c411c6 100644
--- a/benchmark/single-source/OpenClose.swift
+++ b/benchmark/single-source/OpenClose.swift
@@ -32,6 +32,6 @@
   for _ in 1...N*10000 {
       c += check_state(MyState.Closed)
   }
-  CheckResults(c == 0, "IncorrectResults in run_OpenClose")
+  CheckResults(c == 0)
 }
 
diff --git a/benchmark/single-source/PopFront.swift b/benchmark/single-source/PopFront.swift
index 5f4a328..0ceca23 100644
--- a/benchmark/single-source/PopFront.swift
+++ b/benchmark/single-source/PopFront.swift
@@ -27,7 +27,7 @@
         result += a[0]
         a.remove(at: 0)
       }
-      CheckResults(result == arrayCount, "IncorrectResults in StringInterpolation: \(result) != \(arrayCount)")
+      CheckResults(result == arrayCount)
     }
   }
 }
@@ -48,7 +48,7 @@
         a.assign(from: a + 1, count: count - 1)
         count -= 1
       }
-      CheckResults(result == arrayCount, "IncorrectResults in StringInterpolation: \(result) != \(arrayCount)")
+      CheckResults(result == arrayCount)
     }
   }
   a.deallocate(capacity: arrayCount)
diff --git a/benchmark/single-source/PopFrontGeneric.swift b/benchmark/single-source/PopFrontGeneric.swift
index 7e7245e..a16a19b 100644
--- a/benchmark/single-source/PopFrontGeneric.swift
+++ b/benchmark/single-source/PopFrontGeneric.swift
@@ -56,7 +56,7 @@
         result += a[0]
         myArrayReplace(&a, 0..<1, EmptyCollection())
       }
-      CheckResults(result == arrayCount, "IncorrectResults in StringInterpolation: \(result) != \(arrayCount)")
+      CheckResults(result == arrayCount)
     }
   }
 }
diff --git a/benchmark/single-source/Prefix.swift b/benchmark/single-source/Prefix.swift
index 9fff53b..d1cd354 100644
--- a/benchmark/single-source/Prefix.swift
+++ b/benchmark/single-source/Prefix.swift
@@ -30,8 +30,7 @@
     for element in s.prefix(prefixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixCountableRange: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -42,8 +41,7 @@
     for element in s.prefix(prefixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixSequence: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -54,8 +52,7 @@
     for element in s.prefix(prefixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixAnySequence: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -66,8 +63,7 @@
     for element in s.prefix(prefixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixAnySeqCntRange: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -78,8 +74,7 @@
     for element in s.prefix(prefixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixAnySeqCRangeIter: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -90,8 +85,7 @@
     for element in s.prefix(prefixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixAnyCollection: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -102,8 +96,7 @@
     for element in s.prefix(prefixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixArray: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -114,8 +107,7 @@
     for element in s.prefix(prefixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixCountableRangeLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -126,8 +118,7 @@
     for element in s.prefix(prefixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixSequenceLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -138,8 +129,7 @@
     for element in s.prefix(prefixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixAnySequenceLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -150,8 +140,7 @@
     for element in s.prefix(prefixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixAnySeqCntRangeLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -162,8 +151,7 @@
     for element in s.prefix(prefixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixAnySeqCRangeIterLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -174,8 +162,7 @@
     for element in s.prefix(prefixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixAnyCollectionLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -186,7 +173,6 @@
     for element in s.prefix(prefixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixArrayLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
diff --git a/benchmark/single-source/Prefix.swift.gyb b/benchmark/single-source/Prefix.swift.gyb
index cc7200b..19ba2b1 100644
--- a/benchmark/single-source/Prefix.swift.gyb
+++ b/benchmark/single-source/Prefix.swift.gyb
@@ -50,8 +50,7 @@
     for element in s.prefix(prefixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in Prefix${Name}: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 % end
diff --git a/benchmark/single-source/PrefixWhile.swift b/benchmark/single-source/PrefixWhile.swift
index 2f20223..8877caf 100644
--- a/benchmark/single-source/PrefixWhile.swift
+++ b/benchmark/single-source/PrefixWhile.swift
@@ -30,8 +30,7 @@
     for element in s.prefix(while: {$0 < prefixCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixWhileCountableRange: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -42,8 +41,7 @@
     for element in s.prefix(while: {$0 < prefixCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixWhileSequence: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -54,8 +52,7 @@
     for element in s.prefix(while: {$0 < prefixCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixWhileAnySequence: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -66,8 +63,7 @@
     for element in s.prefix(while: {$0 < prefixCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixWhileAnySeqCntRange: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -78,8 +74,7 @@
     for element in s.prefix(while: {$0 < prefixCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixWhileAnySeqCRangeIter: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -90,8 +85,7 @@
     for element in s.prefix(while: {$0 < prefixCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixWhileAnyCollection: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -102,8 +96,7 @@
     for element in s.prefix(while: {$0 < prefixCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixWhileArray: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -114,8 +107,7 @@
     for element in s.prefix(while: {$0 < prefixCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixWhileCountableRangeLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -126,8 +118,7 @@
     for element in s.prefix(while: {$0 < prefixCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixWhileSequenceLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -138,8 +129,7 @@
     for element in s.prefix(while: {$0 < prefixCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixWhileAnySequenceLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -150,8 +140,7 @@
     for element in s.prefix(while: {$0 < prefixCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixWhileAnySeqCntRangeLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -162,8 +151,7 @@
     for element in s.prefix(while: {$0 < prefixCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixWhileAnySeqCRangeIterLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -174,8 +162,7 @@
     for element in s.prefix(while: {$0 < prefixCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixWhileAnyCollectionLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -186,7 +173,6 @@
     for element in s.prefix(while: {$0 < prefixCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixWhileArrayLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
diff --git a/benchmark/single-source/PrefixWhile.swift.gyb b/benchmark/single-source/PrefixWhile.swift.gyb
index e332fdb..e2018a2 100644
--- a/benchmark/single-source/PrefixWhile.swift.gyb
+++ b/benchmark/single-source/PrefixWhile.swift.gyb
@@ -50,8 +50,7 @@
     for element in s.prefix(while: {$0 < prefixCount} ) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in PrefixWhile${Name}: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 % end
diff --git a/benchmark/single-source/Prims.swift b/benchmark/single-source/Prims.swift
index d5b46da..efd8834 100644
--- a/benchmark/single-source/Prims.swift
+++ b/benchmark/single-source/Prims.swift
@@ -751,7 +751,6 @@
     for i in 1..<treeEdges.count {
       if let n = treeEdges[i] { cost += map[Edge(start: n, end: i)]! }
     }
-    CheckResults(Int(cost) == 49324,
-                 "Incorrect results in Prims: \(Int(cost)) != 49324.")
+    CheckResults(Int(cost) == 49324)
   }
 }
diff --git a/benchmark/single-source/ProtocolDispatch2.swift b/benchmark/single-source/ProtocolDispatch2.swift
index b19424a..f2e21f8 100644
--- a/benchmark/single-source/ProtocolDispatch2.swift
+++ b/benchmark/single-source/ProtocolDispatch2.swift
@@ -59,6 +59,6 @@
       c += wrapper(i, g1, g2)
     }
   }
-  CheckResults(c == 75000, "IncorrectResults in ProtoDispatch")
+  CheckResults(c == 75000)
 }
 
diff --git a/benchmark/single-source/RC4.swift b/benchmark/single-source/RC4.swift
index cc0ace6..e774d2c 100644
--- a/benchmark/single-source/RC4.swift
+++ b/benchmark/single-source/RC4.swift
@@ -99,6 +99,6 @@
       Enc.encrypt(&LongData)
     }
 
-    CheckResults(LongData == RefResults, "Incorrect result in RC4")
+    CheckResults(LongData == RefResults)
   }
 }
diff --git a/benchmark/single-source/RGBHistogram.swift b/benchmark/single-source/RGBHistogram.swift
index d0957f6..179243d 100644
--- a/benchmark/single-source/RGBHistogram.swift
+++ b/benchmark/single-source/RGBHistogram.swift
@@ -27,8 +27,7 @@
             break
         }
     }
-    CheckResults(isCorrectHistogram(histogram),
-                 "Incorrect results in histogram")
+    CheckResults(isCorrectHistogram(histogram))
 }
 
 typealias rrggbb_t = UInt32
@@ -166,8 +165,7 @@
             break
         }
     }
-    CheckResults(isCorrectHistogramOfObjects(histogram),
-                 "Incorrect results in histogram")
+    CheckResults(isCorrectHistogramOfObjects(histogram))
 }
 
 
diff --git a/benchmark/single-source/RangeAssignment.swift b/benchmark/single-source/RangeAssignment.swift
index 6b98642..d423261 100644
--- a/benchmark/single-source/RangeAssignment.swift
+++ b/benchmark/single-source/RangeAssignment.swift
@@ -22,6 +22,5 @@
       vector[range] = ArraySlice(vector[range].map { $0 + alfa })
   }
 
-  CheckResults(vector[100] == Double(N),
-    "IncorrectResults in RangeAssignment: \(vector[100]) != \(N).")
+  CheckResults(vector[100] == Double(N))
 }
diff --git a/benchmark/single-source/RecursiveOwnedParameter.swift b/benchmark/single-source/RecursiveOwnedParameter.swift
index 2ceecc5..01e134d 100644
--- a/benchmark/single-source/RecursiveOwnedParameter.swift
+++ b/benchmark/single-source/RecursiveOwnedParameter.swift
@@ -52,6 +52,5 @@
     }
   }
   let refResult = 100*N
-  CheckResults(result == refResult,
-    "IncorrectResults in RecursiveOwnedParameter: \(result) != \(refResult)")
+  CheckResults(result == refResult)
 }
diff --git a/benchmark/single-source/SetTests.swift b/benchmark/single-source/SetTests.swift
index 7db9eb8..9f8faa9 100644
--- a/benchmark/single-source/SetTests.swift
+++ b/benchmark/single-source/SetTests.swift
@@ -34,7 +34,7 @@
     }
   }
 
-  CheckResults(!isSubset, "Incorrect results in SetIsSubsetOf")
+  CheckResults(!isSubset)
 }
 
 @inline(never)
@@ -142,7 +142,7 @@
     }
   }
 
-  CheckResults(!isSubset, "Incorrect results in SetIsSubsetOf")
+  CheckResults(!isSubset)
 }
 
 @inline(never)
diff --git a/benchmark/single-source/SevenBoom.swift b/benchmark/single-source/SevenBoom.swift
index 8762374..99f1fd7 100644
--- a/benchmark/single-source/SevenBoom.swift
+++ b/benchmark/single-source/SevenBoom.swift
@@ -31,6 +31,6 @@
     catch _ {
     }
   }
-  CheckResults(c == 1, "IncorrectResults in SevenBoom")
+  CheckResults(c == 1)
 }
 
diff --git a/benchmark/single-source/SortLargeExistentials.swift b/benchmark/single-source/SortLargeExistentials.swift
index 454735d..69bf91b 100644
--- a/benchmark/single-source/SortLargeExistentials.swift
+++ b/benchmark/single-source/SortLargeExistentials.swift
@@ -1,4 +1,4 @@
-//===--- SortLettersInPlace.swift -----------------------------------------===//
+//===--- SortLargeExistentials.swift --------------------------------------===//
 //
 // This source file is part of the Swift.org open source project
 //
@@ -19,7 +19,7 @@
   func lessthan(_ rhs: LetterKind) -> Bool
 }
 
-// A struct which exeeds the size of the existential inline buffer.
+// A struct which exceeds the size of the existential inline buffer.
 struct Letter : LetterKind {
   let value: String
 
@@ -77,7 +77,6 @@
     }
 
     // Check whether letters are sorted.
-    CheckResults(letters[0].value <= letters[letters.count/2].value,
-                 "Incorrect results in SortLargeExistentials.")
+    CheckResults(letters[0].value <= letters[letters.count/2].value)
   }
 }
diff --git a/benchmark/single-source/SortLettersInPlace.swift b/benchmark/single-source/SortLettersInPlace.swift
index 366cad5..b48e521 100644
--- a/benchmark/single-source/SortLettersInPlace.swift
+++ b/benchmark/single-source/SortLettersInPlace.swift
@@ -39,8 +39,7 @@
     }
 
     // Check whether letters are sorted.
-    CheckResults(letters[0].value <= letters[letters.count/2].value,
-                 "Incorrect results in SortLetterInPlace.")
+    CheckResults(letters[0].value <= letters[letters.count/2].value)
   }
 }
 
diff --git a/benchmark/single-source/StrComplexWalk.swift b/benchmark/single-source/StrComplexWalk.swift
index 10e997f..4611346 100644
--- a/benchmark/single-source/StrComplexWalk.swift
+++ b/benchmark/single-source/StrComplexWalk.swift
@@ -21,7 +21,7 @@
     for _ in s.unicodeScalars {
       count += 1
     }
-    CheckResults(count == ref_result, "Incorrect results in StrComplexWalk: \(count) != \(ref_result)")
+    CheckResults(count == ref_result)
   }
 }
 
diff --git a/benchmark/single-source/StrToInt.swift b/benchmark/single-source/StrToInt.swift
index 4725337..4258549 100644
--- a/benchmark/single-source/StrToInt.swift
+++ b/benchmark/single-source/StrToInt.swift
@@ -43,5 +43,5 @@
   for _ in 1...1000*N {
     res = res & DoOneIter(input)
   }
-  CheckResults(res == ref_result, "IncorrectResults in StrToInt: \(res) != \(ref_result)")
+  CheckResults(res == ref_result)
 }
diff --git a/benchmark/single-source/StringInterpolation.swift b/benchmark/single-source/StringInterpolation.swift
index 51a1da4017..337f43d 100644
--- a/benchmark/single-source/StringInterpolation.swift
+++ b/benchmark/single-source/StringInterpolation.swift
@@ -36,7 +36,7 @@
       // with an operation on the native storage type.
       result = result &+ Int(utf16[utf16.index(before: utf16.endIndex)])
     }
-    CheckResults(result == refResult, "IncorrectResults in StringInterpolation: \(result) != \(refResult)")
+    CheckResults(result == refResult)
   }
 }
 
diff --git a/benchmark/single-source/StringTests.swift b/benchmark/single-source/StringTests.swift
index a17521a..98e59aa 100644
--- a/benchmark/single-source/StringTests.swift
+++ b/benchmark/single-source/StringTests.swift
@@ -19,7 +19,7 @@
   for _ in 0 ..< N {
     for _ in 0 ..< 100_000 {
       if !testString.hasPrefix(prefix) {
-        CheckResults(false, "prefix check failed")
+        CheckResults(false)
       }
     }
   }
@@ -34,7 +34,7 @@
   for _ in 0 ..< N {
     for _ in 0 ..< 100_000 {
       if !testString.hasSuffix(suffix) {
-        CheckResults(false, "suffix check failed")
+        CheckResults(false)
       }
     }
   }
@@ -49,7 +49,7 @@
   for _ in 0 ..< N {
     for _ in 0 ..< 100_000 {
       if !testString.hasPrefix(prefix) {
-        CheckResults(false, "prefix check failed")
+        CheckResults(false)
       }
     }
   }
@@ -64,7 +64,7 @@
   for _ in 0 ..< N {
     for _ in 0 ..< 100_000 {
       if !testString.hasSuffix(suffix) {
-        CheckResults(false, "suffix check failed")
+        CheckResults(false)
       }
     }
   }
@@ -82,7 +82,7 @@
   for _ in 0 ..< N {
     for _ in 0 ..< 100_000 {
       if !compareEqual(str1, str2) {
-        CheckResults(false, "Strings should be equal")
+        CheckResults(false)
       }
     }
   }
diff --git a/benchmark/single-source/Suffix.swift b/benchmark/single-source/Suffix.swift
index 7b62399..4a0aaa1 100644
--- a/benchmark/single-source/Suffix.swift
+++ b/benchmark/single-source/Suffix.swift
@@ -30,8 +30,7 @@
     for element in s.suffix(suffixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in SuffixCountableRange: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -42,8 +41,7 @@
     for element in s.suffix(suffixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in SuffixSequence: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -54,8 +52,7 @@
     for element in s.suffix(suffixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in SuffixAnySequence: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -66,8 +63,7 @@
     for element in s.suffix(suffixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in SuffixAnySeqCntRange: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -78,8 +74,7 @@
     for element in s.suffix(suffixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in SuffixAnySeqCRangeIter: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -90,8 +85,7 @@
     for element in s.suffix(suffixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in SuffixAnyCollection: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -102,8 +96,7 @@
     for element in s.suffix(suffixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in SuffixArray: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -114,8 +107,7 @@
     for element in s.suffix(suffixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in SuffixCountableRangeLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -126,8 +118,7 @@
     for element in s.suffix(suffixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in SuffixSequenceLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -138,8 +129,7 @@
     for element in s.suffix(suffixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in SuffixAnySequenceLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -150,8 +140,7 @@
     for element in s.suffix(suffixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in SuffixAnySeqCntRangeLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -162,8 +151,7 @@
     for element in s.suffix(suffixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in SuffixAnySeqCRangeIterLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -174,8 +162,7 @@
     for element in s.suffix(suffixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in SuffixAnyCollectionLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 @inline(never)
@@ -186,7 +173,6 @@
     for element in s.suffix(suffixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in SuffixArrayLazy: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
diff --git a/benchmark/single-source/Suffix.swift.gyb b/benchmark/single-source/Suffix.swift.gyb
index cd428be..fa68349 100644
--- a/benchmark/single-source/Suffix.swift.gyb
+++ b/benchmark/single-source/Suffix.swift.gyb
@@ -50,8 +50,7 @@
     for element in s.suffix(suffixCount) {
       result += element
     }
-    CheckResults(result == sumCount,
-      "IncorrectResults in Suffix${Name}: \(result) != \(sumCount)")
+    CheckResults(result == sumCount)
   }
 }
 % end
diff --git a/benchmark/single-source/TwoSum.swift b/benchmark/single-source/TwoSum.swift
index 9c969e2..545a09a 100644
--- a/benchmark/single-source/TwoSum.swift
+++ b/benchmark/single-source/TwoSum.swift
@@ -69,11 +69,8 @@
         }
         Dict[array[n]] = n
       }
-      CheckResults(i1 != nil && i2 != nil,
-                   "Incorrect results in TwoSum: i1 or i2 wasn't found.")
-      CheckResults(Sum == array[i1!] + array[i2!],
-                   "Incorrect results in TwoSum: Sum: \(Sum), " +
-                   "array[i1]: \(array[i1!]), array[i2]: \(array[i2!]).")
+      CheckResults(i1 != nil && i2 != nil)
+      CheckResults(Sum == array[i1!] + array[i2!])
     }
   }
 }
diff --git a/benchmark/single-source/Walsh.swift b/benchmark/single-source/Walsh.swift
index e5319b8..125c905 100644
--- a/benchmark/single-source/Walsh.swift
+++ b/benchmark/single-source/Walsh.swift
@@ -62,9 +62,9 @@
   InverseWalshTransform(&data)
   for i in 0..<In.count {
     // Check encode.
-    CheckResults(abs(data[i] - In[i]) < 0.0001, "Incorrect results in Walsh.")
+    CheckResults(abs(data[i] - In[i]) < 0.0001)
     // Check decode.
-    CheckResults(abs(mid[i] - Out[i]) < 0.0001, "Incorrect results in Walsh.")
+    CheckResults(abs(mid[i] - Out[i]) < 0.0001)
   }
 }
 
diff --git a/benchmark/single-source/XorLoop.swift b/benchmark/single-source/XorLoop.swift
index bfe3eb3..044614f 100644
--- a/benchmark/single-source/XorLoop.swift
+++ b/benchmark/single-source/XorLoop.swift
@@ -22,7 +22,6 @@
       x[i] = x[i] ^ 12345678
     }
     let res = x[10]+x[100]+x[1000]+x[10000]
-    CheckResults(res == ref_result,
-                 "Incorrect results in XorLoop: \(res) != \(ref_result)")
+    CheckResults(res == ref_result)
   }
 }
diff --git a/benchmark/utils/TestsUtils.swift b/benchmark/utils/TestsUtils.swift
index 5725330..8124d99 100644
--- a/benchmark/utils/TestsUtils.swift
+++ b/benchmark/utils/TestsUtils.swift
@@ -66,3 +66,14 @@
 }
 public func someProtocolFactory() -> SomeProtocol { return MyStruct() }
 
+// Just consume the argument.
+// It's important that this function is in another module than the tests
+// which are using it.
+public func blackHole<T>(_ x: T) {
+}
+
+@inline(__always)
+public func CheckResults(_ resultsMatch: Bool) {
+  guard _fastPath(resultsMatch) else { abort() }
+}
+
diff --git a/cmake/modules/AddSwiftRuntime.cmake b/cmake/modules/AddSwiftRuntime.cmake
new file mode 100644
index 0000000..ed789f9
--- /dev/null
+++ b/cmake/modules/AddSwiftRuntime.cmake
@@ -0,0 +1,52 @@
+#===--- AddSwiftRuntime.cmake --------------------------------------------===#
+#
+# This source file is part of the Swift.org open source project
+#
+# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+# Licensed under Apache License v2.0 with Runtime Library Exception
+#
+# See https:#swift.org/LICENSE.txt for license information
+# See https:#swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+#
+#===----------------------------------------------------------------------===#
+
+include(SwiftUtils)
+
+function(swift_runtime_enable_backtrace_reporting outvar)
+  precondition(outvar "Must have an outvar set")
+
+  # We do not support backtraces on android...
+  is_sdk_requested(ANDROID swift_build_android)
+  if(${swift_build_android})
+    set(${outvar} FALSE PARENT_SCOPE)
+    return()
+  endif()
+
+  # ... or cygwin
+  if ("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
+    set(${outvar} FALSE PARENT_SCOPE)
+    return()
+  endif()
+
+  # ... or win32.
+  if (WIN32)
+    set(${outvar} FALSE PARENT_SCOPE)
+    return()
+  endif()
+
+  # If we are not Darwin, but are cygwin, win32, or android we *do* support
+  # runtime backtraces. This is just preserving the current existing
+  # behavior. Arguably this should be an opt in feature always.
+  if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL Darwin)
+    set(${outvar} TRUE PARENT_SCOPE)
+    return()
+  endif()
+
+  # Otherwise, we have a Darwin build. Enable runtime backtrace reporting only
+  # when compiler assertions are enabled.
+  if ("${SWIFT_STDLIB_ASSERTIONS}")
+    set(${outvar} TRUE PARENT_SCOPE)
+  else()
+    set(${outvar} FALSE PARENT_SCOPE)
+  endif()
+endfunction()
diff --git a/include/swift/ABI/HeapObject.h b/include/swift/ABI/HeapObject.h
new file mode 100644
index 0000000..67fd8e5
--- /dev/null
+++ b/include/swift/ABI/HeapObject.h
@@ -0,0 +1,22 @@
+//===--- HeapObject.h - ABI constants for heap objects ----------*- C++ -*-===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+//
+//  Constants used in the layout of heap objects.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef __SWIFT_ABI_HEAPOBJECT_H__
+#define __SWIFT_ABI_HEAPOBJECT_H__
+
+#include "../../../stdlib/public/SwiftShims/HeapObject.h"
+
+#endif // __SWIFT_ABI_HEAPOBJECT_H__
diff --git a/include/swift/ABI/KeyPath.h b/include/swift/ABI/KeyPath.h
index 8c881d1..17f2f30 100644
--- a/include/swift/ABI/KeyPath.h
+++ b/include/swift/ABI/KeyPath.h
@@ -1,4 +1,4 @@
-//===--- KeyPath.h - ABI constants for key path objects ----------*- C++ *-===//
+//===--- KeyPath.h - ABI constants for key path objects ---------*- C++ -*-===//
 //
 // This source file is part of the Swift.org open source project
 //
diff --git a/include/swift/ABI/MetadataValues.h b/include/swift/ABI/MetadataValues.h
index e307946..032026e 100644
--- a/include/swift/ABI/MetadataValues.h
+++ b/include/swift/ABI/MetadataValues.h
@@ -226,10 +226,8 @@
   ///
   /// This must be 0 for ABI compatibility with Objective-C protocol_t records.
   None = 0,
-  /// The AnyObject protocol.
-  AnyObject = 1,
   /// The Error protocol.
-  Error = 2,
+  Error = 1,
 };
 
 /// Identifiers for protocol method dispatch strategies.
@@ -244,10 +242,6 @@
   /// To invoke methods of this protocol, a pointer to a protocol witness table
   /// corresponding to the protocol conformance must be available.
   Swift = 1,
-  
-  /// The protocol guarantees that it has no methods to dispatch. It requires
-  /// neither Objective-C metadata nor a witness table.
-  Empty = 2,
 };
 
 /// Flags in a generic nominal type descriptor.
@@ -375,7 +369,6 @@
   static bool needsWitnessTable(ProtocolDispatchStrategy strategy) {
     switch (strategy) {
     case ProtocolDispatchStrategy::ObjC:
-    case ProtocolDispatchStrategy::Empty:
       return false;
     case ProtocolDispatchStrategy::Swift:
       return true;
@@ -410,8 +403,8 @@
   };
   int_type Data;
 
-  constexpr ExistentialTypeFlags(int_type Data) : Data(Data) {}
 public:
+  constexpr ExistentialTypeFlags(int_type Data) : Data(Data) {}
   constexpr ExistentialTypeFlags() : Data(0) {}
   constexpr ExistentialTypeFlags withNumWitnessTables(unsigned numTables) const {
     return ExistentialTypeFlags((Data & ~NumWitnessTablesMask) | numTables);
@@ -577,12 +570,28 @@
 enum class ExclusivityFlags : uintptr_t {
   Read             = 0x0,
   Modify           = 0x1,
-  ActionMask       = 0x1
+  // Leave space for other actions.
+  // Don't rely on ActionMask in stable ABI.
+  ActionMask       = 0x1,
+
+  // Downgrade exclusivity failures to a warning.
+  WarningOnly      = 0x10
 };
+static inline ExclusivityFlags operator|(ExclusivityFlags lhs,
+                                         ExclusivityFlags rhs) {
+  return ExclusivityFlags(uintptr_t(lhs) | uintptr_t(rhs));
+}
+static inline ExclusivityFlags &operator|=(ExclusivityFlags &lhs,
+                                           ExclusivityFlags rhs) {
+  return (lhs = (lhs | rhs));
+}
 static inline ExclusivityFlags getAccessAction(ExclusivityFlags flags) {
   return ExclusivityFlags(uintptr_t(flags)
                         & uintptr_t(ExclusivityFlags::ActionMask));
 }
+static inline bool isWarningOnly(ExclusivityFlags flags) {
+  return uintptr_t(flags) & uintptr_t(ExclusivityFlags::WarningOnly);
+}
 
 } // end namespace swift
 
diff --git a/include/swift/AST/ASTNode.h b/include/swift/AST/ASTNode.h
index acad56d..078b5bc 100644
--- a/include/swift/AST/ASTNode.h
+++ b/include/swift/AST/ASTNode.h
@@ -61,6 +61,9 @@
     FUNC(Expr)
     FUNC(Decl)
 #undef FUNC
+
+    /// Whether the AST node is implicit.
+    bool isImplicit() const;
   };
 } // namespace swift
 
diff --git a/include/swift/AST/AccessScope.h b/include/swift/AST/AccessScope.h
index 05d8e5c..cb54fe9 100644
--- a/include/swift/AST/AccessScope.h
+++ b/include/swift/AST/AccessScope.h
@@ -30,6 +30,11 @@
 
   static AccessScope getPublic() { return AccessScope(nullptr); }
 
+  /// Check if private access is allowed. This is a lexical scope check in Swift
+  /// 3 mode. In Swift 4 mode, declarations and extensions of the same type will
+  /// also allow access.
+  static bool allowsPrivateAccess(const DeclContext *useDC, const DeclContext *sourceDC);
+
   /// Returns nullptr if access scope is public.
   const DeclContext *getDeclContext() const { return Value.getPointer(); }
 
@@ -48,7 +53,7 @@
   /// \see DeclContext::isChildContextOf
   bool isChildOf(AccessScope AS) const {
     if (!isPublic() && !AS.isPublic())
-      return getDeclContext()->isChildContextOf(AS.getDeclContext());
+      return allowsPrivateAccess(getDeclContext(), AS.getDeclContext());
     if (isPublic() && AS.isPublic())
       return false;
     return AS.isPublic();
diff --git a/include/swift/AST/Attr.def b/include/swift/AST/Attr.def
index a5a86fc..a480182 100644
--- a/include/swift/AST/Attr.def
+++ b/include/swift/AST/Attr.def
@@ -273,6 +273,19 @@
           | NotSerialized | UserInaccessible,
           /* Not serialized */ 67)
 
+DECL_ATTR(NSKeyedArchiveLegacy, NSKeyedArchiveLegacy,
+          OnClass | NotSerialized | LongAttribute,
+          /*Not serialized */ 68)
+
+SIMPLE_DECL_ATTR(_staticInitializeObjCMetadata, StaticInitializeObjCMetadata,
+                 OnClass | NotSerialized | LongAttribute | RejectByParser,
+                 /*Not serialized */ 69)
+
+SIMPLE_DECL_ATTR(NSKeyedArchiveSubclassesOnly,
+                 NSKeyedArchiveSubclassesOnly,
+                 OnClass | NotSerialized | LongAttribute,
+                 /*Not serialized */ 70)
+
 #undef TYPE_ATTR
 #undef DECL_ATTR_ALIAS
 #undef SIMPLE_DECL_ATTR
diff --git a/include/swift/AST/Attr.h b/include/swift/AST/Attr.h
index d998390..6ceb951 100644
--- a/include/swift/AST/Attr.h
+++ b/include/swift/AST/Attr.h
@@ -299,6 +299,9 @@
     OnParam            = 1 << 30,
     OnModule           = 1 << 31,
 
+    // Cannot have any attributes.
+    OnMissingMember = 0,
+
     // More coarse-grained aggregations for use in Attr.def.
     OnOperator = OnInfixOperator|OnPrefixOperator|OnPostfixOperator,
 
@@ -1158,6 +1161,24 @@
   }
 };
 
+/// Defines the @NSKeyedArchiveLegacyAttr attribute.
+class NSKeyedArchiveLegacyAttr : public DeclAttribute {
+public:
+  NSKeyedArchiveLegacyAttr(StringRef Name, SourceLoc AtLoc, SourceRange Range, bool Implicit)
+    : DeclAttribute(DAK_NSKeyedArchiveLegacy, AtLoc, Range, Implicit),
+      Name(Name) {}
+
+  NSKeyedArchiveLegacyAttr(StringRef Name, bool Implicit)
+    : NSKeyedArchiveLegacyAttr(Name, SourceLoc(), SourceRange(), /*Implicit=*/true) {}
+
+  /// The legacy mangled name.
+  const StringRef Name;
+
+  static bool classof(const DeclAttribute *DA) {
+    return DA->getKind() == DAK_NSKeyedArchiveLegacy;
+  }
+};
+
 /// \brief Attributes that may be applied to declarations.
 class DeclAttributes {
   /// Linked list of declaration attributes.
@@ -1253,7 +1274,7 @@
   template <typename ATTR>
   ATTR *getAttribute(bool AllowInvalid = false) {
     for (auto Attr : *this)
-      if (ATTR *SpecificAttr = dyn_cast<ATTR>(Attr))
+      if (auto *SpecificAttr = dyn_cast<ATTR>(Attr))
         if (SpecificAttr->isValid() || AllowInvalid)
           return SpecificAttr;
     return nullptr;
diff --git a/include/swift/AST/Decl.h b/include/swift/AST/Decl.h
index 854f00e..1337925d 100644
--- a/include/swift/AST/Decl.h
+++ b/include/swift/AST/Decl.h
@@ -140,6 +140,7 @@
   DidSet,
   EnumElement,
   Module,
+  MissingMember,
 };
 
 /// Keeps track of stage of circularity checking for the given protocol.
@@ -365,8 +366,14 @@
 
     /// Whether the function body throws.
     unsigned Throws : 1;
+
+    /// Whether this function requires a new vtable entry.
+    unsigned NeedsNewVTableEntry : 1;
+
+    /// Whether NeedsNewVTableEntry is valid.
+    unsigned HasComputedNeedsNewVTableEntry : 1;
   };
-  enum { NumAbstractFunctionDeclBits = NumValueDeclBits + 11 };
+  enum { NumAbstractFunctionDeclBits = NumValueDeclBits + 13 };
   static_assert(NumAbstractFunctionDeclBits <= 32, "fits in an unsigned");
 
   class FuncDeclBitfields {
@@ -378,15 +385,8 @@
 
     /// \brief Whether 'static' or 'class' was used.
     unsigned StaticSpelling : 2;
-
-    /// Whether this function is a 'mutating' method.
-    unsigned Mutating : 1;
-
-    /// Whether this function has a dynamic Self return type.
-    unsigned HasDynamicSelf : 1;
-    
   };
-  enum { NumFuncDeclBits = NumAbstractFunctionDeclBits + 5 };
+  enum { NumFuncDeclBits = NumAbstractFunctionDeclBits + 3 };
   static_assert(NumFuncDeclBits <= 32, "fits in an unsigned");
 
   class ConstructorDeclBitfields {
@@ -399,17 +399,8 @@
     /// of the definition of the constructor that is useful only to semantic
     /// analysis and SIL generation.
     unsigned ComputedBodyInitKind : 3;
-
-    /// Whether this initializer is a stub placed into a subclass to
-    /// catch invalid delegations to a designated initializer not
-    /// overridden by the subclass. A stub will always trap at runtime.
-    ///
-    /// Initializer stubs can be invoked from Objective-C or through
-    /// the Objective-C runtime; there is no way to directly express
-    /// an object construction that will invoke a stub.
-    unsigned HasStubImplementation : 1;
   };
-  enum { NumConstructorDeclBits = NumAbstractFunctionDeclBits + 4 };
+  enum { NumConstructorDeclBits = NumAbstractFunctionDeclBits + 3 };
   static_assert(NumConstructorDeclBits <= 32, "fits in an unsigned");
 
   class TypeDeclBitfields {
@@ -455,17 +446,10 @@
     /// to this declaration.
     unsigned AddedImplicitInitializers : 1;
 
-    /// \brief Whether or not this declaration has a failable initializer member,
-    /// and whether or not we've actually searched for one.
-    unsigned HasFailableInits : 1;
-
-    /// Whether we have already searched for failable initializers.
-    unsigned SearchedForFailableInits : 1;
-
     /// Whether there is are lazily-loaded conformances for this nominal type.
     unsigned HasLazyConformances : 1;
   };
-  enum { NumNominalTypeDeclBits = NumGenericTypeDeclBits + 5 };
+  enum { NumNominalTypeDeclBits = NumGenericTypeDeclBits + 3 };
   static_assert(NumNominalTypeDeclBits <= 32, "fits in an unsigned");
 
   class ProtocolDeclBitfields {
@@ -612,6 +596,15 @@
   enum { NumIfConfigDeclBits = NumDeclBits + 1 };
   static_assert(NumIfConfigDeclBits <= 32, "fits in an unsigned");
 
+  class MissingMemberDeclBitfields {
+    friend class MissingMemberDecl;
+    unsigned : NumDeclBits;
+
+    unsigned NumberOfVTableEntries : 2;
+  };
+  enum { NumMissingMemberDeclBits = NumDeclBits + 2 };
+  static_assert(NumMissingMemberDeclBits <= 32, "fits in an unsigned");
+
 protected:
   union {
     DeclBitfields DeclBits;
@@ -636,6 +629,7 @@
     ImportDeclBitfields ImportDeclBits;
     ExtensionDeclBitfields ExtensionDeclBits;
     IfConfigDeclBitfields IfConfigDeclBits;
+    MissingMemberDeclBitfields MissingMemberDeclBits;
     uint32_t OpaqueBits;
   };
 
@@ -2754,8 +2748,6 @@
     NominalTypeDeclBits.HasDelayedMembers = false;
     NominalTypeDeclBits.AddedImplicitInitializers = false;
     ExtensionGeneration = 0;
-    NominalTypeDeclBits.SearchedForFailableInits = false;
-    NominalTypeDeclBits.HasFailableInits = false;
     NominalTypeDeclBits.HasLazyConformances = false;
   }
 
@@ -2805,19 +2797,6 @@
     NominalTypeDeclBits.AddedImplicitInitializers = true;
   }
               
-  bool getHasFailableInits() const {
-    return NominalTypeDeclBits.HasFailableInits;
-  }
-  void setHasFailableInits(bool failable = true) {
-    NominalTypeDeclBits.HasFailableInits = failable;
-  }
-  void setSearchedForFailableInits(bool searched = true) {
-    NominalTypeDeclBits.SearchedForFailableInits = searched;
-  }
-  bool getSearchedForFailableInits() const {
-    return NominalTypeDeclBits.SearchedForFailableInits;
-  }
-
   /// Compute the type of this nominal type.
   void computeType();
 
@@ -3214,6 +3193,7 @@
   unsigned ObjCKind : 3;
 
   unsigned HasMissingDesignatedInitializers : 1;
+  unsigned HasMissingVTableEntries : 1;
 
   friend class IterativeTypeChecker;
 
@@ -3310,6 +3290,16 @@
     HasMissingDesignatedInitializers = newValue;
   }
 
+  /// Returns true if the class has missing members that require vtable entries.
+  ///
+  /// In this case, the class cannot be subclassed, because we cannot construct
+  /// the vtable for the subclass.
+  bool hasMissingVTableEntries() const;
+
+  void setHasMissingVTableEntries(bool newValue = true) {
+    HasMissingVTableEntries = newValue;
+  }
+
   /// Find a method of a class that overrides a given method.
   /// Return nullptr, if no such method exists.
   AbstractFunctionDecl *findOverridingDecl(
@@ -4790,6 +4780,8 @@
     AbstractFunctionDeclBits.NumParameterLists = NumParameterLists;
     AbstractFunctionDeclBits.Overridden = false;
     AbstractFunctionDeclBits.Throws = Throws;
+    AbstractFunctionDeclBits.NeedsNewVTableEntry = false;
+    AbstractFunctionDeclBits.HasComputedNeedsNewVTableEntry = false;
 
     // Verify no bitfield truncation.
     assert(AbstractFunctionDeclBits.NumParameterLists == NumParameterLists);
@@ -4903,6 +4895,21 @@
     return getBodyKind() == BodyKind::MemberwiseInitializer;
   }
 
+  void setNeedsNewVTableEntry(bool value) {
+    AbstractFunctionDeclBits.HasComputedNeedsNewVTableEntry = true;
+    AbstractFunctionDeclBits.NeedsNewVTableEntry = value;
+  }
+
+  bool needsNewVTableEntry() const {
+    if (!AbstractFunctionDeclBits.HasComputedNeedsNewVTableEntry)
+      const_cast<AbstractFunctionDecl *>(this)->computeNeedsNewVTableEntry();
+    return AbstractFunctionDeclBits.NeedsNewVTableEntry;
+  }
+
+private:
+  void computeNeedsNewVTableEntry();
+
+public:
   /// Retrieve the source range of the function body.
   SourceRange getBodySourceRange() const;
 
@@ -5050,15 +5057,15 @@
 
   TypeLoc FnRetType;
 
-  /// If this declaration is part of an overload set, determine if we've
-  /// searched for a common overload amongst all overloads, or if we've found
-  /// one.
-  unsigned HaveSearchedForCommonOverloadReturnType : 1;
-  unsigned HaveFoundCommonOverloadReturnType : 1;
-
   /// Whether we are statically dispatched even if overridable
   unsigned ForcedStaticDispatch : 1;
 
+  /// Whether this function has a dynamic Self return type.
+  unsigned HasDynamicSelf : 1;
+
+  /// Whether this function is a 'mutating' method.
+  unsigned Mutating : 1;
+
   /// \brief If this FuncDecl is an accessor for a property, this indicates
   /// which property and what kind of accessor.
   llvm::PointerIntPair<AbstractStorageDecl*, 3, AccessorKind> AccessorDecl;
@@ -5086,12 +5093,10 @@
       StaticLoc.isValid() || StaticSpelling != StaticSpellingKind::None;
     FuncDeclBits.StaticSpelling = static_cast<unsigned>(StaticSpelling);
     assert(NumParameterLists > 0 && "Must have at least an empty tuple arg");
-    FuncDeclBits.Mutating = false;
-    FuncDeclBits.HasDynamicSelf = false;
 
+    Mutating = false;
+    HasDynamicSelf = false;
     ForcedStaticDispatch = false;
-    HaveSearchedForCommonOverloadReturnType = false;
-    HaveFoundCommonOverloadReturnType = false;
   }
 
   static FuncDecl *createImpl(ASTContext &Context, SourceLoc StaticLoc,
@@ -5141,10 +5146,10 @@
     FuncDeclBits.IsStatic = IsStatic;
   }
   bool isMutating() const {
-    return FuncDeclBits.Mutating;
+    return Mutating;
   }
-  void setMutating(bool Mutating = true) {
-    FuncDeclBits.Mutating = Mutating;
+  void setMutating(bool mutating = true) {
+    Mutating = mutating;
   }
   
   /// \brief Returns the parameter lists(s) for the function definition.
@@ -5164,20 +5169,6 @@
     return getParameterLists()[i];
   }
   
-
-  bool getHaveSearchedForCommonOverloadReturnType() {
-    return HaveSearchedForCommonOverloadReturnType;
-  }
-  void setHaveSearchedForCommonOverloadReturnType(bool b = true) {
-    HaveSearchedForCommonOverloadReturnType = b;
-  }
-  bool getHaveFoundCommonOverloadReturnType() {
-    return HaveFoundCommonOverloadReturnType;
-  }
-  void setHaveFoundCommonOverloadReturnType(bool b = true) {
-    HaveFoundCommonOverloadReturnType = b;
-  }
-
   /// \returns true if this is non-mutating due to applying a 'mutating'
   /// attribute. For example a "mutating set" accessor.
   bool isExplicitNonMutating() const;
@@ -5266,11 +5257,11 @@
 
   /// Determine whether this function has a dynamic \c Self return
   /// type.
-  bool hasDynamicSelf() const { return FuncDeclBits.HasDynamicSelf; }
+  bool hasDynamicSelf() const { return HasDynamicSelf; }
 
   /// Set whether this function has a dynamic \c Self return or not.
   void setDynamicSelf(bool hasDynamicSelf) { 
-    FuncDeclBits.HasDynamicSelf = hasDynamicSelf;
+    HasDynamicSelf = hasDynamicSelf;
   }
 
   void getLocalCaptures(SmallVectorImpl<CapturedValue> &Result) const {
@@ -5549,6 +5540,15 @@
   /// The failability of this initializer, which is an OptionalTypeKind.
   unsigned Failability : 2;
 
+  /// Whether this initializer is a stub placed into a subclass to
+  /// catch invalid delegations to a designated initializer not
+  /// overridden by the subclass. A stub will always trap at runtime.
+  ///
+  /// Initializer stubs can be invoked from Objective-C or through
+  /// the Objective-C runtime; there is no way to directly express
+  /// an object construction that will invoke a stub.
+  unsigned HasStubImplementation : 1;
+
   /// The location of the '!' or '?' for a failable initializer.
   SourceLoc FailabilityLoc;
 
@@ -5708,13 +5708,13 @@
 
   /// Whether the implementation of this method is a stub that traps at runtime.
   bool hasStubImplementation() const {
-    return ConstructorDeclBits.HasStubImplementation;
+    return HasStubImplementation;
   }
 
   /// Set whether the implementation of this method is a stub that
   /// traps at runtime.
   void setStubImplementation(bool stub) {
-    ConstructorDeclBits.HasStubImplementation = stub;
+    HasStubImplementation = stub;
   }
 
   ConstructorDecl *getOverriddenDecl() const { return OverriddenDecl; }
@@ -6110,6 +6110,55 @@
   }
 };
 
+/// Represents a hole where a declaration should have been.
+///
+/// Among other things, these are used to keep vtable layout consistent.
+class MissingMemberDecl : public Decl {
+  DeclName Name;
+
+  MissingMemberDecl(DeclContext *DC, DeclName name, unsigned vtableEntries)
+      : Decl(DeclKind::MissingMember, DC), Name(name) {
+    MissingMemberDeclBits.NumberOfVTableEntries = vtableEntries;
+    assert(getNumberOfVTableEntries() == vtableEntries && "not enough bits");
+    setImplicit();
+  }
+public:
+  static MissingMemberDecl *
+  forMethod(ASTContext &ctx, DeclContext *DC, DeclName name,
+            bool hasNormalVTableEntry) {
+    assert(!name || name.isCompoundName());
+    return new (ctx) MissingMemberDecl(DC, name, hasNormalVTableEntry);
+  }
+
+  static MissingMemberDecl *
+  forInitializer(ASTContext &ctx, DeclContext *DC, DeclName name,
+                 bool hasNormalVTableEntry,
+                 bool hasAllocatingVTableEntry) {
+    unsigned entries = hasNormalVTableEntry + hasAllocatingVTableEntry;
+    return new (ctx) MissingMemberDecl(DC, name, entries);
+  }
+
+  DeclName getFullName() const {
+    return Name;
+  }
+
+  unsigned getNumberOfVTableEntries() const {
+    return MissingMemberDeclBits.NumberOfVTableEntries;
+  }
+
+  SourceLoc getLoc() const {
+    return SourceLoc();
+  }
+
+  SourceRange getSourceRange() const {
+    return SourceRange();
+  }
+
+  static bool classof(const Decl *D) {
+    return D->getKind() == DeclKind::MissingMember;
+  }
+};
+
 inline bool ValueDecl::isSettable(const DeclContext *UseDC,
                                   const DeclRefExpr *base) const {
   if (auto vd = dyn_cast<VarDecl>(this)) {
diff --git a/include/swift/AST/DeclContext.h b/include/swift/AST/DeclContext.h
index c8693ef..e78eaaa 100644
--- a/include/swift/AST/DeclContext.h
+++ b/include/swift/AST/DeclContext.h
@@ -363,6 +363,9 @@
     return ParentAndKind.getPointer();
   }
 
+  /// Returns the semantic parent for purposes of name lookup.
+  DeclContext *getParentForLookup() const;
+
   /// Return true if this is a child of the specified other decl context.
   bool isChildContextOf(const DeclContext *Other) const {
     if (this == Other) return false;
diff --git a/include/swift/AST/DeclNodes.def b/include/swift/AST/DeclNodes.def
index 8963d68..589eb39 100644
--- a/include/swift/AST/DeclNodes.def
+++ b/include/swift/AST/DeclNodes.def
@@ -93,6 +93,7 @@
 CONTEXT_DECL(TopLevelCode, Decl)
 DECL(IfConfig, Decl)
 DECL(PrecedenceGroup, Decl)
+DECL(MissingMember, Decl)
 
 ABSTRACT_DECL(Operator, Decl)
   OPERATOR_DECL(InfixOperator, OperatorDecl)
diff --git a/include/swift/AST/DiagnosticConsumer.h b/include/swift/AST/DiagnosticConsumer.h
index 3ba2575..811d597 100644
--- a/include/swift/AST/DiagnosticConsumer.h
+++ b/include/swift/AST/DiagnosticConsumer.h
@@ -96,6 +96,9 @@
                                 StringRef FormatString,
                                 ArrayRef<DiagnosticArgument> FormatArgs,
                                 const DiagnosticInfo &Info) = 0;
+
+  /// \returns true if an error occurred while finishing-up.
+  virtual bool finishProcessing() { return false; }
 };
   
 /// \brief DiagnosticConsumer that discards all diagnostics.
diff --git a/include/swift/AST/DiagnosticEngine.h b/include/swift/AST/DiagnosticEngine.h
index 21ec1d1..9c7ba60 100644
--- a/include/swift/AST/DiagnosticEngine.h
+++ b/include/swift/AST/DiagnosticEngine.h
@@ -741,6 +741,10 @@
     /// \returns true if diagnostic is marked with PointsToFirstBadToken
     /// option.
     bool isDiagnosticPointsToFirstBadToken(DiagID id) const;
+
+    /// \returns true if any diagnostic consumer gave an error while invoking
+    //// \c finishProcessing.
+    bool finishProcessing();
     
     /// \brief Format the given diagnostic text and place the result in the given
     /// buffer.
diff --git a/include/swift/AST/DiagnosticsParse.def b/include/swift/AST/DiagnosticsParse.def
index 6cfbdcb..26cb3d8 100644
--- a/include/swift/AST/DiagnosticsParse.def
+++ b/include/swift/AST/DiagnosticsParse.def
@@ -107,7 +107,9 @@
       "single-quoted string literal found, use '\"'", ())
 ERROR(lex_invalid_curly_quote,none,
       "unicode curly quote found, replace with '\"'", ())
-
+NOTE(lex_confusable_character,none,
+      "unicode character '%0' looks similar to '%1'; did you mean to use '%1'?",
+      (StringRef, StringRef))
 
 ERROR(lex_unterminated_block_comment,none,
       "unterminated '/*' comment", ())
@@ -129,12 +131,17 @@
 ERROR(lex_unicode_escape_braces,none,
       "expected hexadecimal code in braces after unicode escape", ())
 ERROR(lex_illegal_multiline_string_start,none,
-      "invalid start of multi-line string literal", ())
+      "multi-line string literal content must begin on a new line", ())
 ERROR(lex_illegal_multiline_string_end,none,
-      "invalid end of multi-line string literal", ())
-ERROR(lex_ambiguous_string_indent,none,
-      "invalid mix of multi-line string literal indentation", ())
-
+      "multi-line string literal closing delimiter must begin on a new line", ())
+ERROR(lex_multiline_string_indent_inconsistent,none,
+      "%select{unexpected space in|unexpected tab in|insufficient}2 indentation of "
+      "%select{line|next %1 lines}0 in multi-line string literal", 
+      (bool, unsigned, unsigned))
+NOTE(lex_multiline_string_indent_should_match_here,none,
+      "should match %select{space|tab}0 here", (unsigned))
+NOTE(lex_multiline_string_indent_change_line,none,
+      "change indentation of %select{this line|these lines}0 to match closing delimiter", (bool))
 
 ERROR(lex_invalid_character,none,
        "invalid character in source file", ())
@@ -1064,6 +1071,8 @@
 ERROR(anon_closure_arg_in_closure_with_args_typo,none,
       "anonymous closure arguments cannot be used inside a closure that has "
       "explicit arguments; did you mean '%0'?", (StringRef))
+ERROR(anon_closure_tuple_param_destructuring,none,
+      "closure tuple parameter does not support destructuring", ())
 ERROR(expected_closure_parameter_name,none,
       "expected the name of a closure parameter", ())
 ERROR(expected_capture_specifier,none,
@@ -1167,15 +1176,14 @@
       "extra tokens after interpolated string expression", ())
 
 // Keypath expressions.
-ERROR(expr_keypath_invalid_component,PointsToFirstBadToken,
-      "key path can only contain property, subscript, optional chaining, or "
-      "optional force-unwrapping components", ())
 ERROR(expr_keypath_expected_lparen,PointsToFirstBadToken,
       "expected '(' following '#keyPath'", ())
 ERROR(expr_keypath_expected_property_or_type,PointsToFirstBadToken,
       "expected property or type name within '#keyPath(...)'", ())
 ERROR(expr_keypath_expected_rparen,PointsToFirstBadToken,
       "expected ')' to complete '#keyPath' expression", ())
+ERROR(expr_keypath_expected_expr,none,
+      "expected expression path in Swift key path",())
 
 // Selector expressions.
 ERROR(expr_selector_expected_lparen,PointsToFirstBadToken,
diff --git a/include/swift/AST/DiagnosticsSIL.def b/include/swift/AST/DiagnosticsSIL.def
index d0aa7f7..696ba7f 100644
--- a/include/swift/AST/DiagnosticsSIL.def
+++ b/include/swift/AST/DiagnosticsSIL.def
@@ -84,17 +84,27 @@
 NOTE(previous_inout_alias,none,
       "previous aliasing argument", ())
 
-// This is temporarily a warning during staging to make it easier to evaluate.
-// The intent is to change it to an error before turning it on by default.
-WARNING(exclusivity_access_required,none,
-        "simultaneous accesses to %0 %1; "
+WARNING(exclusivity_access_required_swift3,none,
+        "simultaneous accesses to %0 %1, but "
         "%select{initialization|read|modification|deinitialization}2 requires "
-        "exclusive access", (DescriptiveDeclKind, Identifier, unsigned))
+        "exclusive access; consider copying to a local variable",
+        (DescriptiveDeclKind, Identifier, unsigned))
 
-WARNING(exclusivity_access_required_unknown_decl,none,
-        "simultaneous accesses; "
+ERROR(exclusivity_access_required,none,
+      "simultaneous accesses to %0 %1, but "
+      "%select{initialization|read|modification|deinitialization}2 requires "
+      "exclusive access; consider copying to a local variable",
+      (DescriptiveDeclKind, Identifier, unsigned))
+
+ERROR(exclusivity_access_required_unknown_decl,none,
+        "simultaneous accesses, but "
         "%select{initialization|read|modification|deinitialization}0 requires "
-        "exclusive access", (unsigned))
+        "exclusive access; consider copying to a local variable", (unsigned))
+
+WARNING(exclusivity_access_required_unknown_decl_swift3,none,
+        "simultaneous accesses, but "
+        "%select{initialization|read|modification|deinitialization}0 requires "
+"exclusive access; consider copying to a local variable", (unsigned))
 
 NOTE(exclusivity_conflicting_access,none,
      "conflicting access is here", ())
diff --git a/include/swift/AST/DiagnosticsSema.def b/include/swift/AST/DiagnosticsSema.def
index bf2abee..c51968f 100644
--- a/include/swift/AST/DiagnosticsSema.def
+++ b/include/swift/AST/DiagnosticsSema.def
@@ -441,6 +441,10 @@
       "compound name", ())
 ERROR(expr_keypath_no_keypath_type,none,
       "broken standard library: no 'KeyPath' type found", ())
+ERROR(expr_swift_keypath_invalid_component,none,
+      "invalid component of Swift key path", ())
+ERROR(expr_swift_keypath_not_starting_with_type,none,
+      "a Swift key path must begin with a type", ())
 
 // Selector expressions.
 ERROR(expr_selector_no_objc_runtime,none,
@@ -614,6 +618,10 @@
 
 ERROR(use_unresolved_identifier,none,
       "use of unresolved %select{identifier|operator}1 %0", (DeclName, bool))
+NOTE(confusable_character,none,
+      "%select{identifier|operator}0 '%1' contains possibly confused characters; "
+      "did you mean to use '%2'?",
+      (bool, StringRef, StringRef))
 ERROR(use_undeclared_type,none,
       "use of undeclared type %0", (Identifier))
 ERROR(use_undeclared_type_did_you_mean,none,
@@ -1208,6 +1216,28 @@
       "variables",
       (unsigned))
 
+ERROR(nscoding_unstable_mangled_name,none,
+      "%select{private|fileprivate|nested|local|generic}0 class %1 has an "
+      "unstable name when archiving via 'NSCoding'",
+      (unsigned, Type))
+WARNING(nscoding_unstable_mangled_name_warn,none,
+        "%select{private|fileprivate|nested|local|generic}0 class %1 has an "
+        "unstable name when archiving via 'NSCoding'",
+        (unsigned, Type))
+NOTE(unstable_mangled_name_add_objc,none,
+     "for new classes, add '@objc' to specify a unique, prefixed Objective-C "
+     "runtime name", ())
+NOTE(unstable_mangled_name_add_nskeyedarchivelegacy,none,
+     "for compatibility with existing archives, use '@NSKeyedArchiveLegacy' "
+     "to record the Swift 3 mangled name", ())
+NOTE(add_nskeyedarchivesubclassesonly_attr,none,
+     "generic class %0 should not be archived directly; "
+     "add @NSKeyedArchiveSubclassesOnly "
+     "and only archive specific subclasses of this class", (Type))
+
+ERROR(attr_nskeyedarchivelegacy_generic,none,
+      "'@NSKeyedArchiveLegacy' cannot be applied to generic class %0",
+      (Type))
 
 // Generic types
 ERROR(unsupported_type_nested_in_generic_function,none,
@@ -1301,8 +1331,6 @@
 ERROR(extension_protocol_via_typealias,none,
       "protocol %0 in the module being compiled cannot be extended via a "
       "type alias", (Type))
-ERROR(extension_anyobject,none,
-      "'AnyObject' protocol cannot be extended", ())
 ERROR(objc_generic_extension_using_type_parameter,none,
       "extension of a generic Objective-C class cannot access the class's "
       "generic parameters at runtime", ())
@@ -1351,6 +1379,10 @@
 ERROR(protocol_has_missing_requirements,none,
       "type %0 cannot conform to protocol %1 because it has requirements that "
       "cannot be satisfied", (Type, Type))
+ERROR(protocol_has_missing_requirements_versioned,none,
+      "type %0 cannot conform to protocol %1 (compiled with Swift %2) because "
+      "it has requirements that could not be loaded in Swift %3",
+      (Type, Type, clang::VersionTuple, clang::VersionTuple))
 ERROR(requirement_restricts_self,none,
       "%0 requirement %1 cannot add constraint '%2%select{:|:| ==|:}3 %4' on "
       "'Self'",
@@ -1880,12 +1912,21 @@
 ERROR(inheritance_from_unspecialized_objc_generic_class,none,
       "inheritance from a generic Objective-C class %0 must bind "
       "type parameters of %0 to specific concrete types", (Identifier))
+ERROR(inheritance_from_class_with_missing_vtable_entries,none,
+      "cannot inherit from class %0 because it has overridable members that "
+      "could not be loaded",
+      (Identifier))
+ERROR(inheritance_from_class_with_missing_vtable_entries_versioned,none,
+      "cannot inherit from class %0 (compiled with Swift %1) because it has "
+      "overridable members that could not be loaded in Swift %2",
+      (Identifier, clang::VersionTuple, clang::VersionTuple))
 ERROR(inheritance_from_cf_class,none,
       "cannot inherit from Core Foundation type %0", (Identifier))
 ERROR(inheritance_from_objc_runtime_visible_class,none,
       "cannot inherit from class %0 because it is only visible via the "
       "Objective-C runtime", (Identifier))
-
+WARNING(class_inherits_anyobject,none,
+        "conformance of class %0 to 'AnyObject' is redundant", (Type))
 
 // Enums
 ERROR(enum_case_access,none,
@@ -2064,7 +2105,8 @@
       "%0 may only be used on parameters", (StringRef))
 ERROR(attr_not_on_variadic_parameters,none,
       "%0 may not be used on variadic parameters", (StringRef))
-
+ERROR(attr_not_on_subscript_parameters,none,
+      "%0 may not be used on subscript parameters", (StringRef))
 
 ERROR(override_final,none,
       "%0 overrides a 'final' %1", (DescriptiveDeclKind, DescriptiveDeclKind))
@@ -2800,6 +2842,11 @@
 ERROR(closure_argument_list_missing,none,
       "contextual type for closure argument list expects %0 argument%s0, "
       "which cannot be implicitly ignored", (unsigned))
+ERROR(closure_tuple_parameter_destructuring,none,
+      "closure tuple parameter %0 does not support destructuring", (Type))
+ERROR(closure_tuple_parameter_destructuring_implicit,none,
+      "closure tuple parameter %0 does not support destructuring "
+      "with implicit parameters", (Type))
 
 ERROR(tuple_pattern_length_mismatch,none,
       "tuple pattern has the wrong length for tuple type %0", (Type))
@@ -3611,12 +3658,14 @@
 ERROR(empty_switch_stmt,none,
       "'switch' statement body must have at least one 'case' or 'default' "
       "block; do you want to add a default case?",())
-ERROR(non_exhaustive_switch,none,
-      "%select{switch must be exhaustive, consider adding |do you want to add }0"
-      "%select{missing cases|a default clause}1"
-      "%select{:|?}0", (bool, bool))
+ERROR(non_exhaustive_switch,none, "switch must be exhaustive", ())
+NOTE(missing_several_cases,none,
+     "do you want to add "
+     "%select{missing cases|a default clause}0"
+     "?", (bool))
+
 NOTE(missing_particular_case,none,
-     "missing case: '%0'", (StringRef))
+     "add missing case: '%0'", (StringRef))
 WARNING(redundant_particular_case,none,
         "case is already handled by previous patterns; consider removing it",())
 
diff --git a/include/swift/AST/Expr.h b/include/swift/AST/Expr.h
index 7092049..4464532 100644
--- a/include/swift/AST/Expr.h
+++ b/include/swift/AST/Expr.h
@@ -4558,12 +4558,21 @@
 /// #keyPath(Person.friends.firstName)
 /// \endcode
 class KeyPathExpr : public Expr {
-  SourceLoc KeywordLoc;
+  SourceLoc StartLoc;
   SourceLoc LParenLoc;
-  SourceLoc RParenLoc;
-  TypeRepr *RootType;
+  SourceLoc EndLoc;
   Expr *ObjCStringLiteralExpr = nullptr;
 
+  // The parsed root of a Swift keypath (the section before an unusual dot, like
+  // Foo.Bar in \Foo.Bar.?.baz).
+  Expr *ParsedRoot = nullptr;
+  // The parsed path of a Swift keypath (the section after an unusual dot, like
+  // ?.baz in \Foo.Bar.?.baz).
+  Expr *ParsedPath = nullptr;
+
+  // The processed/resolved type, like Foo.Bar in \Foo.Bar.?.baz.
+  TypeRepr *RootType = nullptr;
+
 public:
   /// A single stored component, which will be one of:
   /// - an unresolved DeclName, which has to be type-checked
@@ -4772,17 +4781,23 @@
   /// Create a new #keyPath expression.
   KeyPathExpr(ASTContext &C,
               SourceLoc keywordLoc, SourceLoc lParenLoc,
-              TypeRepr *root,
               ArrayRef<Component> components,
               SourceLoc rParenLoc,
-              bool isObjC,
               bool isImplicit = false);
 
-  SourceLoc getLoc() const { return KeywordLoc; }
-  SourceRange getSourceRange() const {
-    return SourceRange(KeywordLoc, RParenLoc);
+  KeyPathExpr(SourceLoc backslashLoc, Expr *parsedRoot, Expr *parsedPath,
+              bool isImplicit = false)
+      : Expr(ExprKind::KeyPath, isImplicit), StartLoc(backslashLoc),
+        EndLoc(parsedPath ? parsedPath->getEndLoc() : parsedRoot->getEndLoc()),
+        ParsedRoot(parsedRoot), ParsedPath(parsedPath) {
+    assert((parsedRoot || parsedPath) &&
+           "keypath must have either root or path");
+    KeyPathExprBits.IsObjC = false;
   }
 
+  SourceLoc getLoc() const { return StartLoc; }
+  SourceRange getSourceRange() const { return SourceRange(StartLoc, EndLoc); }
+
   /// Get the components array.
   ArrayRef<Component> getComponents() const {
     return Components;
@@ -4807,11 +4822,34 @@
   void setObjCStringLiteralExpr(Expr *expr) {
     ObjCStringLiteralExpr = expr;
   }
-  
+
+  Expr *getParsedRoot() const {
+    assert(!isObjC() && "cannot get parsed root of ObjC keypath");
+    return ParsedRoot;
+  }
+  void setParsedRoot(Expr *root) {
+    assert(!isObjC() && "cannot get parsed root of ObjC keypath");
+    ParsedRoot = root;
+  }
+
+  Expr *getParsedPath() const {
+    assert(!isObjC() && "cannot get parsed path of ObjC keypath");
+    return ParsedPath;
+  }
+  void setParsedPath(Expr *path) {
+    assert(!isObjC() && "cannot set parsed path of ObjC keypath");
+    ParsedPath = path;
+  }
+
   TypeRepr *getRootType() const {
+    assert(!isObjC() && "cannot get root type of ObjC keypath");
     return RootType;
   }
-  
+  void setRootType(TypeRepr *rootType) {
+    assert(!isObjC() && "cannot set root type of ObjC keypath");
+    RootType = rootType;
+  }
+
   /// True if this is an ObjC key path expression.
   bool isObjC() const { return KeyPathExprBits.IsObjC; }
 
@@ -4820,6 +4858,22 @@
   }
 };
 
+/// Represents the unusual behavior of a . in a \ keypath expression, such as
+/// \.[0] and \Foo.?.
+class KeyPathDotExpr : public Expr {
+  SourceLoc DotLoc;
+
+public:
+  KeyPathDotExpr(SourceLoc dotLoc)
+      : Expr(ExprKind::KeyPathDot, /*isImplicit=*/true), DotLoc(dotLoc) {}
+
+  SourceLoc getLoc() const { return DotLoc; }
+  SourceRange getSourceRange() const { return SourceRange(DotLoc, DotLoc); }
+
+  static bool classof(const Expr *E) {
+    return E->getKind() == ExprKind::KeyPathDot;
+  }
+};
 
 inline bool Expr::isInfixOperator() const {
   return isa<BinaryExpr>(this) || isa<IfExpr>(this) ||
diff --git a/include/swift/AST/ExprNodes.def b/include/swift/AST/ExprNodes.def
index feb7183..301ecf6 100644
--- a/include/swift/AST/ExprNodes.def
+++ b/include/swift/AST/ExprNodes.def
@@ -168,6 +168,7 @@
 EXPR(EditorPlaceholder, Expr)
 EXPR(ObjCSelector, Expr)
 EXPR(KeyPath, Expr)
+UNCHECKED_EXPR(KeyPathDot, Expr)
 
 #undef EXPR_RANGE
 #undef LITERAL_EXPR
diff --git a/include/swift/AST/IRGenOptions.h b/include/swift/AST/IRGenOptions.h
index 7dc6219..25c2b35 100644
--- a/include/swift/AST/IRGenOptions.h
+++ b/include/swift/AST/IRGenOptions.h
@@ -76,6 +76,9 @@
   /// The command line string that is to be stored in the DWARF debug info.
   std::string DWARFDebugFlags;
 
+  /// List of -Xcc -D macro definitions.
+  std::vector<std::string> ClangDefines;
+
   /// The libraries and frameworks specified on the command line.
   SmallVector<LinkLibrary, 4> LinkLibraries;
 
diff --git a/include/swift/AST/KnownIdentifiers.def b/include/swift/AST/KnownIdentifiers.def
index 12d54dd..f8d06f7 100644
--- a/include/swift/AST/KnownIdentifiers.def
+++ b/include/swift/AST/KnownIdentifiers.def
@@ -34,6 +34,7 @@
 IDENTIFIER(CoreGraphics)
 IDENTIFIER(CoreMedia)
 IDENTIFIER(CGFloat)
+IDENTIFIER(CoreFoundation)
 IDENTIFIER(CVarArg)
 IDENTIFIER(Darwin)
 IDENTIFIER(dealloc)
diff --git a/include/swift/AST/KnownProtocols.def b/include/swift/AST/KnownProtocols.def
index a69edc0..9cd0775 100644
--- a/include/swift/AST/KnownProtocols.def
+++ b/include/swift/AST/KnownProtocols.def
@@ -50,7 +50,6 @@
 
 PROTOCOL(Sequence)
 PROTOCOL(IteratorProtocol)
-PROTOCOL(AnyObject)
 PROTOCOL(RawRepresentable)
 PROTOCOL(Equatable)
 PROTOCOL(Hashable)
@@ -58,15 +57,17 @@
 PROTOCOL(Error)
 PROTOCOL_(ErrorCodeProtocol)
 PROTOCOL(OptionSet)
+
 PROTOCOL_(BridgedNSError)
 PROTOCOL_(BridgedStoredNSError)
+PROTOCOL_(CFObject)
+PROTOCOL_(SwiftNewtypeWrapper)
 PROTOCOL(CodingKey)
 PROTOCOL(Encodable)
 PROTOCOL(Decodable)
 
 PROTOCOL_(ObjectiveCBridgeable)
 PROTOCOL_(DestructorSafeContainer)
-PROTOCOL_(SwiftNewtypeWrapper)
 
 EXPRESSIBLE_BY_LITERAL_PROTOCOL(ExpressibleByArrayLiteral)
 EXPRESSIBLE_BY_LITERAL_PROTOCOL(ExpressibleByBooleanLiteral)
diff --git a/include/swift/AST/PrintOptions.h b/include/swift/AST/PrintOptions.h
index 2108292..b911706 100644
--- a/include/swift/AST/PrintOptions.h
+++ b/include/swift/AST/PrintOptions.h
@@ -238,6 +238,9 @@
   /// Whether to skip parameter type attributes
   bool SkipParameterTypeAttributes = false;
 
+  /// Whether to skip placeholder members.
+  bool SkipMissingMemberPlaceholders = true;
+
   /// Whether to print a long attribute like '\@available' on a separate line
   /// from the declaration or other attributes.
   bool PrintLongAttrsOnSeparateLines = false;
@@ -489,6 +492,7 @@
     result.AbstractAccessors = false;
     result.PrintAccessibility = true;
     result.SkipEmptyExtensionDecls = false;
+    result.SkipMissingMemberPlaceholders = false;
     return result;
   }
 
diff --git a/include/swift/AST/ProtocolConformance.h b/include/swift/AST/ProtocolConformance.h
index d0cada6..2b52615 100644
--- a/include/swift/AST/ProtocolConformance.h
+++ b/include/swift/AST/ProtocolConformance.h
@@ -145,13 +145,15 @@
 
   /// Retrieve the type witness for the given associated type.
   Type getTypeWitness(AssociatedTypeDecl *assocType,
-                      LazyResolver *resolver) const;
+                      LazyResolver *resolver,
+                      SubstOptions options = None) const;
 
   /// Retrieve the type witness and type decl (if one exists)
   /// for the given associated type.
   std::pair<Type, TypeDecl *>
   getTypeWitnessAndDecl(AssociatedTypeDecl *assocType,
-                        LazyResolver *resolver) const;
+                        LazyResolver *resolver,
+                        SubstOptions options = None) const;
 
   /// Apply the given function object to each type witness within this
   /// protocol conformance.
@@ -399,7 +401,8 @@
   /// for the given associated type.
   std::pair<Type, TypeDecl *>
   getTypeWitnessAndDecl(AssociatedTypeDecl *assocType,
-                        LazyResolver *resolver) const;
+                        LazyResolver *resolver,
+                        SubstOptions options = None) const;
 
   /// Determine whether the protocol conformance has a type witness for the
   /// given associated type.
@@ -568,7 +571,8 @@
   /// for the given associated type.
   std::pair<Type, TypeDecl *>
   getTypeWitnessAndDecl(AssociatedTypeDecl *assocType,
-                        LazyResolver *resolver) const;
+                        LazyResolver *resolver,
+                        SubstOptions options = None) const;
 
   /// Given that the requirement signature of the protocol directly states
   /// that the given dependent type must conform to the given protocol,
@@ -662,8 +666,10 @@
   /// for the given associated type.
   std::pair<Type, TypeDecl *>
   getTypeWitnessAndDecl(AssociatedTypeDecl *assocType,
-                        LazyResolver *resolver) const {
-    return InheritedConformance->getTypeWitnessAndDecl(assocType, resolver);
+                        LazyResolver *resolver,
+                        SubstOptions options = None) const {
+    return InheritedConformance->getTypeWitnessAndDecl(assocType, resolver,
+                                                       options);
   }
 
   /// Given that the requirement signature of the protocol directly states
diff --git a/include/swift/AST/SourceEntityWalker.h b/include/swift/AST/SourceEntityWalker.h
index a5b8d62..fd33571 100644
--- a/include/swift/AST/SourceEntityWalker.h
+++ b/include/swift/AST/SourceEntityWalker.h
@@ -124,6 +124,19 @@
   virtual bool visitCallArgName(Identifier Name, CharSourceRange Range,
                                 ValueDecl *D);
 
+  /// This method is called for each external argument name in function-like
+  /// declarations like constructor, function and subscript. The function is
+  /// called only when an external argument label is specifically specified,
+  /// like func foo(External Internal: Int) {}.
+  /// If it returns false, the remaining traversal is terminated and returns
+  /// failure.
+  ///
+  /// \param Name the argument name.
+  /// \param StartLoc the source loc of the argument name start.
+  /// \param D the function-like decl.
+  virtual bool visitDeclarationArgumentName(Identifier Name, SourceLoc StartLoc,
+                                            ValueDecl *D);
+
   /// This method is called when a Module is referenced in source.
   virtual bool visitModuleReference(ModuleEntity Mod, CharSourceRange Range);
 
diff --git a/include/swift/AST/Type.h b/include/swift/AST/Type.h
index 49a59c1..9d25ff5 100644
--- a/include/swift/AST/Type.h
+++ b/include/swift/AST/Type.h
@@ -73,6 +73,15 @@
 };
 
 /// A function object suitable for use as a \c TypeSubstitutionFn that
+/// queries an underlying \c TypeSubstitutionMap, or returns the original type
+/// if no match was found.
+struct QueryTypeSubstitutionMapOrIdentity {
+  const TypeSubstitutionMap &substitutions;
+  
+  Type operator()(SubstitutableType *type) const;
+};
+
+/// A function object suitable for use as a \c TypeSubstitutionFn that
 /// queries an underlying \c SubstitutionMap.
 struct QuerySubstitutionMap {
   const SubstitutionMap &subMap;
@@ -156,7 +165,24 @@
 };
 
 /// Options for performing substitutions into a type.
-typedef OptionSet<SubstFlags> SubstOptions;
+struct SubstOptions : public OptionSet<SubstFlags> {
+  // Note: The unfortunate use of TypeBase * here, rather than Type,
+  // is due to a libc++ quirk that requires the result type to be
+  // complete.
+  typedef std::function<TypeBase *(const NormalProtocolConformance *,
+                                   AssociatedTypeDecl *)>
+    GetTentativeTypeWitness;
+
+  /// Function that retrieves a tentative type witness for a protocol
+  /// conformance with the state \c CheckingTypeWitnesses.
+  GetTentativeTypeWitness getTentativeTypeWitness;
+
+  SubstOptions(llvm::NoneType) : OptionSet(None) { }
+
+  SubstOptions(SubstFlags flags) : OptionSet(flags) { }
+
+  SubstOptions(OptionSet<SubstFlags> options) : OptionSet(options) { }
+};
 
 inline SubstOptions operator|(SubstFlags lhs, SubstFlags rhs) {
   return SubstOptions(lhs) | rhs;
diff --git a/include/swift/AST/Types.h b/include/swift/AST/Types.h
index 7567451..694f584 100644
--- a/include/swift/AST/Types.h
+++ b/include/swift/AST/Types.h
@@ -221,19 +221,22 @@
 
 /// Specifies which normally-unsafe type mismatches should be accepted when
 /// checking overrides.
-enum class OverrideMatchMode {
-  /// Only accept overrides that are properly covariant.
-  Strict,
+enum class TypeMatchFlags {
+  /// Allow properly-covariant overrides.
+  AllowOverride = 1 << 0,
   /// Allow a parameter with IUO type to be overridden by a parameter with non-
   /// optional type.
-  AllowNonOptionalForIUOParam,
+  AllowNonOptionalForIUOParam = 1 << 1,
   /// Allow any mismatches of Optional or ImplicitlyUnwrappedOptional at the
   /// top level of a type.
   ///
   /// This includes function parameters and result types as well as tuple
   /// elements, but excludes generic parameters.
-  AllowTopLevelOptionalMismatch
+  AllowTopLevelOptionalMismatch = 1 << 2,
+  /// Allow any ABI-compatible types to be considered matching.
+  AllowABICompatible = 1 << 3,
 };
+using TypeMatchOptions = OptionSet<TypeMatchFlags>;
 
 /// TypeBase - Base class for all types in Swift.
 class alignas(1 << TypeAlignInBits) TypeBase {
@@ -702,10 +705,9 @@
   /// concrete types to form the argument type.
   bool isBindableTo(Type ty);
 
-  /// \brief Determines whether this type is permitted as a method override
-  /// of the \p other.
-  bool canOverride(Type other, OverrideMatchMode matchMode,
-                   LazyResolver *resolver);
+  /// \brief Determines whether this type is similar to \p other as defined by
+  /// \p matchOptions.
+  bool matches(Type other, TypeMatchOptions matchOptions, LazyResolver *resolver);
 
   /// \brief Determines whether this type has a retainable pointer
   /// representation, i.e. whether it is representable as a single,
@@ -4587,9 +4589,9 @@
 
 inline Type TupleTypeElt::getVarargBaseTy(Type VarArgT) {
   TypeBase *T = VarArgT.getPointer();
-  if (ArraySliceType *AT = dyn_cast<ArraySliceType>(T))
+  if (auto *AT = dyn_cast<ArraySliceType>(T))
     return AT->getBaseType();
-  if (BoundGenericType *BGT = dyn_cast<BoundGenericType>(T)) {
+  if (auto *BGT = dyn_cast<BoundGenericType>(T)) {
     // It's the stdlib Array<T>.
     return BGT->getGenericArgs()[0];
   }
diff --git a/include/swift/AST/Witness.h b/include/swift/AST/Witness.h
index 738e2f1..e81c5ea 100644
--- a/include/swift/AST/Witness.h
+++ b/include/swift/AST/Witness.h
@@ -108,6 +108,16 @@
   /// not generic (excepting \c Self)  and the conforming type is non-generic.
   Witness(ValueDecl *witness) : storage(witness) { assert(witness != nullptr); }
 
+  /// Create an opaque witness for the given requirement.
+  ///
+  /// This indicates that a witness exists, but is not visible to the current
+  /// module.
+  static Witness forOpaque(ValueDecl *requirement) {
+    // TODO: It's probably a good idea to have a separate 'opaque' bit.
+    // Making req == witness is kind of a hack.
+    return Witness(requirement);
+  }
+
   /// Create a witness that requires substitutions.
   ///
   /// \param decl The declaration for the witness.
diff --git a/include/swift/Basic/LangOptions.h b/include/swift/Basic/LangOptions.h
index cbcf5e6..80a81de 100644
--- a/include/swift/Basic/LangOptions.h
+++ b/include/swift/Basic/LangOptions.h
@@ -197,8 +197,8 @@
     /// Whether to attempt to recover from missing cross-references and other
     /// errors when deserializing from a Swift module.
     ///
-    /// This is a staging flag; eventually it will be on by default.
-    bool EnableDeserializationRecovery = false;
+    /// This is a staging flag; eventually it will be removed.
+    bool EnableDeserializationRecovery = true;
 
     /// Should we use \c ASTScope-based resolution for unqualified name lookup?
     bool EnableASTScopeLookup = false;
@@ -229,7 +229,13 @@
       Swift3ObjCInferenceWarnings::None;
     
     /// Enable keypaths.
-    bool EnableExperimentalKeyPaths = false;
+    bool EnableExperimentalKeyPaths = true;
+
+    /// When a conversion from String to Substring fails, emit a fix-it to append
+    /// the void subscript '[]'.
+    /// FIXME: Remove this flag when void subscripts are implemented.
+    /// This is used to guard preemptive testing for the fix-it.
+    bool FixStringToSubstringConversions = false;
 
     /// Sets the target we are building for and updates platform conditions
     /// to match.
diff --git a/include/swift/Basic/Version.h b/include/swift/Basic/Version.h
index 9c36999..9d157dc 100644
--- a/include/swift/Basic/Version.h
+++ b/include/swift/Basic/Version.h
@@ -144,6 +144,9 @@
 
 bool operator>=(const Version &lhs, const Version &rhs);
 bool operator==(const Version &lhs, const Version &rhs);
+inline bool operator!=(const Version &lhs, const Version &rhs) {
+  return !(lhs == rhs);
+}
 
 raw_ostream &operator<<(raw_ostream &os, const Version &version);
 
diff --git a/include/swift/ClangImporter/ClangImporter.h b/include/swift/ClangImporter/ClangImporter.h
index 263941a..6401709 100644
--- a/include/swift/ClangImporter/ClangImporter.h
+++ b/include/swift/ClangImporter/ClangImporter.h
@@ -308,10 +308,12 @@
 
   Optional<std::string>
   getOrCreatePCH(const ClangImporterOptions &ImporterOptions,
-                 const std::string &SwiftPCHHash);
+                 StringRef SwiftPCHHash);
   Optional<std::string>
+  /// \param isExplicit true if the PCH filename was passed directly
+  /// with -import-objc-header option.
   getPCHFilename(const ClangImporterOptions &ImporterOptions,
-                 const std::string &SwiftPCHHash);
+                 StringRef SwiftPCHHash, bool &isExplicit);
 };
 
 ImportDecl *createImportDecl(ASTContext &Ctx, DeclContext *DC, ClangNode ClangN,
diff --git a/include/swift/Demangling/Demangle.h b/include/swift/Demangling/Demangle.h
index d7106e6..0904510 100644
--- a/include/swift/Demangling/Demangle.h
+++ b/include/swift/Demangling/Demangle.h
@@ -409,6 +409,12 @@
 /// This should always round-trip perfectly with demangleSymbolAsNode.
 std::string mangleNode(const NodePointer &root);
 
+/// Remangle in the old mangling scheme.
+///
+/// This is only used for objc-runtime names and should be removed as soon as
+/// we switch to the new mangling for those names as well.
+std::string mangleNodeOld(const NodePointer &root);
+
 /// \brief Transform the node structure to a string.
 ///
 /// Typical usage:
diff --git a/include/swift/Frontend/Frontend.h b/include/swift/Frontend/Frontend.h
index 9e0efe1..d877ec7 100644
--- a/include/swift/Frontend/Frontend.h
+++ b/include/swift/Frontend/Frontend.h
@@ -426,6 +426,10 @@
   /// Parses the input file but does no type-checking or module imports.
   /// Note that this only supports parsing an invocation with a single file.
   void performParseOnly();
+
+  /// Frees up the ASTContext and SILModule objects that this instance is
+  /// holding on.
+  void freeContextAndSIL();
 };
 
 } // namespace swift
diff --git a/include/swift/Frontend/SerializedDiagnosticConsumer.h b/include/swift/Frontend/SerializedDiagnosticConsumer.h
index 3e88086..55115b9 100644
--- a/include/swift/Frontend/SerializedDiagnosticConsumer.h
+++ b/include/swift/Frontend/SerializedDiagnosticConsumer.h
@@ -21,7 +21,7 @@
 #include <memory>
 
 namespace llvm {
-  class raw_ostream;
+  class StringRef;
 }
 
 namespace swift {
@@ -30,13 +30,12 @@
 
   namespace serialized_diagnostics {
     /// \brief Create a DiagnosticConsumer that serializes diagnostics to a
-    ///        stream.
+    ///        file.
     ///
-    /// \param OS the stream to emit the diagnostics.  The consumer takes
-    ///        ownership of the stream.
+    /// \param serializedDiagnosticsPath the file path to write the diagnostics.
     ///
     /// \returns A new diagnostic consumer that serializes diagnostics.
-    DiagnosticConsumer *createConsumer(std::unique_ptr<llvm::raw_ostream> OS);
+    DiagnosticConsumer *createConsumer(llvm::StringRef serializedDiagnosticsPath);
   }
 }
 
diff --git a/include/swift/IDE/APIDigesterData.h b/include/swift/IDE/APIDigesterData.h
index 6d71c9f..6d9d927 100644
--- a/include/swift/IDE/APIDigesterData.h
+++ b/include/swift/IDE/APIDigesterData.h
@@ -55,6 +55,7 @@
   virtual APIDiffItemKind getKind() const = 0;
   virtual StringRef getKey() const = 0;
   virtual ~APIDiffItem() = default;
+  bool operator==(const APIDiffItem &Other) const;
 };
 
 // CommonDiffItem describes how an element in SDK evolves in a way that migrator can
diff --git a/include/swift/IDE/CodeCompletion.h b/include/swift/IDE/CodeCompletion.h
index 6e34915..2c5490a 100644
--- a/include/swift/IDE/CodeCompletion.h
+++ b/include/swift/IDE/CodeCompletion.h
@@ -503,6 +503,7 @@
   ReturnStmtExpr,
   AfterPound,
   GenericParams,
+  SwiftKeyPath,
 };
 
 /// \brief A single code completion result.
diff --git a/include/swift/IDE/Utils.h b/include/swift/IDE/Utils.h
index fceb58e..a3293e7 100644
--- a/include/swift/IDE/Utils.h
+++ b/include/swift/IDE/Utils.h
@@ -13,6 +13,7 @@
 #ifndef SWIFT_IDE_UTILS_H
 #define SWIFT_IDE_UTILS_H
 
+#include "llvm/ADT/PointerIntPair.h"
 #include "swift/Basic/LLVM.h"
 #include "swift/AST/ASTNode.h"
 #include "swift/AST/Module.h"
@@ -199,6 +200,8 @@
                           ReferenceMetaData Data) override;
   bool visitCallArgName(Identifier Name, CharSourceRange Range,
                         ValueDecl *D) override;
+  bool visitDeclarationArgumentName(Identifier Name, SourceLoc StartLoc,
+                                    ValueDecl *D) override;
   bool visitModuleReference(ModuleEntity Mod, CharSourceRange Range) override;
   bool rangeContainsLoc(SourceRange Range) const {
     return getSourceMgr().rangeContainsTokenLoc(Range, LocToResolve);
@@ -241,9 +244,12 @@
   Break,
   Continue,
 };
+
+typedef llvm::PointerIntPair<TypeBase*, 1, bool> ReturnTyAndWhetherExit;
+
 struct ResolvedRangeInfo {
   RangeKind Kind;
-  Type Ty;
+  ReturnTyAndWhetherExit ExitInfo;
   StringRef Content;
   bool HasSingleEntry;
   bool ThrowingUnhandledError;
@@ -254,23 +260,26 @@
   ArrayRef<DeclaredDecl> DeclaredDecls;
   ArrayRef<ReferencedDecl> ReferencedDecls;
   DeclContext* RangeContext;
-  ResolvedRangeInfo(RangeKind Kind, Type Ty, StringRef Content,
+  ResolvedRangeInfo(RangeKind Kind, ReturnTyAndWhetherExit ExitInfo, StringRef Content,
                     DeclContext* RangeContext,
                     bool HasSingleEntry, bool ThrowingUnhandledError,
                     OrphanKind Orphan, ArrayRef<ASTNode> ContainedNodes,
                     ArrayRef<DeclaredDecl> DeclaredDecls,
                     ArrayRef<ReferencedDecl> ReferencedDecls): Kind(Kind),
-                      Ty(Ty), Content(Content), HasSingleEntry(HasSingleEntry),
+                      ExitInfo(ExitInfo), Content(Content),
+                      HasSingleEntry(HasSingleEntry),
                       ThrowingUnhandledError(ThrowingUnhandledError),
                       Orphan(Orphan), ContainedNodes(ContainedNodes),
                       DeclaredDecls(DeclaredDecls),
                       ReferencedDecls(ReferencedDecls),
                       RangeContext(RangeContext) {}
   ResolvedRangeInfo(StringRef Content) :
-  ResolvedRangeInfo(RangeKind::Invalid, Type(), Content, nullptr,
+  ResolvedRangeInfo(RangeKind::Invalid, {nullptr, false}, Content, nullptr,
                     /*Single entry*/true, /*unhandled error*/false,
                     OrphanKind::None, {}, {}, {}) {}
   void print(llvm::raw_ostream &OS);
+  bool exit() const { return ExitInfo.getInt(); }
+  Type getType() const { return ExitInfo.getPointer(); }
 };
 
 class RangeResolver : public SourceEntityWalker {
diff --git a/include/swift/Migrator/ASTMigratorPass.h b/include/swift/Migrator/ASTMigratorPass.h
new file mode 100644
index 0000000..e6429b2
--- /dev/null
+++ b/include/swift/Migrator/ASTMigratorPass.h
@@ -0,0 +1,66 @@
+//===--- ASTMigratorPass.h --------------------------------------*- C++ -*-===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+//
+// A base class for a syntactic migrator pass that uses the temporary
+// swift::migrator::EditorAdapter infrastructure.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef SWIFT_MIGRATOR_ASTMIGRATORPASS_H
+#define SWIFT_MIGRATOR_ASTMIGRATORPASS_H
+
+#include "swift/AST/ASTContext.h"
+#include "swift/Migrator/EditorAdapter.h"
+
+namespace swift {
+class SourceManager;
+struct MigratorOptions;
+
+namespace migrator {
+class ASTMigratorPass {
+protected:
+  EditorAdapter &Editor;
+  SourceFile *SF;
+  const MigratorOptions &Opts;
+  const StringRef Filename;
+  const unsigned BufferID;
+  SourceManager &SM;
+
+  ASTMigratorPass(EditorAdapter &Editor, SourceFile *SF,
+                  const MigratorOptions &Opts)
+    : Editor(Editor), SF(SF), Opts(Opts), Filename(SF->getFilename()),
+      BufferID(SF->getBufferID().getValue()),
+      SM(SF->getASTContext().SourceMgr) {}
+};
+
+/// Run a general pass to migrate code based on SDK differences in the previous
+/// release.
+void runAPIDiffMigratorPass(EditorAdapter &Editor,
+                            SourceFile *SF,
+                            const MigratorOptions &Opts);
+
+/// Run a pass to fix up new tuple interpretation in SE-0110.
+void runTupleSplatMigratorPass(EditorAdapter &Editor,
+                               SourceFile *SF,
+                               const MigratorOptions &Opts);
+
+/// Run a pass to prepend 'Swift.' to `type(of:)` expressions if they will
+/// be shadowed in Swift 4, as these are now resolved by normal overload
+/// resolution.
+void runTypeOfMigratorPass(EditorAdapter &Editor,
+                           SourceFile *SF,
+                           const MigratorOptions &Opts);
+
+} // end namespace migrator
+} // end namespace swift
+
+#endif // SWIFT_MIGRATOR_ASTMIGRATORPASS_H
diff --git a/include/swift/Migrator/EditorAdapter.h b/include/swift/Migrator/EditorAdapter.h
index c73d807..764c535 100644
--- a/include/swift/Migrator/EditorAdapter.h
+++ b/include/swift/Migrator/EditorAdapter.h
@@ -108,6 +108,7 @@
   bool remove(SourceLoc TokenLoc);
   bool remove(SourceRange TokenRange);
   bool replace(SourceRange TokenRange, StringRef Text);
+  bool replaceToken(SourceLoc TokenLoc, StringRef Text);
   bool replaceWithInner(SourceRange TokenRange, SourceRange TokenInnerRange);
 
   /// Return the batched edits encountered so far.
diff --git a/include/swift/Migrator/FixitFilter.h b/include/swift/Migrator/FixitFilter.h
index 3eb4ea5..179ac82 100644
--- a/include/swift/Migrator/FixitFilter.h
+++ b/include/swift/Migrator/FixitFilter.h
@@ -118,7 +118,9 @@
         Info.ID == diag::objc_inference_swift3_addobjc.ID ||
         Info.ID == diag::objc_inference_swift3_dynamic.ID ||
         Info.ID == diag::override_swift3_objc_inference.ID ||
-        Info.ID == diag::objc_inference_swift3_objc_derived.ID)
+        Info.ID == diag::objc_inference_swift3_objc_derived.ID ||
+        Info.ID == diag::missing_several_cases.ID ||
+        Info.ID == diag::missing_particular_case.ID)
       return true;
 
     return false;
diff --git a/include/swift/Migrator/MigrationState.h b/include/swift/Migrator/MigrationState.h
index 0062f38..be54c60 100644
--- a/include/swift/Migrator/MigrationState.h
+++ b/include/swift/Migrator/MigrationState.h
@@ -74,8 +74,8 @@
   /// input file, output file, replacements, syntax trees, etc.
   bool print(size_t StateNumber, StringRef OutDir) const;
 
-  bool outputDiffersFromInput() const {
-    return InputBufferID != OutputBufferID;
+  bool noChangesOccurred() const {
+    return InputBufferID == OutputBufferID;
   }
 
   static RC<MigrationState>
diff --git a/include/swift/Migrator/Migrator.h b/include/swift/Migrator/Migrator.h
index 5f965b4..04a953d 100644
--- a/include/swift/Migrator/Migrator.h
+++ b/include/swift/Migrator/Migrator.h
@@ -27,17 +27,16 @@
 
 /// Run the migrator on the compiler invocation's input file and emit a
 /// "replacement map" describing the requested changes to the source file.
-bool updateCodeAndEmitRemap(CompilerInstance &Instance,
+bool updateCodeAndEmitRemap(CompilerInstance *Instance,
                             const CompilerInvocation &Invocation);
 
-class Migrator {
-  CompilerInstance &StartInstance;
+struct Migrator {
+  CompilerInstance *StartInstance;
   const CompilerInvocation &StartInvocation;
   SourceManager SrcMgr;
   std::vector<RC<MigrationState>> States;
 
-public:
-  Migrator(CompilerInstance &StartInstance,
+  Migrator(CompilerInstance *StartInstance,
            const CompilerInvocation &StartInvocation);
 
   /// The maximum number of times to run the compiler over the input to get
@@ -48,11 +47,21 @@
   /// Repeatedly perform a number of compiler-fix-it migrations in a row, until
   /// there are no new suggestions from the compiler or some other error
   /// occurred.
-  void repeatFixitMigrations(const unsigned Iterations);
+  ///
+  /// Returns the last CompilerInstance used in the iterations, provided
+  /// that the CompilerInvocation used to set it up was successful. Otherwise,
+  /// returns nullptr.
+  std::unique_ptr<swift::CompilerInstance>
+  repeatFixitMigrations(const unsigned Iterations,
+                        swift::version::Version SwiftLanguageVersion);
 
   /// Perform a single compiler fix-it migration on the last state, and push
   /// the result onto the state history.
-  llvm::Optional<RC<MigrationState>> performAFixItMigration();
+  ///
+  /// Returns the CompilerInstance used for the fix-it run, provided its
+  /// setup from a CompilerInvocation was successful.
+  std::unique_ptr<swift::CompilerInstance>
+  performAFixItMigration(swift::version::Version SwiftLanguageVersion);
 
   /// Starting with the last state, perform the following migration passes.
   ///
diff --git a/include/swift/Migrator/MigratorOptions.h b/include/swift/Migrator/MigratorOptions.h
index 01b9916..16a2cf9 100644
--- a/include/swift/Migrator/MigratorOptions.h
+++ b/include/swift/Migrator/MigratorOptions.h
@@ -44,7 +44,7 @@
   std::string DumpMigrationStatesDir = "";
 
   /// If non-empty, use the api change data serialized to this path.
-  std::string APIDigesterDataStorePath = "";
+  std::vector<std::string> APIDigesterDataStorePaths;
 
   bool shouldRunMigrator() const {
     return !(EmitRemapFilePath.empty() && EmitMigratedFilePath.empty() &&
diff --git a/include/swift/Migrator/SyntacticMigratorPass.h b/include/swift/Migrator/SyntacticMigratorPass.h
deleted file mode 100644
index 1d8c3d0..0000000
--- a/include/swift/Migrator/SyntacticMigratorPass.h
+++ /dev/null
@@ -1,42 +0,0 @@
-//===--- SyntacticMigratorPass.h --------------------------------*- C++ -*-===//
-//
-// This source file is part of the Swift.org open source project
-//
-// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
-// Licensed under Apache License v2.0 with Runtime Library Exception
-//
-// See https://swift.org/LICENSE.txt for license information
-// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
-//
-//===----------------------------------------------------------------------===//
-//
-// A base class for a syntactic migrator pass that uses the temporary
-// swift::migrator::EditorAdapter infrastructure.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef SWIFT_MIGRATOR_SYNTACTICMIGRATORPASS_H
-#define SWIFT_MIGRATOR_SYNTACTICMIGRATORPASS_H
-
-#include "swift/Migrator/EditorAdapter.h"
-
-namespace swift {
-class SourceManager;
-struct MigratorOptions;
-
-namespace migrator {
-class SyntacticMigratorPass {
-  struct Implementation;
-  Implementation &Impl;
-public:
-  SyntacticMigratorPass(EditorAdapter &Editor, SourceFile *SF,
-                        const MigratorOptions &Opts);
-  ~SyntacticMigratorPass();
-  void run();
-  const clang::edit::Commit &getEdits() const;
-};
-
-} // end namespace migrator
-} // end namespace swift
-
-#endif // SWIFT_MIGRATOR_SYNTACTICMIGRATORPASS_H
diff --git a/include/swift/Option/FrontendOptions.td b/include/swift/Option/FrontendOptions.td
index 6f02cd5..ae53d4a 100644
--- a/include/swift/Option/FrontendOptions.td
+++ b/include/swift/Option/FrontendOptions.td
@@ -270,9 +270,12 @@
   Flag<["-"], "enable-experimental-keypaths">,
   HelpText<"Enable experimental keypaths">;
 
-def enable_experimental_deserialization_recovery :
-  Flag<["-"], "enable-experimental-deserialization-recovery">,
+def enable_deserialization_recovery :
+  Flag<["-"], "enable-deserialization-recovery">,
   HelpText<"Attempt to recover from missing xrefs (etc) in swiftmodules">;
+def disable_deserialization_recovery :
+  Flag<["-"], "disable-deserialization-recovery">,
+  HelpText<"Don't attempt to recover from missing xrefs (etc) in swiftmodules">;
 
 def enable_cow_existentials : Flag<["-"], "enable-cow-existentials">,
   HelpText<"Enable the copy-on-write existential implementation">;
@@ -408,4 +411,9 @@
 def validate_tbd_against_ir: Flag<["-"], "validate-tbd-against-ir">,
     HelpText<"Compare the symbols in the IR against the TBD file that would be generated.">;
 
+// FIXME: Remove this flag when void subscripts are implemented.
+// This is used to guard preemptive testing for the fix-it.
+def fix_string_substring_conversion: Flag<["-"], "fix-string-substring-conversion">,
+    HelpText<"Emit a fix-it to append '[]' to String expressions when converting to Substring.">;
+
 } // end let Flags = [FrontendOption, NoDriverOption, HelpHidden]
diff --git a/include/swift/Parse/Confusables.def b/include/swift/Parse/Confusables.def
new file mode 100644
index 0000000..2423d87
--- /dev/null
+++ b/include/swift/Parse/Confusables.def
@@ -0,0 +1,127 @@
+//===--- Confusables.def - Confusable unicode characters ------------------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+
+// CONFUSABLE(CONFUSABLE_POINT, BASEPOINT)
+
+CONFUSABLE(0x2010, 0x2d)
+CONFUSABLE(0x2011, 0x2d)
+CONFUSABLE(0x2012, 0x2d)
+CONFUSABLE(0x2013, 0x2d)
+CONFUSABLE(0xfe58, 0x2d)
+CONFUSABLE(0x6d4, 0x2d)
+CONFUSABLE(0x2043, 0x2d)
+CONFUSABLE(0x2d7, 0x2d)
+CONFUSABLE(0x2212, 0x2d)
+CONFUSABLE(0x2796, 0x2d)
+CONFUSABLE(0x2cba, 0x2d)
+CONFUSABLE(0x60d, 0x2c)
+CONFUSABLE(0x66b, 0x2c)
+CONFUSABLE(0x201a, 0x2c)
+CONFUSABLE(0xb8, 0x2c)
+CONFUSABLE(0xa4f9, 0x2c)
+CONFUSABLE(0x903, 0x3a)
+CONFUSABLE(0xa83, 0x3a)
+CONFUSABLE(0xff1a, 0x3a)
+CONFUSABLE(0x589, 0x3a)
+CONFUSABLE(0x703, 0x3a)
+CONFUSABLE(0x704, 0x3a)
+CONFUSABLE(0x16ec, 0x3a)
+CONFUSABLE(0xfe30, 0x3a)
+CONFUSABLE(0x1803, 0x3a)
+CONFUSABLE(0x1809, 0x3a)
+CONFUSABLE(0x205a, 0x3a)
+CONFUSABLE(0x5c3, 0x3a)
+CONFUSABLE(0x2f8, 0x3a)
+CONFUSABLE(0xa789, 0x3a)
+CONFUSABLE(0x2236, 0x3a)
+CONFUSABLE(0x2d0, 0x3a)
+CONFUSABLE(0xa4fd, 0x3a)
+CONFUSABLE(0xff01, 0x21)
+CONFUSABLE(0x1c3, 0x21)
+CONFUSABLE(0x2d51, 0x21)
+CONFUSABLE(0x294, 0x3f)
+CONFUSABLE(0x241, 0x3f)
+CONFUSABLE(0x97d, 0x3f)
+CONFUSABLE(0x13ae, 0x3f)
+CONFUSABLE(0xa6eb, 0x3f)
+CONFUSABLE(0x1d16d, 0x2e)
+CONFUSABLE(0x2024, 0x2e)
+CONFUSABLE(0x701, 0x2e)
+CONFUSABLE(0x702, 0x2e)
+CONFUSABLE(0xa60e, 0x2e)
+CONFUSABLE(0x10a50, 0x2e)
+CONFUSABLE(0x660, 0x2e)
+CONFUSABLE(0x6f0, 0x2e)
+CONFUSABLE(0xa4f8, 0x2e)
+CONFUSABLE(0xff3b, 0x28)
+CONFUSABLE(0x2768, 0x28)
+CONFUSABLE(0x2772, 0x28)
+CONFUSABLE(0x3014, 0x28)
+CONFUSABLE(0xfd3e, 0x28)
+CONFUSABLE(0xff3d, 0x29)
+CONFUSABLE(0x2769, 0x29)
+CONFUSABLE(0x2773, 0x29)
+CONFUSABLE(0x3015, 0x29)
+CONFUSABLE(0xfd3f, 0x29)
+CONFUSABLE(0x2774, 0x7b)
+CONFUSABLE(0x1d114, 0x7b)
+CONFUSABLE(0x2775, 0x7d)
+CONFUSABLE(0x204e, 0x2a)
+CONFUSABLE(0x66d, 0x2a)
+CONFUSABLE(0x2217, 0x2a)
+CONFUSABLE(0x1031f, 0x2a)
+CONFUSABLE(0x1735, 0x2f)
+CONFUSABLE(0x2041, 0x2f)
+CONFUSABLE(0x2215, 0x2f)
+CONFUSABLE(0x2044, 0x2f)
+CONFUSABLE(0x2571, 0x2f)
+CONFUSABLE(0x27cb, 0x2f)
+CONFUSABLE(0x29f8, 0x2f)
+CONFUSABLE(0x1d23a, 0x2f)
+CONFUSABLE(0x31d3, 0x2f)
+CONFUSABLE(0x3033, 0x2f)
+CONFUSABLE(0x2cc6, 0x2f)
+CONFUSABLE(0x30ce, 0x2f)
+CONFUSABLE(0x4e3f, 0x2f)
+CONFUSABLE(0x2f03, 0x2f)
+CONFUSABLE(0xff3c, 0x5c)
+CONFUSABLE(0xfe68, 0x5c)
+CONFUSABLE(0x2216, 0x5c)
+CONFUSABLE(0x27cd, 0x5c)
+CONFUSABLE(0x29f5, 0x5c)
+CONFUSABLE(0x29f9, 0x5c)
+CONFUSABLE(0x1d20f, 0x5c)
+CONFUSABLE(0x1d23b, 0x5c)
+CONFUSABLE(0x31d4, 0x5c)
+CONFUSABLE(0x4e36, 0x5c)
+CONFUSABLE(0x2f02, 0x5c)
+CONFUSABLE(0xa778, 0x26)
+CONFUSABLE(0x16ed, 0x2b)
+CONFUSABLE(0x2795, 0x2b)
+CONFUSABLE(0x1029b, 0x2b)
+CONFUSABLE(0x2039, 0x3c)
+CONFUSABLE(0x276e, 0x3c)
+CONFUSABLE(0x2c2, 0x3c)
+CONFUSABLE(0x1d236, 0x3c)
+CONFUSABLE(0x1438, 0x3c)
+CONFUSABLE(0x16b2, 0x3c)
+CONFUSABLE(0x1400, 0x3d)
+CONFUSABLE(0x2e40, 0x3d)
+CONFUSABLE(0x30a0, 0x3d)
+CONFUSABLE(0xa4ff, 0x3d)
+CONFUSABLE(0x203a, 0x3e)
+CONFUSABLE(0x276f, 0x3e)
+CONFUSABLE(0x2c3, 0x3e)
+CONFUSABLE(0x1d237, 0x3e)
+CONFUSABLE(0x1433, 0x3e)
+
+#undef CONFUSABLE
diff --git a/include/swift/Parse/Confusables.h b/include/swift/Parse/Confusables.h
new file mode 100644
index 0000000..fe8f59c
--- /dev/null
+++ b/include/swift/Parse/Confusables.h
@@ -0,0 +1,27 @@
+//===--- Confusables.h - Swift Confusable Character Diagnostics -*- C++ -*-===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef SWIFT_CONFUSABLES_H
+#define SWIFT_CONFUSABLES_H
+
+#include <stdint.h>
+
+namespace swift {
+namespace confusable {
+  /// Given a UTF-8 codepoint, determines whether it appears on the Unicode
+  /// specification table of confusable characters and maps to punctuation,
+  /// and either returns either the expected ASCII character or 0.
+  char tryConvertConfusableCharacterToASCII(uint32_t codepoint);
+}
+}
+
+#endif
diff --git a/include/swift/Parse/Lexer.h b/include/swift/Parse/Lexer.h
index a56af66..4f42ed2 100644
--- a/include/swift/Parse/Lexer.h
+++ b/include/swift/Parse/Lexer.h
@@ -26,6 +26,11 @@
 #include "llvm/Support/SaveAndRestore.h"
 
 namespace swift {
+  /// Given a pointer to the starting byte of a UTF8 character, validate it and
+  /// advance the lexer past it.  This returns the encoded character or ~0U if
+  /// the encoding is invalid.
+  uint32_t validateUTF8CharacterAndAdvance(const char *&Ptr, const char *End);
+
   class DiagnosticEngine;
   class InFlightDiagnostic;
   class LangOptions;
diff --git a/include/swift/Parse/Parser.h b/include/swift/Parse/Parser.h
index 9f98da8..f281e7e 100644
--- a/include/swift/Parse/Parser.h
+++ b/include/swift/Parse/Parser.h
@@ -130,6 +130,9 @@
 
   bool InPoundLineEnvironment = false;
   bool InPoundIfEnvironment = false;
+  bool InSwiftKeyPath = false;
+  Expr* SwiftKeyPathRoot = nullptr;
+  SourceLoc SwiftKeyPathSlashLoc = SourceLoc();
 
   LocalContext *CurLocalContext = nullptr;
 
@@ -517,16 +520,16 @@
   /// Add a camel-cased option if it is different than the first option.
   void diagnoseConsecutiveIDs(StringRef First, SourceLoc FirstLoc,
                               StringRef DeclKindName);
-     
-  /// \brief Check whether the current token starts with '<'.
-  bool startsWithLess(Token Tok) {
-    return Tok.isAnyOperator() && Tok.getText()[0] == '<';
+
+  bool startsWithSymbol(Token Tok, char symbol) {
+    return (Tok.isAnyOperator() || Tok.isPunctuation()) &&
+           Tok.getText()[0] == symbol;
   }
+  /// \brief Check whether the current token starts with '<'.
+  bool startsWithLess(Token Tok) { return startsWithSymbol(Tok, '<'); }
 
   /// \brief Check whether the current token starts with '>'.
-  bool startsWithGreater(Token Tok) {
-    return Tok.isAnyOperator() && Tok.getText()[0] == '>';
-  }
+  bool startsWithGreater(Token Tok) { return startsWithSymbol(Tok, '>'); }
 
   /// \brief Consume the starting '<' of the current token, which may either
   /// be a complete '<' token or some kind of operator token starting with '<',
@@ -1141,6 +1144,10 @@
                                        bool isForConditionalDirective = false);
   ParserResult<Expr> parseExprSequenceElement(Diag<> ID,
                                               bool isExprBasic);
+  ParserResult<Expr> parseExprPostfixSuffix(ParserResult<Expr> inner,
+                                            bool isExprBasic,
+                                            bool periodHasKeyPathBehavior,
+                                            bool &hasBindOptional);
   ParserResult<Expr> parseExprPostfix(Diag<> ID, bool isExprBasic);
   ParserResult<Expr> parseExprUnary(Diag<> ID, bool isExprBasic);
   ParserResult<Expr> parseExprKeyPathObjC();
diff --git a/include/swift/Reflection/ReflectionContext.h b/include/swift/Reflection/ReflectionContext.h
index 931ffa1..33c0577 100644
--- a/include/swift/Reflection/ReflectionContext.h
+++ b/include/swift/Reflection/ReflectionContext.h
@@ -376,6 +376,11 @@
     // solve the problem.
     while (!CaptureTypes.empty()) {
       const TypeRef *OrigCaptureTR = CaptureTypes[0];
+
+      // If we failed to demangle the capture type, we cannot proceed.
+      if (OrigCaptureTR == nullptr)
+        return nullptr;
+
       const TypeRef *SubstCaptureTR = nullptr;
 
       // If we have enough substitutions to make this captured value's
diff --git a/include/swift/Reflection/TypeRef.h b/include/swift/Reflection/TypeRef.h
index 61ae16c..a2a5e5f 100644
--- a/include/swift/Reflection/TypeRef.h
+++ b/include/swift/Reflection/TypeRef.h
@@ -396,10 +396,6 @@
     FIND_OR_CREATE_TYPEREF(A, ProtocolTypeRef, MangledName);
   }
 
-  bool isAnyObject() const {
-    return MangledName == "s9AnyObject_p";
-  }
-
   bool isError() const {
     return MangledName == "s5Error_p";
   }
@@ -421,28 +417,39 @@
 };
 
 class ProtocolCompositionTypeRef final : public TypeRef {
-  std::vector<const TypeRef *> Protocols;
+  std::vector<const TypeRef *> Members;
+  bool HasExplicitAnyObject;
 
-  static TypeRefID Profile(const std::vector<const TypeRef *> &Protocols) {
+  static TypeRefID Profile(const std::vector<const TypeRef *> &Members,
+                           bool HasExplicitAnyObject) {
     TypeRefID ID;
-    for (auto Protocol : Protocols) {
-      ID.addPointer(Protocol);
+    ID.addInteger((uint32_t)HasExplicitAnyObject);
+    for (auto Member : Members) {
+      ID.addPointer(Member);
     }
     return ID;
   }
 
 public:
-  ProtocolCompositionTypeRef(std::vector<const TypeRef *> Protocols)
-    : TypeRef(TypeRefKind::ProtocolComposition), Protocols(Protocols) {}
+  ProtocolCompositionTypeRef(std::vector<const TypeRef *> Members,
+                            bool HasExplicitAnyObject)
+    : TypeRef(TypeRefKind::ProtocolComposition),
+      Members(Members), HasExplicitAnyObject(HasExplicitAnyObject) {}
 
   template <typename Allocator>
   static const ProtocolCompositionTypeRef *
-  create(Allocator &A, std::vector<const TypeRef *> Protocols) {
-    FIND_OR_CREATE_TYPEREF(A, ProtocolCompositionTypeRef, Protocols);\
+  create(Allocator &A, std::vector<const TypeRef *> Members,
+        bool HasExplicitAnyObject) {
+    FIND_OR_CREATE_TYPEREF(A, ProtocolCompositionTypeRef, Members,
+                           HasExplicitAnyObject);
   }
 
-  const std::vector<const TypeRef *> &getProtocols() const {
-    return Protocols;
+  const std::vector<const TypeRef *> &getMembers() const {
+    return Members;
+  }
+
+  bool hasExplicitAnyObject() const {
+    return HasExplicitAnyObject;
   }
 
   static bool classof(const TypeRef *TR) {
diff --git a/include/swift/Reflection/TypeRefBuilder.h b/include/swift/Reflection/TypeRefBuilder.h
index 7d0d9d6..aef4639 100644
--- a/include/swift/Reflection/TypeRefBuilder.h
+++ b/include/swift/Reflection/TypeRefBuilder.h
@@ -210,17 +210,22 @@
 
   const ProtocolTypeRef *createProtocolType(const std::string &mangledName,
                                             const std::string &moduleName,
+                                            const std::string &privateDiscriminator,
                                             const std::string &name) {
     return ProtocolTypeRef::create(*this, mangledName);
   }
 
   const ProtocolCompositionTypeRef *
-  createProtocolCompositionType(const std::vector<const TypeRef*> &protocols) {
-    for (auto protocol : protocols) {
-      if (!isa<ProtocolTypeRef>(protocol))
+  createProtocolCompositionType(const std::vector<const TypeRef*> &members,
+                                bool hasExplicitAnyObject) {
+    for (auto member : members) {
+      if (!isa<ProtocolTypeRef>(member) &&
+          !isa<NominalTypeRef>(member) &&
+          !isa<BoundGenericTypeRef>(member))
         return nullptr;
     }
-    return ProtocolCompositionTypeRef::create(*this, protocols);
+    return ProtocolCompositionTypeRef::create(*this, members,
+                                              hasExplicitAnyObject);
   }
 
   const ExistentialMetatypeTypeRef *
@@ -307,9 +312,6 @@
                     const TypeRef *Protocol);
 
   const TypeRef *
-  lookupSuperclass(const std::string &MangledTypeName);
-
-  const TypeRef *
   lookupSuperclass(const TypeRef *TR);
 
   /// Load unsubstituted field types for a nominal type.
diff --git a/include/swift/Remote/MetadataReader.h b/include/swift/Remote/MetadataReader.h
index bb868a5..396e964 100644
--- a/include/swift/Remote/MetadataReader.h
+++ b/include/swift/Remote/MetadataReader.h
@@ -133,12 +133,55 @@
       }
       if (protocols.size() == 1)
         return protocols.front();
-      else
-        return Builder.createProtocolCompositionType(protocols);
+      return Builder.createProtocolCompositionType(
+          protocols,
+          /*hasExplicitAnyObject=*/false);
+    }
+    case NodeKind::ProtocolListWithAnyObject: {
+      std::vector<BuiltType> protocols;
+      auto ProtocolList = Node->getChild(0);
+      auto TypeList = ProtocolList->getChild(0);
+      for (auto componentType : *TypeList) {
+        if (auto protocol = decodeMangledType(componentType))
+          protocols.push_back(protocol);
+        else
+          return BuiltType();
+      }
+      return Builder.createProtocolCompositionType(
+          protocols,
+          /*hasExplicitAnyObject=*/true);
+    }
+    case NodeKind::ProtocolListWithClass: {
+      std::vector<BuiltType> members;
+      auto ProtocolList = Node->getChild(0);
+      auto TypeList = ProtocolList->getChild(0);
+      for (auto componentType : *TypeList) {
+        if (auto protocol = decodeMangledType(componentType))
+          members.push_back(protocol);
+        else
+          return BuiltType();
+      }
+
+      auto SuperclassNode = Node->getChild(1);
+      if (auto superclass = decodeMangledType(SuperclassNode))
+        members.push_back(superclass);
+
+      return Builder.createProtocolCompositionType(
+          members,
+          /*hasExplicitAnyObject=*/true);
     }
     case NodeKind::Protocol: {
       auto moduleName = Node->getChild(0)->getText();
-      auto name = Node->getChild(1)->getText();
+      auto nameNode = Node->getChild(1);
+      std::string privateDiscriminator, name;
+      if (nameNode->getKind() == NodeKind::PrivateDeclName) {
+        privateDiscriminator = nameNode->getChild(0)->getText();
+        name = nameNode->getChild(1)->getText();
+      } else if (nameNode->getKind() == NodeKind::Identifier) {
+        name = Node->getChild(1)->getText();
+      } else {
+        return BuiltType();
+      }
 
       // Consistent handling of protocols and protocol compositions
       Demangle::Demangler Dem;
@@ -150,7 +193,8 @@
       protocolList->addChild(typeList, Dem);
 
       auto mangledName = Demangle::mangleNode(protocolList);
-      return Builder.createProtocolType(mangledName, moduleName, name);
+      return Builder.createProtocolType(mangledName, moduleName,
+                                        privateDiscriminator, name);
     }
     case NodeKind::DependentGenericParamType: {
       auto depth = Node->getChild(0)->getIndex();
@@ -724,7 +768,20 @@
     }
     case MetadataKind::Existential: {
       auto Exist = cast<TargetExistentialTypeMetadata<Runtime>>(Meta);
-      std::vector<BuiltType> Protocols;
+      std::vector<BuiltType> Members;
+      bool HasExplicitAnyObject = false;
+
+      if (Exist->Flags.hasSuperclassConstraint()) {
+        // The superclass is stored after the list of protocols.
+        auto SuperclassType = readTypeFromMetadata(
+          Exist->Protocols[Exist->Protocols.NumProtocols]);
+        if (!SuperclassType) return BuiltType();
+        Members.push_back(SuperclassType);
+      }
+
+      if (Exist->isClassBounded())
+        HasExplicitAnyObject = true;
+
       for (size_t i = 0; i < Exist->Protocols.NumProtocols; ++i) {
         auto ProtocolAddress = Exist->Protocols[i];
         auto ProtocolDescriptor = readProtocolDescriptor(ProtocolAddress);
@@ -741,9 +798,10 @@
         if (!Protocol)
           return BuiltType();
 
-        Protocols.push_back(Protocol);
+        Members.push_back(Protocol);
       }
-      auto BuiltExist = Builder.createProtocolCompositionType(Protocols);
+      auto BuiltExist = Builder.createProtocolCompositionType(
+        Members, HasExplicitAnyObject);
       TypeCache[MetadataAddress] = BuiltExist;
       return BuiltExist;
     }
@@ -1061,6 +1119,14 @@
       case MetadataKind::ErrorObject:
         return _readMetadata<TargetEnumMetadata>(address);
       case MetadataKind::Existential: {
+        StoredPointer flagsAddress = address +
+          sizeof(StoredPointer);
+
+        StoredPointer flags;
+        if (!Reader->readInteger(RemoteAddress(flagsAddress),
+                                 &flags))
+          return nullptr;
+
         StoredPointer numProtocolsAddress = address +
           TargetExistentialTypeMetadata<Runtime>::OffsetToNumProtocols;
         StoredPointer numProtocols;
@@ -1076,6 +1142,9 @@
           + numProtocols *
           sizeof(ConstTargetMetadataPointer<Runtime, TargetProtocolDescriptor>);
 
+        if (ExistentialTypeFlags(flags).hasSuperclassConstraint())
+          totalSize += sizeof(StoredPointer);
+
         return _readMetadata(address, totalSize);
       }
       case MetadataKind::ExistentialMetatype:
diff --git a/include/swift/Runtime/Exclusivity.h b/include/swift/Runtime/Exclusivity.h
index 70bb379..6b8ee3e 100644
--- a/include/swift/Runtime/Exclusivity.h
+++ b/include/swift/Runtime/Exclusivity.h
@@ -28,9 +28,13 @@
 ///
 /// The buffer is opaque scratch space that the runtime may use for
 /// the duration of the access.
+///
+/// The PC argument is an instruction pointer to associate with the start
+/// of the access.  If it is null, the return address of the call to
+/// swift_beginAccess will be used.
 SWIFT_RUNTIME_EXPORT
 void swift_beginAccess(void *pointer, ValueBuffer *buffer,
-                       ExclusivityFlags flags);
+                       ExclusivityFlags flags, void *pc);
 
 /// Stop dynamically tracking an access.
 SWIFT_RUNTIME_EXPORT
diff --git a/include/swift/Runtime/RuntimeFunctions.def b/include/swift/Runtime/RuntimeFunctions.def
index 835f131..bdfd1c1 100644
--- a/include/swift/Runtime/RuntimeFunctions.def
+++ b/include/swift/Runtime/RuntimeFunctions.def
@@ -61,7 +61,7 @@
          DefaultCC,
          RETURNS(RefCountedPtrTy, OpaquePtrTy),
          ARGS(OpaquePtrTy, TypeMetadataPtrTy, SizeTy),
-         ATTRS(NoUnwind, ZExt))
+         ATTRS(NoUnwind))
 
 FUNCTION(DeallocBox, swift_deallocBox, DefaultCC,
          RETURNS(VoidTy),
@@ -1092,7 +1092,7 @@
 // void swift_beginAccess(void *pointer, ValueBuffer *scratch, size_t flags);
 FUNCTION(BeginAccess, swift_beginAccess, DefaultCC,
          RETURNS(VoidTy),
-         ARGS(Int8PtrTy, getFixedBufferTy()->getPointerTo(), SizeTy),
+         ARGS(Int8PtrTy, getFixedBufferTy()->getPointerTo(), SizeTy, Int8PtrTy),
          ATTRS(NoUnwind))
 
 // void swift_endAccess(ValueBuffer *scratch);
@@ -1217,6 +1217,14 @@
          ARGS(Int8PtrTy, Int8PtrTy),
          ATTRS(NoUnwind))
 
+// func _registerClassNameForArchiving(_ nameOrNull: UnsafePointer<CChar>?,
+//                                     _ c: AnyClass)
+FUNCTION(RegisterClassNameForArchiving, swift_registerClassNameForArchiving,
+         SwiftCC,
+         RETURNS(VoidTy),
+         ARGS(Int8PtrTy, TypeMetadataPtrTy),
+         ATTRS(NoUnwind))
+
 #if SWIFT_OBJC_INTEROP || !defined(SWIFT_RUNTIME_GENERATE_GLOBAL_SYMBOLS)
 
 // Put here all definitions of runtime functions which are:
diff --git a/include/swift/SIL/PatternMatch.h b/include/swift/SIL/PatternMatch.h
index c070021..437c234 100644
--- a/include/swift/SIL/PatternMatch.h
+++ b/include/swift/SIL/PatternMatch.h
@@ -77,7 +77,7 @@
 
   template<typename ITy>
   bool match(ITy *V) {
-    if (Class *CV = dyn_cast<Class>(V)) {
+    if (auto *CV = dyn_cast<Class>(V)) {
       VR = CV;
       return true;
     }
diff --git a/include/swift/SIL/SILBuilder.h b/include/swift/SIL/SILBuilder.h
index fdc3fe2..f2c7455 100644
--- a/include/swift/SIL/SILBuilder.h
+++ b/include/swift/SIL/SILBuilder.h
@@ -316,11 +316,14 @@
         &F, OpenedArchetypes));
   }
 
-  ApplyInst *createApply(SILLocation Loc, SILValue Fn, SILType SubstFnTy,
-                         SILType Result, SubstitutionList Subs,
-                         ArrayRef<SILValue> Args, bool isNonThrowing) {
-    return insert(ApplyInst::create(getSILDebugLocation(Loc), Fn, SubstFnTy,
-                                    Result, Subs, Args, isNonThrowing, F,
+  ApplyInst *
+  createApply(SILLocation Loc, SILValue Fn, SubstitutionList Subs,
+              ArrayRef<SILValue> Args, bool isNonThrowing,
+              Optional<SILModuleConventions> ModuleConventions = None) {
+    return insert(ApplyInst::create(getSILDebugLocation(Loc), Fn,
+                                    Subs, Args, isNonThrowing,
+                                    ModuleConventions,
+                                    F,
                                     OpenedArchetypes));
   }
 
@@ -328,27 +331,25 @@
                          bool isNonThrowing) {
     SILFunctionConventions conventions(Fn->getType().castTo<SILFunctionType>(),
                                        getModule());
-    return createApply(Loc, Fn, Fn->getType(), conventions.getSILResultType(),
-                       SubstitutionList(), Args, isNonThrowing);
+    return createApply(Loc, Fn, SubstitutionList(), Args, isNonThrowing);
   }
 
-  TryApplyInst *createTryApply(SILLocation Loc, SILValue fn, SILType substFnTy,
-                               SubstitutionList subs,
-                               ArrayRef<SILValue> args, SILBasicBlock *normalBB,
+  TryApplyInst *createTryApply(SILLocation Loc, SILValue fn,
+                               SubstitutionList subs, ArrayRef<SILValue> args,
+                               SILBasicBlock *normalBB,
                                SILBasicBlock *errorBB) {
     return insertTerminator(TryApplyInst::create(getSILDebugLocation(Loc),
-                                                 fn, substFnTy, subs, args,
+                                                 fn, subs, args,
                                                  normalBB, errorBB, F,
                                                  OpenedArchetypes));
   }
 
   PartialApplyInst *createPartialApply(SILLocation Loc, SILValue Fn,
-                                       SILType SubstFnTy,
                                        SubstitutionList Subs,
                                        ArrayRef<SILValue> Args,
-                                       SILType ClosureTy) {
+                                       ParameterConvention CalleeConvention) {
     return insert(PartialApplyInst::create(getSILDebugLocation(Loc), Fn,
-                                           SubstFnTy, Subs, Args, ClosureTy, F,
+                                           Args, Subs, CalleeConvention, F,
                                            OpenedArchetypes));
   }
 
diff --git a/include/swift/SIL/SILCloner.h b/include/swift/SIL/SILCloner.h
index 9026e47..74a2460 100644
--- a/include/swift/SIL/SILCloner.h
+++ b/include/swift/SIL/SILCloner.h
@@ -118,10 +118,21 @@
   }
   
   SILType getTypeInClonedContext(SILType Ty) {
+    auto objectTy = Ty.getSwiftRValueType();
+    // Do not substitute opened existential types, if we do not have any.
+    if (!objectTy->hasOpenedExistential())
+      return Ty;
+    // Do not substitute opened existential types, if it is not required.
+    // This is often the case when cloning basic blocks inside the same
+    // function.
+    if (OpenedExistentialSubs.empty())
+      return Ty;
+
     // Substitute opened existential types, if we have any.
-    return SILType::getPrimitiveObjectType(
-      getASTTypeInClonedContext(Ty.getSwiftRValueType()))
-      .copyCategory(Ty);
+    return Ty.subst(
+      Builder.getModule(),
+      QueryTypeSubstitutionMapOrIdentity{OpenedExistentialSubs},
+      MakeAbstractConformanceForGenericType());
   }
   SILType getOpType(SILType Ty) {
     Ty = getTypeInClonedContext(Ty);
@@ -138,24 +149,10 @@
     if (OpenedExistentialSubs.empty())
       return ty->getCanonicalType();
 
-    return ty.transform(
-      [&](Type t) -> Type {
-        if (t->isOpenedExistential()) {
-          auto found = OpenedExistentialSubs.find(
-            t->castTo<ArchetypeType>());
-          // If an opened existential is supposed to be
-          // remapped, it is guaranteed by construction
-          // to be in the OpenedExistentialSubs, because
-          // a cloner always processes definitions of
-          // opened existentials before their uses and
-          // adds found opened existentials definitions
-          // to the map.
-          if (found != OpenedExistentialSubs.end())
-            return found->second;
-          return t;
-        }
-        return t;
-      })->getCanonicalType();
+    return ty.subst(
+      QueryTypeSubstitutionMapOrIdentity{OpenedExistentialSubs},
+      MakeAbstractConformanceForGenericType()
+    )->getCanonicalType();
   }
 
   CanType getOpASTType(CanType ty) {
@@ -352,7 +349,7 @@
   if (VI != ValueMap.end())
     return VI->second;
 
-  if (SILInstruction* I = dyn_cast<SILInstruction>(Value)) {
+  if (auto *I = dyn_cast<SILInstruction>(Value)) {
     auto II = InstructionMap.find(I);
     if (II != InstructionMap.end())
       return SILValue(II->second);
@@ -360,7 +357,7 @@
   }
 
   // If we have undef, just remap the type.
-  if (SILUndef *U = dyn_cast<SILUndef>(Value)) {
+  if (auto *U = dyn_cast<SILUndef>(Value)) {
     auto type = getOpType(U->getType());
     ValueBase *undef =
       (type == U->getType() ? U : SILUndef::get(type, Builder.getModule()));
@@ -575,8 +572,6 @@
   doPostProcess(Inst,
     getBuilder().createApply(getOpLocation(Inst->getLoc()),
                              getOpValue(Inst->getCallee()),
-                             getOpType(Inst->getSubstCalleeSILType()),
-                             getOpType(Inst->getType()),
                              getOpSubstitutions(Inst->getSubstitutions()),
                              Args,
                              Inst->isNonThrowing()));
@@ -590,7 +585,6 @@
   doPostProcess(Inst,
     getBuilder().createTryApply(getOpLocation(Inst->getLoc()),
                                 getOpValue(Inst->getCallee()),
-                                getOpType(Inst->getSubstCalleeSILType()),
                                 getOpSubstitutions(Inst->getSubstitutions()),
                                 Args,
                                 getOpBasicBlock(Inst->getNormalBB()),
@@ -603,12 +597,14 @@
   auto Args = getOpValueArray<8>(Inst->getArguments());
   getBuilder().setCurrentDebugScope(getOpScope(Inst->getDebugScope()));
   doPostProcess(Inst,
-    getBuilder().createPartialApply(getOpLocation(Inst->getLoc()),
-                                    getOpValue(Inst->getCallee()),
-                                    getOpType(Inst->getSubstCalleeSILType()),
-                                    getOpSubstitutions(Inst->getSubstitutions()),
-                                    Args,
-                                    getOpType(Inst->getType())));
+                getBuilder().createPartialApply(
+                    getOpLocation(Inst->getLoc()),
+                    getOpValue(Inst->getCallee()),
+                    getOpSubstitutions(Inst->getSubstitutions()), Args,
+                    Inst->getType()
+                        .getSwiftRValueType()
+                        ->getAs<SILFunctionType>()
+                        ->getCalleeConvention()));
 }
 
 template<typename ImplClass>
diff --git a/include/swift/SIL/SILDeclRef.h b/include/swift/SIL/SILDeclRef.h
index 35f77b9..4f95c8a 100644
--- a/include/swift/SIL/SILDeclRef.h
+++ b/include/swift/SIL/SILDeclRef.h
@@ -66,6 +66,8 @@
 /// True if the entry point is natively foreign.
 bool requiresForeignToNativeThunk(ValueDecl *vd);
 
+unsigned getNaturalUncurryLevel(ValueDecl *vd);
+
 enum ForDefinition_t : bool {
   NotForDefinition = false,
   ForDefinition = true
@@ -144,8 +146,6 @@
   Loc loc;
   /// The Kind of this SILDeclRef.
   Kind kind : 4;
-  /// The uncurry level of this SILDeclRef.
-  unsigned uncurryLevel : 8;
   /// The required resilience expansion of the declaration.
   unsigned Expansion : 1;
   /// True if the SILDeclRef is a curry thunk.
@@ -158,17 +158,8 @@
   /// The default argument index for a default argument getter.
   unsigned defaultArgIndex : 10;
   
-  /// A magic value for SILDeclRef constructors to ask for the natural uncurry
-  /// level of the constant.
-  enum : unsigned { ConstructAtNaturalUncurryLevel = ~0U };
-
-  /// A magic value for SILDeclRef constructors to ask for the best
-  /// available resilience expansion of the constant.
-  static constexpr ResilienceExpansion ConstructAtBestResilienceExpansion
-    = /*TODO*/ ResilienceExpansion::Minimal;
-  
   /// Produces a null SILDeclRef.
-  SILDeclRef() : loc(), kind(Kind::Func), uncurryLevel(0), Expansion(0),
+  SILDeclRef() : loc(), kind(Kind::Func), Expansion(0),
                  isCurried(0), isForeign(0), isDirectReference(0),
                  defaultArgIndex(0) {}
   
@@ -176,10 +167,10 @@
   explicit SILDeclRef(ValueDecl *decl, Kind kind,
                       ResilienceExpansion expansion
                         = ResilienceExpansion::Minimal,
-                      unsigned uncurryLevel = ConstructAtNaturalUncurryLevel,
+                      bool isCurried = false,
                       bool isForeign = false);
   
-  /// Produces the 'natural' SILDeclRef for the given ValueDecl or
+  /// Produces a SILDeclRef for the given ValueDecl or
   /// AbstractClosureExpr:
   /// - If 'loc' is a func or closure, this returns a Func SILDeclRef.
   /// - If 'loc' is a ConstructorDecl, this returns the Allocator SILDeclRef
@@ -190,13 +181,15 @@
   ///   for the containing ClassDecl.
   /// - If 'loc' is a global VarDecl, this returns its GlobalAccessor
   ///   SILDeclRef.
-  /// If the uncurry level is unspecified or specified as NaturalUncurryLevel,
-  /// then the SILDeclRef for the natural uncurry level of the definition is
-  /// used.
+  ///
+  /// If 'isCurried' is true, the loc must be a method or enum element;
+  /// the SILDeclRef will then refer to a curry thunk with type
+  /// (Self) -> (Args...) -> Result, rather than a direct reference to
+  /// the actual method whose lowered type is (Args..., Self) -> Result.
   explicit SILDeclRef(Loc loc,
                       ResilienceExpansion expansion
                         = ResilienceExpansion::Minimal,
-                      unsigned uncurryLevel = ConstructAtNaturalUncurryLevel,
+                      bool isCurried = false,
                       bool isForeign = false);
 
   /// Produce a SIL constant for a default argument generator.
@@ -261,7 +254,13 @@
   bool isStoredPropertyInitializer() const {
     return kind == Kind::StoredPropertyInitializer;
   }
-  
+
+  /// True if the SILDeclRef references the ivar initializer or deinitializer of
+  /// a class.
+  bool isIVarInitializerOrDestroyer() const {
+    return kind == Kind::IVarInitializer || kind == Kind::IVarDestroyer;
+  }
+
   /// \brief True if the function should be treated as transparent.
   bool isTransparent() const;
   /// \brief True if the function should have its body serialized.
@@ -284,7 +283,7 @@
   llvm::hash_code getHashCode() const {
     return llvm::hash_combine(loc.getOpaqueValue(),
                               static_cast<int>(kind),
-                              Expansion, uncurryLevel,
+                              Expansion, isCurried,
                               isForeign, isDirectReference,
                               defaultArgIndex);
   }
@@ -293,7 +292,7 @@
     return loc.getOpaqueValue() == rhs.loc.getOpaqueValue()
       && kind == rhs.kind
       && Expansion == rhs.Expansion
-      && uncurryLevel == rhs.uncurryLevel
+      && isCurried == rhs.isCurried
       && isForeign == rhs.isForeign
       && isDirectReference == rhs.isDirectReference
       && defaultArgIndex == rhs.defaultArgIndex;
@@ -305,26 +304,28 @@
   void print(llvm::raw_ostream &os) const;
   void dump() const;
 
+  unsigned getUncurryLevel() const;
+
   ResilienceExpansion getResilienceExpansion() const {
     return ResilienceExpansion(Expansion);
   }
   
   // Returns the SILDeclRef for an entity at a shallower uncurry level.
-  SILDeclRef atUncurryLevel(unsigned level) const {
-    assert(level <= uncurryLevel && "can't safely go to deeper uncurry level");
-    bool willBeCurried = isCurried || level < uncurryLevel;
+  SILDeclRef asCurried(bool curried = true) const {
+    assert(!isCurried && "can't safely go to deeper uncurry level");
     // Curry thunks are never foreign.
-    bool willBeForeign = isForeign && !willBeCurried;
+    bool willBeForeign = isForeign && !curried;
     bool willBeDirect = isDirectReference;
-    return SILDeclRef(loc.getOpaqueValue(), kind, Expansion, level,
-                      willBeCurried, willBeDirect, willBeForeign,
+    return SILDeclRef(loc.getOpaqueValue(), kind, Expansion,
+                      curried, willBeDirect, willBeForeign,
                       defaultArgIndex);
   }
   
   /// Returns the foreign (or native) entry point corresponding to the same
   /// decl.
   SILDeclRef asForeign(bool foreign = true) const {
-    return SILDeclRef(loc.getOpaqueValue(), kind, Expansion, uncurryLevel,
+    assert(!isCurried);
+    return SILDeclRef(loc.getOpaqueValue(), kind, Expansion,
                       isCurried, isDirectReference, foreign, defaultArgIndex);
   }
   
@@ -379,13 +380,13 @@
   explicit SILDeclRef(void *opaqueLoc,
                       Kind kind,
                       unsigned rawExpansion,
-                      unsigned uncurryLevel,
                       bool isCurried,
                       bool isDirectReference,
                       bool isForeign,
                       unsigned defaultArgIndex)
     : loc(Loc::getFromOpaqueValue(opaqueLoc)),
-      kind(kind), uncurryLevel(uncurryLevel), Expansion(rawExpansion),
+      kind(kind),
+      Expansion(rawExpansion),
       isCurried(isCurried),
       isForeign(isForeign), isDirectReference(isDirectReference),
       defaultArgIndex(defaultArgIndex)
@@ -413,18 +414,18 @@
 
   static SILDeclRef getEmptyKey() {
     return SILDeclRef(PointerInfo::getEmptyKey(), Kind::Func,
-                      0, 0, false, false, false, 0);
+                      0, false, false, false, 0);
   }
   static SILDeclRef getTombstoneKey() {
     return SILDeclRef(PointerInfo::getTombstoneKey(), Kind::Func,
-                      0, 0, false, false, false, 0);
+                      0, false, false, false, 0);
   }
   static unsigned getHashValue(swift::SILDeclRef Val) {
     unsigned h1 = PointerInfo::getHashValue(Val.loc.getOpaqueValue());
     unsigned h2 = UnsignedInfo::getHashValue(unsigned(Val.kind));
     unsigned h3 = (Val.kind == Kind::DefaultArgGenerator)
                     ? UnsignedInfo::getHashValue(Val.defaultArgIndex)
-                    : UnsignedInfo::getHashValue(Val.uncurryLevel);
+                    : UnsignedInfo::getHashValue(Val.isCurried);
     unsigned h4 = UnsignedInfo::getHashValue(Val.isForeign);
     unsigned h5 = UnsignedInfo::getHashValue(Val.isDirectReference);
     return h1 ^ (h2 << 4) ^ (h3 << 9) ^ (h4 << 7) ^ (h5 << 11);
diff --git a/include/swift/SIL/SILInstruction.h b/include/swift/SIL/SILInstruction.h
index 4d0cb28..9c1dba7 100644
--- a/include/swift/SIL/SILInstruction.h
+++ b/include/swift/SIL/SILInstruction.h
@@ -1298,9 +1298,9 @@
             bool isNonThrowing);
 
   static ApplyInst *create(SILDebugLocation DebugLoc, SILValue Callee,
-                           SILType SubstCalleeType, SILType ReturnType,
                            SubstitutionList Substitutions,
                            ArrayRef<SILValue> Args, bool isNonThrowing,
+                           Optional<SILModuleConventions> ModuleConventions,
                            SILFunction &F,
                            SILOpenedArchetypesState &OpenedArchetypes);
 
@@ -1330,9 +1330,9 @@
                    SILType ClosureType);
 
   static PartialApplyInst *create(SILDebugLocation DebugLoc, SILValue Callee,
-                                  SILType SubstCalleeType,
+                                  ArrayRef<SILValue> Args,
                                   SubstitutionList Substitutions,
-                                  ArrayRef<SILValue> Args, SILType ClosureType,
+                                  ParameterConvention CalleeConvention,
                                   SILFunction &F,
                                   SILOpenedArchetypesState &OpenedArchetypes);
 
@@ -1599,6 +1599,9 @@
                                    getter, setter, indices, ty);
   }
   
+  void incrementRefCounts() const;
+  void decrementRefCounts() const;
+  
   void Profile(llvm::FoldingSetNodeID &ID);
 };
 
@@ -1696,6 +1699,7 @@
   
 public:
   KeyPathPattern *getPattern() const;
+  bool hasPattern() const { return (bool)Pattern; }
 
   ArrayRef<Operand> getAllOperands() const {
     // TODO: Subscript keypaths will have operands.
@@ -1712,6 +1716,8 @@
     return V->getKind() == ValueKind::KeyPathInst;
   }
   
+  void dropReferencedPattern();
+  
   ~KeyPathInst();
 };
 
@@ -6230,7 +6236,6 @@
                SILBasicBlock *normalBB, SILBasicBlock *errorBB);
 
   static TryApplyInst *create(SILDebugLocation DebugLoc, SILValue callee,
-                              SILType substCalleeType,
                               SubstitutionList substitutions,
                               ArrayRef<SILValue> args, SILBasicBlock *normalBB,
                               SILBasicBlock *errorBB, SILFunction &F,
diff --git a/include/swift/SIL/SILModule.h b/include/swift/SIL/SILModule.h
index ad3da5a..638f599 100644
--- a/include/swift/SIL/SILModule.h
+++ b/include/swift/SIL/SILModule.h
@@ -191,7 +191,7 @@
   /// The callback used by the SILLoader.
   std::unique_ptr<SerializationCallback> Callback;
 
-  // Callbacks registered by the SIL optimizer to run on each deserializaed
+  // Callbacks registered by the SIL optimizer to run on each deserialized
   // function body. This is intentionally a stateless type because the
   // ModuleDecl and SILFunction should be sufficient context.
   typedef void (*SILFunctionBodyCallback)(ModuleDecl *, SILFunction *F);
diff --git a/include/swift/SIL/SILNodes.def b/include/swift/SIL/SILNodes.def
index ce18d25..67b13f7 100644
--- a/include/swift/SIL/SILNodes.def
+++ b/include/swift/SIL/SILNodes.def
@@ -251,7 +251,9 @@
   INST(InitBlockStorageHeaderInst, SILInstruction, init_block_storage_header, None, DoesNotRelease)
 
   // Key paths
-  INST(KeyPathInst, SILInstruction, keypath, None, DoesNotRelease)
+  // TODO: The only "side effect" is potentially retaining the returned key path
+  // object; is there a more specific effect?
+  INST(KeyPathInst, SILInstruction, keypath, MayHaveSideEffects, DoesNotRelease)
 
   // Conversions
   ABSTRACT_VALUE(ConversionInst, SILInstruction)
diff --git a/include/swift/SIL/SILVTableVisitor.h b/include/swift/SIL/SILVTableVisitor.h
index dcb6209..fd29b83 100644
--- a/include/swift/SIL/SILVTableVisitor.h
+++ b/include/swift/SIL/SILVTableVisitor.h
@@ -43,38 +43,33 @@
   void maybeAddMethod(FuncDecl *fd) {
     assert(!fd->hasClangNode());
 
-    // Observing accessors and addressors don't get vtable entries.
-    if (fd->isObservingAccessor() ||
-        fd->getAddressorKind() != AddressorKind::NotAddressor)
-      return;
-
-    maybeAddEntry(SILDeclRef(fd, SILDeclRef::Kind::Func));
+    maybeAddEntry(SILDeclRef(fd, SILDeclRef::Kind::Func),
+                  fd->needsNewVTableEntry());
   }
 
   void maybeAddConstructor(ConstructorDecl *cd) {
     assert(!cd->hasClangNode());
 
-    SILDeclRef initRef(cd, SILDeclRef::Kind::Initializer);
-
-    // Stub constructors don't get a vtable entry unless they were synthesized
-    // to override a base class initializer.
-    if (cd->hasStubImplementation() &&
-        !initRef.getNextOverriddenVTableEntry())
-      return;
-
     // Required constructors (or overrides thereof) have their allocating entry
     // point in the vtable.
-    if (cd->isRequired())
-      maybeAddEntry(SILDeclRef(cd, SILDeclRef::Kind::Allocator));
+    if (cd->isRequired()) {
+      bool needsAllocatingEntry = cd->needsNewVTableEntry();
+      if (!needsAllocatingEntry)
+        if (auto *baseCD = cd->getOverriddenDecl())
+          needsAllocatingEntry = !baseCD->isRequired();
+      maybeAddEntry(SILDeclRef(cd, SILDeclRef::Kind::Allocator),
+                    needsAllocatingEntry);
+    }
 
     // All constructors have their initializing constructor in the
     // vtable, which can be used by a convenience initializer.
-    maybeAddEntry(SILDeclRef(cd, SILDeclRef::Kind::Initializer));
+    maybeAddEntry(SILDeclRef(cd, SILDeclRef::Kind::Initializer),
+                  cd->needsNewVTableEntry());
   }
 
-  void maybeAddEntry(SILDeclRef declRef) {
+  void maybeAddEntry(SILDeclRef declRef, bool needsNewEntry) {
     // Introduce a new entry if required.
-    if (Types.requiresNewVTableEntry(declRef))
+    if (needsNewEntry)
       asDerived().addMethod(declRef);
 
     // Update any existing entries that it overrides.
@@ -99,6 +94,8 @@
         maybeAddMethod(fd);
       else if (auto *cd = dyn_cast<ConstructorDecl>(member))
         maybeAddConstructor(cd);
+      else if (auto *placeholder = dyn_cast<MissingMemberDecl>(member))
+        asDerived().addPlaceholder(placeholder);
     }
   }
 };
diff --git a/include/swift/SIL/SILWitnessVisitor.h b/include/swift/SIL/SILWitnessVisitor.h
index 5d3e9a9..0c86079 100644
--- a/include/swift/SIL/SILWitnessVisitor.h
+++ b/include/swift/SIL/SILWitnessVisitor.h
@@ -143,6 +143,10 @@
     asDerived().addMethod(func);
   }
 
+  void visitMissingMemberDecl(MissingMemberDecl *placeholder) {
+    asDerived().addPlaceholder(placeholder);
+  }
+
   void visitAssociatedTypeDecl(AssociatedTypeDecl *td) {
     // We already visited these in the first pass.
   }
diff --git a/include/swift/SIL/TypeLowering.h b/include/swift/SIL/TypeLowering.h
index ec319b4..ccd6d00 100644
--- a/include/swift/SIL/TypeLowering.h
+++ b/include/swift/SIL/TypeLowering.h
@@ -511,8 +511,6 @@
   
   llvm::DenseMap<OverrideKey, SILConstantInfo> ConstantOverrideTypes;
 
-  llvm::DenseMap<SILDeclRef, bool> RequiresVTableEntry;
-
   llvm::DenseMap<AnyFunctionRef, CaptureInfo> LoweredCaptures;
   
   CanAnyFunctionType makeConstantInterfaceType(SILDeclRef constant);
@@ -665,11 +663,6 @@
   /// `constant` must refer to a method.
   SILParameterInfo getConstantSelfParameter(SILDeclRef constant);
 
-  /// Return if this method introduces a new vtable entry. This will be true
-  /// if the method does not override any method of its base class, or if it
-  /// overrides a method but has a more general AST type.
-  bool requiresNewVTableEntry(SILDeclRef method);
-
   /// Return the most derived override which requires a new vtable entry.
   /// If the method does not override anything or no override is vtable
   /// dispatched, will return the least derived method.
@@ -852,8 +845,6 @@
   CanAnyFunctionType getBridgedFunctionType(AbstractionPattern fnPattern,
                                             CanAnyFunctionType fnType,
                                             AnyFunctionType::ExtInfo extInfo);
-
-  bool requiresNewVTableEntryUncached(SILDeclRef method);
 };
 
 inline const TypeLowering &
diff --git a/include/swift/SIL/TypeSubstCloner.h b/include/swift/SIL/TypeSubstCloner.h
index 2451f6f..a8a7908 100644
--- a/include/swift/SIL/TypeSubstCloner.h
+++ b/include/swift/SIL/TypeSubstCloner.h
@@ -47,6 +47,86 @@
     }
   }
 
+  // A helper class for cloning different kinds of apply instructions.
+  // Supports cloning of self-recursive functions.
+  class ApplySiteCloningHelper {
+    SILValue Callee;
+    SubstitutionList Subs;
+    SmallVector<SILValue, 8> Args;
+    SmallVector<Substitution, 8> NewSubsList;
+    SmallVector<Substitution, 8> RecursiveSubsList;
+
+  public:
+    ApplySiteCloningHelper(ApplySite AI, TypeSubstCloner &Cloner)
+        : Callee(Cloner.getOpValue(AI.getCallee())) {
+      SILType SubstCalleeSILType = Cloner.getOpType(AI.getSubstCalleeSILType());
+
+      Args = Cloner.template getOpValueArray<8>(AI.getArguments());
+      SILBuilder &Builder = Cloner.getBuilder();
+      Builder.setCurrentDebugScope(Cloner.super::getOpScope(AI.getDebugScope()));
+
+      // Remap substitutions.
+      NewSubsList = Cloner.getOpSubstitutions(AI.getSubstitutions());
+      Subs = NewSubsList;
+
+      if (!Cloner.Inlining) {
+        FunctionRefInst *FRI = dyn_cast<FunctionRefInst>(AI.getCallee());
+        if (FRI && FRI->getReferencedFunction() == AI.getFunction() &&
+            Subs == Cloner.ApplySubs) {
+          // Handle recursions by replacing the apply to the callee with an
+          // apply to the newly specialized function, but only if substitutions
+          // are the same.
+          auto LoweredFnTy = Builder.getFunction().getLoweredFunctionType();
+          auto RecursiveSubstCalleeSILType = LoweredFnTy;
+          auto GenSig = LoweredFnTy->getGenericSignature();
+          if (GenSig) {
+            // Compute substitutions for the specialized function. These
+            // substitutions may be different from the original ones, e.g.
+            // there can be less substitutions.
+            GenSig->getSubstitutions(AI.getFunction()
+                                         ->getLoweredFunctionType()
+                                         ->getGenericSignature()
+                                         ->getSubstitutionMap(Subs),
+                                     RecursiveSubsList);
+            // Use the new set of substitutions to compute the new
+            // substituted callee type.
+            RecursiveSubstCalleeSILType = LoweredFnTy->substGenericArgs(
+                AI.getModule(), RecursiveSubsList);
+          }
+
+          // The specialized recursive function may have different calling
+          // convention for parameters. E.g. some of former indirect parameters
+          // may become direct. Some of indirect return values may become
+          // direct. Do not replace the callee in that case.
+          if (SubstCalleeSILType.getSwiftRValueType() ==
+              RecursiveSubstCalleeSILType) {
+            Subs = RecursiveSubsList;
+            Callee = Builder.createFunctionRef(
+                Cloner.getOpLocation(AI.getLoc()), &Builder.getFunction());
+            SubstCalleeSILType =
+                SILType::getPrimitiveObjectType(RecursiveSubstCalleeSILType);
+          }
+        }
+      }
+
+      assert(Subs.empty() ||
+             SubstCalleeSILType ==
+                 Callee->getType().substGenericArgs(AI.getModule(), Subs));
+    }
+
+    ArrayRef<SILValue> getArguments() const {
+      return Args;
+    }
+
+    SILValue getCallee() const {
+      return Callee;
+    }
+
+    SubstitutionList getSubstitutions() const {
+      return Subs;
+    }
+  };
+
 public:
   using SILClonerWithScopes<ImplClass>::asImpl;
   using SILClonerWithScopes<ImplClass>::getBuilder;
@@ -105,83 +185,32 @@
   }
 
   void visitApplyInst(ApplyInst *Inst) {
-    auto Args = this->template getOpValueArray<8>(Inst->getArguments());
+    ApplySiteCloningHelper Helper(ApplySite::isa(Inst), *this);
+    ApplyInst *N =
+        getBuilder().createApply(getOpLocation(Inst->getLoc()),
+                                 Helper.getCallee(), Helper.getSubstitutions(),
+                                 Helper.getArguments(), Inst->isNonThrowing());
+    doPostProcess(Inst, N);
+  }
 
-    // Handle recursions by replacing the apply to the callee with an apply to
-    // the newly specialized function, but only if substitutions are the same.
-    SILBuilder &Builder = getBuilder();
-    Builder.setCurrentDebugScope(super::getOpScope(Inst->getDebugScope()));
-    SILValue CalleeVal = Inst->getCallee();
-    if (!Inlining) {
-      FunctionRefInst *FRI = dyn_cast<FunctionRefInst>(CalleeVal);
-      if (FRI && FRI->getReferencedFunction() == Inst->getFunction() &&
-          Inst->getSubstitutions() == this->ApplySubs) {
-        FRI = Builder.createFunctionRef(getOpLocation(Inst->getLoc()),
-                                        &Builder.getFunction());
-        ApplyInst *NAI =
-          Builder.createApply(getOpLocation(Inst->getLoc()), FRI, Args, Inst->isNonThrowing());
-        doPostProcess(Inst, NAI);
-        return;
-      }
-    }
-
-    SmallVector<Substitution, 16> TempSubstList;
-    for (auto &Sub : Inst->getSubstitutions()) {
-      TempSubstList.push_back(asImpl().getOpSubstitution(Sub));
-    }
-
-    ApplyInst *N = Builder.createApply(
-      getOpLocation(Inst->getLoc()), getOpValue(CalleeVal),
-        getOpType(Inst->getSubstCalleeSILType()), getOpType(Inst->getType()),
-        TempSubstList, Args, Inst->isNonThrowing());
+  void visitTryApplyInst(TryApplyInst *Inst) {
+    ApplySiteCloningHelper Helper(ApplySite::isa(Inst), *this);
+    TryApplyInst *N = getBuilder().createTryApply(
+        getOpLocation(Inst->getLoc()), Helper.getCallee(),
+        Helper.getSubstitutions(), Helper.getArguments(),
+        getOpBasicBlock(Inst->getNormalBB()),
+        getOpBasicBlock(Inst->getErrorBB()));
     doPostProcess(Inst, N);
   }
 
   void visitPartialApplyInst(PartialApplyInst *Inst) {
-    auto Args = this->template getOpValueArray<8>(Inst->getArguments());
-
-    // Handle recursions by replacing the apply to the callee with an apply to
-    // the newly specialized function.
-    SILValue CalleeVal = Inst->getCallee();
-    SILBuilderWithPostProcess<TypeSubstCloner, 4> Builder(this, Inst);
-    Builder.setCurrentDebugScope(super::getOpScope(Inst->getDebugScope()));
-    SmallVector<Substitution, 16> TempSubstList;
-    if (!Inlining) {
-      FunctionRefInst *FRI = dyn_cast<FunctionRefInst>(CalleeVal);
-      if (FRI && FRI->getReferencedFunction() == Inst->getFunction()) {
-        auto LoweredFnTy = Builder.getFunction().getLoweredFunctionType();
-        auto GenSig = LoweredFnTy->getGenericSignature();
-        if (GenSig) {
-          GenSig->getSubstitutions(
-              Inst->getFunction()
-                  ->getLoweredFunctionType()
-                  ->getGenericSignature()
-                  ->getSubstitutionMap(Inst->getSubstitutions()),
-              TempSubstList);
-        }
-        for (auto &Sub : TempSubstList) {
-          Sub = asImpl().getOpSubstitution(Sub);
-        }
-        SubstitutionList Subs = TempSubstList;
-        FRI = Builder.createFunctionRef(getOpLocation(Inst->getLoc()),
-                                        &Builder.getFunction());
-        Builder.createPartialApply(getOpLocation(Inst->getLoc()), FRI,
-                                   getOpType(Inst->getSubstCalleeSILType()),
-                                   Subs,
-                                   Args,
-                                   getOpType(Inst->getType()));
-        return;
-      }
-    }
-
-    for (auto &Sub : Inst->getSubstitutions()) {
-      TempSubstList.push_back(asImpl().getOpSubstitution(Sub));
-    }
-
-    Builder.createPartialApply(
-      getOpLocation(Inst->getLoc()), getOpValue(CalleeVal),
-        getOpType(Inst->getSubstCalleeSILType()), TempSubstList, Args,
-        getOpType(Inst->getType()));
+    ApplySiteCloningHelper Helper(ApplySite::isa(Inst), *this);
+    auto ParamConvention =
+        Inst->getType().getAs<SILFunctionType>()->getCalleeConvention();
+    PartialApplyInst *N = getBuilder().createPartialApply(
+        getOpLocation(Inst->getLoc()), Helper.getCallee(),
+        Helper.getSubstitutions(), Helper.getArguments(), ParamConvention);
+    doPostProcess(Inst, N);
   }
 
   /// Attempt to simplify a conditional checked cast.
diff --git a/include/swift/SILOptimizer/Analysis/EpilogueARCAnalysis.h b/include/swift/SILOptimizer/Analysis/EpilogueARCAnalysis.h
index 266c3e6..3399db3 100644
--- a/include/swift/SILOptimizer/Analysis/EpilogueARCAnalysis.h
+++ b/include/swift/SILOptimizer/Analysis/EpilogueARCAnalysis.h
@@ -161,7 +161,7 @@
       return true;
     // Handle self-recursion. A self-recursion can be considered a +1 on the
     // current argument.
-    if (ApplyInst *AI = dyn_cast<ApplyInst>(II))
+    if (auto *AI = dyn_cast<ApplyInst>(II))
      if (AI->getCalleeFunction() == II->getParent()->getParent())
        return true;
     return false;
@@ -192,7 +192,7 @@
     // We are checking for retain. If this is a self-recursion. call
     // to the function (which returns an owned value) can be treated as
     // the retain instruction.
-    if (ApplyInst *AI = dyn_cast<ApplyInst>(II))
+    if (auto *AI = dyn_cast<ApplyInst>(II))
      if (AI->getCalleeFunction() == II->getParent()->getParent())
        return true;
     // Check whether this is a retain instruction and the argument it
diff --git a/include/swift/SILOptimizer/PassManager/PassManager.h b/include/swift/SILOptimizer/PassManager/PassManager.h
index bf73059..5a09d81 100644
--- a/include/swift/SILOptimizer/PassManager/PassManager.h
+++ b/include/swift/SILOptimizer/PassManager/PassManager.h
@@ -118,7 +118,7 @@
   template<typename T>
   T *getAnalysis() {
     for (SILAnalysis *A : Analysis)
-      if (T *R = llvm::dyn_cast<T>(A))
+      if (auto *R = llvm::dyn_cast<T>(A))
         return R;
 
     llvm_unreachable("Unable to find analysis for requested type.");
diff --git a/include/swift/SILOptimizer/PassManager/Passes.def b/include/swift/SILOptimizer/PassManager/Passes.def
index 8cba233..17e23ae 100644
--- a/include/swift/SILOptimizer/PassManager/Passes.def
+++ b/include/swift/SILOptimizer/PassManager/Passes.def
@@ -222,8 +222,6 @@
      "SIL release Hoisting")
 PASS(LateReleaseHoisting, "late-release-hoisting",
      "Late SIL release Hoisting Preserving Epilogues")
-IRGEN_PASS(LoadableByAddress, "loadable-address",
-           "SIL Loadable type by-address lowering.")
 PASS(RemovePins, "remove-pins",
      "Remove SIL pin/unpin pairs")
 PASS(SideEffectsDumper, "side-effects-dump",
diff --git a/include/swift/Serialization/ModuleFile.h b/include/swift/Serialization/ModuleFile.h
index 429aec1..6c4c320 100644
--- a/include/swift/Serialization/ModuleFile.h
+++ b/include/swift/Serialization/ModuleFile.h
@@ -73,7 +73,7 @@
   StringRef TargetTriple;
 
   /// The Swift compatibility version in use when this module was built.
-  StringRef CompatibilityVersion;
+  version::Version CompatibilityVersion;
 
   /// The data blob containing all of the module's identifiers.
   StringRef IdentifierData;
diff --git a/include/swift/Serialization/ModuleFormat.h b/include/swift/Serialization/ModuleFormat.h
index b952088..cbb353e 100644
--- a/include/swift/Serialization/ModuleFormat.h
+++ b/include/swift/Serialization/ModuleFormat.h
@@ -54,7 +54,7 @@
 /// in source control, you should also update the comment to briefly
 /// describe what change you made. The content of this comment isn't important;
 /// it just ensures a conflict if two people change the module format.
-const uint16_t VERSION_MINOR = 341; // Last change: retain/release addr
+const uint16_t VERSION_MINOR = 344; // Last change: ctor newly required flag
 
 using DeclID = PointerEmbeddedInt<unsigned, 31>;
 using DeclIDField = BCFixed<31>;
@@ -858,6 +858,8 @@
     TypeIDField, // canonical interface type
     DeclIDField, // overridden decl
     AccessibilityKindField, // accessibility
+    BCFixed<1>,   // requires a new vtable slot
+    BCFixed<1>,   // 'required' but overridden is not (used for recovery)
     BCArray<IdentifierIDField> // argument names
     // Trailed by its generic parameters, if any, followed by the parameter
     // patterns.
@@ -916,6 +918,7 @@
     BCFixed<1>,   // name is compound?
     AddressorKindField, // addressor kind
     AccessibilityKindField, // accessibility
+    BCFixed<1>,   // requires a new vtable slot
     BCArray<IdentifierIDField> // name components
     // The record is trailed by:
     // - its _silgen_name, if any
@@ -1314,6 +1317,8 @@
   using SynthesizedProtocolDeclAttrLayout
     = BCRecordLayout<SynthesizedProtocol_DECL_ATTR>;
   using ImplementsDeclAttrLayout = BCRecordLayout<Implements_DECL_ATTR>;
+  using NSKeyedArchiveLegacyDeclAttrLayout
+    = BCRecordLayout<NSKeyedArchiveLegacy_DECL_ATTR>;
 
   using InlineDeclAttrLayout = BCRecordLayout<
     Inline_DECL_ATTR,
diff --git a/include/swift/Serialization/SerializedModuleLoader.h b/include/swift/Serialization/SerializedModuleLoader.h
index 40a106d..93be552 100644
--- a/include/swift/Serialization/SerializedModuleLoader.h
+++ b/include/swift/Serialization/SerializedModuleLoader.h
@@ -120,6 +120,10 @@
 public:
   bool isSIB() const { return IsSIB; }
 
+  /// Returns the language version that was used to compile the contents of this
+  /// file.
+  const version::Version &getLanguageVersionBuiltWith() const;
+
   virtual bool isSystemModule() const override;
 
   virtual void lookupValue(ModuleDecl::AccessPathTy accessPath,
diff --git a/include/swift/Serialization/Validation.h b/include/swift/Serialization/Validation.h
index 76b279b..dbd86e1 100644
--- a/include/swift/Serialization/Validation.h
+++ b/include/swift/Serialization/Validation.h
@@ -71,7 +71,7 @@
   StringRef name = {};
   StringRef targetTriple = {};
   StringRef shortVersion = {};
-  StringRef compatibilityVersion = {};
+  version::Version compatibilityVersion = {};
   size_t bytes = 0;
   Status status = Status::Malformed;
 };
diff --git a/include/swift/Strings.h b/include/swift/Strings.h
index 7a501d5..010324c 100644
--- a/include/swift/Strings.h
+++ b/include/swift/Strings.h
@@ -39,9 +39,9 @@
   static const char LLDB_EXPRESSIONS_MODULE_NAME_PREFIX[] = "__lldb_expr_";
 
   /// The name of the fake module used to hold imported Objective-C things.
-  static const char MANGLING_MODULE_OBJC[] = "__C";
-  /// The name of the fake module used to hold synthesized ClangImporter things.
-  static const char MANGLING_MODULE_CLANG_IMPORTER[] = "__C_Synthesized";
+  static const char MANGLING_MODULE_OBJC[] = "__ObjC";
+  /// The name of the fake module used to hold imported C things.
+  static const char MANGLING_MODULE_C[] = "__C";
 } // end namespace swift
 
 #endif // SWIFT_STRINGS_H
diff --git a/include/swift/Syntax/TokenKinds.def b/include/swift/Syntax/TokenKinds.def
index d934ad0..b46d3c7 100644
--- a/include/swift/Syntax/TokenKinds.def
+++ b/include/swift/Syntax/TokenKinds.def
@@ -174,6 +174,8 @@
 
 PUNCTUATOR(backtick,      "`")
 
+PUNCTUATOR(backslash, "\\")
+
 PUNCTUATOR(exclaim_postfix, "!") // if left-bound
 
 PUNCTUATOR(question_postfix, "?") // if left-bound
@@ -193,7 +195,6 @@
 POUND_KEYWORD(elseif)
 POUND_KEYWORD(endif)
 POUND_KEYWORD(keyPath)
-POUND_KEYWORD(keyPath2) // TODO
 POUND_KEYWORD(line)
 POUND_KEYWORD(sourceLocation)
 POUND_KEYWORD(selector)
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 70947e5..d266bd0 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -641,7 +641,7 @@
   if (results.size() != 1) return nullptr;
 
   // The property must have type T.
-  VarDecl *property = dyn_cast<VarDecl>(results[0]);
+  auto *property = dyn_cast<VarDecl>(results[0]);
   if (!property) return nullptr;
   if (!property->getInterfaceType()->isEqual(sig->getGenericParams()[0]))
     return nullptr;
@@ -682,18 +682,6 @@
     return Impl.AnyObjectType;
   }
 
-  // Go find 'AnyObject' in the Swift module.
-  //
-  // FIXME: This is going away.
-  SmallVector<ValueDecl *, 1> results;
-  lookupInSwiftModule("AnyObject", results);
-  for (auto result : results) {
-    if (auto proto = dyn_cast<ProtocolDecl>(result)) {
-      Impl.AnyObjectType = proto->getDeclaredType()->getCanonicalType();
-      return Impl.AnyObjectType;
-    }
-  }
-
   Impl.AnyObjectType = CanType(
     ProtocolCompositionType::get(
       *this, {}, /*HasExplicitAnyObject=*/true));
@@ -773,23 +761,26 @@
   // Find all of the declarations with this name in the appropriate module.
   SmallVector<ValueDecl *, 1> results;
 
-  // _BridgedNSError, _BridgedStoredNSError, and _ErrorCodeProtocol
-  // are in the Foundation module.
-  if (kind == KnownProtocolKind::BridgedNSError ||
-      kind == KnownProtocolKind::BridgedStoredNSError ||
-      kind == KnownProtocolKind::ErrorCodeProtocol) {
-    ModuleDecl *foundation =
-        const_cast<ASTContext *>(this)->getLoadedModule(Id_Foundation);
-    if (!foundation)
-      return nullptr;
-
-    auto identifier = getIdentifier(getProtocolName(kind));
-    foundation->lookupValue({ }, identifier, NLKind::UnqualifiedLookup,
-                            results);
-  } else {
-    lookupInSwiftModule(getProtocolName(kind), results);
+  const ModuleDecl *M;
+  switch (kind) {
+  case KnownProtocolKind::BridgedNSError:
+  case KnownProtocolKind::BridgedStoredNSError:
+  case KnownProtocolKind::ErrorCodeProtocol:
+    M = getLoadedModule(Id_Foundation);
+    break;
+  case KnownProtocolKind::CFObject:
+    M = getLoadedModule(Id_CoreFoundation);
+    break;
+  default:
+    M = getStdlibModule();
+    break;
   }
 
+  if (!M)
+    return nullptr;
+  M->lookupValue({ }, getIdentifier(getProtocolName(kind)),
+                 NLKind::UnqualifiedLookup, results);
+
   for (auto result : results) {
     if (auto protocol = dyn_cast<ProtocolDecl>(result)) {
       Impl.KnownProtocols[index] = protocol;
@@ -885,7 +876,7 @@
   // Find the overload for Int.
   for (ValueDecl *vd : equalFuncs) {
     // All "==" decls should be functions, but who knows...
-    FuncDecl *funcDecl = dyn_cast<FuncDecl>(vd);
+    auto *funcDecl = dyn_cast<FuncDecl>(vd);
     if (!funcDecl)
       continue;
 
diff --git a/lib/AST/ASTDumper.cpp b/lib/AST/ASTDumper.cpp
index bddd44e..b747976 100644
--- a/lib/AST/ASTDumper.cpp
+++ b/lib/AST/ASTDumper.cpp
@@ -699,9 +699,9 @@
 
       OS << ' ';
       printDeclName(VD);
-      if (AbstractFunctionDecl *AFD = dyn_cast<AbstractFunctionDecl>(VD))
+      if (auto *AFD = dyn_cast<AbstractFunctionDecl>(VD))
         printGenericParameters(OS, AFD->getGenericParams());
-      if (GenericTypeDecl *GTD = dyn_cast<GenericTypeDecl>(VD))
+      if (auto *GTD = dyn_cast<GenericTypeDecl>(VD))
         printGenericParameters(OS, GTD->getGenericParams());
 
       if (auto *var = dyn_cast<VarDecl>(VD)) {
@@ -855,6 +855,8 @@
 
     void visitClassDecl(ClassDecl *CD) {
       printCommon(CD, "class_decl");
+      if (CD->getAttrs().hasAttribute<StaticInitializeObjCMetadataAttr>())
+        OS << " @_staticInitializeObjCMetadata";
       printInherited(CD->getInherited());
       for (Decl *D : CD->getMembers()) {
         OS << '\n';
@@ -996,15 +998,6 @@
         OS << "_for=" << ASD->getFullName();
       }
 
-      for (auto VD: FD->getSatisfiedProtocolRequirements()) {
-        OS << '\n';
-        OS.indent(Indent+2);
-        PrintWithColorRAII(OS, ParenthesisColor) << '(';
-        OS << "conformance ";
-        VD->dumpRef(OS);
-        PrintWithColorRAII(OS, ParenthesisColor) << ')';
-      }
-
       printAbstractFunctionDecl(FD);
 
       PrintWithColorRAII(OS, ParenthesisColor) << ')';
@@ -1117,6 +1110,13 @@
       printCommon(MD, "module");
       PrintWithColorRAII(OS, ParenthesisColor) << ')';
     }
+
+    void visitMissingMemberDecl(MissingMemberDecl *MMD) {
+      printCommon(MMD, "missing_member_decl ");
+      PrintWithColorRAII(OS, IdentifierColor)
+          << '\"' << MMD->getFullName() << '\"';
+      PrintWithColorRAII(OS, ParenthesisColor) << ')';
+    }
   };
 } // end anonymous namespace
 
@@ -1363,9 +1363,9 @@
     PrintWithColorRAII(OS, ASTNodeColor) << Name;
     for (auto Elt : Elements) {
       OS << '\n';
-      if (Expr *SubExpr = Elt.dyn_cast<Expr*>())
+      if (auto *SubExpr = Elt.dyn_cast<Expr*>())
         printRec(SubExpr);
-      else if (Stmt *SubStmt = Elt.dyn_cast<Stmt*>())
+      else if (auto *SubStmt = Elt.dyn_cast<Stmt*>())
         printRec(SubStmt);
       else
         printRec(Elt.get<Decl*>());
@@ -2467,6 +2467,25 @@
       OS << '\n';
       printRec(stringLiteral);
     }
+    if (!E->isObjC()) {
+      OS << "\n";
+      if (auto root = E->getParsedRoot()) {
+        printRec(root);
+      } else {
+        OS.indent(Indent + 2) << "<<null>>";
+      }
+      OS << "\n";
+      if (auto path = E->getParsedPath()) {
+        printRec(path);
+      } else {
+        OS.indent(Indent + 2) << "<<null>>";
+      }
+    }
+    OS << ")";
+  }
+
+  void visitKeyPathDotExpr(KeyPathDotExpr *E) {
+    printCommon(E, "key_path_dot_expr");
     OS << ")";
   }
 };
diff --git a/lib/AST/ASTMangler.cpp b/lib/AST/ASTMangler.cpp
index a3d71f2..7f72a0a 100644
--- a/lib/AST/ASTMangler.cpp
+++ b/lib/AST/ASTMangler.cpp
@@ -24,6 +24,7 @@
 #include "swift/AST/ParameterList.h"
 #include "swift/AST/ProtocolConformance.h"
 #include "swift/Demangling/ManglingUtils.h"
+#include "swift/Demangling/Demangler.h"
 #include "swift/Strings.h"
 #include "clang/Basic/CharInfo.h"
 #include "clang/AST/Attr.h"
@@ -301,12 +302,18 @@
   return finalize();
 }
 
+#ifdef USE_NEW_MANGLING_FOR_OBJC_RUNTIME_NAMES
 static bool isPrivate(const NominalTypeDecl *Nominal) {
   return Nominal->hasAccessibility() &&
          Nominal->getFormalAccess() <= Accessibility::FilePrivate;
 }
+#endif
 
 std::string ASTMangler::mangleObjCRuntimeName(const NominalTypeDecl *Nominal) {
+#ifdef USE_NEW_MANGLING_FOR_OBJC_RUNTIME_NAMES
+  // Using the new mangling for ObjC runtime names (except for top-level
+  // classes). This is currently disabled to support old archives.
+  // TODO: re-enable this as we switch to the new mangling for ObjC names.
   DeclContext *Ctx = Nominal->getDeclContext();
 
   if (Ctx->isModuleScopeContext() && !isPrivate(Nominal)) {
@@ -338,6 +345,34 @@
   beginMangling();
   appendAnyGenericType(Nominal);
   return finalize();
+#else
+  // Use the old mangling for ObjC runtime names.
+  beginMangling();
+  appendAnyGenericType(Nominal);
+  std::string NewName = finalize();
+  Demangle::Demangler Dem;
+  Demangle::Node *Root = Dem.demangleSymbol(NewName);
+  assert(Root->getKind() == Node::Kind::Global);
+  Node *NomTy = Root->getFirstChild();
+  if (NomTy->getKind() == Node::Kind::Protocol) {
+    // Protocols are actually mangled as protocol lists.
+    Node *PTy = Dem.createNode(Node::Kind::Type);
+    PTy->addChild(NomTy, Dem);
+    Node *TList = Dem.createNode(Node::Kind::TypeList);
+    TList->addChild(PTy, Dem);
+    NomTy = Dem.createNode(Node::Kind::ProtocolList);
+    NomTy->addChild(TList, Dem);
+  }
+  // Add a TypeMangling node at the top
+  Node *Ty = Dem.createNode(Node::Kind::Type);
+  Ty->addChild(NomTy, Dem);
+  Node *TyMangling = Dem.createNode(Node::Kind::TypeMangling);
+  TyMangling->addChild(Ty, Dem);
+  Node *NewGlobal = Dem.createNode(Node::Kind::Global);
+  NewGlobal->addChild(TyMangling, Dem);
+  std::string OldName = mangleNodeOld(NewGlobal);
+  return OldName;
+#endif
 }
 
 std::string ASTMangler::mangleTypeAsContextUSR(const NominalTypeDecl *type) {
@@ -1038,21 +1073,28 @@
 /// Mangle the context of the given declaration as a <context.
 /// This is the top-level entrypoint for mangling <context>.
 void ASTMangler::appendContextOf(const ValueDecl *decl) {
-  // Declarations provided by a C module have a special context
+  auto clangDecl = decl->getClangDecl();
+
+  // Classes and protocols implemented in Objective-C have a special context
   // mangling.
   //   known-context ::= 'So'
-  //
-  // Also handle top-level imported declarations that don't have corresponding
-  // Clang decls. Check getKind() directly to avoid a layering dependency.
+  if (isa<ClassDecl>(decl) && clangDecl) {
+    assert(isa<clang::ObjCInterfaceDecl>(clangDecl) ||
+           isa<clang::TypedefDecl>(clangDecl));
+    return appendOperator("So");
+  }
+
+  if (isa<ProtocolDecl>(decl) && clangDecl) {
+    assert(isa<clang::ObjCProtocolDecl>(clangDecl));
+    return appendOperator("So");
+  }
+
+  // Declarations provided by a C module have a special context mangling.
   //   known-context ::= 'SC'
+  // Do a dance to avoid a layering dependency.
   if (auto file = dyn_cast<FileUnit>(decl->getDeclContext())) {
-    if (file->getKind() == FileUnitKind::ClangModule) {
-      // FIXME: Import-as-member Clang decls should appear under 'So' as well,
-      // rather than under their current parent.
-      if (decl->getClangDecl())
-        return appendOperator("So");
+    if (file->getKind() == FileUnitKind::ClangModule)
       return appendOperator("SC");
-    }
   }
 
   // Just mangle the decl's DC.
@@ -1250,7 +1292,7 @@
   StringRef ModName = module->getName().str();
   if (ModName == MANGLING_MODULE_OBJC)
     return appendOperator("So");
-  if (ModName == MANGLING_MODULE_CLANG_IMPORTER)
+  if (ModName == MANGLING_MODULE_C)
     return appendOperator("SC");
 
   appendIdentifier(ModName);
@@ -1695,14 +1737,19 @@
                                      requirements, requirementsBuf);
  
   if (AnyFunctionType *FuncTy = type->getAs<AnyFunctionType>()) {
-    bool forceSingleParam = false;
+
+    const ParameterList *Params = nullptr;
     if (const auto *FDecl = dyn_cast<AbstractFunctionDecl>(decl)) {
       unsigned PListIdx = isMethodDecl(decl) ? 1 : 0;
       if (PListIdx < FDecl->getNumParameterLists()) {
-        const ParameterList *Params = FDecl->getParameterList(PListIdx);
-        forceSingleParam = (Params->size() == 1);
+        Params = FDecl->getParameterList(PListIdx);
       }
+    } else if (const auto *SDecl = dyn_cast<SubscriptDecl>(decl)) {
+        Params = SDecl->getIndices();
     }
+    bool forceSingleParam = Params && (Params->size() == 1);
+          
+
     if (isFunctionMangling) {
       appendFunctionSignature(FuncTy, forceSingleParam);
     } else {
diff --git a/lib/AST/ASTNode.cpp b/lib/AST/ASTNode.cpp
index f30e3a8..e5f70b9 100644
--- a/lib/AST/ASTNode.cpp
+++ b/lib/AST/ASTNode.cpp
@@ -23,11 +23,11 @@
 using namespace swift;
 
 SourceRange ASTNode::getSourceRange() const {
-  if (const Expr *E = this->dyn_cast<Expr*>())
+  if (const auto *E = this->dyn_cast<Expr*>())
     return E->getSourceRange();
-  if (const Stmt *S = this->dyn_cast<Stmt*>())
+  if (const auto *S = this->dyn_cast<Stmt*>())
     return S->getSourceRange();
-  if (const Decl *D = this->dyn_cast<Decl*>())
+  if (const auto *D = this->dyn_cast<Decl*>())
     return D->getSourceRange();
   llvm_unreachable("unsupported AST node");
 }
@@ -43,12 +43,12 @@
 }
 
 DeclContext *ASTNode::getAsDeclContext() const {
-  if (Expr *E = this->dyn_cast<Expr*>()) {
+  if (auto *E = this->dyn_cast<Expr*>()) {
     if (isa<AbstractClosureExpr>(E))
       return static_cast<AbstractClosureExpr*>(E);
   } else if (is<Stmt*>()) {
     return nullptr;
-  } else if (Decl *D = this->dyn_cast<Decl*>()) {
+  } else if (auto *D = this->dyn_cast<Decl*>()) {
     if (isa<DeclContext>(D))
       return cast<DeclContext>(D);
   } else if (getOpaqueValue())
@@ -56,22 +56,32 @@
   return nullptr;
 }
 
+bool ASTNode::isImplicit() const {
+  if (const auto *E = this->dyn_cast<Expr*>())
+    return E->isImplicit();
+  if (const auto *S = this->dyn_cast<Stmt*>())
+    return S->isImplicit();
+  if (const auto *D = this->dyn_cast<Decl*>())
+    return D->isImplicit();
+  llvm_unreachable("unsupported AST node");
+}
+
 void ASTNode::walk(ASTWalker &Walker) {
-  if (Expr *E = this->dyn_cast<Expr*>())
+  if (auto *E = this->dyn_cast<Expr*>())
     E->walk(Walker);
-  else if (Stmt *S = this->dyn_cast<Stmt*>())
+  else if (auto *S = this->dyn_cast<Stmt*>())
     S->walk(Walker);
-  else if (Decl *D = this->dyn_cast<Decl*>())
+  else if (auto *D = this->dyn_cast<Decl*>())
     D->walk(Walker);
   else
     llvm_unreachable("unsupported AST node");
 }
 void ASTNode::walk(SourceEntityWalker &Walker) {
-  if (Expr *E = this->dyn_cast<Expr*>())
+  if (auto *E = this->dyn_cast<Expr*>())
     Walker.walk(E);
-  else if (Stmt *S = this->dyn_cast<Stmt*>())
+  else if (auto *S = this->dyn_cast<Stmt*>())
     Walker.walk(S);
-  else if (Decl *D = this->dyn_cast<Decl*>())
+  else if (auto *D = this->dyn_cast<Decl*>())
     Walker.walk(D);
   else
     llvm_unreachable("unsupported AST node");
diff --git a/lib/AST/ASTPrinter.cpp b/lib/AST/ASTPrinter.cpp
index ee7c746..8d81337 100644
--- a/lib/AST/ASTPrinter.cpp
+++ b/lib/AST/ASTPrinter.cpp
@@ -56,7 +56,7 @@
   static bool isMemberFavored(const NominalTypeDecl* Target, const Decl* D) {
     DeclContext* DC = Target->getInnermostDeclContext();
     Type BaseTy = Target->getDeclaredTypeInContext();
-    const FuncDecl *FD = dyn_cast<FuncDecl>(D);
+    const auto *FD = dyn_cast<FuncDecl>(D);
     if (!FD)
       return true;
     ResolvedMemberResult Result = resolveValueMember(*DC, BaseTy,
@@ -1627,7 +1627,7 @@
     return true;
   NominalTypeDecl *Target = Options.TransformContext->getNominal();
   Type BaseTy = Target->getDeclaredTypeInContext();
-  const FuncDecl *FD = dyn_cast<FuncDecl>(D);
+  const auto *FD = dyn_cast<FuncDecl>(D);
   if (!FD)
     return true;
   ResolvedMemberResult Result = resolveValueMember(*Target->getDeclContext(),
@@ -1644,6 +1644,9 @@
       return false;
   }
 
+  if (Options.SkipMissingMemberPlaceholders && isa<MissingMemberDecl>(D))
+    return false;
+
   if (Options.SkipDeinit && isa<DestructorDecl>(D)) {
     return false;
   }
@@ -2048,11 +2051,6 @@
   if (inherited.empty() && superclass.isNull() && !explicitClass) {
     if (protos.empty())
       return;
-    // If only conforms to AnyObject protocol, nothing to print.
-    if (protos.size() == 1) {
-      if (protos.front()->isSpecificProtocol(KnownProtocolKind::AnyObject))
-        return;
-    }
   }
 
   if (inherited.empty()) {
@@ -2077,8 +2075,6 @@
     for (auto Proto : protos) {
       if (!shouldPrint(Proto))
         continue;
-      if (Proto->isSpecificProtocol(KnownProtocolKind::AnyObject))
-        continue;
       if (auto Enum = dyn_cast<EnumDecl>(decl)) {
         // Conformance to RawRepresentable is implied by having a raw type.
         if (Enum->hasRawType()
@@ -3222,6 +3218,12 @@
 
 void PrintAST::visitModuleDecl(ModuleDecl *decl) { }
 
+void PrintAST::visitMissingMemberDecl(MissingMemberDecl *decl) {
+  Printer << "/* placeholder for ";
+  recordDeclLoc(decl, [&]{ Printer << decl->getFullName(); });
+  Printer << " */";
+}
+
 void PrintAST::visitBraceStmt(BraceStmt *stmt) {
   Printer << "{";
   printASTNodes(stmt->getElements());
diff --git a/lib/AST/ASTScope.cpp b/lib/AST/ASTScope.cpp
index 1375bc3..2ca2f44 100644
--- a/lib/AST/ASTScope.cpp
+++ b/lib/AST/ASTScope.cpp
@@ -929,6 +929,7 @@
   case DeclKind::Param:
   case DeclKind::EnumElement:
   case DeclKind::IfConfig:
+  case DeclKind::MissingMember:
     // These declarations do not introduce scopes.
     return nullptr;
 
diff --git a/lib/AST/ASTVerifier.cpp b/lib/AST/ASTVerifier.cpp
index c43a5f0..e3eef72 100644
--- a/lib/AST/ASTVerifier.cpp
+++ b/lib/AST/ASTVerifier.cpp
@@ -366,7 +366,7 @@
     /// Helper template for dispatching post-visitation.
     template <class T> T dispatchVisitPost(T node) {
       // Verify source ranges if the AST node was parsed from source.
-      SourceFile *SF = M.dyn_cast<SourceFile *>();
+      auto *SF = M.dyn_cast<SourceFile *>();
       if (SF) {
         // If we are inside an implicit BraceStmt, don't verify source
         // locations.  LLDB creates implicit BraceStmts which contain a mix of
@@ -817,7 +817,7 @@
     void verifyChecked(ReturnStmt *S) {
       auto func = Functions.back();
       Type resultType;
-      if (FuncDecl *FD = dyn_cast<FuncDecl>(func)) {
+      if (auto *FD = dyn_cast<FuncDecl>(func)) {
         resultType = FD->getResultInterfaceType();
         resultType = FD->mapTypeIntoContext(resultType);
       } else if (auto closure = dyn_cast<AbstractClosureExpr>(func)) {
@@ -905,7 +905,7 @@
     }
 
     Type checkAssignDest(Expr *Dest) {
-      if (TupleExpr *TE = dyn_cast<TupleExpr>(Dest)) {
+      if (auto *TE = dyn_cast<TupleExpr>(Dest)) {
         SmallVector<TupleTypeElt, 4> lhsTupleTypes;
         for (unsigned i = 0; i != TE->getNumElements(); ++i) {
           Type SubType = checkAssignDest(TE->getElement(i));
@@ -1523,7 +1523,7 @@
       // a computed property or if the base is a protocol or existential.
       if (auto *baseIOT = E->getBase()->getType()->getAs<InOutType>()) {
         if (!baseIOT->getObjectType()->is<ArchetypeType>()) {
-          VarDecl *VD = dyn_cast<VarDecl>(E->getMember().getDecl());
+          auto *VD = dyn_cast<VarDecl>(E->getMember().getDecl());
           if (!VD || !VD->hasAccessorFunctions()) {
             Out << "member_ref_expr on value of inout type\n";
             E->dump(Out);
@@ -2154,7 +2154,7 @@
       if (normal->isLazilyResolved()) return;
 
       // Translate the owning declaration into a DeclContext.
-      NominalTypeDecl *nominal = dyn_cast<NominalTypeDecl>(decl);
+      auto *nominal = dyn_cast<NominalTypeDecl>(decl);
       DeclContext *conformingDC;
       if (nominal) {
         conformingDC = nominal;
diff --git a/lib/AST/ASTWalker.cpp b/lib/AST/ASTWalker.cpp
index f6bdb0d..f87eab3 100644
--- a/lib/AST/ASTWalker.cpp
+++ b/lib/AST/ASTWalker.cpp
@@ -199,6 +199,15 @@
       if (doIt(Inherit))
         return true;
     }
+    
+    if (auto *ATD = dyn_cast<AssociatedTypeDecl>(TPD)) {
+      if (auto *WhereClause = ATD->getTrailingWhereClause()) {
+        for (auto &Req: WhereClause->getRequirements()) {
+          if (doIt(Req))
+            return true;
+        }
+      }
+    }
     return false;
   }
 
@@ -212,20 +221,8 @@
       }
       // Visit param conformance
       for (auto &Req : NTD->getGenericParams()->getRequirements()) {
-        switch (Req.getKind()) {
-          case RequirementReprKind::SameType:
-            if (doIt(Req.getFirstTypeLoc()) || doIt(Req.getSecondTypeLoc()))
-              return true;
-            break;
-          case RequirementReprKind::TypeConstraint:
-            if (doIt(Req.getSubjectLoc()) || doIt(Req.getConstraintLoc()))
-              return true;
-            break;
-          case RequirementReprKind::LayoutConstraint:
-            if (doIt(Req.getFirstTypeLoc()))
-              return true;
-            break;
-        }
+        if (doIt(Req))
+          return true;
       }
     }
 
@@ -233,6 +230,16 @@
       if (doIt(Inherit))
         return true;
     }
+    
+    if (auto *Protocol = dyn_cast<ProtocolDecl>(NTD)) {
+      if (auto *WhereClause = Protocol->getTrailingWhereClause()) {
+        for (auto &Req: WhereClause->getRequirements()) {
+          if (doIt(Req))
+            return true;
+        }
+      }
+    }
+    
     for (Decl *Member : NTD->getMembers())
       if (doIt(Member))
         return true;
@@ -253,6 +260,10 @@
     return doIt(SD->getElementTypeLoc());
   }
 
+  bool visitMissingMemberDecl(MissingMemberDecl *MMD) {
+    return false;
+  }
+
   bool visitAbstractFunctionDecl(AbstractFunctionDecl *AFD) {
 #ifndef NDEBUG
     PrettyStackTraceDecl debugStack("walking into body of", AFD);
@@ -268,20 +279,8 @@
 
       // Visit param conformance
       for (auto &Req : AFD->getGenericParams()->getRequirements()) {
-        switch (Req.getKind()) {
-        case RequirementReprKind::SameType:
-          if (doIt(Req.getFirstTypeLoc()) || doIt(Req.getSecondTypeLoc()))
-            return true;
-          break;
-        case RequirementReprKind::TypeConstraint:
-          if (doIt(Req.getSubjectLoc()) || doIt(Req.getConstraintLoc()))
-            return true;
-          break;
-        case RequirementReprKind::LayoutConstraint:
-          if (doIt(Req.getSubjectLoc()))
-            return true;
-          break;
-        }
+        if (doIt(Req))
+          return true;
       }
     }
 
@@ -915,10 +914,35 @@
       E->setObjCStringLiteralExpr(sub);
       return E;
     }
-  
+
+    auto components = E->getComponents();
+    if (components.empty()) {
+      // No components means a parsed-only/pre-resolution Swift key path.
+      assert(!E->isObjC());
+      if (auto parsedRoot = E->getParsedRoot()) {
+        Expr *newRoot = doIt(parsedRoot);
+        if (!newRoot)
+          return nullptr;
+        E->setParsedRoot(newRoot);
+      }
+      if (auto parsedPath = E->getParsedPath()) {
+        Expr *newPath = doIt(parsedPath);
+        if (!newPath)
+          return nullptr;
+        E->setParsedPath(newPath);
+      }
+      return E;
+    }
+
+    if (!E->isObjC()) {
+      auto rootType = E->getRootType();
+      if (rootType && doIt(rootType))
+        return nullptr;
+    }
+
     SmallVector<KeyPathExpr::Component, 4> updatedComponents;
     bool didChangeComponents = false;
-    for (auto &origComponent : E->getComponents()) {
+    for (auto &origComponent : components) {
       auto component = origComponent;
       switch (auto kind = component.getKind()) {
       case KeyPathExpr::Component::Kind::Subscript:
@@ -955,10 +979,12 @@
       E->resolveComponents(E->getType()->getASTContext(),
                            updatedComponents);
     }
-    
+
     return E;
   }
 
+  Expr *visitKeyPathDotExpr(KeyPathDotExpr *E) { return E; }
+
   //===--------------------------------------------------------------------===//
   //                           Everything Else
   //===--------------------------------------------------------------------===//
@@ -1140,6 +1166,24 @@
     // If we didn't bail out, do post-order visitation.
     return !Walker.walkToTypeReprPost(T);
   }
+  
+  bool doIt(RequirementRepr &Req) {
+    switch (Req.getKind()) {
+    case RequirementReprKind::SameType:
+      if (doIt(Req.getFirstTypeLoc()) || doIt(Req.getSecondTypeLoc()))
+        return true;
+      break;
+    case RequirementReprKind::TypeConstraint:
+      if (doIt(Req.getSubjectLoc()) || doIt(Req.getConstraintLoc()))
+        return true;
+      break;
+    case RequirementReprKind::LayoutConstraint:
+      if (doIt(Req.getFirstTypeLoc()))
+        return true;
+      break;
+    }
+    return false;
+  }
 };
 
 } // end anonymous namespace
@@ -1171,7 +1215,7 @@
 
 Stmt *Traversal::visitBraceStmt(BraceStmt *BS) {
   for (auto &Elem : BS->getElements()) {
-    if (Expr *SubExpr = Elem.dyn_cast<Expr*>()) {
+    if (auto *SubExpr = Elem.dyn_cast<Expr*>()) {
       if (Expr *E2 = doIt(SubExpr))
         Elem = E2;
       else
@@ -1179,7 +1223,7 @@
       continue;
     }
 
-    if (Stmt *S = Elem.dyn_cast<Stmt*>()) {
+    if (auto *S = Elem.dyn_cast<Stmt*>()) {
       if (Stmt *S2 = doIt(S))
         Elem = S2;
       else
diff --git a/lib/AST/Attr.cpp b/lib/AST/Attr.cpp
index e1fc822..28725ce 100644
--- a/lib/AST/Attr.cpp
+++ b/lib/AST/Attr.cpp
@@ -493,6 +493,19 @@
     break;
   }
 
+  case DAK_NSKeyedArchiveLegacy: {
+    Printer.printAttrName("@NSKeyedArchiveLegacy");
+    Printer << "(";
+    auto *attr = cast<NSKeyedArchiveLegacyAttr>(this);
+    Printer << "\"" << attr->Name << "\"";
+    Printer << ")";
+    break;
+  }
+
+  case DAK_StaticInitializeObjCMetadata:
+    Printer.printAttrName("@_staticInitializeObjCMetadata");
+    break;
+
   case DAK_Count:
     llvm_unreachable("exceed declaration attribute kinds");
 
@@ -609,6 +622,8 @@
     return "_specialize";
   case DAK_Implements:
     return "_implements";
+  case DAK_NSKeyedArchiveLegacy:
+    return "NSKeyedArchiveLegacy";
   }
   llvm_unreachable("bad DeclAttrKind");
 }
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 3de2c07..6d9cbd2 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -133,6 +133,7 @@
   TRIVIAL_KIND(EnumElement);
   TRIVIAL_KIND(Param);
   TRIVIAL_KIND(Module);
+  TRIVIAL_KIND(MissingMember);
 
    case DeclKind::Enum:
      return cast<EnumDecl>(this)->getGenericParams()
@@ -267,6 +268,7 @@
   ENTRY(MutableAddressor, "mutableAddress accessor");
   ENTRY(EnumElement, "enum element");
   ENTRY(Module, "module");
+  ENTRY(MissingMember, "missing member placeholder");
   }
 #undef ENTRY
   llvm_unreachable("bad DescriptiveDeclKind");
@@ -377,7 +379,7 @@
 
   // If this is an accessor, check if the transparent attribute was set
   // on the value decl.
-  if (const FuncDecl *FD = dyn_cast<FuncDecl>(this)) {
+  if (const auto *FD = dyn_cast<FuncDecl>(this)) {
     if (auto *ASD = FD->getAccessorStorageDecl())
       return ASD->isTransparent();
   }
@@ -736,6 +738,7 @@
   case DeclKind::EnumCase:
   case DeclKind::IfConfig:
   case DeclKind::PrecedenceGroup:
+  case DeclKind::MissingMember:
     llvm_unreachable("not a ValueDecl");
 
   case DeclKind::AssociatedType:
@@ -1371,6 +1374,7 @@
   case DeclKind::PostfixOperator:
   case DeclKind::IfConfig:
   case DeclKind::PrecedenceGroup:
+  case DeclKind::MissingMember:
     assert(!isa<ValueDecl>(this));
     llvm_unreachable("non-value decls shouldn't get here");
 
@@ -1412,6 +1416,7 @@
   case DeclKind::PostfixOperator:
   case DeclKind::IfConfig:
   case DeclKind::PrecedenceGroup:
+  case DeclKind::MissingMember:
     llvm_unreachable("Not a ValueDecl");
 
   case DeclKind::Class:
@@ -2488,6 +2493,7 @@
   ClassDeclBits.HasDestructorDecl = 0;
   ObjCKind = 0;
   HasMissingDesignatedInitializers = 0;
+  HasMissingVTableEntries = 0;
 }
 
 DestructorDecl *ClassDecl::getDestructor() {
@@ -2505,6 +2511,11 @@
   return HasMissingDesignatedInitializers;
 }
 
+bool ClassDecl::hasMissingVTableEntries() const {
+  (void)getMembers();
+  return HasMissingVTableEntries;
+}
+
 bool ClassDecl::inheritsSuperclassInitializers(LazyResolver *resolver) {
   // Get a resolver from the ASTContext if we don't have one already.
   if (resolver == nullptr)
@@ -2699,7 +2710,7 @@
 ClassDecl::findOverridingDecl(const AbstractFunctionDecl *Method) const {
   auto Members = getMembers();
   for (auto M : Members) {
-    AbstractFunctionDecl *CurMethod = dyn_cast<AbstractFunctionDecl>(M);
+    auto *CurMethod = dyn_cast<AbstractFunctionDecl>(M);
     if (!CurMethod)
       continue;
     if (CurMethod->isOverridingDecl(Method)) {
@@ -2726,7 +2737,7 @@
   while (C) {
     auto Members = C->getMembers();
     for (auto M : Members) {
-      AbstractFunctionDecl *CurMethod = dyn_cast<AbstractFunctionDecl>(M);
+      auto *CurMethod = dyn_cast<AbstractFunctionDecl>(M);
       if (!CurMethod)
         continue;
       if (Method == CurMethod)
@@ -2919,9 +2930,6 @@
   ProtocolDeclBits.ExistentialConformsToSelfValid = true;
   ProtocolDeclBits.ExistentialConformsToSelf = true;
 
-  if (isSpecificProtocol(KnownProtocolKind::AnyObject))
-    return true;
-
   if (!isObjC()) {
     ProtocolDeclBits.ExistentialConformsToSelf = false;
     return false;
@@ -4141,9 +4149,9 @@
 
 Type ParamDecl::getVarargBaseTy(Type VarArgT) {
   TypeBase *T = VarArgT.getPointer();
-  if (ArraySliceType *AT = dyn_cast<ArraySliceType>(T))
+  if (auto *AT = dyn_cast<ArraySliceType>(T))
     return AT->getBaseType();
-  if (BoundGenericType *BGT = dyn_cast<BoundGenericType>(T)) {
+  if (auto *BGT = dyn_cast<BoundGenericType>(T)) {
     // It's the stdlib Array<T>.
     return BGT->getGenericArgs()[0];
   }
@@ -4611,6 +4619,63 @@
   return nullptr;
 }
 
+static bool requiresNewVTableEntry(const AbstractFunctionDecl *decl) {
+  assert(isa<FuncDecl>(decl) || isa<ConstructorDecl>(decl));
+
+  // Final members are always be called directly.
+  // Dynamic methods are always accessed by objc_msgSend().
+  if (decl->isFinal() || decl->isDynamic())
+    return false;
+
+  if (auto *fd = dyn_cast<FuncDecl>(decl)) {
+    switch (fd->getAccessorKind()) {
+    case AccessorKind::NotAccessor:
+    case AccessorKind::IsGetter:
+    case AccessorKind::IsSetter:
+      break;
+    case AccessorKind::IsAddressor:
+    case AccessorKind::IsMutableAddressor:
+      return false;
+    case AccessorKind::IsMaterializeForSet:
+      // Special case -- materializeForSet on dynamic storage is not
+      // itself dynamic, but should be treated as such for the
+      // purpose of constructing a vtable.
+      // FIXME: It should probably just be 'final'.
+      if (fd->getAccessorStorageDecl()->isDynamic())
+        return false;
+      break;
+    case AccessorKind::IsWillSet:
+    case AccessorKind::IsDidSet:
+      return false;
+    }
+  }
+
+  auto base = decl->getOverriddenDecl();
+  if (!base || base->hasClangNode())
+    return true;
+
+  // If the method overrides something, we only need a new entry if the
+  // override has a more general AST type. However an abstraction
+  // change is OK; we don't want to add a whole new vtable entry just
+  // because an @in parameter because @owned, or whatever.
+  auto baseInterfaceTy = base->getInterfaceType();
+  auto derivedInterfaceTy = decl->getInterfaceType();
+
+  auto selfInterfaceTy = decl->getDeclContext()->getDeclaredInterfaceType();
+
+  auto overrideInterfaceTy = selfInterfaceTy->adjustSuperclassMemberDeclType(
+      base, decl, baseInterfaceTy);
+
+  return !derivedInterfaceTy->matches(overrideInterfaceTy,
+                                      TypeMatchFlags::AllowABICompatible,
+                                      /*resolver*/nullptr);
+}
+
+void AbstractFunctionDecl::computeNeedsNewVTableEntry() {
+  setNeedsNewVTableEntry(requiresNewVTableEntry(this));
+}
+
+
 FuncDecl *FuncDecl::createImpl(ASTContext &Context,
                                SourceLoc StaticLoc,
                                StaticSpellingKind StaticSpelling,
@@ -4765,7 +4830,7 @@
   setParameterLists(SelfDecl, BodyParams);
   
   ConstructorDeclBits.ComputedBodyInitKind = 0;
-  ConstructorDeclBits.HasStubImplementation = 0;
+  this->HasStubImplementation = 0;
   this->InitKind = static_cast<unsigned>(CtorInitializerKind::Designated);
   this->Failability = static_cast<unsigned>(Failability);
 }
diff --git a/lib/AST/DeclContext.cpp b/lib/AST/DeclContext.cpp
index 1dc3ee4..70ff9fc 100644
--- a/lib/AST/DeclContext.cpp
+++ b/lib/AST/DeclContext.cpp
@@ -406,6 +406,16 @@
   return nullptr;
 }
 
+DeclContext *DeclContext::getParentForLookup() const {
+  if (isa<ProtocolDecl>(this) || isa<ExtensionDecl>(this)) {
+    // If we are inside a protocol or an extension, skip directly
+    // to the module scope context, without looking at any (invalid)
+    // outer types.
+    return getModuleScopeContext();
+  }
+  return getParent();
+}
+
 ModuleDecl *DeclContext::getParentModule() const {
   const DeclContext *DC = this;
   while (!DC->isModuleContext())
@@ -956,8 +966,38 @@
   llvm_unreachable("Unhandled DeclKind in switch.");
 }
 
+/// Return the DeclContext to compare when checking private access in
+/// Swift 4 mode. The context returned is the type declaration if the context
+/// and the type declaration are in the same file, otherwise it is the types
+/// last extension in the source file. If the context does not refer to a
+/// declaration or extension, the supplied context is returned.
+static const DeclContext *
+getPrivateDeclContext(const DeclContext *DC, const SourceFile *useSF) {
+  auto NTD = DC->getAsNominalTypeOrNominalTypeExtensionContext();
+  if (!NTD)
+    return DC;
+
+  // use the type declaration as the private scope if it is in the same
+  // file as useSF. This occurs for both extensions and declarations.
+  if (NTD->getParentSourceFile() == useSF)
+    return NTD;
+
+  // Otherwise use the last extension declaration in the same file.
+  const DeclContext *lastExtension = nullptr;
+  for (ExtensionDecl *ED : NTD->getExtensions())
+    if (ED->getParentSourceFile() == useSF)
+      lastExtension = ED;
+
+  // If there's no last extension, return the supplied context.
+  return lastExtension ? lastExtension : DC;
+}
+
 AccessScope::AccessScope(const DeclContext *DC, bool isPrivate)
     : Value(DC, isPrivate) {
+  if (isPrivate) {
+    DC = getPrivateDeclContext(DC, DC->getParentSourceFile());
+    Value.setPointer(DC);
+  }
   if (!DC || isa<ModuleDecl>(DC))
     assert(!isPrivate && "public or internal scope can't be private");
 }
@@ -978,3 +1018,41 @@
 
   return Accessibility::Private;
 }
+
+bool AccessScope::allowsPrivateAccess(const DeclContext *useDC, const DeclContext *sourceDC) {
+  // Check the lexical scope.
+  if (useDC->isChildContextOf(sourceDC))
+    return true;
+
+  // Only check lexical scope in Swift 3 mode
+  if (useDC->getASTContext().isSwiftVersion3())
+    return false;
+
+  // Do not allow access if the sourceDC is in a different file
+  auto useSF = useDC->getParentSourceFile();
+  if (useSF != sourceDC->getParentSourceFile())
+    return false;
+
+  // Do not allow access if the sourceDC does not represent a type.
+  auto sourceNTD = sourceDC->getAsNominalTypeOrNominalTypeExtensionContext();
+  if (!sourceNTD)
+    return false;
+
+  // Compare the private scopes and iterate over the parent types.
+  sourceDC = getPrivateDeclContext(sourceDC, useSF);
+  while (!useDC->isModuleContext()) {
+    useDC = getPrivateDeclContext(useDC, useSF);
+    if (useDC == sourceDC)
+      return true;
+
+    // Get the parent type. If the context represents a type, look at the types
+    // declaring context instead of the contexts parent. This will crawl up
+    // the type hierarchy in nested extensions correctly.
+    if (auto NTD = useDC->getAsNominalTypeOrNominalTypeExtensionContext())
+      useDC = NTD->getDeclContext();
+    else
+      useDC = useDC->getParent();
+  }
+
+  return false;
+}
diff --git a/lib/AST/DiagnosticEngine.cpp b/lib/AST/DiagnosticEngine.cpp
index d00a4fb..3068351 100644
--- a/lib/AST/DiagnosticEngine.cpp
+++ b/lib/AST/DiagnosticEngine.cpp
@@ -247,6 +247,14 @@
   return storedDiagnosticInfos[(unsigned) ID].pointsToFirstBadToken;
 }
 
+bool DiagnosticEngine::finishProcessing() {
+  bool hadError = false;
+  for (auto &Consumer : Consumers) {
+    hadError |= Consumer->finishProcessing();
+  }
+  return hadError;
+}
+
 /// \brief Skip forward to one of the given delimiters.
 ///
 /// \param Text The text to search through, which will be updated to point
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 2d0b8d7..ae28f45 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -175,10 +175,10 @@
 }
 
 Expr *Expr::getSemanticsProvidingExpr() {
-  if (IdentityExpr *IE = dyn_cast<IdentityExpr>(this))
+  if (auto *IE = dyn_cast<IdentityExpr>(this))
     return IE->getSubExpr()->getSemanticsProvidingExpr();
 
-  if (TryExpr *TE = dyn_cast<TryExpr>(this))
+  if (auto *TE = dyn_cast<TryExpr>(this))
     return TE->getSubExpr()->getSemanticsProvidingExpr();
 
   return this;
@@ -510,6 +510,7 @@
   NO_REFERENCE(EditorPlaceholder);
   NO_REFERENCE(ObjCSelector);
   NO_REFERENCE(KeyPath);
+  NO_REFERENCE(KeyPathDot);
 
 #undef SIMPLE_REFERENCE
 #undef NO_REFERENCE
@@ -796,6 +797,7 @@
   case ExprKind::Assign:
   case ExprKind::UnresolvedPattern:
   case ExprKind::EditorPlaceholder:
+  case ExprKind::KeyPathDot:
     return false;
   }
 
@@ -1489,7 +1491,7 @@
 }
 
 static ValueDecl *getCalledValue(Expr *E) {
-  if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E))
+  if (auto *DRE = dyn_cast<DeclRefExpr>(E))
     return DRE->getDecl();
 
   Expr *E2 = E->getValueProvidingExpr();
@@ -2003,23 +2005,17 @@
   return type->castTo<ArchetypeType>();
 }
 
-KeyPathExpr::KeyPathExpr(ASTContext &C,
-                         SourceLoc keywordLoc, SourceLoc lParenLoc,
-                         TypeRepr *root,
-                         ArrayRef<Component> components,
-                         SourceLoc rParenLoc,
-                         bool isObjC,
-                         bool isImplicit)
-  : Expr(ExprKind::KeyPath, isImplicit),
-    KeywordLoc(keywordLoc), LParenLoc(lParenLoc), RParenLoc(rParenLoc),
-    RootType(root),
-    Components(C.AllocateUninitialized<Component>(components.size()))
-{
+KeyPathExpr::KeyPathExpr(ASTContext &C, SourceLoc keywordLoc,
+                         SourceLoc lParenLoc, ArrayRef<Component> components,
+                         SourceLoc rParenLoc, bool isImplicit)
+    : Expr(ExprKind::KeyPath, isImplicit), StartLoc(keywordLoc),
+      LParenLoc(lParenLoc), EndLoc(rParenLoc),
+      Components(C.AllocateUninitialized<Component>(components.size())) {
   // Copy components into the AST context.
   std::uninitialized_copy(components.begin(), components.end(),
                           Components.begin());
-  
-  KeyPathExprBits.IsObjC = isObjC;
+
+  KeyPathExprBits.IsObjC = true;
 }
 
 void
diff --git a/lib/AST/GenericSignatureBuilder.cpp b/lib/AST/GenericSignatureBuilder.cpp
index 150e787..d236e4b 100644
--- a/lib/AST/GenericSignatureBuilder.cpp
+++ b/lib/AST/GenericSignatureBuilder.cpp
@@ -1750,8 +1750,8 @@
 PotentialArchetype *PotentialArchetype::updateNestedTypeForConformance(
                       PointerUnion<AssociatedTypeDecl *, TypeAliasDecl *> type,
                       NestedTypeUpdate kind) {
-  AssociatedTypeDecl *assocType = type.dyn_cast<AssociatedTypeDecl *>();
-  TypeAliasDecl *typealias = type.dyn_cast<TypeAliasDecl *>();
+  auto *assocType = type.dyn_cast<AssociatedTypeDecl *>();
+  auto *typealias = type.dyn_cast<TypeAliasDecl *>();
   if (!assocType && !typealias)
     return nullptr;
 
@@ -2395,8 +2395,7 @@
 /// types.
 static ConstraintResult visitInherited(
          ArrayRef<TypeLoc> inheritedTypes,
-         llvm::function_ref<ConstraintResult(Type, const TypeRepr *)> visitType,
-         llvm::function_ref<ConstraintResult(LayoutConstraint, const TypeRepr *)> visitLayout) {
+         llvm::function_ref<ConstraintResult(Type, const TypeRepr *)> visitType) {
   // Local function that (recursively) adds inherited types.
   ConstraintResult result = ConstraintResult::Resolved;
   std::function<void(Type, const TypeRepr *)> visitInherited;
@@ -2414,11 +2413,6 @@
           index++;
         }
 
-        auto layout = compositionType->getExistentialLayout()
-          .getLayoutConstraint();
-        if (layout)
-          visitLayout(layout, composition);
-
         return;
       }
     }
@@ -2573,7 +2567,7 @@
     return Type();
   };
 
-  // An an inferred same-type requirement between the two type declarations
+  // An inferred same-type requirement between the two type declarations
   // within this protocol or a protocol it inherits.
   auto addInferredSameTypeReq = [&](TypeDecl *first, TypeDecl *second) {
     Type firstType = formUnsubstitutedType(first);
@@ -2894,7 +2888,7 @@
   if (!constraintType->isExistentialType() &&
       !constraintType->getClassOrBoundGenericClass()) {
     if (source.getLoc().isValid() && !constraintType->hasError()) {
-      Type subjectType = subject.dyn_cast<Type>();
+      auto subjectType = subject.dyn_cast<Type>();
       if (!subjectType)
         subjectType = subject.get<PotentialArchetype *>()
                         ->getDependentType(Impl->GenericParams,
@@ -3378,14 +3372,7 @@
                               UnresolvedHandlingKind::GenerateConstraints);
   };
 
-  auto visitLayout = [&](LayoutConstraint layout, const TypeRepr *typeRepr) {
-    return addLayoutRequirement(type, layout,
-                                getFloatingSource(typeRepr,
-                                                  /*forInferred=*/false),
-                                UnresolvedHandlingKind::GenerateConstraints);
-  };
-
-  return visitInherited(decl->getInherited(), visitType, visitLayout);
+  return visitInherited(decl->getInherited(), visitType);
 }
 
 ConstraintResult GenericSignatureBuilder::addRequirement(
diff --git a/lib/AST/LookupVisibleDecls.cpp b/lib/AST/LookupVisibleDecls.cpp
index 9b9ba26..330e062 100644
--- a/lib/AST/LookupVisibleDecls.cpp
+++ b/lib/AST/LookupVisibleDecls.cpp
@@ -568,7 +568,7 @@
     lookupDeclsFromProtocolsBeingConformedTo(BaseTy, Consumer, LS, CurrDC,
                                              Reason, TypeResolver, Visited);
     // If we have a class type, look into its superclass.
-    ClassDecl *CurClass = dyn_cast<ClassDecl>(CurNominal);
+    auto *CurClass = dyn_cast<ClassDecl>(CurNominal);
 
     if (CurClass && CurClass->hasSuperclass()) {
       assert(BaseTy.getPointer() != CurClass->getSuperclass().getPointer() &&
diff --git a/lib/AST/Module.cpp b/lib/AST/Module.cpp
index e92dcc0..3abd672 100644
--- a/lib/AST/Module.cpp
+++ b/lib/AST/Module.cpp
@@ -181,23 +181,23 @@
 void SourceLookupCache::doPopulateCache(Range decls,
                                         bool onlyOperators) {
   for (Decl *D : decls) {
-    if (ValueDecl *VD = dyn_cast<ValueDecl>(D))
+    if (auto *VD = dyn_cast<ValueDecl>(D))
       if (onlyOperators ? VD->isOperator() : VD->hasName()) {
         // Cache the value under both its compound name and its full name.
         TopLevelValues.add(VD);
       }
-    if (NominalTypeDecl *NTD = dyn_cast<NominalTypeDecl>(D))
+    if (auto *NTD = dyn_cast<NominalTypeDecl>(D))
       doPopulateCache(NTD->getMembers(), true);
-    if (ExtensionDecl *ED = dyn_cast<ExtensionDecl>(D))
+    if (auto *ED = dyn_cast<ExtensionDecl>(D))
       doPopulateCache(ED->getMembers(), true);
   }
 }
 
 void SourceLookupCache::populateMemberCache(const SourceFile &SF) {
   for (const Decl *D : SF.Decls) {
-    if (const NominalTypeDecl *NTD = dyn_cast<NominalTypeDecl>(D)) {
+    if (const auto *NTD = dyn_cast<NominalTypeDecl>(D)) {
       addToMemberCache(NTD->getMembers());
-    } else if (const ExtensionDecl *ED = dyn_cast<ExtensionDecl>(D)) {
+    } else if (const auto *ED = dyn_cast<ExtensionDecl>(D)) {
       addToMemberCache(ED->getMembers());
     }
   }
@@ -587,14 +587,6 @@
       }
     }
 
-    // FIXME: This will go away soon.
-    if (protocol->isSpecificProtocol(KnownProtocolKind::AnyObject)) {
-      if (archetype->requiresClass())
-        return ProtocolConformanceRef(protocol);
-
-      return None;
-    }
-
     for (auto ap : archetype->getConformsTo()) {
       if (ap == protocol || ap->inheritsFrom(protocol))
         return ProtocolConformanceRef(protocol);
@@ -621,12 +613,6 @@
     if (!layout.isObjC())
       return None;
 
-    // Special-case AnyObject, which may not be in the list of conformances.
-    //
-    // FIXME: This is going away soon.
-    if (protocol->isSpecificProtocol(KnownProtocolKind::AnyObject))
-      return ProtocolConformanceRef(protocol);
-
     // If the existential is class-constrained, the class might conform
     // concretely.
     if (layout.superclass) {
diff --git a/lib/AST/NameLookup.cpp b/lib/AST/NameLookup.cpp
index b5921fa..d76c708 100644
--- a/lib/AST/NameLookup.cpp
+++ b/lib/AST/NameLookup.cpp
@@ -719,14 +719,14 @@
           }
           if (!isCascadingUse.hasValue())
             isCascadingUse = ACE->isCascadingContextForLookup(false);
-        } else if (ExtensionDecl *ED = dyn_cast<ExtensionDecl>(DC)) {
+        } else if (auto *ED = dyn_cast<ExtensionDecl>(DC)) {
           ExtendedType = ED->getSelfTypeInContext();
 
           BaseDecl = ED->getAsNominalTypeOrNominalTypeExtensionContext();
           MetaBaseDecl = BaseDecl;
           if (!isCascadingUse.hasValue())
             isCascadingUse = ED->isCascadingContextForLookup(false);
-        } else if (NominalTypeDecl *ND = dyn_cast<NominalTypeDecl>(DC)) {
+        } else if (auto *ND = dyn_cast<NominalTypeDecl>(DC)) {
           ExtendedType = ND->getDeclaredType();
           BaseDecl = ND;
           MetaBaseDecl = BaseDecl;
@@ -857,7 +857,7 @@
           }
         }
 
-        DC = DC->getParent();
+        DC = DC->getParentForLookup();
       }
 
       if (!isCascadingUse.hasValue())
@@ -1262,7 +1262,8 @@
   assert(sourceDC && "ValueDecl being accessed must have a valid DeclContext");
   switch (access) {
   case Accessibility::Private:
-    return useDC == sourceDC || useDC->isChildContextOf(sourceDC);
+    return (useDC == sourceDC ||
+      AccessScope::allowsPrivateAccess(useDC, sourceDC));
   case Accessibility::FilePrivate:
     return useDC->getModuleScopeContext() == sourceDC->getModuleScopeContext();
   case Accessibility::Internal: {
@@ -1389,17 +1390,6 @@
   if (auto nominal = type->getAnyNominal()) {
     visited.insert(nominal);
     stack.push_back(nominal);
-    
-    // If we want dynamic lookup and we're searching in the
-    // AnyObject protocol, note this for later.
-    //
-    // FIXME: This will go away soon.
-    if (options & NL_DynamicLookup) {
-      if (auto proto = dyn_cast<ProtocolDecl>(nominal)) {
-        if (proto->isSpecificProtocol(KnownProtocolKind::AnyObject))
-          wantLookupInAllClasses = true;
-      }
-    }
   }
   // Handle archetypes
   else if (auto archetypeTy = type->getAs<ArchetypeType>()) {
diff --git a/lib/AST/NameLookupImpl.h b/lib/AST/NameLookupImpl.h
index 9910ba2..22da51b 100644
--- a/lib/AST/NameLookupImpl.h
+++ b/lib/AST/NameLookupImpl.h
@@ -101,7 +101,7 @@
 
   void checkSourceFile(const SourceFile &SF) {
     for (Decl *D : SF.Decls)
-      if (TopLevelCodeDecl *TLCD = dyn_cast<TopLevelCodeDecl>(D))
+      if (auto *TLCD = dyn_cast<TopLevelCodeDecl>(D))
         visitBraceStmt(TLCD->getBody(), /*isTopLevel=*/true);
   }
 
@@ -174,7 +174,7 @@
       return;
     visit(S->getBody());
     for (Decl *D : S->getInitializerVarDecls()) {
-      if (ValueDecl *VD = dyn_cast<ValueDecl>(D))
+      if (auto *VD = dyn_cast<ValueDecl>(D))
         checkValueDecl(VD, DeclVisibilityKind::LocalVariable);
     }
   }
@@ -196,12 +196,12 @@
     }
 
     for (auto elem : S->getElements()) {
-      if (Stmt *S = elem.dyn_cast<Stmt*>())
+      if (auto *S = elem.dyn_cast<Stmt*>())
         visit(S);
     }
     for (auto elem : S->getElements()) {
-      if (Decl *D = elem.dyn_cast<Decl*>()) {
-        if (ValueDecl *VD = dyn_cast<ValueDecl>(D))
+      if (auto *D = elem.dyn_cast<Decl*>()) {
+        if (auto *VD = dyn_cast<ValueDecl>(D))
           checkValueDecl(VD, DeclVisibilityKind::LocalVariable);
       }
     }
diff --git a/lib/AST/ProtocolConformance.cpp b/lib/AST/ProtocolConformance.cpp
index 883b7a9..d6770f4 100644
--- a/lib/AST/ProtocolConformance.cpp
+++ b/lib/AST/ProtocolConformance.cpp
@@ -122,50 +122,11 @@
 
   auto *proto = getRequirement();
 
-  // If the original type was an archetype, check the conformance map.
-  if (origType->is<SubstitutableType>()
-      || origType->is<DependentMemberType>()) {
-    if (auto result = conformances(origType->getCanonicalType(),
-                                   substType,
-                                   proto->getDeclaredType())) {
-      return *result;
-    }
-  }
-
-  // If that didn't find anything, we can still synthesize AnyObject
-  // conformances from thin air.  FIXME: this is going away soon.
-  if (proto->isSpecificProtocol(KnownProtocolKind::AnyObject)) {
-    if (substType->isExistentialType())
-      return *this;
-
-    ClassDecl *classDecl = nullptr;
-    auto archetype = substType->getAs<ArchetypeType>();
-
-    if (archetype) {
-      if (archetype->getSuperclass())
-        classDecl = archetype->getSuperclass()->getClassOrBoundGenericClass();
-
-      // A class-constrained archetype without a superclass constraint
-      // conforms to AnyObject abstractly.
-      if (!classDecl && archetype->requiresClass())
-        return ProtocolConformanceRef(proto);
-    } else {
-      classDecl = substType->getClassOrBoundGenericClass();
-    }
-
-    assert(classDecl);
-
-    // Create a concrete conformance based on the conforming class.
-    SmallVector<ProtocolConformance *, 1> lookupResults;
-    classDecl->lookupConformance(classDecl->getParentModule(), proto,
-                                 lookupResults);
-    auto *conf = lookupResults.front();
-    auto subMap = substType->getContextSubstitutionMap(
-        conf->getDeclContext()->getParentModule(), conf->getDeclContext());
-    if (!subMap.empty())
-      conf = substType->getASTContext().getSpecializedConformance(substType,
-                                                                  conf, subMap);
-    return ProtocolConformanceRef(conf);
+  // Check the conformance map.
+  if (auto result = conformances(origType->getCanonicalType(),
+                                 substType,
+                                 proto->getDeclaredType())) {
+    return *result;
   }
 
   llvm_unreachable("Invalid conformance substitution");
@@ -254,13 +215,16 @@
 
 std::pair<Type, TypeDecl *>
 ProtocolConformance::getTypeWitnessAndDecl(AssociatedTypeDecl *assocType,
-                                                LazyResolver *resolver) const {
-  CONFORMANCE_SUBCLASS_DISPATCH(getTypeWitnessAndDecl, (assocType, resolver))
+                                           LazyResolver *resolver,
+                                           SubstOptions options) const {
+  CONFORMANCE_SUBCLASS_DISPATCH(getTypeWitnessAndDecl,
+                                (assocType, resolver, options))
 }
 
 Type ProtocolConformance::getTypeWitness(AssociatedTypeDecl *assocType,
-                                         LazyResolver *resolver) const {
-  return getTypeWitnessAndDecl(assocType, resolver).first;
+                                         LazyResolver *resolver,
+                                         SubstOptions options) const {
+  return getTypeWitnessAndDecl(assocType, resolver, options).first;
 }
 
 ValueDecl *ProtocolConformance::getWitnessDecl(ValueDecl *requirement,
@@ -511,22 +475,40 @@
 
 std::pair<Type, TypeDecl *>
 NormalProtocolConformance::getTypeWitnessAndDecl(AssociatedTypeDecl *assocType,
-                                                 LazyResolver *resolver) const {
+                                                 LazyResolver *resolver,
+                                                 SubstOptions options) const {
   if (Resolver)
     resolveLazyInfo();
 
+  // Check whether we already have a type witness.
   auto known = TypeWitnesses.find(assocType);
-  if (known == TypeWitnesses.end()) {
-    PrettyStackTraceRequirement trace("resolving", this, assocType);
-    if (!resolveKnownTypeWitness(const_cast<NormalProtocolConformance *>(this),
-                                 assocType)) {
-      assert(resolver && "Unable to resolve type witness");
-      resolver->resolveTypeWitness(this, assocType);
+  if (known != TypeWitnesses.end())
+    return known->second;
+
+  // If this conformance is in a state where it is inferring type witnesses,
+  // check tentative witnesses.
+  if (getState() == ProtocolConformanceState::CheckingTypeWitnesses) {
+    // If there is a tentative-type-witness function, use it.
+    if (options.getTentativeTypeWitness) {
+     if (Type witnessType =
+           Type(options.getTentativeTypeWitness(this, assocType)))
+        return { witnessType, nullptr };
     }
-    known = TypeWitnesses.find(assocType);
-    assert(known != TypeWitnesses.end() && "Didn't resolve witness?");
+
+    // Otherwise, we fail; this is the only case in which we can return a
+    // null type.
+    return { Type(), nullptr };
   }
 
+  // Otherwise, resolve the type witness.
+  PrettyStackTraceRequirement trace("resolving", this, assocType);
+  if (!resolveKnownTypeWitness(const_cast<NormalProtocolConformance *>(this),
+                               assocType)) {
+    assert(resolver && "Unable to resolve type witness");
+    resolver->resolveTypeWitness(this, assocType);
+  }
+  known = TypeWitnesses.find(assocType);
+  assert(known != TypeWitnesses.end() && "Didn't resolve witness?");
   return known->second;
 }
 
@@ -695,7 +677,8 @@
 std::pair<Type, TypeDecl *>
 SpecializedProtocolConformance::getTypeWitnessAndDecl(
                       AssociatedTypeDecl *assocType, 
-                      LazyResolver *resolver) const {
+                      LazyResolver *resolver,
+                      SubstOptions options) const {
   // If we've already created this type witness, return it.
   auto known = TypeWitnesses.find(assocType);
   if (known != TypeWitnesses.end()) {
@@ -708,26 +691,41 @@
   auto substitutionMap =
       genericSig->getSubstitutionMap(GenericSubstitutions);
 
-  auto genericWitnessAndDecl
-    = GenericConformance->getTypeWitnessAndDecl(assocType, resolver);
+  // Local function to determine whether we will end up
+  auto normal = GenericConformance->getRootNormalConformance();
+  auto isTentativeWitness = [&] {
+    if (normal->getState() != ProtocolConformanceState::CheckingTypeWitnesses)
+      return false;
 
-  auto &genericWitness = genericWitnessAndDecl.first;
+    return !normal->hasTypeWitness(assocType, nullptr);
+  };
+
+  auto genericWitnessAndDecl
+    = GenericConformance->getTypeWitnessAndDecl(assocType, resolver, options);
+
+  auto genericWitness = genericWitnessAndDecl.first;
+  if (!genericWitness)
+    return { Type(), nullptr };
+
   auto *typeDecl = genericWitnessAndDecl.second;
 
   // Apply the substitution we computed above
   auto specializedType
-    = genericWitness.subst(substitutionMap);
-  if (!specializedType)
-    specializedType = ErrorType::get(genericWitness);
+    = genericWitness.subst(substitutionMap, options);
+  if (!specializedType) {
+    if (isTentativeWitness())
+      return { Type(), nullptr };
 
-  // If the type witness was unchanged, just copy it directly.
-  if (specializedType.getPointer() == genericWitness.getPointer()) {
-    TypeWitnesses[assocType] = genericWitnessAndDecl;
-    return TypeWitnesses[assocType];
+    specializedType = ErrorType::get(genericWitness);
   }
 
-  TypeWitnesses[assocType] = std::make_pair(specializedType, typeDecl);
-  return TypeWitnesses[assocType];
+  // If we aren't in a case where we used the tentative type witness
+  // information, cache the result.
+  auto specializedWitnessAndDecl = std::make_pair(specializedType, typeDecl);
+  if (!isTentativeWitness() && !specializedType->hasError())
+    TypeWitnesses[assocType] = specializedWitnessAndDecl;
+
+  return specializedWitnessAndDecl;
 }
 
 ProtocolConformanceRef
@@ -892,13 +890,7 @@
   }
 
   // Add any synthesized conformances.
-  if (isa<ClassDecl>(this)) {
-    // FIXME: This is going away soon.
-    if (auto anyObject = getASTContext().getProtocol(
-                           KnownProtocolKind::AnyObject)) {
-      ConformanceTable->addSynthesizedConformance(mutableThis, anyObject);
-    }
-  } else if (auto theEnum = dyn_cast<EnumDecl>(mutableThis)) {
+  if (auto theEnum = dyn_cast<EnumDecl>(mutableThis)) {
     if (theEnum->hasCases() && theEnum->hasOnlyCasesWithoutAssociatedValues()) {
       // Simple enumerations conform to Equatable.
       if (auto equatable = ctx.getProtocol(KnownProtocolKind::Equatable)) {
diff --git a/lib/AST/SourceEntityWalker.cpp b/lib/AST/SourceEntityWalker.cpp
index 842258c..9b423d4 100644
--- a/lib/AST/SourceEntityWalker.cpp
+++ b/lib/AST/SourceEntityWalker.cpp
@@ -18,6 +18,7 @@
 #include "swift/AST/Expr.h"
 #include "swift/AST/Module.h"
 #include "swift/AST/Pattern.h"
+#include "swift/AST/ParameterList.h"
 #include "swift/AST/Stmt.h"
 #include "swift/AST/TypeRepr.h"
 #include "swift/AST/Types.h"
@@ -71,7 +72,7 @@
   bool shouldIgnore(Decl *D, bool &ShouldVisitChildren);
 
   ValueDecl *extractDecl(Expr *Fn) const {
-    if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Fn))
+    if (auto *DRE = dyn_cast<DeclRefExpr>(Fn))
       return DRE->getDecl();
     if (auto ApplyE = dyn_cast<ApplyExpr>(Fn))
       return extractDecl(ApplyE->getFn());
@@ -93,11 +94,34 @@
   unsigned NameLen = 0;
   bool IsExtension = false;
 
-  if (ValueDecl *VD = dyn_cast<ValueDecl>(D)) {
+  if (auto *VD = dyn_cast<ValueDecl>(D)) {
     if (VD->hasName() && !VD->isImplicit())
       NameLen = VD->getName().getLength();
 
-  } else if (ExtensionDecl *ED = dyn_cast<ExtensionDecl>(D)) {
+    auto ReportParamList = [&](ParameterList *PL) {
+      for (auto *PD : *PL) {
+        auto Loc = PD->getArgumentNameLoc();
+        if (Loc.isInvalid())
+          continue;
+        if (!SEWalker.visitDeclarationArgumentName(PD->getArgumentName(), Loc,
+                                                   VD)) {
+          Cancelled = true;
+          return true;
+        }
+      }
+      return false;
+    };
+
+    if (auto AF = dyn_cast<AbstractFunctionDecl>(VD)) {
+      for (auto *PL : AF->getParameterLists())
+        if (ReportParamList(PL))
+          return false;
+    }
+    if (auto SD = dyn_cast<SubscriptDecl>(VD)) {
+      if (ReportParamList(SD->getIndices()))
+        return false;
+    }
+  } else if (auto *ED = dyn_cast<ExtensionDecl>(D)) {
     SourceRange SR = ED->getExtendedTypeLoc().getSourceRange();
     Loc = SR.Start;
     if (Loc.isValid())
@@ -224,7 +248,7 @@
   if (!SEWalker.walkToExprPre(E))
     return { false, E };
 
-  if (ConstructorRefCallExpr *CtorRefE = dyn_cast<ConstructorRefCallExpr>(E))
+  if (auto *CtorRefE = dyn_cast<ConstructorRefCallExpr>(E))
     CtorRefs.push_back(CtorRefE);
 
   if (E->isImplicit())
@@ -232,7 +256,7 @@
 
   Optional<AccessKind> OpAccess = getAccessKind(E);
 
-  if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {
+  if (auto *DRE = dyn_cast<DeclRefExpr>(E)) {
     if (auto *module = dyn_cast<ModuleDecl>(DRE->getDecl())) {
       if (!passReference(ModuleEntity(module),
                          std::make_pair(module->getName(), E->getLoc())))
@@ -243,7 +267,7 @@
                                         OpAccess))) {
       return { false, nullptr };
     }
-  } else if (MemberRefExpr *MRE = dyn_cast<MemberRefExpr>(E)) {
+  } else if (auto *MRE = dyn_cast<MemberRefExpr>(E)) {
     // Visit in source order.
     if (!MRE->getBase()->walk(*this))
       return { false, nullptr };
@@ -265,7 +289,7 @@
                                          OpAccess)))
       return { false, nullptr };
 
-  } else if (SubscriptExpr *SE = dyn_cast<SubscriptExpr>(E)) {
+  } else if (auto *SE = dyn_cast<SubscriptExpr>(E)) {
     // Visit in source order.
     if (!SE->getBase()->walk(*this))
       return { false, nullptr };
@@ -292,7 +316,7 @@
       return { false, nullptr };
     return { false, E };
 
-  } else if (BinaryExpr *BinE = dyn_cast<BinaryExpr>(E)) {
+  } else if (auto *BinE = dyn_cast<BinaryExpr>(E)) {
     // Visit in source order.
     if (!BinE->getArg()->getElement(0)->walk(*this))
       return { false, nullptr };
@@ -322,7 +346,7 @@
 
   if (auto IdT = dyn_cast<ComponentIdentTypeRepr>(T)) {
     if (ValueDecl *VD = IdT->getBoundDecl()) {
-      if (ModuleDecl *ModD = dyn_cast<ModuleDecl>(VD))
+      if (auto *ModD = dyn_cast<ModuleDecl>(VD))
         return passReference(ModD, std::make_pair(IdT->getIdentifier(),
                                                   IdT->getIdLoc()));
 
@@ -428,7 +452,7 @@
   TypeDecl *CtorTyRef = nullptr;
   ExtensionDecl *ExtDecl = nullptr;
 
-  if (TypeDecl *TD = dyn_cast<TypeDecl>(D)) {
+  if (auto *TD = dyn_cast<TypeDecl>(D)) {
     if (!CtorRefs.empty() && Loc.isValid()) {
       Expr *Fn = CtorRefs.back()->getFn();
       if (Fn->getLoc() == Loc.getBaseNameLoc()) {
@@ -557,6 +581,11 @@
   return true;
 }
 
+bool SourceEntityWalker::
+visitDeclarationArgumentName(Identifier Name, SourceLoc Start, ValueDecl *D) {
+  return true;
+}
+
 bool SourceEntityWalker::visitModuleReference(ModuleEntity Mod,
                                               CharSourceRange Range) {
   return true;
diff --git a/lib/AST/SubstitutionMap.cpp b/lib/AST/SubstitutionMap.cpp
index 6553953..da9b7bb 100644
--- a/lib/AST/SubstitutionMap.cpp
+++ b/lib/AST/SubstitutionMap.cpp
@@ -195,13 +195,6 @@
   auto genericSig = getGenericSignature();
   auto &mod = *proto->getModuleContext();
 
-  // HACK: Deal with AnyObject conformances, which get magically dropped in
-  // frustrating ways.
-  // FIXME: This hack dies with AnyObject-as-a-protocol.
-  if (proto->isSpecificProtocol(KnownProtocolKind::AnyObject) &&
-      genericSig->requiresClass(type, mod))
-    return ProtocolConformanceRef(proto);
-
   // If the type doesn't conform to this protocol, fail.
   if (!genericSig->conformsToProtocol(type, proto, mod))
     return None;
@@ -459,9 +452,8 @@
       // AnyObject or an @objc protocol.
       if (citer->isAbstract() && replacement->isExistentialType()) {
         auto *proto = citer->getRequirement();
-        assert((proto->isSpecificProtocol(KnownProtocolKind::AnyObject) ||
-                proto->isObjC()) &&
-               "an existential type can conform only to AnyObject or an "
+        assert(proto->isObjC() &&
+               "an existential type can conform only to an "
                "@objc-protocol");
         continue;
       }
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index 89860ac..eff1302 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -50,6 +50,16 @@
   return Type();
 }
 
+Type
+QueryTypeSubstitutionMapOrIdentity::operator()(SubstitutableType *type) const {
+  auto key = type->getCanonicalType()->castTo<SubstitutableType>();
+  auto known = substitutions.find(key);
+  if (known != substitutions.end() && known->second)
+    return known->second;
+  
+  return type;
+}
+
 Type QuerySubstitutionMap::operator()(SubstitutableType *type) const {
   auto key = cast<SubstitutableType>(type->getCanonicalType());
   return subMap.lookupSubstitution(key);
@@ -229,9 +239,7 @@
   auto *protoDecl = type->getDecl();
 
   hasExplicitAnyObject = false;
-  containsNonObjCProtocol =
-    !(protoDecl->isSpecificProtocol(KnownProtocolKind::AnyObject) ||
-      protoDecl->isObjC());
+  containsNonObjCProtocol = !protoDecl->isObjC();
 
   singleProtocol = type;
 }
@@ -251,9 +259,7 @@
 
   for (auto member : members) {
     auto *protoDecl = member->castTo<ProtocolType>()->getDecl();
-    containsNonObjCProtocol |=
-      !(protoDecl->isSpecificProtocol(KnownProtocolKind::AnyObject) ||
-        protoDecl->isObjC());
+    containsNonObjCProtocol |= !protoDecl->isObjC();
   }
 
   singleProtocol = nullptr;
@@ -289,14 +295,7 @@
 }
 
 bool ExistentialLayout::isAnyObject() const {
-  // New implementation
-  auto protocols = getProtocols();
-  if (hasExplicitAnyObject && !superclass && protocols.empty())
-    return true;
-
-  // Old implementation -- FIXME: remove this
-  return protocols.size() == 1 &&
-    protocols[0]->getDecl()->isSpecificProtocol(KnownProtocolKind::AnyObject);
+  return (hasExplicitAnyObject && !superclass && getProtocols().empty());
 }
 
 bool TypeBase::isObjCExistentialType() {
@@ -2317,13 +2316,42 @@
   llvm_unreachable("Unhandled ForeignRepresentableKind in switch.");
 }
 
-/// Is t1 not just a subtype of t2, but one such that its values are
-/// trivially convertible to values of the other?
-static bool canOverride(CanType t1, CanType t2,
-                        OverrideMatchMode matchMode,
-                        bool isParameter,
-                        bool insideOptional,
-                        LazyResolver *resolver) {
+static bool isABICompatibleEvenAddingOptional(CanType t1, CanType t2) {
+  // Classes, class-constrained archetypes, and pure-ObjC existential
+  // types all have single retainable pointer representation; optionality
+  // change is allowed.
+  // NOTE: This doesn't use isAnyClassReferenceType because we want it to
+  // return a conservative answer for dependent types. There's probably
+  // a better answer here, though.
+  if ((t1->mayHaveSuperclass() || t1->isObjCExistentialType()) &&
+      (t2->mayHaveSuperclass() || t2->isObjCExistentialType())) {
+    return true;
+  }
+
+  // Class metatypes are ABI-compatible even under optionality change.
+  if (auto metaTy1 = dyn_cast<MetatypeType>(t1)) {
+    if (auto metaTy2 = dyn_cast<MetatypeType>(t2)) {
+      if (metaTy1.getInstanceType().getClassOrBoundGenericClass() &&
+          metaTy2.getInstanceType().getClassOrBoundGenericClass()) {
+        return true;
+      }
+    }
+  }
+
+  return false;
+}
+
+namespace {
+  enum class ParameterPosition {
+    NotParameter,
+    Parameter,
+    ParameterTupleElement
+  };
+} // end anonymous namespace
+
+static bool matches(CanType t1, CanType t2, TypeMatchOptions matchMode,
+                    ParameterPosition paramPosition, bool insideOptional,
+                    LazyResolver *resolver) {
   if (t1 == t2) return true;
 
   // First try unwrapping optionals.
@@ -2333,26 +2361,28 @@
     if (auto obj2 = t2.getAnyOptionalObjectType()) {
       // Optional-to-optional.
       if (auto obj1 = t1.getAnyOptionalObjectType()) {
-        // Allow T? and T! to freely override one another.
-        return canOverride(obj1, obj2, matchMode,
-                           /*isParameter=*/false,
-                           /*insideOptional=*/true,
-                           resolver);
+        // Allow T? and T! to freely match one another.
+        return matches(obj1, obj2, matchMode, ParameterPosition::NotParameter,
+                       /*insideOptional=*/true, resolver);
       }
 
       // Value-to-optional.
-      return canOverride(t1, obj2, matchMode,
-                         /*isParameter=*/false,
-                         /*insideOptional=*/true,
-                         resolver);
+      if (matchMode.contains(TypeMatchFlags::AllowABICompatible)) {
+        if (isABICompatibleEvenAddingOptional(t1, obj2))
+          return true;
+      }
+      if (matchMode.contains(TypeMatchFlags::AllowOverride) ||
+          matchMode.contains(TypeMatchFlags::AllowTopLevelOptionalMismatch)) {
+        return matches(t1, obj2, matchMode, ParameterPosition::NotParameter,
+                       /*insideOptional=*/true, resolver);
+      }
 
-    } else if (matchMode == OverrideMatchMode::AllowTopLevelOptionalMismatch) {
+    } else if (matchMode.contains(
+                 TypeMatchFlags::AllowTopLevelOptionalMismatch)) {
       // Optional-to-value, normally disallowed.
       if (auto obj1 = t1.getAnyOptionalObjectType()) {
-        return canOverride(obj1, t2, matchMode,
-                           /*isParameter=*/false,
-                           /*insideOptional=*/true,
-                           resolver);
+        return matches(obj1, t2, matchMode, ParameterPosition::NotParameter,
+                       /*insideOptional=*/true, resolver);
       }
     }
   }
@@ -2361,57 +2391,73 @@
   if (auto tuple2 = dyn_cast<TupleType>(t2)) {
     // We only ever look into singleton tuples on the RHS if we're
     // certain that the LHS isn't also a singleton tuple.
+    ParameterPosition elementPosition;
+    switch (paramPosition) {
+    case ParameterPosition::NotParameter:
+    case ParameterPosition::ParameterTupleElement:
+      elementPosition = ParameterPosition::NotParameter;
+      break;
+    case ParameterPosition::Parameter:
+      elementPosition = ParameterPosition::ParameterTupleElement;
+      break;
+    }
+
     auto tuple1 = dyn_cast<TupleType>(t1);
     if (!tuple1 || tuple1->getNumElements() != tuple2->getNumElements()) {
-      if (tuple2->getNumElements() == 1)
-        return canOverride(t1, tuple2.getElementType(0),
-                           matchMode,
-                           isParameter,
-                           /*insideOptional=*/false,
-                           resolver);
+      if (tuple2->getNumElements() == 1) {
+        return matches(t1, tuple2.getElementType(0), matchMode, elementPosition,
+                       /*insideOptional=*/false, resolver);
+      }
       return false;
     }
 
     for (auto i : indices(tuple1.getElementTypes())) {
-      if (!canOverride(tuple1.getElementType(i),
-                       tuple2.getElementType(i),
-                       matchMode,
-                       isParameter,
-                       /*insideOptional=*/false,
-                       resolver))
+      if (!matches(tuple1.getElementType(i), tuple2.getElementType(i),
+                   matchMode, elementPosition, /*insideOptional=*/false,
+                   resolver)){
         return false;
+      }
     }
     return true;
   }
 
-  // Function-to-function.  (Polymorphic functions?)
-  if (auto fn2 = dyn_cast<FunctionType>(t2)) {
-    auto fn1 = dyn_cast<FunctionType>(t1);
+  // Function-to-function.
+  if (auto fn2 = dyn_cast<AnyFunctionType>(t2)) {
+    auto fn1 = dyn_cast<AnyFunctionType>(t1);
     if (!fn1)
       return false;
 
-    // Allow the base type to be throwing even if the overriding type isn't
+    // FIXME: Handle generic functions in non-ABI matches.
+    if (!matchMode.contains(TypeMatchFlags::AllowABICompatible)) {
+      if (!isa<FunctionType>(t1) || !isa<FunctionType>(t2))
+        return false;
+    }
+
+    // When checking overrides, allow the base type to be throwing even if the
+    // overriding type isn't.
     auto ext1 = fn1->getExtInfo();
     auto ext2 = fn2->getExtInfo();
-    if (ext2.throws()) ext1 = ext1.withThrows(true);
+    if (matchMode.contains(TypeMatchFlags::AllowOverride)) {
+      if (ext2.throws()) {
+        ext1 = ext1.withThrows(true);
+      }
+    }
     if (ext1 != ext2)
       return false;
 
     // Inputs are contravariant, results are covariant.
-    return (canOverride(fn2.getInput(), fn1.getInput(),
-                        matchMode,
-                        /*isParameter=*/true,
-                        /*insideOptional=*/false,
-                        resolver) &&
-            canOverride(fn1.getResult(), fn2.getResult(),
-                        matchMode,
-                        /*isParameter=*/false,
-                        /*insideOptional=*/false,
-                        resolver));
+    return (matches(fn2.getInput(), fn1.getInput(), matchMode,
+                    ParameterPosition::Parameter, /*insideOptional=*/false,
+                    resolver) &&
+            matches(fn1.getResult(), fn2.getResult(), matchMode,
+                    ParameterPosition::NotParameter, /*insideOptional=*/false,
+                    resolver));
   }
 
-  if (matchMode == OverrideMatchMode::AllowNonOptionalForIUOParam &&
-      isParameter && !insideOptional) {
+  if (matchMode.contains(TypeMatchFlags::AllowNonOptionalForIUOParam) &&
+      (paramPosition == ParameterPosition::Parameter ||
+       paramPosition == ParameterPosition::ParameterTupleElement) &&
+      !insideOptional) {
     // Allow T to override T! in certain cases.
     if (auto obj1 = t1->getImplicitlyUnwrappedOptionalObjectType()) {
       t1 = obj1->getCanonicalType();
@@ -2420,16 +2466,22 @@
   }
 
   // Class-to-class.
-  return t2->isExactSuperclassOf(t1);
+  if (matchMode.contains(TypeMatchFlags::AllowOverride))
+    if (t2->isExactSuperclassOf(t1))
+      return true;
+
+  if (matchMode.contains(TypeMatchFlags::AllowABICompatible))
+    if (isABICompatibleEvenAddingOptional(t1, t2))
+      return true;
+
+  return false;
 }
 
-bool TypeBase::canOverride(Type other, OverrideMatchMode matchMode,
-                           LazyResolver *resolver) {
-  return ::canOverride(getCanonicalType(), other->getCanonicalType(),
-                       matchMode,
-                       /*isParameter=*/false,
-                       /*insideOptional=*/false,
-                       resolver);
+bool TypeBase::matches(Type other, TypeMatchOptions matchMode,
+                       LazyResolver *resolver) {
+  return ::matches(getCanonicalType(), other->getCanonicalType(), matchMode,
+                   ParameterPosition::NotParameter, /*insideOptional=*/false,
+                   resolver);
 }
 
 /// getNamedElementId - If this tuple has a field with the specified name,
@@ -2910,17 +2962,11 @@
     if (!conformance) return failed();
     if (!conformance->isConcrete()) return failed();
 
-    // If we have an unsatisfied type witness while we're checking the
-    // conformances we're supposed to skip this conformance's unsatisfied type
-    // witnesses, and we have an unsatisfied type witness, return
-    // "missing".
-    if (conformance->getConcrete()->getRootNormalConformance()->getState()
-          == ProtocolConformanceState::CheckingTypeWitnesses &&
-        !conformance->getConcrete()->hasTypeWitness(assocType, nullptr))
-      return failed();
-
+    // Retrieve the type witness.
     auto witness =
-      conformance->getConcrete()->getTypeWitness(assocType, resolver);
+      conformance->getConcrete()->getTypeWitness(assocType, resolver, options);
+    if (!witness)
+      return failed();
 
     // This is a hacky feature allowing code completion to migrate to
     // using Type::subst() without changing output.
@@ -3943,7 +3989,7 @@
     return false;
 
   // A 'public' typealias can have an 'internal' type.
-  if (NameAliasType *NAT = dyn_cast<NameAliasType>(Ty.getPointer()))
+  if (auto *NAT = dyn_cast<NameAliasType>(Ty.getPointer()))
     return NAT->getDecl()->isPrivateStdlibDecl(whitelistProtocols);
 
   if (auto Paren = dyn_cast<ParenType>(Ty.getPointer()))
diff --git a/lib/AST/TypeRepr.cpp b/lib/AST/TypeRepr.cpp
index 120ca03..c862643 100644
--- a/lib/AST/TypeRepr.cpp
+++ b/lib/AST/TypeRepr.cpp
@@ -336,7 +336,7 @@
 
 void ComponentIdentTypeRepr::printImpl(ASTPrinter &Printer,
                                        const PrintOptions &Opts) const {
-  if (TypeDecl *TD = dyn_cast_or_null<TypeDecl>(getBoundDecl())) {
+  if (auto *TD = dyn_cast_or_null<TypeDecl>(getBoundDecl())) {
     if (auto MD = dyn_cast<ModuleDecl>(TD))
       Printer.printModuleRef(MD, getIdentifier());
     else
diff --git a/lib/AST/USRGeneration.cpp b/lib/AST/USRGeneration.cpp
index 682ca45..174464d 100644
--- a/lib/AST/USRGeneration.cpp
+++ b/lib/AST/USRGeneration.cpp
@@ -149,18 +149,13 @@
                  isa<TypeDecl>(D))) // nested types aren't supported
     return false;
 
-  if (const ValueDecl *VD = dyn_cast<ValueDecl>(D)) {
-    if (auto *PD = dyn_cast<ProtocolDecl>(D))
-      if (auto known = PD->getKnownProtocolKind())
-        if (known == KnownProtocolKind::AnyObject)
-          return false;
-
+  if (const auto *VD = dyn_cast<ValueDecl>(D)) {
     if (isa<EnumElementDecl>(VD))
       return true;
     return objc_translation::isVisibleToObjC(VD, Accessibility::Internal);
   }
 
-  if (const ExtensionDecl *ED = dyn_cast<ExtensionDecl>(D)) {
+  if (const auto *ED = dyn_cast<ExtensionDecl>(D)) {
     if (auto ExtendedType = ED->getExtendedType()) {
       auto baseClass = ExtendedType->getClassOrBoundGenericClass();
       return baseClass && shouldUseObjCUSR(baseClass) && !baseClass->isForeign();
diff --git a/lib/Basic/Version.cpp b/lib/Basic/Version.cpp
index aebcb27..9ca9f7c 100644
--- a/lib/Basic/Version.cpp
+++ b/lib/Basic/Version.cpp
@@ -226,6 +226,11 @@
   return isValidVersion ? Optional<Version>(TheVersion) : None;
 }
 
+Version::Version(StringRef VersionString,
+                 SourceLoc Loc,
+                 DiagnosticEngine *Diags)
+  : Version(*parseVersionString(VersionString, Loc, Diags))
+{}
 
 Version Version::getCurrentCompilerVersion() {
 #ifdef SWIFT_COMPILER_VERSION
diff --git a/lib/ClangImporter/ClangImporter.cpp b/lib/ClangImporter/ClangImporter.cpp
index 5847118..236f4e0 100644
--- a/lib/ClangImporter/ClangImporter.cpp
+++ b/lib/ClangImporter/ClangImporter.cpp
@@ -711,22 +711,73 @@
 }
 
 bool ClangImporter::canReadPCH(StringRef PCHFilename) {
-  return clang::ASTReader::isAcceptableASTFile(PCHFilename,
-    Impl.Instance->getFileManager(),
-    Impl.Instance->getPCHContainerReader(),
-    Impl.Instance->getLangOpts(),
-    Impl.Instance->getTargetOpts(),
-    Impl.Instance->getPreprocessorOpts(),
-    Impl.Instance->getSpecificModuleCachePath());
+  if (!llvm::sys::fs::exists(PCHFilename))
+    return false;
+
+  // FIXME: The following attempts to do an initial ReadAST invocation to verify
+  // the PCH, without affecting the existing CompilerInstance.
+  // Look into combining creating the ASTReader along with verification + update
+  // if necesary, so that we can create and use one ASTReader in the common case
+  // when there is no need for update.
+
+  CompilerInstance &CI = *Impl.Instance;
+  auto clangDiags = CompilerInstance::createDiagnostics(
+                                              new clang::DiagnosticOptions());
+  clang::SourceManager clangSrcMgr(*clangDiags, CI.getFileManager());
+  auto FID = clangSrcMgr.createFileID(
+                        llvm::make_unique<ZeroFilledMemoryBuffer>(1, "<main>"));
+  clangSrcMgr.setMainFileID(FID);
+  clang::Preprocessor PP(CI.getInvocation().getPreprocessorOptsPtr(),
+                         *clangDiags,
+                         CI.getLangOpts(),
+                         clangSrcMgr,
+                         CI.getPCMCache(),
+                         CI.getPreprocessor().getHeaderSearchInfo(), CI,
+                         /*IILookup=*/nullptr,
+                         /*OwnsHeaderSearch=*/false);
+  PP.Initialize(CI.getTarget());
+  clang::ASTContext ctx(CI.getLangOpts(), clangSrcMgr,
+                        PP.getIdentifierTable(), PP.getSelectorTable(),
+                        PP.getBuiltinInfo());
+
+  std::unique_ptr<clang::ASTReader> Reader(new clang::ASTReader(
+      PP, ctx, CI.getPCHContainerReader(),
+      CI.getFrontendOpts().ModuleFileExtensions,
+      CI.getHeaderSearchOpts().Sysroot,
+      /*DisableValidation*/ false,
+      /*AllowPCHWithCompilerErrors*/ false,
+      /*AllowConfigurationMismatch*/ false,
+      /*ValidateSystemInputs*/ true));
+  ctx.InitBuiltinTypes(CI.getTarget());
+
+  auto result = Reader->ReadAST(PCHFilename,
+                  clang::serialization::MK_PCH,
+                  clang::SourceLocation(),
+                  clang::ASTReader::ARR_None);
+  switch (result) {
+  case clang::ASTReader::Success:
+    return true;
+  case clang::ASTReader::Failure:
+  case clang::ASTReader::Missing:
+  case clang::ASTReader::OutOfDate:
+  case clang::ASTReader::VersionMismatch:
+    return false;
+  case clang::ASTReader::ConfigurationMismatch:
+  case clang::ASTReader::HadErrors:
+    assert(0 && "unexpected ASTReader failure for PCH validation");
+    return false;
+  }
 }
 
 Optional<std::string>
 ClangImporter::getPCHFilename(const ClangImporterOptions &ImporterOptions,
-                              const std::string &SwiftPCHHash) {
+                              StringRef SwiftPCHHash, bool &isExplicit) {
   if (llvm::sys::path::extension(ImporterOptions.BridgingHeader)
         .endswith(PCH_EXTENSION)) {
+    isExplicit = true;
     return ImporterOptions.BridgingHeader;
   }
+  isExplicit = false;
 
   const auto &BridgingHeader = ImporterOptions.BridgingHeader;
   const auto &PCHOutputDir = ImporterOptions.PrecompiledHeaderOutputDir;
@@ -749,18 +800,27 @@
 
 Optional<std::string>
 ClangImporter::getOrCreatePCH(const ClangImporterOptions &ImporterOptions,
-                              const std::string &SwiftPCHHash) {
-  auto PCHFilename = getPCHFilename(ImporterOptions, SwiftPCHHash);
+                              StringRef SwiftPCHHash) {
+  bool isExplicit;
+  auto PCHFilename = getPCHFilename(ImporterOptions, SwiftPCHHash,
+                                    isExplicit);
   if (!PCHFilename.hasValue()) {
     return None;
   }
-  if (!canReadPCH(PCHFilename.getValue())) {
+  if (!isExplicit && !canReadPCH(PCHFilename.getValue())) {
     SmallString<256> Message;
     llvm::raw_svector_ostream OS(Message);
     auto Diags = new clang::TextDiagnosticPrinter {
       llvm::errs(),
       &Impl.Instance->getDiagnosticOpts()
     };
+    StringRef parentDir = llvm::sys::path::parent_path(PCHFilename.getValue());
+    std::error_code EC = llvm::sys::fs::create_directories(parentDir);
+    if (EC) {
+      llvm::errs() << "failed to create directory '" << parentDir << "': "
+        << EC.message();
+      return None;
+    }
     auto FailedToEmit = emitBridgingPCH(ImporterOptions.BridgingHeader,
                                         PCHFilename.getValue(),
                                         Diags);
diff --git a/lib/ClangImporter/ImportDecl.cpp b/lib/ClangImporter/ImportDecl.cpp
index 84a0282..6d7de7f 100644
--- a/lib/ClangImporter/ImportDecl.cpp
+++ b/lib/ClangImporter/ImportDecl.cpp
@@ -1186,17 +1186,19 @@
   return constructor;
 }
 
-static void populateInheritedTypes(ClangImporter::Implementation &Impl,
-                                   NominalTypeDecl *nominal,
-                                   ArrayRef<ProtocolDecl *> protocols) {
+static void populateInheritedTypes(NominalTypeDecl *nominal,
+                                   ArrayRef<ProtocolDecl *> protocols,
+                                   Type superclass = Type()) {
   SmallVector<TypeLoc, 4> inheritedTypes;
-  inheritedTypes.resize(protocols.size());
-  for_each(MutableArrayRef<TypeLoc>(inheritedTypes),
-           ArrayRef<ProtocolDecl *>(protocols),
+  if (superclass)
+    inheritedTypes.push_back(TypeLoc::withoutLoc(superclass));
+  inheritedTypes.resize(protocols.size() + (superclass ? 1 : 0));
+  for_each(MutableArrayRef<TypeLoc>(inheritedTypes).drop_front(superclass?1:0),
+           protocols,
            [](TypeLoc &tl, ProtocolDecl *proto) {
              tl = TypeLoc::withoutLoc(proto->getDeclaredType());
            });
-  nominal->setInherited(Impl.SwiftContext.AllocateCopy(inheritedTypes));
+  nominal->setInherited(nominal->getASTContext().AllocateCopy(inheritedTypes));
   nominal->setCheckedInheritanceClause();
 }
 
@@ -1206,7 +1208,7 @@
                      StructDecl *structDecl,
                      ArrayRef<KnownProtocolKind> synthesizedProtocolAttrs,
                      ArrayRef<ProtocolDecl *> protocols) {
-  populateInheritedTypes(Impl, structDecl, protocols);
+  populateInheritedTypes(structDecl, protocols);
 
   // Note synthesized protocols
   for (auto kind : synthesizedProtocolAttrs)
@@ -4693,9 +4695,14 @@
   addObjCAttribute(theClass, None);
   Impl.registerExternalDecl(theClass);
 
-  SmallVector<ProtocolDecl *, 4> protocols;
-  theClass->getImplicitProtocols(protocols);
-  addObjCProtocolConformances(theClass, protocols);
+  auto *cfObjectProto =
+      Impl.SwiftContext.getProtocol(KnownProtocolKind::CFObject);
+  if (cfObjectProto) {
+    populateInheritedTypes(theClass, cfObjectProto, superclass);
+    auto *attr = new (Impl.SwiftContext) SynthesizedProtocolAttr(
+        KnownProtocolKind::CFObject);
+    theClass->getAttrs().add(attr);
+  }
 
   // Look for bridging attributes on the clang record.  We can
   // just check the most recent redeclaration, which will inherit
@@ -4735,7 +4742,7 @@
   Decl *importedDecl = nullptr;
   if (getVersion() >= getActiveSwiftVersion())
     importedDecl = Impl.importDecl(decl, ImportNameVersion::ForTypes);
-  if (!importedDecl)
+  if (!importedDecl && getVersion() != getActiveSwiftVersion())
     importedDecl = Impl.importDecl(decl, getActiveSwiftVersion());
   auto typeDecl = dyn_cast_or_null<TypeDecl>(importedDecl);
   if (!typeDecl)
@@ -4922,7 +4929,6 @@
   // implementation in the standard library.
   transferKnown(KnownProtocolKind::Equatable);
   transferKnown(KnownProtocolKind::Hashable);
-  transferKnown(KnownProtocolKind::Comparable);
   bool transferredObjCBridgeable =
     transferKnown(KnownProtocolKind::ObjectiveCBridgeable);
 
@@ -5417,7 +5423,7 @@
                                  FinalAttr(/*IsImplicit=*/true));
 
   // Import the getter.
-  FuncDecl *swiftGetter = dyn_cast_or_null<FuncDecl>(
+  auto *swiftGetter = dyn_cast_or_null<FuncDecl>(
       importFunctionDecl(getter, getterName, None, property));
   if (!swiftGetter)
     return nullptr;
@@ -7297,7 +7303,7 @@
   if (!swiftDecl)
     return nullptr;
 
-  if (auto nominal = dyn_cast<NominalTypeDecl>(swiftDecl))
+  if (auto nominal = dynCastIgnoringCompatibilityAlias<NominalTypeDecl>(swiftDecl))
     return nominal;
   if (auto extension = dyn_cast<ExtensionDecl>(swiftDecl))
     return extension;
@@ -7362,7 +7368,8 @@
     auto importedDecl = importDecl(context.getTypedefName(), CurrentVersion);
     if (!importedDecl) return nullptr;
 
-    importedDC = dyn_cast_or_null<DeclContext>(importedDecl);
+    // Dig out the imported DeclContext.
+    importedDC = dynCastIgnoringCompatibilityAlias<NominalTypeDecl>(importedDecl);
     break;
   }
 
diff --git a/lib/ClangImporter/ImporterImpl.h b/lib/ClangImporter/ImporterImpl.h
index 5cd8840..b70a7b1 100644
--- a/lib/ClangImporter/ImporterImpl.h
+++ b/lib/ClangImporter/ImporterImpl.h
@@ -1128,6 +1128,8 @@
       ASD->setSetterAccessibility(access);
     // All imported decls are constructed fully validated.
     D->setValidationStarted();
+    if (auto AFD = dyn_cast<AbstractFunctionDecl>(static_cast<Decl *>(D)))
+      AFD->setNeedsNewVTableEntry(false);
     return D;
   }
 
diff --git a/lib/Demangling/CMakeLists.txt b/lib/Demangling/CMakeLists.txt
index d92b3e0..8f83b92 100644
--- a/lib/Demangling/CMakeLists.txt
+++ b/lib/Demangling/CMakeLists.txt
@@ -5,6 +5,7 @@
   NodeDumper.cpp
   NodePrinter.cpp
   OldDemangler.cpp
+  OldRemangler.cpp
   Punycode.cpp
   Remangler.cpp
   )
diff --git a/lib/Demangling/Demangler.cpp b/lib/Demangling/Demangler.cpp
index 40311af..aec05e8 100644
--- a/lib/Demangling/Demangler.cpp
+++ b/lib/Demangling/Demangler.cpp
@@ -505,7 +505,7 @@
     case 'o':
       return createNode(Node::Kind::Module, MANGLING_MODULE_OBJC);
     case 'C':
-      return createNode(Node::Kind::Module, MANGLING_MODULE_CLANG_IMPORTER);
+      return createNode(Node::Kind::Module, MANGLING_MODULE_C);
     case 'g': {
       NodePointer OptionalTy =
         createType(createWithChildren(Node::Kind::BoundGenericEnum,
diff --git a/lib/Demangling/NodePrinter.cpp b/lib/Demangling/NodePrinter.cpp
index 0ca158e..26502d4 100644
--- a/lib/Demangling/NodePrinter.cpp
+++ b/lib/Demangling/NodePrinter.cpp
@@ -1576,7 +1576,7 @@
     } else if (c == 'N') {
       name = "_NativeRefCountedObject";
     } else if (c == 'C') {
-      name = "_Class";
+      name = "AnyObject";
     } else if (c == 'D') {
       name = "_NativeClass";
     } else if (c == 'T') {
diff --git a/lib/Demangling/OldDemangler.cpp b/lib/Demangling/OldDemangler.cpp
index 2c197f4..d0bf884 100644
--- a/lib/Demangling/OldDemangler.cpp
+++ b/lib/Demangling/OldDemangler.cpp
@@ -863,8 +863,7 @@
     if (Mangled.nextIf('o'))
       return Factory.createNode(Node::Kind::Module, MANGLING_MODULE_OBJC);
     if (Mangled.nextIf('C'))
-      return Factory.createNode(Node::Kind::Module,
-                                MANGLING_MODULE_CLANG_IMPORTER);
+      return Factory.createNode(Node::Kind::Module, MANGLING_MODULE_C);
     if (Mangled.nextIf('a'))
       return createSwiftType(Node::Kind::Structure, "Array");
     if (Mangled.nextIf('b'))
diff --git a/lib/Demangling/OldRemangler.cpp b/lib/Demangling/OldRemangler.cpp
new file mode 100644
index 0000000..8089ebe
--- /dev/null
+++ b/lib/Demangling/OldRemangler.cpp
@@ -0,0 +1,1753 @@
+//===--- OldRemangler.cpp - Old Swift Re-mangler --------------------------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+//
+//  This file implements the remangler, which turns a demangling parse
+//  tree back into a mangled string.  This is useful for tools which
+//  want to extract subtrees from mangled strings.
+//
+//===----------------------------------------------------------------------===//
+
+#include "swift/Demangling/Demangler.h"
+#include "swift/Demangling/Punycode.h"
+#include "swift/Strings.h"
+#include <vector>
+#include <cstdio>
+#include <cstdlib>
+#include <unordered_map>
+
+using namespace swift;
+using namespace Demangle;
+
+[[noreturn]]
+static void unreachable(const char *Message) {
+  fprintf(stderr, "fatal error: %s\n", Message);
+  std::abort();
+}
+
+/// Translate the given operator character into its mangled form.
+///
+/// Current operator characters:   @/=-+*%<>!&|^~ and the special operator '..'
+static char mangleOperatorChar(char op) {
+  switch (op) {
+  case '&': return 'a'; // 'and'
+  case '@': return 'c'; // 'commercial at sign'
+  case '/': return 'd'; // 'divide'
+  case '=': return 'e'; // 'equal'
+  case '>': return 'g'; // 'greater'
+  case '<': return 'l'; // 'less'
+  case '*': return 'm'; // 'multiply'
+  case '!': return 'n'; // 'negate'
+  case '|': return 'o'; // 'or'
+  case '+': return 'p'; // 'plus'
+  case '?': return 'q'; // 'question'
+  case '%': return 'r'; // 'remainder'
+  case '-': return 's'; // 'subtract'
+  case '~': return 't'; // 'tilde'
+  case '^': return 'x'; // 'xor'
+  case '.': return 'z'; // 'zperiod' (the z is silent)
+  default:
+    return op;
+  }
+}
+
+static bool isNonAscii(StringRef str) {
+  for (unsigned char c : str) {
+    if (c >= 0x80)
+      return true;
+  }
+  return false;
+}
+
+static char mangleOperatorKind(OperatorKind operatorKind) {
+  switch (operatorKind) {
+  case OperatorKind::NotOperator: unreachable("invalid");
+  case OperatorKind::Infix: return 'i';
+  case OperatorKind::Prefix: return 'p';
+  case OperatorKind::Postfix: return 'P';
+  }
+  unreachable("invalid");
+}
+
+static void mangleIdentifier(StringRef ident, OperatorKind operatorKind,
+                             bool usePunycode, DemanglerPrinter &out) {
+  std::string punycodeBuf;
+  if (usePunycode) {
+    // If the identifier contains non-ASCII character, we mangle 
+    // with an initial X and Punycode the identifier string.
+    if (isNonAscii(ident)) {
+      out << 'X';
+      Punycode::encodePunycodeUTF8(ident, punycodeBuf);
+      ident = punycodeBuf;
+    }
+  }
+
+  // Mangle normal identifiers as
+  //   count identifier-char+
+  // where the count is the number of characters in the identifier,
+  // and where individual identifier characters represent themselves.
+  if (operatorKind == OperatorKind::NotOperator) {
+    out << ident.size() << ident;
+    return;
+  }
+
+  // Mangle operator identifiers as
+  //   operator ::= 'o' operator-fixity count operator-char+
+  //   operator-fixity ::= 'p' // prefix
+  //   operator-fixity ::= 'P' // postfix
+  //   operator-fixity ::= 'i' // infix
+  // where the count is the number of characters in the operator,
+  // and where the individual operator characters are translated.
+  out << 'o' << mangleOperatorKind(operatorKind);
+
+  // Mangle ASCII operators directly.
+  out << ident.size();
+  for (char ch : ident) {
+    out << mangleOperatorChar(ch);
+  }
+}
+
+void Demangle::mangleIdentifier(const char *data, size_t length,
+                                OperatorKind operatorKind,
+                                std::string &out, bool usePunycode) {
+  DemanglerPrinter printer;
+  ::mangleIdentifier(StringRef(data, length), operatorKind,
+                     usePunycode, printer);
+  out = std::move(printer).str();
+}
+
+namespace {
+  struct DeepHasher {
+    size_t value = 0;
+
+    void combine(size_t newValue) {
+      value = 33 * value + newValue;
+    }
+
+    void hash(Node *node) {
+      combine((size_t) node->getKind());
+      if (node->hasIndex()) {
+        combine(node->getIndex());
+      } else if (node->hasText()) {
+        StringRef text = node->getText();
+        for (char c : text) {
+          combine((unsigned char) c);
+        }
+      }
+      for (const auto &child : *node) {
+        hash(child);
+      }
+    }
+  };
+} // end anonymous namespace
+
+static size_t deepHash(Node *node) {
+  DeepHasher hasher;
+  hasher.hash(node);
+  return hasher.value;  
+}
+
+static bool deepEquals(Node *lhs, Node *rhs) {
+  if (lhs->getKind() != rhs->getKind())
+    return false;
+  if (lhs->hasIndex()) {
+    if (!rhs->hasIndex())
+      return false;
+    if (lhs->getIndex() != rhs->getIndex())
+      return false;
+  } else if (lhs->hasText()) {
+    if (!rhs->hasText())
+      return false;
+    if (lhs->getText() != rhs->getText())
+      return false;
+  } else if (rhs->hasIndex() || rhs->hasText()) {
+    return false;
+  }
+
+  if (lhs->getNumChildren() != rhs->getNumChildren())
+    return false;
+
+  for (auto li = lhs->begin(), ri = lhs->begin(), le = lhs->end();
+       li != le; ++li, ++ri) {
+    if (!deepEquals(*li, *ri))
+      return false;
+  }
+
+  return true;
+}
+
+namespace {
+  struct SubstitutionEntry {
+    Node *TheNode;
+    size_t StoredHash;
+
+    // Note that the constructor leaves this uninitialized.
+
+    struct Hasher {
+      size_t operator()(const SubstitutionEntry &entry) const {
+        return entry.StoredHash;
+      }
+    };
+    friend bool operator==(const SubstitutionEntry &lhs,
+                           const SubstitutionEntry &rhs) {
+      return (lhs.StoredHash == rhs.StoredHash &&
+              deepEquals(lhs.TheNode, lhs.TheNode));
+    }
+  };
+
+  class Remangler {
+    DemanglerPrinter &Out;
+
+    // We have to cons up temporary nodes sometimes when remangling
+    // nested generics. This factory owns them.
+    NodeFactory Factory;
+
+    std::unordered_map<SubstitutionEntry, unsigned,
+                       SubstitutionEntry::Hasher> Substitutions;
+  public:
+    Remangler(DemanglerPrinter &out) : Out(out) {}
+
+    class EntityContext {
+      bool AsContext = false;
+    public:
+      bool isAsContext() const {
+        return AsContext;
+      }
+
+      class ManglingContextRAII {
+        EntityContext &Ctx;
+        bool SavedValue;
+      public:
+        ManglingContextRAII(EntityContext &ctx)
+          : Ctx(ctx), SavedValue(ctx.AsContext) {
+          ctx.AsContext = true;
+        }
+
+        ~ManglingContextRAII() {
+          Ctx.AsContext = SavedValue;
+        }
+      };
+    };
+
+    void mangle(Node *node) {
+      switch (node->getKind()) {
+#define NODE(ID) case Node::Kind::ID: return mangle##ID(node);
+#include "swift/Demangling/DemangleNodes.def"
+      }
+      unreachable("bad demangling tree node");
+    }
+
+    void mangleGenericArgs(Node *node, EntityContext &ctx);
+    void mangleAnyNominalType(Node *node, EntityContext &ctx);
+
+#define NODE(ID)                                                        \
+    void mangle##ID(Node *node);
+#define CONTEXT_NODE(ID)                                                \
+    void mangle##ID(Node *node);                                        \
+    void mangle##ID(Node *node, EntityContext &ctx);
+#include "swift/Demangling/DemangleNodes.def"
+
+    void mangleIndex(Node::IndexType index);
+    void mangleIdentifier(StringRef name, OperatorKind operatorKind);
+
+    void mangleChildNodes(Node *node) { mangleNodes(node->begin(), node->end()); }
+    void mangleNodes(Node::iterator i, Node::iterator e) {
+      for (; i != e; ++i) {
+        mangle(*i);
+      }
+    }
+    void mangleSingleChildNode(Node *node) {
+      assert(node->getNumChildren() == 1);
+      mangle(*node->begin());
+    }
+    void mangleChildNode(Node *node, unsigned index) {
+      assert(index < node->getNumChildren());
+      mangle(node->begin()[index]);
+    }
+
+    void mangleSimpleEntity(Node *node, char basicKind, StringRef entityKind,
+                            EntityContext &ctx);
+    void mangleNamedEntity(Node *node, char basicKind, StringRef entityKind,
+                           EntityContext &ctx);
+    void mangleTypedEntity(Node *node, char basicKind, StringRef entityKind,
+                           EntityContext &ctx);
+    void mangleNamedAndTypedEntity(Node *node, char basicKind,
+                                   StringRef entityKind,
+                                   EntityContext &ctx);
+    void mangleNominalType(Node *node, char basicKind, EntityContext &ctx);
+
+    void mangleProtocolWithoutPrefix(Node *node);
+    void mangleProtocolListWithoutPrefix(Node *node,
+                                         Node *additionalProto = nullptr);
+
+    void mangleEntityContext(Node *node, EntityContext &ctx);
+    void mangleEntityType(Node *node, EntityContext &ctx);
+    void mangleEntityGenericType(Node *node, EntityContext &ctx);
+
+    bool trySubstitution(Node *node, SubstitutionEntry &entry);
+    bool mangleStandardSubstitution(Node *node);
+    void addSubstitution(const SubstitutionEntry &entry);
+    void resetSubstitutions();
+
+    void mangleDependentGenericParamIndex(Node *node);
+    void mangleConstrainedType(Node *node);
+  };
+} // end anonymous namespace
+
+#define NODE(ID)
+#define CONTEXT_NODE(ID)                        \
+void Remangler::mangle##ID(Node *node) {        \
+  EntityContext ctx;                            \
+  mangle##ID(node, ctx);                        \
+}
+#include "swift/Demangling/DemangleNodes.def"
+
+/// Reset the currently-active set of substitutions.  This is useful
+/// when part of the mangling is done independently, e.g. when an
+/// optimization pass modifies a pass.
+void Remangler::resetSubstitutions() {
+  Substitutions.clear();
+}
+
+bool Remangler::trySubstitution(Node *node, SubstitutionEntry &entry) {
+  if (mangleStandardSubstitution(node))
+    return true;
+
+  // Go ahead and initialize the substitution entry.
+  entry.TheNode = node;
+  entry.StoredHash = deepHash(node);
+
+  auto it = Substitutions.find(entry);
+  if (it == Substitutions.end())
+    return false;
+
+  Out << 'S';
+  mangleIndex(it->second);
+  return true;
+}
+
+static bool isInSwiftModule(Node *node) {
+  Node *context = node->getFirstChild();
+  return (context->getKind() == Node::Kind::Module &&
+          context->getText() == STDLIB_NAME);
+};
+
+bool Remangler::mangleStandardSubstitution(Node *node) {
+  // Look for known substitutions.
+  switch (node->getKind()) {
+#define SUCCESS_IF_IS(VALUE, EXPECTED, SUBSTITUTION)            \
+    do {                                                        \
+      if ((VALUE) == (EXPECTED)) {                              \
+        Out << SUBSTITUTION;                                    \
+        return true;                                            \
+      }                                                         \
+    } while (0)
+#define SUCCESS_IF_TEXT_IS(EXPECTED, SUBSTITUTION)              \
+    SUCCESS_IF_IS(node->getText(), EXPECTED, SUBSTITUTION)
+#define SUCCESS_IF_DECLNAME_IS(EXPECTED, SUBSTITUTION)          \
+    SUCCESS_IF_IS(node->getChild(1)->getText(), EXPECTED, SUBSTITUTION)
+
+    case Node::Kind::Module:
+      SUCCESS_IF_TEXT_IS(STDLIB_NAME, "s");
+      SUCCESS_IF_TEXT_IS(MANGLING_MODULE_OBJC, "So");
+      SUCCESS_IF_TEXT_IS(MANGLING_MODULE_C, "SC");
+      break;
+    case Node::Kind::Structure:
+      if (isInSwiftModule(node)) {
+        SUCCESS_IF_DECLNAME_IS("Array", "Sa");
+        SUCCESS_IF_DECLNAME_IS("Bool", "Sb");
+        SUCCESS_IF_DECLNAME_IS("UnicodeScalar", "Sc");
+        SUCCESS_IF_DECLNAME_IS("Double", "Sd");
+        SUCCESS_IF_DECLNAME_IS("Float", "Sf");
+        SUCCESS_IF_DECLNAME_IS("Int", "Si");
+        SUCCESS_IF_DECLNAME_IS("UnsafeRawPointer", "SV");
+        SUCCESS_IF_DECLNAME_IS("UnsafeMutableRawPointer", "Sv");
+        SUCCESS_IF_DECLNAME_IS("UnsafePointer", "SP");
+        SUCCESS_IF_DECLNAME_IS("UnsafeMutablePointer", "Sp");
+        SUCCESS_IF_DECLNAME_IS("UnsafeBufferPointer", "SR");
+        SUCCESS_IF_DECLNAME_IS("UnsafeMutableBufferPointer", "Sr");
+        SUCCESS_IF_DECLNAME_IS("String", "SS");
+        SUCCESS_IF_DECLNAME_IS("UInt", "Su");
+      }
+      break;
+    case Node::Kind::Enum:
+      if (isInSwiftModule(node)) {
+        SUCCESS_IF_DECLNAME_IS("Optional", "Sq");
+        SUCCESS_IF_DECLNAME_IS("ImplicitlyUnwrappedOptional", "SQ");
+      }
+      break;
+
+    default:
+      break;
+
+#undef SUCCESS_IF_DECLNAME_IS
+#undef SUCCESS_IF_TEXT_IS
+#undef SUCCESS_IF_IS
+  }
+  return false;
+}
+
+void Remangler::addSubstitution(const SubstitutionEntry &entry) {
+  auto result = Substitutions.insert({entry, Substitutions.size()});
+  assert(result.second);
+  (void) result;
+}
+
+void Remangler::mangleIdentifier(Node *node) {
+  mangleIdentifier(node->getText(), OperatorKind::NotOperator);
+}
+void Remangler::manglePrefixOperator(Node *node) {
+  mangleIdentifier(node->getText(), OperatorKind::Prefix);
+}
+void Remangler::manglePostfixOperator(Node *node) {
+  mangleIdentifier(node->getText(), OperatorKind::Postfix);
+}
+void Remangler::mangleInfixOperator(Node *node) {
+  mangleIdentifier(node->getText(), OperatorKind::Infix);
+}
+void Remangler::mangleIdentifier(StringRef ident, OperatorKind operatorKind) {
+  ::mangleIdentifier(ident, operatorKind, /*usePunycode*/ false, Out);
+}
+
+void Remangler::mangleNumber(Node *node) {
+  mangleIndex(node->getIndex());
+}
+void Remangler::mangleIndex(Node::IndexType value) {
+  if (value == 0) {
+    Out << '_';
+  } else {
+    Out << (value - 1) << '_';
+  }
+}
+
+void Remangler::mangleGlobal(Node *node) {
+  Out << "_T";
+  mangleChildNodes(node);
+}
+
+void Remangler::mangleSuffix(Node *node) {
+  // Just add the suffix back on.
+  Out << node->getText();
+}
+
+void Remangler::mangleGenericSpecialization(Node *node) {
+  Out << "TSg";
+  mangleChildNodes(node); // GenericSpecializationParams
+
+  // Specializations are just prepended to already-mangled names.
+  resetSubstitutions();
+
+  // Start another mangled name.
+  Out << "__T";
+}
+void Remangler::mangleGenericSpecializationNotReAbstracted(Node *node) {
+  Out << "TSr";
+  mangleChildNodes(node); // GenericSpecializationParams
+
+  // Specializations are just prepended to already-mangled names.
+  resetSubstitutions();
+
+  // Start another mangled name.
+  Out << "__T";
+}
+
+void Remangler::mangleGenericPartialSpecialization(Node *node) {
+  unreachable("todo");
+}
+
+void Remangler::mangleGenericPartialSpecializationNotReAbstracted(Node *node) {
+  unreachable("todo");
+}
+
+void Remangler::mangleGenericSpecializationParam(Node *node) {
+  // Should be a type followed by a series of protocol conformances.
+  mangleChildNodes(node);
+  Out << '_';
+}
+
+void Remangler::mangleFunctionSignatureSpecialization(Node *node) {
+  Out << "TSf";
+  mangleChildNodes(node); // FunctionSignatureSpecializationParams
+
+  // Specializations are just prepended to already-mangled names.
+  resetSubstitutions();
+
+  // Start another mangled name.
+  Out << "__T";
+}
+
+void Remangler::mangleSpecializationPassID(Node *node) {
+  Out << node->getIndex();
+}
+
+void Remangler::mangleSpecializationIsFragile(Node *node) {
+  Out << "q";
+}
+
+void Remangler::mangleFunctionSignatureSpecializationParam(Node *node) {
+  if (!node->hasChildren()) {
+    Out << "n_";
+    return;
+  }
+
+  // The first child is always a kind that specifies the type of param that we
+  // have.
+  NodePointer firstChild = node->getChild(0);
+  unsigned kindValue = firstChild->getIndex();
+  auto kind = FunctionSigSpecializationParamKind(kindValue);
+
+  switch (kind) {
+  case FunctionSigSpecializationParamKind::ConstantPropFunction:
+    Out << "cpfr";
+    mangleIdentifier(node->getChild(1));
+    Out << '_';
+    return;
+  case FunctionSigSpecializationParamKind::ConstantPropGlobal:
+    Out << "cpg";
+    mangleIdentifier(node->getChild(1));
+    Out << '_';
+    return;
+  case FunctionSigSpecializationParamKind::ConstantPropInteger:
+    Out << "cpi" << node->getChild(1)->getText() << '_';
+    return;
+  case FunctionSigSpecializationParamKind::ConstantPropFloat:
+    Out << "cpfl" << node->getChild(1)->getText() << '_';
+    return;
+  case FunctionSigSpecializationParamKind::ConstantPropString: {
+    Out << "cpse";
+    StringRef encodingStr = node->getChild(1)->getText();
+    if (encodingStr == "u8")
+      Out << '0';
+    else if (encodingStr == "u16")
+      Out << '1';
+    else
+      unreachable("Unknown encoding");
+    Out << 'v';
+    mangleIdentifier(node->getChild(2));
+    Out << '_';
+    return;
+  }
+  case FunctionSigSpecializationParamKind::ClosureProp:
+    Out << "cl";
+    mangleIdentifier(node->getChild(1));
+    for (unsigned i = 2, e = node->getNumChildren(); i != e; ++i) {
+      mangleType(node->getChild(i));
+    }
+    Out << '_';
+    return;
+  case FunctionSigSpecializationParamKind::BoxToValue:
+    Out << "i_";
+    return;
+  case FunctionSigSpecializationParamKind::BoxToStack:
+    Out << "k_";
+    return;
+  default:
+    if (kindValue &
+        unsigned(FunctionSigSpecializationParamKind::Dead))
+      Out << 'd';
+    if (kindValue &
+        unsigned(FunctionSigSpecializationParamKind::OwnedToGuaranteed))
+      Out << 'g';
+    if (kindValue & unsigned(FunctionSigSpecializationParamKind::SROA))
+      Out << 's';
+    Out << '_';
+    return;
+  }
+}
+
+void Remangler::mangleFunctionSignatureSpecializationParamPayload(Node *node) {
+  // This should never be called since mangling parameter payloads require
+  // knowing what the parameter kind is.
+  unreachable("This should never be called");
+}
+
+void Remangler::mangleFunctionSignatureSpecializationParamKind(Node *node) {
+  // This should never be called since mangling parameter kinds have influence
+  // on the payloads.
+  unreachable("This should never be called");
+}
+
+void Remangler::mangleProtocolConformance(Node *node) {
+  // type, protocol name, context
+  assert(node->getNumChildren() == 3);
+  mangleChildNode(node, 0);
+  mangleProtocolWithoutPrefix(node->begin()[1]);
+  mangleChildNode(node, 2);
+}
+
+void Remangler::mangleObjCAttribute(Node *node) {
+  Out << "To";
+}
+
+void Remangler::mangleNonObjCAttribute(Node *node) {
+  Out << "TO";
+}
+
+void Remangler::mangleDirectMethodReferenceAttribute(Node *node) {
+  Out << "Td";
+}
+
+void Remangler::mangleDynamicAttribute(Node *node) {
+  Out << "TD";
+}
+
+void Remangler::mangleVTableAttribute(Node *node) {
+  Out << "TV";
+}
+
+void Remangler::mangleGenericTypeMetadataPattern(Node *node) {
+  Out << "MP";
+  mangleSingleChildNode(node); // type
+}
+
+void Remangler::mangleTypeMetadataAccessFunction(Node *node) {
+  Out << "Ma";
+  mangleSingleChildNode(node); // type
+}
+
+void Remangler::mangleTypeMetadataLazyCache(Node *node) {
+  Out << "ML";
+  mangleSingleChildNode(node); // type
+}
+
+void Remangler::mangleMetaclass(Node *node) {
+  Out << "Mm";
+  mangleSingleChildNode(node); // type
+}
+
+void Remangler::mangleNominalTypeDescriptor(Node *node) {
+  Out << "Mn";
+  mangleSingleChildNode(node); // type
+}
+
+void Remangler::mangleTypeMetadata(Node *node) {
+  Out << "M";
+  mangleSingleChildNode(node); // type
+}
+
+void Remangler::mangleFullTypeMetadata(Node *node) {
+  Out << "Mf";
+  mangleChildNodes(node); // type
+}
+
+void Remangler::mangleProtocolDescriptor(Node *node) {
+  Out << "Mp";
+  mangleProtocolWithoutPrefix(node->begin()[0]);
+}
+
+void Remangler::manglePartialApplyForwarder(Node *node) {
+  Out << "PA__T";
+  mangleSingleChildNode(node); // global
+}
+
+void Remangler::manglePartialApplyObjCForwarder(Node *node) {
+  Out << "PAo__T";
+  mangleSingleChildNode(node); // global
+}
+
+void Remangler::mangleDirectness(Node *node) {
+  auto getChar = [](Directness d) -> char {
+    switch (d) {
+    case Directness::Direct: return 'd';
+    case Directness::Indirect: return 'i';
+    }
+    unreachable("bad directness kind");
+  };
+  Out << getChar(Directness(node->getIndex()));
+}
+
+void Remangler::mangleValueWitness(Node *node) {
+  const char *Code = nullptr;
+  switch (ValueWitnessKind(node->getIndex())) {
+#define VALUE_WITNESS(MANGLING, NAME) \
+    case ValueWitnessKind::NAME: Code = #MANGLING; break;
+#include "swift/Demangling/ValueWitnessMangling.def"
+  }
+  Out << 'w' << Code;
+  mangleSingleChildNode(node); // type
+}
+
+void Remangler::mangleValueWitnessTable(Node *node) {
+  Out << "WV";
+  mangleSingleChildNode(node); // type
+}
+
+void Remangler::mangleThrowsAnnotation(Node *node) {
+  Out << "z";
+}
+
+void Remangler::mangleFieldOffset(Node *node) {
+  Out << "Wv";
+  mangleChildNodes(node); // directness, entity
+}
+
+void Remangler::mangleProtocolWitnessTable(Node *node) {
+  Out << "WP";
+  mangleSingleChildNode(node); // protocol conformance
+}
+
+void Remangler::mangleGenericProtocolWitnessTable(Node *node) {
+  Out << "WG";
+  mangleSingleChildNode(node); // protocol conformance
+}
+
+void Remangler::mangleGenericProtocolWitnessTableInstantiationFunction(
+                                                                  Node *node) {
+  Out << "WI";
+  mangleSingleChildNode(node); // protocol conformance
+}
+
+void Remangler::mangleProtocolWitnessTableAccessor(Node *node) {
+  Out << "Wa";
+  mangleSingleChildNode(node); // protocol conformance
+}
+
+void Remangler::mangleLazyProtocolWitnessTableAccessor(Node *node) {
+  Out << "Wl";
+  mangleChildNodes(node); // type, protocol conformance
+}
+
+void Remangler::mangleLazyProtocolWitnessTableCacheVariable(Node *node) {
+  Out << "WL";
+  mangleChildNodes(node); // type, protocol conformance
+}
+
+void Remangler::mangleAssociatedTypeMetadataAccessor(Node *node) {
+  Out << "Wt";
+  mangleChildNodes(node); // protocol conformance, identifier
+}
+
+void Remangler::mangleAssociatedTypeWitnessTableAccessor(Node *node) {
+  Out << "WT";
+  assert(node->getNumChildren() == 3);
+  mangleChildNode(node, 0); // protocol conformance
+  mangleChildNode(node, 1); // identifier
+  mangleProtocolWithoutPrefix(node->begin()[2]); // type
+}
+
+void Remangler::mangleReabstractionThunkHelper(Node *node) {
+  Out << "TR";
+  if (node->getNumChildren() == 3) Out << 'G';
+  mangleChildNodes(node); // generic signature?, type, type
+}
+
+void Remangler::mangleReabstractionThunk(Node *node) {
+  Out << "Tr";
+  if (node->getNumChildren() == 3) Out << 'G';
+  mangleChildNodes(node); // generic signature?, type, type
+}
+
+void Remangler::mangleProtocolWitness(Node *node) {
+  Out << "TW";
+  mangleChildNodes(node); // protocol conformance, entity
+}
+
+void Remangler::mangleFunction(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "", ctx);
+}
+
+void Remangler::mangleVariable(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'v', "", ctx);
+}
+
+void Remangler::mangleSubscript(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'i', "", ctx);
+}
+
+void Remangler::mangleInitializer(Node *node, EntityContext &ctx) {
+  mangleSimpleEntity(node, 'I', "i", ctx);
+}
+
+void Remangler::mangleDefaultArgumentInitializer(Node *node,
+                                                 EntityContext &ctx) {
+  mangleNamedEntity(node, 'I', "A", ctx);
+}
+
+void Remangler::mangleDeallocator(Node *node, EntityContext &ctx) {
+  mangleSimpleEntity(node, 'F', "D", ctx);
+}
+
+void Remangler::mangleDestructor(Node *node, EntityContext &ctx) {
+  mangleSimpleEntity(node, 'F', "d", ctx);
+}
+
+void Remangler::mangleAllocator(Node *node, EntityContext &ctx) {
+  mangleTypedEntity(node, 'F', "C", ctx);
+}
+
+void Remangler::mangleConstructor(Node *node, EntityContext &ctx) {
+  mangleTypedEntity(node, 'F', "c", ctx);
+}
+
+void Remangler::mangleIVarInitializer(Node *node, EntityContext &ctx) {
+  mangleSimpleEntity(node, 'F', "e", ctx);
+}
+
+void Remangler::mangleIVarDestroyer(Node *node, EntityContext &ctx) {
+  mangleSimpleEntity(node, 'F', "E", ctx);
+}
+
+void Remangler::mangleGetter(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "g", ctx);
+}
+
+void Remangler::mangleGlobalGetter(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "G", ctx);
+}
+
+void Remangler::mangleSetter(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "s", ctx);
+}
+
+void Remangler::mangleMaterializeForSet(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "m", ctx);
+}
+
+void Remangler::mangleWillSet(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "w", ctx);
+}
+
+void Remangler::mangleDidSet(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "W", ctx);
+}
+
+void Remangler::mangleOwningMutableAddressor(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "aO", ctx);
+}
+
+void Remangler::mangleNativeOwningMutableAddressor(Node *node,
+                                                   EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "ao", ctx);
+}
+
+void Remangler::mangleNativePinningMutableAddressor(Node *node,
+                                                    EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "ap", ctx);
+}
+
+void Remangler::mangleUnsafeMutableAddressor(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "au", ctx);
+}
+
+void Remangler::mangleOwningAddressor(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "lO", ctx);
+}
+
+void Remangler::mangleNativeOwningAddressor(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "lo", ctx);
+}
+
+void Remangler::mangleNativePinningAddressor(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "lp", ctx);
+}
+
+void Remangler::mangleUnsafeAddressor(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "lu", ctx);
+}
+
+void Remangler::mangleExplicitClosure(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "U", ctx); // name is index
+}
+
+void Remangler::mangleImplicitClosure(Node *node, EntityContext &ctx) {
+  mangleNamedAndTypedEntity(node, 'F', "u", ctx); // name is index
+}
+
+void Remangler::mangleStatic(Node *node, EntityContext &ctx) {
+  Out << 'Z';
+  mangleEntityContext(node->getChild(0), ctx);
+}
+
+void Remangler::mangleSimpleEntity(Node *node, char basicKind,
+                                   StringRef entityKind,
+                                   EntityContext &ctx) {
+  assert(node->getNumChildren() == 1);
+  Out << basicKind;
+  mangleEntityContext(node->begin()[0], ctx);
+  Out << entityKind;
+}
+
+void Remangler::mangleNamedEntity(Node *node, char basicKind,
+                                  StringRef entityKind,
+                                  EntityContext &ctx) {
+  assert(node->getNumChildren() == 2);
+  if (basicKind != '\0') Out << basicKind;
+  mangleEntityContext(node->begin()[0], ctx);
+  Out << entityKind;
+  mangleChildNode(node, 1); // decl name / index
+}
+
+void Remangler::mangleTypedEntity(Node *node, char basicKind,
+                                  StringRef entityKind,
+                                  EntityContext &ctx) {
+  assert(node->getNumChildren() == 2);
+  Out << basicKind;
+  mangleEntityContext(node->begin()[0], ctx);
+  Out << entityKind;
+  mangleEntityType(node->begin()[1], ctx);
+}
+
+void Remangler::mangleNamedAndTypedEntity(Node *node, char basicKind,
+                                          StringRef entityKind,
+                                          EntityContext &ctx) {
+  assert(node->getNumChildren() == 3);
+  Out << basicKind;
+  mangleEntityContext(node->begin()[0], ctx);
+  Out << entityKind;
+  mangleChildNode(node, 1); // decl name / index
+  mangleEntityType(node->begin()[2], ctx);
+}
+
+void Remangler::mangleEntityContext(Node *node, EntityContext &ctx) {
+  // Remember that we're mangling a context.
+  EntityContext::ManglingContextRAII raii(ctx);
+
+  switch (node->getKind()) {
+#define NODE(ID)                                \
+  case Node::Kind::ID:
+#define CONTEXT_NODE(ID)
+#include "swift/Demangling/DemangleNodes.def"
+    unreachable("not a context node");
+
+#define NODE(ID)
+#define CONTEXT_NODE(ID)                        \
+  case Node::Kind::ID:                          \
+    return mangle##ID(node, ctx);
+#include "swift/Demangling/DemangleNodes.def"
+  }
+  unreachable("bad node kind");
+}
+
+void Remangler::mangleEntityType(Node *node, EntityContext &ctx) {
+  assert(node->getKind() == Node::Kind::Type);
+  assert(node->getNumChildren() == 1);
+  node = node->begin()[0];
+
+  // Expand certain kinds of type within the entity context.
+  switch (node->getKind()) {
+  case Node::Kind::FunctionType:
+  case Node::Kind::UncurriedFunctionType: {
+    Out << (node->getKind() == Node::Kind::FunctionType ? 'F' : 'f');
+    unsigned inputIndex = node->getNumChildren() - 2;
+    assert(inputIndex <= 1);
+    for (unsigned i = 0; i <= inputIndex; ++i)
+      mangle(node->begin()[i]);
+    auto returnType = node->begin()[inputIndex+1];
+    assert(returnType->getKind() == Node::Kind::ReturnType);
+    assert(returnType->getNumChildren() == 1);
+    mangleEntityType(returnType->begin()[0], ctx);
+    return;
+  }
+  default:
+    mangle(node);
+    return;
+  }
+}
+
+void Remangler::mangleLocalDeclName(Node *node) {
+  Out << 'L';
+  mangleChildNodes(node); // index, identifier
+}
+
+void Remangler::manglePrivateDeclName(Node *node) {
+  Out << 'P';
+  mangleChildNodes(node); // identifier, identifier
+}
+
+void Remangler::mangleTypeMangling(Node *node) {
+  Out << 't';
+  mangleSingleChildNode(node); // type
+}
+
+void Remangler::mangleType(Node *node) {
+  mangleSingleChildNode(node);
+}
+
+template <size_t N> 
+static bool stripPrefix(StringRef &string, const char (&data)[N]) {
+  constexpr size_t prefixLength = N - 1;
+  if (!string.startswith(StringRef(data, prefixLength)))
+    return false;
+  string = string.drop_front(prefixLength);
+  return true;
+}
+
+void Remangler::mangleBuiltinTypeName(Node *node) {
+  Out << 'B';
+  StringRef text = node->getText();
+
+  if (text == "Builtin.BridgeObject") {
+    Out << 'b';
+  } else if (text == "Builtin.UnsafeValueBuffer") {
+    Out << 'B';
+  } else if (text == "Builtin.UnknownObject") {
+    Out << 'O';
+  } else if (text == "Builtin.NativeObject") {
+    Out << 'o';
+  } else if (text == "Builtin.RawPointer") {
+    Out << 'p';
+  } else if (text == "Builtin.Word") {
+    Out << 'w';
+  } else if (stripPrefix(text, "Builtin.Int")) {
+    Out << 'i' << text << '_';
+  } else if (stripPrefix(text, "Builtin.Float")) {
+    Out << 'f' << text << '_';
+  } else if (stripPrefix(text, "Builtin.Vec")) {
+    auto split = text.split('x');
+    Out << 'v' << split.first << 'B';
+    if (split.second == "RawPointer") {
+      Out << 'p';
+    } else if (stripPrefix(split.second, "Float")) {
+      Out << 'f' << split.second << '_';
+    } else if (stripPrefix(split.second, "Int")) {
+      Out << 'i' << split.second << '_';
+    } else {
+      unreachable("unexpected builtin vector type");
+    }
+  } else {
+    unreachable("unexpected builtin type");
+  }
+}
+
+void Remangler::mangleTypeAlias(Node *node, EntityContext &ctx) {
+  SubstitutionEntry entry;
+  if (trySubstitution(node, entry)) return;
+  Out << 'a';
+  mangleChildNodes(node); // context, identifier
+  addSubstitution(entry);
+}
+
+void Remangler::mangleFunctionType(Node *node) {
+  Out << 'F';
+  mangleChildNodes(node); // argument tuple, result type
+}
+
+void Remangler::mangleUncurriedFunctionType(Node *node) {
+  Out << 'f';
+  mangleChildNodes(node); // argument tuple, result type
+}
+
+void Remangler::mangleObjCBlock(Node *node) {
+  Out << 'b';
+  mangleChildNodes(node); // argument tuple, result type
+}
+
+void Remangler::mangleCFunctionPointer(Node *node) {
+  Out << 'c';
+  mangleChildNodes(node); // argument tuple, result type
+}
+
+void Remangler::mangleAutoClosureType(Node *node) {
+  Out << 'K';
+  mangleChildNodes(node); // argument tuple, result type
+}
+
+void Remangler::mangleThinFunctionType(Node *node) {
+  Out << "Xf";
+  mangleChildNodes(node); // argument tuple, result type
+}
+
+void Remangler::mangleArgumentTuple(Node *node) {
+  mangleSingleChildNode(node);
+}
+
+void Remangler::mangleReturnType(Node *node) {
+  mangleSingleChildNode(node);
+}
+
+void Remangler::mangleImplFunctionType(Node *node) {
+  Out << "XF";
+  auto i = node->begin(), e = node->end();
+  if (i != e && (*i)->getKind() == Node::Kind::ImplConvention) {
+    StringRef text = (*i)->getText();
+    i++;
+    if (text == "@callee_unowned") {
+      Out << 'd';
+    } else if (text == "@callee_guaranteed") {
+      Out << 'g';
+    } else if (text == "@callee_owned") {
+      Out << 'o';
+    } else {
+      unreachable("bad callee convention");
+    }
+  } else {
+    Out << 't';
+  }
+  for (; i != e &&
+         (*i)->getKind() == Node::Kind::ImplFunctionAttribute; ++i) {
+    mangle(*i); // impl function attribute
+  }
+  if (i != e &&
+      ((*i)->getKind() == Node::Kind::DependentGenericSignature ||
+       (*i)->getKind() == Node::Kind::DependentPseudogenericSignature)) {
+    Out << ((*i)->getKind() == Node::Kind::DependentGenericSignature
+              ? 'G' : 'g');
+    mangleDependentGenericSignature((*i));
+    i++;
+  }
+  Out << '_';
+  for (; i != e && (*i)->getKind() == Node::Kind::ImplParameter; ++i) {
+    mangleImplParameter(*i);
+  }
+  Out << '_';
+  mangleNodes(i, e); // impl results
+  Out << '_';
+}
+
+void Remangler::mangleImplFunctionAttribute(Node *node) {
+  StringRef text = node->getText();
+  if (text == "@convention(block)") {
+    Out << "Cb";
+  } else if (text == "@convention(c)") {
+    Out << "Cc";
+  } else if (text == "@convention(method)") {
+    Out << "Cm";
+  } else if (text == "@convention(objc_method)") {
+    Out << "CO";
+  } else if (text == "@convention(witness_method)") {
+    Out << "Cw";
+  } else {
+    unreachable("bad impl-function-attribute");
+  }
+}
+
+void Remangler::mangleImplParameter(Node *node) {
+  assert(node->getNumChildren() == 2);
+  mangleChildNodes(node); // impl convention, type
+}
+
+void Remangler::mangleImplErrorResult(Node *node) {
+  assert(node->getNumChildren() == 2);
+  Out << 'z';
+  mangleChildNodes(node); // impl convention, type
+}
+
+void Remangler::mangleImplResult(Node *node) {
+  assert(node->getNumChildren() == 2);
+  mangleChildNodes(node); // impl convention, type
+}
+
+void Remangler::mangleImplConvention(Node *node) {
+  assert(node->getKind() == Node::Kind::ImplConvention);
+  StringRef text = node->getText();
+  if (text == "@autoreleased") {
+    Out << 'a';
+  } else if (text == "@unowned") {
+    Out << 'd';
+  } else if (text == "@unowned_inner_pointer") {
+    Out << 'D'; // only in results
+  } else if (text == "@guaranteed") {
+    Out << 'g';
+  } else if (text == "@deallocating") {
+    Out << 'e';
+  } else if (text == "@in") {
+    Out << 'i'; // only in parameters
+  } else if (text == "@out") {
+    Out << 'i'; // only in results
+  } else if (text == "@inout") {
+    Out << 'l';
+  } else if (text == "@owned") {
+    Out << 'o';
+  } else {
+    unreachable("invalid impl convention");
+  }
+}
+
+void Remangler::mangleDynamicSelf(Node *node) {
+  Out << 'D';
+  mangleSingleChildNode(node); // type
+}
+
+void Remangler::mangleErrorType(Node *node) {
+  Out << "ERR";
+}
+
+void Remangler::mangleSILBoxType(Node *node) {
+  Out << 'X' << 'b';
+  mangleSingleChildNode(node);
+}
+
+void Remangler::mangleMetatype(Node *node) {
+  if (node->getNumChildren() == 1) {
+    Out << 'M';
+    mangleSingleChildNode(node); // type
+  } else {
+    assert(node->getNumChildren() == 2);
+    Out << "XM";
+    mangleChildNodes(node); // metatype representation, type
+  }
+}
+
+void Remangler::mangleExistentialMetatype(Node *node) {
+  if (node->getNumChildren() == 1) {
+    Out << "PM";
+    mangleSingleChildNode(node); // type
+  } else {
+    assert(node->getNumChildren() == 2);
+    Out << "XPM";
+    mangleChildNodes(node); // metatype representation, type
+  }
+}
+
+void Remangler::mangleMetatypeRepresentation(Node *node) {
+  StringRef text = node->getText();
+  if (text == "@thin") {
+    Out << 't';
+  } else if (text == "@thick") {
+    Out << 'T';
+  } else if (text == "@objc_metatype") {
+    Out << 'o';
+  } else {
+    unreachable("bad metatype representation");
+  }
+}
+
+void Remangler::mangleProtocolList(Node *node) {
+  // In its usual use as a type, this gets a prefix 'P'.
+  Out << 'P';
+  mangleProtocolListWithoutPrefix(node);
+}
+
+void Remangler::mangleProtocolListWithoutPrefix(Node *node,
+                                                Node *additionalProto) {
+  assert(node->getKind() == Node::Kind::ProtocolList);
+  assert(node->getNumChildren() == 1);
+  auto typeList = node->begin()[0];
+  assert(typeList->getKind() == Node::Kind::TypeList);
+  for (auto &child : *typeList) {
+    mangleProtocolWithoutPrefix(child);
+  }
+  if (additionalProto) {
+    mangleProtocolWithoutPrefix(additionalProto);
+  }
+  Out << '_';
+}
+
+void Remangler::mangleUnowned(Node *node) {
+  Out << "Xo";
+  mangleSingleChildNode(node); // type
+}
+
+void Remangler::mangleUnmanaged(Node *node) {
+  Out << "Xu";
+  mangleSingleChildNode(node); // type
+}
+
+void Remangler::mangleWeak(Node *node) {
+  Out << "Xw";
+  mangleSingleChildNode(node); // type
+}
+
+void Remangler::mangleInOut(Node *node) {
+  Out << 'R';
+  mangleSingleChildNode(node); // type
+}
+
+void Remangler::mangleTuple(Node *node) {
+  size_t NumElems = node->getNumChildren();
+  if (NumElems > 0 &&
+      node->getChild(NumElems - 1)->getFirstChild()->getKind() ==
+      Node::Kind::VariadicMarker) {
+    Out << 't';
+  } else {
+    Out << 'T';
+  }
+  mangleChildNodes(node); // tuple elements
+  Out << '_';
+}
+
+void Remangler::mangleTupleElement(Node *node) {
+  mangleChildNodes(node); // tuple element name?, type
+}
+
+void Remangler::mangleTupleElementName(Node *node) {
+  mangleIdentifier(node->getText(), OperatorKind::NotOperator);
+}
+
+void Remangler::mangleDependentGenericType(Node *node) {
+  Out << 'u';
+  mangleChildNodes(node); // generic signature, type
+}
+
+void Remangler::mangleDependentPseudogenericSignature(Node *node) {
+  mangleDependentGenericSignature(node);
+}
+
+void Remangler::mangleDependentGenericSignature(Node *node) {
+  auto i = node->begin(), e = node->end();
+  
+  // If there's only one generic param, mangle nothing.
+  if (node->getNumChildren() >= 1
+      && node->getChild(0)->getKind() == Node::Kind::DependentGenericParamCount
+      && node->getChild(0)->getIndex() == 1
+      && (node->getNumChildren() == 1
+          || node->getChild(1)->getKind() != Node::Kind::DependentGenericParamCount))
+  {
+    ++i;
+    goto mangle_requirements;
+  }
+  
+  // Remangle generic params.
+  for (; i != e &&
+         (*i)->getKind() == Node::Kind::DependentGenericParamCount; ++i) {
+    auto count = *i;
+    if (count->getIndex() > 0)
+      mangleIndex(count->getIndex() - 1);
+    else
+      Out << 'z';
+  }
+  
+mangle_requirements:
+  if (i == e) { // no generic requirements
+    Out << 'r';
+    return;
+  }
+  
+  Out << 'R';
+  mangleNodes(i, e); // generic requirements
+  Out << 'r';
+}
+
+void Remangler::mangleDependentGenericParamCount(Node *node) {
+  unreachable("handled inline in DependentGenericSignature");
+}
+
+void Remangler::mangleDependentGenericConformanceRequirement(Node *node) {
+  mangleConstrainedType(node->getChild(0));
+  // If the constraint represents a protocol, use the shorter mangling.
+  if (node->getNumChildren() == 2
+      && node->getChild(1)->getKind() == Node::Kind::Type
+      && node->getChild(1)->getNumChildren() == 1
+      && node->getChild(1)->getChild(0)->getKind() == Node::Kind::Protocol) {
+    mangleProtocolWithoutPrefix(node->getChild(1)->getChild(0));
+    return;
+  }
+
+  mangle(node->getChild(1));
+}
+
+void Remangler::mangleDependentGenericSameTypeRequirement(Node *node) {
+  mangleConstrainedType(node->getChild(0));
+  Out << 'z';
+  mangle(node->getChild(1));
+}
+
+void Remangler::mangleDependentGenericLayoutRequirement(Node *node) {
+  mangleConstrainedType(node->getChild(0));
+  Out << 'l';
+  auto id =  node->getChild(1)->getText();
+  auto size = -1;
+  if (node->getNumChildren() > 2) {
+    size = node->getChild(2)->getIndex();
+  }
+  int alignment = -1;
+  if (node->getNumChildren() > 3) {
+    alignment = node->getChild(3)->getIndex();
+  }
+  Out << id;
+  if (size >= 0)
+    Out << size;
+  if (alignment >= 0) {
+    Out << "_" << alignment;
+  }
+}
+
+void Remangler::mangleConstrainedType(Node *node) {
+  if (node->getFirstChild()->getKind()
+        == Node::Kind::DependentGenericParamType) {
+    // Can be mangled without an introducer.
+    mangleDependentGenericParamIndex(node->getFirstChild());
+  } else {
+    mangle(node);
+  }
+}
+
+void Remangler::mangleAssociatedType(Node *node) {
+  if (node->hasChildren()) {
+    assert(node->getNumChildren() == 1);
+    mangleProtocolListWithoutPrefix(*node->begin());
+  } else {
+    Out << '_';
+  }
+}
+
+void Remangler::mangleQualifiedArchetype(Node *node) {
+  Out << "Qq";
+  mangleChildNodes(node); // index, declcontext
+}
+
+void Remangler::mangleDeclContext(Node *node) {
+  mangleSingleChildNode(node);
+}
+
+void Remangler::mangleExtension(Node *node, EntityContext &ctx) {
+  assert(node->getNumChildren() == 2 || node->getNumChildren() == 3);
+  if (node->getNumChildren() == 3) {
+    Out << 'e';
+  } else {
+    Out << 'E';
+  }
+  mangleEntityContext(node->begin()[0], ctx); // module
+  if (node->getNumChildren() == 3) {
+    mangleDependentGenericSignature(node->begin()[2]); // generic sig
+  }
+  mangleEntityContext(node->begin()[1], ctx); // context
+}
+
+void Remangler::mangleModule(Node *node, EntityContext &ctx) {
+  SubstitutionEntry entry;
+  if (trySubstitution(node, entry)) return;
+
+  // Module types get an M prefix, but module contexts don't.
+  if (!ctx.isAsContext()) Out << 'M';
+  mangleIdentifier(node->getText(), OperatorKind::NotOperator);
+  addSubstitution(entry);
+}
+
+void Remangler::mangleAssociatedTypeRef(Node *node) {
+  SubstitutionEntry entry;
+  if (trySubstitution(node, entry)) return;
+  Out << "Q";
+  mangleChildNodes(node); // type, identifier
+  addSubstitution(entry);
+}
+
+void Remangler::mangleDependentMemberType(Node *node) {
+  std::vector<Node *> members;
+  Node *base = node;
+  do {
+    members.push_back(base);
+    base = base->getFirstChild()->getFirstChild();
+  } while (base->getKind() == Node::Kind::DependentMemberType);
+
+  assert(base->getKind() == Node::Kind::DependentGenericParamType
+         && "dependent members not based on a generic param are non-canonical"
+            " and shouldn't need remangling");
+  assert(members.size() >= 1);
+  if (members.size() == 1) {
+    Out << 'w';
+    mangleDependentGenericParamIndex(base);
+    mangle(members[0]->getChild(1));
+  } else {
+    Out << 'W';
+    mangleDependentGenericParamIndex(base);
+
+    for (unsigned i = 1, n = members.size(); i <= n; ++i) {
+      Node *member = members[n - i];
+      mangle(member->getChild(1));
+    }
+    Out << '_';
+  }
+}
+
+void Remangler::mangleDependentAssociatedTypeRef(Node *node) {
+  SubstitutionEntry entry;
+  if (trySubstitution(node, entry)) return;
+
+  if (node->getNumChildren() > 0) {
+    Out << 'P';
+    mangleProtocolWithoutPrefix(node->getFirstChild());
+  }
+  mangleIdentifier(node);
+
+  addSubstitution(entry);
+}
+
+void Remangler::mangleDependentGenericParamIndex(Node *node) {
+  auto depth = node->getChild(0)->getIndex();
+  auto index = node->getChild(1)->getIndex();
+
+  if (depth != 0) {
+    Out << 'd';
+    mangleIndex(depth - 1);
+    mangleIndex(index);
+    return;
+  }
+  if (index != 0) {
+    mangleIndex(index - 1);
+    return;
+  }
+
+  // depth == index == 0
+  Out << 'x';
+}
+
+void Remangler::mangleDependentGenericParamType(Node *node) {
+  if (node->getChild(0)->getIndex() == 0
+      && node->getChild(1)->getIndex() == 0) {
+    Out << 'x';
+    return;
+  }
+
+  Out << 'q';
+  mangleDependentGenericParamIndex(node);
+}
+
+void Remangler::mangleIndex(Node *node) {
+  mangleIndex(node->getIndex());
+}
+
+void Remangler::mangleProtocol(Node *node, EntityContext &ctx) {
+  mangleNominalType(node, 'P', ctx);
+}
+
+void Remangler::mangleProtocolWithoutPrefix(Node *node) {
+  if (node->getKind() == Node::Kind::Type) {
+    assert(node->getNumChildren() == 1);
+    node = node->begin()[0];
+  }
+
+  assert(node->getKind() == Node::Kind::Protocol);
+  EntityContext ctx;
+  mangleNominalType(node, '\0', ctx);
+}
+
+void Remangler::mangleGenericArgs(Node *node, EntityContext &ctx) {
+  switch (node->getKind()) {
+  case Node::Kind::Structure:
+  case Node::Kind::Enum:
+  case Node::Kind::Class: {
+    NodePointer parentOrModule = node->getChild(0);
+    mangleGenericArgs(parentOrModule, ctx);
+
+    // No generic arguments at this level
+    Out << '_';
+    break;
+  }
+
+  case Node::Kind::BoundGenericStructure:
+  case Node::Kind::BoundGenericEnum:
+  case Node::Kind::BoundGenericClass: {
+    NodePointer unboundType = node->getChild(0);
+    assert(unboundType->getKind() == Node::Kind::Type);
+    NodePointer nominalType = unboundType->getChild(0);
+    NodePointer parentOrModule = nominalType->getChild(0);
+    mangleGenericArgs(parentOrModule, ctx);
+
+    mangleTypeList(node->getChild(1));
+    break;
+  }
+
+  default:
+    break;
+  }
+}
+
+void Remangler::mangleAnyNominalType(Node *node, EntityContext &ctx) {
+  if (isSpecialized(node)) {
+    Out << 'G';
+
+    NodePointer unboundType = getUnspecialized(node, Factory);
+
+    mangleAnyNominalType(unboundType, ctx);
+    mangleGenericArgs(node, ctx);
+    return;
+  }
+
+  switch (node->getKind()) {
+  case Node::Kind::Structure:
+    mangleNominalType(node, 'V', ctx);
+    break;
+  case Node::Kind::Enum:
+    mangleNominalType(node, 'O', ctx);
+    break;
+  case Node::Kind::Class:
+    mangleNominalType(node, 'C', ctx);
+    break;
+  default:
+    unreachable("bad nominal type kind");
+  }
+}
+
+void Remangler::mangleStructure(Node *node, EntityContext &ctx) {
+  mangleAnyNominalType(node, ctx);
+}
+
+void Remangler::mangleEnum(Node *node, EntityContext &ctx) {
+  mangleAnyNominalType(node, ctx);
+}
+
+void Remangler::mangleClass(Node *node, EntityContext &ctx) {
+  mangleAnyNominalType(node, ctx);
+}
+
+void Remangler::mangleNominalType(Node *node, char kind, EntityContext &ctx) {
+  SubstitutionEntry entry;
+  if (trySubstitution(node, entry)) return;
+  mangleNamedEntity(node, kind, "", ctx);
+  addSubstitution(entry);
+}
+
+void Remangler::mangleBoundGenericClass(Node *node) {
+  EntityContext ctx;
+  mangleAnyNominalType(node, ctx);
+}
+
+void Remangler::mangleBoundGenericStructure(Node *node) {
+  EntityContext ctx;
+  mangleAnyNominalType(node, ctx);
+}
+
+void Remangler::mangleBoundGenericEnum(Node *node) {
+  EntityContext ctx;
+  mangleAnyNominalType(node, ctx);
+}
+
+void Remangler::mangleTypeList(Node *node) {
+  mangleChildNodes(node); // all types
+  Out << '_';
+}
+
+void Remangler::mangleReflectionMetadataBuiltinDescriptor(Node *node) {
+  Out << "MRb";
+}
+
+void Remangler::mangleReflectionMetadataFieldDescriptor(Node *node) {
+  Out << "MRf";
+}
+
+void Remangler::mangleReflectionMetadataAssocTypeDescriptor(Node *node) {
+  Out << "MRa";
+}
+
+void Remangler::mangleReflectionMetadataSuperclassDescriptor(Node *node) {
+  Out << "MRc";
+}
+
+void Remangler::mangleGenericTypeParamDecl(Node *node) {
+  unreachable("todo");
+}
+
+void Remangler::mangleCurryThunk(Node *node, EntityContext &ctx) {
+  Out << "<curry-thunk>";
+}
+
+void Remangler::mangleEmptyList(Node *node) {
+  Out << "<empty>";
+}
+
+void Remangler::mangleFirstElementMarker(Node *node) {
+  Out << "<first>";
+}
+
+void Remangler::mangleVariadicMarker(Node *node) {
+  // Handled in mangleTuple
+}
+
+void Remangler::mangleOutlinedCopy(Node *node) {
+  Out << "Wy";
+  mangleChildNodes(node);
+}
+
+void Remangler::mangleOutlinedConsume(Node *node) {
+  Out << "We";
+  mangleChildNodes(node);
+}
+
+void Remangler::mangleOutlinedRetain(Node *node) {
+  Out << "Wr";
+  mangleSingleChildNode(node);
+}
+
+void Remangler::mangleOutlinedRelease(Node *node) {
+  Out << "Ws";
+  mangleSingleChildNode(node);
+}
+
+void Remangler::mangleKeyPathGetterThunkHelper(Node *node) {
+  Out << "TK";
+  mangleChildNodes(node);
+}
+
+void Remangler::mangleKeyPathSetterThunkHelper(Node *node) {
+  Out << "Tk";
+  mangleChildNodes(node);
+}
+
+void Remangler::mangleProtocolListWithClass(Node *node) {
+  Out << "Xc";
+  mangleChildNode(node, 1);
+  mangleProtocolListWithoutPrefix(node->getChild(0));
+}
+
+void Remangler::mangleProtocolListWithAnyObject(Node *node) {
+  Node *P = Factory.createNode(Node::Kind::Protocol);
+  P->addChild(Factory.createNode(Node::Kind::Module, "Swift"), Factory);
+  P->addChild(Factory.createNode(Node::Kind::Identifier, "AnyObject"), Factory);
+  Out << "P";
+  mangleProtocolListWithoutPrefix(node->getChild(0), /*additionalProto*/ P);
+}
+
+void Remangler::mangleVTableThunk(Node *node) {
+  Out << "TV";
+  mangleChildNodes(node);
+}
+
+void Remangler::mangleSILBoxTypeWithLayout(Node *node) {
+  assert(node->getKind() == Node::Kind::SILBoxTypeWithLayout);
+  assert(node->getNumChildren() == 1 || node->getNumChildren() == 3);
+  Out << "XB";
+  auto layout = node->getChild(0);
+  assert(layout->getKind() == Node::Kind::SILBoxLayout);
+  NodePointer genericArgs = nullptr;
+  if (node->getNumChildren() == 3) {
+    NodePointer signature = node->getChild(1);
+    assert(signature->getKind() == Node::Kind::DependentGenericSignature);
+    genericArgs = node->getChild(2);
+    assert(genericArgs->getKind() == Node::Kind::TypeList);
+    
+    Out << 'G';
+    mangleDependentGenericSignature(signature);
+  }
+  mangleSILBoxLayout(layout);
+  if (genericArgs) {
+    for (unsigned i = 0; i < genericArgs->getNumChildren(); ++i) {
+      auto type = genericArgs->getChild(i);
+      assert(genericArgs->getKind() == Node::Kind::Type);
+      mangleType(type);
+    }
+    Out << '_';  
+  }
+}
+
+void Remangler::mangleSILBoxLayout(Node *node) {
+  assert(node->getKind() == Node::Kind::SILBoxLayout);
+  for (unsigned i = 0; i < node->getNumChildren(); ++i) {
+    assert(node->getKind() == Node::Kind::SILBoxImmutableField
+           || node->getKind() == Node::Kind::SILBoxMutableField);
+    mangle(node->getChild(i));
+    
+  }
+  Out << '_';
+}
+
+void Remangler::mangleSILBoxMutableField(Node *node) {
+  Out << 'm';
+  assert(node->getNumChildren() == 1
+         && node->getChild(0)->getKind() == Node::Kind::Type);
+  mangleType(node->getChild(0));
+}
+
+void Remangler::mangleSILBoxImmutableField(Node *node) {
+  Out << 'i';
+  assert(node->getNumChildren() == 1
+         && node->getChild(0)->getKind() == Node::Kind::Type);
+  mangleType(node->getChild(0));
+}
+
+/// The top-level interface to the remangler.
+std::string Demangle::mangleNodeOld(const NodePointer &node) {
+  if (!node) return "";
+
+  DemanglerPrinter printer;
+  Remangler(printer).mangle(node);
+  return std::move(printer).str();
+}
diff --git a/lib/Demangling/Remangler.cpp b/lib/Demangling/Remangler.cpp
index f791d19..7abeb0d 100644
--- a/lib/Demangling/Remangler.cpp
+++ b/lib/Demangling/Remangler.cpp
@@ -681,12 +681,14 @@
 void Remangler::mangleDependentGenericLayoutRequirement(Node *node) {
   auto NumMembersAndParamIdx = mangleConstrainedType(node->getChild(0));
   switch (NumMembersAndParamIdx.first) {
-    case -1: Buffer << "RL"; return; // substitution
+    case -1: Buffer << "RL"; break; // substitution
     case 0: Buffer << "Rl"; break;
     case 1: Buffer << "Rm"; break;
     default: Buffer << "RM"; break;
   }
-  mangleDependentGenericParamIndex(NumMembersAndParamIdx.second);
+  // If not a substitution, mangle the dependent generic param index.
+  if (NumMembersAndParamIdx.first != -1)
+    mangleDependentGenericParamIndex(NumMembersAndParamIdx.second);
   assert(node->getChild(1)->getKind() == Node::Kind::Identifier);
   assert(node->getChild(1)->getText().size() == 1);
   Buffer << node->getChild(1)->getText()[0];
@@ -1292,7 +1294,7 @@
     Buffer << 's';
   } else if (node->getText() == MANGLING_MODULE_OBJC) {
     Buffer << "So";
-  } else if (node->getText() == MANGLING_MODULE_CLANG_IMPORTER) {
+  } else if (node->getText() == MANGLING_MODULE_C) {
     Buffer << "SC";
   } else {
     mangleIdentifier(node);
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index f36d1ec..211c297 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -2255,7 +2255,7 @@
   llvm::raw_string_ostream os(str);
 
   os << Action::getClassName(A->getKind()) << ", ";
-  if (const InputAction *IA = dyn_cast<InputAction>(A)) {
+  if (const auto *IA = dyn_cast<InputAction>(A)) {
     os << "\"" << IA->getInputArg().getValue() << "\"";
   } else {
     os << "{";
diff --git a/lib/Driver/Job.cpp b/lib/Driver/Job.cpp
index d4a8beb..dcad3c1 100644
--- a/lib/Driver/Job.cpp
+++ b/lib/Driver/Job.cpp
@@ -117,7 +117,7 @@
   SmallVector<std::string, 4> Inputs;
 
   for (const Action *A : getSource().getInputs())
-    if (const InputAction *IA = dyn_cast<InputAction>(A))
+    if (const auto *IA = dyn_cast<InputAction>(A))
       Inputs.push_back(IA->getInputArg().getValue());
 
   for (const Job *J : getInputs())
diff --git a/lib/Driver/OutputFileMap.cpp b/lib/Driver/OutputFileMap.cpp
index bc68458..980e715 100644
--- a/lib/Driver/OutputFileMap.cpp
+++ b/lib/Driver/OutputFileMap.cpp
@@ -105,7 +105,7 @@
   if (!Root)
     return true;
 
-  llvm::yaml::MappingNode *Map = dyn_cast<llvm::yaml::MappingNode>(Root);
+  auto *Map = dyn_cast<llvm::yaml::MappingNode>(Root);
   if (!Map)
     return true;
 
@@ -119,7 +119,7 @@
     if (!Value)
       return true;
 
-    llvm::yaml::ScalarNode *InputPath = dyn_cast<llvm::yaml::ScalarNode>(Key);
+    auto *InputPath = dyn_cast<llvm::yaml::ScalarNode>(Key);
     if (!InputPath)
       return true;
 
@@ -134,11 +134,11 @@
       llvm::yaml::Node *Key = OutputPair.getKey();
       llvm::yaml::Node *Value = OutputPair.getValue();
 
-      llvm::yaml::ScalarNode *KindNode = dyn_cast<llvm::yaml::ScalarNode>(Key);
+      auto *KindNode = dyn_cast<llvm::yaml::ScalarNode>(Key);
       if (!KindNode)
         return true;
 
-      llvm::yaml::ScalarNode *Path = dyn_cast<llvm::yaml::ScalarNode>(Value);
+      auto *Path = dyn_cast<llvm::yaml::ScalarNode>(Value);
       if (!Path)
         return true;
 
diff --git a/lib/Driver/ParseableOutput.cpp b/lib/Driver/ParseableOutput.cpp
index 89696ad..f7c9146 100644
--- a/lib/Driver/ParseableOutput.cpp
+++ b/lib/Driver/ParseableOutput.cpp
@@ -109,7 +109,7 @@
     wrapper.flush();
 
     for (const Action *A : Cmd.getSource().getInputs()) {
-      if (const InputAction *IA = dyn_cast<InputAction>(A))
+      if (const auto *IA = dyn_cast<InputAction>(A))
         Inputs.push_back(CommandInput(IA->getInputArg().getValue()));
     }
 
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 0783ceb..b66de8e 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -884,6 +884,12 @@
                           const FrontendOptions &FrontendOpts) {
   using namespace options;
 
+  /// FIXME: Remove this flag when void subscripts are implemented.
+  /// This is used to guard preemptive testing for the fix-it.
+  if (Args.hasArg(OPT_fix_string_substring_conversion)) {
+    Opts.FixStringToSubstringConversions = true;
+  }
+
   if (auto A = Args.getLastArg(OPT_swift_version)) {
     auto vers = version::Version::parseVersionString(
       A->getValue(), SourceLoc(), &Diags);
@@ -902,7 +908,8 @@
 
   Opts.UseMalloc |= Args.hasArg(OPT_use_malloc);
 
-  Opts.DiagnosticsEditorMode |= Args.hasArg(OPT_diagnostics_editor_mode);
+  Opts.DiagnosticsEditorMode |= Args.hasArg(OPT_diagnostics_editor_mode,
+                                            OPT_serialize_diagnostics_path);
 
   Opts.EnableExperimentalPropertyBehaviors |=
     Args.hasArg(OPT_enable_experimental_property_behaviors);
@@ -913,8 +920,11 @@
   Opts.EnableClassResilience |=
     Args.hasArg(OPT_enable_class_resilience);
 
-  Opts.EnableDeserializationRecovery |=
-    Args.hasArg(OPT_enable_experimental_deserialization_recovery);
+  if (auto A = Args.getLastArg(OPT_enable_deserialization_recovery,
+                               OPT_disable_deserialization_recovery)) {
+    Opts.EnableDeserializationRecovery
+      = A->getOption().matches(OPT_enable_deserialization_recovery);
+  }
 
   Opts.DisableAvailabilityChecking |=
       Args.hasArg(OPT_disable_availability_checking);
@@ -1463,6 +1473,14 @@
     }
   }
 
+  for (const Arg *A : make_range(Args.filtered_begin(OPT_Xcc),
+                                 Args.filtered_end())) {
+    StringRef Opt = A->getValue();
+    if (Opt.startswith("-D") || Opt.startswith("-U"))
+      Opts.ClangDefines.push_back(Opt);
+  }
+
+
   for (const Arg *A : make_range(Args.filtered_begin(OPT_l, OPT_framework),
                                  Args.filtered_end())) {
     LibraryKind Kind;
@@ -1614,7 +1632,7 @@
   }
 
   if (auto DataPath = Args.getLastArg(OPT_api_diff_data_file)) {
-    Opts.APIDigesterDataStorePath = DataPath->getValue();
+    Opts.APIDigesterDataStorePaths.push_back(DataPath->getValue());
   } else {
     bool Supported = true;
     llvm::SmallString<128> dataPath(ResourcePath);
@@ -1629,8 +1647,14 @@
       llvm::sys::path::append(dataPath, "watchos.json");
     else
       Supported = false;
-    if (Supported)
-      Opts.APIDigesterDataStorePath = dataPath.str();
+    if (Supported) {
+      llvm::SmallString<128> authoredDataPath(ResourcePath);
+      llvm::sys::path::append(authoredDataPath, "migrator");
+      llvm::sys::path::append(authoredDataPath, "overlay.json");
+      // Add authored list first to take higher priority.
+      Opts.APIDigesterDataStorePaths.push_back(authoredDataPath.str());
+      Opts.APIDigesterDataStorePaths.push_back(dataPath.str());
+    }
   }
 
   return false;
diff --git a/lib/Frontend/Frontend.cpp b/lib/Frontend/Frontend.cpp
index 631f94d..cbf3fe7 100644
--- a/lib/Frontend/Frontend.cpp
+++ b/lib/Frontend/Frontend.cpp
@@ -634,3 +634,11 @@
   assert(Context->LoadedModules.size() == 1 &&
          "Loaded a module during parse-only");
 }
+
+void CompilerInstance::freeContextAndSIL() {
+  Context.reset();
+  TheSILModule.reset();
+  MainModule = nullptr;
+  SML = nullptr;
+  PrimarySourceFile = nullptr;
+}
diff --git a/lib/Frontend/SerializedDiagnosticConsumer.cpp b/lib/Frontend/SerializedDiagnosticConsumer.cpp
index 7bc3fa8..09b2e69 100644
--- a/lib/Frontend/SerializedDiagnosticConsumer.cpp
+++ b/lib/Frontend/SerializedDiagnosticConsumer.cpp
@@ -16,12 +16,15 @@
 
 #include "swift/Frontend/SerializedDiagnosticConsumer.h"
 #include "swift/AST/DiagnosticConsumer.h"
+#include "swift/AST/DiagnosticsFrontend.h"
 #include "swift/Basic/LLVM.h"
 #include "swift/Basic/SourceManager.h"
+#include "swift/Frontend/PrintingDiagnosticConsumer.h"
 #include "swift/Parse/Lexer.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/Twine.h"
 #include "llvm/ADT/DenseMap.h"
+#include "llvm/Support/FileSystem.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
 #include "llvm/ADT/SmallString.h"
@@ -84,8 +87,10 @@
 typedef SmallVectorImpl<uint64_t> RecordDataImpl;
 
 struct SharedState : llvm::RefCountedBase<SharedState> {
-  SharedState(std::unique_ptr<raw_ostream> OS)
-      : Stream(Buffer), OS(std::move(OS)), EmittedAnyDiagBlocks(false) { }
+  SharedState(StringRef serializedDiagnosticsPath)
+      : Stream(Buffer),
+        SerializedDiagnosticsPath(serializedDiagnosticsPath),
+        EmittedAnyDiagBlocks(false) {}
 
   /// \brief The byte buffer for the serialized content.
   llvm::SmallString<1024> Buffer;
@@ -93,8 +98,8 @@
   /// \brief The BitStreamWriter for the serialized diagnostics.
   llvm::BitstreamWriter Stream;
 
-  /// \brief The name of the diagnostics file.
-  std::unique_ptr<raw_ostream> OS;
+  /// \brief The path of the diagnostics file.
+  std::string SerializedDiagnosticsPath;
 
   /// \brief The set of constructed record abbreviations.
   AbbreviationMap Abbrevs;
@@ -124,15 +129,21 @@
 class SerializedDiagnosticConsumer : public DiagnosticConsumer {
   /// \brief State shared among the various clones of this diagnostic consumer.
   llvm::IntrusiveRefCntPtr<SharedState> State;
+  bool CalledFinishProcessing = false;
 public:
-  SerializedDiagnosticConsumer(std::unique_ptr<raw_ostream> OS)
-      : State(new SharedState(std::move(OS))) {
+  SerializedDiagnosticConsumer(StringRef serializedDiagnosticsPath)
+      : State(new SharedState(serializedDiagnosticsPath)) {
     emitPreamble();
   }
 
-  ~SerializedDiagnosticConsumer() override {
-    // FIXME: we may not wish to put this in a destructor.
-    // That's not what clang does.
+  ~SerializedDiagnosticConsumer() {
+    assert(CalledFinishProcessing && "did not call finishProcessing()");
+  }
+
+  bool finishProcessing() override {
+    assert(!CalledFinishProcessing &&
+           "called finishProcessing() multiple times");
+    CalledFinishProcessing = true;
 
     // NOTE: clang also does check for shared instances.  We don't
     // have these yet in Swift, but if we do we need to add an extra
@@ -142,10 +153,25 @@
     if (State->EmittedAnyDiagBlocks)
       exitDiagBlock();
 
-    // Write the generated bitstream to "Out".
-    State->OS->write((char *)&State->Buffer.front(), State->Buffer.size());
-    State->OS->flush();
-    State->OS.reset(nullptr);
+    // Write the generated bitstream to the file.
+    std::error_code EC;
+    std::unique_ptr<llvm::raw_fd_ostream> OS;
+    OS.reset(new llvm::raw_fd_ostream(State->SerializedDiagnosticsPath, EC,
+                                      llvm::sys::fs::F_None));
+    if (EC) {
+      // Create a temporary diagnostics engine to print the error to stderr.
+      SourceManager dummyMgr;
+      DiagnosticEngine DE(dummyMgr);
+      PrintingDiagnosticConsumer PDC;
+      DE.addConsumer(PDC);
+      DE.diagnose(SourceLoc(), diag::cannot_open_serialized_file,
+                  State->SerializedDiagnosticsPath, EC.message());
+      return true;
+    }
+
+    OS->write((char *)&State->Buffer.front(), State->Buffer.size());
+    OS->flush();
+    return false;
   }
 
   void handleDiagnostic(SourceManager &SM, SourceLoc Loc,
@@ -197,8 +223,8 @@
 } // end anonymous namespace
 
 namespace swift { namespace serialized_diagnostics {
-  DiagnosticConsumer *createConsumer(std::unique_ptr<llvm::raw_ostream> OS) {
-    return new SerializedDiagnosticConsumer(std::move(OS));
+  DiagnosticConsumer *createConsumer(StringRef serializedDiagnosticsPath) {
+    return new SerializedDiagnosticConsumer(serializedDiagnosticsPath);
   }
 } // namespace serialized_diagnostics
 } // namespace swift
diff --git a/lib/FrontendTool/FrontendTool.cpp b/lib/FrontendTool/FrontendTool.cpp
index 1b7efdd..ff6127b 100644
--- a/lib/FrontendTool/FrontendTool.cpp
+++ b/lib/FrontendTool/FrontendTool.cpp
@@ -305,19 +305,17 @@
 /// format.
 class JSONFixitWriter
   : public DiagnosticConsumer, public migrator::FixitFilter {
+  std::string FixitsOutputPath;
   std::unique_ptr<llvm::raw_ostream> OSPtr;
   bool FixitAll;
   std::vector<SingleEdit> AllEdits;
 
 public:
-  JSONFixitWriter(std::unique_ptr<llvm::raw_ostream> OS,
+  JSONFixitWriter(std::string fixitsOutputPath,
                   const DiagnosticOptions &DiagOpts)
-    : OSPtr(std::move(OS)),
+    : FixitsOutputPath(fixitsOutputPath),
       FixitAll(DiagOpts.FixitCodeForAllDiagnostics) {}
 
-  ~JSONFixitWriter() override {
-    swift::writeEditsInJson(llvm::makeArrayRef(AllEdits), *OSPtr);
-  }
 private:
   void handleDiagnostic(SourceManager &SM, SourceLoc Loc,
                         DiagnosticKind Kind,
@@ -330,6 +328,27 @@
       AllEdits.push_back({SM, Fix.getRange(), Fix.getText()});
     }
   }
+
+  bool finishProcessing() override {
+    std::error_code EC;
+    std::unique_ptr<llvm::raw_fd_ostream> OS;
+    OS.reset(new llvm::raw_fd_ostream(FixitsOutputPath,
+                                      EC,
+                                      llvm::sys::fs::F_None));
+    if (EC) {
+      // Create a temporary diagnostics engine to print the error to stderr.
+      SourceManager dummyMgr;
+      DiagnosticEngine DE(dummyMgr);
+      PrintingDiagnosticConsumer PDC;
+      DE.addConsumer(PDC);
+      DE.diagnose(SourceLoc(), diag::cannot_open_file,
+                  FixitsOutputPath, EC.message());
+      return true;
+    }
+
+    swift::writeEditsInJson(llvm::makeArrayRef(AllEdits), *OS);
+    return false;
+  }
 };
 
 } // anonymous namespace
@@ -426,7 +445,7 @@
 /// \param Instance Will be reset after performIRGeneration when the verifier
 ///                 mode is NoVerify and there were no errors.
 /// \returns true on error
-static bool performCompile(std::unique_ptr<CompilerInstance> &Instance,
+static bool performCompile(CompilerInstance &Instance,
                            CompilerInvocation &Invocation,
                            ArrayRef<const char *> Args,
                            int &ReturnValue,
@@ -439,7 +458,7 @@
   // avoid touching any other inputs and just parse, emit and exit.
   if (Action == FrontendOptions::EmitPCH) {
     auto clangImporter = static_cast<ClangImporter *>(
-      Instance->getASTContext().getClangModuleLoader());
+      Instance.getASTContext().getClangModuleLoader());
     return clangImporter->emitBridgingPCH(
       Invocation.getInputFilenames()[0],
       opts.getSingleOutputFilename());
@@ -457,7 +476,7 @@
     llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> FileBufOrErr =
       llvm::MemoryBuffer::getFileOrSTDIN(Invocation.getInputFilenames()[0]);
     if (!FileBufOrErr) {
-      Instance->getASTContext().Diags.diagnose(SourceLoc(),
+      Instance.getASTContext().Diags.diagnose(SourceLoc(),
                                               diag::error_open_input_file,
                                               Invocation.getInputFilenames()[0],
                                               FileBufOrErr.getError().message());
@@ -472,7 +491,7 @@
     if (!Module) {
       // TODO: Translate from the diagnostic info to the SourceManager location
       // if available.
-      Instance->getASTContext().Diags.diagnose(SourceLoc(),
+      Instance.getASTContext().Diags.diagnose(SourceLoc(),
                                               diag::error_parse_input_file,
                                               Invocation.getInputFilenames()[0],
                                               Err.getMessage());
@@ -482,31 +501,31 @@
     // TODO: remove once the frontend understands what action it should perform
     IRGenOpts.OutputKind = getOutputKind(Action);
 
-    return performLLVM(IRGenOpts, Instance->getASTContext(), Module.get());
+    return performLLVM(IRGenOpts, Instance.getASTContext(), Module.get());
   }
 
   ReferencedNameTracker nameTracker;
   bool shouldTrackReferences = !opts.ReferenceDependenciesFilePath.empty();
   if (shouldTrackReferences)
-    Instance->setReferencedNameTracker(&nameTracker);
+    Instance.setReferencedNameTracker(&nameTracker);
 
   if (Action == FrontendOptions::Parse ||
       Action == FrontendOptions::DumpParse ||
       Action == FrontendOptions::DumpInterfaceHash ||
       Action == FrontendOptions::EmitImportedModules)
-    Instance->performParseOnly();
+    Instance.performParseOnly();
   else
-    Instance->performSema();
+    Instance.performSema();
 
   if (Action == FrontendOptions::Parse)
-    return Instance->getASTContext().hadError();
+    return Instance.getASTContext().hadError();
 
   if (observer) {
-    observer->performedSemanticAnalysis(*Instance);
+    observer->performedSemanticAnalysis(Instance);
   }
 
   if (Stats) {
-    countStatsPostSema(*Stats, *Instance);
+    countStatsPostSema(*Stats, Instance);
   }
 
   FrontendOptions::DebugCrashMode CrashMode = opts.CrashMode;
@@ -515,20 +534,19 @@
   else if (CrashMode == FrontendOptions::DebugCrashMode::CrashAfterParse)
     debugFailWithCrash();
 
-  ASTContext &Context = Instance->getASTContext();
+  ASTContext &Context = Instance.getASTContext();
 
-  if (!Context.hadError() &&
-      Invocation.getMigratorOptions().shouldRunMigrator()) {
-    migrator::updateCodeAndEmitRemap(*Instance, Invocation);
+  if (Invocation.getMigratorOptions().shouldRunMigrator()) {
+    migrator::updateCodeAndEmitRemap(&Instance, Invocation);
   }
 
   if (Action == FrontendOptions::REPL) {
-    runREPL(*Instance, ProcessCmdLine(Args.begin(), Args.end()),
+    runREPL(Instance, ProcessCmdLine(Args.begin(), Args.end()),
             Invocation.getParseStdlib());
     return Context.hadError();
   }
 
-  SourceFile *PrimarySourceFile = Instance->getPrimarySourceFile();
+  SourceFile *PrimarySourceFile = Instance.getPrimarySourceFile();
 
   // We've been told to dump the AST (either after parsing or type-checking,
   // which is already differentiated in CompilerInstance::performSema()),
@@ -542,7 +560,7 @@
     SourceFile *SF = PrimarySourceFile;
     if (!SF) {
       SourceFileKind Kind = Invocation.getSourceFileKind();
-      SF = &Instance->getMainModule()->getMainSourceFile(Kind);
+      SF = &Instance.getMainModule()->getMainSourceFile(Kind);
     }
     if (Action == FrontendOptions::PrintAST)
       SF->print(llvm::outs(), PrintOptions::printEverything());
@@ -552,7 +570,7 @@
       if (opts.DumpScopeMapLocations.empty()) {
         scope.expandAll();
       } else if (auto bufferID = SF->getBufferID()) {
-        SourceManager &sourceMgr = Instance->getSourceMgr();
+        SourceManager &sourceMgr = Instance.getSourceMgr();
         // Probe each of the locations, and dump what we find.
         for (auto lineColumn : opts.DumpScopeMapLocations) {
           SourceLoc loc = sourceMgr.getLocForLineCol(*bufferID,
@@ -598,7 +616,7 @@
       SF->dump();
     return Context.hadError();
   } else if (Action == FrontendOptions::EmitImportedModules) {
-    emitImportedModules(Context, Instance->getMainModule(), opts);
+    emitImportedModules(Context, Instance.getMainModule(), opts);
     return Context.hadError();
   }
 
@@ -607,15 +625,15 @@
     Context.getClangModuleLoader()->printStatistics();
 
   if (!opts.DependenciesFilePath.empty())
-    (void)emitMakeDependencies(Context.Diags, *Instance->getDependencyTracker(),
+    (void)emitMakeDependencies(Context.Diags, *Instance.getDependencyTracker(),
                                opts);
 
   if (shouldTrackReferences)
-    emitReferenceDependencies(Context.Diags, Instance->getPrimarySourceFile(),
-                              *Instance->getDependencyTracker(), opts);
+    emitReferenceDependencies(Context.Diags, Instance.getPrimarySourceFile(),
+                              *Instance.getDependencyTracker(), opts);
 
   if (!opts.LoadedModuleTracePath.empty())
-    (void)emitLoadedModuleTrace(Context, *Instance->getDependencyTracker(),
+    (void)emitLoadedModuleTrace(Context, *Instance.getDependencyTracker(),
                                 opts);
 
   if (Context.hadError())
@@ -624,39 +642,39 @@
   // FIXME: This is still a lousy approximation of whether the module file will
   // be externally consumed.
   bool moduleIsPublic =
-      !Instance->getMainModule()->hasEntryPoint() &&
+      !Instance.getMainModule()->hasEntryPoint() &&
       opts.ImplicitObjCHeaderPath.empty() &&
       !Context.LangOpts.EnableAppExtensionRestrictions;
 
   // We've just been told to perform a typecheck, so we can return now.
   if (Action == FrontendOptions::Typecheck) {
     if (!opts.ObjCHeaderOutputPath.empty())
-      return printAsObjC(opts.ObjCHeaderOutputPath, Instance->getMainModule(),
+      return printAsObjC(opts.ObjCHeaderOutputPath, Instance.getMainModule(),
                          opts.ImplicitObjCHeaderPath, moduleIsPublic);
     return Context.hadError();
   }
 
   if (Action == FrontendOptions::EmitTBD) {
     auto hasMultipleIRGenThreads = Invocation.getSILOptions().NumThreads > 1;
-    return writeTBD(Instance->getMainModule(), hasMultipleIRGenThreads,
+    return writeTBD(Instance.getMainModule(), hasMultipleIRGenThreads,
                     opts.getSingleOutputFilename());
   }
 
   assert(Action >= FrontendOptions::EmitSILGen &&
          "All actions not requiring SILGen must have been handled!");
 
-  std::unique_ptr<SILModule> SM = Instance->takeSILModule();
+  std::unique_ptr<SILModule> SM = Instance.takeSILModule();
   if (!SM) {
     if (opts.PrimaryInput.hasValue() && opts.PrimaryInput.getValue().isFilename()) {
       FileUnit *PrimaryFile = PrimarySourceFile;
       if (!PrimaryFile) {
         auto Index = opts.PrimaryInput.getValue().Index;
-        PrimaryFile = Instance->getMainModule()->getFiles()[Index];
+        PrimaryFile = Instance.getMainModule()->getFiles()[Index];
       }
       SM = performSILGeneration(*PrimaryFile, Invocation.getSILOptions(),
                                 None, opts.SILSerializeAll);
     } else {
-      SM = performSILGeneration(Instance->getMainModule(), Invocation.getSILOptions(),
+      SM = performSILGeneration(Instance.getMainModule(), Invocation.getSILOptions(),
                                 opts.SILSerializeAll,
                                 true);
     }
@@ -674,7 +692,7 @@
     // If we are asked to link all, link all.
     if (Invocation.getSILOptions().LinkMode == SILOptions::LinkAll)
       performSILLinking(SM.get(), true);
-    return writeSIL(*SM, Instance->getMainModule(), opts.EmitVerboseSIL,
+    return writeSIL(*SM, Instance.getMainModule(), opts.EmitVerboseSIL,
                     opts.getSingleOutputFilename(), opts.EmitSortedSIL);
   }
 
@@ -684,7 +702,7 @@
       performSILLinking(SM.get(), true);
 
     auto DC = PrimarySourceFile ? ModuleOrSourceFile(PrimarySourceFile) :
-                                  Instance->getMainModule();
+                                  Instance.getMainModule();
     if (!opts.ModuleOutputPath.empty()) {
       SerializationOptions serializationOpts;
       serializationOpts.OutputPath = opts.ModuleOutputPath.c_str();
@@ -770,13 +788,13 @@
   }
 
   if (!opts.ObjCHeaderOutputPath.empty()) {
-    (void)printAsObjC(opts.ObjCHeaderOutputPath, Instance->getMainModule(),
+    (void)printAsObjC(opts.ObjCHeaderOutputPath, Instance.getMainModule(),
                       opts.ImplicitObjCHeaderPath, moduleIsPublic);
   }
 
   if (Action == FrontendOptions::EmitSIB) {
     auto DC = PrimarySourceFile ? ModuleOrSourceFile(PrimarySourceFile) :
-                                  Instance->getMainModule();
+                                  Instance.getMainModule();
     if (!opts.ModuleOutputPath.empty()) {
       SerializationOptions serializationOpts;
       serializationOpts.OutputPath = opts.ModuleOutputPath.c_str();
@@ -790,7 +808,7 @@
 
   if (!opts.ModuleOutputPath.empty() || !opts.ModuleDocOutputPath.empty()) {
     auto DC = PrimarySourceFile ? ModuleOrSourceFile(PrimarySourceFile) :
-                                  Instance->getMainModule();
+                                  Instance.getMainModule();
     if (!opts.ModuleOutputPath.empty()) {
       SerializationOptions serializationOpts;
       serializationOpts.OutputPath = opts.ModuleOutputPath.c_str();
@@ -825,7 +843,7 @@
 
   // We've been told to write canonical SIL, so write it now.
   if (Action == FrontendOptions::EmitSIL) {
-    return writeSIL(*SM, Instance->getMainModule(), opts.EmitVerboseSIL,
+    return writeSIL(*SM, Instance.getMainModule(), opts.EmitVerboseSIL,
                     opts.getSingleOutputFilename(), opts.EmitSortedSIL);
   }
 
@@ -849,14 +867,14 @@
     IRGenOpts.DebugInfoKind = IRGenDebugInfoKind::Normal;
     const ProcessCmdLine &CmdLine = ProcessCmdLine(opts.ImmediateArgv.begin(),
                                                    opts.ImmediateArgv.end());
-    Instance->setSILModule(std::move(SM));
+    Instance.setSILModule(std::move(SM));
 
     if (observer) {
-      observer->aboutToRunImmediately(*Instance);
+      observer->aboutToRunImmediately(Instance);
     }
 
     ReturnValue =
-      RunImmediately(*Instance, CmdLine, IRGenOpts, Invocation.getSILOptions());
+      RunImmediately(Instance, CmdLine, IRGenOpts, Invocation.getSILOptions());
     return Context.hadError();
   }
 
@@ -870,14 +888,14 @@
                                    opts.getSingleOutputFilename(), LLVMContext,
                                    0, &HashGlobal);
   } else {
-    IRModule = performIRGeneration(IRGenOpts, Instance->getMainModule(),
+    IRModule = performIRGeneration(IRGenOpts, Instance.getMainModule(),
                                    std::move(SM),
                                    opts.getSingleOutputFilename(), LLVMContext,
                                    &HashGlobal);
   }
 
   // Just because we had an AST error it doesn't mean we can't performLLVM.
-  bool HadError = Instance->getASTContext().hadError();
+  bool HadError = Instance.getASTContext().hadError();
   
   // If the AST Context has no errors but no IRModule is available,
   // parallelIRGen happened correctly, since parallel IRGen produces multiple
@@ -897,7 +915,7 @@
       error =
           validateTBD(PrimarySourceFile, *IRModule, hasMultipleIRGenThreads);
     else
-      error = validateTBD(Instance->getMainModule(), *IRModule,
+      error = validateTBD(Instance.getMainModule(), *IRModule,
                           hasMultipleIRGenThreads);
     if (error)
       return true;
@@ -907,18 +925,13 @@
     createTargetMachine(IRGenOpts, Context);
   version::Version EffectiveLanguageVersion =
     Context.LangOpts.EffectiveLanguageVersion;
-  DiagnosticEngine &Diags = Context.Diags;
-  const DiagnosticOptions &DiagOpts = Invocation.getDiagnosticOptions();
-  
-  // Delete the compiler instance now that we have an IRModule.
-  if (DiagOpts.VerifyMode == DiagnosticOptions::NoVerify) {
-    SM.reset();
-    Instance.reset();
-  }
-  
+
+  // Free up some compiler resources now that we have an IRModule.
+  Instance.freeContextAndSIL();
+
   // Now that we have a single IR Module, hand it over to performLLVM.
-  return performLLVM(IRGenOpts, &Diags, nullptr, HashGlobal, IRModule.get(),
-                  TargetMachine.get(), EffectiveLanguageVersion,
+  return performLLVM(IRGenOpts, &Instance.getDiags(), nullptr, HashGlobal,
+                  IRModule.get(), TargetMachine.get(), EffectiveLanguageVersion,
                   opts.getSingleOutputFilename()) || HadError;
 }
 
@@ -976,7 +989,7 @@
   }
 
   for (auto *FU : Mod->getFiles()) {
-    if (SourceFile *SF = dyn_cast<SourceFile>(FU))
+    if (auto *SF = dyn_cast<SourceFile>(FU))
       if (dumpFile(SF))
         return true;
   }
@@ -1032,9 +1045,23 @@
     llvm::make_unique<CompilerInstance>();
   Instance->addDiagnosticConsumer(&PDC);
 
+  struct FinishDiagProcessingCheckRAII {
+    bool CalledFinishDiagProcessing = false;
+    ~FinishDiagProcessingCheckRAII() {
+      assert(CalledFinishDiagProcessing && "returned from the function "
+        "without calling finishDiagProcessing");
+    }
+  } FinishDiagProcessingCheckRAII;
+
+  auto finishDiagProcessing = [&](int retValue) -> int {
+    FinishDiagProcessingCheckRAII.CalledFinishDiagProcessing = true;
+    bool err = Instance->getDiags().finishProcessing();
+    return retValue ? retValue : err;
+  };
+
   if (Args.empty()) {
     Instance->getDiags().diagnose(SourceLoc(), diag::error_no_frontend_args);
-    return 1;
+    return finishDiagProcessing(1);
   }
 
   CompilerInvocation Invocation;
@@ -1047,7 +1074,7 @@
 
   // Parse arguments.
   if (Invocation.parseArgs(Args, Instance->getDiags(), workingDirectory)) {
-    return 1;
+    return finishDiagProcessing(1);
   }
 
   // Setting DWARF Version depend on platform
@@ -1069,14 +1096,14 @@
     Options->PrintHelp(llvm::outs(), displayName(MainExecutablePath).c_str(),
                        "Swift frontend", IncludedFlagsBitmask,
                        ExcludedFlagsBitmask);
-    return 0;
+    return finishDiagProcessing(0);
   }
 
   if (Invocation.getFrontendOptions().RequestedAction ==
         FrontendOptions::NoneAction) {
     Instance->getDiags().diagnose(SourceLoc(),
                                  diag::error_missing_frontend_action);
-    return 1;
+    return finishDiagProcessing(1);
   }
 
   // Because the serialized diagnostics consumer is initialized here,
@@ -1090,21 +1117,8 @@
     const std::string &SerializedDiagnosticsPath =
       Invocation.getFrontendOptions().SerializedDiagnosticsPath;
     if (!SerializedDiagnosticsPath.empty()) {
-      std::error_code EC;
-      std::unique_ptr<llvm::raw_fd_ostream> OS;
-      OS.reset(new llvm::raw_fd_ostream(SerializedDiagnosticsPath,
-                                        EC,
-                                        llvm::sys::fs::F_None));
-
-      if (EC) {
-        Instance->getDiags().diagnose(SourceLoc(),
-                                     diag::cannot_open_serialized_file,
-                                     SerializedDiagnosticsPath, EC.message());
-        return 1;
-      }
-
       SerializedConsumer.reset(
-          serialized_diagnostics::createConsumer(std::move(OS)));
+          serialized_diagnostics::createConsumer(SerializedDiagnosticsPath));
       Instance->addDiagnosticConsumer(SerializedConsumer.get());
     }
   }
@@ -1114,20 +1128,7 @@
     const std::string &FixitsOutputPath =
       Invocation.getFrontendOptions().FixitsOutputPath;
     if (!FixitsOutputPath.empty()) {
-      std::error_code EC;
-      std::unique_ptr<llvm::raw_fd_ostream> OS;
-      OS.reset(new llvm::raw_fd_ostream(FixitsOutputPath,
-                                        EC,
-                                        llvm::sys::fs::F_None));
-
-      if (EC) {
-        Instance->getDiags().diagnose(SourceLoc(),
-                                     diag::cannot_open_file,
-                                     FixitsOutputPath, EC.message());
-        return 1;
-      }
-
-      FixitsConsumer.reset(new JSONFixitWriter(std::move(OS),
+      FixitsConsumer.reset(new JSONFixitWriter(FixitsOutputPath,
                                             Invocation.getDiagnosticOptions()));
       Instance->addDiagnosticConsumer(FixitsConsumer.get());
     }
@@ -1173,7 +1174,7 @@
   }
 
   if (Instance->setup(Invocation)) {
-    return 1;
+    return finishDiagProcessing(1);
   }
 
   if (StatsReporter) {
@@ -1190,7 +1191,7 @@
 
   int ReturnValue = 0;
   bool HadError =
-    performCompile(Instance, Invocation, Args, ReturnValue, observer,
+    performCompile(*Instance, Invocation, Args, ReturnValue, observer,
                    StatsReporter.get());
 
   if (!HadError) {
@@ -1218,7 +1219,7 @@
     }
   }
 
-  return (HadError ? 1 : ReturnValue);
+  return finishDiagProcessing(HadError ? 1 : ReturnValue);
 }
 
 void FrontendObserver::parsedArgs(CompilerInvocation &invocation) {}
diff --git a/lib/FrontendTool/ReferenceDependencies.cpp b/lib/FrontendTool/ReferenceDependencies.cpp
index ce2c143..5bc9341 100644
--- a/lib/FrontendTool/ReferenceDependencies.cpp
+++ b/lib/FrontendTool/ReferenceDependencies.cpp
@@ -254,6 +254,7 @@
     case DeclKind::Constructor:
     case DeclKind::Destructor:
     case DeclKind::EnumElement:
+    case DeclKind::MissingMember:
       llvm_unreachable("cannot appear at the top level of a file");
     }
   }
diff --git a/lib/IDE/APIDigesterData.cpp b/lib/IDE/APIDigesterData.cpp
index 96e39dd..af39a8c 100644
--- a/lib/IDE/APIDigesterData.cpp
+++ b/lib/IDE/APIDigesterData.cpp
@@ -190,6 +190,28 @@
 }
 #include "swift/IDE/DigesterEnums.def"
 
+bool APIDiffItem::operator==(const APIDiffItem &Other) const {
+  if (getKind() != Other.getKind())
+    return false;
+  if (getKey() != Other.getKey())
+    return false;
+  switch(getKind()) {
+  case APIDiffItemKind::ADK_CommonDiffItem: {
+    auto *Left = static_cast<const CommonDiffItem*>(this);
+    auto *Right = static_cast<const CommonDiffItem*>(&Other);
+    return Left->ChildIndex == Right->ChildIndex;
+  }
+  case APIDiffItemKind::ADK_NoEscapeFuncParam: {
+    auto *Left = static_cast<const NoEscapeFuncParam*>(this);
+    auto *Right = static_cast<const NoEscapeFuncParam*>(&Other);
+    return Left->Index == Right->Index;
+  }
+  case APIDiffItemKind::ADK_TypeMemberDiffItem:
+  case APIDiffItemKind::ADK_OverloadedFuncInfo:
+    return true;
+  }
+}
+
 namespace {
 enum class DiffItemKeyKind {
 #define DIFF_ITEM_KEY_KIND(NAME) KK_##NAME,
@@ -392,8 +414,12 @@
       for (auto It = Array->begin(); It != Array->end(); ++ It) {
         APIDiffItem *Item = serializeDiffItem(Allocator,
           cast<llvm::yaml::MappingNode>(&*It));
-        Data[Item->getKey()].push_back(Item);
-        AllItems.push_back(Item);
+        auto &Bag = Data[Item->getKey()];
+        if (std::find_if(Bag.begin(), Bag.end(),
+            [&](APIDiffItem* I) { return *Item == *I; }) == Bag.end()) {
+          Bag.push_back(Item);
+          AllItems.push_back(Item);
+        }
       }
     }
 
diff --git a/lib/IDE/CodeCompletion.cpp b/lib/IDE/CodeCompletion.cpp
index 3c1f089..cfb72b8 100644
--- a/lib/IDE/CodeCompletion.cpp
+++ b/lib/IDE/CodeCompletion.cpp
@@ -318,6 +318,16 @@
          (isa<VarDecl>(decl) && decl->getDeclContext()->isTypeContext());
 }
 
+static bool SwiftKeyPathFilter(ValueDecl* decl, DeclVisibilityKind) {
+  switch(decl->getKind()){
+  case DeclKind::Var:
+  case DeclKind::Subscript:
+    return true;
+  default:
+    return false;
+  }
+}
+
 std::string swift::ide::removeCodeCompletionTokens(
     StringRef Input, StringRef TokenName, unsigned *CompletionOffset) {
   assert(TokenName.size() >= 1);
@@ -535,6 +545,7 @@
   case DeclKind::EnumCase:
   case DeclKind::TopLevelCode:
   case DeclKind::IfConfig:
+  case DeclKind::MissingMember:
     llvm_unreachable("not expecting such a declaration result");
   case DeclKind::Module:
     return CodeCompletionDeclKind::Module;
@@ -1600,6 +1611,7 @@
   bool IsSuperRefExpr = false;
   bool IsSelfRefExpr = false;
   bool IsKeyPathExpr = false;
+  bool IsSwiftKeyPathExpr = false;
   bool IsDynamicLookup = false;
   bool PreferFunctionReferencesToCalls = false;
   bool HaveLeadingSpace = false;
@@ -1765,6 +1777,10 @@
     IsKeyPathExpr = true;
   }
 
+  void setIsSwiftKeyPathExpr() {
+    IsSwiftKeyPathExpr = true;
+  }
+
   void setIsDynamicLookup() {
     IsDynamicLookup = true;
   }
@@ -2599,8 +2615,14 @@
     }
   }
 
+  bool shouldAddSubscriptCall() {
+    if (IsSwiftKeyPathExpr)
+      return true;
+    return !HaveDot;
+  }
+
   void addSubscriptCall(const SubscriptDecl *SD, DeclVisibilityKind Reason) {
-    assert(!HaveDot && "cannot add a subscript after a dot");
+    assert(shouldAddSubscriptCall() && "cannot add a subscript after a dot");
     CommandWordsPairs Pairs;
     CodeCompletionResultBuilder Builder(
         Sink,
@@ -2798,6 +2820,9 @@
 
     if (IsKeyPathExpr && !KeyPathFilter(D, Reason))
       return;
+
+    if (IsSwiftKeyPathExpr && !SwiftKeyPathFilter(D, Reason))
+      return;
         
     if (!D->hasInterfaceType())
       TypeResolver->resolveDeclSignature(D);
@@ -2916,14 +2941,13 @@
         addEnumElementRef(EED, Reason, /*HasTypeContext=*/false);
       }
 
-      if (HaveDot)
-        return;
-
-      if (auto *SD = dyn_cast<SubscriptDecl>(D)) {
-        if (ExprType->is<AnyMetatypeType>())
-          return;
-        addSubscriptCall(SD, Reason);
-        return;
+      // Swift key path allows .[0]
+      if (shouldAddSubscriptCall()) {
+        if (auto *SD = dyn_cast<SubscriptDecl>(D)) {
+          if (ExprType->is<AnyMetatypeType>())
+            return;
+          addSubscriptCall(SD, Reason);
+        }
       }
       return;
 
@@ -4250,7 +4274,7 @@
   void foundDecl(ValueDecl *D, DeclVisibilityKind Reason) override {
     if (Reason == DeclVisibilityKind::MemberOfCurrentNominal) {
       if (isa<TypeAliasDecl>(D)) {
-        ValueDecl *VD = dyn_cast<ValueDecl>(D);
+        auto *VD = dyn_cast<ValueDecl>(D);
         SatisfiedAssociatedTypes.insert(VD->getName().str());
       }
       return;
@@ -4392,6 +4416,8 @@
     return;
 
   Kind = CompletionKind::DotExpr;
+  if (E->getKind() == ExprKind::KeyPath)
+    Kind = CompletionKind::SwiftKeyPath;
   if (ParseExprSelectorContext != ObjCSelectorContext::None) {
     PreferFunctionReferencesToCalls = true;
     CompleteExprSelectorContext = ParseExprSelectorContext;
@@ -4784,6 +4810,7 @@
   case CompletionKind::GenericParams:
   case CompletionKind::KeyPathExpr:
   case CompletionKind::KeyPathExprDot:
+  case CompletionKind::SwiftKeyPath:
     break;
 
   case CompletionKind::StmtOrExpr:
@@ -5126,6 +5153,20 @@
     break;
   }
 
+  case CompletionKind::SwiftKeyPath: {
+    Lookup.setHaveDot(DotLoc);
+    Lookup.setIsSwiftKeyPathExpr();
+    if (auto BGT = (*ExprType)->getAs<BoundGenericType>()) {
+      auto AllArgs = BGT->getGenericArgs();
+      if (AllArgs.size() == 2) {
+        // The second generic type argument of KeyPath<Root, Value> should be
+        // the value we pull code completion results from.
+        Lookup.getValueExprCompletions(AllArgs[1]);
+      }
+    }
+    break;
+  }
+
   case CompletionKind::StmtOrExpr:
     DoPostfixExprBeginning();
     break;
diff --git a/lib/IDE/Formatting.cpp b/lib/IDE/Formatting.cpp
index 6a73144..9e1fcaf 100644
--- a/lib/IDE/Formatting.cpp
+++ b/lib/IDE/Formatting.cpp
@@ -200,7 +200,7 @@
 
       if (ParentLineAndColumn.first != LineAndColumn.first) {
         // The start line is not the same, see if this is at the 'else' clause.
-        if (IfStmt *If = dyn_cast_or_null<IfStmt>(Cursor->getAsStmt())) {
+        if (auto *If = dyn_cast_or_null<IfStmt>(Cursor->getAsStmt())) {
           SourceLoc ElseLoc = If->getElseLoc();
           // If we're at 'else', take the indent of 'if' and continue.
           if (ElseLoc.isValid() &&
@@ -268,7 +268,7 @@
     }
 
     // Handle switch / case, indent unless at a case label.
-    if (CaseStmt *Case = dyn_cast_or_null<CaseStmt>(Cursor->getAsStmt())) {
+    if (auto *Case = dyn_cast_or_null<CaseStmt>(Cursor->getAsStmt())) {
       auto LabelItems = Case->getCaseLabelItems();
       SourceLoc Loc;
       if (!LabelItems.empty())
diff --git a/lib/IDE/IDETypeChecking.cpp b/lib/IDE/IDETypeChecking.cpp
index 765744b..d6d8732 100644
--- a/lib/IDE/IDETypeChecking.cpp
+++ b/lib/IDE/IDETypeChecking.cpp
@@ -25,7 +25,7 @@
   DeclContext *DC = PD->getInnermostDeclContext();
   auto HandleMembers = [&](DeclRange Members) {
     for (Decl *D : Members) {
-      ValueDecl *VD = dyn_cast<ValueDecl>(D);
+      auto *VD = dyn_cast<ValueDecl>(D);
 
       // Skip non-value decl.
       if (!VD)
@@ -51,6 +51,6 @@
 
   // Collect the default implementations for the members in the inherited
   // protocols.
-  for (auto* IP : PD->getInheritedProtocols())
+  for (auto *IP : PD->getInheritedProtocols())
     HandleMembers(IP->getMembers());
 }
diff --git a/lib/IDE/SwiftSourceDocInfo.cpp b/lib/IDE/SwiftSourceDocInfo.cpp
index e842697..0490e44 100644
--- a/lib/IDE/SwiftSourceDocInfo.cpp
+++ b/lib/IDE/SwiftSourceDocInfo.cpp
@@ -130,7 +130,7 @@
   if (isa<ExtensionDecl>(D))
     return true;
 
-  if (ValueDecl *VD = dyn_cast<ValueDecl>(D))
+  if (auto *VD = dyn_cast<ValueDecl>(D))
     return !tryResolve(VD, /*CtorTyRef=*/nullptr, /*ExtTyRef=*/nullptr,
                        Range.getStart(), /*IsRef=*/false);
 
@@ -199,6 +199,13 @@
   return !Found;
 }
 
+bool SemaLocResolver::
+visitDeclarationArgumentName(Identifier Name, SourceLoc StartLoc, ValueDecl *D) {
+  if (isDone())
+    return false;
+  return !tryResolve(D, nullptr, nullptr, StartLoc, /*IsRef=*/false);
+}
+
 bool SemaLocResolver::visitModuleReference(ModuleEntity Mod,
                                            CharSourceRange Range) {
   if (isDone())
@@ -220,10 +227,15 @@
   OS << "</Kind>\n";
 
   OS << "<Content>" << Content << "</Content>\n";
-  if (Ty) {
+
+  if (auto Ty = ExitInfo.getPointer()) {
     OS << "<Type>";
     Ty->print(OS);
-    OS << "</Type>\n";
+    OS << "</Type>";
+    if (ExitInfo.getInt()) {
+      OS << "<Exit>true</Exit>";
+    }
+    OS << "\n";
   }
 
   if (RangeContext) {
@@ -375,7 +387,10 @@
   std::vector<ASTNode> ContainedASTNodes;
 
   /// Collect the type that an ASTNode should be evaluated to.
-  Type resolveNodeType(ASTNode N, RangeKind Kind) {
+  ReturnTyAndWhetherExit resolveNodeType(ASTNode N, RangeKind Kind) {
+    auto *VoidTy = Ctx.getVoidDecl()->getDeclaredInterfaceType().getPointer();
+    if (N.isNull())
+      return {VoidTy, false};
     switch(Kind) {
     case RangeKind::Invalid:
     case RangeKind::SingleDecl:
@@ -383,14 +398,18 @@
 
     // For a single expression, its type is apparent.
     case RangeKind::SingleExpression:
-      return N.get<Expr*>()->getType();
+      return {N.get<Expr*>()->getType().getPointer(), false};
 
     // For statements, we either resolve to the returning type or Void.
     case RangeKind::SingleStatement:
     case RangeKind::MultiStatement: {
       if (N.is<Stmt*>()) {
         if (auto RS = dyn_cast<ReturnStmt>(N.get<Stmt*>())) {
-          return resolveNodeType(RS->getResult(), RangeKind::SingleExpression);
+          return {
+            resolveNodeType(RS->hasResult() ? RS->getResult() : nullptr,
+              RangeKind::SingleExpression).getPointer(),
+            true
+          };
         }
 
         // Unbox the brace statement to find its type.
@@ -400,9 +419,25 @@
                                    RangeKind::SingleStatement);
           }
         }
+
+        // Unbox the if statement to find its type.
+        if (auto *IS = dyn_cast<IfStmt>(N.get<Stmt*>())) {
+          auto ThenTy = resolveNodeType(IS->getThenStmt(),
+                                        RangeKind::SingleStatement);
+          auto ElseTy = resolveNodeType(IS->getElseStmt(),
+                                        RangeKind::SingleStatement);
+
+          // If two branches agree on the return type, return that type.
+          if (ThenTy.getPointer()->isEqual(ElseTy.getPointer()) &&
+              ThenTy.getInt() == ElseTy.getInt())
+            return ThenTy;
+
+          // Otherwise, return the error type.
+          return {Ctx.TheErrorType.getPointer(), false};
+        }
       }
       // For other statements, the type should be void.
-      return Ctx.getVoidDecl()->getDeclaredInterfaceType();
+      return {VoidTy, false};
     }
     }
   }
@@ -433,7 +468,7 @@
                                llvm::makeArrayRef(ReferencedDecls));
     else {
       assert(Node.is<Decl*>());
-      return ResolvedRangeInfo(RangeKind::SingleDecl, Type(), Content,
+      return ResolvedRangeInfo(RangeKind::SingleDecl, {nullptr, false}, Content,
                                getImmediateContext(), SingleEntry,
                                UnhandledError, Kind,
                                llvm::makeArrayRef(ContainedASTNodes),
@@ -649,6 +684,8 @@
   }
 
   void analyze(ASTNode Node) {
+    if (!shouldAnalyze(Node))
+      return;
     Decl *D = Node.is<Decl*>() ? Node.get<Decl*>() : nullptr;
     analyzeDecl(D);
     auto &DCInfo = getCurrentDC();
@@ -675,16 +712,12 @@
       break;
     }
 
-    // If the node's parent is not contained in the range under question but the
-    // node itself is, we keep track of the node as top-level contained node.
-    if (!getCurrentDC().ContainedInRange &&
-        isContainedInSelection(CharSourceRange(SM, Node.getStartLoc(),
-                                               Node.getEndLoc()))) {
-      if (std::find_if(ContainedASTNodes.begin(), ContainedASTNodes.end(),
-          [&](ASTNode N) { return SM.rangeContains(N.getSourceRange(),
-            Node.getSourceRange()); }) == ContainedASTNodes.end()) {
-        ContainedASTNodes.push_back(Node);
-      }
+    // If no parent is considered as a contained node; this node should be
+    // a top-level contained node.
+    if (std::none_of(ContainedASTNodes.begin(), ContainedASTNodes.end(),
+      [&](ASTNode N) { return SM.rangeContains(N.getSourceRange(),
+                                               Node.getSourceRange()); })) {
+      ContainedASTNodes.push_back(Node);
     }
 
     if (DCInfo.isMultiStatement()) {
@@ -713,6 +746,18 @@
     return true;
   }
 
+  bool shouldAnalyze(ASTNode Node) {
+    // Avoid analyzing implicit nodes.
+    if (Node.isImplicit())
+      return false;
+    // Avoid analyzing nodes that are not enclosed.
+    if (SM.isBeforeInBuffer(End, Node.getEndLoc()))
+      return false;
+    if (SM.isBeforeInBuffer(Node.getStartLoc(), Start))
+      return false;
+    return true;
+  }
+
   ResolvedRangeInfo getResult() {
     if (Result.hasValue())
       return Result.getValue();
@@ -920,7 +965,7 @@
 std::vector<CharSourceRange> swift::ide::
 getCallArgLabelRanges(SourceManager &SM, Expr *Arg, LabelRangeEndAt EndKind) {
   std::vector<CharSourceRange> Ranges;
-  if (TupleExpr *TE = dyn_cast<TupleExpr>(Arg)) {
+  if (auto *TE = dyn_cast<TupleExpr>(Arg)) {
     size_t ElemIndex = 0;
     for (Expr *Elem : TE->getElements()) {
       SourceLoc LabelStart(Elem->getStartLoc());
@@ -936,7 +981,7 @@
       Ranges.push_back(CharSourceRange(SM, LabelStart, LabelEnd));
       ++ElemIndex;
     }
-  } else if (ParenExpr *PE = dyn_cast<ParenExpr>(Arg)) {
+  } else if (auto *PE = dyn_cast<ParenExpr>(Arg)) {
     if (PE->getSubExpr())
       Ranges.push_back(CharSourceRange(PE->getSubExpr()->getStartLoc(), 0));
   }
diff --git a/lib/IDE/SyntaxModel.cpp b/lib/IDE/SyntaxModel.cpp
index 75f2fb9..048cb56 100644
--- a/lib/IDE/SyntaxModel.cpp
+++ b/lib/IDE/SyntaxModel.cpp
@@ -716,9 +716,9 @@
         return { false, nullptr };
 
       for (auto &Element : Clause.Elements) {
-        if (Expr *E = Element.dyn_cast<Expr*>()) {
+        if (auto *E = Element.dyn_cast<Expr*>()) {
           E->walk(*this);
-        } else if (Stmt *S = Element.dyn_cast<Stmt*>()) {
+        } else if (auto *S = Element.dyn_cast<Stmt*>()) {
           S->walk(*this);
         } else {
           Element.get<Decl*>()->walk(*this);
@@ -761,7 +761,7 @@
     return false;
 
   if (auto *AFD = dyn_cast<AbstractFunctionDecl>(D)) {
-    FuncDecl *FD = dyn_cast<FuncDecl>(AFD);
+    auto *FD = dyn_cast<FuncDecl>(AFD);
     if (FD && FD->isAccessor()) {
       // Pass context sensitive keyword token.
       SourceLoc SL = FD->getFuncLoc();
diff --git a/lib/IDE/TypeReconstruction.cpp b/lib/IDE/TypeReconstruction.cpp
index 030db0f..50ed2eb 100644
--- a/lib/IDE/TypeReconstruction.cpp
+++ b/lib/IDE/TypeReconstruction.cpp
@@ -101,7 +101,7 @@
     assert(!module_name.empty());
     static ConstString g_ObjectiveCModule(MANGLING_MODULE_OBJC);
     static ConstString g_BuiltinModule("Builtin");
-    static ConstString g_CModule(MANGLING_MODULE_CLANG_IMPORTER);
+    static ConstString g_CModule(MANGLING_MODULE_C);
     if (allow_crawler) {
       if (module_name == g_ObjectiveCModule || module_name == g_CModule)
         return DeclsLookupSource(&ast, module_name);
@@ -669,7 +669,7 @@
   if (!in_decl)
     return in_type;
 
-  AnyFunctionType *func_type = dyn_cast<AnyFunctionType>(in_type);
+  auto *func_type = dyn_cast<AnyFunctionType>(in_type);
   if (func_type) {
     DeclContext *decl_context = in_decl->getDeclContext();
     if (decl_context && decl_context->isTypeContext()) {
diff --git a/lib/IRGen/ClassMetadataLayout.h b/lib/IRGen/ClassMetadataLayout.h
index 05abe61..0ef5a63 100644
--- a/lib/IRGen/ClassMetadataLayout.h
+++ b/lib/IRGen/ClassMetadataLayout.h
@@ -181,6 +181,12 @@
                               ClassDecl *forClass) {
     addPointer();
   }
+  void addPlaceholder(MissingMemberDecl *MMD) {
+    for (auto i : range(MMD->getNumberOfVTableEntries())) {
+      (void)i;
+      addPointer();
+    }
+  }
 
 private:
   // Our layout here assumes that there will never be unclaimed space
diff --git a/lib/IRGen/GenBuiltin.cpp b/lib/IRGen/GenBuiltin.cpp
index 2582d06..00ccbe9 100644
--- a/lib/IRGen/GenBuiltin.cpp
+++ b/lib/IRGen/GenBuiltin.cpp
@@ -333,7 +333,7 @@
       llvm::Instruction *I = static_cast<llvm::Instruction *>(v);
       if (I->getParent() == IGF.Builder.GetInsertBlock()) {
         llvm::LLVMContext &ctx = IGF.IGM.Module.getContext();
-        llvm::IntegerType *intType = dyn_cast<llvm::IntegerType>(v->getType());
+        auto *intType = dyn_cast<llvm::IntegerType>(v->getType());
         llvm::Metadata *rangeElems[] = {
           llvm::ConstantAsMetadata::get(llvm::ConstantInt::get(intType, 0)),
           llvm::ConstantAsMetadata::get(
diff --git a/lib/IRGen/GenCall.cpp b/lib/IRGen/GenCall.cpp
index 639cb53..1c15f41 100644
--- a/lib/IRGen/GenCall.cpp
+++ b/lib/IRGen/GenCall.cpp
@@ -1230,7 +1230,7 @@
   if (bodyType != callType)
     returned = IGF.coerceValue(returned, bodyType, IGF.IGM.DataLayout);
 
-  if (llvm::StructType *structType = dyn_cast<llvm::StructType>(bodyType))
+  if (auto *structType = dyn_cast<llvm::StructType>(bodyType))
     for (unsigned i = 0, e = structType->getNumElements(); i != e; ++i)
       out.add(IGF.Builder.CreateExtractValue(returned, i));
   else
diff --git a/lib/IRGen/GenCast.cpp b/lib/IRGen/GenCast.cpp
index be21ff8..21cb26f 100644
--- a/lib/IRGen/GenCast.cpp
+++ b/lib/IRGen/GenCast.cpp
@@ -533,15 +533,6 @@
     // to check for it independent of protocol witnesses.
     if (protoDecl->requiresClass()) {
       assert(hasClassConstraint);
-
-      if (protoDecl->getKnownProtocolKind()
-          && *protoDecl->getKnownProtocolKind() == KnownProtocolKind::AnyObject) {
-        // AnyObject only requires that the type be a class.
-        continue;
-      }
-      
-      // If this protocol is class-constrained but not AnyObject, checking its
-      // conformance will check the class constraint too.
       hasClassConstraintByProtocol = true;
     }
 
diff --git a/lib/IRGen/GenClangType.cpp b/lib/IRGen/GenClangType.cpp
index b188681..07e4a4c 100644
--- a/lib/IRGen/GenClangType.cpp
+++ b/lib/IRGen/GenClangType.cpp
@@ -350,10 +350,6 @@
 clang::CanQualType GenClangType::visitProtocolType(CanProtocolType type) {
   auto proto = type->getDecl();
 
-  // AnyObject -> id.
-  if (proto->isSpecificProtocol(KnownProtocolKind::AnyObject))
-    return getClangIdType(getClangASTContext());
-
   // Single protocol -> id<Proto>
   if (proto->isObjC()) {
     auto &clangCtx = getClangASTContext();
@@ -607,6 +603,10 @@
   auto layout = type.getExistentialLayout();
   assert(layout.isObjC() && "Cannot represent opaque existential in Clang");
 
+  // AnyObject -> id.
+  if (layout.isAnyObject())
+    return getClangIdType(getClangASTContext());
+
   auto superclassTy = clangCtx.ObjCBuiltinIdTy;
   if (layout.superclass) {
     superclassTy = clangCtx.getCanonicalType(
diff --git a/lib/IRGen/GenClass.cpp b/lib/IRGen/GenClass.cpp
index a5ee419..5bd4b84 100644
--- a/lib/IRGen/GenClass.cpp
+++ b/lib/IRGen/GenClass.cpp
@@ -798,10 +798,7 @@
   }
 
   // Check whether the SIL module defines it.  (We need a type for it.)
-  SILDeclRef fnRef(fn, SILDeclRef::Kind::Func,
-                   ResilienceExpansion::Minimal,
-                   /*uncurryLevel*/ 1,
-                   /*foreign*/ false);
+  SILDeclRef fnRef(fn, SILDeclRef::Kind::Func);
   SILFunction *silFn = IGF.getSILModule().lookUpFunction(fnRef);
   if (!silFn)
     return false;
@@ -960,6 +957,9 @@
   emitClassMetadata(*this, D,
                     classTI.getLayout(*this, selfType),
                     classTI.getClassLayout(*this, selfType));
+
+  IRGen.addClassForArchiveNameRegistration(D);
+
   emitNestedTypeDecls(D->getMembers());
   emitFieldMetadataRecord(D);
 }
@@ -1123,10 +1123,6 @@
       for (ProtocolDecl *p : theProtocol->getInheritedProtocols()) {
         if (!p->isObjC())
           continue;
-        // Don't emit the magic AnyObject conformance.
-        if (auto known = p->getKnownProtocolKind())
-          if (*known == KnownProtocolKind::AnyObject)
-            continue;
         Protocols.push_back(p);
       }
 
@@ -1146,11 +1142,6 @@
       }
 
       for (ProtocolDecl *proto : protocols) {
-        // Don't emit the magic AnyObject conformance.
-        if (auto known = proto->getKnownProtocolKind())
-          if (*known == KnownProtocolKind::AnyObject)
-            continue;
-
         Protocols.push_back(proto);
       }
     }
@@ -1481,10 +1472,8 @@
 
       // We don't have a destructor body, so hunt for the SIL function
       // for it.
-      SILDeclRef dtorRef(destructor, SILDeclRef::Kind::Deallocator,
-                         ResilienceExpansion::Minimal,
-                         SILDeclRef::ConstructAtNaturalUncurryLevel,
-                         /*isForeign=*/true);
+      auto dtorRef = SILDeclRef(destructor, SILDeclRef::Kind::Deallocator)
+        .asForeign();
       if (auto silFn = IGM.getSILModule().lookUpFunction(dtorRef))
         return silFn->isDefinition();
 
@@ -1502,6 +1491,10 @@
       }
     }
 
+    void visitMissingMemberDecl(MissingMemberDecl *placeholder) {
+      llvm_unreachable("should not IRGen classes with missing members");
+    }
+
     void addIVarInitializer() {
       if (auto fn = IGM.getAddrOfIVarInitDestroy(getClass(),
                                                  /*destroy*/ false,
@@ -2223,7 +2216,7 @@
 bool irgen::doesConformanceReferenceNominalTypeDescriptor(IRGenModule &IGM,
                                                        CanType conformingType) {
   NominalTypeDecl *nom = conformingType->getAnyNominal();
-  ClassDecl *clas = dyn_cast<ClassDecl>(nom);
+  auto *clas = dyn_cast<ClassDecl>(nom);
   if (nom->isGenericContext() && (!clas || !clas->usesObjCGenericsModel()))
     return true;
 
diff --git a/lib/IRGen/GenDecl.cpp b/lib/IRGen/GenDecl.cpp
index 3ed1a09..8251ee5 100644
--- a/lib/IRGen/GenDecl.cpp
+++ b/lib/IRGen/GenDecl.cpp
@@ -41,9 +41,11 @@
 #include "llvm/IR/Module.h"
 #include "llvm/IR/TypeBuilder.h"
 #include "llvm/IR/Value.h"
+#include "llvm/IR/InlineAsm.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/ConvertUTF.h"
 #include "llvm/Support/Path.h"
+#include "llvm/Transforms/Utils/ModuleUtils.h"
 
 #include "ConstantBuilder.h"
 #include "Explosion.h"
@@ -164,6 +166,8 @@
   void visitTypeDecl(TypeDecl *type) {
     // We'll visit nested types separately if necessary.
   }
+
+  void visitMissingMemberDecl(MissingMemberDecl *placeholder) {}
   
   void visitFuncDecl(FuncDecl *method) {
     if (!requiresObjCMethodDescriptor(method)) return;
@@ -377,6 +381,8 @@
     // We'll visit nested types separately if necessary.
   }
 
+  void visitMissingMemberDecl(MissingMemberDecl *placeholder) {}
+
   void visitAbstractFunctionDecl(AbstractFunctionDecl *method) {
     llvm::Constant *name, *imp, *types;
     emitObjCMethodDescriptorParts(IGM, method, /*extended*/true,
@@ -564,7 +570,7 @@
     for (SILFunction &SF : getSILModule()) {
       if (SF.hasLocation()) {
         if (Decl* D = SF.getLocation().getAsASTNode<Decl>()) {
-          if (FuncDecl *FD = dyn_cast<FuncDecl>(D)) {
+          if (auto *FD = dyn_cast<FuncDecl>(D)) {
             if (FD->getAttrs().hasAttribute<LLDBDebuggerFunctionAttr>()) {
               EntryPoint = &SF;
               break;
@@ -742,11 +748,6 @@
     if (P->isObjC())
       continue;
 
-    // neither does AnyObject
-    if (P->getKnownProtocolKind().hasValue() &&
-        *P->getKnownProtocolKind() == KnownProtocolKind::AnyObject)
-      continue;
-
     return true;
   }
 
@@ -947,6 +948,56 @@
   }
 }
 
+void IRGenerator::emitNSArchiveClassNameRegistration() {
+  if (ClassesForArchiveNameRegistration.empty())
+    return;
+
+  // Emit the register function in the primary module.
+  IRGenModule *IGM = getPrimaryIGM();
+
+  llvm::Function *RegisterFn = llvm::Function::Create(
+                                llvm::FunctionType::get(IGM->VoidTy, false),
+                                llvm::GlobalValue::InternalLinkage,
+                                "_swift_register_class_names_for_archives");
+  IRGenFunction RegisterIGF(*IGM, RegisterFn);
+  RegisterFn->setAttributes(IGM->constructInitialAttributes());
+  IGM->Module.getFunctionList().push_back(RegisterFn);
+  RegisterFn->setCallingConv(IGM->DefaultCC);
+
+  for (ClassDecl *CD : ClassesForArchiveNameRegistration) {
+    Type Ty = CD->getDeclaredType();
+    llvm::Value *MetaData = RegisterIGF.emitTypeMetadataRef(getAsCanType(Ty));
+    if (auto *LegacyAttr = CD->getAttrs().
+          getAttribute<NSKeyedArchiveLegacyAttr>()) {
+      // Register the name for the class in the NSKeyed(Un)Archiver.
+      llvm::Value *NameStr = IGM->getAddrOfGlobalString(LegacyAttr->Name);
+      RegisterIGF.Builder.CreateCall(IGM->getRegisterClassNameForArchivingFn(),
+                                     {NameStr, MetaData});
+    } else {
+      assert(CD->getAttrs().hasAttribute<StaticInitializeObjCMetadataAttr>());
+
+      // In this case we don't add a name mapping, but just get the metadata
+      // to make sure that the class is registered. But: we need to add a use
+      // (empty inline asm instruction) for the metadata. Otherwise
+      // llvm would optimize the metadata accessor call away because it's
+      // defined as "readnone".
+      llvm::FunctionType *asmFnTy =
+        llvm::FunctionType::get(IGM->VoidTy, {MetaData->getType()},
+                                false /* = isVarArg */);
+      llvm::InlineAsm *inlineAsm =
+        llvm::InlineAsm::get(asmFnTy, "", "r", true /* = SideEffects */);
+      RegisterIGF.Builder.CreateCall(inlineAsm, MetaData);
+    }
+  }
+  RegisterIGF.Builder.CreateRetVoid();
+
+  // Add the registration function as a static initializer. We use a priority
+  // slightly lower than used for C++ global constructors, so that the code is
+  // executed before C++ global constructors (in case someone uses archives
+  // from a C++ global constructor).
+  llvm::appendToGlobalCtors(IGM->Module, RegisterFn, 60000, nullptr);
+}
+
 /// Emit symbols for eliminated dead methods, which can still be referenced
 /// from other modules. This happens e.g. if a public class contains a (dead)
 /// private method.
@@ -1393,8 +1444,12 @@
   case SILLinkage::Private:
     // In case of multiple llvm modules (in multi-threaded compilation) all
     // private decls must be visible from other files.
+    // We use LinkOnceODR instead of External here because private lazy protocol
+    // witness table accessors could be emitted by two different IGMs during
+    // IRGen into different object files and the linker would complain about
+    // duplicate symbols.
     if (info.HasMultipleIGMs)
-      return RESULT(External, Hidden, Default);
+      return RESULT(LinkOnceODR, Hidden, Default);
     return RESULT(Internal, Default, Default);
 
   case SILLinkage::PublicExternal: {
@@ -1617,6 +1672,9 @@
   case DeclKind::Destructor:
     llvm_unreachable("there are no global destructor");
 
+  case DeclKind::MissingMember:
+    llvm_unreachable("there are no global member placeholders");
+
   case DeclKind::TypeAlias:
   case DeclKind::GenericTypeParam:
   case DeclKind::AssociatedType:
@@ -2760,12 +2818,11 @@
                             bool isDestroyer,
                             bool isForeign,
                             ForDefinition_t forDefinition) {
-  SILDeclRef silRef(cd, 
-                    isDestroyer? SILDeclRef::Kind::IVarDestroyer
-                               : SILDeclRef::Kind::IVarInitializer, 
-                    ResilienceExpansion::Minimal,
-                    SILDeclRef::ConstructAtNaturalUncurryLevel, 
-                    isForeign);
+  auto silRef = SILDeclRef(cd,
+                           isDestroyer
+                           ? SILDeclRef::Kind::IVarDestroyer
+                           : SILDeclRef::Kind::IVarInitializer)
+    .asForeign(isForeign);
 
   // Find the SILFunction for the ivar initializer or destroyer.
   if (auto silFn = getSILModule().lookUpFunction(silRef)) {
@@ -2877,6 +2934,7 @@
     case DeclKind::Destructor:
     case DeclKind::EnumCase:
     case DeclKind::EnumElement:
+    case DeclKind::MissingMember:
       // Skip non-type members.
       continue;
 
@@ -3423,7 +3481,7 @@
 static llvm::Function *shouldDefineHelper(IRGenModule &IGM,
                                           llvm::Constant *fn,
                                           bool setIsNoInline) {
-  llvm::Function *def = dyn_cast<llvm::Function>(fn);
+  auto *def = dyn_cast<llvm::Function>(fn);
   if (!def) return nullptr;
   if (!def->empty()) return nullptr;
 
diff --git a/lib/IRGen/GenFunc.cpp b/lib/IRGen/GenFunc.cpp
index 25b15f4..c3d5888 100644
--- a/lib/IRGen/GenFunc.cpp
+++ b/lib/IRGen/GenFunc.cpp
@@ -506,7 +506,7 @@
   auto &capture = IGM.getTypeInfoForLowered(T->getCaptureType());
   
   // TODO: Support dynamic-sized captures.
-  const FixedTypeInfo *fixedCapture = dyn_cast<FixedTypeInfo>(&capture);
+  const auto *fixedCapture = dyn_cast<FixedTypeInfo>(&capture);
   llvm::Type *fixedCaptureTy;
   // The block header is pointer aligned. The capture may be worse aligned.
   Alignment align = IGM.getPointerAlignment();
diff --git a/lib/IRGen/GenKeyPath.cpp b/lib/IRGen/GenKeyPath.cpp
index 00d7ef0..dec31b8 100644
--- a/lib/IRGen/GenKeyPath.cpp
+++ b/lib/IRGen/GenKeyPath.cpp
@@ -30,6 +30,7 @@
 #include "swift/SIL/SILLocation.h"
 #include "swift/SIL/TypeLowering.h"
 #include "swift/ABI/KeyPath.h"
+#include "swift/ABI/HeapObject.h"
 #include "swift/AST/ASTContext.h"
 #include "swift/AST/DiagnosticEngine.h"
 #include "swift/AST/DiagnosticsIRGen.h"
@@ -42,15 +43,6 @@
 llvm::Constant *
 IRGenModule::getAddrOfKeyPathPattern(KeyPathPattern *pattern,
                                      SILLocation diagLoc) {
-  // TODO: Landing 32-bit key paths requires some runtime changes to get the
-  // 8-byte object header.
-  if (getPointerSize() != Size(8)) {
-    Context.Diags.diagnose(diagLoc.getSourceLoc(),
-                           diag::not_implemented,
-                           "32-bit key paths");
-    return llvm::UndefValue::get(Int8PtrTy);
-  }
-  
   // See if we already emitted this.
   auto found = KeyPathPatterns.find(pattern);
   if (found != KeyPathPatterns.end())
@@ -119,13 +111,36 @@
   fields.setPacked(true);
   // Add a zero-initialized header we can use for lazy initialization.
   fields.add(llvm::ConstantInt::get(SizeTy, 0));
-  
+
+#ifndef NDEBUG
+  auto startOfObject = fields.getNextOffsetFromGlobal();
+#endif
+
   // Store references to metadata generator functions to generate the metadata
   // for the root and leaf. These sit in the "isa" and object header parts of
   // the final object.
   fields.add(emitMetadataGenerator(rootTy));
   fields.add(emitMetadataGenerator(valueTy));
   
+  // TODO: 32-bit still has a padding word
+  if (SizeTy == Int32Ty) {
+    fields.addInt32(0);
+  }
+  
+#ifndef NDEBUG
+  auto endOfObjectHeader = fields.getNextOffsetFromGlobal();
+  unsigned expectedObjectHeaderSize;
+  if (SizeTy == Int64Ty)
+    expectedObjectHeaderSize = SWIFT_ABI_HEAP_OBJECT_HEADER_SIZE_64;
+  else if (SizeTy == Int32Ty)
+    expectedObjectHeaderSize = SWIFT_ABI_HEAP_OBJECT_HEADER_SIZE_32;
+  else
+    llvm_unreachable("unexpected pointer size");
+  assert((endOfObjectHeader - startOfObject).getValue()
+            == expectedObjectHeaderSize
+       && "key path pattern header size doesn't match heap object header size");
+#endif
+  
   // Add a pointer to the ObjC KVC compatibility string, if there is one, or
   // null otherwise.
   llvm::Constant *objcString;
@@ -151,12 +166,12 @@
       llvm::Constant *offset;
       bool isResolved;
       bool isStruct;
-      if (auto structTy = loweredBaseTy.getStructOrBoundGenericStruct()) {
+      if (loweredBaseTy.getStructOrBoundGenericStruct()) {
         offset = emitPhysicalStructMemberFixedOffset(*this,
                                                      loweredBaseTy,
                                                      property);
         isStruct = true;
-      } else if (auto classTy = loweredBaseTy.getClassOrBoundGenericClass()) {
+      } else if (loweredBaseTy.getClassOrBoundGenericClass()) {
         offset = tryEmitConstantClassFragilePhysicalMemberOffset(*this,
                                                                  loweredBaseTy,
                                                                  property);
@@ -264,7 +279,7 @@
         idKind = KeyPathComponentHeader::VTableOffset;
         auto declRef = id.getDeclRef();
         auto dc = declRef.getDecl()->getDeclContext();
-        if (auto methodClass = dyn_cast<ClassDecl>(dc)) {
+        if (isa<ClassDecl>(dc)) {
           auto index = getVirtualMethodIndex(*this, declRef);
           idValue = llvm::ConstantInt::get(SizeTy, index);
           idResolved = true;
diff --git a/lib/IRGen/GenMeta.cpp b/lib/IRGen/GenMeta.cpp
index 5faeb1e..e417bff 100644
--- a/lib/IRGen/GenMeta.cpp
+++ b/lib/IRGen/GenMeta.cpp
@@ -779,7 +779,7 @@
 
       auto resultMetadata = extractAndMarkResultType(type);
       
-      CanTupleType inputTuple = dyn_cast<TupleType>(type.getInput());
+      auto inputTuple = dyn_cast<TupleType>(type.getInput());
 
       size_t numArguments = 1;
 
@@ -3502,6 +3502,10 @@
       }
     }
 
+    void addPlaceholder(MissingMemberDecl *) {
+      llvm_unreachable("cannot generate metadata with placeholders in it");
+    }
+
     void addMethodOverride(SILDeclRef baseRef, SILDeclRef declRef) {}
 
     void addGenericArgument(CanType argTy, ClassDecl *forClass) {
@@ -5497,8 +5501,6 @@
   if (!known)
     return SpecialProtocol::None;
   switch (*known) {
-  case KnownProtocolKind::AnyObject:
-    return SpecialProtocol::AnyObject;
   case KnownProtocolKind::Error:
     return SpecialProtocol::Error;
     
@@ -5535,6 +5537,7 @@
   case KnownProtocolKind::OptionSet:
   case KnownProtocolKind::BridgedNSError:
   case KnownProtocolKind::BridgedStoredNSError:
+  case KnownProtocolKind::CFObject:
   case KnownProtocolKind::ErrorCodeProtocol:
   case KnownProtocolKind::ExpressibleByBuiltinConstStringLiteral:
   case KnownProtocolKind::ExpressibleByBuiltinConstUTF16StringLiteral:
diff --git a/lib/IRGen/GenObjC.cpp b/lib/IRGen/GenObjC.cpp
index 44f65fa..58514bf 100644
--- a/lib/IRGen/GenObjC.cpp
+++ b/lib/IRGen/GenObjC.cpp
@@ -1004,13 +1004,8 @@
   if (isa<ProtocolDecl>(property->getDeclContext()))
     return llvm::ConstantPointerNull::get(IGM.Int8PtrTy);
 
-  // FIXME: Explosion level
-  ResilienceExpansion expansion = ResilienceExpansion::Minimal;
-
-  SILDeclRef getter = SILDeclRef(property->getGetter(), SILDeclRef::Kind::Func,
-                                 expansion,
-                                 SILDeclRef::ConstructAtNaturalUncurryLevel,
-                                 /*foreign*/ true);
+  SILDeclRef getter = SILDeclRef(property->getGetter(), SILDeclRef::Kind::Func)
+    .asForeign();
 
   return findSwiftAsObjCThunk(IGM, getter);
 }
@@ -1028,11 +1023,8 @@
   assert(property->isSettable(property->getDeclContext()) &&
          "property is not settable?!");
   
-  ResilienceExpansion expansion = ResilienceExpansion::Minimal;
-  SILDeclRef setter = SILDeclRef(property->getSetter(), SILDeclRef::Kind::Func,
-                                 expansion,
-                                 SILDeclRef::ConstructAtNaturalUncurryLevel,
-                                 /*foreign*/ true);
+  SILDeclRef setter = SILDeclRef(property->getSetter(), SILDeclRef::Kind::Func)
+    .asForeign();
 
   return findSwiftAsObjCThunk(IGM, setter);
 }
@@ -1047,11 +1039,8 @@
   if (isa<ProtocolDecl>(method->getDeclContext()))
     return llvm::ConstantPointerNull::get(IGM.Int8PtrTy);
 
-  ResilienceExpansion expansion = ResilienceExpansion::Minimal;
-  SILDeclRef declRef = SILDeclRef(method, SILDeclRef::Kind::Func,
-                                  expansion,
-                                  SILDeclRef::ConstructAtNaturalUncurryLevel,
-                                  /*foreign*/ true);
+  SILDeclRef declRef = SILDeclRef(method, SILDeclRef::Kind::Func)
+    .asForeign();
 
   return findSwiftAsObjCThunk(IGM, declRef);
 }
@@ -1066,11 +1055,8 @@
   if (isa<ProtocolDecl>(constructor->getDeclContext()))
     return llvm::ConstantPointerNull::get(IGM.Int8PtrTy);
 
-  ResilienceExpansion expansion = ResilienceExpansion::Minimal;
-  SILDeclRef declRef = SILDeclRef(constructor, SILDeclRef::Kind::Initializer,
-                                  expansion,
-                                  SILDeclRef::ConstructAtNaturalUncurryLevel,
-                                  /*foreign*/ true);
+  SILDeclRef declRef = SILDeclRef(constructor, SILDeclRef::Kind::Initializer)
+    .asForeign();
 
   return findSwiftAsObjCThunk(IGM, declRef);
 }
@@ -1081,11 +1067,8 @@
 /// Returns a value of type i8*.
 static llvm::Constant *getObjCMethodPointer(IRGenModule &IGM,
                                             DestructorDecl *destructor) {
-  ResilienceExpansion expansion = ResilienceExpansion::Minimal;
-  SILDeclRef declRef = SILDeclRef(destructor, SILDeclRef::Kind::Deallocator,
-                                  expansion,
-                                  SILDeclRef::ConstructAtNaturalUncurryLevel,
-                                  /*foreign*/ true);
+  SILDeclRef declRef = SILDeclRef(destructor, SILDeclRef::Kind::Deallocator)
+    .asForeign();
 
   return findSwiftAsObjCThunk(IGM, declRef);
 }
diff --git a/lib/IRGen/GenProto.cpp b/lib/IRGen/GenProto.cpp
index 5145b75..2741186 100644
--- a/lib/IRGen/GenProto.cpp
+++ b/lib/IRGen/GenProto.cpp
@@ -662,6 +662,13 @@
       Entries.push_back(WitnessTableEntry::forFunction(ctor));
     }
 
+    void addPlaceholder(MissingMemberDecl *placeholder) {
+      for (auto i : range(placeholder->getNumberOfVTableEntries())) {
+        (void)i;
+        Entries.push_back(WitnessTableEntry());
+      }
+    }
+
     void addAssociatedType(AssociatedTypeDecl *ty) {
       Entries.push_back(WitnessTableEntry::forAssociatedType(ty));
     }
@@ -1117,6 +1124,10 @@
       return addMethodFromSILWitnessTable(requirement);
     }
 
+    void addPlaceholder(MissingMemberDecl *placeholder) {
+      llvm_unreachable("cannot emit a witness table with placeholders in it");
+    }
+
     void addAssociatedType(AssociatedTypeDecl *requirement) {
 #ifndef NDEBUG
       auto &entry = SILEntries.front();
@@ -1738,7 +1749,7 @@
   if (!doesConformanceReferenceNominalTypeDescriptor(*this, conformingType)) {
     // Trigger the lazy emission of the foreign type metadata.
     NominalTypeDecl *Nominal = conformingType->getAnyNominal();
-    if (ClassDecl *clas = dyn_cast<ClassDecl>(Nominal)) {
+    if (auto *clas = dyn_cast<ClassDecl>(Nominal)) {
       if (clas->isForeign())
         getAddrOfForeignTypeMetadataCandidate(conformingType);
     } else if (isa<ClangModuleUnit>(Nominal->getModuleScopeContext())) {
diff --git a/lib/IRGen/GenValueWitness.cpp b/lib/IRGen/GenValueWitness.cpp
index 661a16c..4461be7 100644
--- a/lib/IRGen/GenValueWitness.cpp
+++ b/lib/IRGen/GenValueWitness.cpp
@@ -1634,7 +1634,7 @@
   // The stride of a Swift type may not match its LLVM size. If we know we have
   // a fixed stride different from our size, or we have a dynamic size,
   // do a byte-level GEP with the proper stride.
-  const FixedTypeInfo *fixedTI = dyn_cast<FixedTypeInfo>(this);
+  const auto *fixedTI = dyn_cast<FixedTypeInfo>(this);
 
   llvm::Value *destValue = nullptr;
   Size stride(1);
diff --git a/lib/IRGen/IRBuilder.h b/lib/IRGen/IRBuilder.h
index af2422f..de4da0a 100644
--- a/lib/IRGen/IRBuilder.h
+++ b/lib/IRGen/IRBuilder.h
@@ -134,7 +134,7 @@
     void insert(llvm::Instruction *I) {
       assert(isValid() && "inserting at invalid location!");
       assert(I->getParent() == nullptr);
-      if (llvm::BasicBlock *block = After.dyn_cast<llvm::BasicBlock*>()) {
+      if (auto *block = After.dyn_cast<llvm::BasicBlock*>()) {
         block->getInstList().push_front(I);
       } else {
         llvm::Instruction *afterInsn = After.get<llvm::Instruction*>();
diff --git a/lib/IRGen/IRGen.cpp b/lib/IRGen/IRGen.cpp
index 5f0fcdc..410cb12 100644
--- a/lib/IRGen/IRGen.cpp
+++ b/lib/IRGen/IRGen.cpp
@@ -715,6 +715,7 @@
       IGM.emitTypeMetadataRecords();
       IGM.emitBuiltinReflectionMetadata();
       IGM.emitReflectionMetadataVersion();
+      irgen.emitNSArchiveClassNameRegistration();
     }
 
     // Emit symbols for eliminated dead methods.
@@ -876,7 +877,7 @@
   irgen.emitGlobalTopLevel();
   
   for (auto *File : M->getFiles()) {
-    if (SourceFile *SF = dyn_cast<SourceFile>(File)) {
+    if (auto *SF = dyn_cast<SourceFile>(File)) {
       IRGenModule *IGM = irgen.getGenModule(SF);
       IGM->emitSourceFile(*SF, 0);
     } else {
@@ -893,6 +894,8 @@
 
   irgen.emitReflectionMetadataVersion();
 
+  irgen.emitNSArchiveClassNameRegistration();
+
   // Emit reflection metadata for builtin and imported types.
   irgen.emitBuiltinReflectionMetadata();
 
diff --git a/lib/IRGen/IRGenDebugInfo.cpp b/lib/IRGen/IRGenDebugInfo.cpp
index fe29107..da4fc1f 100644
--- a/lib/IRGen/IRGenDebugInfo.cpp
+++ b/lib/IRGen/IRGenDebugInfo.cpp
@@ -18,28 +18,32 @@
 #include "IRGenDebugInfo.h"
 #include "GenOpaque.h"
 #include "GenType.h"
+#include "swift/AST/ASTMangler.h"
 #include "swift/AST/Expr.h"
 #include "swift/AST/IRGenOptions.h"
-#include "swift/AST/ASTMangler.h"
 #include "swift/AST/Module.h"
 #include "swift/AST/ModuleLoader.h"
 #include "swift/AST/Pattern.h"
 #include "swift/Basic/Dwarf.h"
 #include "swift/Basic/SourceManager.h"
 #include "swift/Basic/Version.h"
-#include "swift/Demangling/ManglingMacros.h"
 #include "swift/ClangImporter/ClangImporter.h"
+#include "swift/Demangling/ManglingMacros.h"
 #include "swift/SIL/SILArgument.h"
 #include "swift/SIL/SILBasicBlock.h"
 #include "swift/SIL/SILDebugScope.h"
 #include "swift/SIL/SILModule.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/Decl.h"
+#include "clang/AST/ExternalASTSource.h"
 #include "clang/Basic/Module.h"
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/TargetInfo.h"
+#include "clang/Frontend/CompilerInstance.h"
+#include "clang/Serialization/ASTReader.h"
 #include "llvm/Config/config.h"
+#include "llvm/IR/DIBuilder.h"
 #include "llvm/IR/DebugInfo.h"
 #include "llvm/IR/Module.h"
 #include "llvm/Support/CommandLine.h"
@@ -53,67 +57,1428 @@
 using namespace swift;
 using namespace irgen;
 
-/// Strdup a raw char array using the bump pointer.
-StringRef IRGenDebugInfo::BumpAllocatedString(const char *Data, size_t Length) {
-  char *Ptr = DebugInfoNames.Allocate<char>(Length+1);
-  memcpy(Ptr, Data, Length);
-  *(Ptr+Length) = 0;
-  return StringRef(Ptr, Length);
-}
+namespace {
+typedef llvm::DenseMap<const llvm::MDString *, llvm::TrackingMDNodeRef>
+    TrackingDIRefMap;
 
-/// Strdup S using the bump pointer.
-StringRef IRGenDebugInfo::BumpAllocatedString(std::string S) {
-  return BumpAllocatedString(S.c_str(), S.length());
-}
+class IRGenDebugInfoImpl : public IRGenDebugInfo {
+  friend class IRGenDebugInfoImpl;
+  const IRGenOptions &Opts;
+  ClangImporter &CI;
+  SourceManager &SM;
+  llvm::DIBuilder DBuilder;
+  IRGenModule &IGM;
 
-/// Strdup StringRef S using the bump pointer.
-StringRef IRGenDebugInfo::BumpAllocatedString(StringRef S) {
-  return BumpAllocatedString(S.data(), S.size());
-}
+  /// Used for caching SILDebugScopes without inline information.
+  typedef std::pair<const void *, const void *> LocalScopeHash;
+  struct LocalScope : public LocalScopeHash {
+    LocalScope(const SILDebugScope *DS)
+        : LocalScopeHash({DS->Loc.getOpaquePointerValue(),
+                          // If there is no parent SIL function use the scope
+                          // pointer as a unique id instead. This is safe
+                          // because such a function could also never have been
+                          // SIL-inlined.
+                          DS->Parent.getOpaqueValue()
+                              ? DS->Parent.getOpaqueValue()
+                              : DS}) {}
+  };
 
-/// Return the size reported by a type.
-static unsigned getSizeInBits(llvm::DIType *Ty) {
-  // Follow derived types until we reach a type that
-  // reports back a size.
-  while (isa<llvm::DIDerivedType>(Ty) && !Ty->getSizeInBits()) {
-    auto *DT = cast<llvm::DIDerivedType>(Ty);
-    Ty = DT->getBaseType().resolve();
-    if (!Ty)
-      return 0;
+  /// Various caches.
+  /// @{
+  llvm::DenseMap<LocalScopeHash, llvm::TrackingMDNodeRef> ScopeCache;
+  llvm::DenseMap<const SILDebugScope *, llvm::TrackingMDNodeRef> InlinedAtCache;
+  llvm::DenseMap<llvm::StringRef, llvm::TrackingMDNodeRef> DIFileCache;
+  llvm::DenseMap<const void *, SILLocation::DebugLoc> DebugLocCache;
+  llvm::DenseMap<TypeBase *, llvm::TrackingMDNodeRef> DITypeCache;
+  llvm::StringMap<llvm::TrackingMDNodeRef> DIModuleCache;
+  TrackingDIRefMap DIRefMap;
+  /// @}
+
+  /// A list of replaceable fwddecls that need to be RAUWed at the end.
+  std::vector<std::pair<TypeBase *, llvm::TrackingMDRef>> ReplaceMap;
+
+  llvm::BumpPtrAllocator DebugInfoNames;
+  StringRef CWDName;                    /// The current working directory.
+  SmallString<0> ConfigMacros;          /// User-provided -D macro definitions.
+  llvm::DICompileUnit *TheCU = nullptr; /// The current compilation unit.
+  llvm::DIFile *MainFile = nullptr;     /// The main file.
+  llvm::DIModule *MainModule = nullptr; /// The current module.
+  llvm::DIScope *EntryPointFn =
+      nullptr;                     /// Scope of SWIFT_ENTRY_POINT_FUNCTION.
+  TypeAliasDecl *MetadataTypeDecl; /// The type decl for swift.type.
+  llvm::DIType *InternalType;      /// Catch-all type for opaque internal types.
+
+  SILLocation::DebugLoc LastDebugLoc; /// The last location that was emitted.
+  const SILDebugScope *LastScope;     /// The scope of that last location.
+
+  /// Used by pushLoc.
+  SmallVector<std::pair<SILLocation::DebugLoc, const SILDebugScope *>, 8>
+      LocationStack;
+
+public:
+  IRGenDebugInfoImpl(const IRGenOptions &Opts, ClangImporter &CI,
+                     IRGenModule &IGM, llvm::Module &M, SourceFile *SF);
+  void finalize();
+
+  void setCurrentLoc(IRBuilder &Builder, const SILDebugScope *DS,
+                     Optional<SILLocation> Loc = None);
+  void clearLoc(IRBuilder &Builder);
+  void pushLoc();
+  void popLoc();
+  void setArtificialTrapLocation(IRBuilder &Builder,
+                                 const SILDebugScope *Scope);
+  void setEntryPointLoc(IRBuilder &Builder);
+  llvm::DIScope *getEntryPointFn();
+  llvm::DIScope *getOrCreateScope(const SILDebugScope *DS);
+  void emitImport(ImportDecl *D);
+  llvm::DISubprogram *emitFunction(const SILDebugScope *DS, llvm::Function *Fn,
+                                   SILFunctionTypeRepresentation Rep,
+                                   SILType Ty, DeclContext *DeclCtx = nullptr,
+                                   GenericEnvironment *GE = nullptr);
+  llvm::DISubprogram *emitFunction(SILFunction &SILFn, llvm::Function *Fn);
+  void emitArtificialFunction(IRBuilder &Builder, llvm::Function *Fn,
+                              SILType SILTy);
+  void emitVariableDeclaration(IRBuilder &Builder,
+                               ArrayRef<llvm::Value *> Storage,
+                               DebugTypeInfo Ty, const SILDebugScope *DS,
+                               ValueDecl *VarDecl, StringRef Name,
+                               unsigned ArgNo = 0,
+                               IndirectionKind = DirectValue,
+                               ArtificialKind = RealValue);
+  void emitDbgIntrinsic(IRBuilder &Builder, llvm::Value *Storage,
+                        llvm::DILocalVariable *Var, llvm::DIExpression *Expr,
+                        unsigned Line, unsigned Col, llvm::DILocalScope *Scope,
+                        const SILDebugScope *DS);
+  void emitGlobalVariableDeclaration(llvm::GlobalVariable *Storage,
+                                     StringRef Name, StringRef LinkageName,
+                                     DebugTypeInfo DebugType,
+                                     bool IsLocalToUnit,
+                                     Optional<SILLocation> Loc);
+  void emitTypeMetadata(IRGenFunction &IGF, llvm::Value *Metadata,
+                        StringRef Name);
+
+  /// Return the DIBuilder.
+  llvm::DIBuilder &getBuilder() { return DBuilder; }
+
+  /// Decode (and cache) a SourceLoc.
+  SILLocation::DebugLoc decodeSourceLoc(SourceLoc SL);
+
+private:
+  static StringRef getFilenameFromDC(const DeclContext *DC) {
+    if (auto LF = dyn_cast<LoadedFile>(DC))
+      return LF->getFilename();
+    if (auto SF = dyn_cast<SourceFile>(DC))
+      return SF->getFilename();
+    else if (auto M = dyn_cast<ModuleDecl>(DC))
+      return M->getModuleFilename();
+    else
+      return StringRef();
   }
-  return Ty->getSizeInBits();
-}
+
+  SILLocation::DebugLoc getDeserializedLoc(Pattern *) { return {}; }
+  SILLocation::DebugLoc getDeserializedLoc(Expr *) { return {}; }
+  SILLocation::DebugLoc getDeserializedLoc(Stmt *) { return {}; }
+  SILLocation::DebugLoc getDeserializedLoc(Decl *D) {
+    SILLocation::DebugLoc L;
+    const DeclContext *DC = D->getDeclContext()->getModuleScopeContext();
+    StringRef Filename = getFilenameFromDC(DC);
+    if (!Filename.empty())
+      L.Filename = Filename;
+    return L;
+  }
+
+  /// Use the SM to figure out the actual line/column of a SourceLoc.
+  template <typename WithLoc>
+  SILLocation::DebugLoc getDebugLoc(IRGenDebugInfo &DI, WithLoc *S,
+                                    bool End = false) {
+    SILLocation::DebugLoc L;
+    if (S == nullptr)
+      return L;
+
+    SourceLoc Loc = End ? S->getEndLoc() : S->getStartLoc();
+    if (Loc.isInvalid())
+      // This may be a deserialized or clang-imported decl. And modules
+      // don't come with SourceLocs right now. Get at least the name of
+      // the module.
+      return getDeserializedLoc(S);
+
+    return DI.decodeSourceLoc(Loc);
+  }
+
+  SILLocation::DebugLoc getStartLocation(Optional<SILLocation> OptLoc) {
+    if (!OptLoc)
+      return {};
+    return decodeSourceLoc(OptLoc->getStartSourceLoc());
+  }
+
+  SILLocation::DebugLoc decodeDebugLoc(SILLocation Loc) {
+    if (Loc.isDebugInfoLoc())
+      return Loc.getDebugInfoLoc();
+    return decodeSourceLoc(Loc.getDebugSourceLoc());
+  }
+
+  SILLocation::DebugLoc getDebugLocation(Optional<SILLocation> OptLoc) {
+    if (!OptLoc || OptLoc->isInPrologue())
+      return {};
+    return decodeDebugLoc(*OptLoc);
+  }
+
+  /// Strdup a raw char array using the bump pointer.
+  StringRef BumpAllocatedString(const char *Data, size_t Length) {
+    char *Ptr = DebugInfoNames.Allocate<char>(Length + 1);
+    memcpy(Ptr, Data, Length);
+    *(Ptr + Length) = 0;
+    return StringRef(Ptr, Length);
+  }
+
+  /// Strdup S using the bump pointer.
+  StringRef BumpAllocatedString(std::string S) {
+    return BumpAllocatedString(S.c_str(), S.length());
+  }
+
+  /// Strdup StringRef S using the bump pointer.
+  StringRef BumpAllocatedString(StringRef S) {
+    return BumpAllocatedString(S.data(), S.size());
+  }
+
+  /// Return the size reported by a type.
+  static unsigned getSizeInBits(llvm::DIType *Ty) {
+    // Follow derived types until we reach a type that
+    // reports back a size.
+    while (isa<llvm::DIDerivedType>(Ty) && !Ty->getSizeInBits()) {
+      auto *DT = cast<llvm::DIDerivedType>(Ty);
+      Ty = DT->getBaseType().resolve();
+      if (!Ty)
+        return 0;
+    }
+    return Ty->getSizeInBits();
+  }
 
 #ifndef NDEBUG
 
-/// Return the size reported by the variable's type.
-static unsigned getSizeInBits(const llvm::DILocalVariable *Var) {
-  llvm::DIType *Ty = Var->getType().resolve();
-  return getSizeInBits(Ty);
-}
+  /// Return the size reported by the variable's type.
+  static unsigned getSizeInBits(const llvm::DILocalVariable *Var) {
+    llvm::DIType *Ty = Var->getType().resolve();
+    return getSizeInBits(Ty);
+  }
 
 #endif
 
-IRGenDebugInfo::IRGenDebugInfo(const IRGenOptions &Opts,
-                               ClangImporter &CI,
-                               IRGenModule &IGM,
-                               llvm::Module &M,
-                               SourceFile *SF)
-  : Opts(Opts),
-    CI(CI),
-    SM(IGM.Context.SourceMgr),
-    M(M),
-    DBuilder(M),
-    IGM(IGM),
-    MetadataTypeDecl(nullptr),
-    InternalType(nullptr),
-    LastDebugLoc({}),
-    LastScope(nullptr)
-{
-  assert(Opts.DebugInfoKind > IRGenDebugInfoKind::None
-         && "no debug info should be generated");
-  StringRef SourceFileName = SF ? SF->getFilename() :
-                                  StringRef(Opts.MainInputFilename);
+  /// Determine whether this debug scope belongs to an explicit closure.
+  static bool isExplicitClosure(const SILFunction *SILFn) {
+    if (SILFn && SILFn->hasLocation())
+      if (Expr *E = SILFn->getLocation().getAsASTNode<Expr>())
+        if (isa<ClosureExpr>(E))
+          return true;
+    return false;
+  }
+
+  /// Determine whether this location is some kind of closure.
+  static bool isAbstractClosure(const SILLocation &Loc) {
+    if (Expr *E = Loc.getAsASTNode<Expr>())
+      if (isa<AbstractClosureExpr>(E))
+        return true;
+    return false;
+  }
+
+  /// Both the code that is used to set up a closure object and the
+  /// (beginning of) the closure itself has the AbstractClosureExpr as
+  /// location. We are only interested in the latter case and want to
+  /// ignore the setup code.
+  ///
+  /// callWithClosure(
+  ///  { // <-- a breakpoint here should only stop inside of the closure.
+  ///    foo();
+  ///  })
+  ///
+  /// The actual closure has a closure expression as scope.
+  static bool shouldIgnoreAbstractClosure(Optional<SILLocation> Loc,
+                                          const SILDebugScope *DS) {
+    return Loc && isAbstractClosure(*Loc) && DS &&
+           !isAbstractClosure(DS->Loc) && !Loc->is<ImplicitReturnLocation>();
+  }
+
+  llvm::MDNode *createInlinedAt(const SILDebugScope *DS) {
+    auto *CS = DS->InlinedCallSite;
+    if (!CS)
+      return nullptr;
+
+    auto CachedInlinedAt = InlinedAtCache.find(CS);
+    if (CachedInlinedAt != InlinedAtCache.end())
+      return cast<llvm::MDNode>(CachedInlinedAt->second);
+
+    auto L = decodeDebugLoc(CS->Loc);
+    auto Scope = getOrCreateScope(CS->Parent.dyn_cast<const SILDebugScope *>());
+    auto InlinedAt =
+        llvm::DebugLoc::get(L.Line, L.Column, Scope, createInlinedAt(CS));
+    InlinedAtCache.insert(
+        {CS, llvm::TrackingMDNodeRef(InlinedAt.getAsMDNode())});
+    return InlinedAt;
+  }
+
+#ifndef NDEBUG
+  /// Perform a couple of sanity checks on scopes.
+  static bool parentScopesAreSane(const SILDebugScope *DS) {
+    auto *Parent = DS;
+    while ((Parent = Parent->Parent.dyn_cast<const SILDebugScope *>())) {
+      if (!DS->InlinedCallSite)
+        assert(!Parent->InlinedCallSite &&
+               "non-inlined scope has an inlined parent");
+    }
+    return true;
+  }
+#endif
+
+  llvm::DIFile *getOrCreateFile(StringRef Filename) {
+    if (Filename.empty())
+      return MainFile;
+
+    // Look in the cache first.
+    auto CachedFile = DIFileCache.find(Filename);
+    if (CachedFile != DIFileCache.end()) {
+      // Verify that the information still exists.
+      if (llvm::Metadata *V = CachedFile->second)
+        return cast<llvm::DIFile>(V);
+    }
+
+    // Detect the main file.
+    if (MainFile && Filename.endswith(MainFile->getFilename())) {
+      SmallString<256> AbsThisFile, AbsMainFile;
+      AbsThisFile = Filename;
+      llvm::sys::fs::make_absolute(AbsThisFile);
+      llvm::sys::path::append(AbsMainFile, MainFile->getDirectory(),
+                              MainFile->getFilename());
+      if (AbsThisFile == AbsMainFile) {
+        DIFileCache[Filename] = llvm::TrackingMDNodeRef(MainFile);
+        return MainFile;
+      }
+    }
+
+    // Create a new one.
+    StringRef File = llvm::sys::path::filename(Filename);
+    llvm::SmallString<512> Path(Filename);
+    llvm::sys::path::remove_filename(Path);
+    llvm::DIFile *F = DBuilder.createFile(File, Path);
+
+    // Cache it.
+    DIFileCache[Filename] = llvm::TrackingMDNodeRef(F);
+    return F;
+  }
+
+  StringRef getName(const FuncDecl &FD) {
+    // Getters and Setters are anonymous functions, so we forge a name
+    // using its parent declaration.
+    if (FD.isAccessor())
+      if (ValueDecl *VD = FD.getAccessorStorageDecl()) {
+        const char *Kind;
+        switch (FD.getAccessorKind()) {
+        case AccessorKind::NotAccessor:
+          llvm_unreachable("this is an accessor");
+        case AccessorKind::IsGetter:
+          Kind = ".get";
+          break;
+        case AccessorKind::IsSetter:
+          Kind = ".set";
+          break;
+        case AccessorKind::IsWillSet:
+          Kind = ".willset";
+          break;
+        case AccessorKind::IsDidSet:
+          Kind = ".didset";
+          break;
+        case AccessorKind::IsMaterializeForSet:
+          Kind = ".materialize";
+          break;
+        case AccessorKind::IsAddressor:
+          Kind = ".addressor";
+          break;
+        case AccessorKind::IsMutableAddressor:
+          Kind = ".mutableAddressor";
+          break;
+        }
+
+        SmallVector<char, 64> Buf;
+        StringRef Name = (VD->getName().str() + Twine(Kind)).toStringRef(Buf);
+        return BumpAllocatedString(Name);
+      }
+
+    if (FD.hasName())
+      return FD.getName().str();
+
+    return StringRef();
+  }
+
+  StringRef getName(SILLocation L) {
+    if (L.isNull())
+      return StringRef();
+
+    if (FuncDecl *FD = L.getAsASTNode<FuncDecl>())
+      return getName(*FD);
+
+    if (L.isASTNode<ConstructorDecl>())
+      return "init";
+
+    if (L.isASTNode<DestructorDecl>())
+      return "deinit";
+
+    return StringRef();
+  }
+
+  static CanSILFunctionType getFunctionType(SILType SILTy) {
+    if (!SILTy)
+      return CanSILFunctionType();
+
+    auto FnTy = SILTy.getAs<SILFunctionType>();
+    if (!FnTy) {
+      DEBUG(llvm::dbgs() << "Unexpected function type: "; SILTy.dump();
+            llvm::dbgs() << "\n");
+      return CanSILFunctionType();
+    }
+
+    return FnTy;
+  }
+
+  llvm::DIScope *getOrCreateContext(DeclContext *DC) {
+    if (!DC)
+      return TheCU;
+
+    if (isa<FuncDecl>(DC))
+      if (auto *Decl = IGM.getSILModule().lookUpFunction(SILDeclRef(
+              cast<AbstractFunctionDecl>(DC), SILDeclRef::Kind::Func)))
+        return getOrCreateScope(Decl->getDebugScope());
+
+    switch (DC->getContextKind()) {
+    // The interesting cases are already handled above.
+    case DeclContextKind::AbstractFunctionDecl:
+    case DeclContextKind::AbstractClosureExpr:
+
+    // We don't model these in DWARF.
+    case DeclContextKind::SerializedLocal:
+    case DeclContextKind::Initializer:
+    case DeclContextKind::ExtensionDecl:
+    case DeclContextKind::SubscriptDecl:
+    case DeclContextKind::TopLevelCodeDecl:
+      return getOrCreateContext(DC->getParent());
+
+    case DeclContextKind::Module:
+      return getOrCreateModule(
+          {ModuleDecl::AccessPathTy(), cast<ModuleDecl>(DC)});
+    case DeclContextKind::FileUnit:
+      // A module may contain multiple files.
+      return getOrCreateContext(DC->getParent());
+    case DeclContextKind::GenericTypeDecl: {
+      auto *NTD = cast<NominalTypeDecl>(DC);
+      auto *Ty = NTD->getDeclaredType().getPointer();
+      if (auto *DITy = getTypeOrNull(Ty))
+        return DITy;
+
+      // Create a Forward-declared type.
+      auto Loc = getDebugLoc(*this, NTD);
+      auto File = getOrCreateFile(Loc.Filename);
+      auto Line = Loc.Line;
+      auto FwdDecl = DBuilder.createReplaceableCompositeType(
+          llvm::dwarf::DW_TAG_structure_type, NTD->getName().str(),
+          getOrCreateContext(DC->getParent()), File, Line,
+          llvm::dwarf::DW_LANG_Swift, 0, 0);
+      ReplaceMap.emplace_back(
+          std::piecewise_construct, std::make_tuple(Ty),
+          std::make_tuple(static_cast<llvm::Metadata *>(FwdDecl)));
+      return FwdDecl;
+    }
+    }
+    return TheCU;
+  }
+
+  void createParameterType(llvm::SmallVectorImpl<llvm::Metadata *> &Parameters,
+                           SILType type, DeclContext *DeclCtx,
+                           GenericEnvironment *GE) {
+    auto RealType = type.getSwiftRValueType();
+    if (type.isAddress())
+      RealType = CanInOutType::get(RealType);
+    auto DbgTy = DebugTypeInfo::getFromTypeInfo(DeclCtx, GE, RealType,
+                                                IGM.getTypeInfo(type));
+    Parameters.push_back(getOrCreateType(DbgTy));
+  }
+
+  // This is different from SILFunctionType::getAllResultsType() in some subtle
+  // ways.
+  static SILType getResultTypeForDebugInfo(CanSILFunctionType fnTy) {
+    if (fnTy->getNumResults() == 1) {
+      return fnTy->getResults()[0].getSILStorageType();
+    } else if (!fnTy->getNumIndirectFormalResults()) {
+      return fnTy->getDirectFormalResultsType();
+    } else {
+      SmallVector<TupleTypeElt, 4> eltTys;
+      for (auto &result : fnTy->getResults()) {
+        eltTys.push_back(result.getType());
+      }
+      return SILType::getPrimitiveAddressType(
+          CanType(TupleType::get(eltTys, fnTy->getASTContext())));
+    }
+  }
+
+  llvm::DITypeRefArray createParameterTypes(SILType SILTy, DeclContext *DeclCtx,
+                                            GenericEnvironment *GE) {
+    if (!SILTy)
+      return nullptr;
+    return createParameterTypes(SILTy.castTo<SILFunctionType>(), DeclCtx, GE);
+  }
+
+  llvm::DITypeRefArray createParameterTypes(CanSILFunctionType FnTy,
+                                            DeclContext *DeclCtx,
+                                            GenericEnvironment *GE) {
+    SmallVector<llvm::Metadata *, 16> Parameters;
+
+    GenericContextScope scope(IGM, FnTy->getGenericSignature());
+
+    // The function return type is the first element in the list.
+    createParameterType(Parameters, getResultTypeForDebugInfo(FnTy), DeclCtx,
+                        GE);
+
+    // Actually, the input type is either a single type or a tuple
+    // type. We currently represent a function with one n-tuple argument
+    // as an n-ary function.
+    for (auto Param : FnTy->getParameters())
+      createParameterType(Parameters, IGM.silConv.getSILType(Param), DeclCtx,
+                          GE);
+
+    return DBuilder.getOrCreateTypeArray(Parameters);
+  }
+
+  /// FIXME: replace this condition with something more sane.
+  static bool isAllocatingConstructor(SILFunctionTypeRepresentation Rep,
+                                      DeclContext *DeclCtx) {
+    return Rep != SILFunctionTypeRepresentation::Method && DeclCtx &&
+           isa<ConstructorDecl>(DeclCtx);
+  }
+
+  llvm::DIModule *getOrCreateModule(ModuleDecl::ImportedModule M) {
+    StringRef Path = getFilenameFromDC(M.second);
+    if (M.first.empty()) {
+      StringRef Name = M.second->getName().str();
+      return getOrCreateModule(Name, TheCU, Name, Path);
+    }
+
+    unsigned I = 0;
+    SmallString<128> AccessPath;
+    llvm::DIScope *Scope = TheCU;
+    llvm::raw_svector_ostream OS(AccessPath);
+    for (auto elt : M.first) {
+      auto Component = elt.first.str();
+      if (++I > 1)
+        OS << '.';
+      OS << Component;
+      Scope = getOrCreateModule(AccessPath, Scope, Component, Path);
+    }
+    return cast<llvm::DIModule>(Scope);
+  }
+
+  llvm::DIModule *getOrCreateModule(StringRef Key, llvm::DIScope *Parent,
+                                    StringRef Name, StringRef IncludePath,
+                                    StringRef ConfigMacros = StringRef()) {
+    // Look in the cache first.
+    auto Val = DIModuleCache.find(Key);
+    if (Val != DIModuleCache.end())
+      return cast<llvm::DIModule>(Val->second);
+
+    StringRef Sysroot = IGM.Context.SearchPathOpts.SDKPath;
+    auto M =
+        DBuilder.createModule(Parent, Name, ConfigMacros, IncludePath, Sysroot);
+    DIModuleCache.insert({Key, llvm::TrackingMDNodeRef(M)});
+    return M;
+  }
+
+  llvm::DIModule *
+  getOrCreateModule(clang::ExternalASTSource::ASTSourceDescriptor Desc) {
+    // Handle Clang modules.
+    if (const clang::Module *ClangModule = Desc.getModuleOrNull()) {
+      llvm::DIModule *Parent = nullptr;
+      if (ClangModule->Parent) {
+        clang::ExternalASTSource::ASTSourceDescriptor PM(*ClangModule->Parent);
+        Parent = getOrCreateModule(PM);
+      }
+      return getOrCreateModule(ClangModule->getFullModuleName(), Parent,
+                               Desc.getModuleName(), Desc.getPath(),
+                               ConfigMacros);
+    }
+    // Handle PCH.
+    return getOrCreateModule(Desc.getASTFile(), nullptr, Desc.getModuleName(),
+                             Desc.getPath(), ConfigMacros);
+  };
+
+  TypeAliasDecl *getMetadataType() {
+    if (!MetadataTypeDecl) {
+      MetadataTypeDecl = new (IGM.Context) TypeAliasDecl(
+          SourceLoc(), SourceLoc(), IGM.Context.getIdentifier("$swift.type"),
+          SourceLoc(),
+          /*genericparams*/ nullptr, IGM.Context.TheBuiltinModule);
+      MetadataTypeDecl->setUnderlyingType(IGM.Context.TheRawPointerType);
+    }
+    return MetadataTypeDecl;
+  }
+
+  /// Return the DIFile that is the ancestor of Scope.
+  llvm::DIFile *getFile(llvm::DIScope *Scope) {
+    while (!isa<llvm::DIFile>(Scope)) {
+      switch (Scope->getTag()) {
+      case llvm::dwarf::DW_TAG_lexical_block:
+        Scope = cast<llvm::DILexicalBlock>(Scope)->getScope();
+        break;
+      case llvm::dwarf::DW_TAG_subprogram:
+        Scope = cast<llvm::DISubprogram>(Scope)->getFile();
+        break;
+      default:
+        return MainFile;
+      }
+      if (Scope)
+        return MainFile;
+    }
+    return cast<llvm::DIFile>(Scope);
+  }
+
+  static Size getStorageSize(const llvm::DataLayout &DL,
+                             ArrayRef<llvm::Value *> Storage) {
+    unsigned size = 0;
+    for (llvm::Value *Piece : Storage)
+      size += DL.getTypeSizeInBits(Piece->getType());
+    return Size(size);
+  }
+
+  StringRef getMangledName(DebugTypeInfo DbgTy) {
+    if (MetadataTypeDecl && DbgTy.getDecl() == MetadataTypeDecl)
+      return BumpAllocatedString(DbgTy.getDecl()->getName().str());
+
+    Mangle::ASTMangler Mangler;
+    std::string Name = Mangler.mangleTypeForDebugger(
+        DbgTy.getType(), DbgTy.getDeclContext(), DbgTy.getGenericEnvironment());
+    return BumpAllocatedString(Name);
+  }
+
+  llvm::DIDerivedType *createMemberType(DebugTypeInfo DbgTy, StringRef Name,
+                                        unsigned &OffsetInBits,
+                                        llvm::DIScope *Scope,
+                                        llvm::DIFile *File,
+                                        llvm::DINode::DIFlags Flags) {
+    unsigned SizeOfByte = CI.getTargetInfo().getCharWidth();
+    auto *Ty = getOrCreateType(DbgTy);
+    auto *DITy = DBuilder.createMemberType(Scope, Name, File, 0,
+                                           SizeOfByte * DbgTy.size.getValue(),
+                                           0, OffsetInBits, Flags, Ty);
+    OffsetInBits += getSizeInBits(Ty);
+    OffsetInBits =
+        llvm::alignTo(OffsetInBits, SizeOfByte * DbgTy.align.getValue());
+    return DITy;
+  }
+
+  llvm::DINodeArray
+  getTupleElements(TupleType *TupleTy, llvm::DIScope *Scope, llvm::DIFile *File,
+                   llvm::DINode::DIFlags Flags, DeclContext *DeclContext,
+                   GenericEnvironment *GE, unsigned &SizeInBits) {
+    SmallVector<llvm::Metadata *, 16> Elements;
+    unsigned OffsetInBits = 0;
+    auto genericSig = IGM.getSILTypes().getCurGenericContext();
+    for (auto ElemTy : TupleTy->getElementTypes()) {
+      auto &elemTI = IGM.getTypeInfoForUnlowered(
+          AbstractionPattern(genericSig, ElemTy->getCanonicalType()), ElemTy);
+      auto DbgTy =
+          DebugTypeInfo::getFromTypeInfo(DeclContext, GE, ElemTy, elemTI);
+      Elements.push_back(createMemberType(DbgTy, StringRef(), OffsetInBits,
+                                          Scope, File, Flags));
+    }
+    SizeInBits = OffsetInBits;
+    return DBuilder.getOrCreateArray(Elements);
+  }
+
+  llvm::DINodeArray getStructMembers(NominalTypeDecl *D, Type BaseTy,
+                                     llvm::DIScope *Scope, llvm::DIFile *File,
+                                     llvm::DINode::DIFlags Flags,
+                                     unsigned &SizeInBits) {
+    SmallVector<llvm::Metadata *, 16> Elements;
+    unsigned OffsetInBits = 0;
+    for (VarDecl *VD : D->getStoredProperties()) {
+      auto memberTy =
+          BaseTy->getTypeOfMember(IGM.getSwiftModule(), VD, nullptr);
+
+      auto DbgTy = DebugTypeInfo::getFromTypeInfo(
+          VD->getDeclContext(),
+          VD->getDeclContext()->getGenericEnvironmentOfContext(),
+          VD->getInterfaceType(),
+          IGM.getTypeInfoForUnlowered(
+              IGM.getSILTypes().getAbstractionPattern(VD), memberTy));
+      Elements.push_back(createMemberType(DbgTy, VD->getName().str(),
+                                          OffsetInBits, Scope, File, Flags));
+    }
+    if (OffsetInBits > SizeInBits)
+      SizeInBits = OffsetInBits;
+    return DBuilder.getOrCreateArray(Elements);
+  }
+
+  llvm::DICompositeType *
+  createStructType(DebugTypeInfo DbgTy, NominalTypeDecl *Decl, Type BaseTy,
+                   llvm::DIScope *Scope, llvm::DIFile *File, unsigned Line,
+                   unsigned SizeInBits, unsigned AlignInBits,
+                   llvm::DINode::DIFlags Flags, llvm::DIType *DerivedFrom,
+                   unsigned RuntimeLang, StringRef UniqueID) {
+    StringRef Name = Decl->getName().str();
+
+    // Forward declare this first because types may be recursive.
+    auto FwdDecl = llvm::TempDIType(DBuilder.createReplaceableCompositeType(
+        llvm::dwarf::DW_TAG_structure_type, Name, Scope, File, Line,
+        llvm::dwarf::DW_LANG_Swift, SizeInBits, 0, Flags, UniqueID));
+
+#ifndef NDEBUG
+    if (UniqueID.empty())
+      assert(!Name.empty() &&
+             "no mangled name and no human readable name given");
+    else
+      assert((UniqueID.startswith("_T") ||
+              UniqueID.startswith(MANGLING_PREFIX_STR)) &&
+             "UID is not a mangled name");
+#endif
+
+    auto TH = llvm::TrackingMDNodeRef(FwdDecl.get());
+    DITypeCache[DbgTy.getType()] = TH;
+    auto Members =
+        getStructMembers(Decl, BaseTy, Scope, File, Flags, SizeInBits);
+    auto DITy = DBuilder.createStructType(
+        Scope, Name, File, Line, SizeInBits, AlignInBits, Flags, DerivedFrom,
+        Members, RuntimeLang, nullptr, UniqueID);
+    DBuilder.replaceTemporary(std::move(FwdDecl), DITy);
+    return DITy;
+  }
+
+  llvm::DINodeArray getEnumElements(DebugTypeInfo DbgTy, EnumDecl *ED,
+                                    llvm::DIScope *Scope, llvm::DIFile *File,
+                                    llvm::DINode::DIFlags Flags) {
+    SmallVector<llvm::Metadata *, 16> Elements;
+
+    for (auto *ElemDecl : ED->getAllElements()) {
+      // FIXME <rdar://problem/14845818> Support enums.
+      // Swift Enums can be both like DWARF enums and discriminated unions.
+      DebugTypeInfo ElemDbgTy;
+      if (ED->hasRawType())
+        // An enum with a raw type (enum E : Int {}), similar to a
+        // DWARF enum.
+        //
+        // The storage occupied by the enum may be smaller than the
+        // one of the raw type as long as it is large enough to hold
+        // all enum values. Use the raw type for the debug type, but
+        // the storage size from the enum.
+        ElemDbgTy =
+            DebugTypeInfo(ED, DbgTy.getGenericEnvironment(), ED->getRawType(),
+                          DbgTy.StorageType, DbgTy.size, DbgTy.align, true);
+      else if (auto ArgTy = ElemDecl->getArgumentInterfaceType()) {
+        // A discriminated union. This should really be described as a
+        // DW_TAG_variant_type. For now only describing the data.
+        ArgTy = ElemDecl->getParentEnum()->mapTypeIntoContext(ArgTy);
+        auto &TI = IGM.getTypeInfoForUnlowered(ArgTy);
+        ElemDbgTy = DebugTypeInfo::getFromTypeInfo(
+            ElemDecl->getDeclContext(),
+            ElemDecl->getDeclContext()->getGenericEnvironmentOfContext(), ArgTy,
+            TI);
+      } else {
+        // Discriminated union case without argument. Fallback to Int
+        // as the element type; there is no storage here.
+        Type IntTy = IGM.Context.getIntDecl()->getDeclaredType();
+        ElemDbgTy = DebugTypeInfo(
+            ElemDecl->getDeclContext(),
+            ElemDecl->getDeclContext()->getGenericEnvironmentOfContext(), IntTy,
+            DbgTy.StorageType, Size(0), Alignment(1), true);
+      }
+      unsigned Offset = 0;
+      auto MTy = createMemberType(ElemDbgTy, ElemDecl->getName().str(), Offset,
+                                  Scope, File, Flags);
+      Elements.push_back(MTy);
+    }
+    return DBuilder.getOrCreateArray(Elements);
+  }
+
+  llvm::DICompositeType *createEnumType(DebugTypeInfo DbgTy, EnumDecl *Decl,
+                                        StringRef MangledName,
+                                        llvm::DIScope *Scope,
+                                        llvm::DIFile *File, unsigned Line,
+                                        llvm::DINode::DIFlags Flags) {
+    unsigned SizeOfByte = CI.getTargetInfo().getCharWidth();
+    unsigned SizeInBits = DbgTy.size.getValue() * SizeOfByte;
+    // Default, since Swift doesn't allow specifying a custom alignment.
+    unsigned AlignInBits = 0;
+
+    // FIXME: Is DW_TAG_union_type the right thing here?
+    // Consider using a DW_TAG_variant_type instead.
+    auto FwdDecl = llvm::TempDIType(DBuilder.createReplaceableCompositeType(
+        llvm::dwarf::DW_TAG_union_type, MangledName, Scope, File, Line,
+        llvm::dwarf::DW_LANG_Swift, SizeInBits, AlignInBits, Flags,
+        MangledName));
+
+    auto TH = llvm::TrackingMDNodeRef(FwdDecl.get());
+    DITypeCache[DbgTy.getType()] = TH;
+
+    auto DITy = DBuilder.createUnionType(
+        Scope, Decl->getName().str(), File, Line, SizeInBits, AlignInBits,
+        Flags, getEnumElements(DbgTy, Decl, Scope, File, Flags),
+        llvm::dwarf::DW_LANG_Swift, MangledName);
+
+    DBuilder.replaceTemporary(std::move(FwdDecl), DITy);
+    return DITy;
+  }
+
+  llvm::DIType *getOrCreateDesugaredType(Type Ty, DebugTypeInfo DbgTy) {
+    DebugTypeInfo BlandDbgTy(
+        DbgTy.getDeclContext(), DbgTy.getGenericEnvironment(), Ty,
+        DbgTy.StorageType, DbgTy.size, DbgTy.align, DbgTy.DefaultAlignment);
+    return getOrCreateType(BlandDbgTy);
+  }
+
+  uint64_t getSizeOfBasicType(DebugTypeInfo DbgTy) {
+    uint64_t SizeOfByte = CI.getTargetInfo().getCharWidth();
+    uint64_t BitWidth = DbgTy.size.getValue() * SizeOfByte;
+    llvm::Type *StorageType = DbgTy.StorageType
+                                  ? DbgTy.StorageType
+                                  : IGM.DataLayout.getSmallestLegalIntType(
+                                        IGM.getLLVMContext(), BitWidth);
+
+    if (StorageType)
+      return IGM.DataLayout.getTypeSizeInBits(StorageType);
+
+    // This type is too large to fit in a register.
+    assert(BitWidth > IGM.DataLayout.getLargestLegalIntTypeSizeInBits());
+    return BitWidth;
+  }
+
+  llvm::DIType *createPointerSizedStruct(llvm::DIScope *Scope, StringRef Name,
+                                         llvm::DIFile *File, unsigned Line,
+                                         llvm::DINode::DIFlags Flags,
+                                         StringRef MangledName) {
+    if (Opts.DebugInfoKind > IRGenDebugInfoKind::ASTTypes) {
+      auto FwdDecl = DBuilder.createForwardDecl(
+          llvm::dwarf::DW_TAG_structure_type, Name, Scope, File, Line,
+          llvm::dwarf::DW_LANG_Swift, 0, 0);
+      return createPointerSizedStruct(Scope, Name, FwdDecl, File, Line, Flags,
+                                      MangledName);
+    } else {
+      unsigned SizeInBits = CI.getTargetInfo().getPointerWidth(0);
+      return createOpaqueStruct(Scope, Name, File, Line, SizeInBits, 0, Flags,
+                                MangledName);
+    }
+  }
+
+  llvm::DIType *createPointerSizedStruct(llvm::DIScope *Scope, StringRef Name,
+                                         llvm::DIType *PointeeTy,
+                                         llvm::DIFile *File, unsigned Line,
+                                         llvm::DINode::DIFlags Flags,
+                                         StringRef MangledName) {
+    unsigned PtrSize = CI.getTargetInfo().getPointerWidth(0);
+    auto PtrTy = DBuilder.createPointerType(PointeeTy, PtrSize, 0);
+    llvm::Metadata *Elements[] = {DBuilder.createMemberType(
+        Scope, "ptr", File, 0, PtrSize, 0, 0, Flags, PtrTy)};
+    return DBuilder.createStructType(
+        Scope, Name, File, Line, PtrSize, 0, Flags,
+        /* DerivedFrom */ nullptr, DBuilder.getOrCreateArray(Elements),
+        llvm::dwarf::DW_LANG_Swift, nullptr, MangledName);
+  }
+
+  llvm::DIType *
+  createDoublePointerSizedStruct(llvm::DIScope *Scope, StringRef Name,
+                                 llvm::DIType *PointeeTy, llvm::DIFile *File,
+                                 unsigned Line, llvm::DINode::DIFlags Flags,
+                                 StringRef MangledName) {
+    unsigned PtrSize = CI.getTargetInfo().getPointerWidth(0);
+    llvm::Metadata *Elements[] = {
+        DBuilder.createMemberType(
+            Scope, "ptr", File, 0, PtrSize, 0, 0, Flags,
+            DBuilder.createPointerType(PointeeTy, PtrSize, 0)),
+        DBuilder.createMemberType(
+            Scope, "_", File, 0, PtrSize, 0, 0, Flags,
+            DBuilder.createPointerType(nullptr, PtrSize, 0))};
+    return DBuilder.createStructType(
+        Scope, Name, File, Line, 2 * PtrSize, 0, Flags,
+        /* DerivedFrom */ nullptr, DBuilder.getOrCreateArray(Elements),
+        llvm::dwarf::DW_LANG_Swift, nullptr, MangledName);
+  }
+
+  llvm::DIType *createFunctionPointer(DebugTypeInfo DbgTy, llvm::DIScope *Scope,
+                                      unsigned SizeInBits, unsigned AlignInBits,
+                                      llvm::DINode::DIFlags Flags,
+                                      StringRef MangledName) {
+    auto FwdDecl = llvm::TempDINode(DBuilder.createReplaceableCompositeType(
+        llvm::dwarf::DW_TAG_subroutine_type, MangledName, Scope, MainFile, 0,
+        llvm::dwarf::DW_LANG_Swift, SizeInBits, AlignInBits, Flags,
+        MangledName));
+
+    auto TH = llvm::TrackingMDNodeRef(FwdDecl.get());
+    DITypeCache[DbgTy.getType()] = TH;
+
+    CanSILFunctionType FunTy;
+    TypeBase *BaseTy = DbgTy.getType();
+    if (auto *SILFnTy = dyn_cast<SILFunctionType>(BaseTy))
+      FunTy = CanSILFunctionType(SILFnTy);
+    // FIXME: Handling of generic parameters in SIL type lowering is in flux.
+    // DebugInfo doesn't appear to care about the generic context, so just
+    // throw it away before lowering.
+    else if (isa<GenericFunctionType>(BaseTy)) {
+      auto *fTy = cast<AnyFunctionType>(BaseTy);
+      auto *nongenericTy = FunctionType::get(fTy->getInput(), fTy->getResult(),
+                                             fTy->getExtInfo());
+
+      FunTy = IGM.getLoweredType(nongenericTy).castTo<SILFunctionType>();
+    } else
+      FunTy = IGM.getLoweredType(BaseTy).castTo<SILFunctionType>();
+    auto Params = createParameterTypes(FunTy, DbgTy.getDeclContext(),
+                                       DbgTy.getGenericEnvironment());
+
+    auto FnTy = DBuilder.createSubroutineType(Params, Flags);
+    llvm::DIType *DITy;
+    if (FunTy->getRepresentation() == SILFunctionType::Representation::Thick) {
+      if (SizeInBits == 2 * CI.getTargetInfo().getPointerWidth(0))
+        // This is a FunctionPairTy: { i8*, %swift.refcounted* }.
+        DITy = createDoublePointerSizedStruct(Scope, MangledName, FnTy,
+                                              MainFile, 0, Flags, MangledName);
+      else
+        // This is a generic function as noted above.
+        DITy = createOpaqueStruct(Scope, MangledName, MainFile, 0, SizeInBits,
+                                  AlignInBits, Flags, MangledName);
+    } else {
+      assert(SizeInBits == CI.getTargetInfo().getPointerWidth(0));
+      DITy = createPointerSizedStruct(Scope, MangledName, FnTy, MainFile, 0,
+                                      Flags, MangledName);
+    }
+    DBuilder.replaceTemporary(std::move(FwdDecl), DITy);
+    return DITy;
+  }
+
+  llvm::DIType *createTuple(DebugTypeInfo DbgTy, llvm::DIScope *Scope,
+                            unsigned SizeInBits, unsigned AlignInBits,
+                            llvm::DINode::DIFlags Flags,
+                            StringRef MangledName) {
+    TypeBase *BaseTy = DbgTy.getType();
+    auto *TupleTy = BaseTy->castTo<TupleType>();
+    auto FwdDecl = llvm::TempDINode(DBuilder.createReplaceableCompositeType(
+        llvm::dwarf::DW_TAG_structure_type, MangledName, Scope, MainFile, 0,
+        llvm::dwarf::DW_LANG_Swift, SizeInBits, AlignInBits, Flags,
+        MangledName));
+
+    DITypeCache[DbgTy.getType()] = llvm::TrackingMDNodeRef(FwdDecl.get());
+
+    unsigned RealSize;
+    auto Elements = getTupleElements(TupleTy, Scope, MainFile, Flags,
+                                     DbgTy.getDeclContext(),
+                                     DbgTy.getGenericEnvironment(), RealSize);
+    // FIXME: Handle %swift.opaque members and make this into an assertion.
+    if (!RealSize)
+      RealSize = SizeInBits;
+
+    auto DITy = DBuilder.createStructType(
+        Scope, MangledName, MainFile, 0, RealSize, AlignInBits, Flags,
+        nullptr, // DerivedFrom
+        Elements, llvm::dwarf::DW_LANG_Swift, nullptr, MangledName);
+
+    DBuilder.replaceTemporary(std::move(FwdDecl), DITy);
+    return DITy;
+  }
+
+  llvm::DIType *createOpaqueStruct(llvm::DIScope *Scope, StringRef Name,
+                                   llvm::DIFile *File, unsigned Line,
+                                   unsigned SizeInBits, unsigned AlignInBits,
+                                   llvm::DINode::DIFlags Flags,
+                                   StringRef MangledName) {
+    return DBuilder.createStructType(
+        Scope, Name, File, Line, SizeInBits, AlignInBits, Flags,
+        /* DerivedFrom */ nullptr,
+        DBuilder.getOrCreateArray(ArrayRef<llvm::Metadata *>()),
+        llvm::dwarf::DW_LANG_Swift, nullptr, MangledName);
+  }
+
+  llvm::DIType *createType(DebugTypeInfo DbgTy, StringRef MangledName,
+                           llvm::DIScope *Scope, llvm::DIFile *File) {
+    // FIXME: For SizeInBits, clang uses the actual size of the type on
+    // the target machine instead of the storage size that is alloca'd
+    // in the LLVM IR. For all types that are boxed in a struct, we are
+    // emitting the storage size of the struct, but it may be necessary
+    // to emit the (target!) size of the underlying basic type.
+    uint64_t SizeOfByte = CI.getTargetInfo().getCharWidth();
+    uint64_t SizeInBits = DbgTy.size.getValue() * SizeOfByte;
+    unsigned AlignInBits =
+        DbgTy.DefaultAlignment ? 0 : DbgTy.align.getValue() * SizeOfByte;
+    unsigned Encoding = 0;
+    llvm::DINode::DIFlags Flags = llvm::DINode::FlagZero;
+
+    TypeBase *BaseTy = DbgTy.getType();
+
+    if (!BaseTy) {
+      DEBUG(llvm::dbgs() << "Type without TypeBase: "; DbgTy.getType()->dump();
+            llvm::dbgs() << "\n");
+      if (!InternalType) {
+        StringRef Name = "<internal>";
+        InternalType = DBuilder.createForwardDecl(
+            llvm::dwarf::DW_TAG_structure_type, Name, Scope, File,
+            /*Line*/ 0, llvm::dwarf::DW_LANG_Swift, SizeInBits, AlignInBits);
+      }
+      return InternalType;
+    }
+
+    // Here goes!
+    switch (BaseTy->getKind()) {
+    case TypeKind::BuiltinInteger: {
+      Encoding = llvm::dwarf::DW_ATE_unsigned;
+      SizeInBits = getSizeOfBasicType(DbgTy);
+      break;
+    }
+
+    case TypeKind::BuiltinFloat: {
+      auto *FloatTy = BaseTy->castTo<BuiltinFloatType>();
+      // Assuming that the bitwidth and FloatTy->getFPKind() are identical.
+      SizeInBits = FloatTy->getBitWidth();
+      Encoding = llvm::dwarf::DW_ATE_float;
+      break;
+    }
+
+    case TypeKind::BuiltinUnknownObject: {
+      // The builtin opaque Objective-C pointer type. Useful for pushing
+      // an Objective-C type through swift.
+      unsigned PtrSize = CI.getTargetInfo().getPointerWidth(0);
+      auto IdTy = DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type,
+                                             MangledName, Scope, File, 0,
+                                             llvm::dwarf::DW_LANG_ObjC, 0, 0);
+      return DBuilder.createPointerType(IdTy, PtrSize, 0,
+                                        /* DWARFAddressSpace */ None,
+                                        MangledName);
+    }
+
+    case TypeKind::BuiltinNativeObject: {
+      unsigned PtrSize = CI.getTargetInfo().getPointerWidth(0);
+      auto PTy =
+          DBuilder.createPointerType(nullptr, PtrSize, 0,
+                                     /* DWARFAddressSpace */ None, MangledName);
+      return DBuilder.createObjectPointerType(PTy);
+    }
+
+    case TypeKind::BuiltinBridgeObject: {
+      unsigned PtrSize = CI.getTargetInfo().getPointerWidth(0);
+      auto PTy =
+          DBuilder.createPointerType(nullptr, PtrSize, 0,
+                                     /* DWARFAddressSpace */ None, MangledName);
+      return DBuilder.createObjectPointerType(PTy);
+    }
+
+    case TypeKind::BuiltinRawPointer: {
+      unsigned PtrSize = CI.getTargetInfo().getPointerWidth(0);
+      return DBuilder.createPointerType(nullptr, PtrSize, 0,
+                                        /* DWARFAddressSpace */ None,
+                                        MangledName);
+    }
+
+    case TypeKind::DynamicSelf: {
+      // Self. We don't have a way to represent instancetype in DWARF,
+      // so we emit the static type instead. This is similar to what we
+      // do with instancetype in Objective-C.
+      auto *DynamicSelfTy = BaseTy->castTo<DynamicSelfType>();
+      auto SelfTy =
+          getOrCreateDesugaredType(DynamicSelfTy->getSelfType(), DbgTy);
+      return DBuilder.createTypedef(SelfTy, MangledName, File, 0, File);
+    }
+
+    // Even builtin swift types usually come boxed in a struct.
+    case TypeKind::Struct: {
+      auto *StructTy = BaseTy->castTo<StructType>();
+      auto *Decl = StructTy->getDecl();
+      auto L = getDebugLoc(*this, Decl);
+      if (auto *ClangDecl = Decl->getClangDecl()) {
+        auto ClangSrcLoc = ClangDecl->getLocStart();
+        clang::SourceManager &ClangSM =
+            CI.getClangASTContext().getSourceManager();
+        L.Line = ClangSM.getPresumedLineNumber(ClangSrcLoc);
+        L.Filename = ClangSM.getBufferName(ClangSrcLoc);
+      }
+      auto *File = getOrCreateFile(L.Filename);
+      if (Opts.DebugInfoKind > IRGenDebugInfoKind::ASTTypes)
+        return createStructType(DbgTy, Decl, StructTy, Scope, File, L.Line,
+                                SizeInBits, AlignInBits, Flags,
+                                nullptr, // DerivedFrom
+                                llvm::dwarf::DW_LANG_Swift, MangledName);
+      else
+        return createOpaqueStruct(Scope, Decl->getName().str(), File, L.Line,
+                                  SizeInBits, AlignInBits, Flags, MangledName);
+    }
+
+    case TypeKind::Class: {
+      // Classes are represented as DW_TAG_structure_type. This way the
+      // DW_AT_APPLE_runtime_class(DW_LANG_Swift) attribute can be
+      // used to differentiate them from C++ and ObjC classes.
+      auto *ClassTy = BaseTy->castTo<ClassType>();
+      auto *Decl = ClassTy->getDecl();
+      auto L = getDebugLoc(*this, Decl);
+      if (auto *ClangDecl = Decl->getClangDecl()) {
+        auto ClangSrcLoc = ClangDecl->getLocStart();
+        clang::SourceManager &ClangSM =
+            CI.getClangASTContext().getSourceManager();
+        L.Line = ClangSM.getPresumedLineNumber(ClangSrcLoc);
+        L.Filename = ClangSM.getBufferName(ClangSrcLoc);
+      }
+      assert(SizeInBits == CI.getTargetInfo().getPointerWidth(0));
+      return createPointerSizedStruct(Scope, Decl->getNameStr(),
+                                      getOrCreateFile(L.Filename), L.Line,
+                                      Flags, MangledName);
+    }
+
+    case TypeKind::Protocol: {
+      auto *ProtocolTy = BaseTy->castTo<ProtocolType>();
+      auto *Decl = ProtocolTy->getDecl();
+      // FIXME: (LLVM branch) This should probably be a DW_TAG_interface_type.
+      auto L = getDebugLoc(*this, Decl);
+      auto File = getOrCreateFile(L.Filename);
+      return createOpaqueStruct(Scope, Decl ? Decl->getNameStr() : MangledName,
+                                File, L.Line, SizeInBits, AlignInBits, Flags,
+                                MangledName);
+    }
+
+    case TypeKind::ProtocolComposition: {
+      auto *Decl = DbgTy.getDecl();
+      auto L = getDebugLoc(*this, Decl);
+      auto File = getOrCreateFile(L.Filename);
+
+      // FIXME: emit types
+      // auto ProtocolCompositionTy = BaseTy->castTo<ProtocolCompositionType>();
+      return createOpaqueStruct(Scope, Decl ? Decl->getNameStr() : MangledName,
+                                File, L.Line, SizeInBits, AlignInBits, Flags,
+                                MangledName);
+    }
+
+    case TypeKind::UnboundGeneric: {
+      auto *UnboundTy = BaseTy->castTo<UnboundGenericType>();
+      auto *Decl = UnboundTy->getDecl();
+      auto L = getDebugLoc(*this, Decl);
+      assert(SizeInBits == CI.getTargetInfo().getPointerWidth(0));
+      return createPointerSizedStruct(Scope,
+                                      Decl ? Decl->getNameStr() : MangledName,
+                                      File, L.Line, Flags, MangledName);
+    }
+
+    case TypeKind::BoundGenericStruct: {
+      auto *StructTy = BaseTy->castTo<BoundGenericStructType>();
+      auto *Decl = StructTy->getDecl();
+      auto L = getDebugLoc(*this, Decl);
+      return createOpaqueStruct(Scope, Decl ? Decl->getNameStr() : MangledName,
+                                File, L.Line, SizeInBits, AlignInBits, Flags,
+                                MangledName);
+    }
+
+    case TypeKind::BoundGenericClass: {
+      auto *ClassTy = BaseTy->castTo<BoundGenericClassType>();
+      auto *Decl = ClassTy->getDecl();
+      auto L = getDebugLoc(*this, Decl);
+      // TODO: We may want to peek at Decl->isObjC() and set this
+      // attribute accordingly.
+      assert(SizeInBits == CI.getTargetInfo().getPointerWidth(0));
+      return createPointerSizedStruct(Scope,
+                                      Decl ? Decl->getNameStr() : MangledName,
+                                      File, L.Line, Flags, MangledName);
+    }
+
+    case TypeKind::Tuple: {
+      // Tuples are also represented as structs.
+      if (Opts.DebugInfoKind > IRGenDebugInfoKind::ASTTypes)
+        return createTuple(DbgTy, Scope, SizeInBits, AlignInBits, Flags,
+                           MangledName);
+      else
+        return createOpaqueStruct(Scope, MangledName, MainFile, 0, SizeInBits,
+                                  AlignInBits, Flags, MangledName);
+    }
+
+    case TypeKind::InOut: {
+      // This is an inout type. Naturally we would be emitting them as
+      // DW_TAG_reference_type types, but LLDB can deal better with
+      // pointer-sized struct that has the appropriate mangled name.
+      auto ObjectTy = BaseTy->castTo<InOutType>()->getObjectType();
+      if (Opts.DebugInfoKind > IRGenDebugInfoKind::ASTTypes) {
+        auto DT = getOrCreateDesugaredType(ObjectTy, DbgTy);
+        return createPointerSizedStruct(Scope, MangledName, DT, File, 0, Flags,
+                                        MangledName);
+      } else
+        return createOpaqueStruct(Scope, MangledName, File, 0, SizeInBits,
+                                  AlignInBits, Flags, MangledName);
+    }
+
+    case TypeKind::Archetype: {
+      auto *Archetype = BaseTy->castTo<ArchetypeType>();
+      auto L = getDebugLoc(*this, Archetype->getAssocType());
+      auto Superclass = Archetype->getSuperclass();
+      auto DerivedFrom = Superclass.isNull()
+                             ? nullptr
+                             : getOrCreateDesugaredType(Superclass, DbgTy);
+      auto FwdDecl = llvm::TempDIType(DBuilder.createReplaceableCompositeType(
+          llvm::dwarf::DW_TAG_structure_type, MangledName, Scope, File, L.Line,
+          llvm::dwarf::DW_LANG_Swift, SizeInBits, AlignInBits, Flags,
+          MangledName));
+
+      // Emit the protocols the archetypes conform to.
+      SmallVector<llvm::Metadata *, 4> Protocols;
+      for (auto *ProtocolDecl : Archetype->getConformsTo()) {
+        auto PTy = IGM.getLoweredType(ProtocolDecl->getInterfaceType())
+                       .getSwiftRValueType();
+        auto PDbgTy = DebugTypeInfo::getFromTypeInfo(
+            DbgTy.getDeclContext(), DbgTy.getGenericEnvironment(),
+            ProtocolDecl->getInterfaceType(), IGM.getTypeInfoForLowered(PTy));
+        auto PDITy = getOrCreateType(PDbgTy);
+        Protocols.push_back(
+            DBuilder.createInheritance(FwdDecl.get(), PDITy, 0, Flags));
+      }
+      auto DITy = DBuilder.createStructType(
+          Scope, MangledName, File, L.Line, SizeInBits, AlignInBits, Flags,
+          DerivedFrom, DBuilder.getOrCreateArray(Protocols),
+          llvm::dwarf::DW_LANG_Swift, nullptr, MangledName);
+
+      DBuilder.replaceTemporary(std::move(FwdDecl), DITy);
+      return DITy;
+    }
+
+    case TypeKind::ExistentialMetatype:
+    case TypeKind::Metatype: {
+      // Metatypes are (mostly) singleton type descriptors, often without
+      // storage.
+      Flags |= llvm::DINode::FlagArtificial;
+      auto L = getDebugLoc(*this, DbgTy.getDecl());
+      auto File = getOrCreateFile(L.Filename);
+      return DBuilder.createStructType(
+          Scope, MangledName, File, L.Line, SizeInBits, AlignInBits, Flags,
+          nullptr, nullptr, llvm::dwarf::DW_LANG_Swift, nullptr, MangledName);
+    }
+
+    case TypeKind::SILFunction:
+    case TypeKind::Function:
+    case TypeKind::GenericFunction: {
+      if (Opts.DebugInfoKind > IRGenDebugInfoKind::ASTTypes)
+        return createFunctionPointer(DbgTy, Scope, SizeInBits, AlignInBits,
+                                     Flags, MangledName);
+      else
+        return createOpaqueStruct(Scope, MangledName, MainFile, 0, SizeInBits,
+                                  AlignInBits, Flags, MangledName);
+    }
+
+    case TypeKind::Enum: {
+      auto *EnumTy = BaseTy->castTo<EnumType>();
+      auto *Decl = EnumTy->getDecl();
+      auto L = getDebugLoc(*this, Decl);
+      auto *File = getOrCreateFile(L.Filename);
+      if (Opts.DebugInfoKind > IRGenDebugInfoKind::ASTTypes)
+        return createEnumType(DbgTy, Decl, MangledName, Scope, File, L.Line,
+                              Flags);
+      else
+        return createOpaqueStruct(Scope, Decl->getName().str(), File, L.Line,
+                                  SizeInBits, AlignInBits, Flags, MangledName);
+    }
+
+    case TypeKind::BoundGenericEnum: {
+      auto *EnumTy = BaseTy->castTo<BoundGenericEnumType>();
+      auto *Decl = EnumTy->getDecl();
+      auto L = getDebugLoc(*this, Decl);
+      auto *File = getOrCreateFile(L.Filename);
+      if (Opts.DebugInfoKind > IRGenDebugInfoKind::ASTTypes)
+        return createEnumType(DbgTy, Decl, MangledName, Scope, File, L.Line,
+                              Flags);
+      else
+        return createOpaqueStruct(Scope, Decl->getName().str(), File, L.Line,
+                                  SizeInBits, AlignInBits, Flags, MangledName);
+    }
+
+    case TypeKind::BuiltinVector: {
+      (void)MangledName; // FIXME emit the name somewhere.
+      auto *BuiltinVectorTy = BaseTy->castTo<BuiltinVectorType>();
+      DebugTypeInfo ElemDbgTy(DbgTy.getDeclContext(),
+                              DbgTy.getGenericEnvironment(),
+                              BuiltinVectorTy->getElementType(),
+                              DbgTy.StorageType, DbgTy.size, DbgTy.align, true);
+      auto Subscripts = nullptr;
+      return DBuilder.createVectorType(BuiltinVectorTy->getNumElements(),
+                                       AlignInBits, getOrCreateType(ElemDbgTy),
+                                       Subscripts);
+    }
+
+    // Reference storage types.
+    case TypeKind::UnownedStorage:
+    case TypeKind::UnmanagedStorage:
+    case TypeKind::WeakStorage: {
+      auto *ReferenceTy = cast<ReferenceStorageType>(BaseTy);
+      auto CanTy = ReferenceTy->getReferentType();
+      auto L = getDebugLoc(*this, DbgTy.getDecl());
+      auto File = getOrCreateFile(L.Filename);
+      return DBuilder.createTypedef(getOrCreateDesugaredType(CanTy, DbgTy),
+                                    MangledName, File, L.Line, File);
+    }
+
+    // Sugared types.
+
+    case TypeKind::NameAlias: {
+
+      auto *NameAliasTy = cast<NameAliasType>(BaseTy);
+      auto *Decl = NameAliasTy->getDecl();
+      auto L = getDebugLoc(*this, Decl);
+      auto AliasedTy = NameAliasTy->getSinglyDesugaredType();
+      auto File = getOrCreateFile(L.Filename);
+      // For NameAlias types, the DeclContext for the aliasED type is
+      // in the decl of the alias type.
+      DebugTypeInfo AliasedDbgTy(
+          DbgTy.getDeclContext(), DbgTy.getGenericEnvironment(), AliasedTy,
+          DbgTy.StorageType, DbgTy.size, DbgTy.align, DbgTy.DefaultAlignment);
+      return DBuilder.createTypedef(getOrCreateType(AliasedDbgTy), MangledName,
+                                    File, L.Line, File);
+    }
+
+    case TypeKind::Paren: {
+      auto Ty = cast<ParenType>(BaseTy)->getUnderlyingType();
+      return getOrCreateDesugaredType(Ty, DbgTy);
+    }
+
+    // SyntaxSugarType derivations.
+    case TypeKind::ArraySlice:
+    case TypeKind::Optional:
+    case TypeKind::ImplicitlyUnwrappedOptional: {
+      auto *SyntaxSugarTy = cast<SyntaxSugarType>(BaseTy);
+      auto *CanTy = SyntaxSugarTy->getSinglyDesugaredType();
+      return getOrCreateDesugaredType(CanTy, DbgTy);
+    }
+
+    case TypeKind::Dictionary: {
+      auto *DictionaryTy = cast<DictionaryType>(BaseTy);
+      auto *CanTy = DictionaryTy->getDesugaredType();
+      return getOrCreateDesugaredType(CanTy, DbgTy);
+    }
+
+    case TypeKind::GenericTypeParam: {
+      auto *ParamTy = cast<GenericTypeParamType>(BaseTy);
+      // FIXME: Provide a more meaningful debug type.
+      return DBuilder.createUnspecifiedType(ParamTy->getName().str());
+    }
+    case TypeKind::DependentMember: {
+      auto *MemberTy = cast<DependentMemberType>(BaseTy);
+      // FIXME: Provide a more meaningful debug type.
+      return DBuilder.createUnspecifiedType(MemberTy->getName().str());
+    }
+
+    // The following types exist primarily for internal use by the type
+    // checker.
+    case TypeKind::Error:
+    case TypeKind::Unresolved:
+    case TypeKind::LValue:
+    case TypeKind::TypeVariable:
+    case TypeKind::Module:
+    case TypeKind::SILBlockStorage:
+    case TypeKind::SILBox:
+    case TypeKind::BuiltinUnsafeValueBuffer:
+
+      DEBUG(llvm::errs() << "Unhandled type: "; DbgTy.getType()->dump();
+            llvm::errs() << "\n");
+      MangledName = "<unknown>";
+    }
+    return DBuilder.createBasicType(MangledName, SizeInBits, Encoding);
+  }
+
+  /// Determine if there exists a name mangling for the given type.
+  static bool canMangle(TypeBase *Ty) {
+    switch (Ty->getKind()) {
+    case TypeKind::GenericFunction: // Not yet supported.
+    case TypeKind::SILBlockStorage: // Not supported at all.
+    case TypeKind::SILBox:
+      return false;
+    case TypeKind::InOut: {
+      auto *ObjectTy = Ty->castTo<InOutType>()->getObjectType().getPointer();
+      return canMangle(ObjectTy);
+    }
+    default:
+      return true;
+    }
+  }
+
+  llvm::DIType *getTypeOrNull(TypeBase *Ty) {
+    auto CachedType = DITypeCache.find(Ty);
+    if (CachedType != DITypeCache.end()) {
+      // Verify that the information still exists.
+      if (llvm::Metadata *Val = CachedType->second) {
+        auto DITy = cast<llvm::DIType>(Val);
+        return DITy;
+      }
+    }
+    return nullptr;
+  }
+
+  llvm::DIType *getOrCreateType(DebugTypeInfo DbgTy) {
+    // Is this an empty type?
+    if (DbgTy.isNull())
+      // We can't use the empty type as an index into DenseMap.
+      return createType(DbgTy, "", TheCU, MainFile);
+
+    // Look in the cache first.
+    if (auto *DITy = getTypeOrNull(DbgTy.getType()))
+      return DITy;
+
+    // Second line of defense: Look up the mangled name. TypeBase*'s are
+    // not necessarily unique, but name mangling is too expensive to do
+    // every time.
+    StringRef MangledName;
+    llvm::MDString *UID = nullptr;
+    if (canMangle(DbgTy.getType())) {
+      MangledName = getMangledName(DbgTy);
+      UID = llvm::MDString::get(IGM.getLLVMContext(), MangledName);
+      if (llvm::Metadata *CachedTy = DIRefMap.lookup(UID)) {
+        auto DITy = cast<llvm::DIType>(CachedTy);
+        return DITy;
+      }
+    }
+
+    // Retrieve the context of the type, as opposed to the DeclContext
+    // of the variable.
+    //
+    // FIXME: Builtin and qualified types in LLVM have no parent
+    // scope. TODO: This can be fixed by extending DIBuilder.
+    llvm::DIScope *Scope = nullptr;
+    DeclContext *Context = DbgTy.getType()->getNominalOrBoundGenericNominal();
+    if (Context) {
+      if (auto *D = Context->getAsNominalTypeOrNominalTypeExtensionContext())
+        if (auto *ClangDecl = D->getClangDecl()) {
+          clang::ASTReader &Reader = *CI.getClangInstance().getModuleManager();
+          auto Idx = ClangDecl->getOwningModuleID();
+          if (auto Info = Reader.getSourceDescriptor(Idx))
+            Scope = getOrCreateModule(*Info);
+        }
+      Context = Context->getParent();
+    }
+    if (!Scope)
+      Scope = getOrCreateContext(Context);
+    llvm::DIType *DITy = createType(DbgTy, MangledName, Scope, getFile(Scope));
+
+    // Incrementally build the DIRefMap.
+    if (auto *CTy = dyn_cast<llvm::DICompositeType>(DITy)) {
+#ifndef NDEBUG
+      // Sanity check.
+      if (llvm::Metadata *V = DIRefMap.lookup(UID)) {
+        auto *CachedTy = cast<llvm::DIType>(V);
+        assert(CachedTy == DITy && "conflicting types for one UID");
+      }
+#endif
+      // If this type supports a UID, enter it to the cache.
+      if (auto UID = CTy->getRawIdentifier()) {
+        assert(UID->getString() == MangledName &&
+               "Unique identifier is different from mangled name ");
+        DIRefMap[UID] = llvm::TrackingMDNodeRef(DITy);
+      }
+    }
+
+    // Store it in the cache.
+    DITypeCache.insert({DbgTy.getType(), llvm::TrackingMDNodeRef(DITy)});
+
+    return DITy;
+  }
+};
+
+IRGenDebugInfoImpl::IRGenDebugInfoImpl(const IRGenOptions &Opts,
+                                       ClangImporter &CI, IRGenModule &IGM,
+                                       llvm::Module &M, SourceFile *SF)
+    : Opts(Opts), CI(CI), SM(IGM.Context.SourceMgr), DBuilder(M),
+      IGM(IGM), MetadataTypeDecl(nullptr), InternalType(nullptr),
+      LastDebugLoc({}), LastScope(nullptr) {
+  assert(Opts.DebugInfoKind > IRGenDebugInfoKind::None &&
+         "no debug info should be generated");
+  StringRef SourceFileName =
+      SF ? SF->getFilename() : StringRef(Opts.MainInputFilename);
   StringRef Dir;
   llvm::SmallString<256> AbsMainFile;
   if (SourceFileName.empty())
@@ -125,7 +1490,7 @@
 
   unsigned Lang = llvm::dwarf::DW_LANG_Swift;
   std::string Producer = version::getSwiftFullVersion(
-    IGM.Context.LangOpts.EffectiveLanguageVersion);
+      IGM.Context.LangOpts.EffectiveLanguageVersion);
   bool IsOptimized = Opts.Optimize;
   StringRef Flags = Opts.DWARFDebugFlags;
   unsigned Major, Minor;
@@ -162,159 +1527,47 @@
   MainModule =
       getOrCreateModule(Opts.ModuleName, TheCU, Opts.ModuleName, AbsMainFile);
   DBuilder.createImportedModule(MainFile, MainModule, 1);
-}
 
-static StringRef getFilenameFromDC(const DeclContext *DC) {
-  if (auto LF = dyn_cast<LoadedFile>(DC))
-    return LF->getFilename();
-  if (auto SF = dyn_cast<SourceFile>(DC))
-    return SF->getFilename();
-  else if (auto M = dyn_cast<ModuleDecl>(DC))
-    return M->getModuleFilename();
-  else
-    return StringRef();
-}
-
-SILLocation::DebugLoc getDeserializedLoc(Pattern *) { return {}; }
-SILLocation::DebugLoc getDeserializedLoc(Expr *) { return {}; }
-SILLocation::DebugLoc getDeserializedLoc(Stmt *) { return {}; }
-SILLocation::DebugLoc getDeserializedLoc(Decl *D) {
-  SILLocation::DebugLoc L;
-  const DeclContext *DC = D->getDeclContext()->getModuleScopeContext();
-  StringRef Filename = getFilenameFromDC(DC);
-  if (!Filename.empty())
-    L.Filename = Filename;
-  return L;
-}
-
-/// Use the SM to figure out the actual line/column of a SourceLoc.
-template <typename WithLoc>
-SILLocation::DebugLoc getDebugLoc(IRGenDebugInfo &DI, WithLoc *S,
-                                  bool End = false) {
-  SILLocation::DebugLoc L;
-  if (S == nullptr)
-    return L;
-
-  SourceLoc Loc = End ? S->getEndLoc() : S->getStartLoc();
-  if (Loc.isInvalid())
-    // This may be a deserialized or clang-imported decl. And modules
-    // don't come with SourceLocs right now. Get at least the name of
-    // the module.
-    return getDeserializedLoc(S);
-
-  return DI.decodeSourceLoc(Loc);
-}
-
-SILLocation::DebugLoc
-IRGenDebugInfo::getStartLocation(Optional<SILLocation> OptLoc) {
-  if (!OptLoc)
-    return {};
-  return decodeSourceLoc(OptLoc->getStartSourceLoc());
-}
-
-SILLocation::DebugLoc
-IRGenDebugInfo::decodeSourceLoc(SourceLoc SL) {
-  auto &Cached = DebugLocCache[SL.getOpaquePointerValue()];
-  if (Cached.Filename.empty())
-    Cached = SILLocation::decode(SL, SM);
-  return Cached;
-}
-
-SILLocation::DebugLoc
-IRGenDebugInfo::decodeDebugLoc(SILLocation Loc) {
-  if (Loc.isDebugInfoLoc())
-    return Loc.getDebugInfoLoc();
-  return decodeSourceLoc(Loc.getDebugSourceLoc());
-}
-
-SILLocation::DebugLoc
-IRGenDebugInfo::getDebugLocation(Optional<SILLocation> OptLoc) {
-  if (!OptLoc || OptLoc->isInPrologue())
-    return {};
-
-  return decodeDebugLoc(*OptLoc);
-}
-
-
-/// Determine whether this debug scope belongs to an explicit closure.
-static bool isExplicitClosure(const SILFunction *SILFn) {
-  if (SILFn && SILFn->hasLocation())
-    if (Expr *E = SILFn->getLocation().getAsASTNode<Expr>())
-      if (isa<ClosureExpr>(E))
-        return true;
-  return false;
-}
-
-/// Determine whether this location is some kind of closure.
-static bool isAbstractClosure(const SILLocation &Loc) {
-  if (Expr *E = Loc.getAsASTNode<Expr>())
-    if (isa<AbstractClosureExpr>(E))
-      return true;
-  return false;
-}
-
-/// Both the code that is used to set up a closure object and the
-/// (beginning of) the closure itself has the AbstractClosureExpr as
-/// location. We are only interested in the latter case and want to
-/// ignore the setup code.
-///
-/// callWithClosure(
-///  { // <-- a breakpoint here should only stop inside of the closure.
-///    foo();
-///  })
-///
-/// The actual closure has a closure expression as scope.
-static bool shouldIgnoreAbstractClosure(Optional<SILLocation> Loc,
-                                        const SILDebugScope *DS) {
-  return Loc && isAbstractClosure(*Loc) && DS && !isAbstractClosure(DS->Loc) &&
-         !Loc->is<ImplicitReturnLocation>();
-}
-
-llvm::MDNode *IRGenDebugInfo::createInlinedAt(const SILDebugScope *DS) {
-  auto *CS = DS->InlinedCallSite;
-  if (!CS)
-    return nullptr;
-
-  auto CachedInlinedAt = InlinedAtCache.find(CS);
-  if (CachedInlinedAt != InlinedAtCache.end())
-    return cast<llvm::MDNode>(CachedInlinedAt->second);
-
-  auto L = decodeDebugLoc(CS->Loc);
-  auto Scope = getOrCreateScope(CS->Parent.dyn_cast<const SILDebugScope *>());
-  auto InlinedAt =
-      llvm::DebugLoc::get(L.Line, L.Column, Scope, createInlinedAt(CS));
-  InlinedAtCache.insert({CS, llvm::TrackingMDNodeRef(InlinedAt.getAsMDNode())});
-  return InlinedAt;
-}
-
-#ifndef NDEBUG
-/// Perform a couple of sanity checks on scopes.
-static bool parentScopesAreSane(const SILDebugScope *DS) {
-  auto *Parent = DS;
-  while ((Parent = Parent->Parent.dyn_cast<const SILDebugScope *>())) {
-    if (!DS->InlinedCallSite)
-      assert(!Parent->InlinedCallSite &&
-             "non-inlined scope has an inlined parent");
+  // Macro definitions that were defined by the user with "-Xcc -D" on the
+  // command line. This does not include any macros defined by ClangImporter.
+  llvm::raw_svector_ostream OS(ConfigMacros);
+  unsigned I = 0;
+  // Translate the macro definitions back into a commmand line.
+  for (auto &Macro : Opts.ClangDefines) {
+    if (++I > 1)
+      OS << ' ';
+    OS << '"';
+    for (char c : Macro)
+      switch (c) {
+      case '\\': OS << "\\\\"; break;
+      case '"':  OS << "\\\""; break;
+      default: OS << c;
+      }
+    OS << '"';
   }
-  return true;
 }
 
-bool IRGenDebugInfo::lineNumberIsSane(IRBuilder &Builder, unsigned Line) {
-  if (IGM.IRGen.Opts.Optimize)
-    return true;
+void IRGenDebugInfoImpl::finalize() {
+  assert(LocationStack.empty() && "Mismatch of pushLoc() and popLoc().");
 
-  // Assert monotonically increasing line numbers within the same basic block;
-  llvm::BasicBlock *CurBasicBlock = Builder.GetInsertBlock();
-  if (CurBasicBlock == LastBasicBlock) {
-    return Line >= LastDebugLoc.Line;
+  // Finalize all replaceable forward declarations.
+  for (auto &Ty : ReplaceMap) {
+    llvm::TempMDNode FwdDecl(cast<llvm::MDNode>(Ty.second));
+    llvm::Metadata *Replacement;
+    if (auto *FullType = getTypeOrNull(Ty.first))
+      Replacement = FullType;
+    else
+      Replacement = Ty.second;
+    DBuilder.replaceTemporary(std::move(FwdDecl),
+                              cast<llvm::MDNode>(Replacement));
   }
-  LastBasicBlock = CurBasicBlock;
-  return true;
+  // Finalize the DIBuilder.
+  DBuilder.finalize();
 }
-#endif
 
-void IRGenDebugInfo::setCurrentLoc(IRBuilder &Builder, const SILDebugScope *DS,
-                                   Optional<SILLocation> Loc) {
+void IRGenDebugInfoImpl::setCurrentLoc(IRBuilder &Builder,
+                                       const SILDebugScope *DS,
+                                       Optional<SILLocation> Loc) {
   assert(DS && "empty scope");
   auto *Scope = getOrCreateScope(DS);
   if (!Scope)
@@ -344,10 +1597,11 @@
     auto File = getOrCreateFile(L.Filename);
     Scope = DBuilder.createLexicalBlockFile(Scope, File);
   }
-  
+
   // FIXME: Enable this assertion.
-  //assert(lineNumberIsSane(Builder, L.Line) &&
-  //       "-Onone, but line numbers are not monotonically increasing within bb");
+  // assert(lineNumberIsSane(Builder, L.Line) &&
+  //       "-Onone, but line numbers are not monotonically increasing within
+  //       bb");
   LastDebugLoc = L;
   LastScope = DS;
 
@@ -358,12 +1612,49 @@
   Builder.SetCurrentDebugLocation(DL);
 }
 
-void IRGenDebugInfo::setEntryPointLoc(IRBuilder &Builder) {
+void IRGenDebugInfoImpl::clearLoc(IRBuilder &Builder) {
+  LastDebugLoc = {};
+  LastScope = nullptr;
+  Builder.SetCurrentDebugLocation(llvm::DebugLoc());
+}
+
+/// Push the current debug location onto a stack and initialize the
+/// IRBuilder to an empty location.
+void IRGenDebugInfoImpl::pushLoc() {
+  LocationStack.push_back(std::make_pair(LastDebugLoc, LastScope));
+  LastDebugLoc = {};
+  LastScope = nullptr;
+}
+
+/// Restore the current debug location from the stack.
+void IRGenDebugInfoImpl::popLoc() {
+  std::tie(LastDebugLoc, LastScope) = LocationStack.pop_back_val();
+}
+
+/// Emit the final line 0 location for the unified trap block at the
+/// end of the function.
+void IRGenDebugInfoImpl::setArtificialTrapLocation(IRBuilder &Builder,
+                                                   const SILDebugScope *Scope) {
+  auto DL = llvm::DebugLoc::get(0, 0, getOrCreateScope(Scope));
+  Builder.SetCurrentDebugLocation(DL);
+}
+
+void IRGenDebugInfoImpl::setEntryPointLoc(IRBuilder &Builder) {
   auto DL = llvm::DebugLoc::get(0, 0, getEntryPointFn(), nullptr);
   Builder.SetCurrentDebugLocation(DL);
 }
 
-llvm::DIScope *IRGenDebugInfo::getOrCreateScope(const SILDebugScope *DS) {
+llvm::DIScope *IRGenDebugInfoImpl::getEntryPointFn() {
+  // Lazily create EntryPointFn.
+  if (!EntryPointFn) {
+    EntryPointFn = DBuilder.createReplaceableCompositeType(
+        llvm::dwarf::DW_TAG_subroutine_type, SWIFT_ENTRY_POINT_FUNCTION,
+        MainFile, MainFile, 0);
+  }
+  return EntryPointFn;
+}
+
+llvm::DIScope *IRGenDebugInfoImpl::getOrCreateScope(const SILDebugScope *DS) {
   if (DS == nullptr)
     return MainFile;
 
@@ -413,226 +1704,38 @@
   return DScope;
 }
 
-llvm::DIFile *IRGenDebugInfo::getOrCreateFile(StringRef Filename) {
-  if (Filename.empty())
-    return MainFile;
+void IRGenDebugInfoImpl::emitImport(ImportDecl *D) {
+  if (Opts.DebugInfoKind <= IRGenDebugInfoKind::LineTables)
+    return;
 
-  // Look in the cache first.
-  auto CachedFile = DIFileCache.find(Filename);
-  if (CachedFile != DIFileCache.end()) {
-    // Verify that the information still exists.
-    if (llvm::Metadata *V = CachedFile->second)
-      return cast<llvm::DIFile>(V);
+  swift::ModuleDecl *M = IGM.Context.getModule(D->getModulePath());
+  if (!M &&
+      D->getModulePath()[0].first == IGM.Context.TheBuiltinModule->getName())
+    M = IGM.Context.TheBuiltinModule;
+  if (!M) {
+    assert(M && "Could not find module for import decl.");
+    return;
   }
-
-  // Detect the main file.
-  if (MainFile && Filename.endswith(MainFile->getFilename())) {
-    SmallString<256> AbsThisFile, AbsMainFile;
-    AbsThisFile = Filename;
-    llvm::sys::fs::make_absolute(AbsThisFile);
-    llvm::sys::path::append(AbsMainFile, MainFile->getDirectory(),
-                            MainFile->getFilename());
-    if (AbsThisFile == AbsMainFile) {
-      DIFileCache[Filename] = llvm::TrackingMDNodeRef(MainFile);
-      return MainFile;
-    }
-  }
-  
-  // Create a new one.
-  StringRef File = llvm::sys::path::filename(Filename);
-  llvm::SmallString<512> Path(Filename);
-  llvm::sys::path::remove_filename(Path);
-  llvm::DIFile *F = DBuilder.createFile(File, Path);
-
-  // Cache it.
-  DIFileCache[Filename] = llvm::TrackingMDNodeRef(F);
-  return F;
+  auto DIMod = getOrCreateModule({D->getModulePath(), M});
+  auto L = getDebugLoc(*this, D);
+  DBuilder.createImportedModule(getOrCreateFile(L.Filename), DIMod, L.Line);
 }
 
-StringRef IRGenDebugInfo::getName(const FuncDecl &FD) {
-  // Getters and Setters are anonymous functions, so we forge a name
-  // using its parent declaration.
-  if (FD.isAccessor())
-    if (ValueDecl *VD = FD.getAccessorStorageDecl()) {
-      const char *Kind;
-      switch (FD.getAccessorKind()) {
-      case AccessorKind::NotAccessor: llvm_unreachable("this is an accessor");
-      case AccessorKind::IsGetter: Kind = ".get"; break;
-      case AccessorKind::IsSetter: Kind = ".set"; break;
-      case AccessorKind::IsWillSet: Kind = ".willset"; break;
-      case AccessorKind::IsDidSet: Kind = ".didset"; break;
-      case AccessorKind::IsMaterializeForSet: Kind = ".materialize"; break;
-      case AccessorKind::IsAddressor: Kind = ".addressor"; break;
-      case AccessorKind::IsMutableAddressor: Kind = ".mutableAddressor"; break;
-      }
-
-      SmallVector<char, 64> Buf;
-      StringRef Name = (VD->getName().str() + Twine(Kind)).toStringRef(Buf);
-      return BumpAllocatedString(Name);
-    }
-
-  if (FD.hasName())
-    return FD.getName().str();
-
-  return StringRef();
-}
-
-StringRef IRGenDebugInfo::getName(SILLocation L) {
-  if (L.isNull())
-    return StringRef();
-
-  if (FuncDecl *FD = L.getAsASTNode<FuncDecl>())
-    return getName(*FD);
-
-  if (L.isASTNode<ConstructorDecl>())
-    return "init";
-
-  if (L.isASTNode<DestructorDecl>())
-    return "deinit";
-
-  return StringRef();
-}
-
-static CanSILFunctionType getFunctionType(SILType SILTy) {
-  if (!SILTy)
-    return CanSILFunctionType();
-
-  auto FnTy = SILTy.getAs<SILFunctionType>();
-  if (!FnTy) {
-    DEBUG(llvm::dbgs() << "Unexpected function type: "; SILTy.dump();
-          llvm::dbgs() << "\n");
-    return CanSILFunctionType();
-  }
-
-  return FnTy;
-}
-
-llvm::DIScope *IRGenDebugInfo::getEntryPointFn() {
-  // Lazily create EntryPointFn.
-  if (!EntryPointFn) {
-    EntryPointFn = DBuilder.createReplaceableCompositeType(
-      llvm::dwarf::DW_TAG_subroutine_type, SWIFT_ENTRY_POINT_FUNCTION,
-        MainFile, MainFile, 0);
-  }
-  return EntryPointFn;
-}
-
-
-llvm::DIScope *IRGenDebugInfo::getOrCreateContext(DeclContext *DC) {
-  if (!DC)
-    return TheCU;
-
-  if (isa<FuncDecl>(DC))
-    if (auto *Decl = IGM.getSILModule().lookUpFunction(
-          SILDeclRef(cast<AbstractFunctionDecl>(DC), SILDeclRef::Kind::Func)))
-      return getOrCreateScope(Decl->getDebugScope());
-
-  switch (DC->getContextKind()) {
-  // The interesting cases are already handled above.
-  case DeclContextKind::AbstractFunctionDecl:
-  case DeclContextKind::AbstractClosureExpr:
-
-  // We don't model these in DWARF.
-  case DeclContextKind::SerializedLocal:
-  case DeclContextKind::Initializer:
-  case DeclContextKind::ExtensionDecl:
-  case DeclContextKind::SubscriptDecl:
-  case DeclContextKind::TopLevelCodeDecl:
-    return getOrCreateContext(DC->getParent());
-
-  case DeclContextKind::Module:
-    return getOrCreateModule({ModuleDecl::AccessPathTy(), cast<ModuleDecl>(DC)});
-  case DeclContextKind::FileUnit:
-    // A module may contain multiple files.
-    return getOrCreateContext(DC->getParent());
-  case DeclContextKind::GenericTypeDecl: {
-    auto *NTD = cast<NominalTypeDecl>(DC);
-    auto *Ty = NTD->getDeclaredType().getPointer();
-    if (auto *DITy = getTypeOrNull(Ty))
-      return DITy;
-
-    // Create a Forward-declared type.
-    auto Loc = getDebugLoc(*this, NTD);
-    auto File = getOrCreateFile(Loc.Filename);
-    auto Line = Loc.Line;
-    auto FwdDecl = DBuilder.createReplaceableCompositeType(
-        llvm::dwarf::DW_TAG_structure_type, NTD->getName().str(),
-        getOrCreateContext(DC->getParent()), File, Line,
-        llvm::dwarf::DW_LANG_Swift, 0, 0);
-    ReplaceMap.emplace_back(
-        std::piecewise_construct, std::make_tuple(Ty),
-        std::make_tuple(static_cast<llvm::Metadata *>(FwdDecl)));
-    return FwdDecl;
-  }
-  }
-  return TheCU;
-}
-
-void IRGenDebugInfo::createParameterType(
-    llvm::SmallVectorImpl<llvm::Metadata *> &Parameters, SILType type,
-      DeclContext *DeclCtx, GenericEnvironment *GE) {
-  auto RealType = type.getSwiftRValueType();
-  if (type.isAddress())
-    RealType = CanInOutType::get(RealType);
-  auto DbgTy = DebugTypeInfo::getFromTypeInfo(DeclCtx, GE, RealType,
-                                              IGM.getTypeInfo(type));
-  Parameters.push_back(getOrCreateType(DbgTy));
-}
-
-// This is different from SILFunctionType::getAllResultsType() in some subtle
-// ways.
-static SILType getResultTypeForDebugInfo(CanSILFunctionType fnTy) {
-  if (fnTy->getNumResults() == 1) {
-    return fnTy->getResults()[0].getSILStorageType();
-  } else if (!fnTy->getNumIndirectFormalResults()) {
-    return fnTy->getDirectFormalResultsType();
-  } else {
-    SmallVector<TupleTypeElt, 4> eltTys;
-    for (auto &result : fnTy->getResults()) {
-      eltTys.push_back(result.getType());
-    }
-    return SILType::getPrimitiveAddressType(
-      CanType(TupleType::get(eltTys, fnTy->getASTContext())));
-  }
-}
-
-llvm::DITypeRefArray
-IRGenDebugInfo::createParameterTypes(SILType SILTy, DeclContext *DeclCtx,
-                                     GenericEnvironment *GE) {
-  if (!SILTy)
-    return nullptr;
-  return createParameterTypes(SILTy.castTo<SILFunctionType>(), DeclCtx, GE);
-}
-
-llvm::DITypeRefArray IRGenDebugInfo::createParameterTypes(
-    CanSILFunctionType FnTy, DeclContext *DeclCtx, GenericEnvironment *GE) {
-  SmallVector<llvm::Metadata *, 16> Parameters;
-
-  GenericContextScope scope(IGM, FnTy->getGenericSignature());
-
-  // The function return type is the first element in the list.
-  createParameterType(Parameters, getResultTypeForDebugInfo(FnTy), DeclCtx, GE);
-
-  // Actually, the input type is either a single type or a tuple
-  // type. We currently represent a function with one n-tuple argument
-  // as an n-ary function.
-  for (auto Param : FnTy->getParameters())
-    createParameterType(Parameters, IGM.silConv.getSILType(Param), DeclCtx, GE);
-
-  return DBuilder.getOrCreateTypeArray(Parameters);
-}
-
-/// FIXME: replace this condition with something more sane.
-static bool isAllocatingConstructor(SILFunctionTypeRepresentation Rep,
-                                    DeclContext *DeclCtx) {
-  return Rep != SILFunctionTypeRepresentation::Method
-          && DeclCtx && isa<ConstructorDecl>(DeclCtx);
+llvm::DISubprogram *IRGenDebugInfoImpl::emitFunction(SILFunction &SILFn,
+                                                     llvm::Function *Fn) {
+  auto *DS = SILFn.getDebugScope();
+  assert(DS && "SIL function has no debug scope");
+  (void)DS;
+  return emitFunction(SILFn.getDebugScope(), Fn, SILFn.getRepresentation(),
+                      SILFn.getLoweredType(), SILFn.getDeclContext(),
+                      SILFn.getGenericEnvironment());
 }
 
 llvm::DISubprogram *
-IRGenDebugInfo::emitFunction(const SILDebugScope *DS, llvm::Function *Fn,
-                             SILFunctionTypeRepresentation Rep, SILType SILTy,
-                             DeclContext *DeclCtx, GenericEnvironment *GE) {
+IRGenDebugInfoImpl::emitFunction(const SILDebugScope *DS, llvm::Function *Fn,
+                                 SILFunctionTypeRepresentation Rep,
+                                 SILType SILTy, DeclContext *DeclCtx,
+                                 GenericEnvironment *GE) {
   auto Cached = ScopeCache.find(LocalScope(DS));
   if (Cached != ScopeCache.end()) {
     auto SP = cast<llvm::DISubprogram>(Cached->second);
@@ -645,7 +1748,7 @@
 
   // Some IRGen-generated helper functions don't have a corresponding
   // SIL function, hence the dyn_cast.
-  SILFunction *SILFn = DS ? DS->Parent.dyn_cast<SILFunction *>() : nullptr;
+  auto *SILFn = DS ? DS->Parent.dyn_cast<SILFunction *>() : nullptr;
   StringRef LinkageName;
   if (Fn)
     LinkageName = Fn->getName();
@@ -718,8 +1821,8 @@
     ScopeLine = 0;
   }
 
-  if (FnTy && FnTy->getRepresentation()
-        == SILFunctionType::Representation::Block)
+  if (FnTy &&
+      FnTy->getRepresentation() == SILFunctionType::Representation::Block)
     Flags |= llvm::DINode::FlagAppleBlock;
 
   // Get the throws information.
@@ -758,138 +1861,16 @@
   return SP;
 }
 
-void IRGenDebugInfo::emitImport(ImportDecl *D) {
-  if (Opts.DebugInfoKind <= IRGenDebugInfoKind::LineTables)
-    return;
-
-  swift::ModuleDecl *M = IGM.Context.getModule(D->getModulePath());
-  if (!M &&
-      D->getModulePath()[0].first == IGM.Context.TheBuiltinModule->getName())
-    M = IGM.Context.TheBuiltinModule;
-  if (!M) {
-    assert(M && "Could not find module for import decl.");
-    return;
-  }
-  auto DIMod = getOrCreateModule({D->getModulePath(), M});
-  auto L = getDebugLoc(*this, D);
-  DBuilder.createImportedModule(getOrCreateFile(L.Filename), DIMod, L.Line);
-}
-
-llvm::DIModule *
-IRGenDebugInfo::getOrCreateModule(ModuleDecl::ImportedModule M) {
-  StringRef Path = getFilenameFromDC(M.second);
-  if (M.first.empty()) {
-    StringRef Name = M.second->getName().str();
-    return getOrCreateModule(Name, TheCU, Name, Path);
-  }
-
-  unsigned I = 0;
-  SmallString<128> AccessPath;
-  llvm::DIScope *Scope = TheCU;
-  llvm::raw_svector_ostream OS(AccessPath);
-  for (auto elt : M.first) {
-    auto Component = elt.first.str();
-    if (++I > 1)
-      OS << '.';
-    OS << Component;
-    Scope = getOrCreateModule(AccessPath, Scope, Component, Path);
-  }
-  return cast<llvm::DIModule>(Scope);
-}
-
-llvm::DIModule *IRGenDebugInfo::getOrCreateModule(StringRef Key,
-                                                  llvm::DIScope *Parent,
-                                                  StringRef Name,
-                                                  StringRef IncludePath) {
-  // Look in the cache first.
-  auto Val = DIModuleCache.find(Key);
-  if (Val != DIModuleCache.end())
-    return cast<llvm::DIModule>(Val->second);
-
-  StringRef ConfigMacros;
-  StringRef Sysroot = IGM.Context.SearchPathOpts.SDKPath;
-  auto M =
-      DBuilder.createModule(Parent, Name, ConfigMacros, IncludePath, Sysroot);
-  DIModuleCache.insert({Key, llvm::TrackingMDNodeRef(M)});
-  return M;
-}
-
-llvm::DISubprogram *IRGenDebugInfo::emitFunction(SILFunction &SILFn,
-                                                 llvm::Function *Fn) {
-  auto *DS = SILFn.getDebugScope();
-  assert(DS && "SIL function has no debug scope");
-  (void) DS;
-  return emitFunction(SILFn.getDebugScope(), Fn, SILFn.getRepresentation(),
-                      SILFn.getLoweredType(), SILFn.getDeclContext(),
-                      SILFn.getGenericEnvironment());
-}
-
-void IRGenDebugInfo::emitArtificialFunction(IRBuilder &Builder,
-                                            llvm::Function *Fn, SILType SILTy) {
+void IRGenDebugInfoImpl::emitArtificialFunction(IRBuilder &Builder,
+                                                llvm::Function *Fn,
+                                                SILType SILTy) {
   RegularLocation ALoc = RegularLocation::getAutoGeneratedLocation();
   const SILDebugScope *Scope = new (IGM.getSILModule()) SILDebugScope(ALoc);
   emitFunction(Scope, Fn, SILFunctionTypeRepresentation::Thin, SILTy);
   setCurrentLoc(Builder, Scope);
 }
 
-TypeAliasDecl *IRGenDebugInfo::getMetadataType() {
-  if (!MetadataTypeDecl) {
-    MetadataTypeDecl = new (IGM.Context) TypeAliasDecl(
-        SourceLoc(), SourceLoc(),
-        IGM.Context.getIdentifier("$swift.type"), SourceLoc(),
-        /*genericparams*/nullptr, IGM.Context.TheBuiltinModule);
-    MetadataTypeDecl->setUnderlyingType(IGM.Context.TheRawPointerType);
-  }
-  return MetadataTypeDecl;
-}
-
-void IRGenDebugInfo::emitTypeMetadata(IRGenFunction &IGF,
-                                      llvm::Value *Metadata,
-                                      StringRef Name) {
-  if (Opts.DebugInfoKind <= IRGenDebugInfoKind::LineTables)
-    return;
-
-  auto TName = BumpAllocatedString(("$swift.type." + Name).str());
-  auto DbgTy = DebugTypeInfo::getMetadata(
-      getMetadataType()->getDeclaredInterfaceType().getPointer(),
-      Metadata->getType(), Size(CI.getTargetInfo().getPointerWidth(0)),
-      Alignment(CI.getTargetInfo().getPointerAlign(0)));
-  emitVariableDeclaration(IGF.Builder, Metadata, DbgTy, IGF.getDebugScope(),
-                          nullptr, TName, 0,
-                          // swift.type is already a pointer type,
-                          // having a shadow copy doesn't add another
-                          // layer of indirection.
-                          DirectValue, ArtificialValue);
-}
-
-/// Return the DIFile that is the ancestor of Scope.
-llvm::DIFile *IRGenDebugInfo::getFile(llvm::DIScope *Scope) {
-  while (!isa<llvm::DIFile>(Scope)) {
-    switch (Scope->getTag()) {
-    case llvm::dwarf::DW_TAG_lexical_block:
-      Scope = cast<llvm::DILexicalBlock>(Scope)->getScope();
-      break;
-    case llvm::dwarf::DW_TAG_subprogram:
-      Scope = cast<llvm::DISubprogram>(Scope)->getFile();
-      break;
-    default:
-      return MainFile;
-    }
-    if (Scope)
-      return MainFile;
-  }
-  return cast<llvm::DIFile>(Scope);
-}
-
-static Size
-getStorageSize(const llvm::DataLayout &DL, ArrayRef<llvm::Value *> Storage) {
-  unsigned size = 0;
-  for (llvm::Value *Piece : Storage)
-    size += DL.getTypeSizeInBits(Piece->getType());
-  return Size(size);
-}
-
-void IRGenDebugInfo::emitVariableDeclaration(
+void IRGenDebugInfoImpl::emitVariableDeclaration(
     IRBuilder &Builder, ArrayRef<llvm::Value *> Storage, DebugTypeInfo DbgTy,
     const SILDebugScope *DS, ValueDecl *VarDecl, StringRef Name, unsigned ArgNo,
     IndirectionKind Indirection, ArtificialKind Artificial) {
@@ -905,8 +1886,8 @@
   if (Opts.DebugInfoKind <= IRGenDebugInfoKind::LineTables)
     return;
 
-  // Currently, the DeclContext is needed to mangle archetypes. Bail out if it's
-  // missing.
+  // Currently, the DeclContext is needed to mangle archetypes. Bail out if
+  // it's missing.
   if (DbgTy.Type->hasArchetype() && !DbgTy.DeclCtx)
     return;
 
@@ -937,11 +1918,10 @@
   bool Optimized = false;
   // Create the descriptor for the variable.
   llvm::DILocalVariable *Var =
-      (ArgNo > 0)
-          ? DBuilder.createParameterVariable(Scope, Name, ArgNo, Unit, Line,
-                                             DITy, Optimized, Flags)
-          : DBuilder.createAutoVariable(Scope, Name, Unit, Line, DITy,
-                                        Optimized, Flags);
+      (ArgNo > 0) ? DBuilder.createParameterVariable(
+                        Scope, Name, ArgNo, Unit, Line, DITy, Optimized, Flags)
+                  : DBuilder.createAutoVariable(Scope, Name, Unit, Line, DITy,
+                                                Optimized, Flags);
 
   // Running variables for the current/previous piece.
   bool IsPiece = Storage.size() > 1;
@@ -955,8 +1935,8 @@
     if (Indirection)
       Operands.push_back(llvm::dwarf::DW_OP_deref);
 
-    // There are variables without storage, such as "struct { func foo() {} }".
-    // Emit them as constant 0.
+    // There are variables without storage, such as "struct { func foo() {}
+    // }". Emit them as constant 0.
     if (isa<llvm::UndefValue>(Piece))
       Piece = llvm::ConstantInt::get(IGM.Int64Ty, 0);
 
@@ -971,7 +1951,7 @@
       // Sanity checks.
       assert(SizeInBits && "zero-sized piece");
       assert(SizeInBits < getSizeInBits(Var) && "piece covers entire var");
-      assert(OffsetInBits+SizeInBits <= getSizeInBits(Var) && "pars > totum");
+      assert(OffsetInBits + SizeInBits <= getSizeInBits(Var) && "pars > totum");
 
       // Add the piece DWARF expression.
       Operands.push_back(llvm::dwarf::DW_OP_LLVM_fragment);
@@ -988,11 +1968,10 @@
                      DBuilder.createExpression(), Line, Loc.Column, Scope, DS);
 }
 
-void IRGenDebugInfo::emitDbgIntrinsic(IRBuilder &Builder, llvm::Value *Storage,
-                                      llvm::DILocalVariable *Var,
-                                      llvm::DIExpression *Expr, unsigned Line,
-                                      unsigned Col, llvm::DILocalScope *Scope,
-                                      const SILDebugScope *DS) {
+void IRGenDebugInfoImpl::emitDbgIntrinsic(
+    IRBuilder &Builder, llvm::Value *Storage, llvm::DILocalVariable *Var,
+    llvm::DIExpression *Expr, unsigned Line, unsigned Col,
+    llvm::DILocalScope *Scope, const SILDebugScope *DS) {
   // Set the location/scope of the intrinsic.
   auto *InlinedAt = createInlinedAt(DS);
   auto DL = llvm::DebugLoc::get(Line, Col, Scope, InlinedAt);
@@ -1001,7 +1980,7 @@
   // An alloca may only be described by exactly one dbg.declare.
   if (isa<llvm::AllocaInst>(Storage) && llvm::FindAllocaDbgDeclare(Storage))
     return;
-  
+
   // A dbg.declare is only meaningful if there is a single alloca for
   // the variable that is live throughout the function. With SIL
   // optimizations this is not guaranteed and a variable can end up in
@@ -1016,7 +1995,7 @@
     auto InsPt = std::next(I->getIterator());
     auto E = I->getParent()->end();
     while (InsPt != E && isa<llvm::PHINode>(&*InsPt))
-        ++InsPt;
+      ++InsPt;
     if (InsPt != E) {
       DBuilder.insertDbgValueIntrinsic(Storage, 0, Var, Expr, DL, &*InsPt);
       return;
@@ -1027,7 +2006,7 @@
   DBuilder.insertDbgValueIntrinsic(Storage, 0, Var, Expr, DL, BB);
 }
 
-void IRGenDebugInfo::emitGlobalVariableDeclaration(
+void IRGenDebugInfoImpl::emitGlobalVariableDeclaration(
     llvm::GlobalVariable *Var, StringRef Name, StringRef LinkageName,
     DebugTypeInfo DbgTy, bool IsLocalToUnit, Optional<SILLocation> Loc) {
   if (Opts.DebugInfoKind <= IRGenDebugInfoKind::LineTables)
@@ -1052,853 +2031,169 @@
     Var->addDebugInfo(GV);
 }
 
-StringRef IRGenDebugInfo::getMangledName(DebugTypeInfo DbgTy) {
-  if (MetadataTypeDecl && DbgTy.getDecl() == MetadataTypeDecl)
-    return BumpAllocatedString(DbgTy.getDecl()->getName().str());
-  
-  Mangle::ASTMangler Mangler;
-  std::string Name = Mangler.mangleTypeForDebugger(
-      DbgTy.getType(), DbgTy.getDeclContext(), DbgTy.getGenericEnvironment());
-  return BumpAllocatedString(Name);
+void IRGenDebugInfoImpl::emitTypeMetadata(IRGenFunction &IGF,
+                                          llvm::Value *Metadata,
+                                          StringRef Name) {
+  if (Opts.DebugInfoKind <= IRGenDebugInfoKind::LineTables)
+    return;
+
+  auto TName = BumpAllocatedString(("$swift.type." + Name).str());
+  auto DbgTy = DebugTypeInfo::getMetadata(
+      getMetadataType()->getDeclaredInterfaceType().getPointer(),
+      Metadata->getType(), Size(CI.getTargetInfo().getPointerWidth(0)),
+      Alignment(CI.getTargetInfo().getPointerAlign(0)));
+  emitVariableDeclaration(IGF.Builder, Metadata, DbgTy, IGF.getDebugScope(),
+                          nullptr, TName, 0,
+                          // swift.type is already a pointer type,
+                          // having a shadow copy doesn't add another
+                          // layer of indirection.
+                          DirectValue, ArtificialValue);
 }
 
-llvm::DIDerivedType *
-IRGenDebugInfo::createMemberType(DebugTypeInfo DbgTy, StringRef Name,
-                                 unsigned &OffsetInBits, llvm::DIScope *Scope,
-                                 llvm::DIFile *File,
-                                 llvm::DINode::DIFlags Flags) {
-  unsigned SizeOfByte = CI.getTargetInfo().getCharWidth();
-  auto *Ty = getOrCreateType(DbgTy);
-  auto *DITy = DBuilder.createMemberType(Scope, Name, File, 0,
-                                         SizeOfByte * DbgTy.size.getValue(), 0,
-                                         OffsetInBits, Flags, Ty);
-  OffsetInBits += getSizeInBits(Ty);
-  OffsetInBits =
-      llvm::alignTo(OffsetInBits, SizeOfByte * DbgTy.align.getValue());
-  return DITy;
+SILLocation::DebugLoc IRGenDebugInfoImpl::decodeSourceLoc(SourceLoc SL) {
+  auto &Cached = DebugLocCache[SL.getOpaquePointerValue()];
+  if (Cached.Filename.empty())
+    Cached = SILLocation::decode(SL, SM);
+  return Cached;
 }
 
-llvm::DINodeArray IRGenDebugInfo::getTupleElements(
-    TupleType *TupleTy, llvm::DIScope *Scope, llvm::DIFile *File,
-    llvm::DINode::DIFlags Flags, DeclContext *DeclContext,
-    GenericEnvironment *GE, unsigned &SizeInBits) {
-  SmallVector<llvm::Metadata *, 16> Elements;
-  unsigned OffsetInBits = 0;
-  auto genericSig = IGM.getSILTypes().getCurGenericContext();
-  for (auto ElemTy : TupleTy->getElementTypes()) {
-    auto &elemTI = IGM.getTypeInfoForUnlowered(
-        AbstractionPattern(genericSig, ElemTy->getCanonicalType()), ElemTy);
-    auto DbgTy =
-        DebugTypeInfo::getFromTypeInfo(DeclContext, GE, ElemTy, elemTI);
-    Elements.push_back(
-        createMemberType(DbgTy, StringRef(), OffsetInBits, Scope, File, Flags));
-  }
-  SizeInBits = OffsetInBits;
-  return DBuilder.getOrCreateArray(Elements);
+} // anonymous namespace
+
+IRGenDebugInfo *IRGenDebugInfo::createIRGenDebugInfo(const IRGenOptions &Opts,
+                                                     ClangImporter &CI,
+                                                     IRGenModule &IGM,
+                                                     llvm::Module &M,
+                                                     SourceFile *SF) {
+  return new IRGenDebugInfoImpl(Opts, CI, IGM, M, SF);
 }
 
-llvm::DINodeArray IRGenDebugInfo::getStructMembers(
-    NominalTypeDecl *D, Type BaseTy, llvm::DIScope *Scope, llvm::DIFile *File,
-    llvm::DINode::DIFlags Flags, unsigned &SizeInBits) {
-  SmallVector<llvm::Metadata *, 16> Elements;
-  unsigned OffsetInBits = 0;
-  for (VarDecl *VD : D->getStoredProperties()) {
-    auto memberTy =
-        BaseTy->getTypeOfMember(IGM.getSwiftModule(), VD, nullptr);
-
-    auto DbgTy = DebugTypeInfo::getFromTypeInfo(
-        VD->getDeclContext(),
-        VD->getDeclContext()->getGenericEnvironmentOfContext(),
-        VD->getInterfaceType(),
-        IGM.getTypeInfoForUnlowered(IGM.getSILTypes().getAbstractionPattern(VD),
-                                    memberTy));
-    Elements.push_back(createMemberType(DbgTy, VD->getName().str(),
-                                        OffsetInBits, Scope, File, Flags));
-  }
-  if (OffsetInBits > SizeInBits)
-    SizeInBits = OffsetInBits;
-  return DBuilder.getOrCreateArray(Elements);
-}
-
-llvm::DICompositeType *IRGenDebugInfo::createStructType(
-    DebugTypeInfo DbgTy, NominalTypeDecl *Decl, Type BaseTy,
-    llvm::DIScope *Scope, llvm::DIFile *File, unsigned Line,
-    unsigned SizeInBits, unsigned AlignInBits, llvm::DINode::DIFlags Flags,
-    llvm::DIType *DerivedFrom, unsigned RuntimeLang, StringRef UniqueID) {
-  StringRef Name = Decl->getName().str();
-
-  // Forward declare this first because types may be recursive.
-  auto FwdDecl = llvm::TempDIType(
-    DBuilder.createReplaceableCompositeType(
-      llvm::dwarf::DW_TAG_structure_type, Name, Scope, File, Line,
-        llvm::dwarf::DW_LANG_Swift, SizeInBits, 0, Flags, UniqueID));
-
-#ifndef NDEBUG
-  if (UniqueID.empty())
-    assert(!Name.empty() && "no mangled name and no human readable name given");
-  else
-    assert((UniqueID.startswith("_T") ||
-              UniqueID.startswith(MANGLING_PREFIX_STR)) &&
-           "UID is not a mangled name");
-#endif
-
-  auto TH = llvm::TrackingMDNodeRef(FwdDecl.get());
-  DITypeCache[DbgTy.getType()] = TH;
-  auto Members = getStructMembers(Decl, BaseTy, Scope, File, Flags, SizeInBits);
-  auto DITy = DBuilder.createStructType(
-      Scope, Name, File, Line, SizeInBits, AlignInBits, Flags, DerivedFrom,
-      Members, RuntimeLang, nullptr, UniqueID);
-  DBuilder.replaceTemporary(std::move(FwdDecl), DITy);
-  return DITy;
-}
-
-llvm::DINodeArray IRGenDebugInfo::getEnumElements(DebugTypeInfo DbgTy,
-                                                  EnumDecl *ED,
-                                                  llvm::DIScope *Scope,
-                                                  llvm::DIFile *File,
-                                                  llvm::DINode::DIFlags Flags) {
-  SmallVector<llvm::Metadata *, 16> Elements;
-
-  for (auto *ElemDecl : ED->getAllElements()) {
-    // FIXME <rdar://problem/14845818> Support enums.
-    // Swift Enums can be both like DWARF enums and discriminated unions.
-    DebugTypeInfo ElemDbgTy;
-    if (ED->hasRawType())
-      // An enum with a raw type (enum E : Int {}), similar to a
-      // DWARF enum.
-      //
-      // The storage occupied by the enum may be smaller than the
-      // one of the raw type as long as it is large enough to hold
-      // all enum values. Use the raw type for the debug type, but
-      // the storage size from the enum.
-      ElemDbgTy =
-          DebugTypeInfo(ED, DbgTy.getGenericEnvironment(), ED->getRawType(),
-                        DbgTy.StorageType, DbgTy.size, DbgTy.align, true);
-    else if (auto ArgTy = ElemDecl->getArgumentInterfaceType()) {
-      // A discriminated union. This should really be described as a
-      // DW_TAG_variant_type. For now only describing the data.
-      ArgTy = ElemDecl->getParentEnum()->mapTypeIntoContext(ArgTy);
-      auto &TI = IGM.getTypeInfoForUnlowered(ArgTy);
-      ElemDbgTy = DebugTypeInfo::getFromTypeInfo(
-          ElemDecl->getDeclContext(),
-          ElemDecl->getDeclContext()->getGenericEnvironmentOfContext(), ArgTy,
-          TI);
-    } else {
-      // Discriminated union case without argument. Fallback to Int
-      // as the element type; there is no storage here.
-      Type IntTy = IGM.Context.getIntDecl()->getDeclaredType();
-      ElemDbgTy = DebugTypeInfo(
-          ElemDecl->getDeclContext(),
-          ElemDecl->getDeclContext()->getGenericEnvironmentOfContext(), IntTy,
-          DbgTy.StorageType, Size(0), Alignment(1), true);
-    }
-    unsigned Offset = 0;
-    auto MTy = createMemberType(ElemDbgTy, ElemDecl->getName().str(), Offset,
-                                Scope, File, Flags);
-    Elements.push_back(MTy);
-  }
-  return DBuilder.getOrCreateArray(Elements);
-}
-
-llvm::DICompositeType *IRGenDebugInfo::createEnumType(
-    DebugTypeInfo DbgTy, EnumDecl *Decl, StringRef MangledName,
-    llvm::DIScope *Scope, llvm::DIFile *File, unsigned Line,
-    llvm::DINode::DIFlags Flags) {
-  unsigned SizeOfByte = CI.getTargetInfo().getCharWidth();
-  unsigned SizeInBits = DbgTy.size.getValue() * SizeOfByte;
-  // Default, since Swift doesn't allow specifying a custom alignment.
-  unsigned AlignInBits = 0;
-
-  // FIXME: Is DW_TAG_union_type the right thing here?
-  // Consider using a DW_TAG_variant_type instead.
-  auto FwdDecl = llvm::TempDIType(
-    DBuilder.createReplaceableCompositeType(
-      llvm::dwarf::DW_TAG_union_type, MangledName, Scope, File, Line,
-        llvm::dwarf::DW_LANG_Swift, SizeInBits, AlignInBits, Flags,
-        MangledName));
-
-  auto TH = llvm::TrackingMDNodeRef(FwdDecl.get());
-  DITypeCache[DbgTy.getType()] = TH;
-
-  auto DITy = DBuilder.createUnionType(
-      Scope, Decl->getName().str(), File, Line, SizeInBits, AlignInBits, Flags,
-      getEnumElements(DbgTy, Decl, Scope, File, Flags),
-      llvm::dwarf::DW_LANG_Swift, MangledName);
-
-  DBuilder.replaceTemporary(std::move(FwdDecl), DITy);
-  return DITy;
-}
-
-llvm::DIType *IRGenDebugInfo::getOrCreateDesugaredType(Type Ty,
-                                                       DebugTypeInfo DbgTy) {
-  DebugTypeInfo BlandDbgTy(DbgTy.getDeclContext(),
-                           DbgTy.getGenericEnvironment(), Ty, DbgTy.StorageType,
-                           DbgTy.size, DbgTy.align, DbgTy.DefaultAlignment);
-  return getOrCreateType(BlandDbgTy);
-}
-
-uint64_t IRGenDebugInfo::getSizeOfBasicType(DebugTypeInfo DbgTy) {
-  uint64_t SizeOfByte = CI.getTargetInfo().getCharWidth();
-  uint64_t BitWidth = DbgTy.size.getValue() * SizeOfByte;
-  llvm::Type *StorageType = DbgTy.StorageType
-                                ? DbgTy.StorageType
-                                : IGM.DataLayout.getSmallestLegalIntType(
-                                      IGM.getLLVMContext(), BitWidth);
-
-  if (StorageType)
-    return IGM.DataLayout.getTypeSizeInBits(StorageType);
-
-  // This type is too large to fit in a register.
-  assert(BitWidth > IGM.DataLayout.getLargestLegalIntTypeSizeInBits());
-  return BitWidth;
-}
-
-llvm::DIType *IRGenDebugInfo::createPointerSizedStruct(
-    llvm::DIScope *Scope, StringRef Name, llvm::DIFile *File, unsigned Line,
-    llvm::DINode::DIFlags Flags, StringRef MangledName) {
-  if (Opts.DebugInfoKind > IRGenDebugInfoKind::ASTTypes) {
-    auto FwdDecl = DBuilder.createForwardDecl(
-        llvm::dwarf::DW_TAG_structure_type, Name, Scope, File, Line,
-        llvm::dwarf::DW_LANG_Swift, 0, 0);
-    return createPointerSizedStruct(Scope, Name, FwdDecl, File, Line, Flags,
-                                    MangledName);
-  } else {
-    unsigned SizeInBits = CI.getTargetInfo().getPointerWidth(0);
-    return createOpaqueStruct(Scope, Name, File, Line, SizeInBits, 0, Flags,
-                              MangledName);
-  }
-}
-
-llvm::DIType *IRGenDebugInfo::createPointerSizedStruct(
-    llvm::DIScope *Scope, StringRef Name, llvm::DIType *PointeeTy,
-    llvm::DIFile *File, unsigned Line, llvm::DINode::DIFlags Flags,
-    StringRef MangledName) {
-  unsigned PtrSize = CI.getTargetInfo().getPointerWidth(0);
-  auto PtrTy = DBuilder.createPointerType(PointeeTy, PtrSize, 0);
-  llvm::Metadata *Elements[] = {DBuilder.createMemberType(
-      Scope, "ptr", File, 0, PtrSize, 0, 0, Flags, PtrTy)};
-  return DBuilder.createStructType(
-      Scope, Name, File, Line, PtrSize, 0, Flags,
-      /* DerivedFrom */ nullptr, DBuilder.getOrCreateArray(Elements),
-      llvm::dwarf::DW_LANG_Swift, nullptr, MangledName);
-}
-
-llvm::DIType *IRGenDebugInfo::createDoublePointerSizedStruct(
-    llvm::DIScope *Scope, StringRef Name, llvm::DIType *PointeeTy,
-    llvm::DIFile *File, unsigned Line, llvm::DINode::DIFlags Flags,
-    StringRef MangledName) {
-  unsigned PtrSize = CI.getTargetInfo().getPointerWidth(0);
-  llvm::Metadata *Elements[] = {
-      DBuilder.createMemberType(
-          Scope, "ptr", File, 0, PtrSize, 0, 0, Flags,
-          DBuilder.createPointerType(PointeeTy, PtrSize, 0)),
-      DBuilder.createMemberType(
-          Scope, "_", File, 0, PtrSize, 0, 0, Flags,
-          DBuilder.createPointerType(nullptr, PtrSize, 0))};
-  return DBuilder.createStructType(
-      Scope, Name, File, Line, 2*PtrSize, 0, Flags,
-      /* DerivedFrom */ nullptr, DBuilder.getOrCreateArray(Elements),
-      llvm::dwarf::DW_LANG_Swift, nullptr, MangledName);
-}
-
-llvm::DIType *
-IRGenDebugInfo::createFunctionPointer(DebugTypeInfo DbgTy, llvm::DIScope *Scope,
-                                      unsigned SizeInBits, unsigned AlignInBits,
-                                      llvm::DINode::DIFlags Flags,
-                                      StringRef MangledName) {
-  auto FwdDecl = llvm::TempDINode(DBuilder.createReplaceableCompositeType(
-      llvm::dwarf::DW_TAG_subroutine_type, MangledName, Scope, MainFile, 0,
-      llvm::dwarf::DW_LANG_Swift, SizeInBits, AlignInBits, Flags, MangledName));
-
-  auto TH = llvm::TrackingMDNodeRef(FwdDecl.get());
-  DITypeCache[DbgTy.getType()] = TH;
-
-  CanSILFunctionType FunTy;
-  TypeBase *BaseTy = DbgTy.getType();
-  if (auto *SILFnTy = dyn_cast<SILFunctionType>(BaseTy))
-    FunTy = CanSILFunctionType(SILFnTy);
-  // FIXME: Handling of generic parameters in SIL type lowering is in flux.
-  // DebugInfo doesn't appear to care about the generic context, so just
-  // throw it away before lowering.
-  else if (isa<GenericFunctionType>(BaseTy)) {
-    auto *fTy = cast<AnyFunctionType>(BaseTy);
-    auto *nongenericTy =
-        FunctionType::get(fTy->getInput(), fTy->getResult(), fTy->getExtInfo());
-
-    FunTy = IGM.getLoweredType(nongenericTy).castTo<SILFunctionType>();
-  } else
-    FunTy = IGM.getLoweredType(BaseTy).castTo<SILFunctionType>();
-  auto Params = createParameterTypes(FunTy, DbgTy.getDeclContext(),
-                                     DbgTy.getGenericEnvironment());
-
-  auto FnTy = DBuilder.createSubroutineType(Params, Flags);
-  llvm::DIType *DITy;
-  if (FunTy->getRepresentation() == SILFunctionType::Representation::Thick) {
-    if (SizeInBits == 2 * CI.getTargetInfo().getPointerWidth(0))
-      // This is a FunctionPairTy: { i8*, %swift.refcounted* }.
-      DITy = createDoublePointerSizedStruct(Scope, MangledName, FnTy, MainFile,
-                                            0, Flags, MangledName);
-    else
-      // This is a generic function as noted above.
-      DITy = createOpaqueStruct(Scope, MangledName, MainFile, 0, SizeInBits,
-                                AlignInBits, Flags, MangledName);
-  } else {
-    assert(SizeInBits == CI.getTargetInfo().getPointerWidth(0));
-    DITy = createPointerSizedStruct(Scope, MangledName, FnTy, MainFile, 0,
-                                    Flags, MangledName);
-  }
-  DBuilder.replaceTemporary(std::move(FwdDecl), DITy);
-  return DITy;
-}
-
-llvm::DIType *IRGenDebugInfo::createTuple(DebugTypeInfo DbgTy,
-                                          llvm::DIScope *Scope,
-                                          unsigned SizeInBits,
-                                          unsigned AlignInBits,
-                                          llvm::DINode::DIFlags Flags,
-                                          StringRef MangledName) {
-  TypeBase *BaseTy = DbgTy.getType();
-  auto *TupleTy = BaseTy->castTo<TupleType>();
-  auto FwdDecl = llvm::TempDINode(DBuilder.createReplaceableCompositeType(
-      llvm::dwarf::DW_TAG_structure_type, MangledName, Scope, MainFile, 0,
-      llvm::dwarf::DW_LANG_Swift, SizeInBits, AlignInBits, Flags, MangledName));
-
-  DITypeCache[DbgTy.getType()] = llvm::TrackingMDNodeRef(FwdDecl.get());
-
-  unsigned RealSize;
-  auto Elements =
-      getTupleElements(TupleTy, Scope, MainFile, Flags, DbgTy.getDeclContext(),
-                       DbgTy.getGenericEnvironment(), RealSize);
-  // FIXME: Handle %swift.opaque members and make this into an assertion.
-  if (!RealSize)
-    RealSize = SizeInBits;
-
-  auto DITy = DBuilder.createStructType(
-      Scope, MangledName, MainFile, 0, RealSize, AlignInBits, Flags,
-      nullptr, // DerivedFrom
-      Elements, llvm::dwarf::DW_LANG_Swift, nullptr, MangledName);
-
-  DBuilder.replaceTemporary(std::move(FwdDecl), DITy);
-  return DITy;
-}
-
-llvm::DIType *
-IRGenDebugInfo::createOpaqueStruct(llvm::DIScope *Scope, StringRef Name,
-                                   llvm::DIFile *File, unsigned Line,
-                                   unsigned SizeInBits, unsigned AlignInBits,
-                                   llvm::DINode::DIFlags Flags,
-                                   StringRef MangledName) {
-  return DBuilder.createStructType(
-      Scope, Name, File, Line, SizeInBits, AlignInBits, Flags,
-      /* DerivedFrom */ nullptr,
-      DBuilder.getOrCreateArray(ArrayRef<llvm::Metadata *>()),
-      llvm::dwarf::DW_LANG_Swift, nullptr, MangledName);
-}
-
-llvm::DIType *IRGenDebugInfo::createType(DebugTypeInfo DbgTy,
-                                         StringRef MangledName,
-                                         llvm::DIScope *Scope,
-                                         llvm::DIFile *File) {
-  // FIXME: For SizeInBits, clang uses the actual size of the type on
-  // the target machine instead of the storage size that is alloca'd
-  // in the LLVM IR. For all types that are boxed in a struct, we are
-  // emitting the storage size of the struct, but it may be necessary
-  // to emit the (target!) size of the underlying basic type.
-  uint64_t SizeOfByte = CI.getTargetInfo().getCharWidth();
-  uint64_t SizeInBits = DbgTy.size.getValue() * SizeOfByte;
-  unsigned AlignInBits =
-      DbgTy.DefaultAlignment ? 0 : DbgTy.align.getValue() * SizeOfByte;
-  unsigned Encoding = 0;
-  llvm::DINode::DIFlags Flags = llvm::DINode::FlagZero;
-
-  TypeBase *BaseTy = DbgTy.getType();
-
-  if (!BaseTy) {
-    DEBUG(llvm::dbgs() << "Type without TypeBase: "; DbgTy.getType()->dump();
-          llvm::dbgs() << "\n");
-    if (!InternalType) {
-      StringRef Name = "<internal>";
-      InternalType = DBuilder.createForwardDecl(
-          llvm::dwarf::DW_TAG_structure_type, Name, Scope, File,
-          /*Line*/ 0, llvm::dwarf::DW_LANG_Swift, SizeInBits, AlignInBits);
-    }
-    return InternalType;
-  }
-
-  // Here goes!
-  switch (BaseTy->getKind()) {
-  case TypeKind::BuiltinInteger: {
-    Encoding = llvm::dwarf::DW_ATE_unsigned;
-    SizeInBits = getSizeOfBasicType(DbgTy);
-    break;
-  }
-
-  case TypeKind::BuiltinFloat: {
-    auto *FloatTy = BaseTy->castTo<BuiltinFloatType>();
-    // Assuming that the bitwidth and FloatTy->getFPKind() are identical.
-    SizeInBits = FloatTy->getBitWidth();
-    Encoding = llvm::dwarf::DW_ATE_float;
-    break;
-  }
-
-  case TypeKind::BuiltinUnknownObject: {
-    // The builtin opaque Objective-C pointer type. Useful for pushing
-    // an Objective-C type through swift.
-    unsigned PtrSize = CI.getTargetInfo().getPointerWidth(0);
-    auto IdTy = DBuilder.createForwardDecl(
-      llvm::dwarf::DW_TAG_structure_type, MangledName, Scope, File, 0,
-        llvm::dwarf::DW_LANG_ObjC, 0, 0);
-    return DBuilder.createPointerType(IdTy, PtrSize, 0,
-                                      /* DWARFAddressSpace */ None,
-                                      MangledName);
-  }
-
-  case TypeKind::BuiltinNativeObject: {
-    unsigned PtrSize = CI.getTargetInfo().getPointerWidth(0);
-    auto PTy = DBuilder.createPointerType(nullptr, PtrSize, 0,
-                                          /* DWARFAddressSpace */ None,
-                                          MangledName);
-    return DBuilder.createObjectPointerType(PTy);
-  }
-
-  case TypeKind::BuiltinBridgeObject: {
-    unsigned PtrSize = CI.getTargetInfo().getPointerWidth(0);
-    auto PTy = DBuilder.createPointerType(nullptr, PtrSize, 0,
-                                          /* DWARFAddressSpace */ None,
-                                          MangledName);
-    return DBuilder.createObjectPointerType(PTy);
-  }
-
-  case TypeKind::BuiltinRawPointer: {
-    unsigned PtrSize = CI.getTargetInfo().getPointerWidth(0);
-    return DBuilder.createPointerType(nullptr, PtrSize, 0,
-                                      /* DWARFAddressSpace */ None,
-                                      MangledName);
-  }
-
-  case TypeKind::DynamicSelf: {
-    // Self. We don't have a way to represent instancetype in DWARF,
-    // so we emit the static type instead. This is similar to what we
-    // do with instancetype in Objective-C.
-    auto *DynamicSelfTy = BaseTy->castTo<DynamicSelfType>();
-    auto SelfTy = getOrCreateDesugaredType(DynamicSelfTy->getSelfType(), DbgTy);
-    return DBuilder.createTypedef(SelfTy, MangledName, File, 0, File);
-
-  }
-
-  // Even builtin swift types usually come boxed in a struct.
-  case TypeKind::Struct: {
-    auto *StructTy = BaseTy->castTo<StructType>();
-    auto *Decl = StructTy->getDecl();
-    auto L = getDebugLoc(*this, Decl);
-    auto *File = getOrCreateFile(L.Filename);
-    if (Opts.DebugInfoKind > IRGenDebugInfoKind::ASTTypes)
-      return createStructType(DbgTy, Decl, StructTy, Scope, File, L.Line,
-                              SizeInBits, AlignInBits, Flags,
-                              nullptr, // DerivedFrom
-                              llvm::dwarf::DW_LANG_Swift, MangledName);
-    else
-      return createOpaqueStruct(Scope, Decl->getName().str(), File, L.Line,
-                                SizeInBits, AlignInBits, Flags, MangledName);
-  }
-
-  case TypeKind::Class: {
-    // Classes are represented as DW_TAG_structure_type. This way the
-    // DW_AT_APPLE_runtime_class(DW_LANG_Swift) attribute can be
-    // used to differentiate them from C++ and ObjC classes.
-    auto *ClassTy = BaseTy->castTo<ClassType>();
-    auto *Decl = ClassTy->getDecl();
-    auto L = getDebugLoc(*this, Decl);
-    if (auto *ClangDecl = Decl->getClangDecl()) {
-      auto ClangSrcLoc = ClangDecl->getLocStart();
-      clang::SourceManager &ClangSM =
-          CI.getClangASTContext().getSourceManager();
-      L.Line = ClangSM.getPresumedLineNumber(ClangSrcLoc);
-      L.Filename = ClangSM.getBufferName(ClangSrcLoc);
-
-      // Use "__ObjC" as default for implicit decls.
-      // FIXME: Do something more clever based on the decl's mangled name.
-      std::string FullModuleNameBuffer;
-      StringRef ModulePath;
-      StringRef ModuleName = "__ObjC";
-      if (auto *OwningModule = ClangDecl->getImportedOwningModule())
-        ModuleName = OwningModule->getTopLevelModuleName();
-
-      if (auto *SwiftModule = Decl->getParentModule())
-        if (auto *ClangModule = SwiftModule->findUnderlyingClangModule()) {
-          // FIXME: Clang submodules are not handled here.
-          // FIXME: Clang module config macros are not handled here.
-          FullModuleNameBuffer = ClangModule->getFullModuleName();
-          ModuleName = FullModuleNameBuffer;
-          // FIXME: A clang module's Directory is supposed to be the
-          // directory containing the module map, but ClangImporter
-          // sets it to the module cache directory.
-          if (ClangModule->Directory)
-            ModulePath = ClangModule->Directory->getName();
-        }
-      Scope = getOrCreateModule(ModuleName, TheCU, ModuleName, ModulePath);
-    }
-    assert(SizeInBits == CI.getTargetInfo().getPointerWidth(0));
-    return createPointerSizedStruct(Scope, Decl->getNameStr(),
-                                    getOrCreateFile(L.Filename), L.Line, Flags,
-                                    MangledName);
-  }
-
-  case TypeKind::Protocol: {
-    auto *ProtocolTy = BaseTy->castTo<ProtocolType>();
-    auto *Decl = ProtocolTy->getDecl();
-    // FIXME: (LLVM branch) This should probably be a DW_TAG_interface_type.
-    auto L = getDebugLoc(*this, Decl);
-    auto File = getOrCreateFile(L.Filename);
-    return createOpaqueStruct(Scope, Decl ? Decl->getNameStr() : MangledName,
-                              File, L.Line, SizeInBits, AlignInBits, Flags,
-                              MangledName);
-  }
-
-  case TypeKind::ProtocolComposition: {
-    auto *Decl = DbgTy.getDecl();
-    auto L = getDebugLoc(*this, Decl);
-    auto File = getOrCreateFile(L.Filename);
-
-    // FIXME: emit types
-    // auto ProtocolCompositionTy = BaseTy->castTo<ProtocolCompositionType>();
-    return createOpaqueStruct(Scope, Decl ? Decl->getNameStr() : MangledName,
-                              File, L.Line, SizeInBits, AlignInBits, Flags,
-                              MangledName);
-  }
-
-  case TypeKind::UnboundGeneric: {
-    auto *UnboundTy = BaseTy->castTo<UnboundGenericType>();
-    auto *Decl = UnboundTy->getDecl();
-    auto L = getDebugLoc(*this, Decl);
-    assert(SizeInBits == CI.getTargetInfo().getPointerWidth(0));
-    return createPointerSizedStruct(Scope,
-                                    Decl ? Decl->getNameStr() : MangledName,
-                                    File, L.Line, Flags, MangledName);
-  }
-
-  case TypeKind::BoundGenericStruct: {
-    auto *StructTy = BaseTy->castTo<BoundGenericStructType>();
-    auto *Decl = StructTy->getDecl();
-    auto L = getDebugLoc(*this, Decl);
-    return createOpaqueStruct(Scope, Decl ? Decl->getNameStr() : MangledName,
-                              File, L.Line, SizeInBits, AlignInBits, Flags,
-                              MangledName);
-  }
-
-  case TypeKind::BoundGenericClass: {
-    auto *ClassTy = BaseTy->castTo<BoundGenericClassType>();
-    auto *Decl = ClassTy->getDecl();
-    auto L = getDebugLoc(*this, Decl);
-    // TODO: We may want to peek at Decl->isObjC() and set this
-    // attribute accordingly.
-    assert(SizeInBits == CI.getTargetInfo().getPointerWidth(0));
-    return createPointerSizedStruct(Scope,
-                                    Decl ? Decl->getNameStr() : MangledName,
-                                    File, L.Line, Flags, MangledName);
-  }
-
-  case TypeKind::Tuple: {
-    // Tuples are also represented as structs.
-    if (Opts.DebugInfoKind > IRGenDebugInfoKind::ASTTypes)
-      return createTuple(DbgTy, Scope, SizeInBits, AlignInBits, Flags,
-                         MangledName);
-    else
-      return createOpaqueStruct(Scope, MangledName, MainFile, 0, SizeInBits,
-                                AlignInBits, Flags, MangledName);
-  }
-
-  case TypeKind::InOut: {
-    // This is an inout type. Naturally we would be emitting them as
-    // DW_TAG_reference_type types, but LLDB can deal better with pointer-sized
-    // struct that has the appropriate mangled name.
-    auto ObjectTy = BaseTy->castTo<InOutType>()->getObjectType();
-    if (Opts.DebugInfoKind > IRGenDebugInfoKind::ASTTypes) {
-      auto DT = getOrCreateDesugaredType(ObjectTy, DbgTy);
-      return createPointerSizedStruct(
-          Scope, MangledName, DT, File, 0, Flags,
-          MangledName);
-    } else
-      return createOpaqueStruct(Scope, MangledName, File, 0, SizeInBits,
-                                AlignInBits, Flags, MangledName);
-  }
-
-  case TypeKind::Archetype: {
-    auto *Archetype = BaseTy->castTo<ArchetypeType>();
-    auto L = getDebugLoc(*this, Archetype->getAssocType());
-    auto Superclass = Archetype->getSuperclass();
-    auto DerivedFrom = Superclass.isNull()
-                           ? nullptr
-                           : getOrCreateDesugaredType(Superclass, DbgTy);
-    auto FwdDecl = llvm::TempDIType(
-      DBuilder.createReplaceableCompositeType(
-        llvm::dwarf::DW_TAG_structure_type, MangledName, Scope, File, L.Line,
-          llvm::dwarf::DW_LANG_Swift, SizeInBits, AlignInBits, Flags,
-          MangledName));
-
-    // Emit the protocols the archetypes conform to.
-    SmallVector<llvm::Metadata *, 4> Protocols;
-    for (auto *ProtocolDecl : Archetype->getConformsTo()) {
-      auto PTy = IGM.getLoweredType(ProtocolDecl->getInterfaceType())
-                     .getSwiftRValueType();
-      auto PDbgTy = DebugTypeInfo::getFromTypeInfo(
-          DbgTy.getDeclContext(), DbgTy.getGenericEnvironment(),
-          ProtocolDecl->getInterfaceType(), IGM.getTypeInfoForLowered(PTy));
-      auto PDITy = getOrCreateType(PDbgTy);
-      Protocols.push_back(DBuilder.createInheritance(FwdDecl.get(),
-                                                     PDITy, 0, Flags));
-    }
-    auto DITy = DBuilder.createStructType(
-        Scope, MangledName, File, L.Line, SizeInBits, AlignInBits, Flags,
-        DerivedFrom, DBuilder.getOrCreateArray(Protocols),
-        llvm::dwarf::DW_LANG_Swift, nullptr,
-        MangledName);
-
-    DBuilder.replaceTemporary(std::move(FwdDecl), DITy);
-    return DITy;
-  }
-
-  case TypeKind::ExistentialMetatype:
-  case TypeKind::Metatype: {
-    // Metatypes are (mostly) singleton type descriptors, often without storage.
-    Flags |= llvm::DINode::FlagArtificial;
-    auto L = getDebugLoc(*this, DbgTy.getDecl());
-    auto File = getOrCreateFile(L.Filename);
-    return DBuilder.createStructType(
-        Scope, MangledName, File, L.Line, SizeInBits, AlignInBits, Flags,
-        nullptr, nullptr, llvm::dwarf::DW_LANG_Swift,
-        nullptr, MangledName);
-  }
-
-  case TypeKind::SILFunction:
-  case TypeKind::Function:
-  case TypeKind::GenericFunction: {
-    if (Opts.DebugInfoKind > IRGenDebugInfoKind::ASTTypes)
-      return createFunctionPointer(DbgTy, Scope, SizeInBits, AlignInBits, Flags,
-                                   MangledName);
-    else
-      return createOpaqueStruct(Scope, MangledName, MainFile, 0, SizeInBits,
-                                AlignInBits, Flags, MangledName);
-  }
-
-  case TypeKind::Enum: {
-    auto *EnumTy = BaseTy->castTo<EnumType>();
-    auto *Decl = EnumTy->getDecl();
-    auto L = getDebugLoc(*this, Decl);
-    auto *File = getOrCreateFile(L.Filename);
-    if (Opts.DebugInfoKind > IRGenDebugInfoKind::ASTTypes)
-      return createEnumType(DbgTy, Decl, MangledName, Scope, File, L.Line,
-                            Flags);
-    else
-      return createOpaqueStruct(Scope, Decl->getName().str(), File, L.Line,
-                                SizeInBits, AlignInBits, Flags, MangledName);
-  }
-
-  case TypeKind::BoundGenericEnum: {
-    auto *EnumTy = BaseTy->castTo<BoundGenericEnumType>();
-    auto *Decl = EnumTy->getDecl();
-    auto L = getDebugLoc(*this, Decl);
-    auto *File = getOrCreateFile(L.Filename);
-    if (Opts.DebugInfoKind > IRGenDebugInfoKind::ASTTypes)
-      return createEnumType(DbgTy, Decl, MangledName, Scope, File, L.Line,
-                            Flags);
-    else
-      return createOpaqueStruct(Scope, Decl->getName().str(), File, L.Line,
-                                SizeInBits, AlignInBits, Flags, MangledName);
-  }
-
-  case TypeKind::BuiltinVector: {
-    (void)MangledName; // FIXME emit the name somewhere.
-    auto *BuiltinVectorTy = BaseTy->castTo<BuiltinVectorType>();
-    DebugTypeInfo ElemDbgTy(DbgTy.getDeclContext(),
-                            DbgTy.getGenericEnvironment(),
-                            BuiltinVectorTy->getElementType(),
-                            DbgTy.StorageType, DbgTy.size, DbgTy.align, true);
-    auto Subscripts = nullptr;
-    return DBuilder.createVectorType(BuiltinVectorTy->getNumElements(),
-                                     AlignInBits, getOrCreateType(ElemDbgTy),
-                                     Subscripts);
-  }
-
-  // Reference storage types.
-  case TypeKind::UnownedStorage:
-  case TypeKind::UnmanagedStorage:
-  case TypeKind::WeakStorage: {
-    auto *ReferenceTy = cast<ReferenceStorageType>(BaseTy);
-    auto CanTy = ReferenceTy->getReferentType();
-    auto L = getDebugLoc(*this, DbgTy.getDecl());
-    auto File = getOrCreateFile(L.Filename);
-    return DBuilder.createTypedef(getOrCreateDesugaredType(CanTy, DbgTy),
-                                  MangledName, File, L.Line, File);
-  }
-
-  // Sugared types.
-
-  case TypeKind::NameAlias: {
-
-    auto *NameAliasTy = cast<NameAliasType>(BaseTy);
-    auto *Decl = NameAliasTy->getDecl();
-    auto L = getDebugLoc(*this, Decl);
-    auto AliasedTy = NameAliasTy->getSinglyDesugaredType();
-    auto File = getOrCreateFile(L.Filename);
-    // For NameAlias types, the DeclContext for the aliasED type is
-    // in the decl of the alias type.
-    DebugTypeInfo AliasedDbgTy(
-        DbgTy.getDeclContext(), DbgTy.getGenericEnvironment(), AliasedTy,
-        DbgTy.StorageType, DbgTy.size, DbgTy.align, DbgTy.DefaultAlignment);
-    return DBuilder.createTypedef(getOrCreateType(AliasedDbgTy), MangledName,
-                                  File, L.Line, File);
-  }
-
-  case TypeKind::Paren: {
-    auto Ty = cast<ParenType>(BaseTy)->getUnderlyingType();
-    return getOrCreateDesugaredType(Ty, DbgTy);
-  }
-
-  // SyntaxSugarType derivations.
-  case TypeKind::ArraySlice:
-  case TypeKind::Optional:
-  case TypeKind::ImplicitlyUnwrappedOptional: {
-    auto *SyntaxSugarTy = cast<SyntaxSugarType>(BaseTy);
-    auto *CanTy = SyntaxSugarTy->getSinglyDesugaredType();
-    return getOrCreateDesugaredType(CanTy, DbgTy);
-  }
-
-  case TypeKind::Dictionary: {
-    auto *DictionaryTy = cast<DictionaryType>(BaseTy);
-    auto *CanTy = DictionaryTy->getDesugaredType();
-    return getOrCreateDesugaredType(CanTy, DbgTy);
-  }
-
-  case TypeKind::GenericTypeParam: {
-    auto *ParamTy = cast<GenericTypeParamType>(BaseTy);
-    // FIXME: Provide a more meaningful debug type.
-    return DBuilder.createUnspecifiedType(ParamTy->getName().str());
-  }
-  case TypeKind::DependentMember: {
-    auto *MemberTy = cast<DependentMemberType>(BaseTy);
-    // FIXME: Provide a more meaningful debug type.
-    return DBuilder.createUnspecifiedType(MemberTy->getName().str());
-  }
-
-  // The following types exist primarily for internal use by the type
-  // checker.
-  case TypeKind::Error:
-  case TypeKind::Unresolved:
-  case TypeKind::LValue:
-  case TypeKind::TypeVariable:
-  case TypeKind::Module:
-  case TypeKind::SILBlockStorage:
-  case TypeKind::SILBox:
-  case TypeKind::BuiltinUnsafeValueBuffer:
-
-    DEBUG(llvm::errs() << "Unhandled type: "; DbgTy.getType()->dump();
-          llvm::errs() << "\n");
-    MangledName = "<unknown>";
-  }
-  return DBuilder.createBasicType(MangledName, SizeInBits, Encoding);
-}
-
-/// Determine if there exists a name mangling for the given type.
-static bool canMangle(TypeBase *Ty) {
-  switch (Ty->getKind()) {
-  case TypeKind::GenericFunction:     // Not yet supported.
-  case TypeKind::SILBlockStorage:     // Not supported at all.
-  case TypeKind::SILBox:
-    return false;
-  case TypeKind::InOut: {
-    auto *ObjectTy = Ty->castTo<InOutType>()->getObjectType().getPointer();
-    return canMangle(ObjectTy);
-  }
-  default:
-    return true;
-  }
-}
-
-llvm::DIType *IRGenDebugInfo::getTypeOrNull(TypeBase *Ty) {
-  auto CachedType = DITypeCache.find(Ty);
-  if (CachedType != DITypeCache.end()) {
-    // Verify that the information still exists.
-    if (llvm::Metadata *Val = CachedType->second) {
-      auto DITy = cast<llvm::DIType>(Val);
-      return DITy;
-    }
-  }
-  return nullptr;
-}
-
-llvm::DIType *IRGenDebugInfo::getOrCreateType(DebugTypeInfo DbgTy) {
-  // Is this an empty type?
-  if (DbgTy.isNull())
-    // We can't use the empty type as an index into DenseMap.
-    return createType(DbgTy, "", TheCU, MainFile);
-
-  // Look in the cache first.
-  if (auto *DITy = getTypeOrNull(DbgTy.getType()))
-    return DITy;
-
-  // Second line of defense: Look up the mangled name. TypeBase*'s are
-  // not necessarily unique, but name mangling is too expensive to do
-  // every time.
-  StringRef MangledName;
-  llvm::MDString *UID = nullptr;
-  if (canMangle(DbgTy.getType())) {
-    MangledName = getMangledName(DbgTy);
-    UID = llvm::MDString::get(IGM.getLLVMContext(), MangledName);
-    if (llvm::Metadata *CachedTy = DIRefMap.lookup(UID)) {
-      auto DITy = cast<llvm::DIType>(CachedTy);
-      return DITy;
-    }
-  }
-
-  // Retrieve the context of the type, as opposed to the DeclContext
-  // of the variable.
-  //
-  // FIXME: Builtin and qualified types in LLVM have no parent
-  // scope. TODO: This can be fixed by extending DIBuilder.
-  DeclContext *Context = DbgTy.getType()->getNominalOrBoundGenericNominal();
-  if (Context)
-    Context = Context->getParent();
-  llvm::DIScope *Scope = getOrCreateContext(Context);
-  llvm::DIType *DITy = createType(DbgTy, MangledName, Scope, getFile(Scope));
-
-  // Incrementally build the DIRefMap.
-  if (auto *CTy = dyn_cast<llvm::DICompositeType>(DITy)) {
-#ifndef NDEBUG
-    // Sanity check.
-    if (llvm::Metadata *V = DIRefMap.lookup(UID)) {
-      auto *CachedTy = cast<llvm::DIType>(V);
-      assert(CachedTy == DITy && "conflicting types for one UID");
-    }
-#endif
-    // If this type supports a UID, enter it to the cache.
-    if (auto UID = CTy->getRawIdentifier()) {
-      assert(UID->getString() == MangledName &&
-             "Unique identifier is different from mangled name ");
-      DIRefMap[UID] = llvm::TrackingMDNodeRef(DITy);
-    }
-  }
-
-  // Store it in the cache.
-  DITypeCache.insert({DbgTy.getType(), llvm::TrackingMDNodeRef(DITy)});
-
-  return DITy;
-}
-
+// Forwarding to the private implementation.
 void IRGenDebugInfo::finalize() {
-  assert(LocationStack.empty() && "Mismatch of pushLoc() and popLoc().");
+  static_cast<IRGenDebugInfoImpl *>(this)->finalize();
+}
 
-  // Finalize all replaceable forward declarations.
-  for (auto &Ty : ReplaceMap) {
-    llvm::TempMDNode FwdDecl(cast<llvm::MDNode>(Ty.second));
-    llvm::Metadata *Replacement;
-    if (auto *FullType = getTypeOrNull(Ty.first))
-      Replacement = FullType;
-    else
-      Replacement = Ty.second;
-    DBuilder.replaceTemporary(std::move(FwdDecl),
-                              cast<llvm::MDNode>(Replacement));
+void IRGenDebugInfo::setCurrentLoc(IRBuilder &Builder, const SILDebugScope *DS,
+                                   Optional<SILLocation> Loc) {
+  static_cast<IRGenDebugInfoImpl *>(this)->setCurrentLoc(Builder, DS, Loc);
+}
+
+void IRGenDebugInfo::clearLoc(IRBuilder &Builder) {
+  static_cast<IRGenDebugInfoImpl *>(this)->clearLoc(Builder);
+}
+
+void IRGenDebugInfo::pushLoc() {
+  static_cast<IRGenDebugInfoImpl *>(this)->pushLoc();
+}
+
+void IRGenDebugInfo::popLoc() {
+  static_cast<IRGenDebugInfoImpl *>(this)->popLoc();
+}
+
+void IRGenDebugInfo::setArtificialTrapLocation(IRBuilder &Builder,
+                                               const SILDebugScope *Scope) {
+  static_cast<IRGenDebugInfoImpl *>(this)->setArtificialTrapLocation(Builder,
+                                                                     Scope);
+}
+
+void IRGenDebugInfo::setEntryPointLoc(IRBuilder &Builder) {
+  static_cast<IRGenDebugInfoImpl *>(this)->setEntryPointLoc(Builder);
+}
+
+llvm::DIScope *IRGenDebugInfo::getEntryPointFn() {
+  return static_cast<IRGenDebugInfoImpl *>(this)->getEntryPointFn();
+}
+
+llvm::DIScope *IRGenDebugInfo::getOrCreateScope(const SILDebugScope *DS) {
+  return static_cast<IRGenDebugInfoImpl *>(this)->getOrCreateScope(DS);
+}
+
+void IRGenDebugInfo::emitImport(ImportDecl *D) {
+  static_cast<IRGenDebugInfoImpl *>(this)->emitImport(D);
+}
+
+llvm::DISubprogram *
+IRGenDebugInfo::emitFunction(const SILDebugScope *DS, llvm::Function *Fn,
+                             SILFunctionTypeRepresentation Rep, SILType Ty,
+                             DeclContext *DeclCtx,
+                             GenericEnvironment *GE) {
+  return static_cast<IRGenDebugInfoImpl *>(this)->emitFunction(DS, Fn, Rep, Ty,
+                                                        DeclCtx);
+}
+
+llvm::DISubprogram *IRGenDebugInfo::emitFunction(SILFunction &SILFn,
+                                                 llvm::Function *Fn) {
+  return static_cast<IRGenDebugInfoImpl *>(this)->emitFunction(SILFn, Fn);
+}
+
+void IRGenDebugInfo::emitArtificialFunction(IRBuilder &Builder,
+                                            llvm::Function *Fn,
+                                            SILType SILTy) {
+  static_cast<IRGenDebugInfoImpl *>(this)->emitArtificialFunction(Builder,
+                                                                  Fn, SILTy);
+}
+
+void IRGenDebugInfo::emitVariableDeclaration(
+    IRBuilder &Builder, ArrayRef<llvm::Value *> Storage, DebugTypeInfo Ty,
+    const SILDebugScope *DS, ValueDecl *VarDecl, StringRef Name,
+    unsigned ArgNo, IndirectionKind Indirection,
+      ArtificialKind Artificial) {
+  static_cast<IRGenDebugInfoImpl *>(this)->emitVariableDeclaration(
+      Builder, Storage, Ty, DS, VarDecl, Name, ArgNo, Indirection, Artificial);
+}
+
+void IRGenDebugInfo::emitDbgIntrinsic(IRBuilder &Builder, llvm::Value *Storage,
+                                      llvm::DILocalVariable *Var,
+                                      llvm::DIExpression *Expr, unsigned Line,
+                                      unsigned Col, llvm::DILocalScope *Scope,
+                                      const SILDebugScope *DS) {
+  static_cast<IRGenDebugInfoImpl *>(this)->emitDbgIntrinsic(
+      Builder, Storage, Var, Expr, Line, Col, Scope, DS);
+}
+
+void IRGenDebugInfo::emitGlobalVariableDeclaration(
+    llvm::GlobalVariable *Storage, StringRef Name, StringRef LinkageName,
+    DebugTypeInfo DebugType, bool IsLocalToUnit, Optional<SILLocation> Loc) {
+  static_cast<IRGenDebugInfoImpl *>(this)->emitGlobalVariableDeclaration(
+      Storage, Name, LinkageName, DebugType, IsLocalToUnit, Loc);
+}
+
+void IRGenDebugInfo::emitTypeMetadata(IRGenFunction &IGF, llvm::Value *Metadata,
+                                      StringRef Name) {
+  static_cast<IRGenDebugInfoImpl *>(this)->emitTypeMetadata(IGF, Metadata,
+                                                            Name);
+}
+
+llvm::DIBuilder &IRGenDebugInfo::getBuilder() {
+  return static_cast<IRGenDebugInfoImpl *>(this)->getBuilder();
+}
+
+SILLocation::DebugLoc IRGenDebugInfo::decodeSourceLoc(SourceLoc SL) {
+  return static_cast<IRGenDebugInfoImpl *>(this)->decodeSourceLoc(SL);
+}
+
+AutoRestoreLocation::AutoRestoreLocation(IRGenDebugInfo *DI, IRBuilder &Builder)
+    : DI(DI), Builder(Builder) {
+  if (DI)
+    SavedLocation = Builder.getCurrentDebugLocation();
+}
+
+/// Autorestore everything back to normal.
+AutoRestoreLocation::~AutoRestoreLocation() {
+  if (DI)
+    Builder.SetCurrentDebugLocation(SavedLocation);
+}
+
+ArtificialLocation::ArtificialLocation(const SILDebugScope *DS,
+                                       IRGenDebugInfo *DI, IRBuilder &Builder)
+    : AutoRestoreLocation(DI, Builder) {
+  if (DI) {
+    auto DL = llvm::DebugLoc::get(0, 0, DI->getOrCreateScope(DS));
+    Builder.SetCurrentDebugLocation(DL);
   }
-  // Finalize the DIBuilder.
-  DBuilder.finalize();
+}
+
+PrologueLocation::PrologueLocation(IRGenDebugInfo *DI, IRBuilder &Builder)
+    : AutoRestoreLocation(DI, Builder) {
+  if (DI)
+    DI->clearLoc(Builder);
 }
diff --git a/lib/IRGen/IRGenDebugInfo.h b/lib/IRGen/IRGenDebugInfo.h
index 2d72b97..aff95cd 100644
--- a/lib/IRGen/IRGenDebugInfo.h
+++ b/lib/IRGen/IRGenDebugInfo.h
@@ -18,33 +18,24 @@
 #define SWIFT_IRGEN_DEBUGINFO_H
 
 #include "DebugTypeInfo.h"
-#include "IRBuilder.h"
 #include "IRGenFunction.h"
-#include "IRGenModule.h"
-#include "swift/SIL/SILLocation.h"
-#include "llvm/IR/DIBuilder.h"
-#include "llvm/Support/Allocator.h"
 
-#include <set>
+namespace llvm {
+class DIBuilder;
+}
 
 namespace swift {
 
-class ASTContext;
-class AllocStackInst;
 class ClangImporter;
 class IRGenOptions;
-class SILArgument;
-class SILDebugScope;
-class SILModule;
 
 enum class SILFunctionTypeRepresentation : uint8_t;
 
 namespace irgen {
 
+class IRBuilder;
 class IRGenFunction;
-
-typedef llvm::DenseMap<const llvm::MDString *, llvm::TrackingMDNodeRef>
-    TrackingDIRefMap;
+class IRGenModule;
 
 enum IndirectionKind : bool { DirectValue = false, IndirectValue = true };
 enum ArtificialKind : bool { RealValue = false, ArtificialValue = true };
@@ -53,61 +44,11 @@
 /// LexicalScope, and knows how to translate a \c SILLocation into an
 /// \c llvm::DebugLoc.
 class IRGenDebugInfo {
-  friend class ArtificialLocation;
-  const IRGenOptions &Opts;
-  ClangImporter &CI;
-  SourceManager &SM;
-  llvm::Module &M;
-  llvm::DIBuilder DBuilder;
-  IRGenModule &IGM;
-
-  /// Used for caching SILDebugScopes without inline information.
-  typedef std::pair<const void *, void *> LocalScopeHash;
-  struct LocalScope : public LocalScopeHash {
-    LocalScope(const SILDebugScope *DS)
-        : LocalScopeHash({DS->Loc.getOpaquePointerValue(),
-                          DS->Parent.getOpaqueValue()}) {}
-  };
-
-  /// Various caches.
-  /// @{
-  llvm::DenseMap<LocalScopeHash, llvm::TrackingMDNodeRef> ScopeCache;
-  llvm::DenseMap<const SILDebugScope *, llvm::TrackingMDNodeRef> InlinedAtCache;
-  llvm::DenseMap<llvm::StringRef, llvm::TrackingMDNodeRef> DIFileCache;
-  llvm::DenseMap<const void *, SILLocation::DebugLoc> DebugLocCache;
-  llvm::DenseMap<TypeBase *, llvm::TrackingMDNodeRef> DITypeCache;
-  llvm::StringMap<llvm::TrackingMDNodeRef> DIModuleCache;
-  TrackingDIRefMap DIRefMap;
-  /// @}
-
-  /// A list of replaceable fwddecls that need to be RAUWed at the end.
-  std::vector<std::pair<TypeBase *, llvm::TrackingMDRef>> ReplaceMap;
-
-  llvm::BumpPtrAllocator DebugInfoNames;
-  StringRef CWDName;                    /// The current working directory.
-  llvm::DICompileUnit *TheCU = nullptr; /// The current compilation unit.
-  llvm::DIFile *MainFile = nullptr;     /// The main file.
-  llvm::DIModule *MainModule = nullptr; /// The current module.
-  llvm::DIScope *EntryPointFn =
-      nullptr;                          /// Scope of SWIFT_ENTRY_POINT_FUNCTION.
-  TypeAliasDecl *MetadataTypeDecl;      /// The type decl for swift.type.
-  llvm::DIType *InternalType; /// Catch-all type for opaque internal types.
-
-  SILLocation::DebugLoc LastDebugLoc; /// The last location that was emitted.
-  const SILDebugScope *LastScope;     /// The scope of that last location.
-#ifndef NDEBUG
-  /// The basic block where the location was last changed.
-  llvm::BasicBlock *LastBasicBlock;
-  bool lineNumberIsSane(IRBuilder &Builder, unsigned Line);
-#endif
-
-  /// Used by pushLoc.
-  SmallVector<std::pair<SILLocation::DebugLoc, const SILDebugScope *>, 8>
-      LocationStack;
-
 public:
-  IRGenDebugInfo(const IRGenOptions &Opts, ClangImporter &CI, IRGenModule &IGM,
-                 llvm::Module &M, SourceFile *SF);
+  static IRGenDebugInfo *createIRGenDebugInfo(const IRGenOptions &Opts,
+                                              ClangImporter &CI,
+                                              IRGenModule &IGM, llvm::Module &M,
+                                              SourceFile *SF);
 
   /// Finalize the llvm::DIBuilder owned by this object.
   void finalize();
@@ -117,38 +58,29 @@
   void setCurrentLoc(IRBuilder &Builder, const SILDebugScope *DS,
                      Optional<SILLocation> Loc = None);
 
-  void clearLoc(IRBuilder &Builder) {
-    LastDebugLoc = {};
-    LastScope = nullptr;
-    Builder.SetCurrentDebugLocation(llvm::DebugLoc());
-  }
+  void clearLoc(IRBuilder &Builder);
 
   /// Push the current debug location onto a stack and initialize the
   /// IRBuilder to an empty location.
-  void pushLoc() {
-    LocationStack.push_back(std::make_pair(LastDebugLoc, LastScope));
-    LastDebugLoc = {};
-    LastScope = nullptr;
-  }
+  void pushLoc();
 
   /// Restore the current debug location from the stack.
-  void popLoc() {
-    std::tie(LastDebugLoc, LastScope) = LocationStack.pop_back_val();
-  }
+  void popLoc();
 
   /// Emit the final line 0 location for the unified trap block at the
   /// end of the function.
   void setArtificialTrapLocation(IRBuilder &Builder,
-                                 const SILDebugScope *Scope) {
-    auto DL = llvm::DebugLoc::get(0, 0, getOrCreateScope(Scope));
-    Builder.SetCurrentDebugLocation(DL);
-  }
+                                 const SILDebugScope *Scope);
 
   /// Set the location for SWIFT_ENTRY_POINT_FUNCTION.
   void setEntryPointLoc(IRBuilder &Builder);
 
   /// Return the scope for SWIFT_ENTRY_POINT_FUNCTION.
   llvm::DIScope *getEntryPointFn();
+
+  /// Translate a SILDebugScope into an llvm::DIDescriptor.
+  llvm::DIScope *getOrCreateScope(const SILDebugScope *DS);
+
   
   /// Emit debug info for an import declaration.
   ///
@@ -194,8 +126,8 @@
                                DebugTypeInfo Ty, const SILDebugScope *DS,
                                ValueDecl *VarDecl, StringRef Name,
                                unsigned ArgNo = 0,
-                               IndirectionKind = DirectValue,
-                               ArtificialKind = RealValue);
+                               IndirectionKind Indirection = DirectValue,
+                               ArtificialKind Artificial = RealValue);
 
   /// Emit a dbg.declare or dbg.value intrinsic, depending on Storage.
   void emitDbgIntrinsic(IRBuilder &Builder, llvm::Value *Storage,
@@ -215,158 +147,10 @@
                         StringRef Name);
 
   /// Return the DIBuilder.
-  llvm::DIBuilder &getBuilder() { return DBuilder; }
+  llvm::DIBuilder &getBuilder();
 
   /// Decode (and cache) a SourceLoc.
   SILLocation::DebugLoc decodeSourceLoc(SourceLoc SL);
-private:
-  /// Decode (and cache) a SILLocation.
-  SILLocation::DebugLoc decodeDebugLoc(SILLocation Loc);
-  /// Return the debug location from a SILLocation.
-  SILLocation::DebugLoc getDebugLocation(Optional<SILLocation> OptLoc);
-  /// Return the start of the location's source range.
-  SILLocation::DebugLoc getStartLocation(Optional<SILLocation> OptLoc);
-
-
-  StringRef BumpAllocatedString(const char *Data, size_t Length);
-  StringRef BumpAllocatedString(std::string S);
-  StringRef BumpAllocatedString(StringRef S);
-
-  /// Construct a DIType from a DebugTypeInfo object.
-  ///
-  /// At this point we do not plan to emit full DWARF for all swift
-  /// types, the goal is to emit only the name and provenance of the
-  /// type, where possible. A can import the type definition directly
-  /// from the module/framework/source file the type is specified in.
-  /// For this reason we emit the fully qualified (=mangled) name for
-  /// each type whenever possible.
-  ///
-  /// The ultimate goal is to emit something like a
-  /// DW_TAG_APPLE_ast_ref_type (an external reference) instead of a
-  /// local reference to the type.
-  llvm::DIType *createType(DebugTypeInfo DbgTy, StringRef MangledName,
-                           llvm::DIScope *Scope, llvm::DIFile *File);
-  /// Get a previously created type from the cache.
-  llvm::DIType *getTypeOrNull(TypeBase *Ty);
-  /// Get the DIType corresponding to this DebugTypeInfo from the cache,
-  /// or build a fresh DIType otherwise.  There is the underlying
-  /// assumption that no two types that share the same canonical type
-  /// can have different storage size or alignment.
-  llvm::DIType *getOrCreateType(DebugTypeInfo DbgTy);
-  /// Translate a SILDebugScope into an llvm::DIDescriptor.
-  llvm::DIScope *getOrCreateScope(const SILDebugScope *DS);
-  /// Build the context chain for a given DeclContext.
-  llvm::DIScope *getOrCreateContext(DeclContext *DC);
-
-  /// Construct an LLVM inlined-at location from a SILDebugScope,
-  /// reversing the order in the process.
-  llvm::MDNode *createInlinedAt(const SILDebugScope *CallSite);
-
-  /// Translate filenames into DIFiles.
-  llvm::DIFile *getOrCreateFile(StringRef Filename);
-  /// Return a DIType for Ty reusing any DeclContext found in DbgTy.
-  llvm::DIType *getOrCreateDesugaredType(Type Ty, DebugTypeInfo DbgTy);
-
-  /// Attempt to figure out the unmangled name of a function.
-  StringRef getName(const FuncDecl &FD);
-  /// Attempt to figure out the unmangled name of a function.
-  StringRef getName(SILLocation L);
-  StringRef getMangledName(TypeAliasDecl *Decl);
-  /// Return the mangled name of any nominal type, including the global
-  /// _Tt prefix, which marks the Swift namespace for types in DWARF.
-  StringRef getMangledName(DebugTypeInfo DbgTy);
-  /// Create the array of function parameters for a function type.
-  llvm::DITypeRefArray createParameterTypes(CanSILFunctionType FnTy,
-                                            DeclContext *DeclCtx,
-                                            GenericEnvironment *GE);
-  /// Create the array of function parameters for FnTy. SIL Version.
-  llvm::DITypeRefArray createParameterTypes(SILType SILTy, DeclContext *DeclCtx,
-                                            GenericEnvironment *GE);
-  /// Create a single parameter type and push it.
-  void createParameterType(llvm::SmallVectorImpl<llvm::Metadata *> &Parameters,
-                           SILType CanTy, DeclContext *DeclCtx,
-                           GenericEnvironment *GE);
-  /// Return an array with the DITypes for each of a tuple's elements.
-  llvm::DINodeArray
-  getTupleElements(TupleType *TupleTy, llvm::DIScope *Scope, llvm::DIFile *File,
-                   llvm::DINode::DIFlags Flags, DeclContext *DeclContext,
-                   GenericEnvironment *GE, unsigned &SizeInBits);
-  llvm::DIFile *getFile(llvm::DIScope *Scope);
-  llvm::DIModule *getOrCreateModule(ModuleDecl::ImportedModule M);
-  /// Return a cached module for an access path or create a new one.
-  llvm::DIModule *getOrCreateModule(StringRef Key, llvm::DIScope *Parent,
-                                    StringRef Name, StringRef IncludePath);
-  llvm::DIScope *getModule(StringRef MangledName);
-  /// Return an array with the DITypes for each of a struct's elements.
-  llvm::DINodeArray getStructMembers(NominalTypeDecl *D, Type BaseTy,
-                                     llvm::DIScope *Scope, llvm::DIFile *File,
-                                     llvm::DINode::DIFlags Flags,
-                                     unsigned &SizeInBits);
-  /// Create a temporary forward declaration for a struct and add it to
-  /// the type cache so we can safely build recursive types.
-  llvm::DICompositeType *
-  createStructType(DebugTypeInfo DbgTy, NominalTypeDecl *Decl, Type BaseTy,
-                   llvm::DIScope *Scope, llvm::DIFile *File, unsigned Line,
-                   unsigned SizeInBits, unsigned AlignInBits,
-                   llvm::DINode::DIFlags Flags,
-                   llvm::DIType *DerivedFrom, unsigned RuntimeLang,
-                   StringRef UniqueID);
-
-  /// Create a member of a struct, class, tuple, or enum.
-  llvm::DIDerivedType *createMemberType(DebugTypeInfo DbgTy, StringRef Name,
-                                        unsigned &OffsetInBits,
-                                        llvm::DIScope *Scope,
-                                        llvm::DIFile *File,
-                                        llvm::DINode::DIFlags Flags);
-  /// Return an array with the DITypes for each of an enum's elements.
-  llvm::DINodeArray getEnumElements(DebugTypeInfo DbgTy, EnumDecl *D,
-                                    llvm::DIScope *Scope, llvm::DIFile *File,
-                                    llvm::DINode::DIFlags Flags);
-  /// Create a temporary forward declaration for an enum and add it to
-  /// the type cache so we can safely build recursive types.
-  llvm::DICompositeType *createEnumType(DebugTypeInfo DbgTy, EnumDecl *Decl,
-                                        StringRef MangledName,
-                                        llvm::DIScope *Scope,
-                                        llvm::DIFile *File, unsigned Line,
-                                        llvm::DINode::DIFlags Flags);
-  /// Convenience function that creates a forward declaration for PointeeTy.
-  llvm::DIType *createPointerSizedStruct(llvm::DIScope *Scope, StringRef Name,
-                                         llvm::DIFile *File, unsigned Line,
-                                         llvm::DINode::DIFlags Flags,
-                                         StringRef MangledName);
-  /// Create a pointer-sized struct with a mangled name and a single
-  /// member of PointeeTy.
-  llvm::DIType *createPointerSizedStruct(llvm::DIScope *Scope, StringRef Name,
-                                         llvm::DIType *PointeeTy,
-                                         llvm::DIFile *File, unsigned Line,
-                                         llvm::DINode::DIFlags Flags,
-                                         StringRef MangledName);
-  /// Create a 2*pointer-sized struct with a mangled name and a single
-  /// member of PointeeTy.
-  llvm::DIType *createDoublePointerSizedStruct(
-      llvm::DIScope *Scope, StringRef Name, llvm::DIType *PointeeTy,
-      llvm::DIFile *File, unsigned Line, llvm::DINode::DIFlags Flags,
-      StringRef MangledName);
-
-  /// Create DWARF debug info for a function pointer type.
-  llvm::DIType *createFunctionPointer(DebugTypeInfo DbgTy, llvm::DIScope *Scope,
-                                      unsigned SizeInBits, unsigned AlignInBits,
-                                      llvm::DINode::DIFlags Flags,
-                                      StringRef MangledName);
-
-  /// Create DWARF debug info for a tuple type.
-  llvm::DIType *createTuple(DebugTypeInfo DbgTy, llvm::DIScope *Scope,
-                            unsigned SizeInBits, unsigned AlignInBits,
-                            llvm::DINode::DIFlags Flags, StringRef MangledName);
-
-  /// Create an opaque struct with a mangled name.
-  llvm::DIType *createOpaqueStruct(llvm::DIScope *Scope, StringRef Name,
-                                   llvm::DIFile *File, unsigned Line,
-                                   unsigned SizeInBits, unsigned AlignInBits,
-                                   llvm::DINode::DIFlags Flags,
-                                   StringRef MangledName);
-  uint64_t getSizeOfBasicType(DebugTypeInfo DbgTy);
-  TypeAliasDecl *getMetadataType();
 };
 
 /// An RAII object that autorestores the debug location.
@@ -376,17 +160,9 @@
   llvm::DebugLoc SavedLocation;
 
 public:
-  AutoRestoreLocation(IRGenDebugInfo *DI, IRBuilder &Builder)
-      : DI(DI), Builder(Builder) {
-    if (DI)
-      SavedLocation = Builder.getCurrentDebugLocation();
-  }
-
+  AutoRestoreLocation(IRGenDebugInfo *DI, IRBuilder &Builder);
   /// Autorestore everything back to normal.
-  ~AutoRestoreLocation() {
-    if (DI)
-      Builder.SetCurrentDebugLocation(SavedLocation);
-  }
+  ~AutoRestoreLocation();
 };
 
 /// An RAII object that temporarily switches to an artificial debug
@@ -400,13 +176,7 @@
 public:
   /// Set the current location to line 0, but within scope DS.
   ArtificialLocation(const SILDebugScope *DS, IRGenDebugInfo *DI,
-                     IRBuilder &Builder)
-      : AutoRestoreLocation(DI, Builder) {
-    if (DI) {
-      auto DL = llvm::DebugLoc::get(0, 0, DI->getOrCreateScope(DS));
-      Builder.SetCurrentDebugLocation(DL);
-    }
-  }
+                     IRBuilder &Builder);
 };
 
 /// An RAII object that temporarily switches to an empty
@@ -414,11 +184,7 @@
 class PrologueLocation : public AutoRestoreLocation {
 public:
   /// Set the current location to an empty location.
-  PrologueLocation(IRGenDebugInfo *DI, IRBuilder &Builder)
-      : AutoRestoreLocation(DI, Builder) {
-    if (DI)
-      DI->clearLoc(Builder);
-  }
+  PrologueLocation(IRGenDebugInfo *DI, IRBuilder &Builder);
 };
 
 } // irgen
diff --git a/lib/IRGen/IRGenModule.cpp b/lib/IRGen/IRGenModule.cpp
index 1aa7e26..464fcfc 100644
--- a/lib/IRGen/IRGenModule.cpp
+++ b/lib/IRGen/IRGenModule.cpp
@@ -97,8 +97,8 @@
     CGO.setDebugInfo(clang::codegenoptions::DebugInfoKind::DebugLineTablesOnly);
     break;
   case IRGenDebugInfoKind::ASTTypes:
-    // TODO: Enable -gmodules for the clang code generator.
   case IRGenDebugInfoKind::DwarfTypes:
+    CGO.DebugTypeExtRefs = true;
     CGO.setDebugInfo(clang::codegenoptions::DebugInfoKind::FullDebugInfo);
     break;
   }
@@ -380,7 +380,8 @@
   UseSwiftCC = (SwiftCC == llvm::CallingConv::Swift);
 
   if (IRGen.Opts.DebugInfoKind > IRGenDebugInfoKind::None)
-    DebugInfo = new IRGenDebugInfo(IRGen.Opts, *CI, *this, Module, SF);
+    DebugInfo = IRGenDebugInfo::createIRGenDebugInfo(IRGen.Opts, *CI, *this,
+                                                     Module, SF);
 
   initClangTypeConverter();
 
@@ -558,6 +559,9 @@
 #define FUNCTION_FOR_CONV_C_CC(ID, NAME, CC, RETURNS, ARGS, ATTRS)             \
   FUNCTION_IMPL(ID, NAME, CC, QUOTE(RETURNS), QUOTE(ARGS), QUOTE(ATTRS))
 
+#define FUNCTION_FOR_CONV_SwiftCC(ID, NAME, CC, RETURNS, ARGS, ATTRS)          \
+  FUNCTION_IMPL(ID, NAME, CC, QUOTE(RETURNS), QUOTE(ARGS), QUOTE(ATTRS))
+
 #define FUNCTION_FOR_CONV_RegisterPreservingCC(ID, NAME, CC, RETURNS, ARGS,    \
                                                ATTRS)                          \
   FUNCTION_WITH_GLOBAL_SYMBOL_IMPL(ID, NAME, SWIFT_RT_ENTRY_REF(NAME), CC,     \
@@ -748,6 +752,26 @@
   }
 }
 
+void IRGenerator::addClassForArchiveNameRegistration(ClassDecl *ClassDecl) {
+
+  // Those two attributes are interesting to us
+  if (!ClassDecl->getAttrs().hasAttribute<NSKeyedArchiveLegacyAttr>() &&
+      !ClassDecl->getAttrs().hasAttribute<StaticInitializeObjCMetadataAttr>())
+    return;
+
+  // Exclude some classes where those attributes make no sense but could be set
+  // for some reason. Just to be on the safe side.
+  Type ClassTy = ClassDecl->getDeclaredType();
+  if (ClassTy->is<UnboundGenericType>())
+    return;
+  if (ClassTy->hasArchetype())
+    return;
+  if (ClassDecl->hasClangNode())
+    return;
+
+  ClassesForArchiveNameRegistration.push_back(ClassDecl);
+}
+
 llvm::AttributeSet IRGenModule::getAllocAttrs() {
   if (AllocAttrs.isEmpty()) {
     AllocAttrs = llvm::AttributeSet::get(LLVMContext,
diff --git a/lib/IRGen/IRGenModule.h b/lib/IRGen/IRGenModule.h
index e3c74b6..c41f44b 100644
--- a/lib/IRGen/IRGenModule.h
+++ b/lib/IRGen/IRGenModule.h
@@ -222,6 +222,8 @@
   /// The queue of lazy witness tables to emit.
   llvm::SmallVector<SILWitnessTable *, 4> LazyWitnessTables;
 
+  llvm::SmallVector<ClassDecl *, 4> ClassesForArchiveNameRegistration;
+
   /// The order in which all the SIL function definitions should
   /// appear in the translation unit.
   llvm::DenseMap<SILFunction*, unsigned> FunctionOrder;
@@ -296,6 +298,8 @@
   /// Emit a symbol identifying the reflection metadata version.
   void emitReflectionMetadataVersion();
 
+  void emitNSArchiveClassNameRegistration();
+
   /// Checks if the metadata of \p Nominal can be emitted lazily.
   ///
   /// If yes, \p Nominal is added to eligibleLazyMetadata and true is returned.
@@ -333,7 +337,9 @@
                                       {fieldTypes.begin(), fieldTypes.end()},
                                       fn, IGM});
   }
-  
+
+  void addClassForArchiveNameRegistration(ClassDecl *ClassDecl);
+
   unsigned getFunctionOrder(SILFunction *F) {
     auto it = FunctionOrder.find(F);
     assert(it != FunctionOrder.end() &&
diff --git a/lib/IRGen/IRGenSIL.cpp b/lib/IRGen/IRGenSIL.cpp
index edf7ca8..2cc1304 100644
--- a/lib/IRGen/IRGenSIL.cpp
+++ b/lib/IRGen/IRGenSIL.cpp
@@ -16,6 +16,7 @@
 //===----------------------------------------------------------------------===//
 
 #define DEBUG_TYPE "irgensil"
+#include "llvm/IR/DIBuilder.h"
 #include "llvm/IR/Function.h"
 #include "llvm/IR/Module.h"
 #include "llvm/IR/Instructions.h"
@@ -274,11 +275,6 @@
     return kind == Kind::BoxWithAddress;
   }
   
-  Address getAddress() const {
-    assert(kind == Kind::Address && "not an allocated address");
-    return address.getAddress();
-  }
-
   StackAddress getStackAddress() const {
     assert(kind == Kind::Address && "not an allocated address");
     return address;
@@ -301,6 +297,17 @@
     assert(kind == Kind::DynamicallyEnforcedAddress);
     return dynamicallyEnforcedAddress;
   }
+
+  Address getAnyAddress() const {
+    if (kind == LoweredValue::Kind::Address) {
+      return address.getAddress();
+    } else if (kind == LoweredValue::Kind::ContainedAddress) {
+      return getAddressInContainer();
+    } else {
+      assert(kind == LoweredValue::Kind::DynamicallyEnforcedAddress);
+      return getDynamicallyEnforcedAddress().Addr;
+    }
+  }
   
   void getExplosion(IRGenFunction &IGF, Explosion &ex) const;
   
@@ -559,15 +566,7 @@
   /// Get the Address of a SIL value of address type, which must have been
   /// lowered.
   Address getLoweredAddress(SILValue v) {
-    auto &&lv = getLoweredValue(v);
-    if (lv.kind == LoweredValue::Kind::Address) {
-      return lv.getAddress();
-    } else if (lv.kind == LoweredValue::Kind::ContainedAddress) {
-      return lv.getAddressInContainer();
-    } else {
-      assert(lv.kind == LoweredValue::Kind::DynamicallyEnforcedAddress);
-      return lv.getDynamicallyEnforcedAddress().Addr;
-    }
+    return getLoweredValue(v).getAnyAddress();
   }
 
   StackAddress getLoweredStackAddress(SILValue v) {
@@ -2623,14 +2622,13 @@
                                               OperandValueArrayRef args) {
   unsigned phiIndex = 0;
   for (SILValue arg : args) {
-    const LoweredValue &lv = IGF.getLoweredValue(arg);
-  
-    if (lv.isAddress()) {
-      addIncomingAddressToPHINodes(IGF, lbb, phiIndex, lv.getAddress());
+    if (arg->getType().isAddress()) {
+      addIncomingAddressToPHINodes(IGF, lbb, phiIndex,
+                                   IGF.getLoweredAddress(arg));
       continue;
     }
     
-    Explosion argValue = lv.getExplosion(IGF);
+    Explosion argValue = IGF.getLoweredExplosion(arg);
     addIncomingExplosionToPHINodes(IGF, lbb, phiIndex, argValue);
   }
 }
@@ -2799,7 +2797,7 @@
     return nullptr;
   
   llvm::Type *type = schema[0].getScalarType();
-  llvm::IntegerType *resultType = dyn_cast<llvm::IntegerType>(type);
+  auto *resultType = dyn_cast<llvm::IntegerType>(type);
   if (!resultType)
     return nullptr;
   
@@ -2815,7 +2813,7 @@
     if (index < 0)
       return nullptr;
     
-    IntegerLiteralInst *intLit = dyn_cast<IntegerLiteralInst>(casePair.second);
+    auto *intLit = dyn_cast<IntegerLiteralInst>(casePair.second);
     if (!intLit)
       return nullptr;
     
@@ -3954,7 +3952,7 @@
   }
 }
 
-static ExclusivityFlags getExclusivityFlags(SILAccessKind kind) {
+static ExclusivityFlags getExclusivityAction(SILAccessKind kind) {
   switch (kind) {
   case SILAccessKind::Read:
     return ExclusivityFlags::Read;
@@ -3967,9 +3965,20 @@
   llvm_unreachable("bad access kind");
 }
 
+static ExclusivityFlags getExclusivityFlags(SILModule &M,
+                                            SILAccessKind kind) {
+  auto flags = getExclusivityAction(kind);
+
+  // In old Swift compatibility modes, downgrade this to a warning.
+  if (M.getASTContext().LangOpts.isSwiftVersion3())
+    flags |= ExclusivityFlags::WarningOnly;
+
+  return flags;
+}
+
 template <class Inst>
 static ExclusivityFlags getExclusivityFlags(Inst *i) {
-  return getExclusivityFlags(i->getAccessKind());
+  return getExclusivityFlags(i->getModule(), i->getAccessKind());
 }
 
 void IRGenSILFunction::visitBeginAccessInst(BeginAccessInst *access) {
@@ -3994,8 +4003,9 @@
       Builder.CreateBitCast(addr.getAddress(), IGM.Int8PtrTy);
     llvm::Value *flags =
       llvm::ConstantInt::get(IGM.SizeTy, uint64_t(getExclusivityFlags(access)));
+    llvm::Value *pc = llvm::ConstantPointerNull::get(IGM.Int8PtrTy);
     auto call = Builder.CreateCall(IGM.getBeginAccessFn(),
-                                   { pointer, scratch, flags });
+                                   { pointer, scratch, flags, pc });
     call->setDoesNotThrow();
 
     setLoweredDynamicallyEnforcedAddress(access, addr, scratch);
@@ -4005,6 +4015,11 @@
   llvm_unreachable("bad access enforcement");
 }
 
+static bool hasBeenInlined(BeginUnpairedAccessInst *access) {
+  // Check to see if the buffer is defined locally.
+  return isa<AllocStackInst>(access->getBuffer());
+}
+
 void IRGenSILFunction::visitBeginUnpairedAccessInst(
                                               BeginUnpairedAccessInst *access) {
   Address addr = getLoweredAddress(access->getSource());
@@ -4024,8 +4039,26 @@
       Builder.CreateBitCast(addr.getAddress(), IGM.Int8PtrTy);
     llvm::Value *flags =
       llvm::ConstantInt::get(IGM.SizeTy, uint64_t(getExclusivityFlags(access)));
+
+    // Compute the effective PC of the access.
+    // Since begin_unpaired_access is designed for materializeForSet, our
+    // heuristic here is as well: we've either been inlined, in which case
+    // we should use the current PC (i.e. pass null), or we haven't,
+    // in which case we should use the caller, which is generally ok because
+    // materializeForSet can't usually be thunked.
+    llvm::Value *pc;
+    if (hasBeenInlined(access)) {
+      pc = llvm::ConstantPointerNull::get(IGM.Int8PtrTy);
+    } else {
+      auto retAddrFn =
+        llvm::Intrinsic::getDeclaration(IGM.getModule(),
+                                        llvm::Intrinsic::returnaddress);
+      pc = Builder.CreateCall(retAddrFn,
+                              { llvm::ConstantInt::get(IGM.Int32Ty, 0) });
+    }
+
     auto call = Builder.CreateCall(IGM.getBeginAccessFn(),
-                                   { pointer, scratch, flags });
+                                   { pointer, scratch, flags, pc });
     call->setDoesNotThrow();
     return;
   }
@@ -4647,16 +4680,18 @@
   // Get the value we're testing, which may be a function, an address or an
   // instance pointer.
   llvm::Value *val;
-  const LoweredValue &lv = getLoweredValue(i->getOperand());
-  
-  if (i->getOperand()->getType().is<SILFunctionType>()) {
-    Explosion values = lv.getExplosion(*this);
-    val = values.claimNext();   // Function pointer.
-    values.claimNext();         // Ignore the data pointer.
-  } else if (lv.isAddress()) {
-    val = lv.getAddress().getAddress();
+
+  SILValue operand = i->getOperand();
+  auto type = operand->getType();
+  if (type.isAddress()) {
+    val = getLoweredAddress(operand).getAddress();
+  } else if (auto fnType = type.getAs<SILFunctionType>()) {
+    Explosion values = getLoweredExplosion(operand);
+    val = values.claimNext();    // Function pointer.
+    if (fnType->getRepresentation() == SILFunctionTypeRepresentation::Thick)
+      (void) values.claimNext(); // Ignore the data pointer.
   } else {
-    Explosion values = lv.getExplosion(*this);
+    Explosion values = getLoweredExplosion(operand);
     val = values.claimNext();
   }
   
@@ -5049,7 +5084,7 @@
       setAllocatedAddressForBuffer(i->getDest(), addr);
     }
   } else {
-    Address dest = loweredDest.getAddress();
+    Address dest = loweredDest.getAnyAddress();
     
     if (i->isInitializationOfDest()) {
       if (i->isTakeOfSrc()) {
diff --git a/lib/IRGen/LoadableByAddress.cpp b/lib/IRGen/LoadableByAddress.cpp
index cd9289a..c0475ba 100644
--- a/lib/IRGen/LoadableByAddress.cpp
+++ b/lib/IRGen/LoadableByAddress.cpp
@@ -1,5 +1,4 @@
-//===--- LoadableByAddress.cpp - Lower SIL address-only types.
-//--------------===//
+//===--- LoadableByAddress.cpp - Lower SIL address-only types. ------------===//
 //
 // This source file is part of the Swift.org open source project
 //
@@ -134,10 +133,50 @@
   return false;
 }
 
-// Forward declaration - two functions depend on each other
+// Forward declarations - functions depend on each other
 static SmallVector<SILParameterInfo, 4>
 getNewArgTys(GenericEnvironment *GenericEnv, ArrayRef<SILParameterInfo> params,
              irgen::IRGenModule &Mod);
+static SILType getNewSILType(GenericEnvironment *GenericEnv,
+                             SILType storageType, irgen::IRGenModule &Mod);
+
+static bool newResultsDiffer(GenericEnvironment *GenericEnv,
+                             ArrayRef<SILResultInfo> origResults,
+                             irgen::IRGenModule &Mod) {
+  SmallVector<SILResultInfo, 2> newResults;
+  for (auto result : origResults) {
+    SILType currResultTy = result.getSILStorageType();
+    SILType newSILType = getNewSILType(GenericEnv, currResultTy, Mod);
+    // We (currently) only care about function signatures
+    if (!isLargeLoadableType(GenericEnv, currResultTy, Mod) &&
+        (newSILType != currResultTy)) {
+      return true;
+    }
+  }
+  return false;
+}
+
+static SmallVector<SILResultInfo, 2>
+getNewResults(GenericEnvironment *GenericEnv,
+              ArrayRef<SILResultInfo> origResults, irgen::IRGenModule &Mod) {
+  // Get new SIL Function results - same as old results UNLESS:
+  // Function type results might have a different signature
+  SmallVector<SILResultInfo, 2> newResults;
+  for (auto result : origResults) {
+    SILType currResultTy = result.getSILStorageType();
+    SILType newSILType = getNewSILType(GenericEnv, currResultTy, Mod);
+    // We (currently) only care about function signatures
+    if (!isLargeLoadableType(GenericEnv, currResultTy, Mod) &&
+        (newSILType != currResultTy)) {
+      SILResultInfo newResult(newSILType.getSwiftRValueType(),
+                              result.getConvention());
+      newResults.push_back(newResult);
+    } else {
+      newResults.push_back(result);
+    }
+  }
+  return newResults;
+}
 
 static SILFunctionType *
 getNewSILFunctionTypePtr(GenericEnvironment *GenericEnv,
@@ -146,13 +185,13 @@
   assert(modifiableFunction(CanSILFunctionType(currSILFunctionType)));
   SmallVector<SILParameterInfo, 4> newArgTys =
       getNewArgTys(GenericEnv, currSILFunctionType->getParameters(), Mod);
-  SILFunctionType *newSILFunctionType =
-      SILFunctionType::get(currSILFunctionType->getGenericSignature(),
-                           currSILFunctionType->getExtInfo(),
-                           currSILFunctionType->getCalleeConvention(),
-                           newArgTys, currSILFunctionType->getResults(),
-                           currSILFunctionType->getOptionalErrorResult(),
-                           currSILFunctionType->getASTContext());
+  SILFunctionType *newSILFunctionType = SILFunctionType::get(
+      currSILFunctionType->getGenericSignature(),
+      currSILFunctionType->getExtInfo(),
+      currSILFunctionType->getCalleeConvention(), newArgTys,
+      getNewResults(GenericEnv, currSILFunctionType->getResults(), Mod),
+      currSILFunctionType->getOptionalErrorResult(),
+      currSILFunctionType->getASTContext());
   return newSILFunctionType;
 }
 
@@ -171,12 +210,67 @@
   return newSILType;
 }
 
+// Get the function type or the optional function type
+static SILFunctionType *getInnerFunctionType(SILType storageType) {
+  CanType currCanType = storageType.getSwiftRValueType();
+  if (SILFunctionType *currSILFunctionType =
+          dyn_cast<SILFunctionType>(currCanType.getPointer())) {
+    return currSILFunctionType;
+  }
+  OptionalTypeKind optKind;
+  if (auto optionalType = currCanType.getAnyOptionalObjectType(optKind)) {
+    assert(optKind != OptionalTypeKind::OTK_None &&
+           "Expected Real Optional Type");
+    if (auto *currSILFunctionType =
+            dyn_cast<SILFunctionType>(optionalType.getPointer())) {
+      return currSILFunctionType;
+    }
+  }
+  return nullptr;
+}
+
+static SILType getNewOptionalFunctionType(GenericEnvironment *GenericEnv,
+                                          SILType storageType,
+                                          irgen::IRGenModule &Mod) {
+  SILType newSILType = storageType;
+  CanType currCanType = storageType.getSwiftRValueType();
+  OptionalTypeKind optKind;
+  if (auto optionalType = currCanType.getAnyOptionalObjectType(optKind)) {
+    assert(optKind != OptionalTypeKind::OTK_None &&
+           "Expected Real Optional Type");
+    if (auto *currSILFunctionType =
+            dyn_cast<SILFunctionType>(optionalType.getPointer())) {
+      if (containsLargeLoadable(GenericEnv,
+                                currSILFunctionType->getParameters(), Mod)) {
+        newSILType =
+            getNewSILFunctionType(GenericEnv, currSILFunctionType, Mod);
+        currCanType = newSILType.getSwiftRValueType();
+        auto newType = OptionalType::get(optKind, currCanType);
+        CanType newCanType = newType->getCanonicalType();
+        newSILType = SILType::getPrimitiveObjectType(newCanType);
+        if (storageType.isAddress()) {
+          newSILType = newSILType.getAddressType();
+        }
+      }
+    }
+  }
+  return newSILType;
+}
+
 static SmallVector<SILParameterInfo, 4>
 getNewArgTys(GenericEnvironment *GenericEnv, ArrayRef<SILParameterInfo> params,
              irgen::IRGenModule &Mod) {
   SmallVector<SILParameterInfo, 4> newArgTys;
   for (SILParameterInfo param : params) {
     SILType storageType = param.getSILStorageType();
+    SILType newOptFuncType =
+        getNewOptionalFunctionType(GenericEnv, storageType, Mod);
+    if (newOptFuncType != storageType) {
+      auto newParam = SILParameterInfo(newOptFuncType.getSwiftRValueType(),
+                                       param.getConvention());
+      newArgTys.push_back(newParam);
+      continue;
+    }
     CanType currCanType = storageType.getSwiftRValueType();
     if (SILFunctionType *currSILFunctionType =
             dyn_cast<SILFunctionType>(currCanType.getPointer())) {
@@ -184,6 +278,9 @@
                                 currSILFunctionType->getParameters(), Mod)) {
         SILType newSILType =
             getNewSILFunctionType(GenericEnv, currSILFunctionType, Mod);
+        if (storageType.isAddress()) {
+          newSILType = newSILType.getAddressType();
+        }
         auto newParam = SILParameterInfo(newSILType.getSwiftRValueType(),
                                          param.getConvention());
         newArgTys.push_back(newParam);
@@ -205,26 +302,11 @@
 
 static SILType getNewSILType(GenericEnvironment *GenericEnv,
                              SILType storageType, irgen::IRGenModule &Mod) {
-  SILType newSILType = storageType;
-  CanType currCanType = storageType.getSwiftRValueType();
-  OptionalTypeKind optKind;
-  if (auto optionalType = currCanType.getAnyOptionalObjectType(optKind)) {
-    assert(optKind != OptionalTypeKind::OTK_None &&
-           "Expected Real Optional Type");
-    if (SILFunctionType *currSILFunctionType =
-            dyn_cast<SILFunctionType>(optionalType.getPointer())) {
-      if (containsLargeLoadable(GenericEnv,
-                                currSILFunctionType->getParameters(), Mod)) {
-        newSILType =
-            getNewSILFunctionType(GenericEnv, currSILFunctionType, Mod);
-        currCanType = newSILType.getSwiftRValueType();
-        auto newType = OptionalType::get(optKind, currCanType);
-        CanType newCanType = newType->getCanonicalType();
-        newSILType = SILType::getPrimitiveObjectType(newCanType);
-        return newSILType;
-      }
-    }
+  SILType newSILType = getNewOptionalFunctionType(GenericEnv, storageType, Mod);
+  if (newSILType != storageType) {
+    return newSILType;
   }
+  CanType currCanType = storageType.getSwiftRValueType();
   if (auto *currSILBlockType =
           dyn_cast<SILBlockStorageType>(currCanType.getPointer())) {
     return storageType;
@@ -234,6 +316,9 @@
     if (containsLargeLoadable(GenericEnv, currSILFunctionType->getParameters(),
                               Mod)) {
       newSILType = getNewSILFunctionType(GenericEnv, currSILFunctionType, Mod);
+      if (storageType.isAddress()) {
+        newSILType = newSILType.getAddressType();
+      }
     }
   } else if (isLargeLoadableType(GenericEnv, storageType, Mod)) {
     newSILType = storageType.getAddressType();
@@ -267,6 +352,12 @@
   SmallVector<SwitchEnumInst *, 16> switchEnumInstsToMod;
   // All struct_extract instrs that should be converted to struct_element_addr
   SmallVector<StructExtractInst *, 16> structExtractInstsToMod;
+  // All tuple instructions for which the return type is a function type
+  SmallVector<SILInstruction *, 8> tupleInstsToMod;
+  // All allock stack instructions to modify
+  SmallVector<AllocStackInst *, 8> allocStackInstsToMod;
+  // All pointer to address instructions to modify
+  SmallVector<PointerToAddressInst *, 8> pointerToAddrkInstsToMod;
   // All Retain and release instrs should be replaced with _addr version
   SmallVector<RetainValueInst *, 16> retainInstsToMod;
   SmallVector<ReleaseValueInst *, 16> releaseInstsToMod;
@@ -310,6 +401,9 @@
   void visitReleaseInst(ReleaseValueInst *instr);
   void visitResultTyInst(SILInstruction *instr);
   void visitDebugValueInst(DebugValueInst *instr);
+  void visitTupleInst(SILInstruction *instr);
+  void visitAllocStackInst(AllocStackInst *instr);
+  void visitPointerToAddressInst(PointerToAddressInst *instr);
   void visitInstr(SILInstruction *instr);
 };
 } // end anonymous namespace
@@ -341,6 +435,7 @@
       case ValueKind::StructElementAddrInst:
       case ValueKind::RefTailAddrInst:
       case ValueKind::RefElementAddrInst:
+      case ValueKind::BeginAccessInst:
       case ValueKind::EnumInst: {
         // TODO Any more instructions to add here?
         visitResultTyInst(currIns);
@@ -371,6 +466,21 @@
         visitSwitchEnumInst(SEI);
         break;
       }
+      case ValueKind::TupleElementAddrInst:
+      case ValueKind::TupleExtractInst: {
+        visitTupleInst(currIns);
+        break;
+      }
+      case ValueKind::AllocStackInst: {
+        auto *ASI = dyn_cast<AllocStackInst>(currIns);
+        visitAllocStackInst(ASI);
+        break;
+      }
+      case ValueKind::PointerToAddressInst: {
+        auto *PTA = dyn_cast<PointerToAddressInst>(currIns);
+        visitPointerToAddressInst(PTA);
+        break;
+      }
       default: {
         assert(!ApplySite::isa(currIns) && "Did not expect an ApplySite");
         assert(!dyn_cast<MethodInst>(currIns) && "Unhandled Method Inst");
@@ -393,11 +503,11 @@
     return false;
   }
   auto callee = applySite.getCallee();
-  if (dyn_cast<ProjectBlockStorageInst>(callee)) {
+  if (isa<ProjectBlockStorageInst>(callee)) {
     return false;
-  } else if (LoadInst *instr = dyn_cast<LoadInst>(callee)) {
+  } else if (auto *instr = dyn_cast<LoadInst>(callee)) {
     auto loadedSrcValue = instr->getOperand();
-    if (dyn_cast<ProjectBlockStorageInst>(loadedSrcValue)) {
+    if (isa<ProjectBlockStorageInst>(loadedSrcValue)) {
       return false;
     }
   }
@@ -426,6 +536,26 @@
       return;
     }
   }
+  SILType currType = applySite.getType();
+  SILType newType = getNewSILType(genEnv, currType, pass.Mod);
+  // We only care about function type results
+  if (!isLargeLoadableType(genEnv, currType, pass.Mod) &&
+      (currType != newType)) {
+    pass.applies.push_back(applySite.getInstruction());
+    return;
+  }
+  // Check callee - need new generic env:
+  SILFunctionType *origSILFunctionType = applySite.getSubstCalleeType();
+  GenericEnvironment *genEnvCallee = nullptr;
+  if (origSILFunctionType->isPolymorphic()) {
+    genEnvCallee = getGenericEnvironment(
+        applySite.getModule(), CanSILFunctionType(origSILFunctionType));
+  }
+  SILFunctionType *newSILFunctionType =
+      getNewSILFunctionTypePtr(genEnvCallee, origSILFunctionType, pass.Mod);
+  if (origSILFunctionType != newSILFunctionType) {
+    pass.applies.push_back(applySite.getInstruction());
+  }
 }
 
 static bool isMethodInstUnmodifiable(MethodInst *instr) {
@@ -470,6 +600,9 @@
     pass.methodInstsToMod.push_back(instr);
     return;
   }
+  if (newResultsDiffer(genEnv, currSILFunctionType->getResults(), pass.Mod)) {
+    pass.methodInstsToMod.push_back(instr);
+  }
 }
 
 void LargeValueVisitor::visitStoreInst(StoreInst *instr) {
@@ -544,6 +677,38 @@
   }
 }
 
+void LargeValueVisitor::visitTupleInst(SILInstruction *instr) {
+  SILType currSILType = instr->getType().getObjectType();
+  CanType currCanType = currSILType.getSwiftRValueType();
+  if (auto funcType = dyn_cast<SILFunctionType>(currCanType)) {
+    CanSILFunctionType canFuncType = CanSILFunctionType(funcType);
+    GenericEnvironment *genEnv = instr->getFunction()->getGenericEnvironment();
+    if (!genEnv && canFuncType->isPolymorphic()) {
+      genEnv = getGenericEnvironment(instr->getModule(), canFuncType);
+    }
+    SILFunctionType *newSILFunctionType =
+        getNewSILFunctionTypePtr(genEnv, funcType, pass.Mod);
+    if (funcType != newSILFunctionType) {
+      pass.tupleInstsToMod.push_back(instr);
+    }
+  }
+  visitInstr(instr);
+}
+
+void LargeValueVisitor::visitAllocStackInst(AllocStackInst *instr) {
+  SILType currSILType = instr->getType().getObjectType();
+  if (auto *fType = getInnerFunctionType(currSILType)) {
+    pass.allocStackInstsToMod.push_back(instr);
+  }
+}
+
+void LargeValueVisitor::visitPointerToAddressInst(PointerToAddressInst *instr) {
+  SILType currSILType = instr->getType().getObjectType();
+  if (auto *fType = getInnerFunctionType(currSILType)) {
+    pass.pointerToAddrkInstsToMod.push_back(instr);
+  }
+}
+
 void LargeValueVisitor::visitInstr(SILInstruction *instr) {
   for (Operand &operand : instr->getAllOperands()) {
     if (std::find(pass.largeLoadableArgs.begin(), pass.largeLoadableArgs.end(),
@@ -623,31 +788,31 @@
       break;
     }
     case ValueKind::RetainValueInst: {
-      RetainValueInst *insToInsert = dyn_cast<RetainValueInst>(userIns);
+      auto *insToInsert = dyn_cast<RetainValueInst>(userIns);
       assert(insToInsert && "Unexpected cast failure");
       pass.retainInstsToMod.push_back(insToInsert);
       break;
     }
     case ValueKind::ReleaseValueInst: {
-      ReleaseValueInst *insToInsert = dyn_cast<ReleaseValueInst>(userIns);
+      auto *insToInsert = dyn_cast<ReleaseValueInst>(userIns);
       assert(insToInsert && "Unexpected cast failure");
       pass.releaseInstsToMod.push_back(insToInsert);
       break;
     }
     case ValueKind::StoreInst: {
-      StoreInst *insToInsert = dyn_cast<StoreInst>(userIns);
+      auto *insToInsert = dyn_cast<StoreInst>(userIns);
       assert(insToInsert && "Unexpected cast failure");
       pass.storeInstsToMod.push_back(insToInsert);
       break;
     }
     case ValueKind::DebugValueInst: {
-      DebugValueInst *insToInsert = dyn_cast<DebugValueInst>(userIns);
+      auto *insToInsert = dyn_cast<DebugValueInst>(userIns);
       assert(insToInsert && "Unexpected cast failure");
       pass.debugInstsToMod.push_back(insToInsert);
       break;
     }
     case ValueKind::StructExtractInst: {
-      StructExtractInst *instToInsert = dyn_cast<StructExtractInst>(userIns);
+      auto *instToInsert = dyn_cast<StructExtractInst>(userIns);
       if (std::find(pass.structExtractInstsToMod.begin(),
                     pass.structExtractInstsToMod.end(),
                     instToInsert) == pass.structExtractInstsToMod.end()) {
@@ -656,7 +821,7 @@
       break;
     }
     case ValueKind::SwitchEnumInst: {
-      SwitchEnumInst *instToInsert = dyn_cast<SwitchEnumInst>(userIns);
+      auto *instToInsert = dyn_cast<SwitchEnumInst>(userIns);
       if (std::find(pass.switchEnumInstsToMod.begin(),
                     pass.switchEnumInstsToMod.end(),
                     instToInsert) == pass.switchEnumInstsToMod.end()) {
@@ -765,41 +930,41 @@
       break;
     }
     case ValueKind::RetainValueInst: {
-      RetainValueInst *insToInsert = dyn_cast<RetainValueInst>(userIns);
+      auto *insToInsert = dyn_cast<RetainValueInst>(userIns);
       assert(insToInsert && "Unexpected cast failure");
       pass.retainInstsToMod.push_back(insToInsert);
       usersToMod.push_back(user);
       break;
     }
     case ValueKind::ReleaseValueInst: {
-      ReleaseValueInst *insToInsert = dyn_cast<ReleaseValueInst>(userIns);
+      auto *insToInsert = dyn_cast<ReleaseValueInst>(userIns);
       assert(insToInsert && "Unexpected cast failure");
       pass.releaseInstsToMod.push_back(insToInsert);
       usersToMod.push_back(user);
       break;
     }
     case ValueKind::StoreInst: {
-      StoreInst *insToInsert = dyn_cast<StoreInst>(userIns);
+      auto *insToInsert = dyn_cast<StoreInst>(userIns);
       assert(insToInsert && "Unexpected cast failure");
       pass.storeInstsToMod.push_back(insToInsert);
       usersToMod.push_back(user);
       break;
     }
     case ValueKind::DebugValueInst: {
-      DebugValueInst *insToInsert = dyn_cast<DebugValueInst>(userIns);
+      auto *insToInsert = dyn_cast<DebugValueInst>(userIns);
       assert(insToInsert && "Unexpected cast failure");
       pass.debugInstsToMod.push_back(insToInsert);
       usersToMod.push_back(user);
       break;
     }
     case ValueKind::StructExtractInst: {
-      StructExtractInst *instToInsert = dyn_cast<StructExtractInst>(userIns);
+      auto *instToInsert = dyn_cast<StructExtractInst>(userIns);
       pass.structExtractInstsToMod.push_back(instToInsert);
       usersToMod.push_back(user);
       break;
     }
     case ValueKind::SwitchEnumInst: {
-      SwitchEnumInst *instToInsert = dyn_cast<SwitchEnumInst>(userIns);
+      auto *instToInsert = dyn_cast<SwitchEnumInst>(userIns);
       pass.switchEnumInstsToMod.push_back(instToInsert);
       usersToMod.push_back(user);
       break;
@@ -816,19 +981,19 @@
 
 void LoadableStorageAllocation::allocateLoadableStorage() {
   if (modifiableFunction(pass.F->getLoweredFunctionType())) {
-    // Turn by-vlaue function args to by-address ones
+    // Turn by-value function args to by-address ones
     convertIndirectFunctionArgs();
   } else {
     convertIndirectFunctionPointerArgsForUnmodifiable();
   }
 
-  // Turn by-vlaue BB args to by-address ones
+  // Turn by-value BB args to by-address ones
   convertIndirectBasicBlockArgs();
 
   // Populate the pass' data structs
   LargeValueVisitor(pass).mapValueStorage();
 
-  // Create an AllocStack for every used large loadble type in the function.
+  // Create an AllocStack for every used large loadable type in the function.
   for (auto &argToAlloc : pass.argsToLoadedValueMap) {
     assert(argToAlloc.first == argToAlloc.second);
     allocateForArg(argToAlloc.first);
@@ -991,6 +1156,7 @@
   void recreateConvInstrs();
   void recreateLoadInstrs();
   void recreateUncheckedEnumDataInstrs();
+  void recreateUncheckedTakeEnumDataAddrInst();
   void fixStoreToBlockStorageInstrs();
 
 private:
@@ -998,6 +1164,8 @@
   llvm::SetVector<SILInstruction *> conversionInstrs;
   llvm::SetVector<LoadInst *> loadInstrsOfFunc;
   llvm::SetVector<UncheckedEnumDataInst *> uncheckedEnumDataOfFunc;
+  llvm::SetVector<UncheckedTakeEnumDataAddrInst *>
+      uncheckedTakeEnumDataAddrOfFunc;
   llvm::SetVector<StoreInst *> storeToBlockStorageInstrs;
   llvm::DenseSet<SILInstruction *> modApplies;
 };
@@ -1016,7 +1184,7 @@
       if (modifiableApply(site, pass.Mod)) {
         userOp->set(allocInstr);
       }
-    } else if (StoreInst *storeUser = dyn_cast<StoreInst>(user)) {
+    } else if (auto *storeUser = dyn_cast<StoreInst>(user)) {
       // Optimization: replace with copy_addr to reduce code size
       assert(std::find(pass.storeInstsToMod.begin(), pass.storeInstsToMod.end(),
                        storeUser) == pass.storeInstsToMod.end() &&
@@ -1064,8 +1232,8 @@
                                              SILValue value,
                                              SILInstruction *applyInst) {
   assert(value->getType().isObject());
-  SILArgument *arg = dyn_cast<SILArgument>(value);
-  assert(arg && "non-instr operand must be an argmuent");
+  auto *arg = dyn_cast<SILArgument>(value);
+  assert(arg && "non-instr operand must be an argument");
 
   SILBuilder allocBuilder(pass.F->begin()->begin());
   AllocStackInst *allocInstr =
@@ -1145,6 +1313,43 @@
   return allUsesAreReplaceable;
 }
 
+static void castTupleInstr(SILInstruction *instr, IRGenModule &Mod) {
+  SILType currSILType = instr->getType().getObjectType();
+  CanType currCanType = currSILType.getSwiftRValueType();
+  SILFunctionType *funcType = dyn_cast<SILFunctionType>(currCanType);
+  assert(funcType && "Expected SILFunctionType as tuple's return");
+  CanSILFunctionType canFuncType = CanSILFunctionType(funcType);
+  GenericEnvironment *genEnv = instr->getFunction()->getGenericEnvironment();
+  if (!genEnv && canFuncType->isPolymorphic()) {
+    genEnv = getGenericEnvironment(instr->getModule(), canFuncType);
+  }
+  SILType newSILType = getNewSILFunctionType(genEnv, funcType, Mod);
+  if (currSILType.isAddress()) {
+    newSILType = newSILType.getAddressType();
+  }
+  auto II = instr->getIterator();
+  ++II;
+  SILBuilder castBuilder(II);
+  SILInstruction *castInstr = nullptr;
+  switch (instr->getKind()) {
+  // Add cast to the new sil function type:
+  case ValueKind::TupleExtractInst: {
+    castInstr = castBuilder.createUncheckedBitCast(instr->getLoc(), instr,
+                                                   newSILType.getObjectType());
+    break;
+  }
+  case ValueKind::TupleElementAddrInst: {
+    castInstr = castBuilder.createUncheckedAddrCast(
+        instr->getLoc(), instr, newSILType.getAddressType());
+    break;
+  }
+  default:
+    llvm_unreachable("Unexpected instruction inside tupleInstsToMod");
+  }
+  instr->replaceAllUsesWith(castInstr);
+  castInstr->setOperand(0, instr);
+}
+
 static void rewriteFunction(StructLoweringState &pass,
                             LoadableStorageAllocation &allocator) {
 
@@ -1253,7 +1458,7 @@
           // Get its storage location as a new operand
           if (!currOperandInstr) {
             allocateAndSetForArgumentOperand(pass, currOperand, applyInst);
-          } else if (LoadInst *load = dyn_cast<LoadInst>(currOperandInstr)) {
+          } else if (auto *load = dyn_cast<LoadInst>(currOperandInstr)) {
             if (allUsesAreReplaceable(load, pass.Mod)) {
               allocator.replaceLoadWithCopyAddr(load);
             } else {
@@ -1287,6 +1492,32 @@
     }
   }
 
+  for (SILInstruction *instr : pass.tupleInstsToMod) {
+    castTupleInstr(instr, pass.Mod);
+  }
+
+  while (!pass.allocStackInstsToMod.empty()) {
+    auto *instr = pass.allocStackInstsToMod.pop_back_val();
+    SILBuilder allocBuilder(instr);
+    SILType currSILType = instr->getType();
+    SILType newSILType = getNewSILType(genEnv, currSILType, pass.Mod);
+    auto *newInstr = allocBuilder.createAllocStack(instr->getLoc(), newSILType);
+    instr->replaceAllUsesWith(newInstr);
+    instr->getParent()->erase(instr);
+  }
+
+  while (!pass.pointerToAddrkInstsToMod.empty()) {
+    auto *instr = pass.pointerToAddrkInstsToMod.pop_back_val();
+    SILBuilder pointerBuilder(instr);
+    SILType currSILType = instr->getType();
+    SILType newSILType = getNewSILType(genEnv, currSILType, pass.Mod);
+    auto *newInstr = pointerBuilder.createPointerToAddress(
+        instr->getLoc(), instr->getOperand(), newSILType.getAddressType(),
+        instr->isStrict());
+    instr->replaceAllUsesWith(newInstr);
+    instr->getParent()->erase(instr);
+  }
+
   for (SILInstruction *instr : pass.debugInstsToMod) {
     assert(instr->getAllOperands().size() == 1 &&
            "Debug instructions have one operand");
@@ -1349,34 +1580,41 @@
     SILInstruction *newInstr = nullptr;
     switch (instr->getKind()) {
     case ValueKind::StructExtractInst: {
-      StructExtractInst *convInstr = dyn_cast<StructExtractInst>(instr);
+      auto *convInstr = dyn_cast<StructExtractInst>(instr);
       newInstr = resultTyBuilder.createStructExtract(
           Loc, convInstr->getOperand(), convInstr->getField(),
           newSILType.getObjectType());
       break;
     }
     case ValueKind::StructElementAddrInst: {
-      StructElementAddrInst *convInstr = dyn_cast<StructElementAddrInst>(instr);
+      auto *convInstr = dyn_cast<StructElementAddrInst>(instr);
       newInstr = resultTyBuilder.createStructElementAddr(
           Loc, convInstr->getOperand(), convInstr->getField(),
           newSILType.getAddressType());
       break;
     }
     case ValueKind::RefTailAddrInst: {
-      RefTailAddrInst *convInstr = dyn_cast<RefTailAddrInst>(instr);
+      auto *convInstr = dyn_cast<RefTailAddrInst>(instr);
       newInstr = resultTyBuilder.createRefTailAddr(Loc, convInstr->getOperand(),
                                                    newSILType.getAddressType());
       break;
     }
     case ValueKind::RefElementAddrInst: {
-      RefElementAddrInst *convInstr = dyn_cast<RefElementAddrInst>(instr);
+      auto *convInstr = dyn_cast<RefElementAddrInst>(instr);
       newInstr = resultTyBuilder.createRefElementAddr(
           Loc, convInstr->getOperand(), convInstr->getField(),
           newSILType.getAddressType());
       break;
     }
+    case ValueKind::BeginAccessInst: {
+      auto *convInstr = dyn_cast<BeginAccessInst>(instr);
+      newInstr = resultTyBuilder.createBeginAccess(Loc, convInstr->getOperand(),
+                                                   convInstr->getAccessKind(),
+                                                   convInstr->getEnforcement());
+      break;
+    }
     case ValueKind::EnumInst: {
-      EnumInst *convInstr = dyn_cast<EnumInst>(instr);
+      auto *convInstr = dyn_cast<EnumInst>(instr);
       SILValue operand =
           convInstr->hasOperand() ? convInstr->getOperand() : SILValue();
       newInstr = resultTyBuilder.createEnum(
@@ -1422,7 +1660,7 @@
       break;
     }
     case ValueKind::DynamicMethodInst: {
-      DynamicMethodInst *DMI = dyn_cast<DynamicMethodInst>(instr);
+      auto *DMI = dyn_cast<DynamicMethodInst>(instr);
       assert(DMI && "ValueKind is Witness Method but dyn_cast failed");
       SILValue selfValue = instr->getOperand(0);
       newInstr = methodBuilder.createDynamicMethod(loc, selfValue, member,
@@ -1430,7 +1668,7 @@
       break;
     }
     case ValueKind::WitnessMethodInst: {
-      WitnessMethodInst *WMI = dyn_cast<WitnessMethodInst>(instr);
+      auto *WMI = dyn_cast<WitnessMethodInst>(instr);
       assert(WMI && "ValueKind is Witness Method but dyn_cast failed");
       newInstr = methodBuilder.createWitnessMethod(
           loc, WMI->getLookupType(), WMI->getConformance(), member, newSILType,
@@ -1456,37 +1694,21 @@
   }
   SILFunction *F = pass.F;
   SILType resultTy = loweredTy->getAllResultsType();
-  CanType resultCanTy = resultTy.getSwiftRValueType();
-  if (SILFunctionType *currSILFunctionType =
-          dyn_cast<SILFunctionType>(resultCanTy.getPointer())) {
-    if (containsLargeLoadable(genEnv, currSILFunctionType->getParameters(),
-                              pass.Mod)) {
-      assert(F->getLoweredFunctionType()->getNumResults() == 1 &&
-             "Expected a single result");
-      SILResultInfo origResultInfo = loweredTy->getSingleResult();
-      SmallVector<SILParameterInfo, 4> newArgTys =
-          getNewArgTys(genEnv, currSILFunctionType->getParameters(), pass.Mod);
-      SILFunctionType *newSILFunctionType =
-          SILFunctionType::get(currSILFunctionType->getGenericSignature(),
-                               currSILFunctionType->getExtInfo(),
-                               currSILFunctionType->getCalleeConvention(),
-                               newArgTys, currSILFunctionType->getResults(),
-                               currSILFunctionType->getOptionalErrorResult(),
-                               currSILFunctionType->getASTContext());
-      SILType newSILType = SILType::getPrimitiveObjectType(
-          newSILFunctionType->getCanonicalType());
-      SILResultInfo newSILResultInfo(newSILType.getSwiftRValueType(),
-                                     origResultInfo.getConvention());
-      // change the caller's SIL function type
-      SILFunctionType *OrigFTI = F->getLoweredFunctionType();
-      auto NewTy = SILFunctionType::get(
-          OrigFTI->getGenericSignature(), OrigFTI->getExtInfo(),
-          OrigFTI->getCalleeConvention(), OrigFTI->getParameters(),
-          newSILResultInfo, OrigFTI->getOptionalErrorResult(),
-          F->getModule().getASTContext());
-      F->rewriteLoweredTypeUnsafe(NewTy);
-      return true;
-    }
+  SILType newSILType = getNewSILType(genEnv, resultTy, pass.Mod);
+  // We (currently) only care about function signatures
+  if (!isLargeLoadableType(genEnv, resultTy, pass.Mod) &&
+      (newSILType != resultTy)) {
+    assert(loweredTy->getNumResults() == 1 && "Expected a single result");
+    SILResultInfo origResultInfo = loweredTy->getSingleResult();
+    SILResultInfo newSILResultInfo(newSILType.getSwiftRValueType(),
+                                   origResultInfo.getConvention());
+    auto NewTy = SILFunctionType::get(
+        loweredTy->getGenericSignature(), loweredTy->getExtInfo(),
+        loweredTy->getCalleeConvention(), loweredTy->getParameters(),
+        newSILResultInfo, loweredTy->getOptionalErrorResult(),
+        F->getModule().getASTContext());
+    F->rewriteLoweredTypeUnsafe(NewTy);
+    return true;
   }
   return false;
 }
@@ -1559,13 +1781,9 @@
   }
   SILFunctionType *newSILFunctionType =
       getNewSILFunctionTypePtr(genEnv, origSILFunctionType, *currIRMod);
-  SILType newSubType =
-      getNewSILFunctionType(genEnv, origSILFunctionType, *currIRMod);
   CanSILFunctionType newCanSILFuncType(newSILFunctionType);
   SILFunctionConventions newSILFunctionConventions(newCanSILFuncType,
                                                    *getModule());
-  SILType resultType = newSILFunctionConventions.getSILResultType();
-
   SmallVector<Substitution, 4> newSubs;
   for (Substitution sub : applySite.getSubstitutions()) {
     Type origType = sub.getReplacement();
@@ -1590,36 +1808,35 @@
   SILInstruction *newApply = nullptr;
   switch (applyInst->getKind()) {
   case ValueKind::ApplyInst: {
-    ApplyInst *castedApply = dyn_cast<ApplyInst>(applyInst);
+    auto *castedApply = dyn_cast<ApplyInst>(applyInst);
     assert(castedApply && "ValueKind is ApplyInst but cast to it failed");
-    newApply = applyBuilder.createApply(castedApply->getLoc(), callee,
-                                        newSubType, resultType, newSubs,
+    newApply = applyBuilder.createApply(castedApply->getLoc(), callee, newSubs,
                                         callArgs, castedApply->isNonThrowing());
     applyInst->replaceAllUsesWith(newApply);
     break;
   }
   case ValueKind::TryApplyInst: {
-    TryApplyInst *castedApply = dyn_cast<TryApplyInst>(applyInst);
+    auto *castedApply = dyn_cast<TryApplyInst>(applyInst);
     assert(castedApply && "ValueKind is TryApplyInst but cast to it failed");
     newApply = applyBuilder.createTryApply(
-        castedApply->getLoc(), callee, newSubType, newSubs, callArgs,
+        castedApply->getLoc(), callee, newSubs, callArgs,
         castedApply->getNormalBB(), castedApply->getErrorBB());
     applyInst->replaceAllUsesWith(newApply);
     break;
   }
   case ValueKind::PartialApplyInst: {
-    PartialApplyInst *castedApply = dyn_cast<PartialApplyInst>(applyInst);
+    auto *castedApply = dyn_cast<PartialApplyInst>(applyInst);
     assert(castedApply &&
            "ValueKind is PartialApplyInst but cast to it failed");
     // Change the type of the Closure
-    SILFunctionType *origClosureType =
-        castedApply->getType().castTo<SILFunctionType>();
-    SILType newSILType =
-        getNewSILFunctionType(genEnv, origClosureType, *currIRMod);
+    auto partialApplyConvention = castedApply->getType()
+                                      .getSwiftRValueType()
+                                      ->getAs<SILFunctionType>()
+                                      ->getCalleeConvention();
 
     newApply = applyBuilder.createPartialApply(castedApply->getLoc(), callee,
-                                               newSubType, newSubs, callArgs,
-                                               newSILType);
+                                               newSubs, callArgs,
+                                               partialApplyConvention);
     applyInst->replaceAllUsesWith(newApply);
     break;
   }
@@ -1669,6 +1886,29 @@
   }
 }
 
+void LoadableByAddress::recreateUncheckedTakeEnumDataAddrInst() {
+  for (auto *enumInstr : uncheckedTakeEnumDataAddrOfFunc) {
+    SILBuilder enumBuilder(enumInstr);
+    SILFunction *F = enumInstr->getFunction();
+    CanSILFunctionType funcType = F->getLoweredFunctionType();
+    IRGenModule *currIRMod = getIRGenModule()->IRGen.getGenModule(F);
+    Lowering::GenericContextScope GenericScope(getModule()->Types,
+                                               funcType->getGenericSignature());
+    SILType origType = enumInstr->getType();
+    GenericEnvironment *genEnv = F->getGenericEnvironment();
+    auto loweredTy = F->getLoweredFunctionType();
+    if (!genEnv && loweredTy->isPolymorphic()) {
+      genEnv = getGenericEnvironment(F->getModule(), loweredTy);
+    }
+    SILType newType = getNewSILType(genEnv, origType, *currIRMod);
+    auto *newInstr = enumBuilder.createUncheckedTakeEnumDataAddr(
+        enumInstr->getLoc(), enumInstr->getOperand(), enumInstr->getElement(),
+        newType.getAddressType());
+    enumInstr->replaceAllUsesWith(newInstr);
+    enumInstr->getParent()->erase(enumInstr);
+  }
+}
+
 void LoadableByAddress::fixStoreToBlockStorageInstrs() {
   for (auto *instr : storeToBlockStorageInstrs) {
     auto dest = instr->getDest();
@@ -1722,14 +1962,14 @@
       break;
     }
     case ValueKind::ConvertFunctionInst: {
-      ConvertFunctionInst *instr = dyn_cast<ConvertFunctionInst>(convInstr);
+      auto *instr = dyn_cast<ConvertFunctionInst>(convInstr);
       assert(instr && "Unexpected conversion instruction");
       newInstr = convBuilder.createConvertFunction(
           instr->getLoc(), instr->getOperand(), newType);
       break;
     }
     default:
-      llvm_unreachable("Unexected conversion instruction");
+      llvm_unreachable("Unexpected conversion instruction");
     }
     convInstr->replaceAllUsesWith(newInstr);
     convInstr->getParent()->erase(convInstr);
@@ -1766,7 +2006,7 @@
     return;
   }
 
-  // Scan the module for all refrences of the modified functions:
+  // Scan the module for all references of the modified functions:
   llvm::SetVector<FunctionRefInst *> funcRefs;
   for (SILFunction &CurrF : *getModule()) {
     for (SILBasicBlock &BB : CurrF) {
@@ -1807,9 +2047,7 @@
           }
         } else if (auto *LI = dyn_cast<LoadInst>(&I)) {
           SILType currType = LI->getType();
-          CanType currCanType = currType.getSwiftRValueType();
-          if (auto *fType =
-                  dyn_cast<SILFunctionType>(currCanType.getPointer())) {
+          if (auto *fType = getInnerFunctionType(currType)) {
             if (modifiableFunction(CanSILFunctionType(fType))) {
               // need to re-create these loads: re-write type cache
               loadInstrsOfFunc.insert(LI);
@@ -1817,17 +2055,23 @@
           }
         } else if (auto *UED = dyn_cast<UncheckedEnumDataInst>(&I)) {
           SILType currType = UED->getType();
-          CanType currCanType = currType.getSwiftRValueType();
-          if (auto *fType =
-                  dyn_cast<SILFunctionType>(currCanType.getPointer())) {
+          if (auto *fType = getInnerFunctionType(currType)) {
             if (modifiableFunction(CanSILFunctionType(fType))) {
               // need to re-create these loads: re-write type cache
               uncheckedEnumDataOfFunc.insert(UED);
             }
           }
+        } else if (auto *UED = dyn_cast<UncheckedTakeEnumDataAddrInst>(&I)) {
+          SILType currType = UED->getType();
+          if (auto *fType = getInnerFunctionType(currType)) {
+            if (modifiableFunction(CanSILFunctionType(fType))) {
+              // need to re-create these loads: re-write type cache
+              uncheckedTakeEnumDataAddrOfFunc.insert(UED);
+            }
+          }
         } else if (auto *SI = dyn_cast<StoreInst>(&I)) {
           auto dest = SI->getDest();
-          if (dyn_cast<ProjectBlockStorageInst>(dest)) {
+          if (isa<ProjectBlockStorageInst>(dest)) {
             storeToBlockStorageInstrs.insert(SI);
           }
         }
@@ -1840,7 +2084,7 @@
     updateLoweredTypes(F);
   }
 
-  // Update all refrences:
+  // Update all references:
   // Note: We don't need to update the witness tables and vtables
   // They just contain a pointer to the function
   // The pointer does not change
@@ -1856,12 +2100,15 @@
   // Re-create all conversions for which we modified the FunctionRef
   recreateConvInstrs();
 
-  // Re-create all load instrs of function pointers
-  recreateLoadInstrs();
-
   // Re-create all unchecked enum data instrs of function pointers
   recreateUncheckedEnumDataInstrs();
 
+  // Same for data addr
+  recreateUncheckedTakeEnumDataAddrInst();
+
+  // Re-create all load instrs of function pointers
+  recreateLoadInstrs();
+
   // Re-create all applies that we modified in the module
   recreateApplies();
 
diff --git a/lib/Index/Index.cpp b/lib/Index/Index.cpp
index 535b58d..706a158 100644
--- a/lib/Index/Index.cpp
+++ b/lib/Index/Index.cpp
@@ -105,14 +105,14 @@
   }
 
   StringRef getFilename() const {
-    if (SourceFile *SF = SFOrMod.dyn_cast<SourceFile *>())
+    if (auto *SF = SFOrMod.dyn_cast<SourceFile *>())
       return SF->getFilename();
     return SFOrMod.get<ModuleDecl *>()->getModuleFilename();
   }
 
   void
   getImportedModules(SmallVectorImpl<ModuleDecl::ImportedModule> &Modules) const {
-    if (SourceFile *SF = SFOrMod.dyn_cast<SourceFile *>()) {
+    if (auto *SF = SFOrMod.dyn_cast<SourceFile *>()) {
       SF->getImportedModules(Modules, ModuleDecl::ImportFilter::All);
     } else {
       SFOrMod.get<ModuleDecl *>()->getImportedModules(Modules,
@@ -256,14 +256,14 @@
     // Do not handle unavailable decls.
     if (AvailableAttr::isUnavailable(D))
       return false;
-    if (FuncDecl *FD = dyn_cast<FuncDecl>(D)) {
+    if (auto *FD = dyn_cast<FuncDecl>(D)) {
       if (FD->isAccessor() && getParentDecl() != FD->getAccessorStorageDecl())
         return false; // already handled as part of the var decl.
     }
-    if (ValueDecl *VD = dyn_cast<ValueDecl>(D)) {
+    if (auto *VD = dyn_cast<ValueDecl>(D)) {
       if (!report(VD))
         return false;
-      if (SubscriptDecl *SD = dyn_cast<SubscriptDecl>(VD)) {
+      if (auto *SD = dyn_cast<SubscriptDecl>(VD)) {
         // Avoid indexing the indices, only walk the getter/setter.
         if (SD->getGetter())
           if (SourceEntityWalker::walk(cast<Decl>(SD->getGetter())))
@@ -283,7 +283,7 @@
         return false; // already walked what we needed.
       }
     }
-    if (ExtensionDecl *ED = dyn_cast<ExtensionDecl>(D))
+    if (auto *ED = dyn_cast<ExtensionDecl>(D))
       return reportExtension(ED);
     return true;
   }
@@ -378,7 +378,7 @@
     return true;
   }
 
-  Decl *getParentDecl() {
+  Decl *getParentDecl() const {
     if (!EntitiesStack.empty())
       return EntitiesStack.back().D;
     return nullptr;
@@ -390,7 +390,7 @@
     EntitiesStack.back().RefsToSuppress.push_back(Loc);
   }
 
-  bool isRepressed(SourceLoc Loc) {
+  bool isRepressed(SourceLoc Loc) const {
     if (EntitiesStack.empty() || Loc.isInvalid())
       return false;
     auto &Suppressed = EntitiesStack.back().RefsToSuppress;
@@ -398,17 +398,17 @@
 
   }
 
-  Expr *getContainingExpr(size_t index) {
+  Expr *getContainingExpr(size_t index) const {
     if (ExprStack.size() > index)
       return ExprStack.end()[-(index + 1)];
     return nullptr;
   }
 
-  Expr *getCurrentExpr() {
+  Expr *getCurrentExpr() const {
     return ExprStack.empty() ? nullptr : ExprStack.back();
   }
 
-  Expr *getParentExpr() {
+  Expr *getParentExpr() const {
     return getContainingExpr(1);
   }
 
@@ -466,8 +466,11 @@
   bool shouldIndex(ValueDecl *D, bool IsRef) const {
     if (D->isImplicit() && !isa<ConstructorDecl>(D))
       return false;
-    if (!IdxConsumer.indexLocals() && isLocalSymbol(D) && (!isa<ParamDecl>(D) || IsRef))
-      return false;
+
+    if (!IdxConsumer.indexLocals() && isLocalSymbol(D))
+      return isa<ParamDecl>(D) && !IsRef &&
+        D->getDeclContext()->getContextKind() != DeclContextKind::AbstractClosureExpr;
+
     if (D->isPrivateStdlibDecl())
       return false;
 
@@ -723,7 +726,7 @@
 
 bool IndexSwiftASTWalker::reportRelatedTypeRef(const TypeLoc &Ty, SymbolRoleSet Relations, Decl *Related) {
 
-  if (IdentTypeRepr *T = dyn_cast_or_null<IdentTypeRepr>(Ty.getTypeRepr())) {
+  if (auto *T = dyn_cast_or_null<IdentTypeRepr>(Ty.getTypeRepr())) {
     auto Comps = T->getComponentRange();
     SourceLoc IdLoc = Comps.back()->getIdLoc();
     NominalTypeDecl *NTD = nullptr;
@@ -842,7 +845,7 @@
 IndexSwiftASTWalker::getTypeLocAsNominalTypeDecl(const TypeLoc &Ty) {
   if (Type T = Ty.getType())
     return T->getAnyNominal();
-  if (IdentTypeRepr *T = dyn_cast_or_null<IdentTypeRepr>(Ty.getTypeRepr())) {
+  if (auto *T = dyn_cast_or_null<IdentTypeRepr>(Ty.getTypeRepr())) {
     auto Comp = T->getComponentRange().back();
     if (auto NTD = dyn_cast_or_null<NominalTypeDecl>(Comp->getBoundDecl()))
       return NTD;
@@ -970,7 +973,7 @@
     return true;
 
   // Report the accessors that were utilized.
-  if (AbstractStorageDecl *ASD = dyn_cast<AbstractStorageDecl>(D)) {
+  if (auto *ASD = dyn_cast<AbstractStorageDecl>(D)) {
     bool UsesGetter = Info.roles & (SymbolRoleSet)SymbolRole::Read;
     bool UsesSetter = Info.roles & (SymbolRoleSet)SymbolRole::Write;
 
diff --git a/lib/Index/IndexSymbol.cpp b/lib/Index/IndexSymbol.cpp
index 4502ec8..d57e135 100644
--- a/lib/Index/IndexSymbol.cpp
+++ b/lib/Index/IndexSymbol.cpp
@@ -232,5 +232,6 @@
 
 bool index::isLocalSymbol(const swift::Decl *D) {
   return D->getDeclContext()->getLocalContext() &&
-    (!isa<ParamDecl>(D) || cast<ParamDecl>(D)->getArgumentNameLoc().isValid());
+    (!isa<ParamDecl>(D) || cast<ParamDecl>(D)->getArgumentNameLoc().isValid() ||
+     D->getDeclContext()->getContextKind() == DeclContextKind::AbstractClosureExpr);
 }
diff --git a/lib/LLVMPasses/LLVMARCOpts.cpp b/lib/LLVMPasses/LLVMARCOpts.cpp
index ca1a01f..b5f5cdc 100644
--- a/lib/LLVMPasses/LLVMARCOpts.cpp
+++ b/lib/LLVMPasses/LLVMARCOpts.cpp
@@ -548,7 +548,7 @@
   // We have to have a known heap metadata value, reject dynamically computed
   // ones, or places
   // Also, make sure we have a definitive initializer for the global.
-  GlobalVariable *GV = dyn_cast<GlobalVariable>(P->stripPointerCasts());
+  auto *GV = dyn_cast<GlobalVariable>(P->stripPointerCasts());
   if (GV == nullptr || !GV->hasDefinitiveInitializer())
     return DtorKind::Unknown;
 
@@ -559,7 +559,7 @@
   // FIXME: Would like to abstract the dtor slot (#0) out from this to somewhere
   // unified.
   enum { DTorSlotOfHeapMetadata = 0 };
-  Function *DtorFn =dyn_cast<Function>(CS->getOperand(DTorSlotOfHeapMetadata));
+  auto *DtorFn = dyn_cast<Function>(CS->getOperand(DTorSlotOfHeapMetadata));
   if (DtorFn == nullptr || DtorFn->isInterposable() ||
       DtorFn->hasExternalLinkage())
     return DtorKind::Unknown;
@@ -635,12 +635,12 @@
         if (!I.mayHaveSideEffects()) continue;
 
         // store, memcpy, memmove *to* the object can be dropped.
-        if (StoreInst *SI = dyn_cast<StoreInst>(&I)) {
+        if (auto *SI = dyn_cast<StoreInst>(&I)) {
           if (SI->getPointerOperand()->stripInBoundsOffsets() == ThisObject)
             continue;
         }
 
-        if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(&I)) {
+        if (auto *MI = dyn_cast<MemIntrinsic>(&I)) {
           if (MI->getDest()->stripInBoundsOffsets() == ThisObject)
             continue;
         }
@@ -649,9 +649,12 @@
         break;
       }
 
-      // Okay, the function has some side effects, if it doesn't capture the
-      // object argument, at least that is something.
-      return DtorFn->doesNotCapture(0) ? DtorKind::NoEscape : DtorKind::Unknown;
+      // Okay, the function has some side effects.
+      //
+      // TODO: We could in the future return more accurate information by
+      // checking if the function is able to capture the deinit parameter. We do
+      // not do that today.
+      return DtorKind::Unknown;
     }
   }
 
@@ -753,7 +756,7 @@
       // object is being stored *to*, not itself being stored (which would be an
       // escape point).  Since stores themselves don't have any uses, we can
       // short-cut the classification scheme above.
-      if (StoreInst *SI = dyn_cast<StoreInst>(User)) {
+      if (auto *SI = dyn_cast<StoreInst>(User)) {
         // If this is a store *to* the object, we can zap it.
         if (UI.getUse().getOperandNo() == StoreInst::getPointerOperandIndex()) {
           InvolvedInstructions.insert(SI);
@@ -762,7 +765,7 @@
         // Otherwise, using the object as a source (or size) is an escape.
         return false;
       }
-      if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(User)) {
+      if (auto *MI = dyn_cast<MemIntrinsic>(User)) {
         // If this is a memset/memcpy/memmove *to* the object, we can zap it.
         if (UI.getUse().getOperandNo() == 0) {
           InvolvedInstructions.insert(MI);
diff --git a/lib/LLVMPasses/LLVMMergeFunctions.cpp b/lib/LLVMPasses/LLVMMergeFunctions.cpp
index 6a1aa9b..55ad969 100644
--- a/lib/LLVMPasses/LLVMMergeFunctions.cpp
+++ b/lib/LLVMPasses/LLVMMergeFunctions.cpp
@@ -125,7 +125,7 @@
   if (!isEligibleForConstantSharing(L))
     return Res;
 
-  if (const CallInst *CL = dyn_cast<CallInst>(L)) {
+  if (const auto *CL = dyn_cast<CallInst>(L)) {
     if (CL->isInlineAsm())
       return Res;
     if (Function *CalleeL = CL->getCalledFunction()) {
@@ -672,7 +672,7 @@
   // Iterate over all functions of FE's equivalence class.
   do {
     for (Use &U : FE->F->uses()) {
-      if (Instruction *I = dyn_cast<Instruction>(U.getUser())) {
+      if (auto *I = dyn_cast<Instruction>(U.getUser())) {
         FunctionEntry *CallerFE = getEntry(I->getFunction());
         if (CallerFE && CallerFE->TreeIter != FnTree.end()) {
           // Accumulate the count in the first entry of the equivalence class.
@@ -788,7 +788,7 @@
 
   for (const FunctionInfo &FI : FInfos) {
     Value *Op = FI.CurrentInst->getOperand(OpIdx);
-    if (Constant *C = dyn_cast<Constant>(Op)) {
+    if (auto *C = dyn_cast<Constant>(Op)) {
       if (!CommonConst) {
         CommonConst = C;
       } else if (C != CommonConst) {
@@ -896,7 +896,7 @@
 
     // Collect all functions which are referenced by any parameter.
     for (Value *V : PI.Values) {
-      if (Function *F = dyn_cast<Function>(V))
+      if (auto *F = dyn_cast<Function>(V))
         SelfReferencingFunctions.insert(F);
     }
   }
@@ -1026,7 +1026,7 @@
   SmallVector<CallInst *, 8> Callers;
   
   for (Use &U : Old->uses()) {
-    Instruction *I = dyn_cast<Instruction>(U.getUser());
+    auto *I = dyn_cast<Instruction>(U.getUser());
     if (!I) {
       AllReplaced = false;
       continue;
@@ -1035,7 +1035,7 @@
     if (FE)
       removeEquivalenceClassFromTree(FE);
     
-    CallInst *CI = dyn_cast<CallInst>(I);
+    auto *CI = dyn_cast<CallInst>(I);
     if (!CI || CI->getCalledValue() != Old) {
       AllReplaced = false;
       continue;
diff --git a/lib/Migrator/SyntacticMigratorPass.cpp b/lib/Migrator/APIDiffMigratorPass.cpp
similarity index 72%
rename from lib/Migrator/SyntacticMigratorPass.cpp
rename to lib/Migrator/APIDiffMigratorPass.cpp
index 801def2..36bb8bc 100644
--- a/lib/Migrator/SyntacticMigratorPass.cpp
+++ b/lib/Migrator/APIDiffMigratorPass.cpp
@@ -1,4 +1,4 @@
-//===--- SyntacticMigratorPass.cpp ----------------------------------------===//
+//===--- APIDiffMigratorPass.cpp ------------------------------------------===//
 //
 // This source file is part of the Swift.org open source project
 //
@@ -15,11 +15,11 @@
 #include "swift/Frontend/Frontend.h"
 #include "swift/IDE/Utils.h"
 #include "swift/Index/Utils.h"
+#include "swift/Migrator/ASTMigratorPass.h"
 #include "swift/Migrator/EditorAdapter.h"
 #include "swift/Migrator/FixitApplyDiagnosticConsumer.h"
 #include "swift/Migrator/Migrator.h"
 #include "swift/Migrator/RewriteBufferEditsReceiver.h"
-#include "swift/Migrator/SyntacticMigratorPass.h"
 #include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/SourceManager.h"
@@ -33,31 +33,39 @@
 using namespace swift::ide;
 using namespace swift::ide::api;
 
+namespace {
+
 struct FoundResult {
   SourceRange TokenRange;
+  bool Optional; // Range includes a trailing ? or !, e.g. [SomeType!]
   bool Suffixable; // No need to wrap parens when adding optionality
+  bool Suffixed; // Range is followed by a trailing ? or !, e.g. [SomeType]!
   bool isValid() const { return TokenRange.isValid(); }
 };
 
 class ChildIndexFinder : public TypeReprVisitor<ChildIndexFinder, FoundResult> {
   ArrayRef<uint8_t> ChildIndices;
+  bool ParentIsOptional;
 
 public:
   ChildIndexFinder(ArrayRef<uint8_t> ChildIndices) :
     ChildIndices(ChildIndices) {}
 
   FoundResult findChild(AbstractFunctionDecl *Parent) {
+    ParentIsOptional = false;
     auto NextIndex = consumeNext();
     if (!NextIndex) {
       if (auto Func = dyn_cast<FuncDecl>(Parent))
         return findChild(Func->getBodyResultTypeLoc());
       if (auto Init = dyn_cast<ConstructorDecl>(Parent)) {
         SourceLoc End = Init->getFailabilityLoc();
-        if (End.isInvalid())
+        bool Optional = End.isValid();
+        if (!Optional)
           End = Init->getNameLoc();
-        return {SourceRange(Init->getNameLoc(), End), true};
+        return {SourceRange(Init->getNameLoc(), End), Optional,
+          /*suffixable=*/true, /*suffixed=*/false};
       }
-      return {SourceRange(), false};
+      return {SourceRange(), false, false, false};
     }
 
     for (auto *Params: Parent->getParameterLists()) {
@@ -73,7 +81,7 @@
   }
 
 private:
-  bool hasNextIndex() {
+  bool hasNextIndex() const {
     return !ChildIndices.empty();
   }
 
@@ -83,36 +91,52 @@
     return Next;
   }
 
+  bool isUserTypeAlias(TypeRepr *T) const {
+    if (auto Ident = dyn_cast<ComponentIdentTypeRepr>(T)) {
+      if (auto Bound = Ident->getBoundDecl()) {
+        return isa<TypeAliasDecl>(Bound) &&
+          !Bound->getModuleContext()->isSystemModule();
+      }
+    }
+    return false;
+  }
+
   FoundResult findChild(TypeLoc Loc) {
     if (!Loc.hasLocation())
-      return {SourceRange(), false};
+      return {SourceRange(), false, false, false};
     return visit(Loc.getTypeRepr());
   }
 
 public:
-  FoundResult handleParent(TypeRepr *Parent, TypeRepr *FirstChild,
-                           TypeRepr *SecondChild, bool Suffixable = true) {
-    if (!hasNextIndex())
-      return {Parent->getSourceRange(), Suffixable};
-    auto NextIndex = consumeNext();
-    assert(NextIndex < 2 && "child index out of bounds");
-    return visit(NextIndex ? SecondChild : FirstChild);
-  }
 
   template<typename T>
   FoundResult handleParent(TypeRepr *Parent, const ArrayRef<T> Children,
-                           bool Suffixable = true) {
+                           bool Optional = false, bool Suffixable = true) {
     if (!hasNextIndex())
-      return {Parent->getSourceRange(), Suffixable};
+      return {
+        Parent->getSourceRange(),
+        Optional, Suffixable, /*Suffixed=*/ParentIsOptional
+      };
     auto NextIndex = consumeNext();
+    if (isUserTypeAlias(Parent))
+      return {SourceRange(), false, false, false};
     assert(NextIndex < Children.size());
     TypeRepr *Child = Children[NextIndex];
+    ParentIsOptional = Optional;
     return visit(Child);
   }
 
-  FoundResult handleParent(TypeRepr *Parent, TypeRepr *Base,
+  FoundResult handleParent(TypeRepr *Parent, TypeRepr *FirstChild,
+                           TypeRepr *SecondChild, bool Optional = false,
                            bool Suffixable = true) {
-    return handleParent(Parent, llvm::makeArrayRef(Base), Suffixable);
+    TypeRepr *Children[] = {FirstChild, SecondChild};
+    return handleParent(Parent, llvm::makeArrayRef(Children), Optional,
+                        Suffixable);
+  }
+
+  FoundResult handleParent(TypeRepr *Parent, TypeRepr *Base,
+                           bool Optional = false, bool Suffixable = true) {
+    return handleParent(Parent, llvm::makeArrayRef(Base), Optional, Suffixable);
   }
 
   FoundResult visitTypeRepr(TypeRepr *T) {
@@ -120,7 +144,7 @@
   }
 
   FoundResult visitErrorTypeRepr(ErrorTypeRepr *T) {
-    return {SourceRange(), false};
+    return {SourceRange(), false, false, false};
   }
 
   FoundResult visitAttributedTypeRepr(AttributedTypeRepr *T) {
@@ -142,43 +166,41 @@
   FoundResult visitTupleTypeRepr(TupleTypeRepr *T) {
     // Single element TupleTypeReprs may be arbitrarily nested so don't count
     // as their own index level
-    if (T->getNumElements() == 1)
+    if (T->getNumElements() == 1) {
+      ParentIsOptional = false;
       return visit(T->getElement(0));
+    }
     return handleParent(T, T->getElements());
   }
 
   FoundResult visitFunctionTypeRepr(FunctionTypeRepr *T) {
     return handleParent(T, T->getResultTypeRepr(), T->getArgsTypeRepr(),
-                       /*Suffixable=*/false);
+                       /*Optional=*/false, /*Suffixable=*/false);
   }
 
   FoundResult visitCompositionTypeRepr(CompositionTypeRepr *T) {
-    return handleParent(T, T->getTypes(), /*Suffixable=*/false);
+    return handleParent(T, T->getTypes(), /*Optional=*/false,
+                        /*Suffixable=*/false);
   }
 
   FoundResult visitSimpleIdentTypeRepr(SimpleIdentTypeRepr *T) {
-    if (!hasNextIndex())
-      return {T->getSourceRange(), true};
-    // This may be a typealias so report no match
-    return {SourceRange(), false};
+    return handleParent(T, ArrayRef<TypeRepr*>());
   }
 
   FoundResult visitGenericIdentTypeRepr(GenericIdentTypeRepr *T) {
-    // FIXME: This could be a generic type alias
     return handleParent(T, T->getGenericArgs());
   }
 
   FoundResult visitCompoundIdentTypeRepr(CompoundIdentTypeRepr *T) {
-    // FIXME: this could be a nested typealias
-    return handleParent(T, T->Components);
+    return visit(T->Components.back());
   }
 
   FoundResult visitOptionalTypeRepr(OptionalTypeRepr *T) {
-    return handleParent(T, T->getBase());
+    return handleParent(T, T->getBase(), /*Optional=*/true);
   }
 
   FoundResult visitImplicitlyUnwrappedOptionalTypeRepr(ImplicitlyUnwrappedOptionalTypeRepr *T) {
-    return handleParent(T, T->getBase());
+    return handleParent(T, T->getBase(), /*Optional=*/true);
   }
 
   FoundResult visitProtocolTypeRepr(ProtocolTypeRepr *T) {
@@ -190,18 +212,11 @@
   }
 
   FoundResult visitFixedTypeRepr(FixedTypeRepr *T) {
-    assert(!hasNextIndex());
-    return {T->getSourceRange(), true};
+    return handleParent(T, ArrayRef<TypeRepr*>());
   }
 };
 
-struct SyntacticMigratorPass::Implementation : public SourceEntityWalker {
-  SourceFile *SF;
-  const StringRef FileName;
-  unsigned BufferId;
-  SourceManager &SM;
-  EditorAdapter &Editor;
-  const MigratorOptions &Opts;
+struct APIDiffMigratorPass : public ASTMigratorPass, public SourceEntityWalker {
 
   APIDiffItemStore DiffStore;
 
@@ -263,15 +278,15 @@
     return false;
   }
 
-  Implementation(SourceFile *SF, EditorAdapter &Editor,
-                 const MigratorOptions &Opts) :
-    SF(SF), FileName(SF->getFilename()), BufferId(SF->getBufferID().getValue()),
-      SM(SF->getASTContext().SourceMgr), Editor(Editor), Opts(Opts) {}
+  APIDiffMigratorPass(EditorAdapter &Editor, SourceFile *SF,
+                      const MigratorOptions &Opts)
+    : ASTMigratorPass(Editor, SF, Opts) {}
 
   void run() {
-    if (Opts.APIDigesterDataStorePath.empty())
+    if (Opts.APIDigesterDataStorePaths.empty())
       return;
-    DiffStore.addStorePath(Opts.APIDigesterDataStorePath);
+    for (auto Path : Opts.APIDigesterDataStorePaths)
+      DiffStore.addStorePath(Path);
     DiffStore.printIncomingUsr(Opts.DumpUsr);
     walk(SF);
   }
@@ -307,7 +322,7 @@
   void handleFuncRename(ValueDecl *FD, Expr* FuncRefContainer, Expr *Arg) {
     bool IgnoreBase = false;
     if (auto View = getFuncRename(FD, IgnoreBase)) {
-      if(!IgnoreBase) {
+      if (!IgnoreBase) {
         ReferenceCollector Walker(FD);
         Walker.walk(FuncRefContainer);
         Editor.replace(Walker.Result, View.base());
@@ -328,7 +343,7 @@
 
   void handleFunctionCallToPropertyChange(ValueDecl *FD, Expr* FuncRefContainer,
                                           Expr *Arg) {
-    for(auto *Item :getRelatedDiffItems(FD)) {
+    for (auto *Item : getRelatedDiffItems(FD)) {
       if (auto *CD = dyn_cast<CommonDiffItem>(Item)) {
         switch (CD->DiffKind) {
         case NodeAnnotation::GetterToProperty: {
@@ -360,6 +375,7 @@
 
   bool walkToExprPre(Expr *E) override {
     if (auto *CE = dyn_cast<CallExpr>(E)) {
+
       auto Fn = CE->getFn();
       auto Args = CE->getArg();
       switch (Fn->getKind()) {
@@ -389,10 +405,45 @@
     return true;
   }
 
+  void handleFuncDeclRename(AbstractFunctionDecl *AFD,
+                            CharSourceRange NameRange) {
+    bool IgnoreBase = false;
+    if (auto View = getFuncRename(AFD, IgnoreBase)) {
+      if (!IgnoreBase)
+        Editor.replace(NameRange, View.base());
+      unsigned Index = 0;
+      for (auto PL : AFD->getParameterLists()) {
+        for (auto *PD : *PL) {
+          if (Index == View.argSize())
+            break;
+          // Self parameter should not be updated.
+          if (PD->isSelfParameter())
+            continue;
+          StringRef NewArg = View.args()[Index++];
+          auto ArgLoc = PD->getArgumentNameLoc();
+
+          // If the argument name is not specified, add the argument name before
+          // the parameter name.
+          if (ArgLoc.isInvalid())
+            Editor.insertBefore(PD->getNameLoc(),
+                                (llvm::Twine(NewArg) + " ").str());
+          else
+            // Otherwise, replace the argument name directly.
+            Editor.replaceToken(ArgLoc, NewArg);
+        }
+      }
+    }
+  }
+
+  bool typeReplacementMayNeedParens(StringRef Replacement) const {
+    return Replacement.contains('&') || Replacement.contains("->");
+  }
+
   bool walkToDeclPre(Decl *D, CharSourceRange Range) override {
     if (D->isImplicit())
       return true;
     if (auto *AFD = dyn_cast<AbstractFunctionDecl>(D)) {
+      handleFuncDeclRename(AFD, Range);
       for (auto *Item: getRelatedDiffItems(AFD)) {
         if (auto *DiffItem = dyn_cast<CommonDiffItem>(Item)) {
           if (!DiffItem->isTypeChange())
@@ -419,13 +470,19 @@
             }
             break;
           case ide::api::NodeAnnotation::UnwrapOptional:
-            Editor.remove(Result.TokenRange.End);
+            if (Result.Optional)
+              Editor.remove(Result.TokenRange.End);
             break;
           case ide::api::NodeAnnotation::ImplicitOptionalToOptional:
-            Editor.replace(Result.TokenRange.End, "?");
+            if (Result.Optional)
+              Editor.replace(Result.TokenRange.End, "?");
             break;
           case ide::api::NodeAnnotation::TypeRewritten:
             Editor.replace(Result.TokenRange, DiffItem->RightComment);
+            if (Result.Suffixed && typeReplacementMayNeedParens(DiffItem->RightComment)) {
+              Editor.insertBefore(Result.TokenRange.Start, "(");
+              Editor.insertAfterToken(Result.TokenRange.End, ")");
+            }
             break;
           default:
             break;
@@ -437,14 +494,10 @@
   }
 };
 
-SyntacticMigratorPass::
-SyntacticMigratorPass(EditorAdapter &Editor, SourceFile *SF,
-  const MigratorOptions &Opts) : Impl(*new Implementation(SF, Editor, Opts)) {}
+} // end anonymous namespace
 
-SyntacticMigratorPass::~SyntacticMigratorPass() { delete &Impl; }
-
-void SyntacticMigratorPass::run() { Impl.run(); }
-
-const clang::edit::Commit &SyntacticMigratorPass::getEdits() const {
-  return Impl.Editor.getEdits();
+void migrator::runAPIDiffMigratorPass(EditorAdapter &Editor,
+                                      SourceFile *SF,
+                                      const MigratorOptions &Opts) {
+  APIDiffMigratorPass { Editor, SF, Opts }.run();
 }
diff --git a/lib/Migrator/CMakeLists.txt b/lib/Migrator/CMakeLists.txt
index 1f646e7..afc48a7 100644
--- a/lib/Migrator/CMakeLists.txt
+++ b/lib/Migrator/CMakeLists.txt
@@ -3,6 +3,7 @@
   ios.json
   tvos.json
   watchos.json
+  overlay.json
 )
 set(SWIFTLIB_DIR
     "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib/swift")
@@ -35,12 +36,14 @@
 DESTINATION "lib/swift/migrator")
 
 add_swift_library(swiftMigrator STATIC
+  APIDiffMigratorPass.cpp
   EditorAdapter.cpp
   FixitApplyDiagnosticConsumer.cpp
   Migrator.cpp
   MigrationState.cpp
   RewriteBufferEditsReceiver.cpp
-  SyntacticMigratorPass.cpp
+  TupleSplatMigratorPass.cpp
+  TypeOfMigratorPass.cpp
   LINK_LIBRARIES swiftSyntax swiftIDE)
 
 add_dependencies(swiftMigrator
diff --git a/lib/Migrator/EditorAdapter.cpp b/lib/Migrator/EditorAdapter.cpp
index a767b30..8542b87 100644
--- a/lib/Migrator/EditorAdapter.cpp
+++ b/lib/Migrator/EditorAdapter.cpp
@@ -148,3 +148,8 @@
   auto CharInnerRange = Lexer::getCharSourceRangeFromSourceRange(SwiftSrcMgr, TokenInnerRange);
   return replaceWithInner(CharRange, CharInnerRange);
 }
+
+bool EditorAdapter::replaceToken(SourceLoc TokenLoc, StringRef Text) {
+  return replace(Lexer::getTokenAtLocation(SwiftSrcMgr, TokenLoc).getRange(),
+    Text);
+}
diff --git a/lib/Migrator/Migrator.cpp b/lib/Migrator/Migrator.cpp
index 641d838..36e83bf 100644
--- a/lib/Migrator/Migrator.cpp
+++ b/lib/Migrator/Migrator.cpp
@@ -1,4 +1,4 @@
-//===--- Migrator.cpp -----------------------------------------------------===////
+//===--- Migrator.cpp -----------------------------------------------------===//
 // This source file is part of the Swift.org open source project
 //
 // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
@@ -10,11 +10,11 @@
 //===----------------------------------------------------------------------===//
 
 #include "swift/Frontend/Frontend.h"
+#include "swift/Migrator/ASTMigratorPass.h"
 #include "swift/Migrator/EditorAdapter.h"
 #include "swift/Migrator/FixitApplyDiagnosticConsumer.h"
 #include "swift/Migrator/Migrator.h"
 #include "swift/Migrator/RewriteBufferEditsReceiver.h"
-#include "swift/Migrator/SyntacticMigratorPass.h"
 #include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/SourceManager.h"
@@ -25,25 +25,41 @@
 using namespace swift;
 using namespace swift::migrator;
 
-bool migrator::updateCodeAndEmitRemap(CompilerInstance &Instance,
+bool migrator::updateCodeAndEmitRemap(CompilerInstance *Instance,
                                       const CompilerInvocation &Invocation) {
   Migrator M { Instance, Invocation }; // Provide inputs and configuration
 
-  // Phase 1:
-  // Perform any syntactic transformations if requested.
+  // Phase 1: Pre Fix-it passes
+  // These uses the initial frontend invocation to apply any obvious fix-its
+  // to see if we can get an error-free AST to get to Phase 2.
+  std::unique_ptr<swift::CompilerInstance> PreFixItInstance;
+  if (Instance->getASTContext().hadError()) {
+    PreFixItInstance = M.repeatFixitMigrations(2,
+      Invocation.getLangOptions().EffectiveLanguageVersion);
 
+    // If we still couldn't fix all of the errors, give up.
+    if (PreFixItInstance->getASTContext().hadError()) {
+      return true;
+    }
+    M.StartInstance = PreFixItInstance.get();
+  }
+
+  // Phase 2: Syntactic Transformations
   auto FailedSyntacticPasses = M.performSyntacticPasses();
   if (FailedSyntacticPasses) {
     return true;
   }
 
-  // Phase 2:
+  // Phase 3: Post Fix-it Passes
   // Perform fix-it based migrations on the compiler, some number of times in
   // order to give the compiler an opportunity to
   // take its time reaching a fixed point.
+  // This is the end of the pipeline, so we throw away the compiler instance(s)
+  // we used in these fix-it runs.
 
   if (M.getMigratorOptions().EnableMigratorFixits) {
-    M.repeatFixitMigrations(Migrator::MaxCompilerFixitPassIterations);
+    M.repeatFixitMigrations(Migrator::MaxCompilerFixitPassIterations,
+                            {4, 0, 0});
   }
 
   // OK, we have a final resulting text. Now we compare against the input
@@ -58,7 +74,7 @@
   return EmitRemapFailed || EmitMigratedFailed || DumpMigrationStatesFailed;
 }
 
-Migrator::Migrator(CompilerInstance &StartInstance,
+Migrator::Migrator(CompilerInstance *StartInstance,
                    const CompilerInvocation &StartInvocation)
   : StartInstance(StartInstance), StartInvocation(StartInvocation) {
 
@@ -68,25 +84,24 @@
     States.push_back(MigrationState::start(SrcMgr, StartBufferID));
 }
 
-void Migrator::
-repeatFixitMigrations(const unsigned Iterations) {
+std::unique_ptr<swift::CompilerInstance>
+Migrator::repeatFixitMigrations(const unsigned Iterations,
+                                version::Version SwiftLanguageVersion) {
   for (unsigned i = 0; i < Iterations; ++i) {
-    auto ThisResult = performAFixItMigration();
-    if (!ThisResult.hasValue()) {
-      // Something went wrong? Track error in the state?
+    auto ThisInstance = performAFixItMigration(SwiftLanguageVersion);
+    if (ThisInstance == nullptr) {
       break;
     } else {
-      if (ThisResult.getValue()->outputDiffersFromInput()) {
-        States.push_back(ThisResult.getValue());
-      } else {
-        break;
+      if (States.back()->noChangesOccurred()) {
+        return ThisInstance;
       }
     }
   }
+  return nullptr;
 }
 
-llvm::Optional<RC<MigrationState>>
-Migrator::performAFixItMigration() {
+std::unique_ptr<swift::CompilerInstance>
+Migrator::performAFixItMigration(version::Version SwiftLanguageVersion) {
   auto InputState = States.back();
   auto InputBuffer =
     llvm::MemoryBuffer::getMemBufferCopy(InputState->getOutputText(),
@@ -94,7 +109,7 @@
 
   CompilerInvocation Invocation { StartInvocation };
   Invocation.clearInputs();
-  Invocation.getLangOptions().EffectiveLanguageVersion = { 4, 0, 0 };
+  Invocation.getLangOptions().EffectiveLanguageVersion = SwiftLanguageVersion;
 
   // SE-0160: When migrating, always use the Swift 3 @objc inference rules,
   // which drives warnings with the "@objc" Fix-Its.
@@ -132,18 +147,18 @@
     PrimaryIndex, SelectedInput::InputKind::Buffer
   };
 
-  CompilerInstance Instance;
-  if (Instance.setup(Invocation)) {
-    return None;
+  auto Instance = llvm::make_unique<swift::CompilerInstance>();
+  if (Instance->setup(Invocation)) {
+    return nullptr;
   }
 
   FixitApplyDiagnosticConsumer FixitApplyConsumer {
     InputState->getOutputText(),
     getInputFilename(),
   };
-  Instance.addDiagnosticConsumer(&FixitApplyConsumer);
+  Instance->addDiagnosticConsumer(&FixitApplyConsumer);
 
-  Instance.performSema();
+  Instance->performSema();
 
   StringRef ResultText = InputState->getOutputText();
   unsigned ResultBufferID = InputState->getOutputBufferID();
@@ -157,9 +172,10 @@
     ResultBufferID = SrcMgr.addNewSourceBuffer(std::move(ResultBuffer));
   }
 
-  return MigrationState::make(MigrationKind::CompilerFixits,
-                              SrcMgr, InputState->getOutputBufferID(),
-                              ResultBufferID);
+  States.push_back(MigrationState::make(MigrationKind::CompilerFixits,
+                                        SrcMgr, InputState->getOutputBufferID(),
+                                        ResultBufferID));
+  return Instance;
 }
 
 bool Migrator::performSyntacticPasses() {
@@ -180,37 +196,26 @@
   clang::edit::EditedSource Edits { ClangSourceManager, ClangLangOpts };
 
   auto InputState = States.back();
+  auto InputText = InputState->getOutputText();
 
-  EditorAdapter Editor { StartInstance.getSourceMgr(), ClangSourceManager };
+  EditorAdapter Editor { StartInstance->getSourceMgr(), ClangSourceManager };
 
-  // const auto SF = Instance.getPrimarySourceFile();
+  runAPIDiffMigratorPass(Editor, StartInstance->getPrimarySourceFile(),
+                         getMigratorOptions());
+  runTupleSplatMigratorPass(Editor, StartInstance->getPrimarySourceFile(),
+                            getMigratorOptions());
+  runTypeOfMigratorPass(Editor, StartInstance->getPrimarySourceFile(),
+                        getMigratorOptions());
 
-  // From here, create the syntactic pass:
-  //
-  // SyntacticMigratorPass MyPass {
-  //   Editor, Sema's SourceMgr, ClangSrcManager, SF
-  // };
-  // MyPass.run();
-  //
-  // Once it has run, push the edits into Edits above:
-  // Edits.commit(YourPass.getEdits());
-
-  SyntacticMigratorPass SPass(Editor, StartInstance.getPrimarySourceFile(),
-    getMigratorOptions());
-  SPass.run();
-  Edits.commit(SPass.getEdits());
-
-  // Now, we'll take all of the changes we've accumulated, get a resulting text,
-  // and push a MigrationState.
-  auto InputText = States.back()->getOutputText();
+  Edits.commit(Editor.getEdits());
 
   RewriteBufferEditsReceiver Rewriter {
     ClangSourceManager,
     Editor.getClangFileIDForSwiftBufferID(
-      StartInstance.getPrimarySourceFile()->getBufferID().getValue()),
+      StartInstance->getPrimarySourceFile()->getBufferID().getValue()),
     InputState->getOutputText()
   };
-    
+
   Edits.applyRewrites(Rewriter);
 
   SmallString<1024> Scratch;
diff --git a/lib/Migrator/TupleSplatMigratorPass.cpp b/lib/Migrator/TupleSplatMigratorPass.cpp
new file mode 100644
index 0000000..1cc2b09
--- /dev/null
+++ b/lib/Migrator/TupleSplatMigratorPass.cpp
@@ -0,0 +1,219 @@
+//===--- TupleSplatMigratorPass.cpp ---------------------------------------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+
+#include "swift/AST/ASTVisitor.h"
+#include "swift/AST/Expr.h"
+#include "swift/AST/Module.h"
+#include "swift/AST/ParameterList.h"
+#include "swift/AST/Types.h"
+#include "swift/Migrator/ASTMigratorPass.h"
+#include "swift/Parse/Lexer.h"
+
+using namespace swift;
+using namespace swift::migrator;
+
+namespace {
+
+struct TupleSplatMigratorPass : public ASTMigratorPass,
+  public SourceEntityWalker {
+
+      /// Migrates code that compiles fine in Swift 3 but breaks in Swift 4 due to
+  /// changes in how the typechecker handles tuple arguments.
+  void handleTupleArgumentMismatches(const CallExpr *E) {
+    if (!SF->getASTContext().LangOpts.isSwiftVersion3())
+      return;
+    if (E->isImplicit())
+      return;
+
+    // Handles such kind of cases:
+    // \code
+    //   func test(_: ()) {}
+    //   test()
+    // \endcode
+    // This compiles fine in Swift 3 but Swift 4 complains with
+    //   error: missing argument for parameter #1 in call
+    //
+    // It will fix the code to "test(())".
+    //
+    auto handleCallsToEmptyTuple = [&](const CallExpr *E) -> bool {
+      auto fnTy = E->getFn()->getType()->getAs<FunctionType>();
+      if (!fnTy)
+        return false;
+      auto parenT = dyn_cast<ParenType>(fnTy->getInput().getPointer());
+      if (!parenT)
+        return false;
+      auto inp = dyn_cast<TupleType>(parenT->getUnderlyingType().getPointer());
+      if (!inp)
+        return false;
+      if (inp->getNumElements() != 0)
+        return false;
+      auto argTupleT = dyn_cast<TupleType>(E->getArg()->getType().getPointer());
+      if (!argTupleT)
+        return false;
+      if (argTupleT->getNumElements() != 0)
+        return false;
+      Editor.insertWrap("(", E->getArg()->getSourceRange(), ")");
+      return true;
+    };
+
+    // Handles such kind of cases:
+    // \code
+    //   func test(_: ((Int, Int)) -> ()) {}
+    //   test({ (x,y) in })
+    // \endcode
+    // This compiles fine in Swift 3 but Swift 4 complains with
+    //   error: cannot convert value of type '(_, _) -> ()' to expected
+    //   argument type '((Int, Int)) -> ()'
+    //
+    // It will fix the code to "test({ let (x,y) = $0; })".
+    //
+    auto handleTupleMapToClosureArgs = [&](const CallExpr *E) -> bool {
+      auto fnTy = E->getFn()->getType()->getAs<FunctionType>();
+      if (!fnTy)
+        return false;
+      auto fnTy2 = fnTy->getInput()->getAs<FunctionType>();
+      if (!fnTy2)
+        return false;
+      auto parenT = dyn_cast<ParenType>(fnTy2->getInput().getPointer());
+      if (!parenT)
+        return false;
+      auto tupleInFn = dyn_cast<TupleType>(parenT->getUnderlyingType().getPointer());
+      if (!tupleInFn)
+        return false;
+      if (!E->getArg())
+        return false;
+      auto argE = E->getArg()->getSemanticsProvidingExpr();
+      while (auto *ICE = dyn_cast<ImplicitConversionExpr>(argE))
+        argE = ICE->getSubExpr();
+      argE = argE->getSemanticsProvidingExpr();
+      auto closureE = dyn_cast<ClosureExpr>(argE);
+      if (!closureE)
+        return false;
+      if (closureE->getInLoc().isInvalid())
+        return false;
+      auto paramList = closureE->getParameters();
+      if (!paramList ||
+          paramList->getLParenLoc().isInvalid() || paramList->getRParenLoc().isInvalid())
+        return false;
+      if (paramList->size() != tupleInFn->getNumElements())
+        return false;
+      if (paramList->size() == 0)
+        return false;
+
+      auto hasParamListWithNoTypes = [&]() {
+        if (closureE->hasExplicitResultType())
+          return false;
+        for (auto *param : *paramList) {
+          auto tyLoc = param->getTypeLoc();
+          if (!tyLoc.isNull())
+            return false;
+        }
+        return true;
+      };
+
+      if (hasParamListWithNoTypes()) {
+        // Simpler form depending on type inference.
+        // Change "(x, y) in " to "let (x, y) = $0;".
+
+        Editor.insert(paramList->getLParenLoc(), "let ");
+        for (auto *param : *paramList) {
+          // If the argument list is like "(_ x, _ y)", remove the underscores.
+          if (param->getArgumentNameLoc().isValid()) {
+            Editor.remove(CharSourceRange(SM, param->getArgumentNameLoc(),
+                                          param->getNameLoc()));
+          }
+          // If the argument list has type annotations, remove them.
+          auto tyLoc = param->getTypeLoc();
+          if (!tyLoc.isNull() && !tyLoc.getSourceRange().isInvalid()) {
+            auto nameRange = CharSourceRange(param->getNameLoc(),
+                                             param->getNameStr().size());
+            auto tyRange = Lexer::getCharSourceRangeFromSourceRange(SM,
+                                                        tyLoc.getSourceRange());
+            Editor.remove(CharSourceRange(SM, nameRange.getEnd(),
+                                          tyRange.getEnd()));
+          }
+        }
+
+        Editor.replaceToken(closureE->getInLoc(), "= $0;");
+        return true;
+      }
+
+      // Includes types in the closure signature. The following will do a
+      // more complicated edit than the above:
+      //   (x: Int, y: Int) -> Int in
+      // to
+      //   (__val:(Int, Int)) -> Int in let (x,y) = __val;
+
+      std::string paramListText;
+      {
+        llvm::raw_string_ostream OS(paramListText);
+        OS << "(__val:(";
+        for (size_t i = 0, e = paramList->size(); i != e; ++i) {
+          if (i != 0)
+            OS << ", ";
+          auto param = paramList->get(i);
+          auto tyLoc = param->getTypeLoc();
+          if (!tyLoc.isNull() && !tyLoc.getSourceRange().isInvalid()) {
+            OS << SM.extractText(
+              Lexer::getCharSourceRangeFromSourceRange(SM,
+                                                       tyLoc.getSourceRange()));
+          } else {
+            param->getType().print(OS);
+          }
+        }
+        OS << "))";
+      }
+      std::string varBindText;
+      {
+        llvm::raw_string_ostream OS(varBindText);
+        OS << " let (";
+        for (size_t i = 0, e = paramList->size(); i != e; ++i) {
+          if (i != 0)
+            OS << ",";
+          auto param = paramList->get(i);
+          OS << param->getNameStr();
+        }
+        OS << ") = __val; ";
+      }
+
+      Editor.replace(paramList->getSourceRange(), paramListText);
+      Editor.insertAfterToken(closureE->getInLoc(), varBindText);
+      return true;
+    };
+
+    if (handleCallsToEmptyTuple(E))
+      return;
+    if (handleTupleMapToClosureArgs(E))
+      return;
+  }
+
+  bool walkToExprPre(Expr *E) override {
+    if (auto *CE = dyn_cast<CallExpr>(E)) {
+      handleTupleArgumentMismatches(CE);
+    }
+    return true;
+  }
+public:
+
+  TupleSplatMigratorPass(EditorAdapter &Editor,
+                         SourceFile *SF,
+                         const MigratorOptions &Opts)
+    : ASTMigratorPass(Editor, SF, Opts) {}
+};
+
+} // end anonymous namespace
+
+void migrator::runTupleSplatMigratorPass(EditorAdapter &Editor,
+                                         SourceFile *SF,
+                                         const MigratorOptions &Opts) {
+  TupleSplatMigratorPass { Editor, SF, Opts }.walk(SF);
+}
diff --git a/lib/Migrator/TypeOfMigratorPass.cpp b/lib/Migrator/TypeOfMigratorPass.cpp
new file mode 100644
index 0000000..54408fe
--- /dev/null
+++ b/lib/Migrator/TypeOfMigratorPass.cpp
@@ -0,0 +1,74 @@
+//===--- TypeOfMigratorPass.cpp -------------------------------------------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+
+#include "swift/AST/ASTVisitor.h"
+#include "swift/AST/Expr.h"
+#include "swift/AST/Module.h"
+#include "swift/AST/NameLookup.h"
+#include "swift/AST/ParameterList.h"
+#include "swift/AST/Types.h"
+#include "swift/Migrator/ASTMigratorPass.h"
+#include "swift/Parse/Lexer.h"
+
+using namespace swift;
+using namespace swift::migrator;
+
+namespace {
+
+struct TypeOfMigratorPass: public ASTMigratorPass,
+  public SourceEntityWalker {
+
+  void handleTypeOf(const DynamicTypeExpr *DTE) {
+    if (!SF->getASTContext().LangOpts.isSwiftVersion3()) {
+      return;
+    }
+    const auto CSR = Lexer::getCharSourceRangeFromSourceRange(SM,
+      DTE->getSourceRange());
+    if (SM.extractText(CSR).startswith("Swift.")) {
+      return;
+    }
+
+    UnqualifiedLookup Lookup {
+      { SF->getASTContext().getIdentifier("type") },
+      SF->getModuleScopeContext(),
+      /*TypeResolver=*/nullptr,
+      /*IsKnownPrivate=*/false,
+      DTE->getLoc()
+    };
+    if (Lookup.Results.empty()) {
+      // There won't be a name shadowing here in Swift 4, so we don't need to
+      // do anything.
+      return;
+    }
+    Editor.insertBefore(DTE->getLoc(), "Swift.");
+  }
+
+  bool walkToExprPre(Expr *E) override {
+    if (const auto *DTE = dyn_cast<DynamicTypeExpr>(E)) {
+      handleTypeOf(DTE);
+    }
+    return true;
+  }
+public:
+  TypeOfMigratorPass(EditorAdapter &Editor,
+                         SourceFile *SF,
+                         const MigratorOptions &Opts)
+    : ASTMigratorPass(Editor, SF, Opts) {}
+};
+
+} // end anonymous namespace
+
+void migrator::runTypeOfMigratorPass(EditorAdapter &Editor,
+                                     SourceFile *SF,
+                                     const MigratorOptions &Opts) {
+  TypeOfMigratorPass { Editor, SF, Opts }.walk(SF);
+}
diff --git a/lib/Migrator/overlay.json b/lib/Migrator/overlay.json
new file mode 100644
index 0000000..32960f8
--- /dev/null
+++ b/lib/Migrator/overlay.json
@@ -0,0 +1,2 @@
+[
+]
\ No newline at end of file
diff --git a/lib/Parse/CMakeLists.txt b/lib/Parse/CMakeLists.txt
index c0b384d..4b99350 100644
--- a/lib/Parse/CMakeLists.txt
+++ b/lib/Parse/CMakeLists.txt
@@ -1,4 +1,5 @@
 add_swift_library(swiftParse STATIC
+  Confusables.cpp
   Lexer.cpp
   ParseDecl.cpp
   ParseExpr.cpp
diff --git a/lib/Parse/Confusables.cpp b/lib/Parse/Confusables.cpp
new file mode 100644
index 0000000..98b8ef1
--- /dev/null
+++ b/lib/Parse/Confusables.cpp
@@ -0,0 +1,22 @@
+//===--- Confusables.cpp - Swift Confusable Character Diagnostics ---------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+
+#include "swift/Parse/Confusables.h"
+
+char swift::confusable::tryConvertConfusableCharacterToASCII(uint32_t codepoint) {
+  switch (codepoint) {
+#define CONFUSABLE(CONFUSABLE_POINT, BASEPOINT) \
+  case CONFUSABLE_POINT: return BASEPOINT;
+#include "swift/Parse/Confusables.def"
+  default: return 0;
+  }
+}
diff --git a/lib/Parse/Lexer.cpp b/lib/Parse/Lexer.cpp
index 3146399..28ce770 100644
--- a/lib/Parse/Lexer.cpp
+++ b/lib/Parse/Lexer.cpp
@@ -14,6 +14,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "swift/Parse/Confusables.h"
 #include "swift/Parse/Lexer.h"
 #include "swift/AST/DiagnosticsParse.h"
 #include "swift/AST/Identifier.h"
@@ -29,6 +30,8 @@
 // FIXME: Figure out if this can be migrated to LLVM.
 #include "clang/Basic/CharInfo.h"
 
+#include <limits>
+
 using namespace swift;
 
 // clang::isIdentifierHead and clang::isIdentifierBody are deliberately not in
@@ -49,7 +52,6 @@
 /// true if it is an erroneous code point.
 static bool EncodeToUTF8(unsigned CharValue,
                          SmallVectorImpl<char> &Result) {
-  assert(CharValue >= 0x80 && "Single-byte encoding should be already handled");
   // Number of bits in the value, ignoring leading zeros.
   unsigned NumBits = 32-llvm::countLeadingZeros(CharValue);
 
@@ -105,7 +107,7 @@
 /// validateUTF8CharacterAndAdvance - Given a pointer to the starting byte of a
 /// UTF8 character, validate it and advance the lexer past it.  This returns the
 /// encoded character or ~0U if the encoding is invalid.
-static uint32_t validateUTF8CharacterAndAdvance(const char *&Ptr,
+uint32_t swift::validateUTF8CharacterAndAdvance(const char *&Ptr,
                                                 const char *End) {
   if (Ptr >= End)
     return ~0U;
@@ -1347,53 +1349,172 @@
   return Bytes;
 }
 
+static size_t commonPrefixLength(StringRef shorter, StringRef longer) {
+  size_t offset = 0;
+  while (offset < shorter.size() && offset < longer.size() && shorter[offset] == longer[offset]) {
+    offset++;
+  }
+  
+  return offset;
+}
+
 /// getMultilineTrailingIndent:
 /// Determine trailing indent to be used for multiline literal indent stripping.
-static StringRef getMultilineTrailingIndent(const Token &Str,
-                                            DiagnosticEngine *Diags) {
+static std::tuple<StringRef, SourceLoc>
+getMultilineTrailingIndent(const Token &Str, DiagnosticEngine *Diags) {
   StringRef Bytes = getStringLiteralContent(Str);
   const char *begin = Bytes.begin(), *end = Bytes.end(), *start = end;
+  bool sawNonWhitespace = false;
 
   // Work back from the end to find whitespace to strip.
-  while (start > begin) {
+  while (!sawNonWhitespace && start > begin) {
     switch (*--start) {
     case ' ':
     case '\t':
       continue;
     case '\n':
-    case '\r':
-      return StringRef(start+1, end-(start+1));
+    case '\r': {
+      auto bytes = start + 1;
+      auto length = end-(start+1);
+      
+      auto bytesLoc = Lexer::getSourceLoc(bytes);
+      auto string = StringRef(bytes, length);
+      
+      return std::make_tuple(string, bytesLoc);
+    }
     default:
-      if (Diags)
-        Diags->diagnose(Lexer::getSourceLoc(start),
-                        diag::lex_illegal_multiline_string_end);
-      return "";
+      sawNonWhitespace = true;
     }
   }
+  
+  if (sawNonWhitespace && Diags) {
+    auto loc = Lexer::getSourceLoc(start + 1);
+    Diags->diagnose(loc, diag::lex_illegal_multiline_string_end)
+    // FIXME: Should try to suggest indentation.
+      .fixItInsert(loc, "\n");
+  }
 
-  return "";
+  return std::make_tuple("", Lexer::getSourceLoc(end - 1));
+}
+
+/// diagnoseInvalidMultilineIndents:
+/// Emit errors for a group of multiline indents with the same MistakeOffset.
+/// Note: Does not emit an error if MistakeOffset does not lie within 
+/// ExpectedIndent.
+static void diagnoseInvalidMultilineIndents(
+                                            DiagnosticEngine *Diags, 
+                                            StringRef ExpectedIndent,
+                                            SourceLoc IndentLoc,
+                                            StringRef Bytes,
+                                            SmallVector<size_t, 4> LineStarts,
+                                            size_t MistakeOffset,
+                                            StringRef ActualIndent) {
+  if (MistakeOffset >= ExpectedIndent.size()) {
+    // These lines were valid; there's nothing to correct.
+    return;
+  }
+  
+  assert(LineStarts.size() > 0);
+  
+  auto getLoc = [&](size_t offset) -> SourceLoc {
+    return Lexer::getSourceLoc((const char *)Bytes.bytes_begin() + offset);
+  };
+  auto classify = [&](unsigned char ch) -> unsigned {
+    switch (ch) {
+    case ' ':
+      return 0;
+    case '\t':
+      return 1;
+    default:
+      return 2;
+    }
+  };
+  
+  Diags->diagnose(getLoc(LineStarts[0] + MistakeOffset),
+                  diag::lex_multiline_string_indent_inconsistent,
+                  LineStarts.size() != 1, LineStarts.size(),
+                  classify(Bytes[LineStarts[0] + MistakeOffset]));
+  
+  Diags->diagnose(IndentLoc.getAdvancedLoc(MistakeOffset), 
+                  diag::lex_multiline_string_indent_should_match_here, 
+                  classify(ExpectedIndent[MistakeOffset]));
+  
+  auto fix = Diags->diagnose(getLoc(LineStarts[0] + MistakeOffset),
+                             diag::lex_multiline_string_indent_change_line,
+                             LineStarts.size() != 1);
+  
+  assert(MistakeOffset <= ActualIndent.size());
+  assert(ExpectedIndent.substr(0, MistakeOffset) == 
+         ActualIndent.substr(0, MistakeOffset));
+  
+  for (auto line : LineStarts) {
+    fix.fixItReplaceChars(getLoc(line + MistakeOffset), 
+                          getLoc(line + ActualIndent.size()),
+                          ExpectedIndent.substr(MistakeOffset));
+  }
 }
 
 /// validateMultilineIndents:
 /// Diagnose contents of string literal that have inconsistent indentation.
 static void validateMultilineIndents(const Token &Str,
                                      DiagnosticEngine *Diags) {
-  StringRef Indent = getMultilineTrailingIndent(Str, Diags);
+  StringRef Indent;
+  SourceLoc IndentStartLoc;
+  std::tie(Indent, IndentStartLoc) = getMultilineTrailingIndent(Str, Diags);
   if (Indent.empty())
     return;
-
+  
+  // The offset into the previous line where it experienced its first indentation 
+  // error, or Indent.size() if every character matched.
+  size_t lastMistakeOffset = std::numeric_limits<size_t>::max();
+  // Offsets for each consecutive previous line with its first error at 
+  // lastMatchLength.
+  SmallVector<size_t, 4> linesWithLastMistakeOffset = {};
+  // Prefix of indentation that's present on all lines in linesWithLastMatchLength.
+  StringRef commonIndentation = "";
+  
   StringRef Bytes = getStringLiteralContent(Str);
-  const char *BytesPtr = Bytes.begin();
-  size_t pos = 0;
-  while ((pos = Bytes.find('\n', pos)) != StringRef::npos) {
+  for (size_t pos = Bytes.find('\n'); pos != StringRef::npos; pos = Bytes.find('\n', pos + 1)) {
     size_t nextpos = pos + 1;
-    if (BytesPtr[nextpos] != '\n' && BytesPtr[nextpos] != '\r') {
-      if (Bytes.substr(nextpos, Indent.size()) != Indent)
-        Diags->diagnose(Lexer::getSourceLoc(BytesPtr + nextpos),
-                        diag::lex_ambiguous_string_indent);
+    auto restOfBytes = Bytes.substr(nextpos);
+    
+    // Ignore blank lines.
+    if (restOfBytes[0] == '\n' || restOfBytes[0] == '\r') {
+      continue;
     }
-    pos = nextpos;
+    
+    // Where is the first difference?
+    auto errorOffset = commonPrefixLength(Indent, restOfBytes);
+    
+    // Are we starting a new run?
+    if (errorOffset != lastMistakeOffset) {
+      // Diagnose problems in the just-finished run of lines.
+      diagnoseInvalidMultilineIndents(Diags, Indent, IndentStartLoc, Bytes, 
+                                      linesWithLastMistakeOffset, lastMistakeOffset, 
+                                      commonIndentation);
+      
+      // Set up for a new run.
+      lastMistakeOffset = errorOffset;
+      linesWithLastMistakeOffset = {};
+      
+      // To begin with, all whitespace is part of the common indentation.
+      auto prefixLength = restOfBytes.find_first_not_of(" \t");
+      commonIndentation = restOfBytes.substr(0, prefixLength);
+    }
+    else {
+      // We're continuing the run, so include this line in the common prefix.
+      auto prefixLength = commonPrefixLength(commonIndentation, restOfBytes);
+      commonIndentation = commonIndentation.substr(0, prefixLength);
+    }
+    
+    // Either way, add this line to the run.
+    linesWithLastMistakeOffset.push_back(nextpos);
   }
+  
+  // Handle the last run.
+  diagnoseInvalidMultilineIndents(Diags, Indent, IndentStartLoc, Bytes, 
+                                  linesWithLastMistakeOffset, lastMistakeOffset, 
+                                  commonIndentation);
 }
 
 /// lexStringLiteral:
@@ -1412,7 +1533,8 @@
     MultilineString = true;
     CurPtr += 2;
     if (*CurPtr != '\n' && *CurPtr != '\r')
-      diagnose(CurPtr, diag::lex_illegal_multiline_string_start);
+      diagnose(CurPtr, diag::lex_illegal_multiline_string_start)
+        .fixItInsert(Lexer::getSourceLoc(CurPtr), "\n");
   }
 
   while (true) {
@@ -1757,7 +1879,8 @@
   bool MultilineString = Str.IsMultilineString(), IsFirstSegment = true;
   unsigned IndentToStrip = 0;
   if (MultilineString)
-      IndentToStrip = getMultilineTrailingIndent(Str, /*Diags=*/nullptr).size();
+    IndentToStrip = 
+      std::get<0>(getMultilineTrailingIndent(Str, /*Diags=*/nullptr)).size();
 
   // Note that it is always safe to read one over the end of "Bytes" because
   // we know that there is a terminating " character.  Use BytesPtr to avoid a
@@ -1870,6 +1993,22 @@
       } else {
         diagnose(CurPtr-1, diag::lex_invalid_character)
           .fixItReplaceChars(getSourceLoc(CurPtr-1), getSourceLoc(tmp), " ");
+
+        char expectedCodepoint;
+        if ((expectedCodepoint =
+            confusable::tryConvertConfusableCharacterToASCII(codepoint))) {
+
+          llvm::SmallString<4> confusedChar;
+          EncodeToUTF8(codepoint, confusedChar);
+          llvm::SmallString<1> expectedChar;
+          expectedChar += expectedCodepoint;
+          diagnose(CurPtr-1, diag::lex_confusable_character,
+                   confusedChar, expectedChar)
+            .fixItReplaceChars(getSourceLoc(CurPtr-1),
+                               getSourceLoc(tmp),
+                               expectedChar);
+        }
+
         CurPtr = tmp;
         goto Restart;  // Skip presumed whitespace.
       }
@@ -1936,6 +2075,8 @@
   case ',': return formToken(tok::comma, TokStart);
   case ';': return formToken(tok::semi, TokStart);
   case ':': return formToken(tok::colon, TokStart);
+  case '\\':
+    return formToken(tok::backslash, TokStart);
 
   case '#':
     return lexHash();
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index fd3d9b8..f9dc2d8 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -146,7 +146,7 @@
         return false;
       if (!P.CurDeclContext)
         return false;
-      FuncDecl *func_decl = dyn_cast<FuncDecl>(P.CurDeclContext);
+      auto *func_decl = dyn_cast<FuncDecl>(P.CurDeclContext);
       if (!func_decl)
         return false;
         
@@ -251,7 +251,7 @@
 
   // Add newly parsed decls to the module.
   for (auto Item : Items)
-    if (Decl *D = Item.dyn_cast<Decl*>())
+    if (auto *D = Item.dyn_cast<Decl*>())
       SF.Decls.push_back(D);
 
   // Note that the source file is fully parsed and verify it.
@@ -743,7 +743,8 @@
   }
 
   case DAK_CDecl:
-  case DAK_SILGenName: {
+  case DAK_SILGenName:
+  case DAK_NSKeyedArchiveLegacy: {
     if (!consumeIf(tok::l_paren)) {
       diagnose(Loc, diag::attr_expected_lparen, AttrName,
                DeclAttribute::isDeclModifier(DK));
@@ -786,6 +787,10 @@
       else if (DK == DAK_CDecl)
         Attributes.add(new (Context) CDeclAttr(AsmName.getValue(), AtLoc,
                                                AttrRange, /*Implicit=*/false));
+      else if (DK == DAK_NSKeyedArchiveLegacy)
+        Attributes.add(new (Context) NSKeyedArchiveLegacyAttr(
+                                               AsmName.getValue(), AtLoc,
+                                               AttrRange, /*Implicit=*/false));
       else
         llvm_unreachable("out of sync with switch");
     }
@@ -3957,9 +3962,9 @@
   VarDecl *PrimaryVar = nullptr;
   {
     Pattern *PrimaryPattern = pattern;
-    if (TypedPattern *Typed = dyn_cast<TypedPattern>(PrimaryPattern))
+    if (auto *Typed = dyn_cast<TypedPattern>(PrimaryPattern))
       PrimaryPattern = Typed->getSubPattern();
-    if (NamedPattern *Named = dyn_cast<NamedPattern>(PrimaryPattern)) {
+    if (auto *Named = dyn_cast<NamedPattern>(PrimaryPattern)) {
       PrimaryVar = Named->getDecl();
     }
   }
@@ -3972,7 +3977,7 @@
   }
 
   TypeLoc TyLoc;
-  if (TypedPattern *TP = dyn_cast<TypedPattern>(pattern)) {
+  if (auto *TP = dyn_cast<TypedPattern>(pattern)) {
     TyLoc = TP->getTypeLoc();
   } else if (!PrimaryVar) {
     TyLoc = TypeLoc::withoutLoc(ErrorType::get(Context));
@@ -4525,7 +4530,7 @@
     addPatternVariablesToScope(pattern);
     
     // Propagate back types for simple patterns, like "var A, B : T".
-    if (TypedPattern *TP = dyn_cast<TypedPattern>(pattern)) {
+    if (auto *TP = dyn_cast<TypedPattern>(pattern)) {
       if (isa<NamedPattern>(TP->getSubPattern()) && PatternInit == nullptr) {
         for (unsigned i = PBDEntries.size() - 1; i != 0; --i) {
           Pattern *PrevPat = PBDEntries[i-1].getPattern();
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index 65ffccd..803aeb7 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -454,7 +454,7 @@
 
   case tok::pound_keyPath:
     return parseExprKeyPathObjC();
-  case tok::pound_keyPath2:
+  case tok::backslash:
     if (!Context.LangOpts.EnableExperimentalKeyPaths)
       return parseExprPostfix(Message, isExprBasic);
     return parseExprKeyPath();
@@ -504,134 +504,67 @@
       new (Context) PrefixUnaryExpr(Operator, SubExpr.get()));
 }
 
-///   expr-keypath-swift:
-///     '#keyPath2' '(' (type ',')? keypath-component+ ')'
-///   keypath-component:
-///     '.' unqualified-name
-///     '[' expr ']'
-///     '?'
-///     '!'
+/// expr-keypath-swift:
+///   \ type? . initial-key-path-component key-path-components
+///
+/// key-path-components:
+//    key-path-component*
+///   <empty>
+///
+/// key-path-component:
+///   .identifier
+///   ?
+///   !
+///   [ expression ]
+///
+/// initial-key-path-component:
+///   identifier
+///   ?
+///   !
+///   [ expression ]
 ParserResult<Expr> Parser::parseExprKeyPath() {
-  // Consume '#keyPath2'.
-  // TODO: Finalize syntax.
-  SourceLoc keywordLoc = consumeToken(tok::pound_keyPath2);
-  // Parse the leading '('.
-  if (!Tok.is(tok::l_paren)) {
-    diagnose(Tok, diag::expr_keypath_expected_lparen);
-    return makeParserError();
-  }
-  SourceLoc lParenLoc = consumeToken(tok::l_paren);
-  
-  TypeRepr *root = nullptr;
+  // Consume '\'.
+  SourceLoc backslashLoc = consumeToken(tok::backslash);
+  llvm::SaveAndRestore<SourceLoc> slashLoc(SwiftKeyPathSlashLoc, backslashLoc);
 
-  // Can we parse a root type followed by a comma?
-  // We need to look ahead here since `[` could either start a sugar type or
-  // subscript component.
-  bool hasRoot;
-  {
-    BacktrackingScope backtrack(*this);
-    hasRoot = canParseType() && Tok.is(tok::comma);
-  }
-  
-  // Read in the root type, if present.
-  SourceLoc commaLoc;
-  if (hasRoot) {
-    root = parseType().get();
-    commaLoc = consumeToken(tok::comma);
-  }
-  
-  SmallVector<KeyPathExpr::Component, 4> components;
-  // Read in components.
-  ParserStatus status;
-  SourceLoc rParenLoc;
-  while (true) {
-    // A property component.
-    if (consumeIf(tok::period) || consumeIf(tok::period_prefix)) {
-      DeclNameLoc nameLoc;
-      auto name = parseUnqualifiedDeclName(/*afterDot*/ true, nameLoc,
-                                  diag::expr_keypath_expected_property_or_type);
-      if (!name) {
-        status.setIsParseError();
-        break;
-      }
-      
-      auto component =
-        KeyPathExpr::Component::forUnresolvedProperty(name,
-                                                      nameLoc.getBaseNameLoc());
-      components.push_back(component);
-      continue;
-    }
-    
-    // A subscript component.
-    if (Tok.is(tok::l_square)) {
-      SourceLoc lSquareLoc, rSquareLoc;
-      SmallVector<Expr *, 2> indexArgs;
-      SmallVector<Identifier, 2> indexArgLabels;
-      SmallVector<SourceLoc, 2> indexArgLabelLocs;
-      Expr *trailingClosure;
-      status = parseExprList(tok::l_square, tok::r_square,
-                             /*isPostfix=*/true,
-                             /*isExprBasic*/ true,
-                             lSquareLoc, indexArgs, indexArgLabels,
-                             indexArgLabelLocs,
-                             rSquareLoc,
-                             trailingClosure);
-      if (status.hasCodeCompletion() || status.isError())
-        break;
-      
-      auto component = KeyPathExpr::Component::forUnresolvedSubscript(Context,
-          lSquareLoc, indexArgs, indexArgLabels, indexArgLabelLocs, rSquareLoc,
-          trailingClosure);
-      components.push_back(component);
-      continue;
-    }
-    
-    // An optional forcing or chaining component.
-    if (Tok.is(tok::question_postfix)) {
-      auto loc = consumeToken(tok::question_postfix);
-      auto component = KeyPathExpr::Component::forUnresolvedOptionalChain(loc);
-      components.push_back(component);
-      continue;
-    }
-    if (Tok.is(tok::exclaim_postfix)) {
-      auto loc = consumeToken(tok::exclaim_postfix);
-      auto component = KeyPathExpr::Component::forUnresolvedOptionalForce(loc);
-      components.push_back(component);
-      continue;
-    }
-    
-    // A closing paren ends the expression.
-    if (Tok.is(tok::r_paren)) {
-      rParenLoc = consumeToken(tok::r_paren);
-      break;
-    }
-    
-    // TODO: code completion
-    
-    // Anything else is an error.
-    diagnose(Tok, diag::expr_keypath_invalid_component);
-    status.setIsParseError();
-    break;
-  }
-  
-  if (status.hasCodeCompletion()) {
-    return makeParserCodeCompletionResult<Expr>();
+  // FIXME: diagnostics
+  ParserResult<Expr> rootResult, pathResult;
+  if (!startsWithSymbol(Tok, '.')) {
+    llvm::SaveAndRestore<bool> S(InSwiftKeyPath, true);
+    rootResult = parseExprPostfix(diag::expr_keypath_expected_expr,
+                                  /*isBasic=*/true);
+
+    if (rootResult.isParseError() || rootResult.hasCodeCompletion())
+      return rootResult;
   }
 
-  // Create an ErrorExpr if we encountered an invalid component, but were able
-  // to parse the closing paren.
-  if (status.isError()) {
-    if (rParenLoc.isValid()) {
-      return makeParserResult<Expr>(
-                  new (Context) ErrorExpr(SourceRange(keywordLoc, rParenLoc)));
-    } else {
-      return makeParserErrorResult<Expr>();
-    }
+  if (startsWithSymbol(Tok, '.')) {
+    llvm::SaveAndRestore<Expr*> S(SwiftKeyPathRoot, rootResult.getPtrOrNull());
+
+    // For uniformity, \.foo is parsed as if it were MAGIC.foo, so we need to
+    // make sure the . is there, but parsing the ? in \.? as .? doesn't make
+    // sense. This is all made more complicated by .?. being considered an
+    // operator token, and a single one at that (which means
+    // peekToken().is(tok::identifier) is incorrect: it is true for .?.foo).
+    auto position = getParserPosition();
+    auto dotLoc = consumeStartingCharacterOfCurrentToken();
+    if (Tok.is(tok::identifier))
+      backtrackToPosition(position);
+
+    auto inner = makeParserResult(new (Context) KeyPathDotExpr(dotLoc));
+    bool unusedHasBindOptional = false;
+
+    // Inside a keypath's path, the period always behaves normally: the key path
+    // behavior is only the separation between type and path.
+    pathResult = parseExprPostfixSuffix(inner, /*isExprBasic=*/true,
+                                        /*periodHasKeyPathBehavior=*/false,
+                                        unusedHasBindOptional);
+    if (pathResult.isParseError() || pathResult.hasCodeCompletion())
+      return pathResult;
   }
-  
-  auto keypath = new (Context) KeyPathExpr(Context, keywordLoc, lParenLoc,
-                                           root, components, rParenLoc,
-                                           /*isObjC*/ false);
+
+  auto keypath = new (Context) KeyPathExpr(
+      backslashLoc, rootResult.getPtrOrNull(), pathResult.getPtrOrNull());
   return makeParserResult(keypath);
 }
 
@@ -654,9 +587,8 @@
   auto handleCodeCompletion = [&](bool hasDot) -> ParserResult<Expr> {
     KeyPathExpr *expr = nullptr;
     if (!components.empty()) {
-      expr = new (Context) KeyPathExpr(Context, keywordLoc, lParenLoc,
-                                       nullptr, components, Tok.getLoc(),
-                                       /*isObjC*/ true);
+      expr = new (Context)
+          KeyPathExpr(Context, keywordLoc, lParenLoc, components, Tok.getLoc());
     }
 
     if (CodeCompletion)
@@ -722,10 +654,8 @@
   }
 
   // We're done: create the key-path expression.
-  return makeParserResult<Expr>(
-    new (Context) KeyPathExpr(Context, keywordLoc, lParenLoc,
-                              nullptr, components,
-                              rParenLoc, /*isObjC*/ true));
+  return makeParserResult<Expr>(new (Context) KeyPathExpr(
+      Context, keywordLoc, lParenLoc, components, rParenLoc));
 }
 
 /// parseExprSelector
@@ -1133,6 +1063,255 @@
   return true;
 }
 
+ParserResult<Expr>
+Parser::parseExprPostfixSuffix(ParserResult<Expr> Result, bool isExprBasic,
+                               bool periodHasKeyPathBehavior,
+                               bool &hasBindOptional) {
+  hasBindOptional = false;
+
+  // Handle suffix expressions.
+  while (1) {
+    // FIXME: Better recovery.
+    if (Result.isNull())
+      return Result;
+
+    // Check for a .foo suffix.
+    SourceLoc TokLoc = Tok.getLoc();
+    if (Tok.is(tok::period) || Tok.is(tok::period_prefix)) {
+      // A key path is special, because it allows .[, unlike anywhere else. The
+      // period itself should be left in the token stream. (.? and .! end up
+      // being operators, and so aren't handled here.)
+      if (periodHasKeyPathBehavior && peekToken().is(tok::l_square)) {
+        break;
+      }
+
+      consumeToken();
+
+      // Handle "x.42" - a tuple index.
+      if (Tok.is(tok::integer_literal)) {
+        DeclName name = Context.getIdentifier(Tok.getText());
+        SourceLoc nameLoc = consumeToken(tok::integer_literal);
+
+        // Don't allow '.<integer literal>' following a numeric literal
+        // expression (unless in #if env, for 1.2.3.4 version numbers)
+        if (!InPoundIfEnvironment && Result.isNonNull() &&
+            isa<NumberLiteralExpr>(Result.get())) {
+          diagnose(nameLoc, diag::numeric_literal_numeric_member)
+              .highlight(Result.get()->getSourceRange());
+          continue;
+        }
+
+        Result = makeParserResult(new (Context) UnresolvedDotExpr(
+            Result.get(), TokLoc, name, DeclNameLoc(nameLoc),
+            /*Implicit=*/false));
+        continue;
+      }
+
+      // Handle "x.self" expr.
+      if (Tok.is(tok::kw_self)) {
+        Result = makeParserResult(
+            new (Context) DotSelfExpr(Result.get(), TokLoc, consumeToken()));
+        continue;
+      }
+
+      // Handle the deprecated 'x.dynamicType' and migrate it to `type(of: x)`
+      if (Tok.getText() == "dynamicType") {
+        auto range = Result.get()->getSourceRange();
+        auto dynamicTypeExprRange = SourceRange(TokLoc, Tok.getLoc());
+        diagnose(TokLoc, diag::expr_dynamictype_deprecated)
+            .highlight(dynamicTypeExprRange)
+            .fixItReplace(dynamicTypeExprRange, ")")
+            .fixItInsert(range.Start, "type(of: ");
+
+        // fallthrough to an UnresolvedDotExpr.
+      }
+
+      // If we have '.<keyword><code_complete>', try to recover by creating
+      // an identifier with the same spelling as the keyword.
+      if (Tok.isKeyword() && peekToken().is(tok::code_complete)) {
+        Identifier Name = Context.getIdentifier(Tok.getText());
+        Result = makeParserResult(new (Context) UnresolvedDotExpr(
+            Result.get(), TokLoc, Name, DeclNameLoc(Tok.getLoc()),
+            /*Implicit=*/false));
+        consumeToken();
+        // Fall into the next code completion handler.
+      }
+
+      // Handle "x.<tab>" for code completion.
+      if (Tok.is(tok::code_complete)) {
+        if (CodeCompletion && Result.isNonNull()) {
+          if (InSwiftKeyPath) {
+            Result = makeParserResult(
+              new (Context) KeyPathExpr(SwiftKeyPathSlashLoc, Result.get(),
+                                        nullptr));
+          } else if (SwiftKeyPathRoot) {
+            Result = makeParserResult(
+              new (Context) KeyPathExpr(SwiftKeyPathSlashLoc, SwiftKeyPathRoot,
+                                        Result.get()));
+          }
+          CodeCompletion->completeDotExpr(Result.get(), /*DotLoc=*/TokLoc);
+        }
+        // Eat the code completion token because we handled it.
+        consumeToken(tok::code_complete);
+        Result.setHasCodeCompletion();
+        return Result;
+      }
+
+      DeclNameLoc NameLoc;
+      DeclName Name = parseUnqualifiedDeclName(/*afterDot=*/true, NameLoc,
+                                               diag::expected_member_name);
+      if (!Name)
+        return nullptr;
+
+      Result = makeParserResult(
+          new (Context) UnresolvedDotExpr(Result.get(), TokLoc, Name, NameLoc,
+                                          /*Implicit=*/false));
+
+      if (canParseAsGenericArgumentList()) {
+        SmallVector<TypeRepr *, 8> args;
+        SourceLoc LAngleLoc, RAngleLoc;
+        if (parseGenericArguments(args, LAngleLoc, RAngleLoc)) {
+          diagnose(LAngleLoc, diag::while_parsing_as_left_angle_bracket);
+        }
+
+        SmallVector<TypeLoc, 8> locArgs;
+        for (auto ty : args)
+          locArgs.push_back(ty);
+        Result = makeParserResult(new (Context) UnresolvedSpecializeExpr(
+            Result.get(), LAngleLoc, Context.AllocateCopy(locArgs), RAngleLoc));
+      }
+
+      continue;
+    }
+
+    // If there is an expr-call-suffix, parse it and form a call.
+    if (Tok.isFollowingLParen()) {
+      Result = parseExprCallSuffix(Result, isExprBasic);
+      continue;
+    }
+
+    // NOTE: l_square_lit is for migrating the old object literal syntax.
+    // Eventually this block can be removed.
+    if (Tok.is(tok::l_square_lit) && !Tok.isAtStartOfLine() &&
+        isCollectionLiteralStartingWithLSquareLit()) {
+      assert(Tok.getLength() == 1);
+      Tok.setKind(tok::l_square);
+    }
+
+    // Check for a [expr] suffix.
+    // Note that this cannot be the start of a new line.
+    if (Tok.isFollowingLSquare()) {
+      SourceLoc lSquareLoc, rSquareLoc;
+      SmallVector<Expr *, 2> indexArgs;
+      SmallVector<Identifier, 2> indexArgLabels;
+      SmallVector<SourceLoc, 2> indexArgLabelLocs;
+      Expr *trailingClosure;
+
+      ParserStatus status = parseExprList(
+          tok::l_square, tok::r_square,
+          /*isPostfix=*/true, isExprBasic, lSquareLoc, indexArgs,
+          indexArgLabels, indexArgLabelLocs, rSquareLoc, trailingClosure);
+      if (status.hasCodeCompletion())
+        return makeParserCodeCompletionResult<Expr>();
+      if (status.isError() || Result.isNull())
+        return nullptr;
+      Result = makeParserResult(SubscriptExpr::create(
+          Context, Result.get(), lSquareLoc, indexArgs, indexArgLabels,
+          indexArgLabelLocs, rSquareLoc, trailingClosure, ConcreteDeclRef(),
+          /*implicit=*/false));
+      continue;
+    }
+
+    // Check for a trailing closure, if allowed.
+    if (Tok.is(tok::l_brace) && isValidTrailingClosure(isExprBasic, *this)) {
+      // FIXME: if Result has a trailing closure, break out.
+
+      // Stop after literal expressions, which may never have trailing closures.
+      const auto *callee = Result.get();
+      if (isa<LiteralExpr>(callee) || isa<CollectionExpr>(callee) ||
+          isa<TupleExpr>(callee))
+        break;
+
+      ParserResult<Expr> closure =
+          parseTrailingClosure(callee->getSourceRange());
+      if (closure.isNull())
+        return nullptr;
+
+      // Trailing closure implicitly forms a call.
+      Result = makeParserResult(
+          ParserStatus(closure),
+          CallExpr::create(Context, Result.get(), SourceLoc(), {}, {}, {},
+                           SourceLoc(), closure.get(), /*implicit=*/false));
+
+      if (Result.hasCodeCompletion())
+        return Result;
+
+      // We only allow a single trailing closure on a call.  This could be
+      // generalized in the future, but needs further design.
+      if (Tok.is(tok::l_brace))
+        break;
+      continue;
+    }
+
+    // Check for a ? suffix.
+    if (consumeIf(tok::question_postfix)) {
+      Result = makeParserResult(
+          new (Context) BindOptionalExpr(Result.get(), TokLoc, /*depth*/ 0));
+      hasBindOptional = true;
+      continue;
+    }
+
+    // Check for a ! suffix.
+    if (consumeIf(tok::exclaim_postfix)) {
+      Result =
+          makeParserResult(new (Context) ForceValueExpr(Result.get(), TokLoc));
+      continue;
+    }
+
+    // Check for a postfix-operator suffix.
+    if (Tok.is(tok::oper_postfix)) {
+      // KeyPaths are more restricted in what can go after a ., and so we treat
+      // them specially.
+      if (periodHasKeyPathBehavior && startsWithSymbol(Tok, '.'))
+        break;
+
+      Expr *oper = parseExprOperator();
+      Result =
+          makeParserResult(new (Context) PostfixUnaryExpr(oper, Result.get()));
+      continue;
+    }
+
+    if (Tok.is(tok::code_complete)) {
+      if (Tok.isAtStartOfLine()) {
+        // Postfix expression is located on a different line than the code
+        // completion token, and thus they are not related.
+        return Result;
+      }
+
+      if (CodeCompletion && Result.isNonNull()) {
+        bool hasSpace = Tok.getLoc() != getEndOfPreviousLoc();
+        CodeCompletion->completePostfixExpr(Result.get(), hasSpace);
+      }
+      // Eat the code completion token because we handled it.
+      consumeToken(tok::code_complete);
+      return makeParserCodeCompletionResult<Expr>();
+    }
+
+    // If we end up with an unknown token on this line, return an ErrorExpr
+    // covering the range of the token.
+    if (!Tok.isAtStartOfLine() && consumeIf(tok::unknown)) {
+      Result = makeParserResult(new (Context)
+                                    ErrorExpr(Result.get()->getSourceRange()));
+      continue;
+    }
+
+    // Otherwise, we don't know what this token is, it must end the expression.
+    break;
+  }
+
+  return Result;
+}
+
 /// parseExprPostfix
 ///
 ///   expr-literal:
@@ -1571,229 +1750,11 @@
     return Result;
 
   bool hasBindOptional = false;
-    
-  // Handle suffix expressions.
-  while (1) {
-    // FIXME: Better recovery.
-    if (Result.isNull())
-      return Result;
-    
-    // Check for a .foo suffix.
-    SourceLoc TokLoc = Tok.getLoc();
-    if (consumeIf(tok::period) || consumeIf(tok::period_prefix)) {
-
-      // Handle "x.42" - a tuple index.
-      if (Tok.is(tok::integer_literal)) {
-        DeclName name = Context.getIdentifier(Tok.getText());
-        SourceLoc nameLoc = consumeToken(tok::integer_literal);
-        
-        // Don't allow '.<integer literal>' following a numeric literal
-        // expression (unless in #if env, for 1.2.3.4 version numbers)
-        if (!InPoundIfEnvironment &&
-            Result.isNonNull() && isa<NumberLiteralExpr>(Result.get())) {
-          diagnose(nameLoc, diag::numeric_literal_numeric_member)
-            .highlight(Result.get()->getSourceRange());
-          continue;
-        }
-        
-        Result = makeParserResult(
-            new (Context) UnresolvedDotExpr(Result.get(), TokLoc, name,
-                                            DeclNameLoc(nameLoc),
-                                            /*Implicit=*/false));
-        continue;
-      }
-
-      // Handle "x.self" expr.
-      if (Tok.is(tok::kw_self)) {
-        Result = makeParserResult(
-          new (Context) DotSelfExpr(Result.get(), TokLoc, consumeToken()));
-        continue;
-      }
-
-      // Handle the deprecated 'x.dynamicType' and migrate it to `type(of: x)`
-      if (Tok.getText() == "dynamicType") {
-        auto range = Result.get()->getSourceRange();
-        auto dynamicTypeExprRange = SourceRange(TokLoc, Tok.getLoc());
-        diagnose(TokLoc, diag::expr_dynamictype_deprecated)
-          .highlight(dynamicTypeExprRange)
-          .fixItReplace(dynamicTypeExprRange, ")")
-          .fixItInsert(range.Start, "type(of: ");
-
-        // fallthrough to an UnresolvedDotExpr.
-      }
-           
-      // If we have '.<keyword><code_complete>', try to recover by creating
-      // an identifier with the same spelling as the keyword.
-      if (Tok.isKeyword() && peekToken().is(tok::code_complete)) {
-        Identifier Name = Context.getIdentifier(Tok.getText());
-        Result = makeParserResult(
-            new (Context) UnresolvedDotExpr(Result.get(), TokLoc,
-                                            Name, DeclNameLoc(Tok.getLoc()),
-                                            /*Implicit=*/false));
-        consumeToken();
-        // Fall into the next code completion handler.
-      }
-
-      // Handle "x.<tab>" for code completion.
-      if (Tok.is(tok::code_complete)) {
-        if (CodeCompletion && Result.isNonNull())
-          CodeCompletion->completeDotExpr(Result.get(), /*DotLoc=*/TokLoc);
-        // Eat the code completion token because we handled it.
-        consumeToken(tok::code_complete);
-        Result.setHasCodeCompletion();
-        return Result;
-      }
-
-      DeclNameLoc NameLoc;
-      DeclName Name = parseUnqualifiedDeclName(/*afterDot=*/true,
-                                               NameLoc,
-                                               diag::expected_member_name);
-      if (!Name) return nullptr;
-    
-      Result = makeParserResult(
-                 new (Context) UnresolvedDotExpr(Result.get(), TokLoc, Name,
-                                                 NameLoc,
-                                                 /*Implicit=*/false));
-        
-      if (canParseAsGenericArgumentList()) {
-        SmallVector<TypeRepr*, 8> args;
-        SourceLoc LAngleLoc, RAngleLoc;
-        if (parseGenericArguments(args, LAngleLoc, RAngleLoc)) {
-          diagnose(LAngleLoc, diag::while_parsing_as_left_angle_bracket);
-        }
-
-        SmallVector<TypeLoc, 8> locArgs;
-        for (auto ty : args)
-          locArgs.push_back(ty);
-        Result = makeParserResult(new (Context) UnresolvedSpecializeExpr(
-                   Result.get(), LAngleLoc, Context.AllocateCopy(locArgs),
-                   RAngleLoc));
-      }
-
-      continue;
-    }
-
-    // If there is an expr-call-suffix, parse it and form a call.
-    if (Tok.isFollowingLParen()) {
-      Result = parseExprCallSuffix(Result, isExprBasic);
-      continue;
-    }
-    
-    // NOTE: l_square_lit is for migrating the old object literal syntax.
-    // Eventually this block can be removed.
-    if (Tok.is(tok::l_square_lit) && !Tok.isAtStartOfLine() &&
-        isCollectionLiteralStartingWithLSquareLit()) {
-      assert(Tok.getLength() == 1);
-      Tok.setKind(tok::l_square);
-    }
-
-    // Check for a [expr] suffix.
-    // Note that this cannot be the start of a new line.
-    if (Tok.isFollowingLSquare()) {
-      SourceLoc lSquareLoc, rSquareLoc;
-      SmallVector<Expr *, 2> indexArgs;
-      SmallVector<Identifier, 2> indexArgLabels;
-      SmallVector<SourceLoc, 2> indexArgLabelLocs;
-      Expr *trailingClosure;
-      
-      ParserStatus status = parseExprList(tok::l_square, tok::r_square,
-                                          /*isPostfix=*/true, isExprBasic,
-                                          lSquareLoc, indexArgs, indexArgLabels,
-                                          indexArgLabelLocs,
-                                          rSquareLoc,
-                                          trailingClosure);
-      if (status.hasCodeCompletion())
-        return makeParserCodeCompletionResult<Expr>();
-      if (status.isError() || Result.isNull())
-        return nullptr;
-      Result = makeParserResult(
-        SubscriptExpr::create(Context, Result.get(), lSquareLoc, indexArgs,
-                              indexArgLabels, indexArgLabelLocs, rSquareLoc,
-                              trailingClosure, ConcreteDeclRef(),
-                              /*implicit=*/false));
-      continue;
-    }
-
-    // Check for a trailing closure, if allowed.
-    if (Tok.is(tok::l_brace) && isValidTrailingClosure(isExprBasic, *this)) {
-      // FIXME: if Result has a trailing closure, break out.
-
-      // Stop after literal expressions, which may never have trailing closures.
-      const auto *callee = Result.get();
-      if (isa<LiteralExpr>(callee) || isa<CollectionExpr>(callee) ||
-          isa<TupleExpr>(callee))
-        break;
-
-      ParserResult<Expr> closure =
-        parseTrailingClosure(callee->getSourceRange());
-      if (closure.isNull()) return nullptr;
-
-      // Trailing closure implicitly forms a call.
-      Result = makeParserResult(
-                 ParserStatus(closure),
-                 CallExpr::create(Context, Result.get(), SourceLoc(),
-                                  { }, { }, { }, SourceLoc(),
-                                  closure.get(), /*implicit=*/false));
-
-      if (Result.hasCodeCompletion())
-        return Result;
-
-      // We only allow a single trailing closure on a call.  This could be
-      // generalized in the future, but needs further design.
-      if (Tok.is(tok::l_brace)) break;
-      continue;
-    }
-
-    // Check for a ? suffix.
-    if (consumeIf(tok::question_postfix)) {
-      Result = makeParserResult(
-          new (Context) BindOptionalExpr(Result.get(), TokLoc, /*depth*/ 0));
-      hasBindOptional = true;
-      continue;
-    }
-
-    // Check for a ! suffix.
-    if (consumeIf(tok::exclaim_postfix)) {
-      Result = makeParserResult(new (Context) ForceValueExpr(Result.get(), 
-                                                             TokLoc));
-      continue;
-    }
-
-    // Check for a postfix-operator suffix.
-    if (Tok.is(tok::oper_postfix)) {
-      Expr *oper = parseExprOperator();
-      Result = makeParserResult(
-          new (Context) PostfixUnaryExpr(oper, Result.get()));
-      continue;
-    }
-
-    if (Tok.is(tok::code_complete)) {
-      if (Tok.isAtStartOfLine()) {
-        // Postfix expression is located on a different line than the code
-        // completion token, and thus they are not related.
-        return Result;
-      }
-
-      if (CodeCompletion && Result.isNonNull()) {
-        bool hasSpace = Tok.getLoc() != getEndOfPreviousLoc();
-        CodeCompletion->completePostfixExpr(Result.get(), hasSpace);
-      }
-      // Eat the code completion token because we handled it.
-      consumeToken(tok::code_complete);
-      return makeParserCodeCompletionResult<Expr>();
-    }
-    
-    // If we end up with an unknown token on this line, return an ErrorExpr
-    // covering the range of the token.
-    if (!Tok.isAtStartOfLine() && consumeIf(tok::unknown)) {
-      Result = makeParserResult(
-                      new (Context) ErrorExpr(Result.get()->getSourceRange()));
-      continue;
-    }
-    
-    // Otherwise, we don't know what this token is, it must end the expression.
-    break;
-  }
+  Result = parseExprPostfixSuffix(Result, isExprBasic,
+                                  /*periodHasKeyPathBehavior=*/InSwiftKeyPath,
+                                  hasBindOptional);
+  if (Result.isParseError() || Result.hasCodeCompletion())
+    return Result;
 
   // If we had a ? suffix expression, bind the entire postfix chain
   // within an OptionalEvaluationExpr.
@@ -2451,6 +2412,88 @@
     }
   }
 
+  if (!params)
+    return invalid;
+
+  // If this was a closure declaration (maybe even trailing)
+  // tuple parameter destructuring is one of the common
+  // problems, and is misleading to users, so it's imperative
+  // to detect any tuple splat or destructuring as early as
+  // possible and give a proper fix-it. See SE-0110 for more details.
+  auto isTupleDestructuring = [](ParamDecl *param) -> bool {
+    if (!param->isInvalid())
+      return false;
+    auto &typeLoc = param->getTypeLoc();
+    if (auto typeRepr = typeLoc.getTypeRepr())
+      return !param->hasName() && isa<TupleTypeRepr>(typeRepr);
+    return false;
+  };
+
+  // Extract names of the tuple elements and preserve the structure
+  // of the tuple (with any nested tuples inside) to be able to use
+  // it in the fix-it without any type information provided by user.
+  std::function<StringRef(const TypeRepr *)> getTupleNames =
+      [&](const TypeRepr *typeRepr) -> StringRef {
+    if (!typeRepr)
+      return "";
+
+    auto tupleRepr = dyn_cast<TupleTypeRepr>(typeRepr);
+    if (!tupleRepr)
+      return "";
+
+    SmallString<32> names;
+    llvm::raw_svector_ostream OS(names);
+
+    OS << "(";
+    unsigned elementIndex = 0;
+    interleave(tupleRepr->getElements(),
+               [&](const TypeRepr *element) {
+                 if (isa<TupleTypeRepr>(element)) {
+                   OS << getTupleNames(element);
+                 } else {
+                   auto name = tupleRepr->getElementName(elementIndex);
+                   // If there is no label from the element
+                   // it means that it's malformed and we can
+                   // use the type instead.
+                   if (name.empty())
+                     element->print(OS);
+                   else
+                     OS << name;
+                 }
+
+                 ++elementIndex;
+               },
+               [&] { OS << ", "; });
+    OS << ")";
+
+    return OS.str();
+  };
+
+  for (unsigned i = 0, e = params->size(); i != e; ++i) {
+    auto *param = params->get(i);
+    if (!isTupleDestructuring(param))
+      continue;
+
+    auto argName = "arg" + std::to_string(i);
+    auto typeLoc = param->getTypeLoc();
+
+    SmallString<64> fixIt;
+    llvm::raw_svector_ostream OS(fixIt);
+    auto isMultiLine = Tok.isAtStartOfLine();
+    StringRef indent = Lexer::getIndentationForLine(SourceMgr, Tok.getLoc());
+    if (isMultiLine)
+      OS << '\n' << indent;
+
+    OS << "let " << getTupleNames(typeLoc.getTypeRepr()) << " = " << argName
+       << (isMultiLine ? "\n" + indent : "; ");
+
+    diagnose(param->getStartLoc(), diag::anon_closure_tuple_param_destructuring)
+        .fixItReplace(param->getSourceRange(), argName)
+        .fixItInsert(Tok.getLoc(), OS.str());
+
+    invalid = true;
+  }
+
   return invalid;
 }
 
diff --git a/lib/Parse/ParsePattern.cpp b/lib/Parse/ParsePattern.cpp
index bddae8d..0091b62 100644
--- a/lib/Parse/ParsePattern.cpp
+++ b/lib/Parse/ParsePattern.cpp
@@ -266,10 +266,18 @@
         status |= type;
         param.Type = type.getPtrOrNull();
 
-        // Unnamed parameters must be written as "_: Type".
+        // If this is a closure declaration, what is going
+        // on is most likely argument destructuring, we are going
+        // to diagnose that after all of the parameters are parsed.
         if (param.Type) {
-          diagnose(typeStartLoc, diag::parameter_unnamed)
-            .fixItInsert(typeStartLoc, "_: ");
+          // Mark current parameter as invalid so it is possible
+          // to diagnose it as destructuring of the closure parameter list.
+          param.isInvalid = true;
+          if (!isClosure) {
+            // Unnamed parameters must be written as "_: Type".
+            diagnose(typeStartLoc, diag::parameter_unnamed)
+                .fixItInsert(typeStartLoc, "_: ");
+          }
         }
       } else {
         // Otherwise, we're not sure what is going on, but this doesn't smell
diff --git a/lib/Parse/ParseSIL.cpp b/lib/Parse/ParseSIL.cpp
index acd4bc6..08cabcb 100644
--- a/lib/Parse/ParseSIL.cpp
+++ b/lib/Parse/ParseSIL.cpp
@@ -1185,7 +1185,9 @@
 
   if (!P.consumeIf(tok::sil_exclamation)) {
     // Construct SILDeclRef.
-    Result = SILDeclRef(VD, Kind, expansion, uncurryLevel, IsObjC);
+    Result = SILDeclRef(VD, Kind, expansion, /*isCurried=*/false, IsObjC);
+    if (uncurryLevel < Result.getUncurryLevel())
+      Result = Result.asCurried();
     return false;
   }
 
@@ -1274,7 +1276,9 @@
   } while (P.consumeIf(tok::period));
 
   // Construct SILDeclRef.
-  Result = SILDeclRef(VD, Kind, expansion, uncurryLevel, IsObjC);
+  Result = SILDeclRef(VD, Kind, expansion, /*isCurried=*/false, IsObjC);
+  if (uncurryLevel < Result.getUncurryLevel())
+    Result = Result.asCurried();
   return false;
 }
 
@@ -4497,9 +4501,7 @@
       Args.push_back(getLocalValue(ArgName, expectedTy, InstLoc, B));
     }
 
-    ResultVal =
-        B.createApply(InstLoc, FnVal, FnTy, substConv.getSILResultType(), subs,
-                      Args, IsNonThrowingApply);
+    ResultVal = B.createApply(InstLoc, FnVal, subs, Args, IsNonThrowingApply);
     break;
   }
   case ValueKind::PartialApplyInst: {
@@ -4520,12 +4522,9 @@
       Args.push_back(getLocalValue(ArgName, expectedTy, InstLoc, B));
     }
 
-    SILType closureTy =
-      SILBuilder::getPartialApplyResultType(Ty, ArgNames.size(), SILMod, subs,
-                                            PartialApplyConvention);
     // FIXME: Why the arbitrary order difference in IRBuilder type argument?
-    ResultVal = B.createPartialApply(InstLoc, FnVal, FnTy,
-                                     subs, Args, closureTy);
+    ResultVal = B.createPartialApply(InstLoc, FnVal, subs, Args,
+                                     PartialApplyConvention);
     break;
   }
   case ValueKind::TryApplyInst: {
@@ -4557,8 +4556,7 @@
 
     SILBasicBlock *normalBB = getBBForReference(normalBBName, normalBBLoc);
     SILBasicBlock *errorBB = getBBForReference(errorBBName, errorBBLoc);
-    ResultVal = B.createTryApply(InstLoc, FnVal, FnTy,
-                                 subs, args, normalBB, errorBB);
+    ResultVal = B.createTryApply(InstLoc, FnVal, subs, args, normalBB, errorBB);
     break;
   }
   }
@@ -4955,7 +4953,7 @@
     return true;
   }
 
-  ClassDecl *theClass = dyn_cast<ClassDecl>(VD);
+  auto *theClass = dyn_cast<ClassDecl>(VD);
   if (!theClass) {
     diagnose(Loc, diag::sil_vtable_class_not_found, Name);
     return true;
@@ -5020,7 +5018,7 @@
     P.diagnose(DeclLoc, diag::sil_witness_protocol_not_found, DeclName);
     return nullptr;
   }
-  ProtocolDecl *proto = dyn_cast<ProtocolDecl>(VD);
+  auto *proto = dyn_cast<ProtocolDecl>(VD);
   if (!proto)
     P.diagnose(DeclLoc, diag::sil_witness_protocol_not_found, DeclName);
   return proto;
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp
index 38640c1..cd13134 100644
--- a/lib/Parse/ParseStmt.cpp
+++ b/lib/Parse/ParseStmt.cpp
@@ -394,11 +394,11 @@
 
     if (!NeedParseErrorRecovery && Tok.is(tok::semi)) {
       PreviousHadSemi = true;
-      if (Expr *E = Result.dyn_cast<Expr*>())
+      if (auto *E = Result.dyn_cast<Expr*>())
         E->TrailingSemiLoc = consumeToken(tok::semi);
-      else if (Stmt *S = Result.dyn_cast<Stmt*>())
+      else if (auto *S = Result.dyn_cast<Stmt*>())
         S->TrailingSemiLoc = consumeToken(tok::semi);
-      else if (Decl *D = Result.dyn_cast<Decl*>())
+      else if (auto *D = Result.dyn_cast<Decl*>())
         D->TrailingSemiLoc = consumeToken(tok::semi);
       else
         assert(!Result && "Unsupported AST node");
diff --git a/lib/PrintAsObjC/PrintAsObjC.cpp b/lib/PrintAsObjC/PrintAsObjC.cpp
index e75f21e..683d166 100644
--- a/lib/PrintAsObjC/PrintAsObjC.cpp
+++ b/lib/PrintAsObjC/PrintAsObjC.cpp
@@ -214,19 +214,13 @@
 private:
   /// Prints a protocol adoption list: <code>&lt;NSCoding, NSCopying&gt;</code>
   ///
-  /// This method filters out non-ObjC protocols, along with the special
-  /// AnyObject protocol.
+  /// This method filters out non-ObjC protocols.
   void printProtocols(ArrayRef<ProtocolDecl *> protos) {
     SmallVector<ProtocolDecl *, 4> protosToPrint;
     std::copy_if(protos.begin(), protos.end(),
                  std::back_inserter(protosToPrint),
                  [this](const ProtocolDecl *PD) -> bool {
-      if (!shouldInclude(PD))
-        return false;
-      auto knownProtocol = PD->getKnownProtocolKind();
-      if (!knownProtocol)
-        return true;
-      return *knownProtocol != KnownProtocolKind::AnyObject;
+      return shouldInclude(PD);
     });
 
     // Drop protocols from the list that are implied by other protocols.
@@ -1900,16 +1894,7 @@
       return true;
 
     auto conformsTo = sig->getConformsTo(paramTy, mod);
-
-    if (conformsTo.size() > 1)
-      return true;
-    if (conformsTo.size() == 0)
-      return false;
-
-    const ProtocolDecl *proto = conformsTo.front();
-    if (auto knownKind = proto->getKnownProtocolKind())
-      return knownKind.getValue() != KnownProtocolKind::AnyObject;
-    return true;
+    return conformsTo.size() > 0;
   }
 
   void visitBoundGenericType(BoundGenericType *boundGeneric) {
@@ -2077,7 +2062,6 @@
 
   void forwardDeclare(const ProtocolDecl *PD) {
     assert(PD->isObjC() ||
-           *PD->getKnownProtocolKind() == KnownProtocolKind::AnyObject ||
            *PD->getKnownProtocolKind() == KnownProtocolKind::Error);
     forwardDeclare(PD, [&]{
       os << "@protocol " << getNameForObjC(PD) << ";\n";
@@ -2238,10 +2222,6 @@
     if (addImport(PD))
       return true;
 
-    auto knownProtocol = PD->getKnownProtocolKind();
-    if (knownProtocol && *knownProtocol == KnownProtocolKind::AnyObject)
-      return true;
-
     if (seenTypes[PD].first == EmissionState::Defined)
       return true;
 
diff --git a/lib/RemoteAST/RemoteAST.cpp b/lib/RemoteAST/RemoteAST.cpp
index 70e7a03..08ecc53 100644
--- a/lib/RemoteAST/RemoteAST.cpp
+++ b/lib/RemoteAST/RemoteAST.cpp
@@ -16,7 +16,6 @@
 
 #include "swift/RemoteAST/RemoteAST.h"
 #include "swift/Remote/MetadataReader.h"
-#include "swift/Strings.h"
 #include "swift/Subsystems.h"
 #include "swift/AST/ASTContext.h"
 #include "swift/AST/Decl.h"
@@ -306,26 +305,31 @@
 
   Type createProtocolType(StringRef mangledName,
                           StringRef moduleName,
-                          StringRef protocolName) {
+                          StringRef privateDiscriminator,
+                          StringRef name) {
     auto module = Ctx.getModuleByName(moduleName);
     if (!module) return Type();
 
-    Identifier name = Ctx.getIdentifier(protocolName);
-    auto decl = findNominalTypeDecl(module, name, Identifier(),
+    auto decl = findNominalTypeDecl(module,
+                                    Ctx.getIdentifier(name),
+                                    (privateDiscriminator.empty()
+                                     ? Identifier()
+                                     : Ctx.getIdentifier(privateDiscriminator)),
                                     Demangle::Node::Kind::Protocol);
     if (!decl) return Type();
 
     return decl->getDeclaredType();
   }
 
-  Type createProtocolCompositionType(ArrayRef<Type> protocols) {
-    for (auto protocol : protocols) {
-      if (!protocol->is<ProtocolType>())
+  Type createProtocolCompositionType(ArrayRef<Type> members,
+                                     bool hasExplicitAnyObject) {
+    for (auto member : members) {
+      if (!member->isExistentialType() &&
+          !member->getClassOrBoundGenericClass())
         return Type();
     }
-    return ProtocolCompositionType::get(Ctx, protocols,
-                                        // FIXME
-                                        /*HasExplicitAnyObject=*/false);
+
+    return ProtocolCompositionType::get(Ctx, members, hasExplicitAnyObject);
   }
 
   Type createExistentialMetatypeType(Type instance) {
@@ -522,8 +526,7 @@
   if (node->getKind() != Demangle::Node::Kind::Module)
     return false;
 
-  return (node->getText() == MANGLING_MODULE_OBJC ||
-          node->getText() == MANGLING_MODULE_CLANG_IMPORTER);
+  return (node->getText() == "__ObjC");
 }
 
 DeclContext *
diff --git a/lib/SIL/Projection.cpp b/lib/SIL/Projection.cpp
index 57e2828..62927dd 100644
--- a/lib/SIL/Projection.cpp
+++ b/lib/SIL/Projection.cpp
@@ -803,7 +803,7 @@
     case ProjectionKind::Index:
       break;
     case ProjectionKind::Enum:
-      if (EnumInst *EI = dyn_cast<EnumInst>(I)) {
+      if (auto *EI = dyn_cast<EnumInst>(I)) {
         if (EI->getElement() == getEnumElementDecl(I->getType())) {
           assert(EI->hasOperand() && "expected data operand");
           return EI->getOperand();
diff --git a/lib/SIL/SILDeclRef.cpp b/lib/SIL/SILDeclRef.cpp
index d8c67d5..1c92985 100644
--- a/lib/SIL/SILDeclRef.cpp
+++ b/lib/SIL/SILDeclRef.cpp
@@ -227,94 +227,55 @@
 
 static unsigned getFuncNaturalUncurryLevel(AnyFunctionRef AFR) {
   assert(AFR.getParameterLists().size() >= 1 && "no arguments for func?!");
-  unsigned Level = AFR.getParameterLists().size() - 1;
-  // Functions with captures have an extra uncurry level for the capture
-  // context.
-  llvm::DenseSet<AnyFunctionRef> visited;
-  visited.insert(AFR);
-  if (hasLoweredLocalCaptures(AFR, visited))
-    Level += 1;
-  return Level;
+  return AFR.getParameterLists().size() - 1;
+}
+
+unsigned swift::getNaturalUncurryLevel(ValueDecl *vd) {
+  if (auto *func = dyn_cast<FuncDecl>(vd)) {
+    return getFuncNaturalUncurryLevel(func);
+  } else if (isa<ConstructorDecl>(vd)) {
+    return 1;
+  } else if (auto *ed = dyn_cast<EnumElementDecl>(vd)) {
+    return ed->getArgumentInterfaceType() ? 1 : 0;
+  } else if (isa<DestructorDecl>(vd)) {
+    return 0;
+  } else if (isa<ClassDecl>(vd)) {
+    return 1;
+  } else if (isa<VarDecl>(vd)) {
+    return 0;
+  } else {
+    llvm_unreachable("Unhandled ValueDecl for SILDeclRef");
+  }
 }
 
 SILDeclRef::SILDeclRef(ValueDecl *vd, SILDeclRef::Kind kind,
                        ResilienceExpansion expansion,
-                       unsigned atUncurryLevel, bool isForeign)
+                       bool isCurried, bool isForeign)
   : loc(vd), kind(kind), Expansion(unsigned(expansion)),
-    isForeign(isForeign), isDirectReference(0), defaultArgIndex(0)
-{
-  unsigned naturalUncurryLevel;
-
-  // FIXME: restructure to use a "switch".
-  if (auto *func = dyn_cast<FuncDecl>(vd)) {
-    assert(kind == Kind::Func &&
-           "can only create a Func SILDeclRef for a func decl");
-    naturalUncurryLevel = getFuncNaturalUncurryLevel(func);
-  } else if (isa<ConstructorDecl>(vd)) {
-    assert((kind == Kind::Allocator || kind == Kind::Initializer)
-           && "can only create Allocator or Initializer SILDeclRef for ctor");
-    naturalUncurryLevel = 1;
-  } else if (auto *ed = dyn_cast<EnumElementDecl>(vd)) {
-    assert(kind == Kind::EnumElement
-           && "can only create EnumElement SILDeclRef for enum element");
-    naturalUncurryLevel = ed->getArgumentInterfaceType() ? 1 : 0;
-  } else if (isa<DestructorDecl>(vd)) {
-    assert((kind == Kind::Destroyer || kind == Kind::Deallocator)
-           && "can only create destroyer/deallocator SILDeclRef for dtor");
-    naturalUncurryLevel = 0;
-  } else if (isa<ClassDecl>(vd)) {
-    assert((kind == Kind::IVarInitializer || kind == Kind::IVarDestroyer) &&
-           "can only create ivar initializer/destroyer SILDeclRef for class");
-    naturalUncurryLevel = 1;
-  } else if (auto *var = dyn_cast<VarDecl>(vd)) {
-    assert((kind == Kind::GlobalAccessor ||
-            kind == Kind::GlobalGetter ||
-            kind == Kind::StoredPropertyInitializer) &&
-           "can only create GlobalAccessor, GlobalGetter or "
-           "StoredPropertyInitializer SILDeclRef for var");
-
-    naturalUncurryLevel = 0;
-    assert(!var->getDeclContext()->isLocalContext() &&
-           "can't reference local var as global var");
-    assert(var->hasStorage() && "can't reference computed var as global var");
-    (void)var;
-  } else {
-    llvm_unreachable("Unhandled ValueDecl for SILDeclRef");
-  }
-  
-  assert((atUncurryLevel == ConstructAtNaturalUncurryLevel
-          || atUncurryLevel <= naturalUncurryLevel)
-         && "can't emit SILDeclRef below natural uncurry level");
-  uncurryLevel = atUncurryLevel == ConstructAtNaturalUncurryLevel
-    ? naturalUncurryLevel
-    : atUncurryLevel;
-  isCurried = uncurryLevel != naturalUncurryLevel;
-}
+    isCurried(isCurried), isForeign(isForeign),
+    isDirectReference(0), defaultArgIndex(0)
+{}
 
 SILDeclRef::SILDeclRef(SILDeclRef::Loc baseLoc,
                        ResilienceExpansion expansion,
-                       unsigned atUncurryLevel, bool asForeign) 
- : isDirectReference(0), defaultArgIndex(0)
+                       bool isCurried, bool asForeign) 
+  : isCurried(isCurried), isDirectReference(0), defaultArgIndex(0)
 {
-  unsigned naturalUncurryLevel;
-  if (ValueDecl *vd = baseLoc.dyn_cast<ValueDecl*>()) {
-    if (FuncDecl *fd = dyn_cast<FuncDecl>(vd)) {
+  if (auto *vd = baseLoc.dyn_cast<ValueDecl*>()) {
+    if (auto *fd = dyn_cast<FuncDecl>(vd)) {
       // Map FuncDecls directly to Func SILDeclRefs.
       loc = fd;
       kind = Kind::Func;
-      naturalUncurryLevel = getFuncNaturalUncurryLevel(fd);
     }
     // Map ConstructorDecls to the Allocator SILDeclRef of the constructor.
-    else if (ConstructorDecl *cd = dyn_cast<ConstructorDecl>(vd)) {
+    else if (auto *cd = dyn_cast<ConstructorDecl>(vd)) {
       loc = cd;
       kind = Kind::Allocator;
-      naturalUncurryLevel = 1;
     }
     // Map EnumElementDecls to the EnumElement SILDeclRef of the element.
-    else if (EnumElementDecl *ed = dyn_cast<EnumElementDecl>(vd)) {
+    else if (auto *ed = dyn_cast<EnumElementDecl>(vd)) {
       loc = ed;
       kind = Kind::EnumElement;
-      naturalUncurryLevel = ed->getArgumentInterfaceType() ? 1 : 0;
     }
     // VarDecl constants require an explicit kind.
     else if (isa<VarDecl>(vd)) {
@@ -324,7 +285,6 @@
     else if (auto dtor = dyn_cast<DestructorDecl>(vd)) {
       loc = dtor;
       kind = Kind::Deallocator;
-      naturalUncurryLevel = 0;
     }
     else {
       llvm_unreachable("invalid loc decl for SILDeclRef!");
@@ -334,21 +294,11 @@
     kind = Kind::Func;
     assert(ACE->getParameterLists().size() >= 1 &&
            "no param patterns for function?!");
-    naturalUncurryLevel = getFuncNaturalUncurryLevel(ACE);
   } else {
     llvm_unreachable("impossible SILDeclRef loc");
   }
 
-  // Set the uncurry level.
-  assert((atUncurryLevel == ConstructAtNaturalUncurryLevel
-          || atUncurryLevel <= naturalUncurryLevel)
-         && "can't emit SILDeclRef below natural uncurry level");
-  uncurryLevel = atUncurryLevel == ConstructAtNaturalUncurryLevel
-    ? naturalUncurryLevel
-    : atUncurryLevel;
   Expansion = (unsigned) expansion;
-  
-  isCurried = uncurryLevel != naturalUncurryLevel;  
   isForeign = asForeign;
 }
 
@@ -421,6 +371,12 @@
     return SILLinkage::Private;
   }
 
+  // Add External to the linkage (e.g. Public -> PublicExternal) if this is a
+  // declaration not a definition.
+  auto maybeAddExternal = [&](SILLinkage linkage) {
+    return forDefinition ? linkage : addExternalToLinkage(linkage);
+  };
+
   // Native function-local declarations have shared linkage.
   // FIXME: @objc declarations should be too, but we currently have no way
   // of marking them "used" other than making them external. 
@@ -442,15 +398,25 @@
     switch (d->getEffectiveAccess()) {
     case Accessibility::Private:
     case Accessibility::FilePrivate:
-      return (forDefinition
-              ? SILLinkage::Private
-              : SILLinkage::PrivateExternal);
+      return maybeAddExternal(SILLinkage::Private);
 
     default:
       return SILLinkage::Shared;
     }
   }
 
+  // ivar initializers and destroyers are completely contained within the class
+  // from which they come, and never get seen externally.
+  if (isIVarInitializerOrDestroyer()) {
+    switch (d->getEffectiveAccess()) {
+    case Accessibility::Private:
+    case Accessibility::FilePrivate:
+      return maybeAddExternal(SILLinkage::Private);
+    default:
+      return maybeAddExternal(SILLinkage::Hidden);
+    }
+  }
+
   // Calling convention thunks have shared linkage.
   if (isForeignToNativeThunk())
     return SILLinkage::Shared;
@@ -468,13 +434,13 @@
   switch (d->getEffectiveAccess()) {
     case Accessibility::Private:
     case Accessibility::FilePrivate:
-      return (forDefinition ? SILLinkage::Private : SILLinkage::PrivateExternal);
+      return maybeAddExternal(SILLinkage::Private);
 
     case Accessibility::Internal:
-      return (forDefinition ? SILLinkage::Hidden : SILLinkage::HiddenExternal);
+      return maybeAddExternal(SILLinkage::Hidden);
 
     default:
-      return (forDefinition ? SILLinkage::Public : SILLinkage::PublicExternal);
+      return maybeAddExternal(SILLinkage::Public);
   }
 }
 
@@ -794,7 +760,7 @@
   if (!overridden)
     return SILDeclRef();
 
-  return SILDeclRef(overridden, kind, getResilienceExpansion(), uncurryLevel);
+  return SILDeclRef(overridden, kind, getResilienceExpansion(), isCurried);
 }
 
 SILDeclRef SILDeclRef::getNextOverriddenVTableEntry() const {
@@ -878,3 +844,13 @@
 
   llvm_unreachable("Unhandled Accessibility in switch.");
 }
+
+unsigned SILDeclRef::getUncurryLevel() const {
+  if (isCurried)
+    return 0;
+  if (!hasDecl())
+    return getFuncNaturalUncurryLevel(*getAnyFunctionRef());
+  if (kind == Kind::DefaultArgGenerator)
+    return 0;
+  return getNaturalUncurryLevel(getDecl());
+}
diff --git a/lib/SIL/SILFunctionType.cpp b/lib/SIL/SILFunctionType.cpp
index c03f5df..5ac26c1 100644
--- a/lib/SIL/SILFunctionType.cpp
+++ b/lib/SIL/SILFunctionType.cpp
@@ -128,7 +128,7 @@
       if (decls.size() != 1)
         return CanType();
 
-      const TypeDecl *typeDecl = dyn_cast<TypeDecl>(decls.front());
+      const auto *typeDecl = dyn_cast<TypeDecl>(decls.front());
       if (!typeDecl)
         return CanType();
 
@@ -521,7 +521,7 @@
       }
 
       // Okay, handle 'self'.
-      if (CanTupleType substTupleType = dyn_cast<TupleType>(substType)) {
+      if (auto substTupleType = dyn_cast<TupleType>(substType)) {
         unsigned numEltTypes = substTupleType.getElementTypes().size();
         assert(numEltTypes > 0);
 
@@ -1398,7 +1398,7 @@
 
 /// Try to find a clang method declaration for the given function.
 static const clang::Decl *findClangMethod(ValueDecl *method) {
-  if (FuncDecl *methodFn = dyn_cast<FuncDecl>(method)) {
+  if (auto *methodFn = dyn_cast<FuncDecl>(method)) {
     if (auto *decl = methodFn->getClangDecl())
       return decl;
 
@@ -1406,7 +1406,7 @@
       return findClangMethod(overridden);
   }
 
-  if (ConstructorDecl *constructor = dyn_cast<ConstructorDecl>(method)) {
+  if (auto *constructor = dyn_cast<ConstructorDecl>(method)) {
     if (auto *decl = constructor->getClangDecl())
       return decl;
   }
@@ -1640,9 +1640,10 @@
 CanSILFunctionType TypeConverter::
 getUncachedSILFunctionTypeForConstant(SILDeclRef constant,
                                       CanAnyFunctionType origInterfaceType) {
-  auto origLoweredInterfaceType = getLoweredASTFunctionType(origInterfaceType,
-                                                            constant.uncurryLevel,
-                                                            constant);
+  auto origLoweredInterfaceType =
+    getLoweredASTFunctionType(origInterfaceType,
+                              constant.getUncurryLevel(),
+                              constant);
   return ::getUncachedSILFunctionTypeForConstant(M, constant,
                                                  origLoweredInterfaceType);
 }
@@ -1685,8 +1686,13 @@
   // available. There's no great way to do this.
 
   // Protocol witnesses are called using the witness calling convention.
-  if (auto proto = dyn_cast<ProtocolDecl>(c.getDecl()->getDeclContext()))
+  if (auto proto = dyn_cast<ProtocolDecl>(c.getDecl()->getDeclContext())) {
+    // Use the regular method convention for foreign-to-native thunks.
+    if (c.isForeignToNativeThunk())
+      return SILFunctionTypeRepresentation::Method;
+    assert(!c.isNativeToForeignThunk() && "shouldn't be possible");
     return getProtocolWitnessRepresentation(proto);
+  }
 
   switch (c.kind) {
     case SILDeclRef::Kind::GlobalAccessor:
@@ -1729,7 +1735,8 @@
   // The lowered type is the formal type, but uncurried and with
   // parameters automatically turned into their bridged equivalents.
   auto loweredInterfaceType =
-    getLoweredASTFunctionType(formalInterfaceType, constant.uncurryLevel,
+    getLoweredASTFunctionType(formalInterfaceType,
+                              constant.getUncurryLevel(),
                               constant);
 
   // The SIL type encodes conventions according to the original type.
@@ -1778,14 +1785,15 @@
   return ty->getParameters().back();
 }
 
-bool TypeConverter::requiresNewVTableEntry(SILDeclRef method) {
-  auto found = RequiresVTableEntry.find(method);
-  if (found != RequiresVTableEntry.end())
-    return found->second;
-
-  auto result = requiresNewVTableEntryUncached(method);
-  RequiresVTableEntry.insert(std::make_pair(method, result));
-  return result;
+static bool requiresNewVTableEntry(SILDeclRef method) {
+  if (cast<AbstractFunctionDecl>(method.getDecl())->needsNewVTableEntry())
+    return true;
+  if (method.kind == SILDeclRef::Kind::Allocator) {
+    auto *ctor = cast<ConstructorDecl>(method.getDecl());
+    if (ctor->isRequired() && !ctor->getOverriddenDecl()->isRequired())
+      return true;
+  }
+  return false;
 }
 
 // This check duplicates TypeConverter::checkForABIDifferences(),
@@ -1795,128 +1803,8 @@
 // @guaranteed or whatever.
 static bool checkASTTypeForABIDifferences(CanType type1,
                                           CanType type2) {
-  // Unwrap optionals, but remember that we did.
-  bool type1WasOptional = false;
-  bool type2WasOptional = false;
-  if (auto object = type1.getAnyOptionalObjectType()) {
-    type1WasOptional = true;
-    type1 = object;
-  }
-  if (auto object = type2.getAnyOptionalObjectType()) {
-    type2WasOptional = true;
-    type2 = object;
-  }
-
-  // Forcing IUOs always requires a new vtable entry.
-  if (type1WasOptional && !type2WasOptional)
-    return true;
-
-  // Except for the above case, we should not be making a value less optional.
-
-  // If we're introducing a level of optionality, only certain types are
-  // ABI-compatible -- check below.
-  bool optionalityChange = (!type1WasOptional && type2WasOptional);
-
-  // If the types are identical and there was no optionality change,
-  // we're done.
-  if (type1 == type2 && !optionalityChange)
-    return false;
-
-  // Classes, class-constrained archetypes, and pure-ObjC existential types
-  // all have single retainable pointer representation; optionality change
-  // is allowed.
-  if ((type1->mayHaveSuperclass() ||
-       type1->isObjCExistentialType()) &&
-      (type2->mayHaveSuperclass() ||
-       type2->isObjCExistentialType()))
-    return false;
-
-  // Class metatypes are ABI-compatible even under optionality change.
-  if (auto metaTy1 = dyn_cast<MetatypeType>(type1)) {
-    if (auto metaTy2 = dyn_cast<MetatypeType>(type2)) {
-      if (metaTy1.getInstanceType().getClassOrBoundGenericClass() &&
-          metaTy2.getInstanceType().getClassOrBoundGenericClass())
-        return false;
-    }
-  }
-
-  if (!optionalityChange) {
-    // Function parameters are ABI compatible if their differences are
-    // trivial.
-    if (auto fnTy1 = dyn_cast<AnyFunctionType>(type1)) {
-      if (auto fnTy2 = dyn_cast<AnyFunctionType>(type2)) {
-        return (
-            checkASTTypeForABIDifferences(fnTy2.getInput(), fnTy1.getInput()) ||
-            checkASTTypeForABIDifferences(fnTy1.getResult(), fnTy2.getResult()));
-      }
-    }
-
-    // Tuple types are ABI-compatible if their elements are.
-    if (auto tuple1 = dyn_cast<TupleType>(type1)) {
-      if (auto tuple2 = dyn_cast<TupleType>(type2)) {
-        if (tuple1->getNumElements() != tuple2->getNumElements())
-          return true;
-
-        for (unsigned i = 0, e = tuple1->getNumElements(); i < e; i++) {
-          if (checkASTTypeForABIDifferences(tuple1.getElementType(i),
-                                            tuple2.getElementType(i)))
-            return true;
-        }
-
-        // Tuple lengths and elements match
-        return false;
-      }
-    }
-  }
-
-  // The types are different, or there was an optionality change resulting
-  // in a change in representation.
-  return true;
-}
-
-bool TypeConverter::requiresNewVTableEntryUncached(SILDeclRef derived) {
-  auto *decl = derived.getDecl();
-
-  // Final members are always be called directly.
-  // Dynamic methods are always accessed by objc_msgSend().
-  if (decl->isFinal() || decl->isDynamic())
-    return false;
-
-  // Special case -- materializeForSet on dynamic storage is not
-  // itself dynamic, but should be treated as such for the
-  // purpose of constructing the vtable.
-  if (auto *fd = dyn_cast<FuncDecl>(decl)) {
-    if (fd->getAccessorKind() == AccessorKind::IsMaterializeForSet &&
-        fd->getAccessorStorageDecl()->isDynamic())
-      return false;
-  }
-
-  // If the method overrides something, we only need a new entry if the
-  // override has a more general AST type. However an abstraction
-  // change is OK; we don't want to add a whole new vtable entry just
-  // because an @in parameter because @owned, or whatever.
-  if (auto base = derived.getNextOverriddenVTableEntry()) {
-    auto baseInfo = getConstantInfo(base);
-    auto derivedInfo = getConstantInfo(derived);
-
-    auto baseInterfaceTy = baseInfo.FormalInterfaceType;
-    auto derivedInterfaceTy = derivedInfo.FormalInterfaceType;
-
-    auto selfInterfaceTy = derivedInterfaceTy.getInput()->getRValueInstanceType();
-
-    auto overrideInterfaceTy =
-        selfInterfaceTy->adjustSuperclassMemberDeclType(
-            base.getDecl(), derived.getDecl(), baseInterfaceTy)
-      ->getCanonicalType();
-
-    if (checkASTTypeForABIDifferences(derivedInterfaceTy, overrideInterfaceTy))
-      return true;
-
-    return false;
-  }
-
-  // We need a new entry.
-  return true;
+  return !type1->matches(type2, TypeMatchFlags::AllowABICompatible,
+                         /*resolver*/nullptr);
 }
 
 SILDeclRef TypeConverter::getOverriddenVTableEntry(SILDeclRef method) {
@@ -2046,7 +1934,7 @@
   // Lower the formal AST type.
   auto overrideLoweredInterfaceTy = getLoweredASTFunctionType(
       cast<AnyFunctionType>(overrideInterfaceTy->getCanonicalType()),
-      derived.uncurryLevel, derived);
+      derived.getUncurryLevel(), derived);
 
   if (!checkASTTypeForABIDifferences(derivedInfo.LoweredInterfaceType,
                                      overrideLoweredInterfaceTy)) {
diff --git a/lib/SIL/SILInstruction.cpp b/lib/SIL/SILInstruction.cpp
index 2d68179..8b07449 100644
--- a/lib/SIL/SILInstruction.cpp
+++ b/lib/SIL/SILInstruction.cpp
@@ -152,11 +152,22 @@
 
   // If we have a function ref inst, we need to especially drop its function
   // argument so that it gets a proper ref decrement.
-  auto *FRI = dyn_cast<FunctionRefInst>(this);
-  if (!FRI || !FRI->getReferencedFunction())
+  if (auto *FRI = dyn_cast<FunctionRefInst>(this)) {
+    if (!FRI->getReferencedFunction())
+      return;
+    FRI->dropReferencedFunction();
     return;
+  }
 
-  FRI->dropReferencedFunction();
+  // If we have a KeyPathInst, drop its pattern reference so that we can
+  // decrement refcounts on referenced functions.
+  if (auto *KPI = dyn_cast<KeyPathInst>(this)) {
+    if (!KPI->hasPattern())
+      return;
+    
+    KPI->dropReferencedPattern();
+    return;
+  }
 }
 
 void SILInstruction::replaceAllUsesWithUndef() {
diff --git a/lib/SIL/SILInstructions.cpp b/lib/SIL/SILInstructions.cpp
index 7cb4a3f..4392bbc 100644
--- a/lib/SIL/SILInstructions.cpp
+++ b/lib/SIL/SILInstructions.cpp
@@ -407,16 +407,25 @@
 }
 
 ApplyInst *ApplyInst::create(SILDebugLocation Loc, SILValue Callee,
-                             SILType SubstCalleeTy, SILType Result,
-                             SubstitutionList Subs,
-                             ArrayRef<SILValue> Args, bool isNonThrowing,
+                             SubstitutionList Subs, ArrayRef<SILValue> Args,
+                             bool isNonThrowing,
+                             Optional<SILModuleConventions> ModuleConventions,
                              SILFunction &F,
                              SILOpenedArchetypesState &OpenedArchetypes) {
+  SILType SubstCalleeSILTy =
+      Callee->getType().substGenericArgs(F.getModule(), Subs);
+  auto SubstCalleeTy = SubstCalleeSILTy.getAs<SILFunctionType>();
+  SILFunctionConventions Conv(SubstCalleeTy,
+                              ModuleConventions.hasValue()
+                                  ? ModuleConventions.getValue()
+                                  : SILModuleConventions(F.getModule()));
+  SILType Result = Conv.getSILResultType();
+
   SmallVector<SILValue, 32> TypeDependentOperands;
   collectTypeDependentOperands(TypeDependentOperands, OpenedArchetypes, F,
-                               SubstCalleeTy.getSwiftRValueType(), Subs);
+                               SubstCalleeSILTy.getSwiftRValueType(), Subs);
   void *Buffer = allocate(F, Subs, TypeDependentOperands, Args);
-  return ::new(Buffer) ApplyInst(Loc, Callee, SubstCalleeTy,
+  return ::new(Buffer) ApplyInst(Loc, Callee, SubstCalleeSILTy,
                                  Result, Subs, Args,
                                  TypeDependentOperands, isNonThrowing);
 }
@@ -447,10 +456,14 @@
 
 PartialApplyInst *
 PartialApplyInst::create(SILDebugLocation Loc, SILValue Callee,
-                         SILType SubstCalleeTy, SubstitutionList Subs,
-                         ArrayRef<SILValue> Args, SILType ClosureType,
-                         SILFunction &F,
+                         ArrayRef<SILValue> Args, SubstitutionList Subs,
+                         ParameterConvention CalleeConvention, SILFunction &F,
                          SILOpenedArchetypesState &OpenedArchetypes) {
+  SILType SubstCalleeTy =
+      Callee->getType().substGenericArgs(F.getModule(), Subs);
+  SILType ClosureType = SILBuilder::getPartialApplyResultType(
+      SubstCalleeTy, Args.size(), F.getModule(), {}, CalleeConvention);
+
   SmallVector<SILValue, 32> TypeDependentOperands;
   collectTypeDependentOperands(TypeDependentOperands, OpenedArchetypes, F,
                                SubstCalleeTy.getSwiftRValueType(), Subs);
@@ -473,14 +486,15 @@
     : ApplyInstBase(ValueKind::TryApplyInst, Loc, callee, substCalleeTy, subs,
                     args, TypeDependentOperands, normalBB, errorBB) {}
 
-
 TryApplyInst *TryApplyInst::create(SILDebugLocation Loc, SILValue callee,
-                                   SILType substCalleeTy,
                                    SubstitutionList subs,
                                    ArrayRef<SILValue> args,
                                    SILBasicBlock *normalBB,
                                    SILBasicBlock *errorBB, SILFunction &F,
-                                SILOpenedArchetypesState &OpenedArchetypes) {
+                                   SILOpenedArchetypesState &OpenedArchetypes) {
+  SILType substCalleeTy =
+      callee->getType().substGenericArgs(F.getModule(), subs);
+
   SmallVector<SILValue, 32> TypeDependentOperands;
   collectTypeDependentOperands(TypeDependentOperands, OpenedArchetypes, F,
                                substCalleeTy.getSwiftRValueType(), subs);
@@ -1978,6 +1992,40 @@
   }
 }
 
+static void
+forEachRefcountableReference(const KeyPathPatternComponent &component,
+                         llvm::function_ref<void (SILFunction*)> forFunction) {
+  switch (component.getKind()) {
+  case KeyPathPatternComponent::Kind::StoredProperty:
+    return;
+  case KeyPathPatternComponent::Kind::SettableProperty:
+    forFunction(component.getComputedPropertySetter());
+    LLVM_FALLTHROUGH;
+  case KeyPathPatternComponent::Kind::GettableProperty:
+    forFunction(component.getComputedPropertyGetter());
+    
+    switch (component.getComputedPropertyId().getKind()) {
+    case KeyPathPatternComponent::ComputedPropertyId::DeclRef:
+      // Mark the vtable entry as used somehow?
+      return;
+    case KeyPathPatternComponent::ComputedPropertyId::Function:
+      forFunction(component.getComputedPropertyId().getFunction());
+      return;
+    case KeyPathPatternComponent::ComputedPropertyId::Property:
+      return;
+    }
+  }
+}
+
+void KeyPathPatternComponent::incrementRefCounts() const {
+  forEachRefcountableReference(*this,
+    [&](SILFunction *f) { f->incrementRefCount(); });
+}
+void KeyPathPatternComponent::decrementRefCounts() const {
+  forEachRefcountableReference(*this,
+                               [&](SILFunction *f) { f->decrementRefCount(); });
+}
+
 KeyPathPattern *
 KeyPathPattern::get(SILModule &M, CanGenericSignature signature,
                     CanType rootType, CanType valueType,
@@ -2072,7 +2120,7 @@
         auto declRef = id.getDeclRef();
         ID.AddPointer(declRef.loc.getOpaqueValue());
         ID.AddInteger((unsigned)declRef.kind);
-        ID.AddInteger(declRef.uncurryLevel);
+        ID.AddInteger(declRef.isCurried);
         ID.AddBoolean(declRef.Expansion);
         ID.AddBoolean(declRef.isCurried);
         ID.AddBoolean(declRef.isForeign);
@@ -2116,6 +2164,11 @@
 {
   auto *subsBuf = getTrailingObjects<Substitution>();
   std::uninitialized_copy(Subs.begin(), Subs.end(), subsBuf);
+  
+  // Increment the use of any functions referenced from the keypath pattern.
+  for (auto component : Pattern->getComponents()) {
+    component.incrementRefCounts();
+  }
 }
 
 MutableArrayRef<Substitution>
@@ -2130,9 +2183,24 @@
 }
 
 KeyPathInst::~KeyPathInst() {
+  if (!Pattern)
+    return;
+
+  // Decrement the use of any functions referenced from the keypath pattern.
+  for (auto component : Pattern->getComponents()) {
+    component.decrementRefCounts();
+  }
   // TODO: destroy operands
 }
 
 KeyPathPattern *KeyPathInst::getPattern() const {
+  assert(Pattern && "pattern was reset!");
   return Pattern;
 }
+
+void KeyPathInst::dropReferencedPattern() {
+  for (auto component : Pattern->getComponents()) {
+    component.decrementRefCounts();
+  }
+  Pattern = nullptr;
+}
diff --git a/lib/SIL/SILPrinter.cpp b/lib/SIL/SILPrinter.cpp
index 07419b7..5190b8e 100644
--- a/lib/SIL/SILPrinter.cpp
+++ b/lib/SIL/SILPrinter.cpp
@@ -330,6 +330,8 @@
     OS << "!propertyinit";
     break;
   }
+
+  auto uncurryLevel = getUncurryLevel();
   if (uncurryLevel != 0)
     OS << (isDot ? '.' : '!')  << uncurryLevel;
 
diff --git a/lib/SIL/SILType.cpp b/lib/SIL/SILType.cpp
index 88b378a..4c391fe 100644
--- a/lib/SIL/SILType.cpp
+++ b/lib/SIL/SILType.cpp
@@ -159,7 +159,7 @@
     return true;
   }
   // Otherwise, flatten one level of tuple elements on each side.
-  CanTupleType toTupleTy = dyn_cast<TupleType>(toType.getSwiftRValueType());
+  auto toTupleTy = dyn_cast<TupleType>(toType.getSwiftRValueType());
   if (!toTupleTy)
     return false;
 
diff --git a/lib/SIL/SILVerifier.cpp b/lib/SIL/SILVerifier.cpp
index 313aefb..7ca03f8 100644
--- a/lib/SIL/SILVerifier.cpp
+++ b/lib/SIL/SILVerifier.cpp
@@ -751,15 +751,15 @@
     SILBasicBlock *SBB = AI->getParent();
     bool Allocated = true;
     for (auto Inst = AI->getIterator(), E = SBB->end(); Inst != E; ++Inst) {
-      if (LoadInst *LI = dyn_cast<LoadInst>(Inst))
+      if (auto *LI = dyn_cast<LoadInst>(Inst))
         if (LI->getOperand() == AI)
           require(Allocated, "AllocStack used by Load outside its lifetime");
 
-      if (StoreInst *SI = dyn_cast<StoreInst>(Inst))
+      if (auto *SI = dyn_cast<StoreInst>(Inst))
         if (SI->getDest() == AI)
           require(Allocated, "AllocStack used by Store outside its lifetime");
 
-      if (DeallocStackInst *DSI = dyn_cast<DeallocStackInst>(Inst))
+      if (auto *DSI = dyn_cast<DeallocStackInst>(Inst))
         if (DSI->getOperand() == AI)
           Allocated = false;
     }
@@ -833,7 +833,7 @@
         if (!A)
           return;
         require(isArchetypeValidInFunction(A, &F),
-                "Replacment type of a substitution contains an ArchetypeType "
+                "Replacement type of a substitution contains an ArchetypeType "
                 "that does not exist in the Caller's generic param list.");
       });
     }
@@ -1681,8 +1681,10 @@
               "member variables of struct");
 
       SILType loweredType = structTy.getFieldType(field, F.getModule());
-      require((*opi)->getType() == loweredType,
-              "struct operand type does not match field type");
+      if (SI->getModule().getStage() != SILStage::Lowered) {
+        require((*opi)->getType() == loweredType,
+                "struct operand type does not match field type");
+      }
       ++opi;
     }
   }
@@ -1781,10 +1783,12 @@
     require(TI->getElements().size() == ResTy->getNumElements(),
             "Tuple field count mismatch!");
 
-    for (size_t i = 0, size = TI->getElements().size(); i < size; ++i) {
-      require(TI->getElement(i)->getType().getSwiftRValueType()
-              == ResTy.getElementType(i),
-              "Tuple element arguments do not match tuple type!");
+    if (TI->getModule().getStage() != SILStage::Lowered) {
+      for (size_t i = 0, size = TI->getElements().size(); i < size; ++i) {
+        require(TI->getElement(i)->getType().getSwiftRValueType() ==
+                    ResTy.getElementType(i),
+                "Tuple element arguments do not match tuple type!");
+      }
     }
   }
 
@@ -2009,9 +2013,11 @@
 
     require(EI->getFieldNo() < operandTy->getNumElements(),
             "invalid field index for tuple_extract instruction");
-    require(EI->getType().getSwiftRValueType()
-            == operandTy.getElementType(EI->getFieldNo()),
-            "type of tuple_extract does not match type of element");
+    if (EI->getModule().getStage() != SILStage::Lowered) {
+      require(EI->getType().getSwiftRValueType() ==
+                  operandTy.getElementType(EI->getFieldNo()),
+              "type of tuple_extract does not match type of element");
+    }
   }
 
   void checkStructExtractInst(StructExtractInst *EI) {
@@ -2030,10 +2036,12 @@
     require(EI->getField()->getDeclContext() == sd,
             "struct_extract field is not a member of the struct");
 
-    SILType loweredFieldTy = operandTy.getFieldType(EI->getField(),
-                                                    F.getModule());
-    require(loweredFieldTy == EI->getType(),
-            "result of struct_extract does not match type of field");
+    if (EI->getModule().getStage() != SILStage::Lowered) {
+      SILType loweredFieldTy =
+          operandTy.getFieldType(EI->getField(), F.getModule());
+      require(loweredFieldTy == EI->getType(),
+              "result of struct_extract does not match type of field");
+    }
   }
 
   void checkTupleElementAddrInst(TupleElementAddrInst *EI) {
@@ -2048,9 +2056,11 @@
     ArrayRef<TupleTypeElt> fields = operandTy.castTo<TupleType>()->getElements();
     require(EI->getFieldNo() < fields.size(),
             "invalid field index for element_addr instruction");
-    require(EI->getType().getSwiftRValueType()
-              == CanType(fields[EI->getFieldNo()].getType()),
-            "type of tuple_element_addr does not match type of element");
+    if (EI->getModule().getStage() != SILStage::Lowered) {
+      require(EI->getType().getSwiftRValueType() ==
+                  CanType(fields[EI->getFieldNo()].getType()),
+              "type of tuple_element_addr does not match type of element");
+    }
   }
 
   void checkStructElementAddrInst(StructElementAddrInst *EI) {
@@ -2069,10 +2079,12 @@
     require(EI->getField()->getDeclContext() == sd,
             "struct_element_addr field is not a member of the struct");
 
-    SILType loweredFieldTy = operandTy.getFieldType(EI->getField(),
-                                                    F.getModule());
-    require(loweredFieldTy == EI->getType(),
-            "result of struct_element_addr does not match type of field");
+    if (EI->getModule().getStage() != SILStage::Lowered) {
+      SILType loweredFieldTy =
+          operandTy.getFieldType(EI->getField(), F.getModule());
+      require(loweredFieldTy == EI->getType(),
+              "result of struct_element_addr does not match type of field");
+    }
   }
 
   void checkRefElementAddrInst(RefElementAddrInst *EI) {
@@ -2090,10 +2102,12 @@
     require(EI->getField()->getDeclContext() == cd,
             "ref_element_addr field must be a member of the class");
 
-    SILType loweredFieldTy = operandTy.getFieldType(EI->getField(),
-                                                    F.getModule());
-    require(loweredFieldTy == EI->getType(),
-            "result of ref_element_addr does not match type of field");
+    if (EI->getModule().getStage() != SILStage::Lowered) {
+      SILType loweredFieldTy =
+          operandTy.getFieldType(EI->getField(), F.getModule());
+      require(loweredFieldTy == EI->getType(),
+              "result of ref_element_addr does not match type of field");
+    }
     EI->getFieldNo();  // Make sure we can access the field without crashing.
   }
 
diff --git a/lib/SIL/TypeLowering.cpp b/lib/SIL/TypeLowering.cpp
index 39c9347..984d38a 100644
--- a/lib/SIL/TypeLowering.cpp
+++ b/lib/SIL/TypeLowering.cpp
@@ -88,7 +88,7 @@
 
 CaptureKind TypeConverter::getDeclCaptureKind(CapturedValue capture) {
   auto decl = capture.getDecl();
-  if (VarDecl *var = dyn_cast<VarDecl>(decl)) {
+  if (auto *var = dyn_cast<VarDecl>(decl)) {
     switch (var->getStorageKind()) {
     case VarDecl::StoredWithTrivialAccessors:
       llvm_unreachable("stored local variable with trivial accessors?");
@@ -1876,42 +1876,19 @@
   auto innerExtInfo = AnyFunctionType::ExtInfo(FunctionType::Representation::Thin,
                                                funcType->throws());
 
-  // If we don't have any local captures (including function captures),
-  // there's no context to apply.
-  if (!hasLoweredLocalCaptures(theClosure)) {
-    if (!genericSig)
-      return CanFunctionType::get(funcType.getInput(),
-                                  funcType.getResult(),
-                                  innerExtInfo);
+  if (!genericSig)
+    return CanFunctionType::get(funcType.getInput(),
+                                funcType.getResult(),
+                                innerExtInfo);
     
-    return CanGenericFunctionType::get(genericSig,
-                                       funcType.getInput(),
-                                       funcType.getResult(),
-                                       innerExtInfo);
-  }
-
-  // Strip the generic signature off the inner type; we will add it to the
-  // outer type with captures.
-  funcType = CanFunctionType::get(funcType.getInput(),
-                                  funcType.getResult(),
-                                  innerExtInfo);
-
-  // Add an extra empty tuple level to represent the captures. We'll append the
-  // lowered capture types here.
-  auto extInfo = AnyFunctionType::ExtInfo(FunctionType::Representation::Thin,
-                                          /*throws*/ false);
-
-  if (genericSig) {
-    return CanGenericFunctionType::get(genericSig,
-                                       Context.TheEmptyTupleType, funcType,
-                                       extInfo);
-  }
-  
-  return CanFunctionType::get(Context.TheEmptyTupleType, funcType, extInfo);
+  return CanGenericFunctionType::get(genericSig,
+                                     funcType.getInput(),
+                                     funcType.getResult(),
+                                     innerExtInfo);
 }
 
 CanAnyFunctionType TypeConverter::makeConstantInterfaceType(SILDeclRef c) {
-  ValueDecl *vd = c.loc.dyn_cast<ValueDecl *>();
+  auto *vd = c.loc.dyn_cast<ValueDecl *>();
 
   switch (c.kind) {
   case SILDeclRef::Kind::Func: {
@@ -1988,7 +1965,7 @@
 /// Get the generic environment for an entity.
 GenericEnvironment *
 TypeConverter::getConstantGenericEnvironment(SILDeclRef c) {
-  ValueDecl *vd = c.loc.dyn_cast<ValueDecl *>();
+  auto *vd = c.loc.dyn_cast<ValueDecl *>();
   
   /// Get the function generic params, including outer params.
   switch (c.kind) {
@@ -2109,16 +2086,8 @@
 
 ProtocolDispatchStrategy
 TypeConverter::getProtocolDispatchStrategy(ProtocolDecl *P) {
-  // AnyObject has no requirements (other than the object being a class), so
-  // needs no method dispatch.
-  if (auto known = P->getKnownProtocolKind()) {
-    if (*known == KnownProtocolKind::AnyObject)
-      return ProtocolDispatchStrategy::Empty;
-  }
-  
-  // Otherwise, ObjC protocols use ObjC method dispatch, and Swift protocols
+  // ObjC protocols use ObjC method dispatch, and Swift protocols
   // use witness tables.
-  
   if (P->isObjC())
     return ProtocolDispatchStrategy::ObjC;
   
diff --git a/lib/SILGen/LValue.h b/lib/SILGen/LValue.h
index e3cf59b..9e705cd 100644
--- a/lib/SILGen/LValue.h
+++ b/lib/SILGen/LValue.h
@@ -506,6 +506,7 @@
 
   void finishImpl(SILGenFunction &SGF) override {
     performWriteback(SGF, /*isFinal*/ true);
+    component.reset();
   }
 };
 
diff --git a/lib/SILGen/RValue.cpp b/lib/SILGen/RValue.cpp
index 9b861f1..e8f7d2f 100644
--- a/lib/SILGen/RValue.cpp
+++ b/lib/SILGen/RValue.cpp
@@ -29,7 +29,7 @@
 
 
 static unsigned getTupleSize(CanType t) {
-  if (TupleType *tt = dyn_cast<TupleType>(t))
+  if (auto tt = dyn_cast<TupleType>(t))
     return tt->getNumElements();
   return 1;
 }
diff --git a/lib/SILGen/SILGen.cpp b/lib/SILGen/SILGen.cpp
index 5746f44..66db8bd 100644
--- a/lib/SILGen/SILGen.cpp
+++ b/lib/SILGen/SILGen.cpp
@@ -812,7 +812,7 @@
 
 bool SILGenModule::hasNonTrivialIVars(ClassDecl *cd) {
   for (Decl *member : cd->getMembers()) {
-    VarDecl *vd = dyn_cast<VarDecl>(member);
+    auto *vd = dyn_cast<VarDecl>(member);
     if (!vd || !vd->hasStorage()) continue;
 
     const TypeLowering &ti = Types.getTypeLowering(vd->getType());
@@ -852,10 +852,8 @@
 
   // Emit the ivar initializer, if needed.
   if (requiresIVarInitialization(*this, cd)) {
-    SILDeclRef ivarInitializer(cd, SILDeclRef::Kind::IVarInitializer,
-                               SILDeclRef::ConstructAtBestResilienceExpansion,
-                               SILDeclRef::ConstructAtNaturalUncurryLevel,
-                               /*isForeign=*/true);
+    auto ivarInitializer = SILDeclRef(cd, SILDeclRef::Kind::IVarInitializer)
+      .asForeign();
     SILFunction *f = getFunction(ivarInitializer, ForDefinition);
     preEmitFunction(ivarInitializer, dd, f, dd);
     PrettyStackTraceSILFunction X("silgen emitDestructor ivar initializer", f);
@@ -865,10 +863,8 @@
 
   // Emit the ivar destroyer, if needed.
   if (hasNonTrivialIVars(cd)) {
-    SILDeclRef ivarDestroyer(cd, SILDeclRef::Kind::IVarDestroyer,
-                             SILDeclRef::ConstructAtBestResilienceExpansion,
-                             SILDeclRef::ConstructAtNaturalUncurryLevel,
-                             /*isForeign=*/true);
+    auto ivarDestroyer = SILDeclRef(cd, SILDeclRef::Kind::IVarDestroyer)
+      .asForeign();
     SILFunction *f = getFunction(ivarDestroyer, ForDefinition);
     preEmitFunction(ivarDestroyer, dd, f, dd);
     PrettyStackTraceSILFunction X("silgen emitDestructor ivar destroyer", f);
@@ -882,10 +878,7 @@
   
   // Emit the ivar destroyer, if needed.
   if (requiresIVarDestroyer(cd)) {
-    SILDeclRef ivarDestroyer(cd, SILDeclRef::Kind::IVarDestroyer,
-                             SILDeclRef::ConstructAtBestResilienceExpansion,
-                             SILDeclRef::ConstructAtNaturalUncurryLevel,
-                             /*isForeign=*/false);
+    SILDeclRef ivarDestroyer(cd, SILDeclRef::Kind::IVarDestroyer);
     SILFunction *f = getFunction(ivarDestroyer, ForDefinition);
     preEmitFunction(ivarDestroyer, dd, f, dd);
     PrettyStackTraceSILFunction X("silgen emitDestructor ivar destroyer", f);
@@ -1018,10 +1011,7 @@
 }
 
 void SILGenModule::emitObjCMethodThunk(FuncDecl *method) {
-  SILDeclRef thunk(method,
-                   SILDeclRef::ConstructAtBestResilienceExpansion,
-                   SILDeclRef::ConstructAtNaturalUncurryLevel,
-                   /*isObjC*/ true);
+  auto thunk = SILDeclRef(method).asForeign();
 
   // Don't emit the thunk if it already exists.
   if (hasFunction(thunk))
@@ -1043,10 +1033,8 @@
   if (!prop->getGetter() || !requiresObjCMethodEntryPoint(prop->getGetter()))
     return;
 
-  SILDeclRef getter(prop->getGetter(), SILDeclRef::Kind::Func,
-                    SILDeclRef::ConstructAtBestResilienceExpansion,
-                    SILDeclRef::ConstructAtNaturalUncurryLevel,
-                    /*isObjC*/ true);
+  auto getter = SILDeclRef(prop->getGetter(), SILDeclRef::Kind::Func)
+    .asForeign();
 
   // Don't emit the thunks if they already exist.
   if (hasFunction(getter))
@@ -1070,10 +1058,8 @@
     return;
 
   // FIXME: Add proper location.
-  SILDeclRef setter(prop->getSetter(), SILDeclRef::Kind::Func,
-                    SILDeclRef::ConstructAtBestResilienceExpansion,
-                    SILDeclRef::ConstructAtNaturalUncurryLevel,
-                    /*isObjC*/ true);
+  auto setter = SILDeclRef(prop->getSetter(), SILDeclRef::Kind::Func)
+    .asForeign();
 
   SILFunction *f = getFunction(setter, ForDefinition);
   preEmitFunction(setter, prop, f, ThunkBodyLoc);
@@ -1085,11 +1071,8 @@
 }
 
 void SILGenModule::emitObjCConstructorThunk(ConstructorDecl *constructor) {
-  SILDeclRef thunk(constructor,
-                   SILDeclRef::Kind::Initializer,
-                   SILDeclRef::ConstructAtBestResilienceExpansion,
-                   SILDeclRef::ConstructAtNaturalUncurryLevel,
-                   /*isObjC*/ true);
+  auto thunk = SILDeclRef(constructor, SILDeclRef::Kind::Initializer)
+    .asForeign();
 
   // Don't emit the thunk if it already exists.
   if (hasFunction(thunk))
@@ -1107,11 +1090,8 @@
 }
 
 void SILGenModule::emitObjCDestructorThunk(DestructorDecl *destructor) {
-  SILDeclRef thunk(destructor,
-                   SILDeclRef::Kind::Deallocator,
-                   SILDeclRef::ConstructAtBestResilienceExpansion,
-                   SILDeclRef::ConstructAtNaturalUncurryLevel,
-                   /*isObjC*/ true);
+  auto thunk = SILDeclRef(destructor, SILDeclRef::Kind::Deallocator)
+    .asForeign();
 
   // Don't emit the thunk if it already exists.
   if (hasFunction(thunk))
@@ -1171,10 +1151,10 @@
  
   for (auto &ESD : td->getBody()->getElements()) {
     if (!TopLevelSGF->B.hasValidInsertionPoint()) {
-      if (Stmt *S = ESD.dyn_cast<Stmt*>()) {
+      if (auto *S = ESD.dyn_cast<Stmt*>()) {
         if (S->isImplicit())
           continue;
-      } else if (Expr *E = ESD.dyn_cast<Expr*>()) {
+      } else if (auto *E = ESD.dyn_cast<Expr*>()) {
         if (E->isImplicit())
           continue;
       }
@@ -1184,9 +1164,9 @@
       return;
     }
 
-    if (Stmt *S = ESD.dyn_cast<Stmt*>()) {
+    if (auto *S = ESD.dyn_cast<Stmt*>()) {
       TopLevelSGF->emitStmt(S);
-    } else if (Expr *E = ESD.dyn_cast<Expr*>()) {
+    } else if (auto *E = ESD.dyn_cast<Expr*>()) {
       TopLevelSGF->emitIgnoredExpr(E);
     } else {
       TopLevelSGF->visit(ESD.get<Decl*>());
diff --git a/lib/SILGen/SILGen.h b/lib/SILGen/SILGen.h
index eaf6b3b..3dab57f 100644
--- a/lib/SILGen/SILGen.h
+++ b/lib/SILGen/SILGen.h
@@ -224,6 +224,7 @@
   void visitConstructorDecl(ConstructorDecl *d) {}
   void visitDestructorDecl(DestructorDecl *d) {}
   void visitModuleDecl(ModuleDecl *d) { }
+  void visitMissingMemberDecl(MissingMemberDecl *d) {}
 
   void visitFuncDecl(FuncDecl *fd);
   void visitPatternBindingDecl(PatternBindingDecl *vd);
@@ -273,9 +274,7 @@
                                 ArrayRef<ParameterList*> paramLists);
 
   /// Emits the curry thunk between two uncurry levels of a function.
-  void emitCurryThunk(ValueDecl *fd,
-                      SILDeclRef entryPoint,
-                      SILDeclRef nextEntryPoint);
+  void emitCurryThunk(SILDeclRef thunk);
   
   /// Emits a thunk from a foreign function to the native Swift convention.
   void emitForeignToNativeThunk(SILDeclRef thunk);
diff --git a/lib/SILGen/SILGenApply.cpp b/lib/SILGen/SILGenApply.cpp
index e912532..27c6103 100644
--- a/lib/SILGen/SILGenApply.cpp
+++ b/lib/SILGen/SILGenApply.cpp
@@ -185,10 +185,8 @@
   Callee(const Callee &) = delete;
   Callee &operator=(const Callee &) = delete;
 private:
-  union {
-    ManagedValue IndirectValue;
-    SILDeclRef Constant;
-  };
+  ManagedValue IndirectValue;
+  SILDeclRef Constant;
   SILValue SelfValue;
   CanAnyFunctionType OrigFormalInterfaceType;
   CanFunctionType SubstFormalInterfaceType;
@@ -354,7 +352,7 @@
     case Kind::SuperMethod:
     case Kind::WitnessMethod:
     case Kind::DynamicMethod:
-      return Constant.uncurryLevel;
+      return Constant.getUncurryLevel();
     }
 
     llvm_unreachable("Unhandled Kind in switch.");
@@ -372,18 +370,27 @@
     ApplyOptions options = ApplyOptions::None;
     Optional<SILDeclRef> constant = None;
 
+    if (!Constant) {
+      assert(level == 0 && "can't curry indirect function");
+    } else {
+      unsigned uncurryLevel = Constant.getUncurryLevel();
+      assert(level <= uncurryLevel
+             && "uncurrying past natural uncurry level of standalone function");
+      if (level < uncurryLevel) {
+        assert(level == 0);
+        constant = Constant.asCurried();
+      } else {
+        constant = Constant;
+      }
+    }
+
     switch (kind) {
     case Kind::IndirectValue:
-      assert(level == 0 && "can't curry indirect function");
       mv = IndirectValue;
       assert(Substitutions.empty());
       break;
 
     case Kind::StandaloneFunction: {
-      assert(level <= Constant.uncurryLevel
-             && "uncurrying past natural uncurry level of standalone function");
-      constant = Constant.atUncurryLevel(level);
-
       // If we're currying a direct reference to a class-dispatched method,
       // make sure we emit the right set of thunks.
       if (constant->isCurried && Constant.hasDecl())
@@ -397,9 +404,6 @@
       break;
     }
     case Kind::EnumElement: {
-      assert(level <= Constant.uncurryLevel
-             && "uncurrying past natural uncurry level of enum constructor");
-      constant = Constant.atUncurryLevel(level);
       auto constantInfo = SGF.getConstantInfo(*constant);
 
       // We should not end up here if the enum constructor call is fully
@@ -411,13 +415,10 @@
       break;
     }
     case Kind::ClassMethod: {
-      assert(level <= Constant.uncurryLevel
-             && "uncurrying past natural uncurry level of method");
-      constant = Constant.atUncurryLevel(level);
       auto constantInfo = SGF.getConstantInfo(*constant);
 
       // If the call is curried, emit a direct call to the curry thunk.
-      if (level < Constant.uncurryLevel) {
+      if (constant->isCurried) {
         SILValue ref = SGF.emitGlobalFunctionRef(Loc, *constant, constantInfo);
         mv = ManagedValue::forUnmanaged(ref);
         break;
@@ -434,12 +435,7 @@
       break;
     }
     case Kind::SuperMethod: {
-      assert(level <= Constant.uncurryLevel
-             && "uncurrying past natural uncurry level of method");
-      assert(level == getNaturalUncurryLevel() &&
-             "Currying the self parameter of super method calls should've been emitted");
-
-      constant = Constant.atUncurryLevel(level);
+      assert(!constant->isCurried);
 
       auto base = SGF.SGM.Types.getOverriddenVTableEntry(*constant);
       auto constantInfo = SGF.SGM.Types.getConstantOverrideInfo(*constant, base);
@@ -453,13 +449,10 @@
       break;
     }
     case Kind::WitnessMethod: {
-      assert(level <= Constant.uncurryLevel
-             && "uncurrying past natural uncurry level of method");
-      constant = Constant.atUncurryLevel(level);
       auto constantInfo = SGF.getConstantInfo(*constant);
 
       // If the call is curried, emit a direct call to the curry thunk.
-      if (level < Constant.uncurryLevel) {
+      if (constant->isCurried) {
         SILValue ref = SGF.emitGlobalFunctionRef(Loc, *constant, constantInfo);
         mv = ManagedValue::forUnmanaged(ref);
         break;
@@ -480,12 +473,8 @@
       break;
     }
     case Kind::DynamicMethod: {
-      assert(level >= 1
-             && "currying 'self' of dynamic method dispatch not yet supported");
-      assert(level <= Constant.uncurryLevel
-             && "uncurrying past natural uncurry level of method");
+      assert(!constant->isCurried);
 
-      constant = Constant.atUncurryLevel(level);
       // Lower the substituted type from the AST, which should have any generic
       // parameters in the original signature erased to their upper bounds.
       auto substFormalType = getSubstFormalType();
@@ -986,10 +975,8 @@
 
         setSelfParam(ArgumentSource(thisCallSite->getArg(), std::move(self)),
                      thisCallSite);
-        SILDeclRef constant(afd, kind.getValue(),
-                            SILDeclRef::ConstructAtBestResilienceExpansion,
-                            SILDeclRef::ConstructAtNaturalUncurryLevel,
-                            requiresForeignEntryPoint(afd));
+        auto constant = SILDeclRef(afd, kind.getValue())
+          .asForeign(requiresForeignEntryPoint(afd));
 
         auto subs = e->getDeclRef().getSubstitutions();
         setCallee(Callee::forClassMethod(SGF, selfValue, constant, subs, e));
@@ -1004,11 +991,9 @@
       return;
     }
 
-    SILDeclRef constant(e->getDecl(),
-                        SILDeclRef::ConstructAtBestResilienceExpansion,
-                        SILDeclRef::ConstructAtNaturalUncurryLevel,
-                        !isConstructorWithGeneratedAllocatorThunk(e->getDecl())
-                          && requiresForeignEntryPoint(e->getDecl()));
+    auto constant = SILDeclRef(e->getDecl())
+      .asForeign(!isConstructorWithGeneratedAllocatorThunk(e->getDecl())
+                 && requiresForeignEntryPoint(e->getDecl()));
 
     auto afd = dyn_cast<AbstractFunctionDecl>(e->getDecl());
 
@@ -1109,10 +1094,8 @@
     SubstitutionList substitutions;
     SILDeclRef constant;
     if (auto *ctorRef = dyn_cast<OtherConstructorDeclRefExpr>(fn)) {
-      constant = SILDeclRef(ctorRef->getDecl(), SILDeclRef::Kind::Initializer,
-                         SILDeclRef::ConstructAtBestResilienceExpansion,
-                         SILDeclRef::ConstructAtNaturalUncurryLevel,
-                         requiresForeignEntryPoint(ctorRef->getDecl()));
+      constant = SILDeclRef(ctorRef->getDecl(), SILDeclRef::Kind::Initializer)
+        .asForeign(requiresForeignEntryPoint(ctorRef->getDecl()));
 
       if (ctorRef->getDeclRef().isSpecialized())
         substitutions = ctorRef->getDeclRef().getSubstitutions();
@@ -1139,10 +1122,8 @@
       }
     } else if (auto *declRef = dyn_cast<DeclRefExpr>(fn)) {
       assert(isa<FuncDecl>(declRef->getDecl()) && "non-function super call?!");
-      constant = SILDeclRef(declRef->getDecl(),
-                         SILDeclRef::ConstructAtBestResilienceExpansion,
-                         SILDeclRef::ConstructAtNaturalUncurryLevel,
-                         requiresForeignEntryPoint(declRef->getDecl()));
+      constant = SILDeclRef(declRef->getDecl())
+        .asForeign(requiresForeignEntryPoint(declRef->getDecl()));
 
       if (declRef->getDeclRef().isSpecialized())
         substitutions = declRef->getDeclRef().getSubstitutions();
@@ -1321,10 +1302,8 @@
       auto constant = SILDeclRef(ctorRef->getDecl(),
                              useAllocatingCtor
                                ? SILDeclRef::Kind::Allocator
-                               : SILDeclRef::Kind::Initializer,
-                             SILDeclRef::ConstructAtBestResilienceExpansion,
-                             SILDeclRef::ConstructAtNaturalUncurryLevel,
-                             requiresForeignEntryPoint(ctorRef->getDecl()));
+                                 : SILDeclRef::Kind::Initializer)
+        .asForeign(requiresForeignEntryPoint(ctorRef->getDecl()));
       setCallee(Callee::forArchetype(SGF, SILValue(),
                                      self.getType().getSwiftRValueType(),
                                      constant, subs,
@@ -1338,10 +1317,8 @@
                   SILDeclRef(ctorRef->getDecl(),
                              useAllocatingCtor
                                ? SILDeclRef::Kind::Allocator
-                               : SILDeclRef::Kind::Initializer,
-                             SILDeclRef::ConstructAtBestResilienceExpansion,
-                             SILDeclRef::ConstructAtNaturalUncurryLevel,
-                             requiresForeignEntryPoint(ctorRef->getDecl())),
+                             : SILDeclRef::Kind::Initializer)
+                    .asForeign(requiresForeignEntryPoint(ctorRef->getDecl())),
                   subs,
                   fn));
     } else {
@@ -1352,10 +1329,8 @@
           SILDeclRef(ctorRef->getDecl(),
                      useAllocatingCtor
                        ? SILDeclRef::Kind::Allocator
-                       : SILDeclRef::Kind::Initializer,
-                     SILDeclRef::ConstructAtBestResilienceExpansion,
-                     SILDeclRef::ConstructAtNaturalUncurryLevel,
-                     requiresForeignEntryPoint(ctorRef->getDecl())),
+                     : SILDeclRef::Kind::Initializer)
+            .asForeign(requiresForeignEntryPoint(ctorRef->getDecl())),
           subs,
           fn));
     }
@@ -1445,9 +1420,7 @@
 
       // Determine the type of the method we referenced, by replacing the
       // class type of the 'Self' parameter with Builtin.UnknownObject.
-      SILDeclRef member(fd, SILDeclRef::ConstructAtBestResilienceExpansion,
-                        SILDeclRef::ConstructAtNaturalUncurryLevel,
-                        /*isObjC=*/true);
+      auto member = SILDeclRef(fd).asForeign();
 
       auto substFormalType = dynamicMemberRef->getType()
           ->getAnyOptionalObjectType();
@@ -3227,21 +3200,9 @@
           emittedArg = ManagedValue(opened, emittedArg.getCleanup());
         }
         
-        // Erase to AnyObject.
-        auto conformance = SGF.SGM.SwiftModule->lookupConformance(
-          emittedArgTy,
-          SGF.getASTContext().getProtocol(KnownProtocolKind::AnyObject),
-          nullptr);
-        assert(conformance &&
-               "no AnyObject conformance for class?!");
-        
-        ArrayRef<ProtocolConformanceRef> conformances(*conformance);
-        auto ctxConformances = SGF.getASTContext().AllocateCopy(conformances);
-        
         auto erased = SGF.B.createInitExistentialRef(loc,
                          SILType::getPrimitiveObjectType(getAnyObjectType()),
-                         emittedArgTy, emittedArg.getValue(),
-                         ctxConformances);
+                         emittedArgTy, emittedArg.getValue(), {});
         emittedArg = ManagedValue(erased, emittedArg.getCleanup());
       }
       
@@ -4113,14 +4074,7 @@
         : SGF(SGF), callee(std::move(callee)),
           initialWritebackScope(std::move(writebackScope)),
           uncurries(callee.getNaturalUncurryLevel() + 1), applied(false),
-          assumedPlusZeroSelf(assumedPlusZeroSelf) {
-      // Subtract an uncurry level for captures, if any.
-      // TODO: Encapsulate this better in Callee.
-      if (this->callee.hasCaptures()) {
-        assert(uncurries > 0 && "captures w/o uncurry level?");
-        --uncurries;
-      }
-    }
+          assumedPlusZeroSelf(assumedPlusZeroSelf) {}
 
     /// Add a level of function application by passing in its possibly
     /// unevaluated arguments and their formal type.
@@ -4271,10 +4225,6 @@
 
     AbstractionPattern
     getUncurriedOrigFormalType(AbstractionPattern origFormalType) {
-      if (callee.hasCaptures()) {
-        claimNextParamClause(origFormalType);
-      }
-
       for (unsigned i = 0, e = uncurriedSites.size(); i < e; ++i) {
         claimNextParamClause(origFormalType);
       }
@@ -4626,12 +4576,7 @@
 
     // Collect the captures, if any.
     if (callee.hasCaptures()) {
-      // The captures are represented as a placeholder curry level in the
-      // formal type.
-      // TODO: Remove this hack.
       (void)paramLowering.claimCaptureParams(callee.getCaptures());
-      claimNextParamClause(origFormalType);
-      claimNextParamClause(formalType);
       args.push_back({});
       args.back().append(callee.getCaptures().begin(),
                          callee.getCaptures().end());
@@ -4839,11 +4784,8 @@
   ConstructorDecl *ctor = cast<ConstructorDecl>(init.getDecl());
 
   // Form the reference to the allocating initializer.
-  SILDeclRef initRef(ctor,
-                     SILDeclRef::Kind::Allocator,
-                     SILDeclRef::ConstructAtBestResilienceExpansion,
-                     SILDeclRef::ConstructAtNaturalUncurryLevel,
-                     requiresForeignEntryPoint(ctor));
+  auto initRef = SILDeclRef(ctor, SILDeclRef::Kind::Allocator)
+    .asForeign(requiresForeignEntryPoint(ctor));
   auto initConstant = SGF.getConstantInfo(initRef);
   auto subs = init.getSubstitutions();
 
@@ -5380,10 +5322,8 @@
 SILDeclRef SILGenFunction::getGetterDeclRef(AbstractStorageDecl *storage,
                                             bool isDirectUse) {
   // Use the ObjC entry point
-  return SILDeclRef(storage->getGetter(), SILDeclRef::Kind::Func,
-                    SILDeclRef::ConstructAtBestResilienceExpansion,
-                    SILDeclRef::ConstructAtNaturalUncurryLevel,
-                    shouldReferenceForeignAccessor(storage, isDirectUse));
+  return SILDeclRef(storage->getGetter(), SILDeclRef::Kind::Func)
+    .asForeign(shouldReferenceForeignAccessor(storage, isDirectUse));
 }
 
 /// Emit a call to a getter.
@@ -5399,7 +5339,6 @@
   Callee getter = emitSpecializedAccessorFunctionRef(*this, loc, get,
                                                      substitutions, selfValue,
                                                      isSuper, isDirectUse);
-  bool hasCaptures = getter.hasCaptures();
   bool hasSelf = (bool)selfValue;
   CanAnyFunctionType accessType = getter.getSubstFormalType();
 
@@ -5407,9 +5346,6 @@
   // Self ->
   if (hasSelf) {
     emission.addCallSite(loc, std::move(selfValue), accessType);
-  }
-  // TODO: Have Callee encapsulate the captures better.
-  if (hasSelf || hasCaptures) {
     accessType = cast<AnyFunctionType>(accessType.getResult());
   }
   // Index or () if none.
@@ -5425,10 +5361,8 @@
 
 SILDeclRef SILGenFunction::getSetterDeclRef(AbstractStorageDecl *storage,
                                             bool isDirectUse) {
-  return SILDeclRef(storage->getSetter(), SILDeclRef::Kind::Func,
-                    SILDeclRef::ConstructAtBestResilienceExpansion,
-                    SILDeclRef::ConstructAtNaturalUncurryLevel,
-                    shouldReferenceForeignAccessor(storage, isDirectUse));
+  return SILDeclRef(storage->getSetter(), SILDeclRef::Kind::Func)
+    .asForeign(shouldReferenceForeignAccessor(storage, isDirectUse));
 }
 
 void SILGenFunction::emitSetAccessor(SILLocation loc, SILDeclRef set,
@@ -5442,7 +5376,6 @@
   Callee setter = emitSpecializedAccessorFunctionRef(*this, loc, set,
                                                      substitutions, selfValue,
                                                      isSuper, isDirectUse);
-  bool hasCaptures = setter.hasCaptures();
   bool hasSelf = (bool)selfValue;
   CanAnyFunctionType accessType = setter.getSubstFormalType();
 
@@ -5450,9 +5383,6 @@
   // Self ->
   if (hasSelf) {
     emission.addCallSite(loc, std::move(selfValue), accessType);
-  }
-  // TODO: Have Callee encapsulate the captures better.
-  if (hasSelf || hasCaptures) {
     accessType = cast<AnyFunctionType>(accessType.getResult());
   }
 
@@ -5477,10 +5407,7 @@
 SILGenFunction::getMaterializeForSetDeclRef(AbstractStorageDecl *storage,
                                             bool isDirectUse) {
   return SILDeclRef(storage->getMaterializeForSetFunc(),
-                    SILDeclRef::Kind::Func,
-                    SILDeclRef::ConstructAtBestResilienceExpansion,
-                    SILDeclRef::ConstructAtNaturalUncurryLevel,
-                    /*foreign*/ false);
+                    SILDeclRef::Kind::Func);
 }
 
 MaterializedLValue SILGenFunction::
@@ -5497,7 +5424,6 @@
                                                      materializeForSet,
                                                      substitutions, selfValue,
                                                      isSuper, isDirectUse);
-  bool hasCaptures = callee.hasCaptures();
   bool hasSelf = (bool)selfValue;
   auto accessType = callee.getSubstFormalType();
 
@@ -5505,9 +5431,6 @@
   // Self ->
   if (hasSelf) {
     emission.addCallSite(loc, std::move(selfValue), accessType);
-  }
-  // TODO: Have Callee encapsulate the captures better.
-  if (hasSelf || hasCaptures) {
     accessType = cast<FunctionType>(accessType.getResult());
   }
 
@@ -5564,10 +5487,7 @@
                                                AccessKind accessKind,
                                                bool isDirectUse) {
   FuncDecl *addressorFunc = storage->getAddressorForAccess(accessKind);
-  return SILDeclRef(addressorFunc, SILDeclRef::Kind::Func,
-                    SILDeclRef::ConstructAtBestResilienceExpansion,
-                    SILDeclRef::ConstructAtNaturalUncurryLevel,
-                    /*foreign*/ false);
+  return SILDeclRef(addressorFunc, SILDeclRef::Kind::Func);
 }
 
 /// Emit a call to an addressor.
@@ -5588,7 +5508,6 @@
     emitSpecializedAccessorFunctionRef(*this, loc, addressor,
                                        substitutions, selfValue,
                                        isSuper, isDirectUse);
-  bool hasCaptures = callee.hasCaptures();
   bool hasSelf = (bool)selfValue;
   CanAnyFunctionType accessType = callee.getSubstFormalType();
 
@@ -5596,9 +5515,6 @@
   // Self ->
   if (hasSelf) {
     emission.addCallSite(loc, std::move(selfValue), accessType);
-  }
-  // TODO: Have Callee encapsulate the captures better.
-  if (hasSelf || hasCaptures) {
     accessType = cast<AnyFunctionType>(accessType.getResult());
   }
   // Index or () if none.
@@ -5755,10 +5671,8 @@
                                        memberMethodTy);
   } else
     memberFunc = cast<FuncDecl>(e->getMember().getDecl());
-  SILDeclRef member(memberFunc, SILDeclRef::Kind::Func,
-                    SILDeclRef::ConstructAtBestResilienceExpansion,
-                    SILDeclRef::ConstructAtNaturalUncurryLevel,
-                    /*isObjC=*/true);
+  auto member = SILDeclRef(memberFunc, SILDeclRef::Kind::Func)
+    .asForeign();
   B.createDynamicMethodBranch(e, operand, member, hasMemberBB, noMemberBB);
 
   // Create the has-member branch.
@@ -5854,11 +5768,9 @@
 
   // Create the branch.
   auto subscriptDecl = cast<SubscriptDecl>(e->getMember().getDecl());
-  SILDeclRef member(subscriptDecl->getGetter(),
-                    SILDeclRef::Kind::Func,
-                    SILDeclRef::ConstructAtBestResilienceExpansion,
-                    SILDeclRef::ConstructAtNaturalUncurryLevel,
-                    /*isObjC=*/true);
+  auto member = SILDeclRef(subscriptDecl->getGetter(),
+                           SILDeclRef::Kind::Func)
+    .asForeign();
   B.createDynamicMethodBranch(e, base, member, hasMemberBB, noMemberBB);
 
   // Create the has-member branch.
diff --git a/lib/SILGen/SILGenBridging.cpp b/lib/SILGen/SILGenBridging.cpp
index 9321e03..a221068 100644
--- a/lib/SILGen/SILGenBridging.cpp
+++ b/lib/SILGen/SILGenBridging.cpp
@@ -1043,8 +1043,13 @@
     }
 
     if (auto attr = decl->getAttrs().getAttribute<ObjCAttr>()) {
+      // If @objc was inferred based on the Swift 3 @objc inference rules, but
+      // we aren't compiling in Swift 3 compatibility mode, emit a call to
+      // Builtin.swift3ImplicitObjCEntrypoint() to enable runtime logging of
+      // the uses of such entrypoints.
       if (attr->isSwift3Inferred() &&
-          !decl->getAttrs().hasAttribute<DynamicAttr>()) {
+          !decl->getAttrs().hasAttribute<DynamicAttr>() &&
+          !getASTContext().LangOpts.isSwiftVersion3()) {
         B.createBuiltin(loc, getASTContext().getIdentifier("swift3ImplicitObjCEntrypoint"),
             getModule().Types.getEmptyTupleType(), { }, { });
       }
diff --git a/lib/SILGen/SILGenBuilder.cpp b/lib/SILGen/SILGenBuilder.cpp
index 4c69ab8..e2d7801 100644
--- a/lib/SILGen/SILGenBuilder.cpp
+++ b/lib/SILGen/SILGenBuilder.cpp
@@ -108,7 +108,7 @@
                                       SubstitutionList subs,
                                       ArrayRef<SILValue> args) {
   getSILGenModule().useConformancesFromSubstitutions(subs);
-  return SILBuilder::createApply(loc, fn, substFnTy, result, subs, args, false);
+  return SILBuilder::createApply(loc, fn, subs, args, false);
 }
 
 TryApplyInst *
@@ -116,8 +116,7 @@
                               SubstitutionList subs, ArrayRef<SILValue> args,
                               SILBasicBlock *normalBB, SILBasicBlock *errorBB) {
   getSILGenModule().useConformancesFromSubstitutions(subs);
-  return SILBuilder::createTryApply(loc, fn, substFnTy, subs, args, normalBB,
-                                    errorBB);
+  return SILBuilder::createTryApply(loc, fn, subs, args, normalBB, errorBB);
 }
 
 PartialApplyInst *
@@ -125,8 +124,9 @@
                                   SILType substFnTy, SubstitutionList subs,
                                   ArrayRef<SILValue> args, SILType closureTy) {
   getSILGenModule().useConformancesFromSubstitutions(subs);
-  return SILBuilder::createPartialApply(loc, fn, substFnTy, subs, args,
-                                        closureTy);
+  return SILBuilder::createPartialApply(
+      loc, fn, subs, args,
+      closureTy.getAs<SILFunctionType>()->getCalleeConvention());
 }
 
 BuiltinInst *SILGenBuilder::createBuiltin(SILLocation loc, Identifier name,
diff --git a/lib/SILGen/SILGenConstructor.cpp b/lib/SILGen/SILGenConstructor.cpp
index af2d599..6aa6887 100644
--- a/lib/SILGen/SILGenConstructor.cpp
+++ b/lib/SILGen/SILGenConstructor.cpp
@@ -53,7 +53,7 @@
   auto type = DC->mapTypeIntoContext(interfaceType)->getCanonicalType();
 
   // Restructure tuple arguments.
-  if (CanTupleType tupleTy = dyn_cast<TupleType>(interfaceType)) {
+  if (auto tupleTy = dyn_cast<TupleType>(interfaceType)) {
     RValue tuple(type);
     for (auto fieldType : tupleTy.getElementTypes())
       tuple.addElement(emitImplicitValueConstructorArg(gen, loc, fieldType, DC));
@@ -486,12 +486,7 @@
 
   // Call the initializer. Always use the Swift entry point, which will be a
   // bridging thunk if we're calling ObjC.
-  SILDeclRef initConstant =
-    SILDeclRef(ctor,
-               SILDeclRef::Kind::Initializer,
-               SILDeclRef::ConstructAtBestResilienceExpansion,
-               SILDeclRef::ConstructAtNaturalUncurryLevel,
-               /*isObjC=*/false);
+  auto initConstant = SILDeclRef(ctor, SILDeclRef::Kind::Initializer);
 
   ManagedValue initVal;
   SILType initTy;
diff --git a/lib/SILGen/SILGenConvert.cpp b/lib/SILGen/SILGenConvert.cpp
index 84dd430..b0df2bd 100644
--- a/lib/SILGen/SILGenConvert.cpp
+++ b/lib/SILGen/SILGenConvert.cpp
@@ -642,21 +642,13 @@
   
     // If the concrete value is a pseudogeneric archetype, first erase it to
     // its upper bound.
-    auto anyObjectProto = getASTContext()
-      .getProtocol(KnownProtocolKind::AnyObject);
     auto anyObjectTy = getASTContext().getAnyObjectType();
     auto eraseToAnyObject =
     [&, concreteFormalType, F](SGFContext C) -> ManagedValue {
       auto concreteValue = F(SGFContext());
-      auto anyObjectConformance = SGM.SwiftModule
-        ->lookupConformance(concreteFormalType, anyObjectProto, nullptr);
-      ProtocolConformanceRef buf[] = {
-        *anyObjectConformance,
-      };
-
       return B.createInitExistentialRef(
           loc, SILType::getPrimitiveObjectType(anyObjectTy), concreteFormalType,
-          concreteValue, getASTContext().AllocateCopy(buf));
+          concreteValue, {});
     };
     
     auto concreteTLPtr = &concreteTL;
diff --git a/lib/SILGen/SILGenDecl.cpp b/lib/SILGen/SILGenDecl.cpp
index 8f318da..25b627a 100644
--- a/lib/SILGen/SILGenDecl.cpp
+++ b/lib/SILGen/SILGenDecl.cpp
@@ -1393,6 +1393,7 @@
   case DeclKind::PostfixOperator:
   case DeclKind::PrecedenceGroup:
   case DeclKind::Module:
+  case DeclKind::MissingMember:
     llvm_unreachable("Not a valid external definition for SILGen");
   }
 }
diff --git a/lib/SILGen/SILGenDestructor.cpp b/lib/SILGen/SILGenDestructor.cpp
index 9b17e2c..1b34720 100644
--- a/lib/SILGen/SILGenDestructor.cpp
+++ b/lib/SILGen/SILGenDestructor.cpp
@@ -228,11 +228,9 @@
   assert(superclassTy && "Emitting Objective-C -dealloc without superclass?");
   ClassDecl *superclass = superclassTy->getClassOrBoundGenericClass();
   auto superclassDtorDecl = superclass->getDestructor();
-  SILDeclRef superclassDtor(superclassDtorDecl,
-                            SILDeclRef::Kind::Deallocator,
-                            SILDeclRef::ConstructAtBestResilienceExpansion,
-                            SILDeclRef::ConstructAtNaturalUncurryLevel,
-                            /*isForeign=*/true);
+  auto superclassDtor = SILDeclRef(superclassDtorDecl,
+                                   SILDeclRef::Kind::Deallocator)
+    .asForeign();
   auto superclassDtorType = SGM.getConstantType(superclassDtor);
   SILValue superclassDtorValue = B.createSuperMethod(
                                    cleanupLoc, selfValue, superclassDtor,
diff --git a/lib/SILGen/SILGenExpr.cpp b/lib/SILGen/SILGenExpr.cpp
index da96980..9a1cd89 100644
--- a/lib/SILGen/SILGenExpr.cpp
+++ b/lib/SILGen/SILGenExpr.cpp
@@ -767,18 +767,9 @@
   
   // If the referenced decl isn't a VarDecl, it should be a constant of some
   // sort.
-
-  // If the referenced decl is a local func with context, then the SILDeclRef
-  // uncurry level is one deeper (for the context vars).
-  bool hasLocalCaptures = false;
-  unsigned uncurryLevel = 0;
-  if (auto *fd = dyn_cast<FuncDecl>(decl)) {
-    hasLocalCaptures = SGM.M.Types.hasLoweredLocalCaptures(fd);
-    if (hasLocalCaptures)
-      ++uncurryLevel;
-  }
-
-  auto silDeclRef = SILDeclRef(decl, ResilienceExpansion::Minimal, uncurryLevel);
+  SILDeclRef silDeclRef(decl);
+  if (silDeclRef.getUncurryLevel() > 0)
+    silDeclRef = silDeclRef.asCurried();
 
   ManagedValue result = emitClosureValue(loc, silDeclRef, refType,
                                          declRef.getSubstitutions());
diff --git a/lib/SILGen/SILGenFunction.cpp b/lib/SILGen/SILGenFunction.cpp
index 423e165..9a8cdf6 100644
--- a/lib/SILGen/SILGenFunction.cpp
+++ b/lib/SILGen/SILGenFunction.cpp
@@ -196,7 +196,9 @@
 
     case CaptureKind::Constant: {
       // let declarations.
-      auto Entry = VarLocs[vd];
+      auto found = VarLocs.find(vd);
+      assert(found != VarLocs.end());
+      auto Entry = found->second;
 
       auto *var = cast<VarDecl>(vd);
       auto &tl = getTypeLowering(var->getType()->getReferenceStorageReferent());
@@ -301,9 +303,6 @@
   auto captureInfo = closure.getCaptureInfo();
   auto loweredCaptureInfo = SGM.Types.getLoweredLocalCaptures(closure);
   auto hasCaptures = SGM.Types.hasLoweredLocalCaptures(closure);
-  assert(((constant.uncurryLevel == 1 && hasCaptures) ||
-          (constant.uncurryLevel == 0 && !hasCaptures)) &&
-         "curried local functions not yet supported");
 
   auto constantInfo = getConstantInfo(constant);
   SILValue functionRef = emitGlobalFunctionRef(loc, constant, constantInfo);
@@ -370,21 +369,6 @@
   //  - the original type
   auto origLoweredFormalType =
       AbstractionPattern(constantInfo.LoweredInterfaceType);
-  if (hasCaptures) {
-    // Get the unlowered formal type of the constant, stripping off
-    // the first level of function application, which applies captures.
-    origLoweredFormalType =
-      AbstractionPattern(constantInfo.FormalInterfaceType)
-          .getFunctionResultType();
-
-    // Lower it, being careful to use the right generic signature.
-    origLoweredFormalType =
-      AbstractionPattern(
-          origLoweredFormalType.getGenericSignature(),
-          SGM.Types.getLoweredASTFunctionType(
-              cast<FunctionType>(origLoweredFormalType.getType()),
-              0, constant));
-  }
 
   // - the substituted type
   auto substFormalType = cast<FunctionType>(expectedType);
@@ -465,9 +449,7 @@
     assert(!results.empty() && "couldn't find UIApplicationMain in UIKit");
     assert(results.size() == 1 && "more than one UIApplicationMain?");
 
-    SILDeclRef mainRef{results.front(), ResilienceExpansion::Minimal,
-                       SILDeclRef::ConstructAtNaturalUncurryLevel,
-                       /*isForeign*/true};
+    auto mainRef = SILDeclRef(results.front()).asForeign();
     auto UIApplicationMainFn = SGM.M.getOrCreateFunction(mainClass, mainRef,
                                                          NotForDefinition);
     auto fnTy = UIApplicationMainFn->getLoweredFunctionType();
@@ -478,11 +460,6 @@
         ->getCanonicalType();
     CanType mainClassMetaty = CanMetatypeType::get(mainClassTy,
                                                    MetatypeRepresentation::ObjC);
-    ProtocolDecl *anyObjectProtocol =
-      ctx.getProtocol(KnownProtocolKind::AnyObject);
-    auto mainClassAnyObjectConformance = ProtocolConformanceRef(
-      *SGM.M.getSwiftModule()->lookupConformance(mainClassTy, anyObjectProtocol,
-                                                nullptr));
     CanType anyObjectTy = ctx.getAnyObjectType();
     CanType anyObjectMetaTy = CanExistentialMetatypeType::get(anyObjectTy,
                                                   MetatypeRepresentation::ObjC);
@@ -507,9 +484,7 @@
     SILValue metaTy = B.createMetatype(mainClass,
                              SILType::getPrimitiveObjectType(mainClassMetaty));
     metaTy = B.createInitExistentialMetatype(mainClass, metaTy,
-                          SILType::getPrimitiveObjectType(anyObjectMetaTy),
-                          ctx.AllocateCopy(
-                            llvm::makeArrayRef(mainClassAnyObjectConformance)));
+                          SILType::getPrimitiveObjectType(anyObjectMetaTy), {});
     SILValue optName = B.createApply(mainClass,
                                NSStringFromClass,
                                NSStringFromClass->getType(),
diff --git a/lib/SILGen/SILGenFunction.h b/lib/SILGen/SILGenFunction.h
index c399d08..c32476f 100644
--- a/lib/SILGen/SILGenFunction.h
+++ b/lib/SILGen/SILGenFunction.h
@@ -619,8 +619,7 @@
                                   CleanupLocation cleanupLoc);
   /// Generates code for a curry thunk from one uncurry level
   /// of a function to another.
-  void emitCurryThunk(ValueDecl *fd,
-                      SILDeclRef fromLevel, SILDeclRef toLevel);
+  void emitCurryThunk(SILDeclRef thunk);
   /// Generates a thunk from a foreign function to the native Swift convention.
   void emitForeignToNativeThunk(SILDeclRef thunk);
   /// Generates a thunk from a native function to the conventions.
diff --git a/lib/SILGen/SILGenLValue.cpp b/lib/SILGen/SILGenLValue.cpp
index 27bd2ca..dd33ba1 100644
--- a/lib/SILGen/SILGenLValue.cpp
+++ b/lib/SILGen/SILGenLValue.cpp
@@ -1077,7 +1077,6 @@
 
         auto substCallbackFnType = origCallbackFnType->substGenericArgs(
             M, substitutions);
-        auto substCallbackType = SILType::getPrimitiveObjectType(substCallbackFnType);
         auto metatypeType =
             SGF.getSILType(substCallbackFnType->getParameters().back());
 
@@ -1119,8 +1118,8 @@
                                        rawPointerTy);
 
         // Apply the callback.
-        SGF.B.createApply(loc, callback, substCallbackType,
-                          emptyTupleTy, substitutions, {
+        SGF.B.createApply(loc, callback,
+                          substitutions, {
                             temporaryPointer,
                             materialized.callbackStorage,
                             baseAddress,
diff --git a/lib/SILGen/SILGenMaterializeForSet.cpp b/lib/SILGen/SILGenMaterializeForSet.cpp
index 3c1f78d..dbcbc63 100644
--- a/lib/SILGen/SILGenMaterializeForSet.cpp
+++ b/lib/SILGen/SILGenMaterializeForSet.cpp
@@ -683,14 +683,19 @@
   if (GenericEnv && GenericEnv->getGenericSignature()->areAllParamsConcrete())
     genericEnv = nullptr;
 
-  auto callback =
-    SGM.M.createFunction(Linkage, CallbackName, callbackType,
-                         genericEnv, SILLocation(Witness),
-                         IsBare, F.isTransparent(), F.isSerialized(),
-                         IsNotThunk, SubclassScope::NotApplicable,
-                         /*inlineStrategy=*/InlineDefault,
-                         /*EK=*/EffectsKind::Unspecified,
-                         /*InsertBefore=*/&F);
+  // The callback's symbol is irrelevant (it is just returned as a value from
+  // the actual materializeForSet function), and so we only need to make sure we
+  // don't break things in cases when there may be multiple definitions.
+  auto callbackLinkage =
+      hasSharedVisibility(Linkage) ? SILLinkage::Shared : SILLinkage::Private;
+
+  auto callback = SGM.M.createFunction(
+      callbackLinkage, CallbackName, callbackType, genericEnv,
+      SILLocation(Witness), IsBare, F.isTransparent(), F.isSerialized(),
+      IsNotThunk, SubclassScope::NotApplicable,
+      /*inlineStrategy=*/InlineDefault,
+      /*EK=*/EffectsKind::Unspecified,
+      /*InsertBefore=*/&F);
 
   callback->setDebugScope(new (SGM.M) SILDebugScope(Witness, callback));
 
diff --git a/lib/SILGen/SILGenPoly.cpp b/lib/SILGen/SILGenPoly.cpp
index 537d603..b956e7d 100644
--- a/lib/SILGen/SILGenPoly.cpp
+++ b/lib/SILGen/SILGenPoly.cpp
@@ -1955,7 +1955,7 @@
   // outerOrigType can be a tuple if we're doing something like
   // injecting into an optional tuple.
 
-  CanTupleType outerSubstTupleType = dyn_cast<TupleType>(outerSubstType);
+  auto outerSubstTupleType = dyn_cast<TupleType>(outerSubstType);
 
   // If the outer type is not a tuple, it must be optional.
   if (!outerSubstTupleType) {
@@ -2054,7 +2054,7 @@
                                          SILResultInfo outerResult) {
   assert(innerOrigType.isTuple());
 
-  CanTupleType outerSubstTupleType = dyn_cast<TupleType>(outerSubstType);
+  auto outerSubstTupleType = dyn_cast<TupleType>(outerSubstType);
 
   // If the outer type is not a tuple, it must be optional or we are under
   // opaque value mode
@@ -2265,7 +2265,7 @@
                                               SILResultInfo innerResult) {
 
   assert(!innerOrigType.isTuple());
-  CanTupleType outerSubstTupleType = dyn_cast<TupleType>(outerSubstType);
+  auto outerSubstTupleType = dyn_cast<TupleType>(outerSubstType);
 
   assert(outerSubstTupleType && "Outer type must be a tuple");
   assert(innerSubstType->getNumElements() ==
diff --git a/lib/SILGen/SILGenProfiling.cpp b/lib/SILGen/SILGenProfiling.cpp
index d24d937..f564dfd 100644
--- a/lib/SILGen/SILGenProfiling.cpp
+++ b/lib/SILGen/SILGenProfiling.cpp
@@ -715,11 +715,11 @@
 }
 
 static SILLocation getLocation(ASTNode Node) {
-  if (Expr *E = Node.dyn_cast<Expr *>())
+  if (auto *E = Node.dyn_cast<Expr *>())
     return E;
-  else if (Stmt *S = Node.dyn_cast<Stmt *>())
+  else if (auto *S = Node.dyn_cast<Stmt *>())
     return S;
-  else if (Decl *D = Node.dyn_cast<Decl *>())
+  else if (auto *D = Node.dyn_cast<Decl *>())
     return D;
   else
     llvm_unreachable("unsupported ASTNode");
diff --git a/lib/SILGen/SILGenStmt.cpp b/lib/SILGen/SILGenStmt.cpp
index 549de94..d76e0da 100644
--- a/lib/SILGen/SILGenStmt.cpp
+++ b/lib/SILGen/SILGenStmt.cpp
@@ -209,9 +209,9 @@
     if (!SGF.B.hasValidInsertionPoint()) {
       // If this is an implicit statement or expression, just skip over it,
       // don't emit a diagnostic here.
-      if (Stmt *S = ESD.dyn_cast<Stmt*>()) {
+      if (auto *S = ESD.dyn_cast<Stmt*>()) {
         if (S->isImplicit()) continue;
-      } else if (Expr *E = ESD.dyn_cast<Expr*>()) {
+      } else if (auto *E = ESD.dyn_cast<Expr*>()) {
         if (E->isImplicit()) continue;
       }
       
@@ -226,7 +226,7 @@
     }
 
     // Process children.
-    if (Stmt *S = ESD.dyn_cast<Stmt*>()) {
+    if (auto *S = ESD.dyn_cast<Stmt*>()) {
       visit(S);
       if (isa<ReturnStmt>(S))
         StmtType = ReturnStmtType;
@@ -236,7 +236,7 @@
         StmtType = ContinueStmtType;
       if (isa<ThrowStmt>(S))
         StmtType = ThrowStmtType;
-    } else if (Expr *E = ESD.dyn_cast<Expr*>()) {
+    } else if (auto *E = ESD.dyn_cast<Expr*>()) {
       SGF.emitIgnoredExpr(E);
     } else {
       SGF.visit(ESD.get<Decl*>());
diff --git a/lib/SILGen/SILGenThunk.cpp b/lib/SILGen/SILGenThunk.cpp
index b89d220..dd3c447 100644
--- a/lib/SILGen/SILGenThunk.cpp
+++ b/lib/SILGen/SILGenThunk.cpp
@@ -73,20 +73,30 @@
 
 static SILValue getNextUncurryLevelRef(SILGenFunction &gen,
                                        SILLocation loc,
-                                       SILDeclRef next,
-                                       bool direct,
+                                       SILDeclRef thunk,
                                        SILValue selfArg,
                                        SubstitutionList curriedSubs) {
-  if (next.isForeign || next.isCurried || !next.hasDecl() || direct)
-    return gen.emitGlobalFunctionRef(loc, next.asForeign(false));
+  auto *vd = thunk.getDecl();
+
+  // Reference the next uncurrying level of the function.
+  SILDeclRef next = SILDeclRef(vd, thunk.kind);
+  assert(!next.isCurried);
+
+  // If the function is natively foreign, reference its foreign entry point.
+  if (requiresForeignToNativeThunk(vd))
+    return gen.emitGlobalFunctionRef(loc, next);
+
+  // If the thunk is a curry thunk for a direct method reference, we are
+  // doing a direct dispatch (eg, a fragile 'super.foo()' call).
+  if (thunk.isDirectReference)
+    return gen.emitGlobalFunctionRef(loc, next);
 
   auto constantInfo = gen.SGM.Types.getConstantInfo(next);
 
-  if (auto *func = dyn_cast<AbstractFunctionDecl>(next.getDecl())) {
-    if (getMethodDispatch(cast<AbstractFunctionDecl>(next.getDecl()))
-          == MethodDispatch::Class) {
+  if (auto *func = dyn_cast<AbstractFunctionDecl>(vd)) {
+    if (getMethodDispatch(func) == MethodDispatch::Class) {
       // Use the dynamic thunk if dynamic.
-      if (next.getDecl()->isDynamic()) {
+      if (vd->isDynamic()) {
         auto dynamicThunk = gen.SGM.getDynamicThunk(next, constantInfo);
         return gen.B.createFunctionRef(loc, dynamicThunk);
       }
@@ -118,17 +128,16 @@
   return gen.emitGlobalFunctionRef(loc, next);
 }
 
-void SILGenFunction::emitCurryThunk(ValueDecl *vd,
-                                    SILDeclRef from, SILDeclRef to) {
-#ifndef NDEBUG
-  assert(from.uncurryLevel == 0 && to.uncurryLevel == 1
-         && "currying function at level other than one?!");
+void SILGenFunction::emitCurryThunk(SILDeclRef thunk) {
+  assert(thunk.isCurried);
+
+  auto *vd = thunk.getDecl();
 
   if (auto *fd = dyn_cast<AbstractFunctionDecl>(vd)) {
     assert(!SGM.M.Types.hasLoweredLocalCaptures(fd) &&
            "methods cannot have captures");
+    (void) fd;
   }
-#endif
 
   auto selfTy = vd->getInterfaceType()->castTo<AnyFunctionType>()
     ->getInput();
@@ -138,14 +147,14 @@
   // Forward substitutions.
   auto subs = F.getForwardingSubstitutions();
 
-  SILValue toFn = getNextUncurryLevelRef(*this, vd, to, from.isDirectReference,
+  SILValue toFn = getNextUncurryLevelRef(*this, vd, thunk,
                                          selfArg, subs);
 
   // FIXME: Using the type from the ConstantInfo instead of looking at
   // getConstantOverrideInfo() for methods looks suspect in the presence
   // of covariant overrides and multiple vtable entries.
   SILFunctionConventions fromConv(
-      SGM.Types.getConstantInfo(from).SILFnType, SGM.M);
+      SGM.Types.getConstantInfo(thunk).SILFnType, SGM.M);
   SILType resultTy = fromConv.getSingleSILResultType();
   resultTy = F.mapTypeIntoContext(resultTy);
   auto substTy = toFn->getType().substGenericArgs(SGM.M,  subs);
@@ -162,20 +171,20 @@
   B.createReturn(ImplicitReturnLocation::getImplicitReturnLoc(vd), toClosure);
 }
 
-void SILGenModule::emitCurryThunk(ValueDecl *fd,
-                                  SILDeclRef entryPoint,
-                                  SILDeclRef nextEntryPoint) {
+void SILGenModule::emitCurryThunk(SILDeclRef constant) {
+  assert(constant.isCurried);
+
   // Thunks are always emitted by need, so don't need delayed emission.
-  SILFunction *f = getFunction(entryPoint, ForDefinition);
+  SILFunction *f = getFunction(constant, ForDefinition);
   f->setThunk(IsThunk);
   f->setBare(IsBare);
 
-  preEmitFunction(entryPoint, fd, f, fd);
+  auto *fd = constant.getDecl();
+  preEmitFunction(constant, fd, f, fd);
   PrettyStackTraceSILFunction X("silgen emitCurryThunk", f);
 
-  SILGenFunction(*this, *f)
-    .emitCurryThunk(fd, entryPoint, nextEntryPoint);
-  postEmitFunction(entryPoint, f);
+  SILGenFunction(*this, *f).emitCurryThunk(constant);
+  postEmitFunction(constant, f);
 }
 
 void SILGenModule::emitForeignToNativeThunk(SILDeclRef thunk) {
@@ -224,27 +233,8 @@
   // If the constant is a thunk we haven't emitted yet, emit it.
   if (!SGM.hasFunction(constant)) {
     if (constant.isCurried) {
-      auto vd = constant.getDecl();
-      // Reference the next uncurrying level of the function.
-      SILDeclRef next = SILDeclRef(vd, constant.kind,
-                                 SILDeclRef::ConstructAtBestResilienceExpansion,
-                                 constant.uncurryLevel + 1);
-      // If the function is fully uncurried and natively foreign, reference its
-      // foreign entry point.
-      if (!next.isCurried) {
-        if (requiresForeignToNativeThunk(vd))
-          next = next.asForeign();
-      }
-      
-      // Preserve whether the curry thunks lead to a direct reference to the
-      // method implementation.
-      next = next.asDirectReference(constant.isDirectReference);
-
-      SGM.emitCurryThunk(vd, constant, next);
-    }
-    // Otherwise, if this is a calling convention thunk we haven't emitted yet,
-    // emit it.
-    else if (constant.isForeignToNativeThunk()) {
+      SGM.emitCurryThunk(constant);
+    } else if (constant.isForeignToNativeThunk()) {
       SGM.emitForeignToNativeThunk(constant);
     } else if (constant.isNativeToForeignThunk()) {
       SGM.emitNativeToForeignThunk(constant);
diff --git a/lib/SILGen/SILGenType.cpp b/lib/SILGen/SILGenType.cpp
index 9d8b84a..53c96cf 100644
--- a/lib/SILGen/SILGenType.cpp
+++ b/lib/SILGen/SILGenType.cpp
@@ -203,6 +203,8 @@
     assert(result.second);
     (void) result;
   }
+
+  void addPlaceholder(MissingMemberDecl *) {}
 };
 
 } // end anonymous namespace
@@ -255,12 +257,8 @@
   }
 
   void addConstructor(ConstructorDecl *cd, Witness witness) {
-    SILDeclRef requirementRef(cd, SILDeclRef::Kind::Allocator,
-                              ResilienceExpansion::Minimal);
-
-    SILDeclRef witnessRef(witness.getDecl(), SILDeclRef::Kind::Allocator,
-                          SILDeclRef::ConstructAtBestResilienceExpansion,
-                          requirementRef.uncurryLevel);
+    SILDeclRef requirementRef(cd, SILDeclRef::Kind::Allocator);
+    SILDeclRef witnessRef(witness.getDecl(), SILDeclRef::Kind::Allocator);
 
     asDerived().addMethod(requirementRef, witnessRef, IsNotFreeFunctionWitness,
                           witness);
@@ -283,20 +281,11 @@
 
 private:
   void addMethod(FuncDecl *fd, ValueDecl *witnessDecl, Witness witness) {
-
-    // TODO: multiple resilience expansions?
-    // TODO: multiple uncurry levels?
-    SILDeclRef requirementRef(fd, SILDeclRef::Kind::Func,
-                              ResilienceExpansion::Minimal);
+    SILDeclRef requirementRef(fd, SILDeclRef::Kind::Func);
     // Free function witnesses have an implicit uncurry layer imposed on them by
     // the inserted metatype argument.
     auto isFree = isFreeFunctionWitness(fd, witnessDecl);
-    unsigned witnessUncurryLevel = isFree ? requirementRef.uncurryLevel - 1
-                                          : requirementRef.uncurryLevel;
-
-    SILDeclRef witnessRef(witnessDecl, SILDeclRef::Kind::Func,
-                          SILDeclRef::ConstructAtBestResilienceExpansion,
-                          witnessUncurryLevel);
+    SILDeclRef witnessRef(witnessDecl, SILDeclRef::Kind::Func);
 
     asDerived().addMethod(requirementRef, witnessRef, isFree, witness);
   }
@@ -404,6 +393,10 @@
     super::addConstructor(cd, witness);
   }
 
+  void addPlaceholder(MissingMemberDecl *placeholder) {
+    llvm_unreachable("generating a witness table with placeholders in it");
+  }
+
   void addMethod(SILDeclRef requirementRef,
                  SILDeclRef witnessRef,
                  IsFreeFunctionWitness_t isFree,
@@ -562,18 +555,6 @@
                                   IsFreeFunctionWitness_t isFree,
                                   Witness witness) {
   auto requirementInfo = Types.getConstantInfo(requirement);
-  unsigned witnessUncurryLevel = witnessRef.uncurryLevel;
-
-  // If the witness is a free function, consider the self argument
-  // uncurry level.
-  if (isFree)
-    ++witnessUncurryLevel;
-
-  // The SIL witness thunk has the type of the AST-level witness with
-  // witness substitutions applied, at the abstraction level of the
-  // original protocol requirement.
-  assert(requirement.uncurryLevel == witnessUncurryLevel &&
-         "uncurry level of requirement and witness do not match");
 
   GenericEnvironment *genericEnv = nullptr;
 
@@ -750,6 +731,10 @@
     super::addConstructor(cd, witness);
   }
 
+  void addPlaceholder(MissingMemberDecl *placeholder) {
+    llvm_unreachable("generating a witness table with placeholders in it");
+  }
+
   void addMethod(SILDeclRef requirementRef,
                  SILDeclRef witnessRef,
                  IsFreeFunctionWitness_t isFree,
@@ -848,6 +833,7 @@
   void visitTypeAliasDecl(TypeAliasDecl *tad) {}
   void visitAbstractTypeParamDecl(AbstractTypeParamDecl *tpd) {}
   void visitModuleDecl(ModuleDecl *md) {}
+  void visitMissingMemberDecl(MissingMemberDecl *) {}
   void visitNominalTypeDecl(NominalTypeDecl *ntd) {
     SILGenType(SGM, ntd).emitType();
   }
@@ -947,6 +933,7 @@
   void visitTypeAliasDecl(TypeAliasDecl *tad) {}
   void visitAbstractTypeParamDecl(AbstractTypeParamDecl *tpd) {}
   void visitModuleDecl(ModuleDecl *md) {}
+  void visitMissingMemberDecl(MissingMemberDecl *) {}
   void visitNominalTypeDecl(NominalTypeDecl *ntd) {
     SILGenType(SGM, ntd).emitType();
   }
diff --git a/lib/SILOptimizer/Analysis/ARCAnalysis.cpp b/lib/SILOptimizer/Analysis/ARCAnalysis.cpp
index 4661b07..e48dbb9 100644
--- a/lib/SILOptimizer/Analysis/ARCAnalysis.cpp
+++ b/lib/SILOptimizer/Analysis/ARCAnalysis.cpp
@@ -515,7 +515,7 @@
 findMatchingRetainsInBasicBlock(SILBasicBlock *BB, SILValue V) {
   for (auto II = BB->rbegin(), IE = BB->rend(); II != IE; ++II) {
     // Handle self-recursion.
-    if (ApplyInst *AI = dyn_cast<ApplyInst>(&*II))
+    if (auto *AI = dyn_cast<ApplyInst>(&*II))
       if (AI->getCalleeFunction() == BB->getParent()) 
         return std::make_pair(FindRetainKind::Recursion, AI);
     
@@ -557,7 +557,7 @@
   // return value.
   SILValue RV = SILValue();
   for (auto II = BB->rbegin(), IE = BB->rend(); II != IE; ++II) {
-    if (ReturnInst *RI = dyn_cast<ReturnInst>(&*II)) {
+    if (auto *RI = dyn_cast<ReturnInst>(&*II)) {
       RV = RI->getOperand();
       break;
     }
diff --git a/lib/SILOptimizer/Analysis/AliasAnalysis.cpp b/lib/SILOptimizer/Analysis/AliasAnalysis.cpp
index d801684..3cb3435 100644
--- a/lib/SILOptimizer/Analysis/AliasAnalysis.cpp
+++ b/lib/SILOptimizer/Analysis/AliasAnalysis.cpp
@@ -748,7 +748,7 @@
 
 
   // Check if a parent of a tuple is a "let"
-  if (TupleElementAddrInst *TEA = dyn_cast<TupleElementAddrInst>(V))
+  if (auto *TEA = dyn_cast<TupleElementAddrInst>(V))
     return isLetPointer(TEA->getOperand());
 
   return false;
diff --git a/lib/SILOptimizer/Analysis/ArraySemantic.cpp b/lib/SILOptimizer/Analysis/ArraySemantic.cpp
index d885185..85a4e09 100644
--- a/lib/SILOptimizer/Analysis/ArraySemantic.cpp
+++ b/lib/SILOptimizer/Analysis/ArraySemantic.cpp
@@ -715,7 +715,6 @@
   SILBuilderWithScope Builder(SemanticsCall);
   auto Loc = SemanticsCall->getLoc();
   auto *FnRef = Builder.createFunctionRef(Loc, AppendFn);
-  auto FnTy = FnRef->getType();
 
   if (Vals.size() > 1) {
     // Create a call to reserveCapacityForAppend() to reserve space for multiple
@@ -734,10 +733,7 @@
       Builder.createIntegerLiteral(Loc, BuiltinIntTy, Vals.size());
     StructInst *Capacity = Builder.createStruct(Loc,
         SILType::getPrimitiveObjectType(CanType(IntType)), {CapacityLiteral});
-    Builder.createApply(Loc, ReserveFnRef,
-                        ReserveFnRef->getType().substGenericArgs(M, Subs),
-                        ReserveFnTy->getAllResultsType(), Subs,
-                        {Capacity, ArrRef}, false);
+    Builder.createApply(Loc, ReserveFnRef, Subs, {Capacity, ArrRef}, false);
   }
 
   for (SILValue V : Vals) {
@@ -750,9 +746,7 @@
                                 IsInitialization_t::IsInitialization);
 
     SILValue Args[] = {AllocStackInst, ArrRef};
-    Builder.createApply(Loc, FnRef, FnTy.substGenericArgs(M, Subs),
-                        FnTy.castTo<SILFunctionType>()->getAllResultsType(), Subs,
-                        Args, false);
+    Builder.createApply(Loc, FnRef, Subs, Args, false);
     Builder.createDeallocStack(Loc, AllocStackInst);
     if (!isConsumedParameter(AppendFnTy->getParameters()[0].getConvention())) {
       ValLowering.emitDestroyValue(Builder, Loc, CopiedVal);
diff --git a/lib/SILOptimizer/Analysis/SimplifyInstruction.cpp b/lib/SILOptimizer/Analysis/SimplifyInstruction.cpp
index c18d38f99..cfbf2eb 100644
--- a/lib/SILOptimizer/Analysis/SimplifyInstruction.cpp
+++ b/lib/SILOptimizer/Analysis/SimplifyInstruction.cpp
@@ -131,13 +131,13 @@
 
 SILValue InstSimplifier::visitTupleExtractInst(TupleExtractInst *TEI) {
   // tuple_extract(tuple(x, y), 0) -> x
-  if (TupleInst *TheTuple = dyn_cast<TupleInst>(TEI->getOperand()))
+  if (auto *TheTuple = dyn_cast<TupleInst>(TEI->getOperand()))
     return TheTuple->getElement(TEI->getFieldNo());
 
   // tuple_extract(apply([add|sub|...]overflow(x,y)),  0) -> x
   // tuple_extract(apply(checked_trunc(ext(x))), 0) -> x
   if (TEI->getFieldNo() == 0)
-    if (BuiltinInst *BI = dyn_cast<BuiltinInst>(TEI->getOperand()))
+    if (auto *BI = dyn_cast<BuiltinInst>(TEI->getOperand()))
       return simplifyOverflowBuiltin(BI);
 
   return SILValue();
@@ -145,7 +145,7 @@
 
 SILValue InstSimplifier::visitStructExtractInst(StructExtractInst *SEI) {
   // struct_extract(struct(x, y), x) -> x
-  if (StructInst *Struct = dyn_cast<StructInst>(SEI->getOperand()))
+  if (auto *Struct = dyn_cast<StructInst>(SEI->getOperand()))
     return Struct->getFieldValue(SEI->getField());
 
   return SILValue();
@@ -155,7 +155,7 @@
 InstSimplifier::
 visitUncheckedEnumDataInst(UncheckedEnumDataInst *UEDI) {
   // (unchecked_enum_data (enum payload)) -> payload
-  if (EnumInst *EI = dyn_cast<EnumInst>(UEDI->getOperand())) {
+  if (auto *EI = dyn_cast<EnumInst>(UEDI->getOperand())) {
     if (EI->getElement() != UEDI->getElement())
       return SILValue();
 
@@ -570,8 +570,8 @@
   const SILValue &Op1 = Args[0];
   const SILValue &Op2 = Args[1];
 
-  IntegerLiteralInst *IntOp1 = dyn_cast<IntegerLiteralInst>(Op1);
-  IntegerLiteralInst *IntOp2 = dyn_cast<IntegerLiteralInst>(Op2);
+  auto *IntOp1 = dyn_cast<IntegerLiteralInst>(Op1);
+  auto *IntOp2 = dyn_cast<IntegerLiteralInst>(Op2);
 
   // If both ops are not constants, we cannot do anything.
   // FIXME: Add cases where we can do something, eg, (x - x) -> 0
diff --git a/lib/SILOptimizer/Analysis/ValueTracking.cpp b/lib/SILOptimizer/Analysis/ValueTracking.cpp
index 87a3cce..c914f5e 100644
--- a/lib/SILOptimizer/Analysis/ValueTracking.cpp
+++ b/lib/SILOptimizer/Analysis/ValueTracking.cpp
@@ -148,7 +148,7 @@
     if (T->getFieldNo() != 0)
       return IsZeroKind::Unknown;
 
-    BuiltinInst *BI = dyn_cast<BuiltinInst>(T->getOperand());
+    auto *BI = dyn_cast<BuiltinInst>(T->getOperand());
     if (!BI)
       return IsZeroKind::Unknown;
 
diff --git a/lib/SILOptimizer/IPO/CapturePromotion.cpp b/lib/SILOptimizer/IPO/CapturePromotion.cpp
index 6bcf31a..f8b8054 100644
--- a/lib/SILOptimizer/IPO/CapturePromotion.cpp
+++ b/lib/SILOptimizer/IPO/CapturePromotion.cpp
@@ -534,7 +534,7 @@
       Inst->getFunction()->hasUnqualifiedOwnership() &&
       "Should not see strong release in a function with qualified ownership");
   SILValue Operand = Inst->getOperand();
-  if (SILArgument *A = dyn_cast<SILArgument>(Operand)) {
+  if (auto *A = dyn_cast<SILArgument>(Operand)) {
     auto I = BoxArgumentMap.find(A);
     if (I != BoxArgumentMap.end()) {
       // Releases of the box arguments get replaced with ReleaseValue of the new
@@ -556,7 +556,7 @@
 /// normally.
 void ClosureCloner::visitDestroyValueInst(DestroyValueInst *Inst) {
   SILValue Operand = Inst->getOperand();
-  if (SILArgument *A = dyn_cast<SILArgument>(Operand)) {
+  if (auto *A = dyn_cast<SILArgument>(Operand)) {
     auto I = BoxArgumentMap.find(A);
     if (I != BoxArgumentMap.end()) {
       // Releases of the box arguments get replaced with an end_borrow,
@@ -636,8 +636,8 @@
     // the loads get mapped to uses of the new object type argument.
     //
     // We assume that the value is already guaranteed.
-    assert(Val.getOwnershipKind() == ValueOwnershipKind::Guaranteed
-           && "Expected argument value to be guaranteed");
+    assert(Val.getOwnershipKind().isTrivialOr(ValueOwnershipKind::Guaranteed) &&
+           "Expected argument value to be guaranteed");
     ValueMap.insert(std::make_pair(LI, Val));
     return;
   }
@@ -678,8 +678,8 @@
     // struct_extract of the new passed in value. The value should be borrowed
     // already.
     SILBuilderWithPostProcess<ClosureCloner, 1> B(this, LI);
-    assert(B.getFunction().hasUnqualifiedOwnership()
-           || Val.getOwnershipKind() == ValueOwnershipKind::Guaranteed);
+    assert(B.getFunction().hasUnqualifiedOwnership() ||
+           Val.getOwnershipKind().isTrivialOr(ValueOwnershipKind::Guaranteed));
     SILValue V =
         B.emitStructExtract(LI->getLoc(), Val, SEAI->getField(), LI->getType());
     ValueMap.insert(std::make_pair(LI, V));
@@ -1192,7 +1192,6 @@
   // closure.
   SILBuilderWithScope B(PAI);
   SILValue FnVal = B.createFunctionRef(PAI->getLoc(), ClonedFn);
-  SILType FnTy = FnVal->getType();
 
   // Populate the argument list for a new partial_apply instruction, taking into
   // consideration any captures.
@@ -1237,12 +1236,10 @@
     ++NumCapturesPromoted;
   }
 
-  auto SubstFnTy = FnTy.substGenericArgs(M, PAI->getSubstitutions());
-
   // Create a new partial apply with the new arguments.
-  auto *NewPAI = B.createPartialApply(PAI->getLoc(), FnVal, SubstFnTy,
-                                      PAI->getSubstitutions(), Args,
-                                      PAI->getType());
+  auto *NewPAI = B.createPartialApply(
+      PAI->getLoc(), FnVal, PAI->getSubstitutions(), Args,
+      PAI->getType().getAs<SILFunctionType>()->getCalleeConvention());
   PAI->replaceAllUsesWith(NewPAI);
   PAI->eraseFromParent();
   if (FRI->use_empty()) {
diff --git a/lib/SILOptimizer/IPO/CapturePropagation.cpp b/lib/SILOptimizer/IPO/CapturePropagation.cpp
index 5e07e1d..489dc85 100644
--- a/lib/SILOptimizer/IPO/CapturePropagation.cpp
+++ b/lib/SILOptimizer/IPO/CapturePropagation.cpp
@@ -379,7 +379,7 @@
           return nullptr;
       }
 
-      if (TryApplyInst *TAI = dyn_cast<TryApplyInst>(&I)) {
+      if (auto *TAI = dyn_cast<TryApplyInst>(&I)) {
         // Check the normal and throw blocks of the try_apply.
         if (onlyContainsReturnOrThrowOfArg(TAI->getNormalBB()) &&
             onlyContainsReturnOrThrowOfArg(TAI->getErrorBB()))
@@ -488,7 +488,7 @@
     while (I != BB.end()) {
       SILInstruction *Inst = &*I;
       ++I;
-      if (PartialApplyInst *PAI = dyn_cast<PartialApplyInst>(Inst))
+      if (auto *PAI = dyn_cast<PartialApplyInst>(Inst))
         HasChanged |= optimizePartialApply(PAI);
     }
   }
diff --git a/lib/SILOptimizer/IPO/ClosureSpecializer.cpp b/lib/SILOptimizer/IPO/ClosureSpecializer.cpp
index 51bde88..9ccab94 100644
--- a/lib/SILOptimizer/IPO/ClosureSpecializer.cpp
+++ b/lib/SILOptimizer/IPO/ClosureSpecializer.cpp
@@ -190,8 +190,11 @@
   createNewClosure(SILBuilder &B, SILValue V,
                    llvm::SmallVectorImpl<SILValue> &Args) const {
     if (isa<PartialApplyInst>(getClosure()))
-      return B.createPartialApply(getClosure()->getLoc(), V, V->getType(), {},
-                                  Args, getClosure()->getType());
+      return B.createPartialApply(getClosure()->getLoc(), V, {}, Args,
+                                  getClosure()
+                                      ->getType()
+                                      .getAs<SILFunctionType>()
+                                      ->getCalleeConvention());
 
     assert(isa<ThinToThickFunctionInst>(getClosure()) &&
            "We only support partial_apply and thin_to_thick_function");
@@ -348,15 +351,11 @@
     }
   }
 
-  SILType LoweredType = NewF->getLoweredType();
-  auto loweredConv = NewF->getConventions();
-  SILType ResultType = loweredConv.getSILResultType();
   Builder.setInsertionPoint(AI.getInstruction());
   FullApplySite NewAI;
   if (auto *TAI = dyn_cast<TryApplyInst>(AI)) {
-    NewAI = Builder.createTryApply(AI.getLoc(), FRI, LoweredType,
-                                   SubstitutionList(),
-                                   NewArgs,
+    NewAI = Builder.createTryApply(AI.getLoc(), FRI,
+                                   SubstitutionList(), NewArgs,
                                    TAI->getNormalBB(), TAI->getErrorBB());
     // If we passed in the original closure as @owned, then insert a release
     // right after NewAI. This is to balance the +1 from being an @owned
@@ -369,8 +368,8 @@
       Builder.setInsertionPoint(AI.getInstruction());
     }
   } else {
-    NewAI = Builder.createApply(AI.getLoc(), FRI, LoweredType,
-                                ResultType, SubstitutionList(),
+    NewAI = Builder.createApply(AI.getLoc(), FRI,
+                                SubstitutionList(),
                                 NewArgs, cast<ApplyInst>(AI)->isNonThrowing());
     // If we passed in the original closure as @owned, then insert a release
     // right after NewAI. This is to balance the +1 from being an @owned
diff --git a/lib/SILOptimizer/IPO/DeadFunctionElimination.cpp b/lib/SILOptimizer/IPO/DeadFunctionElimination.cpp
index a55a8ef..825b403 100644
--- a/lib/SILOptimizer/IPO/DeadFunctionElimination.cpp
+++ b/lib/SILOptimizer/IPO/DeadFunctionElimination.cpp
@@ -192,6 +192,46 @@
 
   }
   
+  /// Marks the declarations referenced by a key path pattern as alive if they
+  /// aren't yet.
+  void ensureKeyPathComponentsAreAlive(KeyPathPattern *KP) {
+    for (auto &component : KP->getComponents()) {
+      switch (component.getKind()) {
+      case KeyPathPatternComponent::Kind::SettableProperty:
+        ensureAlive(component.getComputedPropertySetter());
+        LLVM_FALLTHROUGH;
+      case KeyPathPatternComponent::Kind::GettableProperty: {
+        ensureAlive(component.getComputedPropertyGetter());
+        auto id = component.getComputedPropertyId();
+        switch (id.getKind()) {
+        case KeyPathPatternComponent::ComputedPropertyId::DeclRef: {
+          auto decl = cast<AbstractFunctionDecl>(id.getDeclRef().getDecl());
+          if (auto clas = dyn_cast<ClassDecl>(decl->getDeclContext())) {
+            ensureAliveClassMethod(getMethodInfo(decl, /*witness*/ false),
+                                   dyn_cast<FuncDecl>(decl),
+                                   clas);
+          } else if (auto proto =
+                       dyn_cast<ProtocolDecl>(decl->getDeclContext())) {
+            ensureAliveProtocolMethod(getMethodInfo(decl, /*witness*/ true));
+          } else {
+            llvm_unreachable("key path keyed by a non-class, non-protocol method");
+          }
+          break;
+        }
+        case KeyPathPatternComponent::ComputedPropertyId::Function:
+          ensureAlive(id.getFunction());
+          break;
+        case KeyPathPatternComponent::ComputedPropertyId::Property:
+          break;
+        }
+        continue;
+      }
+      case KeyPathPatternComponent::Kind::StoredProperty:
+        continue;
+      }
+    }
+  }
+  
   /// Marks a function as alive if it is not alive yet.
   void ensureAlive(SILFunction *F) {
     if (!isAlive(F))
@@ -313,6 +353,8 @@
           ensureAliveClassMethod(mi, dyn_cast<FuncDecl>(funcDecl), MethodCl);
         } else if (auto *FRI = dyn_cast<FunctionRefInst>(&I)) {
           ensureAlive(FRI->getReferencedFunction());
+        } else if (auto *KPI = dyn_cast<KeyPathInst>(&I)) {
+          ensureKeyPathComponentsAreAlive(KPI->getPattern());
         }
       }
     }
diff --git a/lib/SILOptimizer/IPO/EagerSpecializer.cpp b/lib/SILOptimizer/IPO/EagerSpecializer.cpp
index 468ea80..1575e26 100644
--- a/lib/SILOptimizer/IPO/EagerSpecializer.cpp
+++ b/lib/SILOptimizer/IPO/EagerSpecializer.cpp
@@ -163,13 +163,7 @@
   SILBasicBlock *ErrorBB = F.createBasicBlock();
   SILBasicBlock *NormalBB = F.createBasicBlock();
 
-  Builder.createTryApply(Loc,
-                         FuncRef,
-                         SILType::getPrimitiveObjectType(CanSILFuncTy),
-                         Subs,
-                         CallArgs,
-                         NormalBB,
-                         ErrorBB);
+  Builder.createTryApply(Loc, FuncRef, Subs, CallArgs, NormalBB, ErrorBB);
 
   {
     // Emit the rethrow logic.
@@ -261,7 +255,6 @@
   if (!CanSILFuncTy->hasErrorResult() ||
       CalleeFunc->findThrowBB() == CalleeFunc->end()) {
     return Builder.createApply(CalleeFunc->getLocation(), FuncRefInst,
-                               CalleeSILSubstFnTy, fnConv.getSILResultType(),
                                Subs, CallArgs, isNonThrowing);
   }
 
@@ -570,14 +563,8 @@
   Builder.emitBlock(IsClassCheckBB);
 
   auto *FRI = Builder.createFunctionRef(Loc, IsClassF);
-  auto CanFnTy = IsClassF->getLoweredFunctionType()->substGenericArgs(
-      Builder.getModule(), {Sub});
-  auto SILFnTy = SILType::getPrimitiveObjectType(CanFnTy);
-  SILFunctionConventions fnConv(CanFnTy, Builder.getModule());
-  auto SILResultTy = fnConv.getSILResultType();
-  auto IsClassRuntimeCheck =
-      Builder.createApply(Loc, FRI, SILFnTy, SILResultTy, {Sub}, {GenericMT},
-                          /* isNonThrowing */ false);
+  auto IsClassRuntimeCheck = Builder.createApply(Loc, FRI, {Sub}, {GenericMT},
+                                                 /* isNonThrowing */ false);
   // Extract the i1 from the Bool struct.
   StructDecl *BoolStruct = cast<StructDecl>(Ctx.getBoolDecl());
   auto Members = BoolStruct->lookupDirect(Ctx.Id_value_);
diff --git a/lib/SILOptimizer/IPO/GlobalOpt.cpp b/lib/SILOptimizer/IPO/GlobalOpt.cpp
index 1bc9693..ab2b3a6 100644
--- a/lib/SILOptimizer/IPO/GlobalOpt.cpp
+++ b/lib/SILOptimizer/IPO/GlobalOpt.cpp
@@ -176,7 +176,7 @@
       ATPI->eraseFromParent();
   }
 
-  if (GlobalAddrInst *GAI = dyn_cast<GlobalAddrInst>(Op)) {
+  if (auto *GAI = dyn_cast<GlobalAddrInst>(Op)) {
     auto *Global = GAI->getReferencedGlobal();
     // If "global_addr token" is used more than one time, bail.
     if (!(GAI->use_empty() || GAI->hasOneUse()))
@@ -256,7 +256,7 @@
       I.eraseFromParent();
       continue;
     }
-    if (StoreInst *SI = dyn_cast<StoreInst>(&I)) {
+    if (auto *SI = dyn_cast<StoreInst>(&I)) {
       Val = SI->getSrc();
       SILBuilderWithScope B(SI);
       B.createReturn(SI->getLoc(), Val);
@@ -348,11 +348,11 @@
 /// Returns true if the block \p BB is terminated with a cond_br based on an
 /// availability check.
 static bool isAvailabilityCheck(SILBasicBlock *BB) {
-  CondBranchInst *CBR = dyn_cast<CondBranchInst>(BB->getTerminator());
+  auto *CBR = dyn_cast<CondBranchInst>(BB->getTerminator());
   if (!CBR)
     return false;
   
-  ApplyInst *AI = dyn_cast<ApplyInst>(CBR->getCondition());
+  auto *AI = dyn_cast<ApplyInst>(CBR->getCondition());
   if (!AI)
     return false;
 
@@ -511,13 +511,13 @@
       continue;
     }
 
-    if (StoreInst *SI = dyn_cast<StoreInst>(&I)) {
+    if (auto *SI = dyn_cast<StoreInst>(&I)) {
       Val = SI->getSrc();
       Store = SI;
       continue;
     }
 
-    if (ReturnInst *RI = dyn_cast<ReturnInst>(&I)) {
+    if (auto *RI = dyn_cast<ReturnInst>(&I)) {
       SILBuilderWithScope B(RI);
       B.createReturn(RI->getLoc(), Val);
       eraseUsesOfInstruction(RI);
@@ -542,7 +542,7 @@
   SILBasicBlock *BB = &AddrF->front();
   for (auto &I : *BB) {
     // Find the builtin "once" call.
-    if (BuiltinInst *BI = dyn_cast<BuiltinInst>(&I)) {
+    if (auto *BI = dyn_cast<BuiltinInst>(&I)) {
       const BuiltinInfo &Builtin = Module->getBuiltinInfo(BI->getName());
       if (Builtin.ID != BuiltinValueKind::Once)
         continue;
@@ -895,12 +895,12 @@
     for (auto &BB : F) {
       bool IsCold = ColdBlocks.isCold(&BB);
       for (auto &I : BB)
-        if (BuiltinInst *BI = dyn_cast<BuiltinInst>(&I)) {
+        if (auto *BI = dyn_cast<BuiltinInst>(&I)) {
           collectOnceCall(BI);
-        } else if (ApplyInst *AI = dyn_cast<ApplyInst>(&I)) {
+        } else if (auto *AI = dyn_cast<ApplyInst>(&I)) {
           if (!IsCold)
             collectGlobalInitCall(AI);
-        } else if (GlobalAddrInst *GAI = dyn_cast<GlobalAddrInst>(&I)) {
+        } else if (auto *GAI = dyn_cast<GlobalAddrInst>(&I)) {
             collectGlobalAccess(GAI);
         }
     }
diff --git a/lib/SILOptimizer/IPO/GlobalPropertyOpt.cpp b/lib/SILOptimizer/IPO/GlobalPropertyOpt.cpp
index 26f42a5..ae65283 100644
--- a/lib/SILOptimizer/IPO/GlobalPropertyOpt.cpp
+++ b/lib/SILOptimizer/IPO/GlobalPropertyOpt.cpp
@@ -122,7 +122,7 @@
   /// Returns true if the type is a tuple which contains at least one array
   /// (we don't check for arrays in nested tuples).
   bool isTupleWithArray(CanType type) {
-    if (TupleType *tuple = dyn_cast<TupleType>(type)) {
+    if (auto tuple = dyn_cast<TupleType>(type)) {
       for (Type subType : tuple->getElementTypes()) {
         if (CanType(subType).getNominalOrBoundGenericNominal() == ArrayType)
           return true;
@@ -286,7 +286,7 @@
 
 /// Scan an instruction and build dependencies for it.
 void GlobalPropertyOpt::scanInstruction(swift::SILInstruction *Inst) {
-  if (ApplyInst *AI = dyn_cast<ApplyInst>(Inst)) {
+  if (auto *AI = dyn_cast<ApplyInst>(Inst)) {
     ArraySemanticsCall semCall(AI);
     switch (semCall.getKind()) {
       case ArrayCallKind::kArrayInit:
@@ -305,7 +305,7 @@
       default:
         break;
     }
-  } else if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) {
+  } else if (auto *LI = dyn_cast<LoadInst>(Inst)) {
     if (isArrayType(LI->getType())) {
       // Add a dependency from the value at the address to the loaded value.
       SILValue loadAddr = LI->getOperand();
@@ -313,7 +313,7 @@
       addDependency(getAddrEntry(loadAddr), getValueEntry(LI));
       return;
     }
-  } else if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
+  } else if (auto *SI = dyn_cast<StoreInst>(Inst)) {
     SILValue src = SI->getSrc();
     if (isArrayType(src->getType())) {
       // Add a dependency from the operand to the value at the store-address.
@@ -332,21 +332,21 @@
       }
       return;
     }
-  } else if (StructExtractInst *SEI = dyn_cast<StructExtractInst>(Inst)) {
+  } else if (auto *SEI = dyn_cast<StructExtractInst>(Inst)) {
     if (isArrayType(SEI->getType())) {
       // Add a dependency from the field to the extracted value.
       VarDecl *Field = SEI->getField();
       addDependency(getFieldEntry(Field), getValueEntry(SEI));
       return;
     }
-  } else if (TupleExtractInst *TEI = dyn_cast<TupleExtractInst>(Inst)) {
+  } else if (auto *TEI = dyn_cast<TupleExtractInst>(Inst)) {
     if (isArrayType(TEI->getType())) {
       // Add a dependency from the tuple itself to the extracted element.
       SILValue tuple = TEI->getOperand();
       addDependency(getValueEntry(tuple), getValueEntry(TEI));
       return;
     }
-  } else if (TupleInst *TI = dyn_cast<TupleInst>(Inst)) {
+  } else if (auto *TI = dyn_cast<TupleInst>(Inst)) {
     if (isTupleWithArray(TI->getType().getSwiftRValueType())) {
       // Add dependencies from array elements to the tuple itself.
       for (Operand &Op : TI->getAllOperands()) {
@@ -357,7 +357,7 @@
       }
       return;
     }
-  } else if (StructInst *SI = dyn_cast<StructInst>(Inst)) {
+  } else if (auto *SI = dyn_cast<StructInst>(Inst)) {
     // Add dependencies from the array operands to the struct array-fields.
     StructDecl *S = SI->getStructDecl();
     NominalTypeDecl::StoredPropertyRange Range = S->getStoredProperties();
@@ -404,9 +404,9 @@
             hasPreds = true;
             auto *Term = Pred->getTerminator();
             SILValue PredArg;
-            if (BranchInst *BI = dyn_cast<BranchInst>(Term)) {
+            if (auto *BI = dyn_cast<BranchInst>(Term)) {
               PredArg = BI->getArg(argIdx);
-            } else if (CondBranchInst *CBI = dyn_cast<CondBranchInst>(Term)) {
+            } else if (auto *CBI = dyn_cast<CondBranchInst>(Term)) {
               PredArg = CBI->getArgForDestBB(&BB, BBArg);
             }
             if (PredArg) {
diff --git a/lib/SILOptimizer/LoopTransforms/ArrayBoundsCheckOpts.cpp b/lib/SILOptimizer/LoopTransforms/ArrayBoundsCheckOpts.cpp
index 6a325b5..a53289c 100644
--- a/lib/SILOptimizer/LoopTransforms/ArrayBoundsCheckOpts.cpp
+++ b/lib/SILOptimizer/LoopTransforms/ArrayBoundsCheckOpts.cpp
@@ -620,7 +620,7 @@
 /// loop is only executed if "Start < End".
 static bool isLessThanCheck(SILValue Start, SILValue End,
                             CondBranchInst *CondBr, SILBasicBlock *Preheader) {
-  BuiltinInst *BI = dyn_cast<BuiltinInst>(CondBr->getCondition());
+  auto *BI = dyn_cast<BuiltinInst>(CondBr->getCondition());
   if (!BI)
     return false;
 
diff --git a/lib/SILOptimizer/LoopTransforms/COWArrayOpt.cpp b/lib/SILOptimizer/LoopTransforms/COWArrayOpt.cpp
index f2b129c..2909373 100644
--- a/lib/SILOptimizer/LoopTransforms/COWArrayOpt.cpp
+++ b/lib/SILOptimizer/LoopTransforms/COWArrayOpt.cpp
@@ -423,7 +423,7 @@
 /// store to the local's address. checkSafeArrayAddressUses will check that the
 /// store is a simple initialization outside the loop.
 bool COWArrayOpt::checkUniqueArrayContainer(SILValue ArrayContainer) {
-  if (SILArgument *Arg = dyn_cast<SILArgument>(ArrayContainer)) {
+  if (auto *Arg = dyn_cast<SILArgument>(ArrayContainer)) {
     // Check that the argument is passed as an inout type. This means there are
     // no aliases accessible within this function scope.
     auto Params = Function->getLoweredFunctionType()->getParameters();
@@ -1262,7 +1262,7 @@
       }
       // A store is only safe if it is to an array element and the element type
       // is trivial.
-      if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
+      if (auto *SI = dyn_cast<StoreInst>(Inst)) {
         if (!isArrayEltStore(SI) ||
             !SI->getSrc()->getType().isTrivial(Module)) {
           DEBUG(llvm::dbgs()
diff --git a/lib/SILOptimizer/LoopTransforms/LICM.cpp b/lib/SILOptimizer/LoopTransforms/LICM.cpp
index e3a3498..29bbf18 100644
--- a/lib/SILOptimizer/LoopTransforms/LICM.cpp
+++ b/lib/SILOptimizer/LoopTransforms/LICM.cpp
@@ -127,9 +127,9 @@
 /// Check if an address does not depend on other values in a basic block.
 static SILInstruction *addressIndependent(SILValue Addr) {
   Addr = stripCasts(Addr);
-  if (GlobalAddrInst *SGAI = dyn_cast<GlobalAddrInst>(Addr))
+  if (auto *SGAI = dyn_cast<GlobalAddrInst>(Addr))
     return SGAI;
-  if (StructElementAddrInst *SEAI = dyn_cast<StructElementAddrInst>(Addr))
+  if (auto *SEAI = dyn_cast<StructElementAddrInst>(Addr))
     return addressIndependent(SEAI->getOperand());
   return nullptr;
 }
diff --git a/lib/SILOptimizer/Mandatory/AccessEnforcementSelection.cpp b/lib/SILOptimizer/Mandatory/AccessEnforcementSelection.cpp
index a246b96..9c08837 100644
--- a/lib/SILOptimizer/Mandatory/AccessEnforcementSelection.cpp
+++ b/lib/SILOptimizer/Mandatory/AccessEnforcementSelection.cpp
@@ -85,6 +85,10 @@
   void analyzeUsesOfBox(SILInstruction *source);
   void analyzeProjection(ProjectBoxInst *projection);
 
+  /// Note that the given instruction is a use of the box (or a use of
+  /// a projection from it) in which the address escapes.
+  void noteEscapingUse(SILInstruction *inst);
+
   void propagateEscapes();
   void propagateEscapesFrom(SILBasicBlock *bb);
 
@@ -137,20 +141,7 @@
       continue;
 
     // Treat everything else as an escape:
-
-    // Add it to the escapes set.
-    Escapes.insert(user);
-
-    // Record this point as escaping.
-    auto userBB = user->getParent();
-    auto &state = StateMap[userBB];
-    if (!state.IsInWorklist) {
-      state.HasEscape = true;
-      state.IsInWorklist = true;
-      Worklist.push_back(userBB);
-    }
-    assert(state.HasEscape);
-    assert(state.IsInWorklist);
+    noteEscapingUse(user);
   }
 
   assert(!Accesses.empty() && "didn't find original access!");
@@ -168,6 +159,22 @@
   }
 }
 
+void SelectEnforcement::noteEscapingUse(SILInstruction *inst) {
+  // Add it to the escapes set.
+  Escapes.insert(inst);
+
+  // Record this point as escaping.
+  auto userBB = inst->getParent();
+  auto &state = StateMap[userBB];
+  if (!state.IsInWorklist) {
+    state.HasEscape = true;
+    state.IsInWorklist = true;
+    Worklist.push_back(userBB);
+  }
+  assert(state.HasEscape);
+  assert(state.IsInWorklist);
+}
+
 void SelectEnforcement::propagateEscapes() {
   while (!Worklist.empty()) {
     auto bb = Worklist.pop_back_val();
@@ -362,19 +369,15 @@
     if (auto arg = dyn_cast<SILFunctionArgument>(address)) {
       switch (arg->getArgumentConvention()) {
       case SILArgumentConvention::Indirect_Inout:
+      case SILArgumentConvention::Indirect_InoutAliasable:
         // `inout` arguments are checked on the caller side, either statically
         // or dynamically if necessary. The @inout does not alias and cannot
         // escape within the callee, so static enforcement is always sufficient.
-        setStaticEnforcement(access);
-        break;
-      case SILArgumentConvention::Indirect_InoutAliasable:
-        // `inout_aliasable` are not enforced on the caller side. Dynamic
-        // enforcement is required unless we have special knowledge of how this
-        // closure is used at its call-site.
         //
-        // TODO: optimize closures passed to call sites in which the captured
-        // variable is not modified by any closure passed to the same call.
-        setDynamicEnforcement(access);
+        // FIXME: `inout_aliasable` are not currently enforced on the caller
+        // side. Consequently, using static enforcement for noescape closures
+        // may fails to diagnose certain violations.
+        setStaticEnforcement(access);
         break;
       default:
         // @in/@in_guaranteed cannot be mutably accessed, mutably captured, or
diff --git a/lib/SILOptimizer/Mandatory/AddressLowering.cpp b/lib/SILOptimizer/Mandatory/AddressLowering.cpp
index cb338b6..89d186c 100644
--- a/lib/SILOptimizer/Mandatory/AddressLowering.cpp
+++ b/lib/SILOptimizer/Mandatory/AddressLowering.cpp
@@ -562,7 +562,7 @@
     // TODO: Handle block arguments.
     // TODO: Handle subobjects with a single composition, and other non-mutating
     // uses such as @in arguments.
-    if (SILInstruction *def = dyn_cast<SILInstruction>(value)) {
+    if (auto *def = dyn_cast<SILInstruction>(value)) {
       Operand *useOper = *value->use_begin();
       if (canProjectFrom(def, useOper->getUser())) {
         storage.setComposedOperand(useOper);
@@ -965,9 +965,9 @@
   switch (origCallInst->getKind()) {
   case ValueKind::ApplyInst:
     newCallInst = callBuilder.createApply(
-        loc, apply.getCallee(), apply.getSubstCalleeSILType(),
-        loweredCalleeConv.getSILResultType(), apply.getSubstitutions(),
-        newCallArgs, cast<ApplyInst>(origCallInst)->isNonThrowing());
+        loc, apply.getCallee(), apply.getSubstitutions(), newCallArgs,
+        cast<ApplyInst>(origCallInst)->isNonThrowing(),
+        SILModuleConventions::getLoweredAddressConventions());
     break;
   case ValueKind::TryApplyInst:
     // TODO: insert dealloc in the catch block.
diff --git a/lib/SILOptimizer/Mandatory/DataflowDiagnostics.cpp b/lib/SILOptimizer/Mandatory/DataflowDiagnostics.cpp
index bf7d181..48ddf16 100644
--- a/lib/SILOptimizer/Mandatory/DataflowDiagnostics.cpp
+++ b/lib/SILOptimizer/Mandatory/DataflowDiagnostics.cpp
@@ -102,7 +102,7 @@
 
       // Report diagnostic if the first argument has been folded to '1'.
       OperandValueArrayRef Args = BI->getArguments();
-      IntegerLiteralInst *V = dyn_cast<IntegerLiteralInst>(Args[0]);
+      auto *V = dyn_cast<IntegerLiteralInst>(Args[0]);
       if (!V || V->getValue() != 1)
         return;
 
diff --git a/lib/SILOptimizer/Mandatory/DefiniteInitialization.cpp b/lib/SILOptimizer/Mandatory/DefiniteInitialization.cpp
index b945016..e88c69e 100644
--- a/lib/SILOptimizer/Mandatory/DefiniteInitialization.cpp
+++ b/lib/SILOptimizer/Mandatory/DefiniteInitialization.cpp
@@ -28,7 +28,6 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/Debug.h"
-#include "llvm/Support/CommandLine.h"
 
 #ifdef SWIFT_SILOPTIMIZER_PASSMANAGER_DIMEMORYUSECOLLECTOR_H
 #error "Included non ownership header?!"
@@ -891,10 +890,10 @@
   // If this is an OpenExistentialAddrInst in preparation for applying
   // a witness method, analyze its use to make sure, that no mutation of
   // lvalue let constants occurs.
-  auto* OEAI = dyn_cast<OpenExistentialAddrInst>(LoadInst);
+  auto *OEAI = dyn_cast<OpenExistentialAddrInst>(LoadInst);
   if (OEAI != nullptr && TheMemory.isElementLetProperty(Use.FirstElement)) {
     for (auto OEAUse : OEAI->getUses()) {
-      auto* AI = dyn_cast<ApplyInst>(OEAUse->getUser());
+      auto *AI = dyn_cast<ApplyInst>(OEAUse->getUser());
 
       if (AI == nullptr)
         // User is not an ApplyInst
diff --git a/lib/SILOptimizer/Mandatory/DiagnoseStaticExclusivity.cpp b/lib/SILOptimizer/Mandatory/DiagnoseStaticExclusivity.cpp
index 6af76bc..1289984 100644
--- a/lib/SILOptimizer/Mandatory/DiagnoseStaticExclusivity.cpp
+++ b/lib/SILOptimizer/Mandatory/DiagnoseStaticExclusivity.cpp
@@ -230,7 +230,8 @@
 
 /// Indicates whether a 'begin_access' requires exclusive access
 /// or allows shared access. This needs to be kept in sync with
-/// diag::exclusivity_access_required and diag::exclusivity_conflicting_access.
+/// diag::exclusivity_access_required, exclusivity_access_required_swift3,
+/// and diag::exclusivity_conflicting_access.
 enum class ExclusiveOrShared_t : unsigned {
   ExclusiveAccess = 0,
   SharedAccess = 1
@@ -382,15 +383,22 @@
     AccessForMainDiagnostic->getLoc().getSourceRange();
 
   if (const ValueDecl *VD = Storage.getStorageDecl()) {
+    // We have a declaration, so mention the identifier in the diagnostic.
+    auto DiagnosticID = (Ctx.LangOpts.isSwiftVersion3() ?
+                         diag::exclusivity_access_required_swift3 :
+                         diag::exclusivity_access_required);
     diagnose(Ctx, AccessForMainDiagnostic->getLoc().getSourceLoc(),
-             diag::exclusivity_access_required,
+             DiagnosticID,
              VD->getDescriptiveKind(),
              VD->getName(),
              static_cast<unsigned>(AccessForMainDiagnostic->getAccessKind()))
         .highlight(rangeForMain);
   } else {
+    auto DiagnosticID = (Ctx.LangOpts.isSwiftVersion3() ?
+                         diag::exclusivity_access_required_unknown_decl_swift3 :
+                         diag::exclusivity_access_required_unknown_decl);
     diagnose(Ctx, AccessForMainDiagnostic->getLoc().getSourceLoc(),
-             diag::exclusivity_access_required_unknown_decl,
+             DiagnosticID,
              static_cast<unsigned>(AccessForMainDiagnostic->getAccessKind()))
         .highlight(rangeForMain);
   }
diff --git a/lib/SILOptimizer/Mandatory/DiagnoseUnreachable.cpp b/lib/SILOptimizer/Mandatory/DiagnoseUnreachable.cpp
index f79f1db..3afefba 100644
--- a/lib/SILOptimizer/Mandatory/DiagnoseUnreachable.cpp
+++ b/lib/SILOptimizer/Mandatory/DiagnoseUnreachable.cpp
@@ -190,9 +190,9 @@
   TermInst *TI = BB.getTerminator();
 
   // Process conditional branches with constant conditions.
-  if (CondBranchInst *CBI = dyn_cast<CondBranchInst>(TI)) {
+  if (auto *CBI = dyn_cast<CondBranchInst>(TI)) {
     SILValue V = CBI->getCondition();
-    SILInstruction *CondI = dyn_cast<SILInstruction>(V);
+    auto *CondI = dyn_cast<SILInstruction>(V);
     SILLocation Loc = CBI->getLoc();
 
     if (IntegerLiteralInst *ConstCond =
@@ -249,8 +249,8 @@
   //                            case #Bool.false!unionelt: bb2
   // =>
   //   br bb2
-  if (SwitchEnumInst *SUI = dyn_cast<SwitchEnumInst>(TI)) {
-    if (EnumInst *TheEnum = dyn_cast<EnumInst>(SUI->getOperand())) {
+  if (auto *SUI = dyn_cast<SwitchEnumInst>(TI)) {
+    if (auto *TheEnum = dyn_cast<EnumInst>(SUI->getOperand())) {
       const EnumElementDecl *TheEnumElem = TheEnum->getElement();
       SILBasicBlock *TheSuccessorBlock = nullptr;
       int ReachableBlockIdx = -1;
@@ -334,7 +334,7 @@
   //   switch_value %1 : $Builtin.Int64, case 1: bb1, case 2: bb2
   // =>
   //   br bb2
-  if (SwitchValueInst *SUI = dyn_cast<SwitchValueInst>(TI)) {
+  if (auto *SUI = dyn_cast<SwitchValueInst>(TI)) {
     if (IntegerLiteralInst *SwitchVal =
           dyn_cast<IntegerLiteralInst>(SUI->getOperand())) {
       SILBasicBlock *TheSuccessorBlock = nullptr;
diff --git a/lib/SILOptimizer/Mandatory/MandatoryInlining.cpp b/lib/SILOptimizer/Mandatory/MandatoryInlining.cpp
index 0dcd8fc..9688143 100644
--- a/lib/SILOptimizer/Mandatory/MandatoryInlining.cpp
+++ b/lib/SILOptimizer/Mandatory/MandatoryInlining.cpp
@@ -110,7 +110,7 @@
                    ArrayRef<SILValue> FullArgs) {
   SmallVector<SILInstruction*, 16> InstsToDelete;
   for (SILValue V : FullArgs) {
-    if (SILInstruction *I = dyn_cast<SILInstruction>(V))
+    if (auto *I = dyn_cast<SILInstruction>(V))
       if (I != CalleeValue &&
           isInstructionTriviallyDead(I))
         InstsToDelete.push_back(I);
@@ -118,7 +118,7 @@
   recursivelyDeleteTriviallyDeadInstructions(InstsToDelete, true);
 
   // Handle the case where the callee of the apply is a load instruction.
-  if (LoadInst *LI = dyn_cast<LoadInst>(CalleeValue)) {
+  if (auto *LI = dyn_cast<LoadInst>(CalleeValue)) {
     auto *PBI = cast<ProjectBoxInst>(LI->getOperand());
     auto *ABI = cast<AllocBoxInst>(PBI->getOperand());
 
@@ -133,15 +133,23 @@
     for (Operand *ABIUse : ABI->getUses()) {
       if (SRI == nullptr && isa<StrongReleaseInst>(ABIUse->getUser())) {
         SRI = cast<StrongReleaseInst>(ABIUse->getUser());
-      } else if (ABIUse->getUser() != PBI)
-        return;
+        continue;
+      }
+
+      if (ABIUse->getUser() == PBI)
+        continue;
+
+      return;
     }
+
     StoreInst *SI = nullptr;
     for (Operand *PBIUse : PBI->getUses()) {
       if (SI == nullptr && isa<StoreInst>(PBIUse->getUser())) {
         SI = cast<StoreInst>(PBIUse->getUser());
-      } else
-        return;
+        continue;
+      }
+
+      return;
     }
 
     // If we found a store, record its source and erase it.
@@ -183,7 +191,7 @@
     CalleeValue = Callee;
   }
 
-  if (FunctionRefInst *FRI = dyn_cast<FunctionRefInst>(CalleeValue)) {
+  if (auto *FRI = dyn_cast<FunctionRefInst>(CalleeValue)) {
     if (!FRI->use_empty())
       return;
     FRI->eraseFromParent();
@@ -213,7 +221,7 @@
     FullArgs.push_back(Arg);
   SILValue CalleeValue = AI.getCallee();
 
-  if (LoadInst *LI = dyn_cast<LoadInst>(CalleeValue)) {
+  if (auto *LI = dyn_cast<LoadInst>(CalleeValue)) {
     // Conservatively only see through alloc_box; we assume this pass is run
     // immediately after SILGen
     auto *PBI = dyn_cast<ProjectBoxInst>(LI->getOperand());
@@ -274,7 +282,7 @@
     IsThick = true;
   }
 
-  FunctionRefInst *FRI = dyn_cast<FunctionRefInst>(CalleeValue);
+  auto *FRI = dyn_cast<FunctionRefInst>(CalleeValue);
 
   if (!FRI)
     return nullptr;
diff --git a/lib/SILOptimizer/PassManager/PassPipeline.cpp b/lib/SILOptimizer/PassManager/PassPipeline.cpp
index 43b07f2..7b577d4 100644
--- a/lib/SILOptimizer/PassManager/PassPipeline.cpp
+++ b/lib/SILOptimizer/PassManager/PassPipeline.cpp
@@ -437,7 +437,7 @@
   // Hoist generic alloc_stack instructions to the entry block to enable better
   // llvm-ir generation for dynamic alloca instructions.
   P.addAllocStackHoisting();
-  P.addLoadableByAddress();
+  //P.addLoadableByAddress();
 }
 
 SILPassPipelinePlan SILPassPipelinePlan::getIRGenPreparePassPipeline() {
diff --git a/lib/SILOptimizer/SILCombiner/SILCombine.cpp b/lib/SILOptimizer/SILCombiner/SILCombine.cpp
index 769046c..0df5c69 100644
--- a/lib/SILOptimizer/SILCombiner/SILCombine.cpp
+++ b/lib/SILOptimizer/SILCombiner/SILCombine.cpp
@@ -294,7 +294,7 @@
   // use counts.
   if (I.getNumOperands() < 8 && AddOperandsToWorklist) {
     for (auto &OpI : I.getAllOperands()) {
-      if (SILInstruction *Op = llvm::dyn_cast<SILInstruction>(&*OpI.get())) {
+      if (auto *Op = llvm::dyn_cast<SILInstruction>(&*OpI.get())) {
         DEBUG(llvm::dbgs() << "SC: add op " << *Op <<
               " from erased inst to worklist\n");
         Worklist.add(Op);
diff --git a/lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp b/lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp
index 5b92711..99788a0 100644
--- a/lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp
+++ b/lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp
@@ -297,8 +297,6 @@
   }
 
   auto Callee = PAI->getCallee();
-  auto FnType = PAI->getSubstCalleeSILType();
-  SILType ResultTy = PAI->getSubstCalleeConv().getSILResultType();
   SubstitutionList Subs = PAI->getSubstitutions();
 
   // The partial_apply might be substituting in an open existential type.
@@ -306,13 +304,11 @@
 
   FullApplySite NAI;
   if (auto *TAI = dyn_cast<TryApplyInst>(AI))
-    NAI =
-      Builder.createTryApply(AI.getLoc(), Callee, FnType, Subs, Args,
-                              TAI->getNormalBB(), TAI->getErrorBB());
+    NAI = Builder.createTryApply(AI.getLoc(), Callee, Subs, Args,
+                                 TAI->getNormalBB(), TAI->getErrorBB());
   else
-    NAI =
-      Builder.createApply(AI.getLoc(), Callee, FnType, ResultTy, Subs, Args,
-                          cast<ApplyInst>(AI)->isNonThrowing());
+    NAI = Builder.createApply(AI.getLoc(), Callee, Subs, Args,
+                              cast<ApplyInst>(AI)->isNonThrowing());
 
   // We also need to release the partial_apply instruction itself because it
   // is consumed by the apply_instruction.
@@ -399,7 +395,7 @@
                                                 ConvertFunctionInst *CFI) {
   // We only handle simplification of static function references. If we don't
   // have one, bail.
-  FunctionRefInst *FRI = dyn_cast<FunctionRefInst>(CFI->getOperand());
+  auto *FRI = dyn_cast<FunctionRefInst>(CFI->getOperand());
   if (!FRI)
     return nullptr;
 
@@ -450,17 +446,15 @@
     }
   }
 
-  SILType CCSILTy = SILType::getPrimitiveObjectType(ConvertCalleeTy);
   // Create the new apply inst.
   SILInstruction *NAI;
   if (auto *TAI = dyn_cast<TryApplyInst>(AI))
-    NAI = Builder.createTryApply(AI.getLoc(), FRI, CCSILTy,
+    NAI = Builder.createTryApply(AI.getLoc(), FRI, 
                                  SubstitutionList(), Args,
                                  TAI->getNormalBB(), TAI->getErrorBB());
   else
-    NAI = Builder.createApply(
-        AI.getLoc(), FRI, CCSILTy, convertConventions.getSILResultType(),
-        SubstitutionList(), Args, cast<ApplyInst>(AI)->isNonThrowing());
+    NAI = Builder.createApply(AI.getLoc(), FRI, SubstitutionList(), Args,
+                              cast<ApplyInst>(AI)->isNonThrowing());
   return NAI;
 }
 
@@ -734,15 +728,11 @@
   Builder.addOpenedArchetypeOperands(AI.getInstruction());
 
   if (auto *TAI = dyn_cast<TryApplyInst>(AI))
-    NewAI = Builder.createTryApply(AI.getLoc(), AI.getCallee(),
-                                    NewSubstCalleeType,
-                                    Substitutions, Args,
-                                    TAI->getNormalBB(), TAI->getErrorBB());
+    NewAI = Builder.createTryApply(AI.getLoc(), AI.getCallee(), Substitutions,
+                                   Args, TAI->getNormalBB(), TAI->getErrorBB());
   else
-    NewAI = Builder.createApply(AI.getLoc(), AI.getCallee(),
-                                 NewSubstCalleeType,
-                                 AI.getType(), Substitutions, Args,
-                                 cast<ApplyInst>(AI)->isNonThrowing());
+    NewAI = Builder.createApply(AI.getLoc(), AI.getCallee(), Substitutions,
+                                Args, cast<ApplyInst>(AI)->isNonThrowing());
 
   if (isa<ApplyInst>(NewAI))
     replaceInstUsesWith(*AI.getInstruction(), NewAI.getInstruction());
@@ -1179,10 +1169,8 @@
     }
     // The type of the substitution is the source type of the thin to thick
     // instruction.
-    SILType substTy = TTTFI->getOperand()->getType();
     Builder.addOpenedArchetypeOperands(AI);
     auto *NewAI = Builder.createApply(AI->getLoc(), TTTFI->getOperand(),
-                                      substTy, AI->getType(),
                                       AI->getSubstitutions(), Arguments,
                                       AI->isNonThrowing());
     return NewAI;
@@ -1312,9 +1300,7 @@
     }
     // The type of the substitution is the source type of the thin to thick
     // instruction.
-    SILType substTy = TTTFI->getOperand()->getType();
     auto *NewAI = Builder.createTryApply(AI->getLoc(), TTTFI->getOperand(),
-                                         substTy,
                                          AI->getSubstitutions(), Arguments,
                                          AI->getNormalBB(), AI->getErrorBB());
     return NewAI;
diff --git a/lib/SILOptimizer/SILCombiner/SILCombinerBuiltinVisitors.cpp b/lib/SILOptimizer/SILCombiner/SILCombinerBuiltinVisitors.cpp
index ec06da3..f4af320 100644
--- a/lib/SILOptimizer/SILCombiner/SILCombinerBuiltinVisitors.cpp
+++ b/lib/SILOptimizer/SILCombiner/SILCombinerBuiltinVisitors.cpp
@@ -245,7 +245,7 @@
 matchSizeOfMultiplication(SILValue I, MetatypeInst *RequiredType,
                           BuiltinInst *&TruncOrBitCast, SILValue &Ptr,
                           SILValue &Distance) {
-  IndexRawPointerInst *Res = dyn_cast<IndexRawPointerInst>(I);
+  auto *Res = dyn_cast<IndexRawPointerInst>(I);
   if (!Res)
     return nullptr;
 
diff --git a/lib/SILOptimizer/SILCombiner/SILCombinerMiscVisitors.cpp b/lib/SILOptimizer/SILCombiner/SILCombinerMiscVisitors.cpp
index 7233bde..09430a7 100644
--- a/lib/SILOptimizer/SILCombiner/SILCombinerMiscVisitors.cpp
+++ b/lib/SILOptimizer/SILCombiner/SILCombinerMiscVisitors.cpp
@@ -179,7 +179,7 @@
   SILBasicBlock *TrueBB = nullptr;
   for (unsigned Idx = 0, Num = SVI->getNumCases(); Idx < Num; ++Idx) {
     auto Case = SVI->getCase(Idx);
-    IntegerLiteralInst *CaseVal = dyn_cast<IntegerLiteralInst>(Case.first);
+    auto *CaseVal = dyn_cast<IntegerLiteralInst>(Case.first);
     if (!CaseVal)
       return nullptr;
     SILBasicBlock *DestBB = Case.second;
@@ -606,7 +606,7 @@
 
     // ...and the predecessor instruction is a release_value on the same value
     // as our retain_value...
-    if (ReleaseValueInst *Release = dyn_cast<ReleaseValueInst>(&*Pred))
+    if (auto *Release = dyn_cast<ReleaseValueInst>(&*Pred))
       // Remove them...
       if (Release->getOperand() == RVI->getOperand()) {
         eraseInstFromFunction(*Release);
@@ -694,7 +694,7 @@
 
     // ...and the predecessor instruction is a strong_release on the same value
     // as our strong_retain...
-    if (StrongReleaseInst *Release = dyn_cast<StrongReleaseInst>(&*Pred))
+    if (auto *Release = dyn_cast<StrongReleaseInst>(&*Pred))
       // Remove them...
       if (Release->getOperand() == SRI->getOperand()) {
         eraseInstFromFunction(*Release);
@@ -908,8 +908,8 @@
   if (!hasOneNonDebugUse(DataAddrInst))
     return nullptr;
 
-  StoreInst *SI = dyn_cast<StoreInst>(getSingleNonDebugUser(DataAddrInst));
-  ApplyInst *AI = dyn_cast<ApplyInst>(getSingleNonDebugUser(DataAddrInst));
+  auto *SI = dyn_cast<StoreInst>(getSingleNonDebugUser(DataAddrInst));
+  auto *AI = dyn_cast<ApplyInst>(getSingleNonDebugUser(DataAddrInst));
   if (!SI && !AI) {
     return nullptr;
   }
@@ -1346,7 +1346,7 @@
     MDVal = UC->getOperand();
 
   SILInstruction *NewInst = nullptr;
-  if (MetatypeInst *MI = dyn_cast<MetatypeInst>(MDVal)) {
+  if (auto *MI = dyn_cast<MetatypeInst>(MDVal)) {
     auto &Mod = ARDI->getModule();
     auto SILInstanceTy = MI->getType().getMetatypeInstanceType(Mod);
 
diff --git a/lib/SILOptimizer/Transforms/ARCCodeMotion.cpp b/lib/SILOptimizer/Transforms/ARCCodeMotion.cpp
index 7c041d4..9233d70 100644
--- a/lib/SILOptimizer/Transforms/ARCCodeMotion.cpp
+++ b/lib/SILOptimizer/Transforms/ARCCodeMotion.cpp
@@ -819,7 +819,7 @@
 
     // Handle SILArgument, SILArgument can invalidate.
     for (unsigned i = 0; i < RCRootVault.size(); ++i) {
-      SILArgument *A = dyn_cast<SILArgument>(RCRootVault[i]);
+      auto *A = dyn_cast<SILArgument>(RCRootVault[i]);
       if (!A || A->getParent() != BB)
         continue;
       InterestBlock = true;
@@ -986,7 +986,7 @@
     for (unsigned i = 0; i < RCRootVault.size(); ++i) {
       if (!S->BBSetOut[i]) 
         continue;
-      SILArgument *A = dyn_cast<SILArgument>(RCRootVault[i]);
+      auto *A = dyn_cast<SILArgument>(RCRootVault[i]);
       if (!A || A->getParent() != BB)
         continue;
       InsertPoints[RCRootVault[i]].push_back(&*BB->begin());
diff --git a/lib/SILOptimizer/Transforms/AllocBoxToStack.cpp b/lib/SILOptimizer/Transforms/AllocBoxToStack.cpp
index 306b02e..dee5158 100644
--- a/lib/SILOptimizer/Transforms/AllocBoxToStack.cpp
+++ b/lib/SILOptimizer/Transforms/AllocBoxToStack.cpp
@@ -435,7 +435,7 @@
   while (!Worklist.empty()) {
     auto *Op = Worklist.pop_back_val();
     if (auto *PBI = dyn_cast<ProjectBoxInst>(Op->getUser())) {
-      // This may result in an alloc_stack being used by begin_access [dymaic].
+      // This may result in an alloc_stack being used by begin_access [dynamic].
       PBI->replaceAllUsesWith(StackBox);
       continue;
     }
@@ -838,13 +838,10 @@
   // Build the function_ref and partial_apply.
   SILValue FunctionRef = Builder.createFunctionRef(PartialApply->getLoc(),
                                                    ClonedFn);
-  CanSILFunctionType CanFnTy = ClonedFn->getLoweredFunctionType();
-  auto const &Subs = PartialApply->getSubstitutions();
-  CanSILFunctionType SubstCalleeTy = CanFnTy->substGenericArgs(M, Subs);
-  return Builder.createPartialApply(PartialApply->getLoc(), FunctionRef,
-                                 SILType::getPrimitiveObjectType(SubstCalleeTy),
-                                    PartialApply->getSubstitutions(), Args,
-                                    PartialApply->getType());
+  return Builder.createPartialApply(
+      PartialApply->getLoc(), FunctionRef, PartialApply->getSubstitutions(),
+      Args,
+      PartialApply->getType().getAs<SILFunctionType>()->getCalleeConvention());
 }
 
 static void
diff --git a/lib/SILOptimizer/Transforms/CSE.cpp b/lib/SILOptimizer/Transforms/CSE.cpp
index a6d2ba0..d084c11 100644
--- a/lib/SILOptimizer/Transforms/CSE.cpp
+++ b/lib/SILOptimizer/Transforms/CSE.cpp
@@ -1009,12 +1009,7 @@
       Args.push_back(Op == From ? To : Op);
   }
 
-  auto FnTy = ToAI->getSubstCalleeSILType();
-  SILFunctionConventions fnConv(FnTy.castTo<SILFunctionType>(),
-                                Builder.getModule());
-  auto ResTy = fnConv.getSILResultType();
-
-  ApplyInst *NAI = Builder.createApply(ToAI->getLoc(), ToWMI, FnTy, ResTy,
+  ApplyInst *NAI = Builder.createApply(ToAI->getLoc(), ToWMI,
                                        ToAI->getSubstitutions(), Args,
                                        ToAI->isNonThrowing());
   FromAI->replaceAllUsesWith(NAI);
diff --git a/lib/SILOptimizer/Transforms/ConditionForwarding.cpp b/lib/SILOptimizer/Transforms/ConditionForwarding.cpp
index fd9d421..601fa52 100644
--- a/lib/SILOptimizer/Transforms/ConditionForwarding.cpp
+++ b/lib/SILOptimizer/Transforms/ConditionForwarding.cpp
@@ -149,7 +149,7 @@
 bool ConditionForwarding::tryOptimize(SwitchEnumInst *SEI) {
   // The switch_enum argument (an Enum) must be a block argument at the merging
   // point of the condition's destinations.
-  SILArgument *Arg = dyn_cast<SILArgument>(SEI->getOperand());
+  auto *Arg = dyn_cast<SILArgument>(SEI->getOperand());
   if (!Arg)
     return false;
 
diff --git a/lib/SILOptimizer/Transforms/DeadCodeElimination.cpp b/lib/SILOptimizer/Transforms/DeadCodeElimination.cpp
index c6df8d9..767dd6a 100644
--- a/lib/SILOptimizer/Transforms/DeadCodeElimination.cpp
+++ b/lib/SILOptimizer/Transforms/DeadCodeElimination.cpp
@@ -107,7 +107,7 @@
 
     SILFunction *F = getFunction();
 
-    auto* DA = PM->getAnalysis<PostDominanceAnalysis>();
+    auto *DA = PM->getAnalysis<PostDominanceAnalysis>();
     PDT = DA->get(F);
 
     // If we have a function that consists of nothing but a
diff --git a/lib/SILOptimizer/Transforms/DeadStoreElimination.cpp b/lib/SILOptimizer/Transforms/DeadStoreElimination.cpp
index 31288f3..a8e0a2d 100644
--- a/lib/SILOptimizer/Transforms/DeadStoreElimination.cpp
+++ b/lib/SILOptimizer/Transforms/DeadStoreElimination.cpp
@@ -110,7 +110,7 @@
 findDeallocStackInst(AllocStackInst *ASI) {
   llvm::SmallVector<SILInstruction *, 1> DSIs;
   for (auto UI = ASI->use_begin(), E = ASI->use_end(); UI != E; ++UI) {
-    if (DeallocStackInst *D = dyn_cast<DeallocStackInst>(UI->getUser())) {
+    if (auto *D = dyn_cast<DeallocStackInst>(UI->getUser())) {
       DSIs.push_back(D);
     }   
   }
diff --git a/lib/SILOptimizer/Transforms/FunctionSignatureOpts.cpp b/lib/SILOptimizer/Transforms/FunctionSignatureOpts.cpp
index 7336634..53844f6 100644
--- a/lib/SILOptimizer/Transforms/FunctionSignatureOpts.cpp
+++ b/lib/SILOptimizer/Transforms/FunctionSignatureOpts.cpp
@@ -745,16 +745,13 @@
         SILType::getPrimitiveObjectType(FunctionTy->getErrorResult().getType());
     auto *ErrorArg =
         ErrorBlock->createPHIArgument(Error, ValueOwnershipKind::Owned);
-    Builder.createTryApply(Loc, FRI, SubstCalleeSILType, Subs,
-                           ThunkArgs, NormalBlock, ErrorBlock);
+    Builder.createTryApply(Loc, FRI, Subs, ThunkArgs, NormalBlock, ErrorBlock);
 
     Builder.setInsertionPoint(ErrorBlock);
     Builder.createThrow(Loc, ErrorArg);
     Builder.setInsertionPoint(NormalBlock);
   } else {
-    ReturnValue = Builder.createApply(Loc, FRI, SubstCalleeSILType, ResultType,
-                                      Subs, ThunkArgs,
-                                      false);
+    ReturnValue = Builder.createApply(Loc, FRI, Subs, ThunkArgs, false);
   }
 
   // Set up the return results.
diff --git a/lib/SILOptimizer/Transforms/MergeCondFail.cpp b/lib/SILOptimizer/Transforms/MergeCondFail.cpp
index eba4848..88b16e4 100644
--- a/lib/SILOptimizer/Transforms/MergeCondFail.cpp
+++ b/lib/SILOptimizer/Transforms/MergeCondFail.cpp
@@ -54,7 +54,7 @@
       for (auto InstIt = BB.begin(), End = BB.end(); InstIt != End;) {
         auto *CurInst = &*InstIt;
         ++InstIt;
-        CondFailInst *CFI = dyn_cast<CondFailInst>(CurInst);
+        auto *CFI = dyn_cast<CondFailInst>(CurInst);
 
         // Stop merging at side-effects or reads from memory.
         if (!CFI && (CurInst->mayHaveSideEffects() ||
diff --git a/lib/SILOptimizer/Transforms/PerformanceInliner.cpp b/lib/SILOptimizer/Transforms/PerformanceInliner.cpp
index 05a7eb2..8674ddc 100644
--- a/lib/SILOptimizer/Transforms/PerformanceInliner.cpp
+++ b/lib/SILOptimizer/Transforms/PerformanceInliner.cpp
@@ -809,7 +809,7 @@
   DominanceOrder domOrder(Root, DT);
   while (SILBasicBlock *block = domOrder.getNext()) {
     for (SILInstruction &I : *block) {
-      ApplyInst *AI = dyn_cast<ApplyInst>(&I);
+      auto *AI = dyn_cast<ApplyInst>(&I);
       if (!AI)
         continue;
 
diff --git a/lib/SILOptimizer/Transforms/RedundantLoadElimination.cpp b/lib/SILOptimizer/Transforms/RedundantLoadElimination.cpp
index 215e3f4..76ad412 100644
--- a/lib/SILOptimizer/Transforms/RedundantLoadElimination.cpp
+++ b/lib/SILOptimizer/Transforms/RedundantLoadElimination.cpp
@@ -101,7 +101,7 @@
 /// Return the deallocate stack instructions corresponding to the given
 /// AllocStackInst.
 static SILInstruction *findAllocStackInst(SILInstruction *I) {
-  if (DeallocStackInst *DSI = dyn_cast<DeallocStackInst>(I))
+  if (auto *DSI = dyn_cast<DeallocStackInst>(I))
     return dyn_cast<SILInstruction>(DSI->getOperand());
   return nullptr;
 }
diff --git a/lib/SILOptimizer/Transforms/RedundantOverflowCheckRemoval.cpp b/lib/SILOptimizer/Transforms/RedundantOverflowCheckRemoval.cpp
index d73697c..e322517 100644
--- a/lib/SILOptimizer/Transforms/RedundantOverflowCheckRemoval.cpp
+++ b/lib/SILOptimizer/Transforms/RedundantOverflowCheckRemoval.cpp
@@ -209,8 +209,8 @@
       return true;
 
     // Evaluate literal integers.
-    IntegerLiteralInst *AI = dyn_cast<IntegerLiteralInst>(A);
-    IntegerLiteralInst *BI = dyn_cast<IntegerLiteralInst>(B);
+    auto *AI = dyn_cast<IntegerLiteralInst>(A);
+    auto *BI = dyn_cast<IntegerLiteralInst>(B);
     if (AI && BI) {
       APInt Ap = AI->getValue();
       APInt Bp = BI->getValue();
@@ -232,7 +232,7 @@
 
   /// Return True if we can deduct that \p N is always positive (N > 0).
   static bool isKnownPositive(SILValue N) {
-    if (IntegerLiteralInst *NI = dyn_cast<IntegerLiteralInst>(N))
+    if (auto *NI = dyn_cast<IntegerLiteralInst>(N))
       return NI->getValue().isStrictlyPositive();
     return false;
   }
@@ -241,8 +241,8 @@
   /// absolute value of \p B. In other words, check if \p A known to be closer
   /// to zero.
   static bool isKnownAbsLess(SILValue A, SILValue B) {
-    IntegerLiteralInst *AI = dyn_cast<IntegerLiteralInst>(A);
-    IntegerLiteralInst *BI = dyn_cast<IntegerLiteralInst>(B);
+    auto *AI = dyn_cast<IntegerLiteralInst>(A);
+    auto *BI = dyn_cast<IntegerLiteralInst>(B);
 
     if (AI && BI)
       return AI->getValue().abs().ult(BI->getValue().abs());
@@ -295,8 +295,8 @@
         if (F.Relationship == ValueRelation::SLT) {
           SILValue A = BI->getOperand(0);
           SILValue B = BI->getOperand(1);
-          IntegerLiteralInst *AI = dyn_cast<IntegerLiteralInst>(A);
-          IntegerLiteralInst *BI = dyn_cast<IntegerLiteralInst>(B);
+          auto *AI = dyn_cast<IntegerLiteralInst>(A);
+          auto *BI = dyn_cast<IntegerLiteralInst>(B);
           if (L == A && BI && BI->getValue().getSExtValue() == 1)
             return true;
           if (L == B && AI && AI->getValue().getSExtValue() == 1)
@@ -324,8 +324,8 @@
         if (F.Relationship == ValueRelation::ULT) {
           SILValue A = BI->getOperand(0);
           SILValue B = BI->getOperand(1);
-          IntegerLiteralInst *AI = dyn_cast<IntegerLiteralInst>(A);
-          IntegerLiteralInst *BI = dyn_cast<IntegerLiteralInst>(B);
+          auto *AI = dyn_cast<IntegerLiteralInst>(A);
+          auto *BI = dyn_cast<IntegerLiteralInst>(B);
           if (L == A && BI && BI->getValue().getZExtValue() == 1)
             return true;
           if (L == B && AI && AI->getValue().getZExtValue() == 1)
@@ -430,7 +430,7 @@
         if (F.Relationship == ValueRelation::ULT) {
           SILValue A = BI->getOperand(0);
           SILValue B = BI->getOperand(1);
-          IntegerLiteralInst *BI = dyn_cast<IntegerLiteralInst>(B);
+          auto *BI = dyn_cast<IntegerLiteralInst>(B);
           if (R == A && BI && BI->getValue().getZExtValue() == 1)
             return true;
         }
@@ -488,7 +488,7 @@
         if (F.Relationship == ValueRelation::SLT) {
           SILValue A = BI->getOperand(0);
           SILValue B = BI->getOperand(1);
-          IntegerLiteralInst *BI = dyn_cast<IntegerLiteralInst>(B);
+          auto *BI = dyn_cast<IntegerLiteralInst>(B);
           if (R == A && BI && BI->getValue().getSExtValue() == 1)
             return true;
         }
diff --git a/lib/SILOptimizer/Transforms/ReleaseDevirtualizer.cpp b/lib/SILOptimizer/Transforms/ReleaseDevirtualizer.cpp
index 3d3ac90..e9ecf8a 100644
--- a/lib/SILOptimizer/Transforms/ReleaseDevirtualizer.cpp
+++ b/lib/SILOptimizer/Transforms/ReleaseDevirtualizer.cpp
@@ -113,7 +113,7 @@
     return false;
 
   // Is the dealloc_ref paired with an alloc_ref?
-  AllocRefInst *ARI = dyn_cast<AllocRefInst>(DeallocInst->getOperand());
+  auto *ARI = dyn_cast<AllocRefInst>(DeallocInst->getOperand());
   if (!ARI)
     return false;
 
@@ -149,9 +149,6 @@
 
   DeallocType = DeallocType->substGenericArgs(M, AllocSubMap);
 
-  SILType ReturnType = Dealloc->getConventions().getSILResultType();
-  SILType DeallocSILType = SILType::getPrimitiveObjectType(DeallocType);
-
   SILBuilder B(ReleaseInst);
   if (object->getType() != AllocType)
     object = B.createUncheckedRefCast(ReleaseInst->getLoc(), object, AllocType);
@@ -169,8 +166,7 @@
   if (auto *Sig = NTD->getGenericSignature())
     Sig->getSubstitutions(AllocSubMap, AllocSubsts);
 
-  B.createApply(ReleaseInst->getLoc(), MI, DeallocSILType, ReturnType,
-                AllocSubsts, { object }, false);
+  B.createApply(ReleaseInst->getLoc(), MI, AllocSubsts, {object}, false);
 
   NumReleasesDevirtualized++;
   ReleaseInst->eraseFromParent();
diff --git a/lib/SILOptimizer/Transforms/SILCleanup.cpp b/lib/SILOptimizer/Transforms/SILCleanup.cpp
index e0b7786..87abb39 100644
--- a/lib/SILOptimizer/Transforms/SILCleanup.cpp
+++ b/lib/SILOptimizer/Transforms/SILCleanup.cpp
@@ -37,7 +37,7 @@
       ++I;
 
       // Remove calls to Builtin.staticReport().
-      if (BuiltinInst *BI = dyn_cast<BuiltinInst>(Inst)) {
+      if (auto *BI = dyn_cast<BuiltinInst>(Inst)) {
         const BuiltinInfo &B = BI->getBuiltinInfo();
         if (B.ID == BuiltinValueKind::StaticReport) {
           // The call to the builtin should get removed before we reach
diff --git a/lib/SILOptimizer/Transforms/SILCodeMotion.cpp b/lib/SILOptimizer/Transforms/SILCodeMotion.cpp
index d76d721..7901f5a 100644
--- a/lib/SILOptimizer/Transforms/SILCodeMotion.cpp
+++ b/lib/SILOptimizer/Transforms/SILCodeMotion.cpp
@@ -123,7 +123,7 @@
     return false;
 
   // Make sure it is a release on a SILArgument of the current basic block..
-  SILArgument *SA = dyn_cast<SILArgument>(Head->getOperand(0));
+  auto *SA = dyn_cast<SILArgument>(Head->getOperand(0));
   if (!SA || SA->getParent() != BB)
     return false;
 
@@ -203,7 +203,7 @@
 static SILValue findValueShallowRoot(const SILValue &In) {
   // If this is a basic block argument with a single caller
   // then we know exactly which value is passed to the argument.
-  if (SILArgument *Arg = dyn_cast<SILArgument>(In)) {
+  if (auto *Arg = dyn_cast<SILArgument>(In)) {
     SILBasicBlock *Parent = Arg->getParent();
     SILBasicBlock *Pred = Parent->getSinglePredecessorBlock();
     if (!Pred) return In;
@@ -309,15 +309,15 @@
   // This will further enable to sink strong_retain_unowned instructions,
   // which provides more opportunities for the unowned-optimization in
   // LLVMARCOpts.
-  UnownedToRefInst *UTORI1 = dyn_cast<UnownedToRefInst>(First);
-  UnownedToRefInst *UTORI2 = dyn_cast<UnownedToRefInst>(Second);
+  auto *UTORI1 = dyn_cast<UnownedToRefInst>(First);
+  auto *UTORI2 = dyn_cast<UnownedToRefInst>(Second);
   if (UTORI1 && UTORI2) {
     return 0;
   }
 
   // TODO: Add more cases than Struct
-  StructInst *FirstStruct = dyn_cast<StructInst>(First);
-  StructInst *SecondStruct = dyn_cast<StructInst>(Second);
+  auto *FirstStruct = dyn_cast<StructInst>(First);
+  auto *SecondStruct = dyn_cast<StructInst>(Second);
 
   if (!FirstStruct || !SecondStruct)
     return None;
@@ -408,7 +408,7 @@
   SILBasicBlock *FirstPred = *BB->pred_begin();
   TermInst *FirstTerm = FirstPred->getTerminator();
   auto FirstPredArg = FirstTerm->getOperand(ArgNum);
-  SILInstruction *FSI = dyn_cast<SILInstruction>(FirstPredArg);
+  auto *FSI = dyn_cast<SILInstruction>(FirstPredArg);
 
   // The list of identical instructions.
   SmallVector<SILValue, 8> Clones;
@@ -443,7 +443,7 @@
 
     // Find the Nth argument passed to BB.
     SILValue Arg = TI->getOperand(ArgNum);
-    SILInstruction *SI = dyn_cast<SILInstruction>(Arg);
+    auto *SI = dyn_cast<SILInstruction>(Arg);
     if (!SI || !hasOneNonDebugUse(SI))
       return false;
     if (SI->isIdenticalTo(FSI)) {
@@ -495,7 +495,7 @@
       assert((isa<BranchInst>(TI) || isa<CondBranchInst>(TI)) &&
              "Branch instruction required");
 
-      SILInstruction *CloneInst = dyn_cast<SILInstruction>(*CloneIt);
+      auto *CloneInst = dyn_cast<SILInstruction>(*CloneIt);
       TI->setOperand(ArgNum, CloneInst->getOperand(*DifferentOperandIndex));
       // Now delete the clone as we only needed it operand.
       if (CloneInst != FSI)
@@ -1078,7 +1078,7 @@
 
 void BBEnumTagDataflowState::handlePredCondSelectEnum(CondBranchInst *CondBr) {
 
-  SelectEnumInst *EITI = dyn_cast<SelectEnumInst>(CondBr->getCondition());
+  auto *EITI = dyn_cast<SelectEnumInst>(CondBr->getCondition());
   if (!EITI)
     return;
 
diff --git a/lib/SILOptimizer/Transforms/SILMem2Reg.cpp b/lib/SILOptimizer/Transforms/SILMem2Reg.cpp
index c7f639b..cfbb88e 100644
--- a/lib/SILOptimizer/Transforms/SILMem2Reg.cpp
+++ b/lib/SILOptimizer/Transforms/SILMem2Reg.cpp
@@ -89,7 +89,7 @@
       : ASI(Asi), DSI(nullptr), DT(Di), DomTreeLevels(DomTreeLevels), B(B) {
     // Scan the users in search of a deallocation instruction.
     for (auto UI = ASI->use_begin(), E = ASI->use_end(); UI != E; ++UI)
-      if (DeallocStackInst *D = dyn_cast<DeallocStackInst>(UI->getUser())) {
+      if (auto *D = dyn_cast<DeallocStackInst>(UI->getUser())) {
         // Don't record multiple dealloc instructions.
         if (DSI) {
           DSI = nullptr;
@@ -216,7 +216,7 @@
       continue;
 
     // We can store into an AllocStack (but not the pointer).
-    if (StoreInst *SI = dyn_cast<StoreInst>(II))
+    if (auto *SI = dyn_cast<StoreInst>(II))
       if (SI->getDest() == ASI)
         continue;
 
@@ -248,7 +248,7 @@
     SILInstruction *II = UI->getUser();
 
     // It is okay to store into this AllocStack.
-    if (StoreInst *SI = dyn_cast<StoreInst>(II))
+    if (auto *SI = dyn_cast<StoreInst>(II))
       if (!isa<AllocStackInst>(SI->getSrc()))
         continue;
 
@@ -297,7 +297,7 @@
 
 /// Collects all load instructions which (transitively) use \p I as address.
 static void collectLoads(SILInstruction *I, SmallVectorImpl<LoadInst *> &Loads) {
-  if (LoadInst *load = dyn_cast<LoadInst>(I)) {
+  if (auto *load = dyn_cast<LoadInst>(I)) {
     Loads.push_back(load);
     return;
   }
@@ -385,7 +385,7 @@
 
     // Remove stores and record the value that we are saving as the running
     // value.
-    if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
+    if (auto *SI = dyn_cast<StoreInst>(Inst)) {
       if (SI->getDest() != ASI)
         continue;
 
@@ -422,7 +422,7 @@
     }
 
     // Stop on deallocation.
-    if (DeallocStackInst *DSI = dyn_cast<DeallocStackInst>(Inst)) {
+    if (auto *DSI = dyn_cast<DeallocStackInst>(Inst)) {
       if (DSI->getOperand() == ASI)
         break;
     }
@@ -464,7 +464,7 @@
 
     // Remove stores and record the value that we are saving as the running
     // value.
-    if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) {
+    if (auto *SI = dyn_cast<StoreInst>(Inst)) {
       if (SI->getDest() == ASI) {
         RunningVal = SI->getSrc();
         Inst->eraseFromParent();
@@ -497,7 +497,7 @@
     }
 
     // Remove deallocation.
-    if (DeallocStackInst *DSI = dyn_cast<DeallocStackInst>(Inst)) {
+    if (auto *DSI = dyn_cast<DeallocStackInst>(Inst)) {
       if (DSI->getOperand() == ASI) {
         Inst->eraseFromParent();
         NumInstRemoved++;
@@ -537,7 +537,7 @@
     // If there is a store (that must come after the phi), use its value.
     BlockToInstMap::iterator it = LastStoreInBlock.find(BB);
     if (it != LastStoreInBlock.end())
-      if (StoreInst *St = dyn_cast_or_null<StoreInst>(it->second)) {
+      if (auto *St = dyn_cast_or_null<StoreInst>(it->second)) {
         DEBUG(llvm::dbgs() << "*** Found Store def " << *St->getSrc());
         return St->getSrc();
       }
@@ -828,7 +828,7 @@
     auto I = BB.begin(), E = BB.end();
     while (I != E) {
       SILInstruction *Inst = &*I;
-      AllocStackInst *ASI = dyn_cast<AllocStackInst>(Inst);
+      auto *ASI = dyn_cast<AllocStackInst>(Inst);
       if (!ASI) {
         ++I;
         continue;
diff --git a/lib/SILOptimizer/Transforms/SimplifyCFG.cpp b/lib/SILOptimizer/Transforms/SimplifyCFG.cpp
index 1f2711d..38d3252 100644
--- a/lib/SILOptimizer/Transforms/SimplifyCFG.cpp
+++ b/lib/SILOptimizer/Transforms/SimplifyCFG.cpp
@@ -799,7 +799,7 @@
       if (!isa<BranchInst>(TI) && !isa<CondBranchInst>(TI))
         return nullptr;
 
-      SILArgument *IncomingArg = dyn_cast<SILArgument>(IncomingVal);
+      auto *IncomingArg = dyn_cast<SILArgument>(IncomingVal);
       if (IncomingArg && HandledArgs.count(IncomingArg) != 0)
         continue;
 
@@ -868,12 +868,12 @@
     if (isa<EnumInst>(User))
       return true;
 
-    if (SwitchValueInst *SWI = dyn_cast<SwitchValueInst>(User)) {
+    if (auto *SWI = dyn_cast<SwitchValueInst>(User)) {
       if (SWI->getOperand() == BBArg)
         return true;
     }
 
-    if (BranchInst *BI = dyn_cast<BranchInst>(User)) {
+    if (auto *BI = dyn_cast<BranchInst>(User)) {
       if (BudgetForBranch > Budget) {
         BudgetForBranch = Budget;
         for (SILInstruction &I : *BB) {
@@ -1073,7 +1073,7 @@
   if (!onlyHasTerminatorAndDebugInsts(SBB))
     return nullptr;
 
-  BranchInst *BI = dyn_cast<BranchInst>(SBB->getTerminator());
+  auto *BI = dyn_cast<BranchInst>(SBB->getTerminator());
   if (!BI)
     return nullptr;
 
@@ -1111,7 +1111,7 @@
   if (!onlyHasTerminatorAndDebugInsts(SBB))
     return nullptr;
 
-  BranchInst *BI = dyn_cast<BranchInst>(SBB->getTerminator());
+  auto *BI = dyn_cast<BranchInst>(SBB->getTerminator());
   if (!BI)
     return nullptr;
 
@@ -1343,7 +1343,7 @@
   if (BI->getIntrinsicInfo().ID != llvm::Intrinsic::expect)
     return V;
   auto Args = BI->getArguments();
-  IntegerLiteralInst *IL = dyn_cast<IntegerLiteralInst>(Args[1]);
+  auto *IL = dyn_cast<IntegerLiteralInst>(Args[1]);
   if (!IL)
     return V;
   SILValue NegatedExpectedValue = Builder.createIntegerLiteral(
@@ -2026,8 +2026,6 @@
 
     DEBUG(llvm::dbgs() << "replace with apply: " << *TAI);
     ApplyInst *NewAI = Builder.createApply(TAI->getLoc(), Callee,
-                                           CalleeType,
-                                           ResultTy,
                                            TAI->getSubstitutions(),
                                            Args, CalleeFnTy->hasErrorResult());
 
@@ -2144,7 +2142,7 @@
     return false;
   
   // Check if the condition is a single-used argument in the current block.
-  SILArgument *condArg = dyn_cast<SILArgument>(cond);
+  auto *condArg = dyn_cast<SILArgument>(cond);
   if (!condArg || !condArg->hasOneUse())
     return false;
   
@@ -2270,7 +2268,7 @@
   for (auto &BB : Fn) {
     TermInst *TI = BB.getTerminator();
   
-    SwitchEnumInstBase *SWI = dyn_cast<SwitchEnumInstBase>(TI);
+    auto *SWI = dyn_cast<SwitchEnumInstBase>(TI);
     if (!SWI)
       continue;
     
@@ -3257,7 +3255,7 @@
         EnumInst *PrevResult =
             dyn_cast<EnumInst>(CaseLiteralsToResultMap[CaseInfo.Literal]);
         assert(PrevResult && "Prev. case result is not an EnumInst");
-        EnumInst *CurrResult = dyn_cast<EnumInst>(CaseInfo.Result);
+        auto *CurrResult = dyn_cast<EnumInst>(CaseInfo.Result);
         assert(CurrResult && "Curr. case result is not an EnumInst");
         if (PrevResult->getElement() != CurrResult->getElement()) {
           // result value does not match - bail
diff --git a/lib/SILOptimizer/Transforms/SpeculativeDevirtualizer.cpp b/lib/SILOptimizer/Transforms/SpeculativeDevirtualizer.cpp
index 5431b64..6659478 100644
--- a/lib/SILOptimizer/Transforms/SpeculativeDevirtualizer.cpp
+++ b/lib/SILOptimizer/Transforms/SpeculativeDevirtualizer.cpp
@@ -61,8 +61,6 @@
   switch (AI.getInstruction()->getKind()) {
   case ValueKind::ApplyInst:
     NAI = Builder.createApply(AI.getLoc(), AI.getCallee(),
-                                   AI.getSubstCalleeSILType(),
-                                   AI.getType(),
                                    AI.getSubstitutions(),
                                    Ret,
                                    cast<ApplyInst>(AI)->isNonThrowing());
@@ -70,7 +68,6 @@
   case ValueKind::TryApplyInst: {
     auto *TryApplyI = cast<TryApplyInst>(AI.getInstruction());
     NAI = Builder.createTryApply(AI.getLoc(), AI.getCallee(),
-                                      AI.getSubstCalleeSILType(),
                                       AI.getSubstitutions(),
                                       Ret,
                                       TryApplyI->getNormalBB(),
@@ -204,7 +201,7 @@
       Args.push_back(Arg);
     }
     FullApplySite NewVirtAI = Builder.createTryApply(VirtAI.getLoc(), VirtAI.getCallee(),
-        VirtAI.getSubstCalleeSILType(), VirtAI.getSubstitutions(),
+        VirtAI.getSubstitutions(),
         Args, NormalBB, ErrorBB);
     VirtAI.getInstruction()->eraseFromParent();
     VirtAI = NewVirtAI;
diff --git a/lib/SILOptimizer/UtilityPasses/BugReducerTester.cpp b/lib/SILOptimizer/UtilityPasses/BugReducerTester.cpp
index 30b9125..ae03632 100644
--- a/lib/SILOptimizer/UtilityPasses/BugReducerTester.cpp
+++ b/lib/SILOptimizer/UtilityPasses/BugReducerTester.cpp
@@ -145,8 +145,7 @@
         RuntimeCrasherFunc->dump();
         SILBuilder B(Apply->getIterator());
         B.createApply(Loc, B.createFunctionRef(Loc, RuntimeCrasherFunc),
-                      RuntimeCrasherFunc->getLoweredType(),
-                      M.Types.getEmptyTupleType(), SubstitutionList(),
+                      SubstitutionList(),
                       ArrayRef<SILValue>(), false /*NoThrow*/);
 
         Apply->replaceAllUsesWith(SILUndef::get(Apply->getType(), M));
diff --git a/lib/SILOptimizer/Utils/CFG.cpp b/lib/SILOptimizer/Utils/CFG.cpp
index eb3baf9..454de14 100644
--- a/lib/SILOptimizer/Utils/CFG.cpp
+++ b/lib/SILOptimizer/Utils/CFG.cpp
@@ -31,7 +31,7 @@
   SILBuilderWithScope Builder(Branch);
   TermInst *NewBr = nullptr;
 
-  if (CondBranchInst *CBI = dyn_cast<CondBranchInst>(Branch)) {
+  if (auto *CBI = dyn_cast<CondBranchInst>(Branch)) {
     SmallVector<SILValue, 8> TrueArgs;
     SmallVector<SILValue, 8> FalseArgs;
 
@@ -53,7 +53,7 @@
     NewBr = Builder.createCondBranch(CBI->getLoc(), CBI->getCondition(),
                                     CBI->getTrueBB(), TrueArgs,
                                     CBI->getFalseBB(), FalseArgs);
-  } else if (BranchInst *BI = dyn_cast<BranchInst>(Branch)) {
+  } else if (auto *BI = dyn_cast<BranchInst>(Branch)) {
     SmallVector<SILValue, 8> Args;
 
     for (auto A : BI->getArgs())
@@ -88,7 +88,7 @@
                                  size_t Idx, SILValue Val) {
   SILBuilderWithScope Builder(Branch);
 
-  if (CondBranchInst *CBI = dyn_cast<CondBranchInst>(Branch)) {
+  if (auto *CBI = dyn_cast<CondBranchInst>(Branch)) {
     SmallVector<SILValue, 8> TrueArgs;
     SmallVector<SILValue, 8> FalseArgs;
 
@@ -128,7 +128,7 @@
     return CBI;
   }
 
-  if (BranchInst *BI = dyn_cast<BranchInst>(Branch)) {
+  if (auto *BI = dyn_cast<BranchInst>(Branch)) {
     SmallVector<SILValue, 8> Args;
 
     assert(Idx < BI->getNumArgs() && "Not enough edges");
@@ -294,8 +294,7 @@
     for (auto &Op : TAI->getArgumentOperands())
       Arguments.push_back(Op.get());
 
-    B.createTryApply(TAI->getLoc(), TAI->getCallee(),
-                     TAI->getSubstCalleeSILType(), TAI->getSubstitutions(),
+    B.createTryApply(TAI->getLoc(), TAI->getCallee(), TAI->getSubstitutions(),
                      Arguments, NormalBB, ErrorBB);
 
     TAI->eraseFromParent();
diff --git a/lib/SILOptimizer/Utils/CheckedCastBrJumpThreading.cpp b/lib/SILOptimizer/Utils/CheckedCastBrJumpThreading.cpp
index 5ae61aa..6abc551 100644
--- a/lib/SILOptimizer/Utils/CheckedCastBrJumpThreading.cpp
+++ b/lib/SILOptimizer/Utils/CheckedCastBrJumpThreading.cpp
@@ -229,7 +229,7 @@
   // for method chaining code like obj.method1().method2().etc()
   auto *CCBI = cast<CheckedCastBranchInst>(CCBBlock->getTerminator());
   SILInstruction *Inst = &*CCBI->getFailureBB()->begin();
-  if (ClassMethodInst *CMI = dyn_cast<ClassMethodInst>(Inst)) {
+  if (auto *CMI = dyn_cast<ClassMethodInst>(Inst)) {
     if (CMI->getOperand() == stripClassCasts(CCBI->getOperand())) {
       // Replace checked_cast_br by branch to FailureBB.
       SILBuilder(CCBI->getParent()).createBranch(CCBI->getLoc(),
diff --git a/lib/SILOptimizer/Utils/Devirtualize.cpp b/lib/SILOptimizer/Utils/Devirtualize.cpp
index 835bed9..611999e 100644
--- a/lib/SILOptimizer/Utils/Devirtualize.cpp
+++ b/lib/SILOptimizer/Utils/Devirtualize.cpp
@@ -613,8 +613,6 @@
 
   SILType ResultTy = substConv.getSILResultType();
 
-  SILType SubstCalleeSILType =
-    SILType::getPrimitiveObjectType(SubstCalleeType);
   FullApplySite NewAI;
 
   SILBasicBlock *ResultBB = nullptr;
@@ -624,8 +622,8 @@
   SmallVector<Operand *, 4> OriginalResultUses;
 
   if (!isa<TryApplyInst>(AI)) {
-    NewAI = B.createApply(AI.getLoc(), FRI, SubstCalleeSILType, ResultTy,
-                          Subs, NewArgs, cast<ApplyInst>(AI)->isNonThrowing());
+    NewAI = B.createApply(AI.getLoc(), FRI, Subs, NewArgs,
+                          cast<ApplyInst>(AI)->isNonThrowing());
     ResultValue = NewAI.getInstruction();
   } else {
     auto *TAI = cast<TryApplyInst>(AI);
@@ -651,9 +649,7 @@
                                  ValueOwnershipKind::Owned);
     }
 
-    NewAI = B.createTryApply(AI.getLoc(), FRI, SubstCalleeSILType,
-                             Subs, NewArgs,
-                             ResultBB, ErrorBB);
+    NewAI = B.createTryApply(AI.getLoc(), FRI, Subs, NewArgs, ResultBB, ErrorBB);
     if (ErrorBB != TAI->getErrorBB()) {
       B.setInsertionPoint(ErrorBB);
       B.createBranch(TAI->getLoc(), TAI->getErrorBB(),
@@ -882,8 +878,6 @@
   SILLocation Loc = AI.getLoc();
   FunctionRefInst *FRI = Builder.createFunctionRef(Loc, F);
 
-  auto SubstCalleeSILType = SILType::getPrimitiveObjectType(SubstCalleeCanType);
-  auto ResultSILType = substConv.getSILResultType();
   ApplySite SAI;
 
   SmallVector<Substitution, 4> NewSubs;
@@ -892,28 +886,23 @@
 
   SILValue ResultValue;
   if (auto *A = dyn_cast<ApplyInst>(AI)) {
-    auto *NewAI =
-        Builder.createApply(Loc, FRI, SubstCalleeSILType, ResultSILType,
-                            NewSubs, Arguments, A->isNonThrowing());
+    auto *NewAI = Builder.createApply(Loc, FRI, NewSubs, Arguments,
+                                      A->isNonThrowing());
     // Check if any casting is required for the return value.
     ResultValue = castValueToABICompatibleType(&Builder, Loc, NewAI,
                                                NewAI->getType(), AI.getType());
     SAI = ApplySite::isa(NewAI);
   }
   if (auto *TAI = dyn_cast<TryApplyInst>(AI))
-    SAI = Builder.createTryApply(Loc, FRI, SubstCalleeSILType,
-                                 NewSubs, Arguments,
+    SAI = Builder.createTryApply(Loc, FRI, NewSubs, Arguments,
                                  TAI->getNormalBB(), TAI->getErrorBB());
   if (auto *PAI = dyn_cast<PartialApplyInst>(AI)) {
     auto PartialApplyConvention = PAI->getType()
                                       .getSwiftRValueType()
                                       ->getAs<SILFunctionType>()
                                       ->getCalleeConvention();
-    auto PAIResultType = SILBuilder::getPartialApplyResultType(
-        SubstCalleeSILType, Arguments.size(), Module, {},
-        PartialApplyConvention);
     auto *NewPAI = Builder.createPartialApply(
-        Loc, FRI, SubstCalleeSILType, NewSubs, Arguments, PAIResultType);
+        Loc, FRI, NewSubs, Arguments, PartialApplyConvention);
     // Check if any casting is required for the return value.
     ResultValue = castValueToABICompatibleType(
         &Builder, Loc, NewPAI, NewPAI->getType(), PAI->getType());
diff --git a/lib/SILOptimizer/Utils/Generics.cpp b/lib/SILOptimizer/Utils/Generics.cpp
index c30bb9d..05e36e0 100644
--- a/lib/SILOptimizer/Utils/Generics.cpp
+++ b/lib/SILOptimizer/Utils/Generics.cpp
@@ -1764,9 +1764,8 @@
   if (auto *TAI = dyn_cast<TryApplyInst>(AI)) {
     SILBasicBlock *ResultBB = TAI->getNormalBB();
     assert(ResultBB->getSinglePredecessorBlock() == TAI->getParent());
-    auto *NewTAI =
-        Builder.createTryApply(Loc, Callee, CalleeSILSubstFnTy, Subs, Arguments,
-                               ResultBB, TAI->getErrorBB());
+    auto *NewTAI = Builder.createTryApply(Loc, Callee, Subs, Arguments,
+                                          ResultBB, TAI->getErrorBB());
     if (StoreResultTo) {
       assert(substConv.useLoweredAddresses());
       // The original normal result of the try_apply is an empty tuple.
@@ -1784,9 +1783,8 @@
     return NewTAI;
   }
   if (auto *A = dyn_cast<ApplyInst>(AI)) {
-    auto *NewAI = Builder.createApply(Loc, Callee, CalleeSILSubstFnTy,
-                                      substConv.getSILResultType(), Subs,
-                                      Arguments, A->isNonThrowing());
+    auto *NewAI = Builder.createApply(Loc, Callee, Subs, Arguments,
+                                      A->isNonThrowing());
     if (StoreResultTo) {
       assert(substConv.useLoweredAddresses());
       if (!CalleeSILSubstFnTy.isNoReturnFunction()) {
@@ -1807,14 +1805,9 @@
     return NewAI;
   }
   if (auto *PAI = dyn_cast<PartialApplyInst>(AI)) {
-    CanSILFunctionType NewPAType = ReInfo.createSpecializedType(
-        PAI->getFunctionType(), Builder.getModule());
-    // SILType PTy =
-    // SILType::getPrimitiveObjectType(ReInfo.getSpecializedType());
-    SILType PTy = CalleeSILSubstFnTy;
-    auto *NewPAI =
-        Builder.createPartialApply(Loc, Callee, PTy, Subs, Arguments,
-                                   SILType::getPrimitiveObjectType(NewPAType));
+    auto *NewPAI = Builder.createPartialApply(
+        Loc, Callee, Subs, Arguments,
+        PAI->getType().getAs<SILFunctionType>()->getCalleeConvention());
     PAI->replaceAllUsesWith(NewPAI);
     return NewPAI;
   }
@@ -1943,21 +1936,14 @@
   SILFunction *Thunk = &Builder.getFunction();
   auto *FRI = Builder.createFunctionRef(Loc, SpecializedFunc);
   auto Subs = Thunk->getForwardingSubstitutions();
-  auto CalleeSubstFnTy = getCalleeSubstFunctionType(FRI, Subs);
-  auto CalleeSILSubstFnTy = SILType::getPrimitiveObjectType(CalleeSubstFnTy);
   auto specConv = SpecializedFunc->getConventions();
-  auto SILResultTy =
-      SpecializedFunc->mapTypeIntoContext(specConv.getSILResultType());
   if (!SpecializedFunc->getLoweredFunctionType()->hasErrorResult()) {
-    return Builder.createApply(Loc, FRI, CalleeSILSubstFnTy,
-                               SILResultTy, Subs, Arguments,
-                               false);
+    return Builder.createApply(Loc, FRI, Subs, Arguments, false);
   }
   // Create the logic for calling a throwing function.
   SILBasicBlock *NormalBB = Thunk->createBasicBlock();
   SILBasicBlock *ErrorBB = Thunk->createBasicBlock();
-  Builder.createTryApply(Loc, FRI, CalleeSILSubstFnTy, Subs,
-                         Arguments, NormalBB, ErrorBB);
+  Builder.createTryApply(Loc, FRI, Subs, Arguments, NormalBB, ErrorBB);
   auto *ErrorVal = ErrorBB->createPHIArgument(
       SpecializedFunc->mapTypeIntoContext(specConv.getSILErrorType()),
       ValueOwnershipKind::Owned);
@@ -2171,11 +2157,9 @@
       Arguments.push_back(Op.get());
     }
     auto Subs = ReInfo.getCallerParamSubstitutions();
-    auto CalleeSubstFnTy = getCalleeSubstFunctionType(FRI, Subs);
-    auto CalleeSILSubstFnTy = SILType::getPrimitiveObjectType(CalleeSubstFnTy);
-    auto *NewPAI = Builder.createPartialApply(PAI->getLoc(), FRI,
-                                              CalleeSILSubstFnTy, Subs,
-                                              Arguments, PAI->getType());
+    auto *NewPAI = Builder.createPartialApply(
+        PAI->getLoc(), FRI, Subs, Arguments,
+        PAI->getType().getAs<SILFunctionType>()->getCalleeConvention());
     PAI->replaceAllUsesWith(NewPAI);
     DeadApplies.insert(PAI);
     return;
diff --git a/lib/SILOptimizer/Utils/Local.cpp b/lib/SILOptimizer/Utils/Local.cpp
index 59a298e..bad1dc2 100644
--- a/lib/SILOptimizer/Utils/Local.cpp
+++ b/lib/SILOptimizer/Utils/Local.cpp
@@ -180,7 +180,7 @@
 
         // If the operand is an instruction that is only used by the instruction
         // being deleted, delete it.
-        if (SILInstruction *OpValInst = dyn_cast<SILInstruction>(OpVal))
+        if (auto *OpValInst = dyn_cast<SILInstruction>(OpVal))
           if (!DeadInsts.count(OpValInst) &&
               isInstructionTriviallyDead(OpValInst))
             NextInsts.insert(OpValInst);
@@ -369,7 +369,7 @@
                                      TermInst *Branch) {
   SILBuilderWithScope Builder(Branch);
 
-  if (CondBranchInst *CBI = dyn_cast<CondBranchInst>(Branch)) {
+  if (auto *CBI = dyn_cast<CondBranchInst>(Branch)) {
     SmallVector<SILValue, 8> TrueArgs;
     SmallVector<SILValue, 8> FalseArgs;
 
@@ -392,7 +392,7 @@
                                     CBI->getFalseBB(), FalseArgs);
   }
 
-  if (BranchInst *BI = dyn_cast<BranchInst>(Branch)) {
+  if (auto *BI = dyn_cast<BranchInst>(Branch)) {
     SmallVector<SILValue, 8> Args;
 
     for (auto A : BI->getArgs())
@@ -862,11 +862,8 @@
   // Type.
   Arguments.push_back(FuncResultType);
 
-  auto FnTy = FRIConvertFromBuiltin->getType();
-  auto fnConv = FRIConvertFromBuiltin->getConventions();
-  auto STResultType = fnConv.getSILResultType();
-  return Builder.createApply(AI->getLoc(), FRIConvertFromBuiltin, FnTy,
-                             STResultType, SubstitutionList(), Arguments,
+  return Builder.createApply(AI->getLoc(), FRIConvertFromBuiltin,
+                             SubstitutionList(), Arguments,
                              false);
 }
 
@@ -1361,7 +1358,6 @@
   auto SILFnTy = FuncRef->getType();
   SILType SubstFnTy = SILFnTy.substGenericArgs(M, SubMap);
   SILFunctionConventions substConv(SubstFnTy.castTo<SILFunctionType>(), M);
-  SILType ResultTy = substConv.getSILResultType();
 
   // Temporary to hold the intermediate result.
   AllocStackInst *Tmp = nullptr;
@@ -1395,8 +1391,7 @@
   SmallVector<Substitution, 4> Subs;
   Conf.getRequirement()->getGenericSignature()->getSubstitutions(SubMap, Subs);
 
-  auto *AI = Builder.createApply(Loc, FuncRef, SubstFnTy, ResultTy, Subs, Args,
-                                 false);
+  auto *AI = Builder.createApply(Loc, FuncRef, Subs, Args, false);
 
   // If the source of a cast should be destroyed, emit a release.
   if (auto *UCCAI = dyn_cast<UnconditionalCheckedCastAddrInst>(Inst)) {
@@ -1552,7 +1547,6 @@
 
   SILType SubstFnTy = SILFnTy.substGenericArgs(M, SubMap);
   SILFunctionConventions substConv(SubstFnTy.castTo<SILFunctionType>(), M);
-  SILType ResultTy = substConv.getSILResultType();
 
   auto FnRef = Builder.createFunctionRef(Loc, BridgedFunc);
   if (Src->getType().isAddress() && !substConv.isSILIndirect(ParamTypes[0])) {
@@ -1643,8 +1637,7 @@
     Sig->getSubstitutions(SubMap, Subs);
 
   // Generate a code to invoke the bridging function.
-  auto *NewAI = Builder.createApply(Loc, FnRef, SubstFnTy, ResultTy, Subs, Src,
-                                    false);
+  auto *NewAI = Builder.createApply(Loc, FnRef, Subs, Src, false);
 
   if (needReleaseAfterCall) {
     Builder.createReleaseValue(Loc, Src, Builder.getDefaultAtomicity());
@@ -1712,12 +1705,13 @@
 
   auto &M = Inst->getModule();
 
-  // To apply the bridged optimizations, we should
-  // ensure that types are not existential,
-  // and that one of the types is a class and another
-  // one is a struct.
+  // To apply the bridged optimizations, we should ensure that types are not
+  // existential (and keep in mind that generic parameters can be existentials),
+  // and that one of the types is a class and another one is a struct.
   if (source.isAnyExistentialType() ||
       target.isAnyExistentialType() ||
+      source->is<ArchetypeType>() ||
+      target->is<ArchetypeType>() ||
       (source.getClassOrBoundGenericClass() &&
        !target.getStructOrBoundGenericStruct()) ||
       (target.getClassOrBoundGenericClass() &&
@@ -2166,10 +2160,10 @@
 
   // %0 = metatype $A.Type
   // %1 = init_existential_metatype ..., %0: $A
-  // checked_cond_br %1, ....
+  // checked_cast_br %1, ....
   // ->
-  // %1 = metatype $A.Type
-  // checked_cond_br %1, ....
+  // %0 = metatype $A.Type
+  // checked_cast_br %0 to ...
   if (auto *IEMI = dyn_cast<InitExistentialMetatypeInst>(Op)) {
     if (auto *MI = dyn_cast<MetatypeInst>(IEMI->getOperand())) {
       SILBuilderWithScope B(Inst);
@@ -2187,13 +2181,13 @@
     auto Op = EMI->getOperand();
     auto EmiTy = EMI->getType();
 
-    // %0 = alloc_stack ..
-    // %1 = init_existential_addr %0: $A
-    // %2 = existential_metatype %0, ...
-    // checked_cond_br %2, ....
+    // %0 = alloc_stack $T
+    // %1 = init_existential_addr %0: $*T, $A
+    // %2 = existential_metatype $T.Type, %0: $*T
+    // checked_cast_br %2 to ...
     // ->
     // %1 = metatype $A.Type
-    // checked_cond_br %1, ....
+    // checked_cast_br %1 to ...
 
     if (auto *ASI = dyn_cast<AllocStackInst>(Op)) {
       // Should be in the same BB.
@@ -2226,7 +2220,10 @@
           return nullptr;
         // Get the type used to initialize the existential.
         auto LoweredConcreteTy = FoundIEI->getLoweredConcreteType();
-        if (LoweredConcreteTy.isAnyExistentialType())
+        // We don't know enough at compile time about existential
+        // and generic type parameters.
+        if (LoweredConcreteTy.isAnyExistentialType() ||
+            LoweredConcreteTy.is<ArchetypeType>())
           return nullptr;
         // Get the metatype of this type.
         auto EMT = EmiTy.castTo<AnyMetatypeType>();
@@ -2235,6 +2232,8 @@
         auto CanMetaTy = CanTypeWrapper<MetatypeType>(MetaTy);
         auto SILMetaTy = SILType::getPrimitiveObjectType(CanMetaTy);
         SILBuilderWithScope B(Inst);
+        B.getOpenedArchetypes().addOpenedArchetypeOperands(
+            FoundIEI->getTypeDependentOperands());
         auto *MI = B.createMetatype(FoundIEI->getLoc(), SILMetaTy);
 
         auto *NewI = B.createCheckedCastBranch(Loc, /* isExact */ false, MI,
@@ -2249,10 +2248,10 @@
     // %0 = alloc_ref $A
     // %1 = init_existential_ref %0: $A, $...
     // %2 = existential_metatype ..., %1 :  ...
-    // checked_cond_br %2, ....
+    // checked_cast_br %2, ....
     // ->
     // %1 = metatype $A.Type
-    // checked_cond_br %1, ....
+    // checked_cast_br %1, ....
     if (auto *FoundIERI = dyn_cast<InitExistentialRefInst>(Op)) {
       auto *ASRI = dyn_cast<AllocRefInst>(FoundIERI->getOperand());
       if (!ASRI)
@@ -2282,7 +2281,10 @@
           return nullptr;
         // Get the type used to initialize the existential.
         auto ConcreteTy = FoundIERI->getFormalConcreteType();
-        if (ConcreteTy.isAnyExistentialType())
+        // We don't know enough at compile time about existential
+        // and generic type parameters.
+        if (ConcreteTy.isAnyExistentialType() ||
+            ConcreteTy->is<ArchetypeType>())
           return nullptr;
         // Get the SIL metatype of this type.
         auto EMT = EMI->getType().castTo<AnyMetatypeType>();
@@ -2290,6 +2292,8 @@
         auto CanMetaTy = CanTypeWrapper<MetatypeType>(MetaTy);
         auto SILMetaTy = SILType::getPrimitiveObjectType(CanMetaTy);
         SILBuilderWithScope B(Inst);
+        B.getOpenedArchetypes().addOpenedArchetypeOperands(
+            FoundIERI->getTypeDependentOperands());
         auto *MI = B.createMetatype(FoundIERI->getLoc(), SILMetaTy);
 
         auto *NewI = B.createCheckedCastBranch(Loc, /* isExact */ false, MI,
diff --git a/lib/SILOptimizer/Utils/PerformanceInlinerUtils.cpp b/lib/SILOptimizer/Utils/PerformanceInlinerUtils.cpp
index e3709ea..4e094d8 100644
--- a/lib/SILOptimizer/Utils/PerformanceInlinerUtils.cpp
+++ b/lib/SILOptimizer/Utils/PerformanceInlinerUtils.cpp
@@ -21,10 +21,10 @@
     SILValue baseAddr = scanProjections(LI->getOperand());
     if (SILInstruction *loadLink = getMemoryContent(baseAddr))
       links[LI] = loadLink;
-  } else if (StoreInst *SI = dyn_cast<StoreInst>(inst)) {
+  } else if (auto *SI = dyn_cast<StoreInst>(inst)) {
     SILValue baseAddr = scanProjections(SI->getOperand(1));
     memoryContent[baseAddr] = SI;
-  } else if (CopyAddrInst *CAI = dyn_cast<CopyAddrInst>(inst)) {
+  } else if (auto *CAI = dyn_cast<CopyAddrInst>(inst)) {
     if (!CAI->isTakeOfSrc()) {
       // Treat a copy_addr as a load + store
       SILValue loadAddr = scanProjections(CAI->getOperand(0));
@@ -109,7 +109,7 @@
 
   // Track the value up the dominator tree.
   for (;;) {
-    if (SILInstruction *inst = dyn_cast<SILInstruction>(val)) {
+    if (auto *inst = dyn_cast<SILInstruction>(val)) {
       if (Projection::isObjectProjection(inst)) {
         // Extract a member from a struct/tuple/enum.
         projStack.push_back(Projection(inst));
@@ -254,14 +254,14 @@
 // Returns the taken block of a terminator instruction if the condition turns
 // out to be constant.
 SILBasicBlock *ConstantTracker::getTakenBlock(TermInst *term) {
-  if (CondBranchInst *CBI = dyn_cast<CondBranchInst>(term)) {
+  if (auto *CBI = dyn_cast<CondBranchInst>(term)) {
     IntConst condConst = getIntConst(CBI->getCondition());
     if (condConst.isFromCaller) {
       return condConst.value != 0 ? CBI->getTrueBB() : CBI->getFalseBB();
     }
     return nullptr;
   }
-  if (SwitchValueInst *SVI = dyn_cast<SwitchValueInst>(term)) {
+  if (auto *SVI = dyn_cast<SwitchValueInst>(term)) {
     IntConst switchConst = getIntConst(SVI->getOperand());
     if (switchConst.isFromCaller) {
       for (unsigned Idx = 0; Idx < SVI->getNumCases(); ++Idx) {
@@ -278,9 +278,9 @@
     }
     return nullptr;
   }
-  if (SwitchEnumInst *SEI = dyn_cast<SwitchEnumInst>(term)) {
+  if (auto *SEI = dyn_cast<SwitchEnumInst>(term)) {
     if (SILInstruction *def = getDefInCaller(SEI->getOperand())) {
-      if (EnumInst *EI = dyn_cast<EnumInst>(def)) {
+      if (auto *EI = dyn_cast<EnumInst>(def)) {
         for (unsigned Idx = 0; Idx < SEI->getNumCases(); ++Idx) {
           auto enumCase = SEI->getCase(Idx);
           if (enumCase.first == EI->getElement())
@@ -292,9 +292,9 @@
     }
     return nullptr;
   }
-  if (CheckedCastBranchInst *CCB = dyn_cast<CheckedCastBranchInst>(term)) {
+  if (auto *CCB = dyn_cast<CheckedCastBranchInst>(term)) {
     if (SILInstruction *def = getDefInCaller(CCB->getOperand())) {
-      if (UpcastInst *UCI = dyn_cast<UpcastInst>(def)) {
+      if (auto *UCI = dyn_cast<UpcastInst>(def)) {
         SILType castType = UCI->getOperand()->getType();
         if (CCB->getCastType().isExactSuperclassOf(castType)) {
           return CCB->getSuccessBB();
diff --git a/lib/SILOptimizer/Utils/SILInliner.cpp b/lib/SILOptimizer/Utils/SILInliner.cpp
index 07124cf..67bbe06 100644
--- a/lib/SILOptimizer/Utils/SILInliner.cpp
+++ b/lib/SILOptimizer/Utils/SILInliner.cpp
@@ -109,7 +109,7 @@
   // If we're inlining into a normal apply and the callee's entry
   // block ends in a return, then we can avoid a split.
   if (auto nonTryAI = dyn_cast<ApplyInst>(AI)) {
-    if (ReturnInst *RI = dyn_cast<ReturnInst>(CalleeEntryBB->getTerminator())) {
+    if (auto *RI = dyn_cast<ReturnInst>(CalleeEntryBB->getTerminator())) {
       // Replace all uses of the apply instruction with the operands of the
       // return instruction, appropriately mapped.
       nonTryAI->replaceAllUsesWith(remapValue(RI->getOperand()));
@@ -149,7 +149,7 @@
 
     // Modify return terminators to branch to the return-to BB, rather than
     // trying to clone the ReturnInst.
-    if (ReturnInst *RI = dyn_cast<ReturnInst>(BI->first->getTerminator())) {
+    if (auto *RI = dyn_cast<ReturnInst>(BI->first->getTerminator())) {
       auto thrownValue = remapValue(RI->getOperand());
       getBuilder().createBranch(Loc.getValue(), ReturnToBB,
                                 thrownValue);
@@ -158,7 +158,7 @@
 
     // Modify throw terminators to branch to the error-return BB, rather than
     // trying to clone the ThrowInst.
-    if (ThrowInst *TI = dyn_cast<ThrowInst>(BI->first->getTerminator())) {
+    if (auto *TI = dyn_cast<ThrowInst>(BI->first->getTerminator())) {
       if (auto *A = dyn_cast<ApplyInst>(AI)) {
         (void)A;
         assert(A->isNonThrowing() &&
diff --git a/lib/Sema/CSApply.cpp b/lib/Sema/CSApply.cpp
index 03837ee..3d4966a 100644
--- a/lib/Sema/CSApply.cpp
+++ b/lib/Sema/CSApply.cpp
@@ -4161,6 +4161,10 @@
       return E;
     }
 
+    Expr *visitKeyPathDotExpr(KeyPathDotExpr *E) {
+      llvm_unreachable("found KeyPathDotExpr in CSApply");
+    }
+
     /// Interface for ExprWalker
     void walkToExprPre(Expr *expr) {
       ExprStack.push_back(expr);
@@ -4624,7 +4628,7 @@
 
   // Capture the tuple expression, if there is one.
   Expr *innerExpr = lookThroughIdentityExprs(expr);
-  TupleExpr *fromTupleExpr = dyn_cast<TupleExpr>(innerExpr);
+  auto *fromTupleExpr = dyn_cast<TupleExpr>(innerExpr);
 
   /// Check each of the tuple elements in the destination.
   bool hasVariadic = false;
@@ -4696,7 +4700,7 @@
                                             fromTuple, toTuple);
       if (typeFromPattern) {
         std::vector<std::pair<SourceLoc, std::string>> locInsertPairs;
-        TuplePattern *tupleP = dyn_cast<TuplePattern>(typeFromPattern.getValue());
+        auto *tupleP = dyn_cast<TuplePattern>(typeFromPattern.getValue());
         if (tupleP && shouldApplyAddingLabelFixit(tupleP, toTuple, fromTuple,
                                                   locInsertPairs)) {
           for (auto &Pair : locInsertPairs) {
@@ -5317,8 +5321,8 @@
   (void)failed;
 
   // We should either have parentheses or a tuple.
-  TupleExpr *argTuple = dyn_cast<TupleExpr>(arg);
-  ParenExpr *argParen = dyn_cast<ParenExpr>(arg);
+  auto *argTuple = dyn_cast<TupleExpr>(arg);
+  auto *argParen = dyn_cast<ParenExpr>(arg);
   // FIXME: Eventually, we want to enforce that we have either argTuple or
   // argParen here.
 
@@ -7770,7 +7774,7 @@
     tc.diagnose(expr->getLoc(), diag::broken_bool);
     return nullptr;
   }
-  FuncDecl *builtinMethod = dyn_cast<FuncDecl>(members[0].Decl);
+  auto *builtinMethod = dyn_cast<FuncDecl>(members[0].Decl);
   if (!builtinMethod) {
     tc.diagnose(expr->getLoc(), diag::broken_bool);
     return nullptr;
diff --git a/lib/Sema/CSDiag.cpp b/lib/Sema/CSDiag.cpp
index ac79388..913f47e 100644
--- a/lib/Sema/CSDiag.cpp
+++ b/lib/Sema/CSDiag.cpp
@@ -325,13 +325,17 @@
 
 /// Returns true if any diagnostics were emitted.
 static bool
-tryDiagnoseTrailingClosureAmbiguity(TypeChecker &tc, const Expr *expr,
+tryDiagnoseTrailingClosureAmbiguity(TypeChecker &tc,
+                                    const Expr *expr,
+                                    const Expr *anchor,
                                     ArrayRef<OverloadChoice> choices) {
   auto *callExpr = dyn_cast<CallExpr>(expr);
   if (!callExpr)
     return false;
   if (!callExpr->hasTrailingClosure())
     return false;
+  if (callExpr->getFn() != anchor)
+    return false;
 
   llvm::SmallMapVector<Identifier, const ValueDecl *, 8> choicesByLabel;
   for (const OverloadChoice &choice : choices) {
@@ -465,7 +469,7 @@
                                   : diag::ambiguous_decl_ref,
                 name);
 
-    if (tryDiagnoseTrailingClosureAmbiguity(tc, expr, overload.choices))
+    if (tryDiagnoseTrailingClosureAmbiguity(tc, expr, anchor, overload.choices))
       return true;
 
     // Emit candidates.  Use a SmallPtrSet to make sure only emit a particular
@@ -2806,7 +2810,8 @@
         }
         assert(TypeDC->isTypeContext() && "Expected type decl context!");
 
-        if (TypeDC->getDeclaredTypeOfContext()->isEqual(instanceTy)) {
+        if (TypeDC->getAsNominalTypeOrNominalTypeExtensionContext() ==
+            instanceTy->getAnyNominal()) {
           if (propertyInitializer)
             CS->TC.diagnose(nameLoc, diag::instance_member_in_initializer,
                             memberName);
@@ -3830,6 +3835,45 @@
   return false;
 }
 
+/// Try to add a fix-it when converting between a collection and its slice type,
+/// such as String <-> Substring or (eventually) Array <-> ArraySlice
+static bool trySequenceSubsequenceConversionFixIts(InFlightDiagnostic &diag,
+                                                   ConstraintSystem *CS,
+                                                   Type fromType,
+                                                   Type toType,
+                                                   Expr *expr) {
+  if (CS->TC.Context.getStdlibModule() == nullptr) {
+    return false;
+  }
+  auto String = CS->TC.getStringType(CS->DC);
+  auto Substring = CS->TC.getSubstringType(CS->DC);
+
+  /// FIXME: Remove this flag when void subscripts are implemented.
+  /// Make this unconditional and remove the if statement.
+  if (CS->TC.getLangOpts().FixStringToSubstringConversions) {
+    // String -> Substring conversion
+    // Add '[]' void subscript call to turn the whole String into a Substring
+    if (fromType->getCanonicalType() == String->getCanonicalType()) {
+      if (toType->getCanonicalType() == Substring->getCanonicalType()) {
+        diag.fixItInsertAfter(expr->getEndLoc (), "[]");
+        return true;
+      }
+    }
+  }
+
+  // Substring -> String conversion
+  // Wrap in String.init
+  if (fromType->getCanonicalType() == Substring->getCanonicalType()) {
+    if (toType->getCanonicalType() == String->getCanonicalType()) {
+      diag.fixItInsert(expr->getLoc(), "String(");
+      diag.fixItInsertAfter(expr->getSourceRange().End, ")");
+      return true;
+    }
+  }
+
+  return false;
+}
+
 /// Attempts to add fix-its for these two mistakes:
 ///
 /// - Passing an integer with the right type but which is getting wrapped with a
@@ -3850,12 +3894,12 @@
     return false;
 
   auto getInnerCastedExpr = [&]() -> Expr* {
-    CallExpr *CE = dyn_cast<CallExpr>(expr);
+    auto *CE = dyn_cast<CallExpr>(expr);
     if (!CE)
       return nullptr;
     if (!isa<ConstructorRefCallExpr>(CE->getFn()))
       return nullptr;
-    ParenExpr *parenE = dyn_cast<ParenExpr>(CE->getArg());
+    auto *parenE = dyn_cast<ParenExpr>(CE->getArg());
     if (!parenE)
       return nullptr;
     return parenE->getSubExpr();
@@ -4268,6 +4312,13 @@
                                      exprType, contextualType);
   diag.highlight(expr->getSourceRange());
 
+  // Try to convert between a sequence and its subsequence, notably
+  // String <-> Substring.
+  if (trySequenceSubsequenceConversionFixIts(diag, CS, exprType, contextualType,
+                                             expr)) {
+    return true;
+  }
+
   // Attempt to add a fixit for the error.
   switch (CS->getContextualTypePurpose()) {
   case CTP_CallArgument:
@@ -4283,9 +4334,6 @@
     tryRawRepresentableFixIts(diag, CS, exprType, contextualType,
                               KnownProtocolKind::ExpressibleByStringLiteral,
                               expr) ||
-    tryRawRepresentableFixIts(diag, CS, exprType, contextualType,
-                              KnownProtocolKind::AnyObject,
-                              expr) ||
     tryIntegerCastFixIts(diag, CS, exprType, contextualType, expr) ||
     addTypeCoerceFixit(diag, CS, exprType, contextualType, expr);
     break;
@@ -4884,6 +4932,115 @@
   return false;
 }
 
+// It is a somewhat common error to try to access an instance method as a
+// curried member on the type, instead of using an instance, e.g. the user
+// wrote:
+//
+//   Foo.doThing(42, b: 19)
+//
+// instead of:
+//
+//   myFoo.doThing(42, b: 19)
+//
+// Check for this situation and handle it gracefully.
+static bool
+diagnoseInstanceMethodAsCurriedMemberOnType(CalleeCandidateInfo &CCI,
+                                            Expr *fnExpr, Expr *argExpr) {
+  for (auto &candidate : CCI.candidates) {
+    auto argTy = candidate.getArgumentType();
+    if (!argTy)
+      return false;
+
+    auto *decl = candidate.getDecl();
+    if (!decl)
+      return false;
+
+    // If this is an exact match at the level 1 of the parameters, but
+    // there is still something wrong with the expression nevertheless
+    // it might be worth while to check if it's instance method as curried
+    // member of type problem.
+    if (CCI.closeness == CC_ExactMatch &&
+        (decl->isInstanceMember() && candidate.level == 1))
+      continue;
+
+    auto params = decomposeParamType(argTy, decl, candidate.level);
+    // If one of the candidates is an instance method with a single parameter
+    // at the level 0, this might be viable situation for calling instance
+    // method as curried member of type problem.
+    if (params.size() != 1 || !decl->isInstanceMember() || candidate.level > 0)
+      return false;
+  }
+
+  auto &TC = CCI.CS->TC;
+
+  if (auto UDE = dyn_cast<UnresolvedDotExpr>(fnExpr)) {
+    auto baseExpr = UDE->getBase();
+    auto baseType = baseExpr->getType();
+    if (auto *MT = baseType->getAs<MetatypeType>()) {
+      auto DC = CCI.CS->DC;
+      auto instanceType = MT->getInstanceType();
+
+      // If the base is an implicit self type reference, and we're in a
+      // an initializer, then the user wrote something like:
+      //
+      //   class Foo { let val = initFn() }
+      // or
+      //   class Bar { func something(x: Int = initFn()) }
+      //
+      // which runs in type context, not instance context.  Produce a tailored
+      // diagnostic since this comes up and is otherwise non-obvious what is
+      // going on.
+      if (baseExpr->isImplicit() && isa<Initializer>(DC)) {
+        auto *TypeDC = DC->getParent();
+        bool propertyInitializer = true;
+        // If the parent context is not a type context, we expect it
+        // to be a defaulted parameter in a function declaration.
+        if (!TypeDC->isTypeContext()) {
+          assert(TypeDC->getContextKind() ==
+                     DeclContextKind::AbstractFunctionDecl &&
+                 "Expected function decl context for initializer!");
+          TypeDC = TypeDC->getParent();
+          propertyInitializer = false;
+        }
+        assert(TypeDC->isTypeContext() && "Expected type decl context!");
+
+        if (TypeDC->getAsNominalTypeOrNominalTypeExtensionContext() ==
+            instanceType->getAnyNominal()) {
+          if (propertyInitializer)
+            TC.diagnose(UDE->getLoc(), diag::instance_member_in_initializer,
+                        UDE->getName());
+          else
+            TC.diagnose(UDE->getLoc(),
+                        diag::instance_member_in_default_parameter,
+                        UDE->getName());
+          return true;
+        }
+      }
+
+      // If this is a situation like this `self.foo(A())()` and self != A
+      // let's say that `self` is not convertible to A.
+      if (auto nominalType = argExpr->getType()->getAs<NominalType>()) {
+        if (!instanceType->isEqual(nominalType)) {
+          TC.diagnose(argExpr->getStartLoc(), diag::types_not_convertible,
+                      false, nominalType, instanceType);
+          return true;
+        }
+      }
+
+      // Otherwise, complain about use of instance value on type.
+      auto diagnostic = isa<TypeExpr>(baseExpr)
+                            ? diag::instance_member_use_on_type
+                            : diag::could_not_use_instance_member_on_type;
+
+      TC.diagnose(UDE->getLoc(), diagnostic, instanceType, UDE->getName())
+          .highlight(baseExpr->getSourceRange());
+      return true;
+    }
+  }
+
+  return false;
+}
+
 /// Emit a class of diagnostics that we only know how to generate when there is
 /// exactly one candidate we know about.  Return true if an error is emitted.
 static bool diagnoseSingleCandidateFailures(CalleeCandidateInfo &CCI,
@@ -4902,69 +5059,6 @@
   auto params = decomposeParamType(argTy, candidate.getDecl(), candidate.level);
   auto args = decomposeArgType(argExpr->getType(), argLabels);
 
-  // It is a somewhat common error to try to access an instance method as a
-  // curried member on the type, instead of using an instance, e.g. the user
-  // wrote:
-  //
-  //   Foo.doThing(42, b: 19)
-  //
-  // instead of:
-  //
-  //   myFoo.doThing(42, b: 19)
-  //
-  // Check for this situation and handle it gracefully.
-  if (params.size() == 1 && candidate.getDecl() &&
-      candidate.getDecl()->isInstanceMember() &&
-      candidate.level == 0) {
-    if (auto UDE = dyn_cast<UnresolvedDotExpr>(fnExpr))
-      if (isa<TypeExpr>(UDE->getBase())) {
-        auto baseType = candidate.getArgumentType();
-        auto DC = CCI.CS->DC;
-
-        // If the base is an implicit self type reference, and we're in a
-        // an initializer, then the user wrote something like:
-        //
-        //   class Foo { let val = initFn() }
-        // or
-        //   class Bar { func something(x: Int = initFn()) }
-        //
-        // which runs in type context, not instance context.  Produce a tailored
-        // diagnostic since this comes up and is otherwise non-obvious what is
-        // going on.
-        if (UDE->getBase()->isImplicit() && isa<Initializer>(DC)) {
-          auto *TypeDC = DC->getParent();
-          bool propertyInitializer = true;
-          // If the parent context is not a type context, we expect it
-          // to be a defaulted parameter in a function declaration.
-          if (!TypeDC->isTypeContext()) {
-            assert(TypeDC->getContextKind() ==
-                       DeclContextKind::AbstractFunctionDecl &&
-                   "Expected function decl context for initializer!");
-            TypeDC = TypeDC->getParent();
-            propertyInitializer = false;
-          }
-          assert(TypeDC->isTypeContext() && "Expected type decl context!");
-
-          if (TypeDC->getDeclaredTypeOfContext()->isEqual(baseType)) {
-            if (propertyInitializer)
-              TC.diagnose(UDE->getLoc(), diag::instance_member_in_initializer,
-                          UDE->getName());
-            else
-              TC.diagnose(UDE->getLoc(),
-                          diag::instance_member_in_default_parameter,
-                          UDE->getName());
-            return true;
-          }
-        }
-
-        // Otherwise, complain about use of instance value on type.
-        TC.diagnose(UDE->getLoc(), diag::instance_member_use_on_type,
-                    baseType, UDE->getName())
-          .highlight(UDE->getBase()->getSourceRange());
-        return true;
-      }
-  }
-
   // Check the case where a raw-representable type is constructed from an
   // argument with the same type:
   //
@@ -4983,7 +5077,7 @@
     auto rawTy = isRawRepresentable(resTy, CCI.CS);
     if (rawTy && arg.Ty && resTy->isEqual(arg.Ty)) {
       auto getInnerExpr = [](Expr *E) -> Expr* {
-        ParenExpr *parenE = dyn_cast<ParenExpr>(E);
+        auto *parenE = dyn_cast<ParenExpr>(E);
         if (!parenE)
           return nullptr;
         return parenE->getSubExpr();
@@ -5306,6 +5400,9 @@
   if (diagnoseImplicitSelfErrors(fnExpr, argExpr, CCI, argLabels, CS))
     return true;
 
+  if (diagnoseInstanceMethodAsCurriedMemberOnType(CCI, fnExpr, argExpr))
+    return true;
+
   // Do all the stuff that we only have implemented when there is a single
   // candidate.
   if (diagnoseSingleCandidateFailures(CCI, fnExpr, argExpr, argLabels))
@@ -6479,7 +6576,9 @@
     // in either case, we want to produce nice and clear diagnostics.
     unsigned actualArgCount = params->size();
     unsigned inferredArgCount = 1;
-    if (auto *argTupleTy = inferredArgType->getAs<TupleType>())
+    // Don't try to desugar ParenType which is going to result in incorrect
+    // inferred argument count.
+    if (auto *argTupleTy = dyn_cast<TupleType>(inferredArgType.getPointer()))
       inferredArgCount = argTupleTy->getNumElements();
     
     // If the actual argument count is 1, it can match a tuple as a whole.
@@ -6511,7 +6610,144 @@
         }
         return true;
       }
-      
+
+      if (inferredArgCount == 1 && actualArgCount > 1) {
+        // Let's see if inferred argument is actually a tuple inside of Paren.
+        if (auto *argTupleTy = inferredArgType->getAs<TupleType>()) {
+          // Looks like the number of closure parameters matches number
+          // of inferred arguments, which means we can we can emit an
+          // error about an attempt to make use of tuple splat or tuple
+          // destructuring and provide a proper fix-it.
+          if (argTupleTy->getNumElements() == actualArgCount) {
+            // In case of implicit parameters e.g. $0, $1 we
+            // can't really provide good fix-it because
+            // structure of parameter type itself is unclear.
+            for (auto *param : params->getArray()) {
+              if (param->isImplicit()) {
+                diagnose(params->getStartLoc(),
+                         diag::closure_tuple_parameter_destructuring_implicit,
+                         argTupleTy);
+                return true;
+              }
+            }
+
+            auto diag = diagnose(params->getStartLoc(),
+                                 diag::closure_tuple_parameter_destructuring,
+                                 argTupleTy);
+            Type actualArgType;
+            if (auto *actualFnType = CE->getType()->getAs<AnyFunctionType>())
+              actualArgType = actualFnType->getInput();
+
+            auto *closureBody = CE->getBody();
+            if (!closureBody)
+              return true;
+
+            auto &sourceMgr = CS->getASTContext().SourceMgr;
+            auto bodyStmts = closureBody->getElements();
+
+            SourceLoc bodyLoc;
+            // If the body is empty let's put the cursor
+            // right after "in", otherwise make it start
+            // location of the first statement in the body.
+            if (bodyStmts.empty())
+              bodyLoc = Lexer::getLocForEndOfToken(sourceMgr, CE->getInLoc());
+            else
+              bodyLoc = bodyStmts.front().getStartLoc();
+
+            SmallString<64> fixIt;
+            llvm::raw_svector_ostream OS(fixIt);
+
+            // If this is multi-line closure we'd have to insert new lines
+            // in the suggested 'let' to keep the structure of the code intact,
+            // otherwise just use ';' to keep everything on the same line.
+            auto inLine = sourceMgr.getLineNumber(CE->getInLoc());
+            auto bodyLine = sourceMgr.getLineNumber(bodyLoc);
+            auto isMultiLineClosure = bodyLine > inLine;
+            auto indent = bodyStmts.empty() ? "" : Lexer::getIndentationForLine(
+                                                       sourceMgr, bodyLoc);
+
+            SmallString<16> parameter;
+            llvm::raw_svector_ostream parameterOS(parameter);
+
+            parameterOS << "(";
+            interleave(params->getArray(),
+                       [&](const ParamDecl *param) {
+                         parameterOS << param->getNameStr();
+                       },
+                       [&] { parameterOS << ", "; });
+            parameterOS << ")";
+
+            // Check if there are any explicit types associated
+            // with parameters, if there are, we'll have to add
+            // type information to the replacement argument.
+            bool explicitTypes = false;
+            for (auto *param : params->getArray()) {
+              if (param->getTypeLoc().getTypeRepr()) {
+                explicitTypes = true;
+                break;
+              }
+            }
+
+            if (isMultiLineClosure)
+              OS << '\n' << indent;
+
+            // Let's form 'let <name> : [<type>]? = arg' expression.
+            OS << "let " << parameterOS.str() << " = arg"
+               << (isMultiLineClosure ? "\n" + indent : "; ");
+
+            SmallString<64> argName;
+            llvm::raw_svector_ostream nameOS(argName);
+            if (explicitTypes) {
+              nameOS << "(arg: " << argTupleTy->getString() << ")";
+            } else {
+              nameOS << "(arg)";
+            }
+
+            if (CE->hasSingleExpressionBody()) {
+              // Let's see if we need to add result type to the argument/fix-it:
+              //  - if the there is a result type associated with the closure;
+              //  - and it's not a void type;
+              //  - and it hasn't been explicitly written.
+              auto resultType = CE->getResultType();
+              auto hasResult = [](Type resultType) -> bool {
+                return resultType && !resultType->isVoid();
+              };
+
+              auto isValidType = [](Type resultType) -> bool {
+                return resultType && !resultType->hasUnresolvedType() &&
+                       !resultType->hasTypeVariable();
+              };
+
+              // If there an expected result type but it hasn't been explictly
+              // provided, let's add it to the argument.
+              if (hasResult(resultType) && !CE->hasExplicitResultType()) {
+                nameOS << " -> ";
+                if (isValidType(resultType))
+                  nameOS << resultType->getString();
+                else
+                  nameOS << "<#Result#>";
+              }
+
+              if (auto stmt = bodyStmts.front().get<Stmt *>()) {
+                // If the body is a single expression with implicit return.
+                if (isa<ReturnStmt>(stmt) && stmt->isImplicit()) {
+                  // And there is non-void expected result type,
+                  // because we add 'let' expression to the body
+                  // we need to make such 'return' explicit.
+                  if (hasResult(resultType))
+                    OS << "return ";
+                }
+              }
+            }
+
+            diag.fixItReplace(params->getSourceRange(), nameOS.str())
+                .fixItInsert(bodyLoc, OS.str());
+
+            return true;
+          }
+        }
+      }
+
       // Okay, the wrong number of arguments was used, complain about that.
       // Before doing so, strip attributes off the function type so that they
       // don't confuse the issue.
@@ -6969,7 +7205,8 @@
     candidateInfo.suggestPotentialOverloads(E->getNameLoc().getBaseNameLoc());
     return true;
   }
-  
+
+  auto *argExpr = E->getArgument();
   auto candidateArgTy = candidateInfo[0].getArgumentType();
 
   // Depending on how we matched, produce tailored diagnostics.
@@ -6990,8 +7227,8 @@
 
     // If we have an exact match, then we must have an argument list, check it.
     if (candidateArgTy) {
-      assert(E->getArgument() && "Exact match without argument?");
-      if (!typeCheckArgumentChildIndependently(E->getArgument(), candidateArgTy,
+      assert(argExpr && "Exact match without argument?");
+      if (!typeCheckArgumentChildIndependently(argExpr, candidateArgTy,
                                                candidateInfo))
         return true;
     }
@@ -7020,71 +7257,50 @@
   case CC_Inaccessible:
     // Diagnose some simple and common errors.
     return candidateInfo.diagnoseSimpleErrors(E);
-      
-  case CC_ArgumentLabelMismatch: { // Argument labels are not correct.
-    auto argExpr = typeCheckArgumentChildIndependently(E->getArgument(),
-                                                       candidateArgTy,
-                                                       candidateInfo);
-    if (!argExpr) return true;
 
-    // Construct the actual expected argument labels that our candidate
-    // expected.
-    assert(candidateArgTy &&
-           "Candidate must expect an argument to have a label mismatch");
-    SmallVector<Identifier, 2> argLabelsScratch;
-    auto arguments = decomposeArgType(candidateArgTy,
-                                      candidateInfo[0].getArgumentLabels(
-                                        argLabelsScratch));
-    
-    // TODO: This is probably wrong for varargs, e.g. calling "print" with the
-    // wrong label.
-    SmallVector<Identifier, 4> expectedNames;
-    for (auto &arg : arguments)
-      expectedNames.push_back(arg.Label);
-
-    return diagnoseArgumentLabelError(CS->TC, argExpr, expectedNames,
-                                      /*isSubscript*/false);
-  }
-    
-  case CC_GeneralMismatch:        // Something else is wrong.
-  case CC_ArgumentCountMismatch:  // This candidate has wrong # arguments.
+  case CC_ArgumentLabelMismatch:
+  case CC_ArgumentCountMismatch: {
     // If we have no argument, the candidates must have expected one.
-    if (!E->getArgument()) {
+    if (!argExpr) {
       if (!candidateArgTy)
         return false; // Candidate must be incorrect for some other reason.
-      
+
       // Pick one of the arguments that are expected as an exemplar.
       if (candidateArgTy->isVoid()) {
         // If this member is () -> T, suggest adding parentheses.
         diagnose(E->getNameLoc(), diag::expected_parens_in_contextual_member,
                  E->getName())
-          .fixItInsertAfter(E->getEndLoc(), "()");
+            .fixItInsertAfter(E->getEndLoc(), "()");
       } else {
         diagnose(E->getNameLoc(), diag::expected_argument_in_contextual_member,
                  E->getName(), candidateArgTy);
       }
       return true;
     }
-     
+
+    assert(argExpr && candidateArgTy && "Exact match without an argument?");
+    return diagnoseSingleCandidateFailures(candidateInfo, E, argExpr,
+                                           E->getArgumentLabels());
+  }
+
+  case CC_GeneralMismatch: { // Something else is wrong.
     // If an argument value was specified, but this member expects no arguments,
     // then we fail with a nice error message.
     if (!candidateArgTy) {
-      if (E->getArgument()->getType()->isVoid()) {
+      if (argExpr->getType()->isVoid()) {
         diagnose(E->getNameLoc(), diag::unexpected_parens_in_contextual_member,
                  E->getName())
-          .fixItRemove(E->getArgument()->getSourceRange());
+            .fixItRemove(E->getArgument()->getSourceRange());
       } else {
-        diagnose(E->getNameLoc(), diag::unexpected_argument_in_contextual_member,
-                 E->getName())
-          .highlight(E->getArgument()->getSourceRange());
+        diagnose(E->getNameLoc(),
+                 diag::unexpected_argument_in_contextual_member, E->getName())
+            .highlight(E->getArgument()->getSourceRange());
       }
       return true;
     }
 
-    assert(E->getArgument() && candidateArgTy &&
-           "Exact match without an argument?");
-    return !typeCheckArgumentChildIndependently(E->getArgument(), candidateArgTy,
-                                                candidateInfo);
+    return false;
+  }
   }
 
   llvm_unreachable("all cases should be handled");
@@ -7408,6 +7624,40 @@
     if (FT->isAutoClosure())
       contextualType = FT->getResult();
 
+  // Since some of the contextual types might be tuples e.g. subscript argument
+  // is a tuple or paren wrapping a tuple, it's required to recursively check
+  // its elements to determine nullability of the contextual type, because it
+  // might contain archetypes.
+  std::function<bool(Type)> shouldNullifyType = [&](Type type) -> bool {
+    switch (type->getDesugaredType()->getKind()) {
+    case TypeKind::Archetype:
+    case TypeKind::Unresolved:
+      return true;
+
+    case TypeKind::BoundGenericEnum:
+    case TypeKind::BoundGenericClass:
+    case TypeKind::BoundGenericStruct:
+    case TypeKind::UnboundGeneric:
+    case TypeKind::GenericFunction:
+    case TypeKind::Metatype:
+      return type->hasUnresolvedType();
+
+    case TypeKind::Tuple: {
+      auto tupleType = type->getAs<TupleType>();
+      for (auto &element : tupleType->getElements()) {
+        if (shouldNullifyType(element.getType()))
+            return true;
+      }
+      break;
+    }
+
+    default:
+      return false;
+    }
+
+    return false;
+  };
+
   bool shouldNullify = false;
   if (auto objectType = contextualType->getLValueOrInOutObjectType()) {
     // Note that simply checking for `objectType->hasUnresolvedType()` is not
@@ -7419,25 +7669,7 @@
     // sub-expression solver a chance to try and compute type as it sees fit
     // and higher level code would have a chance to check it, which avoids
     // diagnostic messages like `cannot convert (_) -> _ to (Int) -> Void`.
-    switch (objectType->getDesugaredType()->getKind()) {
-    case TypeKind::Archetype:
-    case TypeKind::Unresolved:
-      shouldNullify = true;
-      break;
-
-    case TypeKind::BoundGenericEnum:
-    case TypeKind::BoundGenericClass:
-    case TypeKind::BoundGenericStruct:
-    case TypeKind::UnboundGeneric:
-    case TypeKind::GenericFunction:
-    case TypeKind::Metatype:
-      shouldNullify = objectType->hasUnresolvedType();
-      break;
-
-    default:
-      shouldNullify = false;
-      break;
-    }
+    shouldNullify = shouldNullifyType(objectType);
   }
 
   // If the conversion type contains no info, drop it.
diff --git a/lib/Sema/CSGen.cpp b/lib/Sema/CSGen.cpp
index 49c1719..b447f0a 100644
--- a/lib/Sema/CSGen.cpp
+++ b/lib/Sema/CSGen.cpp
@@ -678,56 +678,6 @@
     }
   }
   
-  /// Determine whether or not a given NominalTypeDecl has a failable
-  /// initializer member.
-  bool hasFailableInits(NominalTypeDecl *NTD,
-                        ConstraintSystem *CS) {
-    
-    // TODO: Note that we search manually, rather than invoking lookupMember
-    // on the ConstraintSystem object. Because this is a hot path, this keeps
-    // the overhead of the check low, and is twice as fast.
-    if (!NTD->getSearchedForFailableInits()) {
-      // Set flag before recursing to catch circularity.
-      NTD->setSearchedForFailableInits();
-      
-      for (auto member : NTD->getMembers()) {
-        if (auto CD = dyn_cast<ConstructorDecl>(member)) {
-          if (CD->getFailability()) {
-            NTD->setHasFailableInits();
-            break;
-          }
-        }
-      }
-      
-      if (!NTD->getHasFailableInits()) {
-        for (auto extension : NTD->getExtensions()) {
-          for (auto member : extension->getMembers()) {
-            if (auto CD = dyn_cast<ConstructorDecl>(member)) {
-              if (CD->getFailability()) {
-                NTD->setHasFailableInits();
-                break;
-              }
-            }
-          }
-        }
-        
-        if (!NTD->getHasFailableInits()) {
-          for (auto parentTyLoc : NTD->getInherited()) {
-            if (auto nominalType =
-                parentTyLoc.getType()->getAs<NominalType>()) {
-              if (hasFailableInits(nominalType->getDecl(), CS)) {
-                NTD->setHasFailableInits();
-                break;
-              }
-            }
-          }
-        }
-      }
-    }
-    
-    return NTD->getHasFailableInits();
-  }
-  
   size_t getOperandCount(Type t) {
     size_t nOperands = 0;
     
@@ -2385,87 +2335,50 @@
         if (auto fnType = CS.getType(fnExpr)->getAs<AnyFunctionType>()) {
           outputTy = fnType->getResult();
         }
-      } else if (auto TE = dyn_cast<TypeExpr>(fnExpr)) {
-        outputTy = CS.getInstanceType(TE);
-        NominalTypeDecl *NTD = nullptr;
-        
-        if (auto nominalType = outputTy->getAs<NominalType>()) {
-          NTD = nominalType->getDecl();
-        } else if (auto bgT = outputTy->getAs<BoundGenericType>()) {
-          NTD = bgT->getDecl();
-        }
-        
-        if (NTD) {
-          if (!(isa<ClassDecl>(NTD) || isa<StructDecl>(NTD)) ||
-              hasFailableInits(NTD, &CS)) {
-            outputTy = Type();
+      } else if (auto OSR = dyn_cast<OverloadedDeclRefExpr>(fnExpr)) {
+        // Determine if the overloads are all functions that share a common
+        // return type.
+        Type commonType;
+        for (auto OD : OSR->getDecls()) {
+          auto OFD = dyn_cast<AbstractFunctionDecl>(OD);
+          if (!OFD) {
+            commonType = Type();
+            break;
           }
-        } else {
-          outputTy = Type();
-        }
-        
-      } else if (auto OSR = dyn_cast<OverloadSetRefExpr>(fnExpr)) {
-        if (auto FD = dyn_cast<FuncDecl>(OSR->getDecls()[0])) {
 
-          // If we've already agreed upon an overloaded return type, use it.
-          if (FD->getHaveSearchedForCommonOverloadReturnType()) {
-            
-            if (FD->getHaveFoundCommonOverloadReturnType()) {
-              outputTy = FD->getInterfaceType()->getAs<AnyFunctionType>()
-                  ->getResult();
-              outputTy = FD->mapTypeIntoContext(outputTy);
-            }
-            
-          } else {
-          
-            // Determine if the overloads all share a common return type.
-            Type commonType;
-            Type resultType;
-            
-            for (auto OD : OSR->getDecls()) {
-              
-              if (auto OFD = dyn_cast<FuncDecl>(OD)) {
-                auto OFT = OFD->getInterfaceType()->getAs<AnyFunctionType>();
-                
-                if (!OFT) {
-                  commonType = Type();
-                  break;
-                }
-                
-                resultType = OFT->getResult();
-                resultType = OFD->mapTypeIntoContext(resultType);
-                
-                if (commonType.isNull()) {
-                  commonType = resultType;
-                } else if (!commonType->isEqual(resultType)) {
-                  commonType = Type();
-                  break;
-                }
-              } else {
-                // TODO: unreachable?
-                commonType = Type();
-                break;
-              }
-            }
-            
-            // TODO: For now, disallow tyvar, archetype and function types.
-            if (!(commonType.isNull() ||
-                  commonType->getAs<TypeVariableType>() ||
-                  commonType->getAs<ArchetypeType>() ||
-                  commonType->getAs<AnyFunctionType>())) {
-              outputTy = commonType;
-            }
-            
-            // Set the search bits appropriately.
-            for (auto OD : OSR->getDecls()) {
-              if (auto OFD = dyn_cast<FuncDecl>(OD)) {
-                OFD->setHaveSearchedForCommonOverloadReturnType();
-                
-                if (!outputTy.isNull())
-                  OFD->setHaveFoundCommonOverloadReturnType();
-              }
+          auto OFT = OFD->getInterfaceType()->getAs<AnyFunctionType>();
+          if (!OFT) {
+            commonType = Type();
+            break;
+          }
+
+          // Look past the self parameter.
+          if (OFD->getDeclContext()->isTypeContext()) {
+            OFT = OFT->getResult()->getAs<AnyFunctionType>();
+            if (!OFT) {
+              commonType = Type();
+              break;
             }
           }
+
+          Type resultType = OFT->getResult();
+
+          // If there are any type parameters in the result,
+          if (resultType->hasTypeParameter()) {
+            commonType = Type();
+            break;
+          }
+
+          if (commonType.isNull()) {
+            commonType = resultType;
+          } else if (!commonType->isEqual(resultType)) {
+            commonType = Type();
+            break;
+          }
+        }
+
+        if (commonType) {
+          outputTy = commonType;
         }
       }
       
@@ -2672,8 +2585,12 @@
       // Compute the type to which the source must be converted to allow
       // assignment to the destination.
       auto destTy = CS.computeAssignDestType(expr->getDest(), expr->getLoc());
-      if (!destTy || destTy->getRValueType()->is<UnresolvedType>())
+      if (!destTy)
         return Type();
+      if (destTy->getRValueType()->is<UnresolvedType>()) {
+        return CS.createTypeVariable(CS.getConstraintLocator(expr),
+                                     TVO_CanBindToLValue);
+      }
       
       // The source must be convertible to the destination.
       CS.addConstraint(ConstraintKind::Conversion,
@@ -2932,6 +2849,10 @@
       }
       return kpTy;
     }
+
+    Type visitKeyPathDotExpr(KeyPathDotExpr *E) {
+      llvm_unreachable("found KeyPathDotExpr in CSGen");
+    }
   };
 
   /// \brief AST walker that "sanitizes" an expression for the
diff --git a/lib/Sema/CSSimplify.cpp b/lib/Sema/CSSimplify.cpp
index 767fc60..57733bd 100644
--- a/lib/Sema/CSSimplify.cpp
+++ b/lib/Sema/CSSimplify.cpp
@@ -1418,7 +1418,6 @@
       }
 
       // Provide a fixed type for the type variable.
-      bool wantRvalue = kind == ConstraintKind::Equal;
       if (typeVar1) {
         // Simplify the right-hand type and perform the "occurs" check.
         typeVar1 = getRepresentative(typeVar1);
@@ -1426,9 +1425,18 @@
         if (typeVarOccursInType(typeVar1, type2))
           return formUnsolvedResult();
 
-        // If we want an rvalue, get the rvalue.
-        if (wantRvalue)
+        // Equal constraints allow mixed LValue/RValue bindings, but
+        // if we bind a type to a type variable that can bind to
+        // LValues as part of simplifying the Equal constraint we may
+        // later block a binding of the opposite "LValue-ness" to the
+        // same type variable that happens as part of simplifying
+        // another constraint.
+        if (kind == ConstraintKind::Equal) {
+          if (typeVar1->getImpl().canBindToLValue())
+            return formUnsolvedResult();
+
           type2 = type2->getRValueType();
+        }
 
         // If the left-hand type variable cannot bind to an lvalue,
         // but we still have an lvalue, fail.
@@ -1467,9 +1475,18 @@
       if (typeVarOccursInType(typeVar2, type1))
         return formUnsolvedResult();
 
-      // If we want an rvalue, get the rvalue.
-      if (wantRvalue)
+      // Equal constraints allow mixed LValue/RValue bindings, but
+      // if we bind a type to a type variable that can bind to
+      // LValues as part of simplifying the Equal constraint we may
+      // later block a binding of the opposite "LValue-ness" to the
+      // same type variable that happens as part of simplifying
+      // another constraint.
+      if (kind == ConstraintKind::Equal) {
+        if (typeVar2->getImpl().canBindToLValue())
+          return formUnsolvedResult();
+
         type1 = type1->getRValueType();
+      }
 
       if (!typeVar2->getImpl().canBindToLValue() &&
           type1->isLValueType()) {
diff --git a/lib/Sema/CSSolver.cpp b/lib/Sema/CSSolver.cpp
index 2c2bdba..9b908f0 100644
--- a/lib/Sema/CSSolver.cpp
+++ b/lib/Sema/CSSolver.cpp
@@ -15,6 +15,7 @@
 //===----------------------------------------------------------------------===//
 #include "ConstraintSystem.h"
 #include "ConstraintGraph.h"
+#include "swift/AST/ParameterList.h"
 #include "swift/AST/TypeWalker.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Support/Compiler.h"
@@ -2348,27 +2349,6 @@
   if (constraint->getKind() == ConstraintKind::CheckedCast)
     return true;
 
-  // Binding an operator overloading to a generic operator is weaker than
-  // binding to a non-generic operator, always.
-  // FIXME: this is a hack to improve performance when we're dealing with
-  // overloaded operators.
-  if (constraint->getKind() == ConstraintKind::BindOverload &&
-      constraint->getOverloadChoice().getKind() == OverloadChoiceKind::Decl &&
-      constraint->getOverloadChoice().getDecl()->isOperator() &&
-      successfulConstraint->getKind() == ConstraintKind::BindOverload &&
-      successfulConstraint->getOverloadChoice().getKind()
-        == OverloadChoiceKind::Decl &&
-      successfulConstraint->getOverloadChoice().getDecl()->isOperator()) {
-    auto decl = constraint->getOverloadChoice().getDecl();
-    auto successfulDecl = successfulConstraint->getOverloadChoice().getDecl();
-    auto &ctx = decl->getASTContext();
-    if (decl->getInterfaceType()->is<GenericFunctionType>() &&
-        !successfulDecl->getInterfaceType()->is<GenericFunctionType>() &&
-        (!successfulDecl->getAttrs().isUnavailable(ctx) ||
-         decl->getAttrs().isUnavailable(ctx)))
-      return true;
-  }
-
   return false;
 }
 
@@ -2486,6 +2466,43 @@
   return count;
 }
 
+// Is this constraint a bind overload to a generic operator or one
+// that is unavailable?
+static bool isGenericOperatorOrUnavailable(Constraint *constraint) {
+  if (constraint->getKind() != ConstraintKind::BindOverload ||
+      constraint->getOverloadChoice().getKind() != OverloadChoiceKind::Decl ||
+      !constraint->getOverloadChoice().getDecl()->isOperator())
+    return false;
+
+  auto decl = constraint->getOverloadChoice().getDecl();
+  auto &ctx = decl->getASTContext();
+
+  return decl->getInterfaceType()->is<GenericFunctionType>() ||
+    decl->getAttrs().isUnavailable(ctx);
+}
+
+/// Whether this constraint refers to a symmetric operator.
+static bool isSymmetricOperator(Constraint *constraint) {
+  if (constraint->getKind() != ConstraintKind::BindOverload ||
+      constraint->getOverloadChoice().getKind() != OverloadChoiceKind::Decl ||
+      !constraint->getOverloadChoice().getDecl()->isOperator())
+    return false;
+
+  // If it's a binary operator, check that the types on both sides are the
+  // same. Otherwise, don't perform this optimization.
+  auto func = dyn_cast<FuncDecl>(constraint->getOverloadChoice().getDecl());
+  auto paramList =
+  func->getParameterList(func->getDeclContext()->isTypeContext());
+  if (paramList->size() != 2)
+    return true;
+
+  auto firstType =
+    paramList->get(0)->getInterfaceType()->getLValueOrInOutObjectType();
+  auto secondType =
+    paramList->get(1)->getInterfaceType()->getLValueOrInOutObjectType();
+  return firstType->isEqual(secondType);
+}
+
 bool ConstraintSystem::solveSimplified(
     SmallVectorImpl<Solution> &solutions,
     FreeTypeVariableBinding allowFreeTypeVariables) {
@@ -2544,7 +2561,7 @@
 
   // Select a disjunction based on a few factors, prioritizing
   // coercions and initializer disjunctions, followed by bind overload
-  // disjunctions with with fewest unbound argument types.
+  // disjunctions with fewest unbound argument types.
   Optional<Constraint *> selection;
   Optional<unsigned> lowestUnbound;
   Optional<unsigned> lowestActive;
@@ -2620,6 +2637,7 @@
 
   // Try each of the constraints within the disjunction.
   Constraint *firstSolvedConstraint = nullptr;
+  Constraint *firstNonGenericOperatorSolution = nullptr;
   ++solverState->NumDisjunctions;
   auto constraints = disjunction->getNestedConstraints();
   for (auto index : indices(constraints)) {
@@ -2635,12 +2653,24 @@
       continue;
     }
 
+    // Don't attempt to solve for generic operators if we already have
+    // a non-generic solution.
+
+    // FIXME: Less-horrible but still horrible hack to attempt to
+    //        speed things up. Skip the generic operators if we
+    //        already have a solution involving non-generic operators,
+    //        but continue looking for a better non-generic operator
+    //        solution.
+    if (firstNonGenericOperatorSolution &&
+        isGenericOperatorOrUnavailable(constraint))
+      continue;
+
     // We already have a solution; check whether we should
     // short-circuit the disjunction.
     if (firstSolvedConstraint &&
         shortCircuitDisjunctionAt(constraint, firstSolvedConstraint))
       break;
-    
+
     // If the expression was deemed "too complex", stop now and salvage.
     if (getExpressionTooComplex(solutions))
       break;
@@ -2686,6 +2716,11 @@
     solverState->addGeneratedConstraint(constraint);
 
     if (!solveRec(solutions, allowFreeTypeVariables)) {
+      if (!firstNonGenericOperatorSolution &&
+          !isGenericOperatorOrUnavailable(constraint) &&
+          isSymmetricOperator(constraint))
+        firstNonGenericOperatorSolution = constraint;
+
       firstSolvedConstraint = constraint;
 
       // If we see a tuple-to-tuple conversion that succeeded, we're done.
diff --git a/lib/Sema/CodeSynthesis.cpp b/lib/Sema/CodeSynthesis.cpp
index 69c1412..db5ae5d 100644
--- a/lib/Sema/CodeSynthesis.cpp
+++ b/lib/Sema/CodeSynthesis.cpp
@@ -2139,6 +2139,8 @@
   }
   if (superclassCtor->isRequired())
     ctor->getAttrs().add(new (tc.Context) RequiredAttr(/*IsImplicit=*/true));
+  if (superclassCtor->isDynamic())
+    ctor->getAttrs().add(new (tc.Context) DynamicAttr(/*IsImplicit*/true));
 
   // Wire up the overrides.
   ctor->getAttrs().add(new (tc.Context) OverrideAttr(/*IsImplicit=*/true));
@@ -2147,6 +2149,7 @@
   if (kind == DesignatedInitKind::Stub) {
     // Make this a stub implementation.
     createStubBody(tc, ctor);
+    ctor->setNeedsNewVTableEntry(false);
     return ctor;
   }
 
diff --git a/lib/Sema/ConstraintSystem.cpp b/lib/Sema/ConstraintSystem.cpp
index b0ab556..2e28886 100644
--- a/lib/Sema/ConstraintSystem.cpp
+++ b/lib/Sema/ConstraintSystem.cpp
@@ -373,7 +373,9 @@
           cast<GenericTypeParamType>(genericParam->getCanonicalType()));
         
         if (known == replacements.end())
-          return cs.createTypeVariable(nullptr, TVO_PrefersSubtypeBinding);
+          return cs.createTypeVariable(nullptr,
+                                       TVO_PrefersSubtypeBinding |
+                                       TVO_MustBeMaterializable);
         
         return known->second;
       }
diff --git a/lib/Sema/DerivedConformanceCodable.cpp b/lib/Sema/DerivedConformanceCodable.cpp
index 214ec5a..1ae2bb4 100644
--- a/lib/Sema/DerivedConformanceCodable.cpp
+++ b/lib/Sema/DerivedConformanceCodable.cpp
@@ -222,7 +222,7 @@
   // CodingKeys should eventually be an enum. If it's a typealias, we'll need to
   // follow it.
   auto *codingKeysEnum = dyn_cast<EnumDecl>(result);
-  if (auto *typealias = dyn_cast<TypeAliasDecl>(result)) {
+  if (isa<TypeAliasDecl>(result)) {
     // TODO: Do we have to follow through multiple layers of typealiases
     //       here? Or will getCanonicalType() do that for us?
     auto canType = codingKeysType->getCanonicalType();
diff --git a/lib/Sema/ITCDecl.cpp b/lib/Sema/ITCDecl.cpp
index 5c18835..76ae9cc 100644
--- a/lib/Sema/ITCDecl.cpp
+++ b/lib/Sema/ITCDecl.cpp
@@ -61,10 +61,6 @@
         }
       }
     }
-
-    if (!isa<EnumDecl>(typeDecl)) {
-      options |= TR_NonEnumInheritanceClauseOuterLayer;
-    }
   } else {
     auto ext = decl.get<ExtensionDecl *>();
     inheritanceClause = ext->getInherited();
@@ -258,8 +254,6 @@
     // FIXME: We'd prefer to keep what the user wrote here.
     if (inherited.getType()->isExistentialType()) {
       auto layout = inherited.getType()->getExistentialLayout();
-      assert(!layout.superclass && "Need to redo inheritance clause "
-             "typechecking");
       for (auto inheritedProtocolTy: layout.getProtocols()) {
         auto *inheritedProtocol = inheritedProtocolTy->getDecl();
 
diff --git a/lib/Sema/InstrumenterSupport.cpp b/lib/Sema/InstrumenterSupport.cpp
index 3f269c9..b857f62 100644
--- a/lib/Sema/InstrumenterSupport.cpp
+++ b/lib/Sema/InstrumenterSupport.cpp
@@ -61,7 +61,7 @@
     return {true, E};
   }
   bool walkToDeclPre(Decl *D) override {
-    if (ValueDecl *VD = dyn_cast<ValueDecl>(D)) {
+    if (auto *VD = dyn_cast<ValueDecl>(D)) {
       if (!VD->hasInterfaceType() || VD->getInterfaceType()->hasError()) {
         error = true;
         return false;
diff --git a/lib/Sema/InstrumenterSupport.h b/lib/Sema/InstrumenterSupport.h
index 297cc2f..dd4e71c 100644
--- a/lib/Sema/InstrumenterSupport.h
+++ b/lib/Sema/InstrumenterSupport.h
@@ -59,7 +59,7 @@
       }
     }
     std::pair<bool, Expr *> walkToExprPre(Expr *E) override {
-      if (ClosureExpr *CE = dyn_cast<ClosureExpr>(E)) {
+      if (auto *CE = dyn_cast<ClosureExpr>(E)) {
         BraceStmt *B = CE->getBody();
         if (B) {
           BraceStmt *NB = I.transformBraceStmt(B);
diff --git a/lib/Sema/MiscDiagnostics.cpp b/lib/Sema/MiscDiagnostics.cpp
index f6ec9de..e597c39 100644
--- a/lib/Sema/MiscDiagnostics.cpp
+++ b/lib/Sema/MiscDiagnostics.cpp
@@ -2011,7 +2011,7 @@
         if (node.is<Decl *>()) {
           // Flag all variables in a PatternBindingDecl
           Decl *D = node.get<Decl *>();
-          PatternBindingDecl *PBD = dyn_cast<PatternBindingDecl>(D);
+          auto *PBD = dyn_cast<PatternBindingDecl>(D);
           if (!PBD) continue;
           for (PatternBindingEntry PBE : PBD->getPatternList()) {
             PBE.getPattern()->forEachVariable([&](VarDecl *VD) {
@@ -2021,7 +2021,7 @@
         } else if (node.is<Stmt *>()) {
           // Flag all variables in guard statements
           Stmt *S = node.get<Stmt *>();
-          GuardStmt *GS = dyn_cast<GuardStmt>(S);
+          auto *GS = dyn_cast<GuardStmt>(S);
           if (!GS) continue;
           for (StmtConditionElement SCE : GS->getCond()) {
             if (auto pattern = SCE.getPatternOrNull()) {
@@ -2594,7 +2594,7 @@
   if (!loopVarDecl || loopVarDecl->getNumPatternEntries() != 1)
     return;
 
-  VarDecl *loopVar = dyn_cast<VarDecl>(initializers[1]);
+  auto *loopVar = dyn_cast<VarDecl>(initializers[1]);
   Expr *startValue = loopVarDecl->getInit(0);
   OperatorKind OpKind;
   Expr *endValue = endConditionValueForConvertingCStyleForLoop(FS, loopVar, OpKind);
@@ -2926,7 +2926,7 @@
     : TC(tc), DC(dc), SelectorTy(selectorTy) { }
 
   std::pair<bool, Expr *> walkToExprPre(Expr *expr) override {
-    StringLiteralExpr *stringLiteral = dyn_cast<StringLiteralExpr>(expr);
+    auto *stringLiteral = dyn_cast<StringLiteralExpr>(expr);
     bool fromStringLiteral = false;
     bool hadParens = false;
     if (stringLiteral) {
diff --git a/lib/Sema/NameBinding.cpp b/lib/Sema/NameBinding.cpp
index aca4525..a8cce31 100644
--- a/lib/Sema/NameBinding.cpp
+++ b/lib/Sema/NameBinding.cpp
@@ -326,7 +326,7 @@
   // Do a prepass over the declarations to find and load the imported modules
   // and map operator decls.
   for (auto D : llvm::makeArrayRef(SF.Decls).slice(StartElem)) {
-    if (ImportDecl *ID = dyn_cast<ImportDecl>(D)) {
+    if (auto *ID = dyn_cast<ImportDecl>(D)) {
       Binder.addImport(ImportedModules, ID);
     } else if (auto *OD = dyn_cast<PrefixOperatorDecl>(D)) {
       insertOperatorDecl(Binder, SF.PrefixOperators, OD);
diff --git a/lib/Sema/PCMacro.cpp b/lib/Sema/PCMacro.cpp
index e5ab9ce..275c6ba 100644
--- a/lib/Sema/PCMacro.cpp
+++ b/lib/Sema/PCMacro.cpp
@@ -126,12 +126,12 @@
                                             // See the elseif.swift test.
       Stmt *NES = transformStmt(ES);
       if (ElseLoc.isValid()) {
-        if (BraceStmt *BS = dyn_cast<BraceStmt>(NES)) {
+        if (auto *BS = dyn_cast<BraceStmt>(NES)) {
           BraceStmt *NBS = prependLoggerCall(BS, ElseLoc);
           if (NBS != ES) {
             IS->setElseStmt(NBS);
           }
-        } else if (IfStmt *EIS = dyn_cast<IfStmt>(NES)) {
+        } else if (auto *EIS = dyn_cast<IfStmt>(NES)) {
           // FIXME: here we should use the old range to show a better highlight
           // (including the previous else)
           if (EIS != ES) {
@@ -270,7 +270,7 @@
   }
 
   DoStmt *transformDoStmt(DoStmt *DS) {
-    if (BraceStmt *B = dyn_cast_or_null<BraceStmt>(DS->getBody())) {
+    if (auto *B = dyn_cast_or_null<BraceStmt>(DS->getBody())) {
       BraceStmt *NB = transformBraceStmt(B);
       if (NB != B) {
         DS->setBody(NB);
@@ -280,14 +280,14 @@
   }
 
   DoCatchStmt *transformDoCatchStmt(DoCatchStmt *DCS) {
-    if (BraceStmt *B = dyn_cast_or_null<BraceStmt>(DCS->getBody())) {
+    if (auto *B = dyn_cast_or_null<BraceStmt>(DCS->getBody())) {
       BraceStmt *NB = transformBraceStmt(B);
       if (NB != B) {
         DCS->setBody(NB);
       }
     }
     for (CatchStmt *C : DCS->getCatches()) {
-      if (BraceStmt *CB = dyn_cast_or_null<BraceStmt>(C->getBody())) {
+      if (auto *CB = dyn_cast_or_null<BraceStmt>(C->getBody())) {
         BraceStmt *NCB = transformBraceStmt(CB);
         if (NCB != CB) {
           C->setBody(NCB);
@@ -300,7 +300,7 @@
   Decl *transformDecl(Decl *D) {
     if (D->isImplicit())
       return D;
-    if (FuncDecl *FD = dyn_cast<FuncDecl>(D)) {
+    if (auto *FD = dyn_cast<FuncDecl>(D)) {
       if (BraceStmt *B = FD->getBody()) {
         BraceStmt *NB = transformBraceStmt(B);
         // Since it would look strange going straight to the first line in a
@@ -341,7 +341,7 @@
 
     for (size_t EI = 0; EI != Elements.size(); ++EI) {
       swift::ASTNode &Element = Elements[EI];
-      if (Expr *E = Element.dyn_cast<Expr *>()) {
+      if (auto *E = Element.dyn_cast<Expr *>()) {
         E->walk(CF);
 
         Added<Stmt *> LogBefore = buildLoggerCall(E->getSourceRange(), true);
@@ -353,9 +353,9 @@
           Elements.insert(Elements.begin() + (EI + 2), *LogAfter);
           EI += 2;
         }
-      } else if (Stmt *S = Element.dyn_cast<Stmt *>()) {
+      } else if (auto *S = Element.dyn_cast<Stmt *>()) {
         S->walk(CF);
-        if (ReturnStmt *RS = dyn_cast<ReturnStmt>(S)) {
+        if (auto *RS = dyn_cast<ReturnStmt>(S)) {
           if (RS->hasResult()) {
             std::pair<PatternBindingDecl *, VarDecl *> PV =
                 buildPatternAndVariable(RS->getResult());
@@ -392,7 +392,7 @@
               EI += 2;
             }
           }
-        } else if (ContinueStmt *CS = dyn_cast<ContinueStmt>(S)) {
+        } else if (auto *CS = dyn_cast<ContinueStmt>(S)) {
           Added<Stmt *> LogBefore = buildLoggerCall(CS->getSourceRange(), true);
           Added<Stmt *> LogAfter = buildLoggerCall(CS->getSourceRange(), false);
           if (*LogBefore && *LogAfter) {
@@ -402,7 +402,7 @@
             EI += 2;
           }
 
-        } else if (BreakStmt *BS = dyn_cast<BreakStmt>(S)) {
+        } else if (auto *BS = dyn_cast<BreakStmt>(S)) {
           Added<Stmt *> LogBefore = buildLoggerCall(BS->getSourceRange(), true);
           Added<Stmt *> LogAfter = buildLoggerCall(BS->getSourceRange(), false);
           if (*LogBefore && *LogAfter) {
@@ -412,7 +412,7 @@
             EI += 2;
           }
 
-        } else if (FallthroughStmt *FS = dyn_cast<FallthroughStmt>(S)) {
+        } else if (auto *FS = dyn_cast<FallthroughStmt>(S)) {
           Added<Stmt *> LogBefore = buildLoggerCall(FS->getSourceRange(), true);
           Added<Stmt *> LogAfter = buildLoggerCall(FS->getSourceRange(), false);
           if (*LogBefore && *LogAfter) {
@@ -428,7 +428,7 @@
             Elements[EI] = NS;
           }
         }
-      } else if (Decl *D = Element.dyn_cast<Decl *>()) {
+      } else if (auto *D = Element.dyn_cast<Decl *>()) {
         D->walk(CF);
         if (auto *PBD = dyn_cast<PatternBindingDecl>(D)) {
           // FIXME: Should iterate all var decls
@@ -684,7 +684,7 @@
     ExpressionFinder(TopLevelContext &TLC) : TLC(TLC) {}
 
     bool walkToDeclPre(Decl *D) override {
-      if (AbstractFunctionDecl *FD = dyn_cast<AbstractFunctionDecl>(D)) {
+      if (auto *FD = dyn_cast<AbstractFunctionDecl>(D)) {
         if (!FD->isImplicit()) {
           if (FD->getBody()) {
             ASTContext &ctx = FD->getASTContext();
@@ -698,7 +698,7 @@
             return false;
           }
         }
-      } else if (TopLevelCodeDecl *TLCD = dyn_cast<TopLevelCodeDecl>(D)) {
+      } else if (auto *TLCD = dyn_cast<TopLevelCodeDecl>(D)) {
         if (!TLCD->isImplicit()) {
           if (BraceStmt *Body = TLCD->getBody()) {
             ASTContext &ctx = static_cast<Decl *>(TLCD)->getASTContext();
diff --git a/lib/Sema/PlaygroundTransform.cpp b/lib/Sema/PlaygroundTransform.cpp
index ecdc2a7..791df35 100644
--- a/lib/Sema/PlaygroundTransform.cpp
+++ b/lib/Sema/PlaygroundTransform.cpp
@@ -243,7 +243,7 @@
   }
 
   DoStmt *transformDoStmt(DoStmt *DS) {
-    if (BraceStmt *B = dyn_cast_or_null<BraceStmt>(DS->getBody())) {
+    if (auto *B = dyn_cast_or_null<BraceStmt>(DS->getBody())) {
       BraceStmt *NB = transformBraceStmt(B);
       if (NB != B) {
         DS->setBody(NB);
@@ -253,14 +253,14 @@
   }
 
   DoCatchStmt *transformDoCatchStmt(DoCatchStmt *DCS) {
-    if (BraceStmt *B = dyn_cast_or_null<BraceStmt>(DCS->getBody())) {
+    if (auto *B = dyn_cast_or_null<BraceStmt>(DCS->getBody())) {
       BraceStmt *NB = transformBraceStmt(B);
       if (NB != B) {
         DCS->setBody(NB);
       }
     }
     for (CatchStmt *C : DCS->getCatches()) {
-      if (BraceStmt *CB = dyn_cast_or_null<BraceStmt>(C->getBody())) {
+      if (auto *CB = dyn_cast_or_null<BraceStmt>(C->getBody())) {
         BraceStmt *NCB = transformBraceStmt(CB);
         if (NCB != CB) {
           C->setBody(NCB);
@@ -273,7 +273,7 @@
   Decl *transformDecl(Decl *D) {
     if (D->isImplicit())
       return D;
-    if (FuncDecl *FD = dyn_cast<FuncDecl>(D)) {
+    if (auto *FD = dyn_cast<FuncDecl>(D)) {
       if (BraceStmt *B = FD->getBody()) {
         TargetKindSetter TKS(BracePairs, BracePair::TargetKinds::Return);
         BraceStmt *NB = transformBraceStmt(B);
@@ -376,9 +376,9 @@
 
     for (size_t EI = 0; EI != Elements.size(); ++EI) {
       swift::ASTNode &Element = Elements[EI];
-      if (Expr *E = Element.dyn_cast<Expr *>()) {
+      if (auto *E = Element.dyn_cast<Expr *>()) {
         E->walk(CF);
-        if (AssignExpr *AE = dyn_cast<AssignExpr>(E)) {
+        if (auto *AE = dyn_cast<AssignExpr>(E)) {
           if (auto *MRE = dyn_cast<MemberRefExpr>(AE->getDest())) {
             // an assignment to a property of an object counts as a mutation of
             // that object
@@ -422,9 +422,9 @@
               EI += 3;
             }
           }
-        } else if (ApplyExpr *AE = dyn_cast<ApplyExpr>(E)) {
+        } else if (auto *AE = dyn_cast<ApplyExpr>(E)) {
           bool Handled = false;
-          if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(AE->getFn())) {
+          if (auto *DRE = dyn_cast<DeclRefExpr>(AE->getFn())) {
             auto *FnD = dyn_cast<AbstractFunctionDecl>(DRE->getDecl());
             if (FnD && FnD->getModuleContext() == Context.TheStdlibModule) {
               StringRef FnName = FnD->getNameStr();
@@ -520,9 +520,9 @@
             }
           }
         }
-      } else if (Stmt *S = Element.dyn_cast<Stmt *>()) {
+      } else if (auto *S = Element.dyn_cast<Stmt *>()) {
         S->walk(CF);
-        if (ReturnStmt *RS = dyn_cast<ReturnStmt>(S)) {
+        if (auto *RS = dyn_cast<ReturnStmt>(S)) {
           if (RS->hasResult()) {
             std::pair<PatternBindingDecl *, VarDecl *> PV =
                 buildPatternAndVariable(RS->getResult());
@@ -559,7 +559,7 @@
             Elements[EI] = NS;
           }
         }
-      } else if (Decl *D = Element.dyn_cast<Decl *>()) {
+      } else if (auto *D = Element.dyn_cast<Decl *>()) {
         D->walk(CF);
         if (auto *PBD = dyn_cast<PatternBindingDecl>(D)) {
           if (VarDecl *VD = PBD->getSingleVar()) {
@@ -612,7 +612,7 @@
   }
 
   Added<Stmt *> logDeclOrMemberRef(Added<Expr *> RE) {
-    if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(*RE)) {
+    if (auto *DRE = dyn_cast<DeclRefExpr>(*RE)) {
       VarDecl *VD = cast<VarDecl>(DRE->getDecl());
 
       if (isa<ConstructorDecl>(TypeCheckDC) &&
@@ -626,7 +626,7 @@
                                     true, // implicit
                                     AccessSemantics::Ordinary, Type()),
           DRE->getSourceRange(), VD->getName().str().str().c_str());
-    } else if (MemberRefExpr *MRE = dyn_cast<MemberRefExpr>(*RE)) {
+    } else if (auto *MRE = dyn_cast<MemberRefExpr>(*RE)) {
       Expr *B = MRE->getBase();
       ConcreteDeclRef M = MRE->getMember();
 
@@ -648,7 +648,7 @@
   std::pair<PatternBindingDecl *, VarDecl *>
   maybeFixupPrintArgument(ApplyExpr *Print) {
     Expr *ArgTuple = Print->getArg();
-    if (ParenExpr *PE = dyn_cast<ParenExpr>(ArgTuple)) {
+    if (auto *PE = dyn_cast<ParenExpr>(ArgTuple)) {
       std::pair<PatternBindingDecl *, VarDecl *> PV =
           buildPatternAndVariable(PE->getSubExpr());
       PE->setSubExpr(new (Context) DeclRefExpr(
@@ -656,7 +656,7 @@
           true, // implicit
           AccessSemantics::Ordinary, PE->getSubExpr()->getType()));
       return PV;
-    } else if (TupleExpr *TE = dyn_cast<TupleExpr>(ArgTuple)) {
+    } else if (auto *TE = dyn_cast<TupleExpr>(ArgTuple)) {
       if (TE->getNumElements() == 0) {
         return std::make_pair(nullptr, nullptr);
       } else {
@@ -902,7 +902,7 @@
     ExpressionFinder(bool HP) : HighPerformance(HP) {}
 
     bool walkToDeclPre(Decl *D) override {
-      if (AbstractFunctionDecl *FD = dyn_cast<AbstractFunctionDecl>(D)) {
+      if (auto *FD = dyn_cast<AbstractFunctionDecl>(D)) {
         if (!FD->isImplicit()) {
           if (BraceStmt *Body = FD->getBody()) {
             ASTContext &ctx = FD->getASTContext();
@@ -915,7 +915,7 @@
             return false;
           }
         }
-      } else if (TopLevelCodeDecl *TLCD = dyn_cast<TopLevelCodeDecl>(D)) {
+      } else if (auto *TLCD = dyn_cast<TopLevelCodeDecl>(D)) {
         if (!TLCD->isImplicit()) {
           if (BraceStmt *Body = TLCD->getBody()) {
             ASTContext &ctx = static_cast<Decl *>(TLCD)->getASTContext();
diff --git a/lib/Sema/TypeCheckAttr.cpp b/lib/Sema/TypeCheckAttr.cpp
index 880dac5..a09bcd9 100644
--- a/lib/Sema/TypeCheckAttr.cpp
+++ b/lib/Sema/TypeCheckAttr.cpp
@@ -29,19 +29,10 @@
 using namespace swift;
 
 namespace {
-/// This visits each attribute on a decl early, before the majority of type
-/// checking has been performed for the decl.  The visitor should return true if
-/// the attribute is invalid and should be marked as such.
-class AttributeEarlyChecker : public AttributeVisitor<AttributeEarlyChecker> {
-  TypeChecker &TC;
-  Decl *D;
-
-public:
-  AttributeEarlyChecker(TypeChecker &TC, Decl *D) : TC(TC), D(D) {}
-
   /// This emits a diagnostic with a fixit to remove the attribute.
   template<typename ...ArgTypes>
-  void diagnoseAndRemoveAttr(DeclAttribute *attr, ArgTypes &&...Args) {
+  void diagnoseAndRemoveAttr(TypeChecker &TC, Decl *D, DeclAttribute *attr,
+                             ArgTypes &&...Args) {
     assert(!D->hasClangNode() && "Clang imported propagated a bogus attribute");
     if (!D->hasClangNode()) {
       SourceLoc loc = attr->getLocation();
@@ -58,6 +49,22 @@
     attr->setInvalid();
   }
 
+/// This visits each attribute on a decl early, before the majority of type
+/// checking has been performed for the decl.  The visitor should return true if
+/// the attribute is invalid and should be marked as such.
+class AttributeEarlyChecker : public AttributeVisitor<AttributeEarlyChecker> {
+  TypeChecker &TC;
+  Decl *D;
+
+public:
+  AttributeEarlyChecker(TypeChecker &TC, Decl *D) : TC(TC), D(D) {}
+
+  /// This emits a diagnostic with a fixit to remove the attribute.
+  template<typename ...ArgTypes>
+  void diagnoseAndRemoveAttr(DeclAttribute *attr, ArgTypes &&...Args) {
+    ::diagnoseAndRemoveAttr(TC, D, attr, std::forward<ArgTypes>(Args)...);
+  }
+
   /// Deleting this ensures that all attributes are covered by the visitor
   /// below.
   bool visitDeclAttribute(DeclAttribute *A) = delete;
@@ -97,6 +104,9 @@
   IGNORED_ATTR(ShowInInterface)
   IGNORED_ATTR(DiscardableResult)
   IGNORED_ATTR(Implements)
+  IGNORED_ATTR(NSKeyedArchiveLegacy)
+  IGNORED_ATTR(StaticInitializeObjCMetadata)
+  IGNORED_ATTR(NSKeyedArchiveSubclassesOnly)
 #undef IGNORED_ATTR
 
   // @noreturn has been replaced with a 'Never' return type.
@@ -719,6 +729,12 @@
   TypeChecker &TC;
   Decl *D;
 
+  /// This emits a diagnostic with a fixit to remove the attribute.
+  template<typename ...ArgTypes>
+  void diagnoseAndRemoveAttr(DeclAttribute *attr, ArgTypes &&...Args) {
+    ::diagnoseAndRemoveAttr(TC, D, attr, std::forward<ArgTypes>(Args)...);
+  }
+
 public:
   AttributeChecker(TypeChecker &TC, Decl *D) : TC(TC), D(D) {}
 
@@ -766,6 +782,8 @@
     IGNORED_ATTR(WarnUnqualifiedAccess)
     IGNORED_ATTR(ShowInInterface)
     IGNORED_ATTR(ObjCMembers)
+    IGNORED_ATTR(StaticInitializeObjCMetadata)
+    IGNORED_ATTR(NSKeyedArchiveSubclassesOnly)
 #undef IGNORED_ATTR
 
   void visitAvailableAttr(AvailableAttr *attr);
@@ -807,6 +825,7 @@
   
   void visitDiscardableResultAttr(DiscardableResultAttr *attr);
   void visitImplementsAttr(ImplementsAttr *attr);
+  void visitNSKeyedArchiveLegacyAttr(NSKeyedArchiveLegacyAttr *attr);
 };
 } // end anonymous namespace
 
@@ -1940,6 +1959,18 @@
   }
 }
 
+void AttributeChecker::visitNSKeyedArchiveLegacyAttr(
+                                              NSKeyedArchiveLegacyAttr *attr) {
+  auto classDecl = dyn_cast<ClassDecl>(D);
+  if (!classDecl) return;
+
+  // Generic classes can't use @NSKeyedArchiveLegacy.
+  if (classDecl->getGenericSignatureOfContext()) {
+    diagnoseAndRemoveAttr(attr, diag::attr_nskeyedarchivelegacy_generic,
+                          classDecl->getDeclaredInterfaceType());
+  }
+}
+
 void TypeChecker::checkDeclAttributes(Decl *D) {
   AttributeChecker Checker(*this, D);
 
diff --git a/lib/Sema/TypeCheckAvailability.cpp b/lib/Sema/TypeCheckAvailability.cpp
index eaa504e..d9127fe 100644
--- a/lib/Sema/TypeCheckAvailability.cpp
+++ b/lib/Sema/TypeCheckAvailability.cpp
@@ -376,7 +376,7 @@
       }
     }
 
-    BraceStmt *ParentBrace = dyn_cast<BraceStmt>(Parent.getAsStmt());
+    auto *ParentBrace = dyn_cast<BraceStmt>(Parent.getAsStmt());
     assert(ParentBrace && "Expected parent of GuardStmt to be BraceStmt");
     if (!FallthroughRange.hasValue())
       return;
diff --git a/lib/Sema/TypeCheckConstraints.cpp b/lib/Sema/TypeCheckConstraints.cpp
index b87b28b..23e20dc 100644
--- a/lib/Sema/TypeCheckConstraints.cpp
+++ b/lib/Sema/TypeCheckConstraints.cpp
@@ -29,6 +29,7 @@
 #include "swift/AST/PrettyStackTrace.h"
 #include "swift/AST/SubstitutionMap.h"
 #include "swift/AST/TypeCheckerDebugConsumer.h"
+#include "swift/Parse/Confusables.h"
 #include "swift/Parse/Lexer.h"
 #include "llvm/ADT/APInt.h"
 #include "llvm/ADT/DenseMap.h"
@@ -454,9 +455,39 @@
     diagnose(Loc, diag::use_unresolved_identifier, Name, Name.isOperator())
       .highlight(UDRE->getSourceRange());
 
-    // Note all the correction candidates.
-    for (auto &result : Lookup) {
-      noteTypoCorrection(Name, nameLoc, result);
+    const char *buffer = Name.getBaseName().get();
+    llvm::SmallString<64> expectedIdentifier;
+    bool isConfused = false;
+    uint32_t codepoint;
+    int offset = 0;
+    while ((codepoint = validateUTF8CharacterAndAdvance(buffer,
+                                                        buffer +
+                                                        strlen(buffer)))
+           != ~0U) {
+      int length = (buffer - Name.getBaseName().get()) - offset;
+      char expectedCodepoint;
+      if ((expectedCodepoint =
+           confusable::tryConvertConfusableCharacterToASCII(codepoint))) {
+        isConfused = true;
+        expectedIdentifier += expectedCodepoint;
+      } else {
+        expectedIdentifier += (char)codepoint;
+      }
+
+      offset += length;
+    }
+
+    if (isConfused) {
+      diagnose(Loc, diag::confusable_character,
+               UDRE->getName().isOperator(),
+               Name.getBaseName().str(), expectedIdentifier)
+        .fixItReplaceChars(Loc, Loc.getAdvancedLoc(Name.getBaseName().getLength()),
+                           expectedIdentifier);
+    } else {
+      // Note all the correction candidates.
+      for (auto &result : Lookup) {
+        noteTypoCorrection(Name, nameLoc, result);
+      }
     }
 
     // TODO: consider recovering from here.  We may want some way to suppress
@@ -946,6 +977,11 @@
       if (auto *simplified = simplifyTypeExpr(expr))
         return simplified;
 
+      if (auto KPE = dyn_cast<KeyPathExpr>(expr)) {
+        resolveKeyPathExpr(KPE);
+        return KPE;
+      }
+
       return expr;
     }
 
@@ -958,6 +994,9 @@
     /// as expressions due to the parser not knowing which identifiers are
     /// type names.
     TypeExpr *simplifyTypeExpr(Expr *E);
+
+    /// Simplify a key path expression into a canonical form.
+    void resolveKeyPathExpr(KeyPathExpr *KPE);
   };
 } // end anonymous namespace
 
@@ -1149,7 +1188,7 @@
     if (AE->getElements().size() != 1)
       return nullptr;
 
-    TypeExpr *TyExpr = dyn_cast<TypeExpr>(AE->getElement(0));
+    auto *TyExpr = dyn_cast<TypeExpr>(AE->getElement(0));
     if (!TyExpr)
       return nullptr;
 
@@ -1169,11 +1208,11 @@
     TypeRepr *keyTypeRepr, *valueTypeRepr;
     
     if (auto EltTuple = dyn_cast<TupleExpr>(DE->getElement(0))) {
-      TypeExpr *KeyTyExpr = dyn_cast<TypeExpr>(EltTuple->getElement(0));
+      auto *KeyTyExpr = dyn_cast<TypeExpr>(EltTuple->getElement(0));
       if (!KeyTyExpr)
         return nullptr;
 
-      TypeExpr *ValueTyExpr = dyn_cast<TypeExpr>(EltTuple->getElement(1));
+      auto *ValueTyExpr = dyn_cast<TypeExpr>(EltTuple->getElement(1));
       if (!ValueTyExpr)
         return nullptr;
      
@@ -1302,6 +1341,103 @@
   return nullptr;
 }
 
+void PreCheckExpression::resolveKeyPathExpr(KeyPathExpr *KPE) {
+  if (KPE->isObjC())
+    return;
+
+  TypeRepr *rootType = nullptr;
+  SmallVector<KeyPathExpr::Component, 4> components;
+
+  // Pre-order visit of a sequence foo.bar[0]?.baz, which means that the
+  // components are pushed in reverse order.
+
+  auto traversePath = [&](Expr *expr, bool isInParsedPath,
+                          bool emitErrors = true) {
+    Expr *outermostExpr = expr;
+    while (1) {
+      // Base cases: we've reached the top.
+      if (auto TE = dyn_cast<TypeExpr>(expr)) {
+        assert(!isInParsedPath);
+        rootType = TE->getTypeRepr();
+        return;
+      } else if (isa<KeyPathDotExpr>(expr)) {
+        assert(isInParsedPath);
+        // Nothing here: the type is either the root, or is inferred.
+        return;
+      }
+
+      // Recurring cases:
+      if (auto UDE = dyn_cast<UnresolvedDotExpr>(expr)) {
+        // .foo
+        components.push_back(KeyPathExpr::Component::forUnresolvedProperty(
+            UDE->getName(), UDE->getLoc()));
+
+        expr = UDE->getBase();
+      } else if (auto SE = dyn_cast<SubscriptExpr>(expr)) {
+        // .[0] or just plain [0]
+        components.push_back(
+            KeyPathExpr::Component::forUnresolvedSubscriptWithPrebuiltIndexExpr(
+                SE->getIndex(), SE->getLoc()));
+
+        expr = SE->getBase();
+      } else if (auto BOE = dyn_cast<BindOptionalExpr>(expr)) {
+        // .? or ?
+        components.push_back(KeyPathExpr::Component::forUnresolvedOptionalChain(
+            BOE->getQuestionLoc()));
+
+        expr = BOE->getSubExpr();
+      } else if (auto FVE = dyn_cast<ForceValueExpr>(expr)) {
+        // .! or !
+        components.push_back(KeyPathExpr::Component::forUnresolvedOptionalForce(
+            FVE->getExclaimLoc()));
+
+        expr = FVE->getSubExpr();
+      } else if (auto OEE = dyn_cast<OptionalEvaluationExpr>(expr)) {
+        // Do nothing: this is implied to exist as the last expression, by the
+        // BindOptionalExprs, but is irrelevant to the components.
+        assert(OEE == outermostExpr);
+        expr = OEE->getSubExpr();
+      } else {
+        if (emitErrors)
+          TC.diagnose(expr->getLoc(),
+                      diag::expr_swift_keypath_invalid_component);
+        return;
+      }
+    }
+  };
+
+  auto root = KPE->getParsedRoot();
+  auto path = KPE->getParsedPath();
+
+  if (path) {
+    traversePath(path, /*isInParsedPath=*/true);
+
+    // This path looks like \Foo.Bar.[0].baz, which means Foo.Bar has to be a
+    // type.
+    if (root) {
+      if (auto TE = dyn_cast<TypeExpr>(root)) {
+        rootType = TE->getTypeRepr();
+      } else {
+        // FIXME: Probably better to catch this case earlier and force-eval as
+        // TypeExpr.
+        TC.diagnose(root->getLoc(),
+                    diag::expr_swift_keypath_not_starting_with_type);
+
+        // Traverse this path for recovery purposes: it may be a typo like
+        // \Foo.property.[0].
+        traversePath(root, /*isInParsedPath=*/false,
+                     /*emitErrors=*/false);
+      }
+    }
+  } else {
+    traversePath(root, /*isInParsedPath=*/false);
+  }
+
+  std::reverse(components.begin(), components.end());
+
+  KPE->setRootType(rootType);
+  KPE->resolveComponents(TC.Context, components);
+}
 
 /// \brief Clean up the given ill-formed expression, removing any references
 /// to type variables and setting error types on erroneous expression nodes.
@@ -2186,7 +2322,7 @@
 /// \brief Compute the rvalue type of the given expression, which is the
 /// destination of an assignment statement.
 Type ConstraintSystem::computeAssignDestType(Expr *dest, SourceLoc equalLoc) {
-  if (TupleExpr *TE = dyn_cast<TupleExpr>(dest)) {
+  if (auto *TE = dyn_cast<TupleExpr>(dest)) {
     auto &ctx = getASTContext();
     SmallVector<TupleTypeElt, 4> destTupleTypes;
     for (unsigned i = 0; i != TE->getNumElements(); ++i) {
diff --git a/lib/Sema/TypeCheckDecl.cpp b/lib/Sema/TypeCheckDecl.cpp
index 26b31cb..8d84a69 100644
--- a/lib/Sema/TypeCheckDecl.cpp
+++ b/lib/Sema/TypeCheckDecl.cpp
@@ -385,6 +385,55 @@
     }
   }
 
+  // Retrieve the location of the start of the inheritance clause.
+  auto getStartLocOfInheritanceClause = [&] {
+    if (auto genericTypeDecl = dyn_cast<GenericTypeDecl>(decl)) {
+      if (auto genericParams = genericTypeDecl->getGenericParams())
+        return genericParams->getSourceRange().End;
+
+      return genericTypeDecl->getNameLoc();
+    }
+
+    if (auto typeDecl = dyn_cast<TypeDecl>(decl))
+      return typeDecl->getNameLoc();
+
+    if (auto ext = dyn_cast<ExtensionDecl>(decl))
+      return ext->getSourceRange().End;
+
+    return SourceLoc();
+  };
+
+  // Compute the source range to be used when removing something from an
+  // inheritance clause.
+  auto getRemovalRange = [&](unsigned i) {
+    // If there is just one entry, remove the entire inheritance clause.
+    if (inheritedClause.size() == 1) {
+      SourceLoc start = getStartLocOfInheritanceClause();
+      SourceLoc end = inheritedClause[i].getSourceRange().End;
+      return SourceRange(Lexer::getLocForEndOfToken(Context.SourceMgr, start),
+                         Lexer::getLocForEndOfToken(Context.SourceMgr, end));
+    }
+
+    // If we're at the first entry, remove from the start of this entry to the
+    // start of the next entry.
+    if (i == 0) {
+      return SourceRange(inheritedClause[i].getSourceRange().Start,
+                         inheritedClause[i+1].getSourceRange().Start);
+    }
+
+    // Otherwise, remove from the end of the previous entry to the end of this
+    // entry.
+    SourceLoc afterPriorLoc =
+      Lexer::getLocForEndOfToken(Context.SourceMgr,
+                                 inheritedClause[i-1].getSourceRange().End);
+
+    SourceLoc afterMyEndLoc =
+      Lexer::getLocForEndOfToken(Context.SourceMgr,
+                                 inheritedClause[i].getSourceRange().End);
+
+    return SourceRange(afterPriorLoc, afterMyEndLoc);
+  };
+
   // Check all of the types listed in the inheritance clause.
   Type superclassTy;
   SourceRange superclassRange;
@@ -424,16 +473,10 @@
     CanType inheritedCanTy = inheritedTy->getCanonicalType();
     auto knownType = inheritedTypes.find(inheritedCanTy);
     if (knownType != inheritedTypes.end()) {
-      SourceLoc afterPriorLoc
-        = Lexer::getLocForEndOfToken(Context.SourceMgr,
-                                     inheritedClause[i-1].getSourceRange().End);
-      SourceLoc afterMyEndLoc
-        = Lexer::getLocForEndOfToken(Context.SourceMgr,
-                                     inherited.getSourceRange().Start);
-
+      auto removeRange = getRemovalRange(i);
       diagnose(inherited.getSourceRange().Start,
                diag::duplicate_inheritance, inheritedTy)
-        .fixItRemoveChars(afterPriorLoc, afterMyEndLoc)
+        .fixItRemoveChars(removeRange.Start, removeRange.End)
         .highlight(knownType->second);
       inherited.setInvalidType(Context);
       continue;
@@ -444,11 +487,31 @@
     // protocols.
     if (inheritedTy->isExistentialType()) {
       auto layout = inheritedTy->getExistentialLayout();
-      for (auto proto : layout.getProtocols()) {
-        auto *protoDecl = proto->getDecl();
-        allProtocols.insert(protoDecl);
+
+      // Classes and extensions cannot inherit from subclass
+      // existentials or AnyObject.
+      if (isa<ProtocolDecl>(decl) ||
+          isa<AbstractTypeParamDecl>(decl) ||
+          (!layout.hasExplicitAnyObject &&
+           !layout.superclass)) {
+        for (auto proto : layout.getProtocols()) {
+          auto *protoDecl = proto->getDecl();
+          allProtocols.insert(protoDecl);
+        }
+        continue;
       }
-      continue;
+
+      // Swift 3 compatibility:
+      if (Context.LangOpts.isSwiftVersion3() && isa<ClassDecl>(decl) &&
+          inheritedTy->isAnyObject()) {
+        auto classDecl = cast<ClassDecl>(decl);
+        auto removeRange = getRemovalRange(i);
+        diagnose(inherited.getSourceRange().Start,
+                 diag::class_inherits_anyobject,
+                 classDecl->getDeclaredInterfaceType())
+          .fixItRemoveChars(removeRange.Start, removeRange.End);
+        continue;
+      }
     }
     
     // If this is an enum inheritance clause, check for a raw type.
@@ -464,17 +527,11 @@
       
       // If this is not the first entry in the inheritance clause, complain.
       if (i > 0) {
-        SourceLoc afterPriorLoc
-          = Lexer::getLocForEndOfToken(
-              Context.SourceMgr,
-              inheritedClause[i-1].getSourceRange().End);
-        SourceLoc afterMyEndLoc
-          = Lexer::getLocForEndOfToken(Context.SourceMgr,
-                                       inherited.getSourceRange().End);
+        auto removeRange = getRemovalRange(i);
 
         diagnose(inherited.getSourceRange().Start,
                  diag::raw_type_not_first, inheritedTy)
-          .fixItRemoveChars(afterPriorLoc, afterMyEndLoc)
+          .fixItRemoveChars(removeRange.Start, removeRange.End)
           .fixItInsert(inheritedClause[0].getSourceRange().Start,
                        inheritedTy.getString() + ", ");
 
@@ -524,17 +581,10 @@
 
       // If this is not the first entry in the inheritance clause, complain.
       if (i > 0) {
-        SourceLoc afterPriorLoc
-          = Lexer::getLocForEndOfToken(
-              Context.SourceMgr,
-              inheritedClause[i-1].getSourceRange().End);
-        SourceLoc afterMyEndLoc
-          = Lexer::getLocForEndOfToken(Context.SourceMgr,
-                                       inherited.getSourceRange().End);
-
+        auto removeRange = getRemovalRange(i);
         diagnose(inherited.getSourceRange().Start,
                  diag::superclass_not_first, inheritedTy)
-          .fixItRemoveChars(afterPriorLoc, afterMyEndLoc)
+          .fixItRemoveChars(removeRange.Start, removeRange.End)
           .fixItInsert(inheritedClause[0].getSourceRange().Start,
                        inheritedTy.getString() + ", ");
 
@@ -1871,6 +1921,7 @@
 
   case DeclKind::Param:
   case DeclKind::GenericTypeParam:
+  case DeclKind::MissingMember:
     llvm_unreachable("does not have accessibility");
 
   case DeclKind::IfConfig:
@@ -2472,7 +2523,8 @@
 ///
 /// This occurs when
 /// - it is implied by an attribute like @NSManaged
-/// - we need to dynamically dispatch to a method in an extension.
+/// - when we have an override of an imported method
+/// - we need to dynamically dispatch to a method in an extension
 ///
 /// FIXME: The latter reason is a hack. We should figure out how to safely
 /// put extension methods into the class vtable.
@@ -2485,11 +2537,15 @@
   if (!D->isObjC() || D->hasClangNode())
     return;
 
+  bool overridesImportedMethod =
+    (D->getOverriddenDecl() &&
+     D->getOverriddenDecl()->hasClangNode());
+
   // Only introduce 'dynamic' on declarations...
   bool isNSManaged = D->getAttrs().hasAttribute<NSManagedAttr>();
   if (!isa<ExtensionDecl>(D->getDeclContext())) {
     // ...and in classes on decls marked @NSManaged.
-    if (!isNSManaged)
+    if (!isNSManaged && !overridesImportedMethod)
       return;
   }
 
@@ -3864,6 +3920,10 @@
     TC.validateDecl(PGD);
   }
 
+  void visitMissingMemberDecl(MissingMemberDecl *MMD) {
+    llvm_unreachable("should always be type-checked already");
+  }
+
   void visitBoundVariable(VarDecl *VD) {
     TC.validateDecl(VD);
     
@@ -4134,7 +4194,7 @@
                                      TypeResolutionOptions(),
                                      &resolver);
     isInvalid |= TC.typeCheckParameterList(SD->getIndices(), SD,
-                                           TypeResolutionOptions(),
+                                           TR_SubscriptParameters,
                                            resolver);
 
     if (isInvalid || SD->isInvalid()) {
@@ -4527,6 +4587,27 @@
           break;
         }
 
+        if (!isInvalidSuperclass && Super->hasMissingVTableEntries()) {
+          auto *superFile = Super->getModuleScopeContext();
+          if (auto *serialized = dyn_cast<SerializedASTFile>(superFile)) {
+            if (serialized->getLanguageVersionBuiltWith() !=
+                TC.getLangOpts().EffectiveLanguageVersion) {
+              TC.diagnose(CD,
+                          diag::inheritance_from_class_with_missing_vtable_entries_versioned,
+                          Super->getName(),
+                          serialized->getLanguageVersionBuiltWith(),
+                          TC.getLangOpts().EffectiveLanguageVersion);
+              isInvalidSuperclass = true;
+            }
+          }
+          if (!isInvalidSuperclass) {
+            TC.diagnose(
+                CD, diag::inheritance_from_class_with_missing_vtable_entries,
+                Super->getName());
+            isInvalidSuperclass = true;
+          }
+        }
+
         // Require the superclass to be open if this is outside its
         // defining module.  But don't emit another diagnostic if we
         // already complained about the class being inherently
@@ -4678,35 +4759,24 @@
     // Check for static/final/class when we're in a type.
     auto dc = FD->getDeclContext();
     if (dc->isTypeContext()) {
-      // Within a class, operator functions must be 'static' or 'final'.
-      if (auto classDecl = dc->getAsClassOrClassExtensionContext()) {
-        // For a class, we also need the function or class to be 'final'.
-        if (!classDecl->isFinal() && !FD->isFinal() &&
-            FD->getStaticSpelling() != StaticSpellingKind::KeywordStatic) {
-          if (!FD->isStatic()) {
-            TC.diagnose(FD->getLoc(), diag::nonstatic_operator_in_type,
-                        operatorName,
-                        dc->getDeclaredInterfaceType())
-              .fixItInsert(FD->getAttributeInsertionLoc(/*forModifier=*/true),
-                           "static ");
-
-            FD->setStatic();
-          } else {
-            TC.diagnose(FD->getLoc(), diag::nonfinal_operator_in_class,
-                        operatorName, dc->getDeclaredInterfaceType())
-              .fixItInsert(FD->getAttributeInsertionLoc(/*forModifier=*/true),
-                           "final ");
-            FD->getAttrs().add(new (TC.Context) FinalAttr(/*IsImplicit=*/true));
-          }
-        }
-      } else if (!FD->isStatic()) {
-        // Operator functions must be static.
-        TC.diagnose(FD, diag::nonstatic_operator_in_type,
+      if (!FD->isStatic()) {
+        TC.diagnose(FD->getLoc(), diag::nonstatic_operator_in_type,
                     operatorName,
                     dc->getDeclaredInterfaceType())
           .fixItInsert(FD->getAttributeInsertionLoc(/*forModifier=*/true),
                        "static ");
+
         FD->setStatic();
+      } else if (auto classDecl = dc->getAsClassOrClassExtensionContext()) {
+        // For a class, we also need the function or class to be 'final'.
+        if (!classDecl->isFinal() && !FD->isFinal() &&
+            FD->getStaticSpelling() != StaticSpellingKind::KeywordStatic) {
+          TC.diagnose(FD->getLoc(), diag::nonfinal_operator_in_class,
+                      operatorName, dc->getDeclaredInterfaceType())
+            .fixItInsert(FD->getAttributeInsertionLoc(/*forModifier=*/true),
+                         "final ");
+          FD->getAttrs().add(new (TC.Context) FinalAttr(/*IsImplicit=*/true));
+        }
       }
     } else if (!dc->isModuleScopeContext()) {
       TC.diagnose(FD, diag::operator_in_local_scope);
@@ -5059,7 +5129,7 @@
 
       Optional<ObjCReason> isObjC = shouldMarkAsObjC(TC, FD);
 
-      ProtocolDecl *protocolContext = dyn_cast<ProtocolDecl>(
+      auto *protocolContext = dyn_cast<ProtocolDecl>(
           FD->getDeclContext());
       if (protocolContext && FD->isAccessor()) {
         if (isObjC)
@@ -5717,15 +5787,15 @@
         }
 
         // Failing that, check for subtyping.
-        auto matchMode = OverrideMatchMode::Strict;
+        TypeMatchOptions matchMode = TypeMatchFlags::AllowOverride;
         if (attempt == OverrideCheckingAttempt::MismatchedOptional ||
             attempt == OverrideCheckingAttempt::BaseNameWithMismatchedOptional){
-          matchMode = OverrideMatchMode::AllowTopLevelOptionalMismatch;
+          matchMode |= TypeMatchFlags::AllowTopLevelOptionalMismatch;
         } else if (parentDecl->isObjC()) {
-          matchMode = OverrideMatchMode::AllowNonOptionalForIUOParam;
+          matchMode |= TypeMatchFlags::AllowNonOptionalForIUOParam;
         }
 
-        if (declTy->canOverride(parentDeclTy, matchMode, &TC)) {
+        if (declTy->matches(parentDeclTy, matchMode, &TC)) {
           // If the Objective-C selectors match, always call it exact.
           matches.push_back({parentDecl, objCMatch, parentDeclTy});
           hadExactMatch |= objCMatch;
@@ -5942,9 +6012,9 @@
         auto parentPropertyTy = superclass->adjustSuperclassMemberDeclType(
             matchDecl, decl, matchDecl->getInterfaceType());
         
-        if (!propertyTy->canOverride(parentPropertyTy,
-                                     OverrideMatchMode::Strict,
-                                     &TC)) {
+        if (!propertyTy->matches(parentPropertyTy,
+                                 TypeMatchFlags::AllowOverride,
+                                 &TC)) {
           TC.diagnose(property, diag::override_property_type_mismatch,
                       property->getName(), propertyTy, parentPropertyTy);
           noteFixableMismatchedTypes(TC, decl, matchDecl);
@@ -6069,7 +6139,9 @@
 
     UNINTERESTING_ATTR(ObjCMembers)
     UNINTERESTING_ATTR(Implements)
-
+    UNINTERESTING_ATTR(NSKeyedArchiveLegacy)
+    UNINTERESTING_ATTR(StaticInitializeObjCMetadata)
+    UNINTERESTING_ATTR(NSKeyedArchiveSubclassesOnly)
 #undef UNINTERESTING_ATTR
 
     void visitAvailableAttr(AvailableAttr *attr) {
@@ -7019,6 +7091,7 @@
   case DeclKind::PostfixOperator:
   case DeclKind::PrecedenceGroup:
   case DeclKind::IfConfig:
+  case DeclKind::MissingMember:
     llvm_unreachable("not a value decl");
 
   case DeclKind::Module:
@@ -7458,6 +7531,7 @@
   case DeclKind::PostfixOperator:
   case DeclKind::PrecedenceGroup:
   case DeclKind::IfConfig:
+  case DeclKind::MissingMember:
     llvm_unreachable("not a value decl");
 
   case DeclKind::Module:
@@ -7696,15 +7770,6 @@
 
     ext->getExtendedTypeLoc().setType(extendedType);
     ext->setGenericEnvironment(env);
-
-    // Speculatively ban extension of AnyObject; it won't be a
-    // protocol forever, and we don't want to allow code that we know
-    // we'll break later.
-    if (proto->getDecl()->isSpecificProtocol(
-          KnownProtocolKind::AnyObject)) {
-      diagnose(ext, diag::extension_anyobject)
-        .highlight(ext->getExtendedTypeLoc().getSourceRange());
-    }
     return;
   }
 
diff --git a/lib/Sema/TypeCheckError.cpp b/lib/Sema/TypeCheckError.cpp
index 298cb24..aaa82a2 100644
--- a/lib/Sema/TypeCheckError.cpp
+++ b/lib/Sema/TypeCheckError.cpp
@@ -428,6 +428,20 @@
     // count, then this is a call to the opaque value returned from
     // the function.
     if (args.size() != fnRef.getNumArgumentsForFullApply()) {
+      // Special case: a reference to an operator within a type might be
+      // missing 'self'.
+      // FIXME: The issue here is that this is an ill-formed expression, but
+      // we don't know it from the structure of the expression.
+      if (args.size() == 1 && fnRef.getKind() == AbstractFunction::Function &&
+          isa<FuncDecl>(fnRef.getFunction()) &&
+          cast<FuncDecl>(fnRef.getFunction())->isOperator() &&
+          fnRef.getNumArgumentsForFullApply() == 2 &&
+          fnRef.getFunction()->getDeclContext()->isTypeContext()) {
+        // Can only happen with invalid code.
+        assert(fnRef.getFunction()->getASTContext().Diags.hadAnyError());
+        return Classification::forInvalidCode();
+      }
+
       assert(args.size() > fnRef.getNumArgumentsForFullApply() &&
              "partial application was throwing?");
       return Classification::forThrow(PotentialReason::forThrowingApply());
diff --git a/lib/Sema/TypeCheckExpr.cpp b/lib/Sema/TypeCheckExpr.cpp
index db54177..f881b29 100644
--- a/lib/Sema/TypeCheckExpr.cpp
+++ b/lib/Sema/TypeCheckExpr.cpp
@@ -167,12 +167,12 @@
                                      castExpr->getAsLoc());
   }
 
-  if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) {
+  if (auto *DRE = dyn_cast<DeclRefExpr>(E)) {
     Identifier name = DRE->getDecl()->getName();
     return lookupPrecedenceGroupForOperator(*this, DC, name, DRE->getLoc());
   }
 
-  if (OverloadedDeclRefExpr *OO = dyn_cast<OverloadedDeclRefExpr>(E)) {
+  if (auto *OO = dyn_cast<OverloadedDeclRefExpr>(E)) {
     Identifier name = OO->getDecls()[0]->getName();
     return lookupPrecedenceGroupForOperator(*this, DC, name, OO->getLoc());
   }
@@ -207,7 +207,7 @@
     return nullptr;
 
   // If the left-hand-side is a 'try', hoist it up.
-  AnyTryExpr *tryEval = dyn_cast<AnyTryExpr>(LHS);
+  auto *tryEval = dyn_cast<AnyTryExpr>(LHS);
   if (tryEval) {
     LHS = tryEval->getSubExpr();
   }
diff --git a/lib/Sema/TypeCheckGeneric.cpp b/lib/Sema/TypeCheckGeneric.cpp
index 21a9721..dd867d8 100644
--- a/lib/Sema/TypeCheckGeneric.cpp
+++ b/lib/Sema/TypeCheckGeneric.cpp
@@ -899,7 +899,8 @@
 
     Type selfTy;
     if (i == e-1 && hasSelf) {
-      selfTy = func->computeInterfaceSelfType();
+      selfTy = ParenType::get(Context, func->computeInterfaceSelfType());
+
       // Substitute in our own 'self' parameter.
 
       argTy = selfTy;
@@ -990,7 +991,7 @@
   auto params = subscript->getIndices();
 
   badType |= tc.typeCheckParameterList(params, subscript,
-                                       TypeResolutionOptions(),
+                                       TR_SubscriptParameters,
                                        resolver);
 
   // Infer requirements from the pattern.
@@ -1246,11 +1247,12 @@
     LookupConformanceFn conformances,
     UnsatisfiedDependency *unsatisfiedDependency,
     ConformanceCheckOptions conformanceOptions,
-    GenericRequirementsCheckListener *listener) {
+    GenericRequirementsCheckListener *listener,
+    SubstOptions options) {
   bool valid = true;
 
   for (const auto &rawReq : genericSig->getRequirements()) {
-    auto req = rawReq.subst(substitutions, conformances);
+    auto req = rawReq.subst(substitutions, conformances, options);
     if (!req) {
       // Another requirement will fail later; just continue.
       valid = false;
@@ -1286,6 +1288,7 @@
       switch (status) {
       case RequirementCheckResult::UnsatisfiedDependency:
       case RequirementCheckResult::Failure:
+      case RequirementCheckResult::SubstitutionFailure:
         // pass it on up.
         return status;
       case RequirementCheckResult::Success:
@@ -1308,14 +1311,16 @@
     case RequirementKind::Superclass:
       // Superclass requirements.
       if (!isSubtypeOf(firstType, secondType, dc)) {
-        // FIXME: Poor source-location information.
-        diagnose(loc, diag::type_does_not_inherit, owner, firstType,
-                 secondType);
+        if (loc.isValid()) {
+          // FIXME: Poor source-location information.
+          diagnose(loc, diag::type_does_not_inherit, owner, firstType,
+                   secondType);
 
-        diagnose(noteLoc, diag::type_does_not_inherit_requirement, rawFirstType,
-                 rawSecondType,
-                 genericSig->gatherGenericParamBindingsText(
-                     {rawFirstType, rawSecondType}, substitutions));
+          diagnose(noteLoc, diag::type_does_not_inherit_requirement,
+                   rawFirstType, rawSecondType,
+                   genericSig->gatherGenericParamBindingsText(
+                       {rawFirstType, rawSecondType}, substitutions));
+        }
 
         return RequirementCheckResult::Failure;
       }
@@ -1323,13 +1328,15 @@
 
     case RequirementKind::SameType:
       if (!firstType->isEqual(secondType)) {
-        // FIXME: Better location info for both diagnostics.
-        diagnose(loc, diag::types_not_equal, owner, firstType, secondType);
+        if (loc.isValid()) {
+          // FIXME: Better location info for both diagnostics.
+          diagnose(loc, diag::types_not_equal, owner, firstType, secondType);
 
-        diagnose(noteLoc, diag::types_not_equal_requirement, rawFirstType,
-                 rawSecondType,
-                 genericSig->gatherGenericParamBindingsText(
-                     {rawFirstType, rawSecondType}, substitutions));
+          diagnose(noteLoc, diag::types_not_equal_requirement, rawFirstType,
+                   rawSecondType,
+                   genericSig->gatherGenericParamBindingsText(
+                       {rawFirstType, rawSecondType}, substitutions));
+        }
 
         return RequirementCheckResult::Failure;
       }
@@ -1339,5 +1346,5 @@
 
   if (valid)
     return RequirementCheckResult::Success;
-  return RequirementCheckResult::Failure;
+  return RequirementCheckResult::SubstitutionFailure;
 }
diff --git a/lib/Sema/TypeCheckPattern.cpp b/lib/Sema/TypeCheckPattern.cpp
index 31c3263..6b224dd 100644
--- a/lib/Sema/TypeCheckPattern.cpp
+++ b/lib/Sema/TypeCheckPattern.cpp
@@ -766,17 +766,22 @@
     }
     decl->getTypeLoc().setType(Ty);
   }
-  // If the param is not a 'let' and it is not an 'inout'.
-  // It must be a 'var'. Provide helpful diagnostics like a shadow copy
-  // in the function body to fix the 'var' attribute.
-  if (!decl->isLet() &&
-      !decl->isImplicit() &&
-      (Ty.isNull() || !Ty->is<InOutType>()) &&
-      !hadError) {
-    auto func = dyn_cast_or_null<AbstractFunctionDecl>(DC);
-    diagnoseAndMigrateVarParameterToBody(decl, func, TC);
-    decl->setInvalid();
-    hadError = true;
+
+  // If the user did not explicitly write 'let', 'var', or 'inout', we'll let
+  // type inference figure out what went wrong in detail.
+  if (decl->getLetVarInOutLoc().isValid()) {
+    // If the param is not a 'let' and it is not an 'inout'.
+    // It must be a 'var'. Provide helpful diagnostics like a shadow copy
+    // in the function body to fix the 'var' attribute.
+    if (!decl->isLet() &&
+        !decl->isImplicit() &&
+        (Ty.isNull() || !Ty->is<InOutType>()) &&
+        !hadError) {
+      auto func = dyn_cast_or_null<AbstractFunctionDecl>(DC);
+      diagnoseAndMigrateVarParameterToBody(decl, func, TC);
+      decl->setInvalid();
+      hadError = true;
+    }
   }
 
   if (hadError)
diff --git a/lib/Sema/TypeCheckProtocol.cpp b/lib/Sema/TypeCheckProtocol.cpp
index d9e6c4c..626e189 100644
--- a/lib/Sema/TypeCheckProtocol.cpp
+++ b/lib/Sema/TypeCheckProtocol.cpp
@@ -23,6 +23,7 @@
 #include "swift/AST/AccessScope.h"
 #include "swift/AST/GenericSignatureBuilder.h"
 #include "swift/AST/ASTContext.h"
+#include "swift/AST/ASTMangler.h"
 #include "swift/AST/ASTPrinter.h"
 #include "swift/AST/Decl.h"
 #include "swift/AST/ExistentialLayout.h"
@@ -37,6 +38,7 @@
 #include "swift/Basic/Defer.h"
 #include "swift/ClangImporter/ClangModule.h"
 #include "swift/Sema/IDETypeChecking.h"
+#include "swift/Serialization/SerializedModuleLoader.h"
 #include "llvm/ADT/ScopedHashTable.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/Support/Compiler.h"
@@ -1360,39 +1362,82 @@
                                unsigned &numViable,
                                unsigned &bestIdx,
                                bool &doNotDiagnoseMatches) {
-  auto witnesses = lookupValueWitnesses(requirement, ignoringNames);
+  enum Attempt {
+    Regular,
+    OperatorsFromOverlay,
+    Done
+  };
 
-  // Match each of the witnesses to the requirement.
-  bool anyFromUnconstrainedExtension = false;
+  bool anyFromUnconstrainedExtension;
   numViable = 0;
-  bestIdx = 0;
 
-  for (auto witness : witnesses) {
-    // Don't match anything in a protocol.
-    // FIXME: When default implementations come along, we can try to match
-    // these when they're default implementations coming from another
-    // (unrelated) protocol.
-    if (isa<ProtocolDecl>(witness->getDeclContext())) {
-      continue;
+  for (Attempt attempt = Regular; numViable == 0 && attempt != Done;
+       attempt = static_cast<Attempt>(attempt + 1)) {
+    SmallVector<ValueDecl *, 4> witnesses;
+    switch (attempt) {
+    case Regular:
+      witnesses = lookupValueWitnesses(requirement, ignoringNames);
+      break;
+    case OperatorsFromOverlay: {
+      // If we have a Clang declaration, the matching operator might be in the
+      // overlay for that module.
+      if (!requirement->isOperator())
+        continue;
+
+      auto *clangModule =
+          dyn_cast<ClangModuleUnit>(DC->getModuleScopeContext());
+      if (!clangModule)
+        continue;
+
+      DeclContext *overlay = clangModule->getAdapterModule();
+      if (!overlay)
+        continue;
+
+      auto lookupOptions = defaultUnqualifiedLookupOptions;
+      lookupOptions |= NameLookupFlags::KnownPrivate;
+      auto lookup = TC.lookupUnqualified(overlay, requirement->getName(),
+                                         SourceLoc(), lookupOptions);
+      for (auto candidate : lookup)
+        witnesses.push_back(candidate.Decl);
+      break;
+    }
+    case Done:
+      llvm_unreachable("should have exited loop");
     }
 
-    if (!witness->hasInterfaceType())
-      TC.validateDecl(witness);
+    // Match each of the witnesses to the requirement.
+    anyFromUnconstrainedExtension = false;
+    bestIdx = 0;
 
-    auto match = matchWitness(TC, Proto, conformance, DC,
-                              requirement, witness, reqEnvironment);
-    if (match.isViable()) {
-      ++numViable;
-      bestIdx = matches.size();
-    } else if (match.Kind == MatchKind::WitnessInvalid) {
-      doNotDiagnoseMatches = true;
+    for (auto witness : witnesses) {
+      // Don't match anything in a protocol.
+      // FIXME: When default implementations come along, we can try to match
+      // these when they're default implementations coming from another
+      // (unrelated) protocol.
+      if (isa<ProtocolDecl>(witness->getDeclContext())) {
+        continue;
+      }
+
+      if (!witness->hasInterfaceType())
+        TC.validateDecl(witness);
+
+      auto match = matchWitness(TC, Proto, conformance, DC,
+                                requirement, witness, reqEnvironment);
+      if (match.isViable()) {
+        ++numViable;
+        bestIdx = matches.size();
+      } else if (match.Kind == MatchKind::WitnessInvalid) {
+        doNotDiagnoseMatches = true;
+      }
+
+      if (auto *ext = dyn_cast<ExtensionDecl>(match.Witness->getDeclContext())){
+        if (!ext->isConstrainedExtension() &&
+            ext->getAsProtocolExtensionContext())
+          anyFromUnconstrainedExtension = true;
+      }
+
+      matches.push_back(std::move(match));
     }
-
-    if (auto *ext = dyn_cast<ExtensionDecl>(match.Witness->getDeclContext()))
-      if (!ext->isConstrainedExtension() && ext->getAsProtocolExtensionContext())
-        anyFromUnconstrainedExtension = true;
-
-    matches.push_back(std::move(match));
   }
 
   if (numViable == 0) {
@@ -1993,8 +2038,7 @@
     }
 
     // Foreign classes cannot conform to objc protocols.
-    if (Proto->isObjC() &&
-        !Proto->isSpecificProtocol(KnownProtocolKind::AnyObject)) {
+    if (Proto->isObjC()) {
       if (auto clas = canT->getClassOrBoundGenericClass()) {
         Optional<decltype(diag::cf_class_cannot_conform_to_objc_protocol)>
         diagKind;
@@ -2020,8 +2064,23 @@
     // If the protocol contains missing requirements, it can't be conformed to
     // at all.
     if (Proto->hasMissingRequirements()) {
-      TC.diagnose(ComplainLoc, diag::protocol_has_missing_requirements,
-                  T, Proto->getDeclaredType());
+      bool hasDiagnosed = false;
+      auto *protoFile = Proto->getModuleScopeContext();
+      if (auto *serialized = dyn_cast<SerializedASTFile>(protoFile)) {
+        if (serialized->getLanguageVersionBuiltWith() !=
+            TC.getLangOpts().EffectiveLanguageVersion) {
+          TC.diagnose(ComplainLoc,
+                      diag::protocol_has_missing_requirements_versioned,
+                      T, Proto->getDeclaredType(),
+                      serialized->getLanguageVersionBuiltWith(),
+                      TC.getLangOpts().EffectiveLanguageVersion);
+          hasDiagnosed = true;
+        }
+      }
+      if (!hasDiagnosed) {
+        TC.diagnose(ComplainLoc, diag::protocol_has_missing_requirements,
+                    T, Proto->getDeclaredType());
+      }
       conformance->setInvalid();
       return conformance;
     }
@@ -4013,6 +4072,7 @@
   typedef decltype(typeWitnesses)::ScopeTy TypeWitnessesScope;
   unsigned numTypeWitnesses = 0;
   SmallVector<InferredTypeWitnessesSolution, 4> solutions;
+  SmallVector<InferredTypeWitnessesSolution, 4> nonViableSolutions;
 
   // Information to use for diagnosing failures when we don't have
   // something more specific.
@@ -4195,13 +4255,44 @@
         if (replaced.isNull())
           return true;
         
-        if (checkTypeWitness(TC, DC, assocType, replaced))
-          return true;
-
         known->first = replaced;
       }
     }
 
+    // Check any same-type requirements in the protocol's requirement signature.
+    if (Proto->isRequirementSignatureComputed()) {
+      SubstOptions options(None);
+      options.getTentativeTypeWitness =
+        [&](const NormalProtocolConformance *conformance,
+            AssociatedTypeDecl *assocType) -> TypeBase * {
+          if (conformance != Conformance) return nullptr;
+
+          return typeWitnesses.begin(assocType)->first.getPointer();
+        };
+
+      auto substitutions =
+        SubstitutionMap::getProtocolSubstitutions(
+                                          Proto, Conformance->getType(),
+                                          ProtocolConformanceRef(Conformance));
+
+      auto requirementSig = Proto->getRequirementSignature();
+      auto result =
+        TC.checkGenericArguments(DC, SourceLoc(), SourceLoc(),
+                                 Conformance->getType(), requirementSig,
+                                 QuerySubstitutionMap{substitutions},
+                                 TypeChecker::LookUpConformance(
+                                   TC, Conformance->getDeclContext()),
+                                 nullptr, None, nullptr, options);
+      switch (result) {
+      case RequirementCheckResult::Failure:
+      case RequirementCheckResult::UnsatisfiedDependency:
+        return true;
+
+      case RequirementCheckResult::Success:
+      case RequirementCheckResult::SubstitutionFailure:
+        return false;
+      }
+    }
     return false;
   };
 
@@ -4263,9 +4354,7 @@
       }
 
       /// Check the current set of type witnesses.
-      if (checkCurrentTypeWitnesses()) {
-        return;
-      }
+      bool invalid = checkCurrentTypeWitnesses();
 
       // Determine whether there is already a solution with the same
       // bindings.
@@ -4285,8 +4374,9 @@
           return;
       }
 
-      solutions.push_back(InferredTypeWitnessesSolution());
-      auto &solution = solutions.back();
+      auto &solutionList = invalid ? nonViableSolutions : solutions;
+      solutionList.push_back(InferredTypeWitnessesSolution());
+      auto &solution = solutionList.back();
 
       // Copy the type witnesses.
       for (auto assocType : unresolvedAssocTypes) {
@@ -4480,6 +4570,12 @@
     }
   }
 
+  // If we have no solution, but we did find something that is nonviable,
+  // use the first nonviable one to improve error reporting.
+  if (solutions.empty() && !nonViableSolutions.empty()) {
+    solutions.push_back(std::move(nonViableSolutions.front()));
+  }
+
   // If we found a single solution, take it.
   if (solutions.size() == 1) {
     // Record each of the deduced witnesses.
@@ -5206,16 +5302,7 @@
   if (T->isExistentialType()) {
     auto layout = T->getExistentialLayout();
 
-    // First, any class-constrained existential semantically contains
-    // AnyObject.
-    //
-    // FIXME: This check is moving elsewhere soon.
-    if (layout.requiresClass() &&
-        Proto->isSpecificProtocol(KnownProtocolKind::AnyObject)) {
-      return ProtocolConformanceRef(Proto);
-    }
-
-    // Next, if we have a superclass constraint, the class may conform
+    // First, if we have a superclass constraint, the class may conform
     // concretely.
     if (layout.superclass) {
       if (auto result = conformsToProtocol(layout.superclass, Proto,
@@ -5224,7 +5311,7 @@
       }
     }
 
-    // Finally, check if the existential contains the protocol in question.
+    // Next, check if the existential contains the protocol in question.
     for (auto P : layout.getProtocols()) {
       auto *PD = P->getDecl();
       // If we found the protocol we're looking for, return an abstract
@@ -5463,6 +5550,7 @@
   case RequirementCheckResult::UnsatisfiedDependency:
     return true;
   case RequirementCheckResult::Failure:
+  case RequirementCheckResult::SubstitutionFailure:
     return false;
   case RequirementCheckResult::Success: {
     bool anyUnsatisfied = false;
@@ -5822,6 +5910,63 @@
   tc.diagnose(req, diag::protocol_requirement_here, req->getFullName());
 }
 
+/// Whether the given protocol is "NSCoding".
+static bool isNSCoding(ProtocolDecl *protocol) {
+  ASTContext &ctx = protocol->getASTContext();
+  return protocol->getModuleContext()->getName() == ctx.Id_Foundation &&
+    protocol->getName().str().equals("NSCoding");
+}
+
+/// Whether the given class has an explicit '@objc' name.
+static bool hasExplicitObjCName(ClassDecl *classDecl) {
+  auto objcAttr = classDecl->getAttrs().getAttribute<ObjCAttr>();
+  if (!objcAttr) return false;
+
+  return objcAttr->hasName() && !objcAttr->isNameImplicit();
+}
+
+/// Determine whether a particular class has generic ancestry.
+static bool hasGenericAncestry(ClassDecl *classDecl) {
+  SmallPtrSet<ClassDecl *, 4> visited;
+  while (classDecl && visited.insert(classDecl).second) {
+    if (classDecl->isGeneric() || classDecl->getGenericSignatureOfContext())
+      return true;
+
+    classDecl = classDecl->getSuperclassDecl();
+  }
+
+  return false;
+}
+
+/// Infer the attribute tostatic-initialize the Objective-C metadata for the
+/// given class, if needed.
+static void inferStaticInitializeObjCMetadata(ClassDecl *classDecl,
+                                               bool requiresNSCodingAttr) {
+  // If we already have the attribute, there's nothing to do.
+  if (classDecl->getAttrs().hasAttribute<StaticInitializeObjCMetadataAttr>())
+    return;
+
+  // A class with the @NSKeyedArchiveLegacyAttr will end up getting registered
+  // with the Objective-C runtime anyway.
+  if (classDecl->getAttrs().hasAttribute<NSKeyedArchiveLegacyAttr>())
+    return;
+
+  // A class with @NSKeyedArchiveSubclassesOnly promises not to be archived,
+  // so don't static-initialize its Objective-C metadata.
+  if (classDecl->getAttrs().hasAttribute<NSKeyedArchiveSubclassesOnlyAttr>())
+    return;
+
+  // If we know that the Objective-C metadata will be statically registered,
+  // there's nothing to do.
+  if (!requiresNSCodingAttr && !hasGenericAncestry(classDecl))
+    return;
+
+  // Infer @_staticInitializeObjCMetadata.
+  ASTContext &ctx = classDecl->getASTContext();
+  classDecl->getAttrs().add(
+            new (ctx) StaticInitializeObjCMetadataAttr(/*implicit=*/true));
+}
+
 void TypeChecker::checkConformancesInContext(DeclContext *dc,
                                              IterableDeclContext *idc) {
   // For anything imported from Clang, lazily check conformances.
@@ -5829,6 +5974,7 @@
     return;
 
   // Determine the accessibility of this conformance.
+  Decl *currentDecl = nullptr;
   Accessibility defaultAccessibility;
   if (auto ext = dyn_cast<ExtensionDecl>(dc)) {
     Type extendedTy = ext->getExtendedType();
@@ -5838,15 +5984,16 @@
     if (!nominal)
       return;
     defaultAccessibility = nominal->getFormalAccess();
+    currentDecl = ext;
   } else {
     defaultAccessibility = cast<NominalTypeDecl>(dc)->getFormalAccess();
+    currentDecl = cast<NominalTypeDecl>(dc);
   }
 
   ReferencedNameTracker *tracker = nullptr;
   if (SourceFile *SF = dc->getParentSourceFile())
     tracker = SF->getReferencedNameTracker();
 
-
   // Check each of the conformances associated with this context.
   SmallVector<ConformanceDiagnostic, 4> diagnostics;
   auto conformances = dc->getLocalConformances(ConformanceLookupKind::All,
@@ -5866,6 +6013,83 @@
     if (tracker)
       tracker->addUsedMember({conformance->getProtocol(), Identifier()},
                              defaultAccessibility > Accessibility::FilePrivate);
+
+    // Diagnose @NSCoding on file/fileprivate/nested/generic classes, which
+    // have unstable archival names.
+    if (auto classDecl = dc->getAsClassOrClassExtensionContext()) {
+      if (Context.LangOpts.EnableObjCInterop &&
+          isNSCoding(conformance->getProtocol())) {
+        // Note: these 'kind' values are synchronized with
+        // diag::nscoding_unstable_mangled_name.
+        Optional<unsigned> kind;
+        bool isFixable = true;
+        if (classDecl->getGenericSignature()) {
+          kind = 4;
+          isFixable = false;
+        } else if (!classDecl->getDeclContext()->isModuleScopeContext()) {
+          if (classDecl->getDeclContext()->isTypeContext())
+            kind = 2;
+          else
+            kind = 3;
+        } else {
+          switch (classDecl->getFormalAccess()) {
+          case Accessibility::FilePrivate:
+            kind = 1;
+            break;
+
+          case Accessibility::Private:
+            kind = 0;
+            break;
+
+          case Accessibility::Internal:
+          case Accessibility::Open:
+          case Accessibility::Public:
+            break;
+          }
+        }
+
+        if (kind && !hasExplicitObjCName(classDecl) &&
+            !classDecl->getAttrs().hasAttribute<NSKeyedArchiveLegacyAttr>() &&
+            !classDecl->getAttrs()
+              .hasAttribute<NSKeyedArchiveSubclassesOnlyAttr>()) {
+          SourceLoc loc;
+          if (auto normal = dyn_cast<NormalProtocolConformance>(conformance))
+            loc = normal->getLoc();
+          if (loc.isInvalid())
+            loc = currentDecl->getLoc();
+
+          bool emitWarning = Context.LangOpts.isSwiftVersion3();
+          diagnose(loc,
+                   emitWarning ? diag::nscoding_unstable_mangled_name_warn
+                               : diag::nscoding_unstable_mangled_name,
+                   *kind, classDecl->TypeDecl::getDeclaredInterfaceType());
+          auto insertionLoc =
+            classDecl->getAttributeInsertionLoc(/*forModifier=*/false);
+          if (isFixable) {
+            // Note: this is intentionally using the Swift 3 mangling,
+            // to provide compatibility with archives created in the Swift 3
+            // time frame.
+            Mangle::ASTMangler mangler;
+            diagnose(classDecl, diag::unstable_mangled_name_add_objc)
+              .fixItInsert(insertionLoc,
+                           "@objc(<#Objective-C class name#>)");
+            diagnose(classDecl,
+                     diag::unstable_mangled_name_add_nskeyedarchivelegacy)
+              .fixItInsert(insertionLoc,
+                           "@NSKeyedArchiveLegacy(\"" +
+                           mangler.mangleObjCRuntimeName(classDecl) +
+                           "\")");
+          } else {
+            diagnose(classDecl, diag::add_nskeyedarchivesubclassesonly_attr,
+                     classDecl->getDeclaredInterfaceType())
+              .fixItInsert(insertionLoc, "@NSKeyedArchiveSubclassesOnly");
+          }
+        }
+
+        // Infer @_staticInitializeObjCMetadata if needed.
+        inferStaticInitializeObjCMetadata(classDecl, kind.hasValue());
+      }
+    }
   }
 
   // Check all conformances.
@@ -5893,13 +6117,15 @@
     auto extendedNominal =
       diag.ExistingDC->getAsNominalTypeOrNominalTypeExtensionContext();
     if (existingModule != dc->getParentModule() &&
-        (existingModule == extendedNominal->getParentModule() ||
+        (existingModule->getName() ==
+           extendedNominal->getParentModule()->getName() ||
          existingModule == diag.Protocol->getParentModule())) {
       // Warn about the conformance.
       diagnose(diag.Loc, diag::redundant_conformance_adhoc,
                dc->getDeclaredInterfaceType(),
                diag.Protocol->getName(),
-               existingModule == extendedNominal->getParentModule(),
+               existingModule->getName() ==
+                 extendedNominal->getParentModule()->getName(),
                existingModule->getName());
 
       // Complain about any declarations in this extension whose names match
diff --git a/lib/Sema/TypeCheckREPL.cpp b/lib/Sema/TypeCheckREPL.cpp
index 9b202a7..532d82a 100644
--- a/lib/Sema/TypeCheckREPL.cpp
+++ b/lib/Sema/TypeCheckREPL.cpp
@@ -440,17 +440,17 @@
   for (Decl *D : NewDecls) {
     SF.Decls.push_back(D);
 
-    TopLevelCodeDecl *TLCD = dyn_cast<TopLevelCodeDecl>(D);
+    auto *TLCD = dyn_cast<TopLevelCodeDecl>(D);
     if (!TLCD || TLCD->getBody()->getElements().empty())
       continue;
 
     auto Entry = TLCD->getBody()->getElement(0);
 
     // Check to see if the TLCD has an expression that we have to transform.
-    if (Expr *E = Entry.dyn_cast<Expr*>())
+    if (auto *E = Entry.dyn_cast<Expr*>())
       RC.processREPLTopLevelExpr(E);
-    else if (Decl *D = Entry.dyn_cast<Decl*>())
-      if (PatternBindingDecl *PBD = dyn_cast<PatternBindingDecl>(D))
+    else if (auto *D = Entry.dyn_cast<Decl*>())
+      if (auto *PBD = dyn_cast<PatternBindingDecl>(D))
         RC.processREPLTopLevelPatternBinding(PBD);
   }
 
diff --git a/lib/Sema/TypeCheckStmt.cpp b/lib/Sema/TypeCheckStmt.cpp
index 2c6f8a1..c881364 100644
--- a/lib/Sema/TypeCheckStmt.cpp
+++ b/lib/Sema/TypeCheckStmt.cpp
@@ -243,21 +243,21 @@
         NTD->lookupConformance(module, optionSetType, conformances)))
     return;
 
-  CallExpr *CE = dyn_cast<CallExpr>(E);
+  auto *CE = dyn_cast<CallExpr>(E);
   if (!CE)
     return;
   if (!isa<ConstructorRefCallExpr>(CE->getFn()))
     return;
-  ParenExpr *ParenE = dyn_cast<ParenExpr>(CE->getArg());
+  auto *ParenE = dyn_cast<ParenExpr>(CE->getArg());
   if (!ParenE)
     return;
-  MemberRefExpr *ME = dyn_cast<MemberRefExpr>(ParenE->getSubExpr());
+  auto *ME = dyn_cast<MemberRefExpr>(ParenE->getSubExpr());
   if (!ME)
     return;
   ValueDecl *VD = ME->getMember().getDecl();
   if (!VD || VD->getName() != Ctx.Id_rawValue)
     return;
-  MemberRefExpr *BME = dyn_cast<MemberRefExpr>(ME->getBase());
+  auto *BME = dyn_cast<MemberRefExpr>(ME->getBase());
   if (!BME)
     return;
   if (!BME->getType()->isEqual(ResultType))
@@ -1197,11 +1197,11 @@
     // constructor calls during CSApply / ExprRewriter::convertLiteral.
     if (call->isImplicit()) {
       Expr *arg = call->getArg();
-      if (TupleExpr *TE = dyn_cast<TupleExpr>(arg))
+      if (auto *TE = dyn_cast<TupleExpr>(arg))
         if (TE->getNumElements() == 1)
           arg = TE->getElement(0);
 
-      if (LiteralExpr *LE = dyn_cast<LiteralExpr>(arg)) {
+      if (auto *LE = dyn_cast<LiteralExpr>(arg)) {
         diagnoseIgnoredLiteral(*this, LE);
         return;
       }
@@ -1245,7 +1245,7 @@
 Stmt *StmtChecker::visitBraceStmt(BraceStmt *BS) {
   const SourceManager &SM = TC.Context.SourceMgr;
   for (auto &elem : BS->getElements()) {
-    if (Expr *SubExpr = elem.dyn_cast<Expr*>()) {
+    if (auto *SubExpr = elem.dyn_cast<Expr*>()) {
       SourceLoc Loc = SubExpr->getStartLoc();
       if (EndTypeCheckLoc.isValid() &&
           (Loc == EndTypeCheckLoc || SM.isBeforeInBuffer(EndTypeCheckLoc, Loc)))
@@ -1280,7 +1280,7 @@
       continue;
     }
 
-    if (Stmt *SubStmt = elem.dyn_cast<Stmt*>()) {
+    if (auto *SubStmt = elem.dyn_cast<Stmt*>()) {
       SourceLoc Loc = SubStmt->getStartLoc();
       if (EndTypeCheckLoc.isValid() &&
           (Loc == EndTypeCheckLoc || SM.isBeforeInBuffer(EndTypeCheckLoc, Loc)))
@@ -1530,7 +1530,7 @@
   if (nominalDecl == nullptr)
     return HadError;
 
-  ClassDecl *ClassD = dyn_cast<ClassDecl>(nominalDecl);
+  auto *ClassD = dyn_cast<ClassDecl>(nominalDecl);
   bool wantSuperInitCall = false;
   if (ClassD) {
     bool isDelegating = false;
diff --git a/lib/Sema/TypeCheckSwitchStmt.cpp b/lib/Sema/TypeCheckSwitchStmt.cpp
index c182ecc..4c868fe 100644
--- a/lib/Sema/TypeCheckSwitchStmt.cpp
+++ b/lib/Sema/TypeCheckSwitchStmt.cpp
@@ -161,7 +161,7 @@
 
       // An optimization that computes if the difference of this space and
       // another space is empty.
-      bool isSubspace(const Space &other) const {
+      bool isSubspace(const Space &other, TypeChecker &TC) const {
         if (this->isEmpty()) {
           return true;
         }
@@ -178,7 +178,7 @@
         PAIRCASE (SpaceKind::Disjunct, SpaceKind::BooleanConstant): {
           // (S1 | ... | Sn) <= S iff (S1 <= S) && ... && (Sn <= S)
           for (auto &space : this->getSpaces()) {
-            if (!space.isSubspace(other)) {
+            if (!space.isSubspace(other, TC)) {
               return false;
             }
           }
@@ -193,18 +193,18 @@
           // (_ : Ty1) <= (_ : Ty2) iff D(Ty1) == D(Ty2)
           if (canDecompose(this->getType())) {
             SmallVector<Space, 4> disjuncts;
-            decompose(this->getType(), disjuncts);
+            decompose(TC, this->getType(), disjuncts);
             Space or1Space(disjuncts);
-            if (or1Space.isSubspace(other)) {
+            if (or1Space.isSubspace(other, TC)) {
               return true;
             }
           }
 
           if (canDecompose(other.getType())) {
             SmallVector<Space, 4> disjuncts;
-            decompose(other.getType(), disjuncts);
+            decompose(TC, other.getType(), disjuncts);
             Space or2Space(disjuncts);
-            return this->isSubspace(or2Space);
+            return this->isSubspace(or2Space, TC);
           }
 
           return true;
@@ -212,7 +212,7 @@
         PAIRCASE (SpaceKind::Type, SpaceKind::Disjunct): {
           // (_ : Ty1) <= (S1 | ... | Sn) iff (S1 <= S) || ... || (Sn <= S)
           for (auto &dis : other.getSpaces()) {
-            if (this->isSubspace(dis)) {
+            if (this->isSubspace(dis, TC)) {
               return true;
             }
           }
@@ -222,17 +222,17 @@
             return false;
           }
           SmallVector<Space, 4> disjuncts;
-          decompose(this->getType(), disjuncts);
+          decompose(TC, this->getType(), disjuncts);
           Space or1Space(disjuncts);
-          return or1Space.isSubspace(other);
+          return or1Space.isSubspace(other, TC);
         }
         PAIRCASE (SpaceKind::Type, SpaceKind::Constructor): {
           // (_ : Ty1) <= H(p1 | ... | pn) iff D(Ty1) <= H(p1 | ... | pn)
           if (canDecompose(this->getType())) {
             SmallVector<Space, 4> disjuncts;
-            decompose(this->getType(), disjuncts);
+            decompose(TC, this->getType(), disjuncts);
             Space or1Space(disjuncts);
-            return or1Space.isSubspace(other);
+            return or1Space.isSubspace(other, TC);
           }
           // An undecomposable type is always larger than its constructor space.
           return false;
@@ -251,16 +251,31 @@
 
           // Special Case: A constructor pattern may include the head but not
           // the payload patterns.  In that case the space is covered.
+          // This also acts to short-circuit comparisons with payload-less
+          // constructors.
           if (other.getSpaces().empty()) {
             return true;
           }
 
+          // If 'this' constructor pattern has no payload and the other space
+          // does, then 'this' covers more of the space only if the other
+          // constructor isn't the explicit form.
+          //
+          // .case <= .case(_, _, _, ...)
+          if (this->getSpaces().empty()) {
+            return std::accumulate(other.getSpaces().begin(),
+                                   other.getSpaces().end(),
+                                   true, [](bool acc, const Space sp){
+              return acc && sp.getKind() == SpaceKind::Type;
+            });
+          }
+
           // H(a1, ..., an) <= H(b1, ..., bn) iff a1 <= b1 && ... && an <= bn
           auto i = this->getSpaces().begin();
           auto j = other.getSpaces().begin();
           for (; i != this->getSpaces().end() && j != other.getSpaces().end();
                ++i, ++j) {
-            if (!(*i).isSubspace(*j)) {
+            if (!(*i).isSubspace(*j, TC)) {
               return false;
             }
           }
@@ -270,7 +285,7 @@
         PAIRCASE (SpaceKind::BooleanConstant, SpaceKind::Disjunct): {
           // S <= (S1 | ... | Sn) <= S iff (S <= S1) || ... || (S <= Sn)
           for (auto &param : other.getSpaces()) {
-            if (this->isSubspace(param)) {
+            if (this->isSubspace(param, TC)) {
               return true;
             }
           }
@@ -292,7 +307,7 @@
 
       // Returns the intersection of this space with another.  The intersection
       // is the largest shared subspace occupied by both arguments.
-      Space intersect(const Space &other) const {
+      Space intersect(const Space &other, TypeChecker &TC) const {
         // The intersection of an empty space is empty.
         if (this->isEmpty() || other.isEmpty()) {
           return Space();
@@ -320,7 +335,7 @@
             std::transform(other.getSpaces().begin(), other.getSpaces().end(),
                            std::back_inserter(intersectedCases),
                            [&](const Space &s) {
-              return this->intersect(s);
+              return this->intersect(s, TC);
             });
             // Optimization: Remove all empty spaces.
             SmallVector<Space, 4> filteredCases;
@@ -341,7 +356,7 @@
             std::transform(this->getSpaces().begin(), this->getSpaces().end(),
                            std::back_inserter(intersectedCases),
                            [&](const Space &s) {
-              return s.intersect(other);
+              return s.intersect(other, TC);
             });
             // Optimization: Remove all empty spaces.
             SmallVector<Space, 4> filteredCases;
@@ -358,14 +373,14 @@
               return other;
             } else if (canDecompose(this->getType())) {
               SmallVector<Space, 4> spaces;
-              decompose(this->getType(), spaces);
+              decompose(TC, this->getType(), spaces);
               auto decomposition = examineDecomp(spaces);
-              return decomposition.intersect(other);
+              return decomposition.intersect(other, TC);
             } else if (canDecompose(other.getType())) {
               SmallVector<Space, 4> spaces;
-              decompose(other.getType(), spaces);
+              decompose(TC, other.getType(), spaces);
               auto disjunctSp = examineDecomp(spaces);
-              return this->intersect(disjunctSp);
+              return this->intersect(disjunctSp, TC);
             } else {
               return other;
             }
@@ -373,9 +388,9 @@
           PAIRCASE (SpaceKind::Type, SpaceKind::Constructor): {
             if (canDecompose(this->getType())) {
               SmallVector<Space, 4> spaces;
-              decompose(this->getType(), spaces);
+              decompose(TC, this->getType(), spaces);
               auto decomposition = examineDecomp(spaces);
-              return decomposition.intersect(other);
+              return decomposition.intersect(other, TC);
             } else {
               return other;
             }
@@ -402,8 +417,8 @@
             auto j = other.getSpaces().begin();
             for (; i != this->getSpaces().end() && j != other.getSpaces().end();
                  ++i, ++j) {
-              auto intersection = (*i).intersect(*j);
-              if (intersection.simplify().isEmpty()) {
+              auto intersection = (*i).intersect(*j, TC);
+              if (intersection.simplify(TC).isEmpty()) {
                 return Space();
               }
               paramSpace.push_back(intersection);
@@ -422,9 +437,9 @@
 
             if (canDecompose(other.getType())) {
               SmallVector<Space, 4> spaces;
-              decompose(other.getType(), spaces);
+              decompose(TC, other.getType(), spaces);
               auto disjunctSp = examineDecomp(spaces);
-              return this->intersect(disjunctSp);
+              return this->intersect(disjunctSp, TC);
             }
             return Space();
           }
@@ -435,9 +450,9 @@
           PAIRCASE (SpaceKind::Type, SpaceKind::BooleanConstant): {
             if (canDecompose(this->getType())) {
               SmallVector<Space, 4> spaces;
-              decompose(this->getType(), spaces);
+              decompose(TC, this->getType(), spaces);
               auto disjunctSp = examineDecomp(spaces);
-              return disjunctSp.intersect(other);
+              return disjunctSp.intersect(other, TC);
             } else {
               return Space();
             }
@@ -456,7 +471,7 @@
       // result is empty if the other space completely covers this space, or
       // non-empty if there were any uncovered cases.  The difference of spaces
       // is the smallest uncovered set of cases.
-      Space minus(const Space &other) const {
+      Space minus(const Space &other, TypeChecker &TC) const {
         if (this->isEmpty()) {
           return Space();
         }
@@ -482,22 +497,22 @@
             return Space();
           } else if (canDecompose(this->getType())) {
             SmallVector<Space, 4> spaces;
-            this->decompose(this->getType(), spaces);
-            return examineDecomp(spaces).intersect(other);
+            this->decompose(TC, this->getType(), spaces);
+            return examineDecomp(spaces).intersect(other, TC);
           } else if (canDecompose(other.getType())) {
             SmallVector<Space, 4> spaces;
-            this->decompose(other.getType(), spaces);
+            this->decompose(TC, other.getType(), spaces);
             auto decomp = examineDecomp(spaces);
-            return this->intersect(decomp);
+            return this->intersect(decomp, TC);
           }
           return Space();
         }
         PAIRCASE (SpaceKind::Type, SpaceKind::Constructor): {
           if (canDecompose(this->getType())) {
             SmallVector<Space, 4> spaces;
-            this->decompose(this->getType(), spaces);
+            this->decompose(TC, this->getType(), spaces);
             auto decomp = examineDecomp(spaces);
-            return decomp.minus(other);
+            return decomp.minus(other, TC);
           } else {
             return *this;
           }
@@ -510,8 +525,8 @@
           return std::accumulate(other.getSpaces().begin(),
                                  other.getSpaces().end(),
                                  *this,
-                                 [](const Space &left, const Space &right){
-            return left.minus(right);
+                                 [&](const Space &left, const Space &right){
+            return left.minus(right, TC);
           });
         }
 
@@ -523,7 +538,7 @@
           std::transform(this->getSpaces().begin(), this->getSpaces().end(),
                          std::back_inserter(smallSpaces),
                          [&](const Space &first){
-            return first.minus(other);
+            return first.minus(other, TC);
           });
           return examineDecomp(smallSpaces);
         }
@@ -555,13 +570,13 @@
             auto &s2 = *j;
             // If the intersection of each subspace is ever empty then the
             // two spaces are disjoint and their difference is the first space.
-            if (s1.intersect(s2).simplify().isEmpty()) {
+            if (s1.intersect(s2, TC).simplify(TC).isEmpty()) {
               return *this;
             }
 
-            // If one constructor parameter doens't cover the other then we've
+            // If one constructor parameter doesn't cover the other then we've
             // got to report the uncovered cases in a user-friendly way.
-            if (!s1.isSubspace(s2)) {
+            if (!s1.isSubspace(s2, TC)) {
               foundBad = true;
             }
             // Copy the params and replace the parameter at each index with the
@@ -569,7 +584,7 @@
             // into each parameter.
             SmallVector<Space, 4> copyParams(this->getSpaces().begin(),
                                              this->getSpaces().end());
-            copyParams[idx] = s1.minus(s2);
+            copyParams[idx] = s1.minus(s2, TC);
             Space CS(this->getType(), this->Head, copyParams);
             constrSpaces.push_back(CS);
           }
@@ -594,9 +609,9 @@
 
           if (canDecompose(other.getType())) {
             SmallVector<Space, 4> spaces;
-            this->decompose(other.getType(), spaces);
+            this->decompose(TC, other.getType(), spaces);
             auto disjunctSp = examineDecomp(spaces);
-            return this->minus(disjunctSp);
+            return this->minus(disjunctSp, TC);
           }
           return *this;
         }
@@ -607,9 +622,9 @@
         PAIRCASE (SpaceKind::Type, SpaceKind::BooleanConstant): {
           if (canDecompose(this->getType())) {
             SmallVector<Space, 4> spaces;
-            this->decompose(this->getType(), spaces);
+            this->decompose(TC, this->getType(), spaces);
             auto orSpace = examineDecomp(spaces);
-            return orSpace.minus(other);
+            return orSpace.minus(other, TC);
           } else {
             return *this;
           }
@@ -623,19 +638,23 @@
         }
       }
 
-      void show(llvm::raw_ostream &buffer, bool normalize = true) const {
+      void show(llvm::raw_ostream &buffer, bool forDisplay = true) const {
         switch (getKind()) {
         case SpaceKind::Empty:
-          buffer << "[EMPTY]";
+          if (forDisplay) {
+            buffer << "_";
+          } else {
+            buffer << "[EMPTY]";
+          }
           break;
         case SpaceKind::Disjunct: {
-          if (normalize) {
-            return simplify().show(buffer, false);
+          if (forDisplay) {
+            assert(false && "Attempted to display disjunct to user!");
           } else {
             buffer << "DISJOIN(";
             for (auto &sp : Spaces) {
               buffer << "\n";
-              sp.show(buffer, normalize);
+              sp.show(buffer, forDisplay);
               buffer << " |";
             }
             buffer << ")";
@@ -661,11 +680,7 @@
             if (!first) {
               buffer << ", ";
             }
-            if (normalize) {
-              param.simplify().show(buffer, normalize);
-            } else {
-              param.show(buffer);
-            }
+            param.show(buffer, forDisplay);
             if (first) {
               first = false;
             }
@@ -674,7 +689,7 @@
         }
           break;
         case SpaceKind::Type:
-          if (!normalize) {
+          if (!forDisplay) {
             getType()->print(buffer);
           }
           buffer << "_";
@@ -684,7 +699,7 @@
 
       // For optimization, attempt to simplify a space by removing any empty
       // cases and unpacking empty or singular disjunctions where possible.
-      Space simplify() const {
+      Space simplify(TypeChecker &TC) const {
         switch (getKind()) {
         case SpaceKind::Constructor: {
           // If a constructor has no spaces it is an enum without a payload and
@@ -698,8 +713,8 @@
           SmallVector<Space, 4> simplifiedSpaces;
           std::transform(getSpaces().begin(), getSpaces().end(),
                          std::back_inserter(simplifiedSpaces),
-                         [](const Space &el) {
-            return el.simplify();
+                         [&](const Space &el) {
+            return el.simplify(TC);
           });
           for (auto &el : simplifiedSpaces) {
             if (el.isEmpty()) {
@@ -712,7 +727,7 @@
           // If the decomposition of a space is empty, the space is empty.
           if (canDecompose(this->getType())) {
             SmallVector<Space, 4> ss;
-            decompose(this->getType(), ss);
+            decompose(TC, this->getType(), ss);
             if (ss.empty()) {
               return Space();
             }
@@ -726,8 +741,8 @@
           SmallVector<Space, 4> simplifiedSpaces;
           std::transform(Spaces.begin(), Spaces.end(),
                          std::back_inserter(simplifiedSpaces),
-                         [](const Space &el){
-            return el.simplify();
+                         [&](const Space &el){
+            return el.simplify(TC);
           });
           // If the disjunct is singular, unpack it into its component.
           if (simplifiedSpaces.size() == 1) {
@@ -757,7 +772,8 @@
       }
 
       // Decompose a type into its component spaces.
-      static void decompose(Type tp, SmallVectorImpl<Space> &arr) {
+      static void decompose(TypeChecker &TC, Type tp,
+                            SmallVectorImpl<Space> &arr) {
         assert(canDecompose(tp) && "Non-decomposable type?");
 
         if (tp->isBool()) {
@@ -768,14 +784,22 @@
           auto children = E->getAllElements();
           std::transform(children.begin(), children.end(),
                          std::back_inserter(arr), [&](EnumElementDecl *eed) {
-            // FIXME: This shouldn't happen.
+            SmallVector<Space, 4> constElemSpaces;
+
+            // We need the interface type of this enum case but it may
+            // not have been computed.
+            if (!eed->hasInterfaceType()) {
+              TC.validateDecl(eed);
+            }
+
+            // If there's still no interface type after validation then there's
+            // not much else we can do here.
             if (!eed->hasInterfaceType()) {
               return Space();
             }
             auto eedTy = tp->getCanonicalType()
                            ->getTypeOfMember(E->getModuleContext(), eed,
                                              eed->getArgumentInterfaceType());
-            SmallVector<Space, 4> constElemSpaces;
             if (eedTy) {
               if (auto *TTy = eedTy->getAs<TupleType>()) {
                 // Decompose the payload tuple into its component type spaces.
@@ -812,16 +836,16 @@
       }
     };
 
-    ASTContext &Ctx;
+    TypeChecker &TC;
     SwitchStmt *Switch;
 
-    SpaceEngine(ASTContext &C, SwitchStmt *SS) : Ctx(C), Switch(SS) {}
+    SpaceEngine(TypeChecker &C, SwitchStmt *SS) : TC(C), Switch(SS) {}
 
     void checkExhaustiveness(bool limitedChecking) {
       if (limitedChecking) {
         // Reject switch statements with empty blocks.
         if (Switch->getCases().empty())
-          SpaceEngine::diagnoseMissingCases(Ctx, Switch,
+          SpaceEngine::diagnoseMissingCases(TC, Switch,
                                             /*justNeedsDefault*/true,
                                             SpaceEngine::Space());
         return;
@@ -840,12 +864,12 @@
           if (caseItem.isDefault())
             return;
 
-          auto projection = projectPattern(Ctx, caseItem.getPattern());
-          if (projection.isUseful() && projection.isSubspace(Space(spaces))) {
-            Ctx.Diags
-                .diagnose(caseItem.getStartLoc(),
+          auto projection = projectPattern(TC, caseItem.getPattern());
+          if (projection.isUseful()
+                && projection.isSubspace(Space(spaces), TC)) {
+            TC.diagnose(caseItem.getStartLoc(),
                           diag::redundant_particular_case)
-                .highlight(caseItem.getSourceRange());
+              .highlight(caseItem.getSourceRange());
           }
           spaces.push_back(projection);
         }
@@ -853,7 +877,7 @@
 
       Space totalSpace(Switch->getSubjectExpr()->getType());
       Space coveredSpace(spaces);
-      auto uncovered = totalSpace.minus(coveredSpace).simplify();
+      auto uncovered = totalSpace.minus(coveredSpace, TC).simplify(TC);
       if (uncovered.isEmpty()) {
         return;
       }
@@ -864,11 +888,11 @@
       if (uncovered.getKind() == SpaceKind::Type) {
         if (Space::canDecompose(uncovered.getType())) {
           SmallVector<Space, 4> spaces;
-          Space::decompose(uncovered.getType(), spaces);
-          diagnoseMissingCases(Ctx, Switch,
+          Space::decompose(TC, uncovered.getType(), spaces);
+          diagnoseMissingCases(TC, Switch,
                                /*justNeedsDefault*/ false, Space(spaces));
         } else {
-          diagnoseMissingCases(Ctx, Switch,
+          diagnoseMissingCases(TC, Switch,
                                /*justNeedsDefault*/ true, Space());
         }
         return;
@@ -880,10 +904,10 @@
         uncovered = Space(spaces);
       }
 
-      diagnoseMissingCases(Ctx, Switch, /*justNeedsDefault*/ false, uncovered);
+      diagnoseMissingCases(TC, Switch, /*justNeedsDefault*/ false, uncovered);
     }
 
-    static void diagnoseMissingCases(ASTContext &Ctx, const SwitchStmt *Switch,
+    static void diagnoseMissingCases(TypeChecker &TC, const SwitchStmt *Switch,
                                      bool JustNeedsDefault,
                                      SpaceEngine::Space uncovered) {
       bool Empty = Switch->getCases().empty();
@@ -893,17 +917,18 @@
       llvm::SmallString<128> Buffer;
       llvm::raw_svector_ostream OS(Buffer);
 
-      bool InEditor = Ctx.LangOpts.DiagnosticsEditorMode;
+      bool InEditor = TC.Context.LangOpts.DiagnosticsEditorMode;
 
       if (JustNeedsDefault) {
         OS << tok::kw_default << ": " << Placeholder << "\n";
         if (Empty) {
-          Ctx.Diags.diagnose(StartLoc, diag::empty_switch_stmt)
+          TC.Context.Diags.diagnose(StartLoc, diag::empty_switch_stmt)
              .fixItInsert(EndLoc, Buffer.str());
         } else {
-          Ctx.Diags.diagnose(StartLoc, diag::non_exhaustive_switch,
-                             InEditor, uncovered.isEmpty())
-             .fixItInsert(EndLoc, Buffer.str());
+          TC.Context.Diags.diagnose(StartLoc, diag::non_exhaustive_switch);
+          TC.Context.Diags.diagnose(StartLoc, diag::missing_several_cases,
+                                    uncovered.isEmpty()).fixItInsert(EndLoc,
+                                                              Buffer.str());
         }
         return;
       }
@@ -928,9 +953,6 @@
         for (auto &uncoveredSpace : uncovered.getSpaces()) {
           SmallVector<Space, 4> flats;
           flatten(uncoveredSpace, flats);
-          if (flats.empty()) {
-            flats.append({ uncoveredSpace });
-          }
           for (auto &flat : flats) {
             OS << tok::kw_case << " ";
             flat.show(OS);
@@ -938,22 +960,19 @@
           }
         }
 
-        Ctx.Diags.diagnose(StartLoc, diag::non_exhaustive_switch, InEditor,
-                           false).fixItInsert(EndLoc, Buffer.str());
+        TC.Context.Diags.diagnose(StartLoc, diag::non_exhaustive_switch);
+        TC.Context.Diags.diagnose(StartLoc, diag::missing_several_cases, false)
+          .fixItInsert(EndLoc, Buffer.str());
       } else {
-        Ctx.Diags.diagnose(StartLoc, diag::non_exhaustive_switch,
-                           InEditor, false);
+        TC.Context.Diags.diagnose(StartLoc, diag::non_exhaustive_switch);
 
         for (auto &uncoveredSpace : uncovered.getSpaces()) {
           SmallVector<Space, 4> flats;
           flatten(uncoveredSpace, flats);
-          if (flats.empty()) {
-            flats.append({ uncoveredSpace });
-          }
           for (auto &flat : flats) {
             Buffer.clear();
             flat.show(OS);
-            Ctx.Diags.diagnose(StartLoc, diag::missing_particular_case,
+            TC.Context.Diags.diagnose(StartLoc, diag::missing_particular_case,
                                Buffer.str());
           }
         }
@@ -963,39 +982,91 @@
   private:
     // Recursively unpacks a space of disjunctions or constructor parameters
     // into its component parts such that the resulting array of flattened
-    // spaces contains no further disjunctions.  If there were no disjunctions
-    // in the starting space, the original space is already flat and the
-    // returned array of spaces will be empty.
+    // spaces contains no further disjunctions.  The resulting flattened array
+    // will never be empty.
     static void flatten(const Space space, SmallVectorImpl<Space> &flats) {
       switch (space.getKind()) {
       case SpaceKind::Constructor: {
-        size_t i = 0;
-        for (auto &param : space.getSpaces()) {
-          // We're only interested in recursively unpacking constructors and
-          // disjunctions (booleans are considered constructors).
-          if (param.getKind() != SpaceKind::Constructor
-              || param.getKind() != SpaceKind::Disjunct
-              || param.getKind() != SpaceKind::BooleanConstant)
-            continue;
+        // Optimization: If this space is just a constructor head, it is already
+        // flat.
+        if (space.getSpaces().empty()) {
+          flats.push_back(space);
+          return;
+        }
 
-          SmallVector<Space, 4> flattenedParams;
-          flatten(param, flattenedParams);
-          for (auto &space : flattenedParams) {
-            SmallVector<Space, 4> row(space.getSpaces().begin(),
-                                      space.getSpaces().end());
-            row[i] = space;
-            Space cs(space.getType(), space.getHead(), row);
-            flats.push_back(cs);
+        // To recursively recover a pattern matrix from a bunch of disjuncts:
+        // 1) Unpack the arguments to the constructor under scrutiny.
+        // 2) Traverse each argument in turn.
+        // 3) Flatten the argument space into a column vector.
+        // 4) Extend the existing pattern matrix by a factor of the size of
+        //    the column vector and copy each previous component.
+        // 5) Extend the expanded matrix with multiples of the column vector's
+        //    components until filled.
+        // 6) Wrap each matrix row in the constructor under scrutiny.
+        size_t multiplier = 1;
+        SmallVector<SmallVector<Space, 4>, 2> matrix;
+        for (auto &subspace : space.getSpaces()) {
+          SmallVector<Space, 4> columnVect;
+          flatten(subspace, columnVect);
+
+          // Pattern matrices grow quasi-factorially in the size of the
+          // input space.
+          multiplier *= columnVect.size();
+
+          size_t startSize = matrix.size();
+          if (!matrix.empty() && columnVect.size() > 1) {
+            size_t oldCount = matrix.size();
+            matrix.reserve(multiplier * oldCount);
+            // Indexing starts at 1, we already have 'startSize'-many elements
+            // in the matrix; multiplies by 1 are no-ops.
+            for (size_t i = 1; i < multiplier; ++i) {
+              std::copy_n(matrix.begin(), oldCount, std::back_inserter(matrix));
+            }
           }
-          ++i;
+
+          if (matrix.empty()) {
+            // Get the empty matrix setup with its starting row vectors.
+            for (auto &vspace : columnVect) {
+              matrix.push_back({});
+              matrix.back().push_back(vspace);
+            }
+          } else {
+            // Given a matrix of 'n' rows and '(m-1)*k' columns, to make a
+            // matrix of size 'n' by 'm*k' we need to copy each element of the
+            // column vector into a row 'm' times - as many times as there were
+            // elements of the original matrix before multiplication.
+            size_t stride = multiplier;
+            if (startSize == 1) {
+              // Special case: If the column vector is bigger than the matrix
+              // before multiplication, we need to index it linearly
+              stride = 1;
+            } else if (columnVect.size() == 1) {
+              // Special case: If the column vector has size 1 then we needn't
+              // stride at all.
+              stride = matrix.size();
+            }
+
+            for (size_t rowIdx = 0, colIdx = 0; rowIdx < matrix.size(); ++rowIdx) {
+              if (rowIdx != 0 && (rowIdx % stride) == 0) {
+                colIdx++;
+              }
+
+              matrix[rowIdx].push_back(columnVect[colIdx]);
+            }
+          }
+        }
+
+        // Wrap the matrix rows into this constructor.
+        for (auto &row : matrix) {
+          flats.push_back(Space(space.getType(), space.getHead(), row));
         }
       }
         break;
       case SpaceKind::Disjunct: {
-        auto begin = space.getSpaces().begin();
-        auto end = space.getSpaces().end();
-        for (; begin != end; ++begin) {
-          flatten(*begin, flats);
+        for (auto &subspace : space.getSpaces()) {
+          SmallVector<Space, 4> buf;
+          flatten(subspace, buf);
+          flats.append(buf.begin(), buf.end());
         }
       }
         break;
@@ -1006,7 +1077,7 @@
     }
 
     // Recursively project a pattern into a Space.
-    static Space projectPattern(ASTContext &Ctx, const Pattern *item) {
+    static Space projectPattern(TypeChecker &TC, const Pattern *item) {
       switch (item->getKind()) {
       case PatternKind::Any:
       case PatternKind::Named:
@@ -1015,27 +1086,45 @@
         auto *BP = cast<BoolPattern>(item);
         return Space(BP->getValue());
       }
+      case PatternKind::Is: {
+        auto *IP = cast<IsPattern>(item);
+        switch (IP->getCastKind()) {
+        case CheckedCastKind::Coercion:
+        case CheckedCastKind::BridgingCoercion:
+          // These coercions are irrefutable.  Project with the original type
+          // instead of the cast's target type to maintain consistency with the
+          // scrutinee's type.
+          return Space(IP->getType());
+        case CheckedCastKind::Unresolved:
+        case CheckedCastKind::ValueCast:
+        case CheckedCastKind::ArrayDowncast:
+        case CheckedCastKind::DictionaryDowncast:
+        case CheckedCastKind::SetDowncast:
+        case CheckedCastKind::Swift3BridgingDowncast:
+            return Space();
+        }
+      }
       case PatternKind::Typed:
-      case PatternKind::Is:
       case PatternKind::Expr:
         return Space();
       case PatternKind::Var: {
         auto *VP = cast<VarPattern>(item);
-        return projectPattern(Ctx, VP->getSubPattern());
+        return projectPattern(TC, VP->getSubPattern());
       }
       case PatternKind::Paren: {
         auto *PP = cast<ParenPattern>(item);
-        return projectPattern(Ctx, PP->getSubPattern());
+        return projectPattern(TC, PP->getSubPattern());
       }
       case PatternKind::OptionalSome: {
         auto *OSP = cast<OptionalSomePattern>(item);
         SmallVector<Space, 1> payload = {
-          projectPattern(Ctx, OSP->getSubPattern())
+          projectPattern(TC, OSP->getSubPattern())
         };
-        return Space(item->getType(), Ctx.getIdentifier("some"), payload);
+        return Space(item->getType(), TC.Context.getIdentifier("some"), payload);
       }
       case PatternKind::EnumElement: {
         auto *VP = cast<EnumElementPattern>(item);
+        TC.validateDecl(item->getType()->getEnumOrBoundGenericEnum());
         SmallVector<Space, 4> conArgSpace;
         auto *SP = VP->getSubPattern();
         if (!SP) {
@@ -1050,7 +1139,7 @@
           std::transform(TP->getElements().begin(), TP->getElements().end(),
                          std::back_inserter(conArgSpace),
                          [&](TuplePatternElt pate) {
-                           return projectPattern(Ctx, pate.getPattern());
+                           return projectPattern(TC, pate.getPattern());
                          });
           return Space(item->getType(), VP->getName(), conArgSpace);
         }
@@ -1069,15 +1158,15 @@
                 conArgSpace.push_back(Space(ty.getType()));
               }
             } else {
-              conArgSpace.push_back(projectPattern(Ctx, SP));
+              conArgSpace.push_back(projectPattern(TC, SP));
             }
           } else {
-            conArgSpace.push_back(projectPattern(Ctx, SP));
+            conArgSpace.push_back(projectPattern(TC, SP));
           }
           return Space(item->getType(), VP->getName(), conArgSpace);
         }
         default:
-          return projectPattern(Ctx, SP);
+          return projectPattern(TC, SP);
         }
       }
       case PatternKind::Tuple: {
@@ -1086,7 +1175,7 @@
         std::transform(TP->getElements().begin(), TP->getElements().end(),
                        std::back_inserter(conArgSpace),
                        [&](TuplePatternElt pate) {
-          return projectPattern(Ctx, pate.getPattern());
+          return projectPattern(TC, pate.getPattern());
         });
         return Space(item->getType(), Identifier(), conArgSpace);
       }
@@ -1096,7 +1185,7 @@
 } // end anonymous namespace
 
 void TypeChecker::checkSwitchExhaustiveness(SwitchStmt *stmt, bool limited) {
-  SpaceEngine(Context, stmt).checkExhaustiveness(limited);
+  SpaceEngine(*this, stmt).checkExhaustiveness(limited);
 }
 
 void SpaceEngine::Space::dump() const {
@@ -1104,5 +1193,4 @@
   llvm::raw_svector_ostream os(buf);
   this->show(os, /*normalize*/false);
   llvm::errs() << buf.str();
-  llvm::errs() << "\n";
 }
diff --git a/lib/Sema/TypeCheckType.cpp b/lib/Sema/TypeCheckType.cpp
index a4288ee..fc15f54 100644
--- a/lib/Sema/TypeCheckType.cpp
+++ b/lib/Sema/TypeCheckType.cpp
@@ -100,6 +100,9 @@
 Type TypeChecker::getStringType(DeclContext *dc) {
   return ::getStdlibType(*this, StringType, dc, "String");
 }
+Type TypeChecker::getSubstringType(DeclContext *dc) {
+  return ::getStdlibType(*this, SubstringType, dc, "Substring");
+}
 Type TypeChecker::getIntType(DeclContext *dc) {
   return ::getStdlibType(*this, IntType, dc, "Int");
 }
@@ -256,33 +259,22 @@
 
   auto ownerDC = typeDecl->getDeclContext();
 
-  // If the type is declared at the top level, there's nothing we can learn from
-  // walking our parent contexts.
-  if (ownerDC->isModuleScopeContext())
+  // If the type is not nested in another type, there's nothing we can
+  // learn from walking parent contexts.
+  if (!ownerDC->isTypeContext() ||
+      isa<GenericTypeParamDecl>(typeDecl))
     return std::make_tuple(Type(), true);
 
-  // Workaround for issue where generic typealias generic parameters are
-  // looked up with the wrong 'fromDC'.
-  if (isa<TypeAliasDecl>(ownerDC)) {
-    assert(isa<GenericTypeParamDecl>(typeDecl));
-    return std::make_tuple(Type(), true);
-  }
-
-  bool needsBaseType = (ownerDC->isTypeContext() &&
-                        !isa<GenericTypeParamDecl>(typeDecl));
   NominalTypeDecl *ownerNominal =
       ownerDC->getAsNominalTypeOrNominalTypeExtensionContext();
 
   // We might have an invalid extension that didn't resolve.
   //
   // FIXME: How did UnqualifiedLookup find the decl then?
-  if (needsBaseType && ownerNominal == nullptr)
+  if (ownerNominal == nullptr)
     return std::make_tuple(Type(), false);
 
   auto getSelfType = [&](DeclContext *DC) -> Type {
-    if (!needsBaseType)
-      return Type();
-
     // When looking up a nominal type declaration inside of a
     // protocol extension, always use the nominal type and
     // not the protocol 'Self' type.
@@ -327,18 +319,6 @@
     }
 
     // We're going to check the next parent context.
-
-    // FIXME: Horrible hack. Don't allow us to reference a generic parameter
-    // from a context outside a ProtocolDecl.
-    if (isa<ProtocolDecl>(parentDC) && isa<GenericTypeParamDecl>(typeDecl))
-      return std::make_tuple(Type(), false);
-  }
-
-  // If we didn't find the member in an immediate parent context and
-  // there is no base type, something went wrong.
-  if (!needsBaseType) {
-    assert(false && "Should have found non-type context by now");
-    return std::make_tuple(Type(), false);
   }
 
   // Now, search the supertypes or refined protocols of each parent
@@ -444,11 +424,6 @@
       // If not, walk into the refined protocols, if any.
       pushRefined(protoDecl);
     }
-
-    // FIXME: Horrible hack. Don't allow us to reference a generic parameter
-    // or associated type from a context outside a ProtocolDecl.
-    if (isa<ProtocolDecl>(parentDC) && isa<AbstractTypeParamDecl>(typeDecl))
-      return std::make_tuple(Type(), false);
   }
 
   assert(false && "Should have found context by now");
@@ -664,9 +639,8 @@
   for (auto tyR : genericArgs)
     args.push_back(tyR);
 
-  auto argumentOptions = options - TR_NonEnumInheritanceClauseOuterLayer;
   auto result = applyUnboundGenericArguments(unboundType, genericDecl, loc,
-                                             dc, args, argumentOptions,
+                                             dc, args, options,
                                              resolver, unsatisfiedDependency);
   if (!result)
     return result;
@@ -764,6 +738,7 @@
     case RequirementCheckResult::UnsatisfiedDependency:
       return Type();
     case RequirementCheckResult::Failure:
+    case RequirementCheckResult::SubstitutionFailure:
       return ErrorType::get(Context);
     case RequirementCheckResult::Success:
       break;
@@ -939,7 +914,7 @@
     // Try ignoring access control.
     DeclContext *lookupDC = dc;
     if (options.contains(TR_GenericSignature))
-      lookupDC = dc->getParent();
+      lookupDC = dc->getParentForLookup();
 
     NameLookupOptions relookupOptions = lookupOptions;
     relookupOptions |= NameLookupFlags::KnownPrivate;
@@ -1228,8 +1203,7 @@
     if (!DC->isCascadingContextForLookup(/*excludeFunctions*/false))
       options |= TR_KnownNonCascadingDependency;
 
-    // The remaining lookups will be in the parent context.
-    lookupDC = DC->getParent();
+    lookupDC = DC->getParentForLookup();
   }
 
   // We need to be able to perform unqualified lookup into the given
@@ -1270,19 +1244,6 @@
     if (type->is<ErrorType>())
       return type;
 
-    if (options & TR_NonEnumInheritanceClauseOuterLayer) {
-      auto protocolOrClass =
-        (type->is<ProtocolType>() ||
-         type->is<ClassType>() ||
-         type->isAnyObject());
-      if (!protocolOrClass) {
-        TC.diagnose(comp->getIdLoc(),
-                    diag::inheritance_from_non_protocol_or_class,
-                    type);
-        return ErrorType::get(type);
-      }
-    }
-
     // If this is the first result we found, record it.
     if (current.isNull()) {
       current = type;
@@ -1528,18 +1489,6 @@
     }
   }
 
-  if (options & TR_NonEnumInheritanceClauseOuterLayer) {
-    auto protocolOrClass =
-        memberType->is<ProtocolType>() ||
-        memberType->is<ClassType>() ||
-        memberType->isAnyObject();
-    if (!protocolOrClass) {
-      TC.diagnose(comp->getIdLoc(),
-                  diag::inheritance_from_non_protocol_or_class, memberType);
-      return ErrorType::get(memberType);
-    }
-  }
-
   // If there are generic arguments, apply them now.
   if (auto genComp = dyn_cast<GenericIdentTypeRepr>(comp)) {
     memberType = TC.applyGenericArguments(
@@ -1586,9 +1535,8 @@
 
   // All remaining components use qualified lookup.
 
-  auto parentOptions = options - TR_NonEnumInheritanceClauseOuterLayer;
   // Resolve the parent type.
-  Type parentTy = resolveIdentTypeComponent(TC, DC, parentComps, parentOptions,
+  Type parentTy = resolveIdentTypeComponent(TC, DC, parentComps, options,
                                             diagnoseErrors, resolver,
                                             unsatisfiedDependency);
   if (!parentTy || parentTy->hasError()) return parentTy;
@@ -2160,7 +2108,7 @@
     }
 
   // Function attributes require a syntactic function type.
-  FunctionTypeRepr *fnRepr = dyn_cast<FunctionTypeRepr>(repr);
+  auto *fnRepr = dyn_cast<FunctionTypeRepr>(repr);
 
   if (hasFunctionAttr && fnRepr && (options & TR_SILType)) {
     SILFunctionType::Representation rep;
@@ -2782,14 +2730,19 @@
 
 Type TypeResolver::resolveInOutType(InOutTypeRepr *repr,
                                     TypeResolutionOptions options) {
-  // inout is only valid for function parameters.
-  if (!(options & TR_FunctionInput) &&
-      !(options & TR_ImmediateFunctionInput)) {
-    TC.diagnose(repr->getInOutLoc(),
-                (options & TR_VariadicFunctionInput)
-                    ? diag::attr_not_on_variadic_parameters
-                    : diag::attr_only_on_parameters,
-                "'inout'");
+  // inout is only valid for (non-subscript) function parameters.
+  if ((options & TR_SubscriptParameters) ||
+        (!(options & TR_FunctionInput) &&
+         !(options & TR_ImmediateFunctionInput))) {
+    decltype(diag::attr_only_on_parameters) diagID;
+    if (options & TR_SubscriptParameters) {
+      diagID = diag::attr_not_on_subscript_parameters;
+    } else if (options & TR_VariadicFunctionInput) {
+      diagID = diag::attr_not_on_variadic_parameters;
+    } else {
+      diagID = diag::attr_only_on_parameters;
+    }
+    TC.diagnose(repr->getInOutLoc(), diagID, "'inout'");
     repr->setInvalid();
     return ErrorType::get(Context);
   }
@@ -3262,6 +3215,12 @@
 }
 
 Type TypeChecker::getSuperClassOf(Type type) {
+  if (auto *parenTy = dyn_cast<ParenType>(type.getPointer())) {
+    auto superclassTy = getSuperClassOf(parenTy->getUnderlyingType());
+    if (!superclassTy)
+      return Type();
+    return ParenType::get(Context, superclassTy);
+  }
   return type->getSuperclass();
 }
 
@@ -4129,13 +4088,8 @@
   if (!decl || decl->isInvalid())
     return;
 
-  // Global type aliases are okay.
-  if (isa<TypeAliasDecl>(decl) &&
-      decl->getDeclContext()->isModuleScopeContext())
-    return;
-
-  // Non-typealias type declarations are okay.
-  if (isa<TypeDecl>(decl) && !isa<TypeAliasDecl>(decl))
+  // Type declarations are okay.
+  if (isa<TypeDecl>(decl))
     return;
 
   // Extensions are okay.
diff --git a/lib/Sema/TypeChecker.cpp b/lib/Sema/TypeChecker.cpp
index 9a6db6e..f597201 100644
--- a/lib/Sema/TypeChecker.cpp
+++ b/lib/Sema/TypeChecker.cpp
@@ -708,7 +708,7 @@
 
     bool hasTopLevelCode = false;
     for (auto D : llvm::makeArrayRef(SF.Decls).slice(StartElem)) {
-      if (TopLevelCodeDecl *TLCD = dyn_cast<TopLevelCodeDecl>(D)) {
+      if (auto *TLCD = dyn_cast<TopLevelCodeDecl>(D)) {
         hasTopLevelCode = true;
         // Immediately perform global name-binding etc.
         TC.typeCheckTopLevelCodeDecl(TLCD);
diff --git a/lib/Sema/TypeChecker.h b/lib/Sema/TypeChecker.h
index aa08242..d72ba27 100644
--- a/lib/Sema/TypeChecker.h
+++ b/lib/Sema/TypeChecker.h
@@ -367,7 +367,9 @@
 };
 
 /// The result of `checkGenericRequirement`.
-enum class RequirementCheckResult { Success, Failure, UnsatisfiedDependency };
+enum class RequirementCheckResult {
+  Success, Failure, UnsatisfiedDependency, SubstitutionFailure
+};
 
 class ConformsToProtocolResult {
   Optional<ProtocolConformanceRef> Data;
@@ -484,13 +486,11 @@
   /// Whether we are checking the outermost type of a computed property setter's newValue
   TR_ImmediateSetterNewValue = 0x1000000,
 
-  /// Whether we are checking the outermost layer of types in an inheritance
-  /// clause on something other than an enum (i.e. V, but not U or W, in class
-  /// T: U.V<W>)
-  TR_NonEnumInheritanceClauseOuterLayer = 0x2000000,
-
   /// Whether we are checking the underlying type of a typealias.
-  TR_TypeAliasUnderlyingType = 0x4000000,
+  TR_TypeAliasUnderlyingType = 0x2000000,
+
+  /// Whether we are checking the parameter list of a subscript.
+  TR_SubscriptParameters = 0x4000000,
 };
 
 /// Option set describing how type resolution should work.
@@ -790,6 +790,7 @@
   Type ImageLiteralType;
   Type FileReferenceLiteralType;
   Type StringType;
+  Type SubstringType;
   Type IntType;
   Type Int8Type;
   Type UInt8Type;
@@ -881,6 +882,7 @@
   Type getOptionalType(SourceLoc loc, Type elementType);
   Type getImplicitlyUnwrappedOptionalType(SourceLoc loc, Type elementType);
   Type getStringType(DeclContext *dc);
+  Type getSubstringType(DeclContext *dc);
   Type getIntType(DeclContext *dc);
   Type getInt8Type(DeclContext *dc);
   Type getUInt8Type(DeclContext *dc);
@@ -1349,7 +1351,8 @@
       LookupConformanceFn conformances,
       UnsatisfiedDependency *unsatisfiedDependency,
       ConformanceCheckOptions conformanceOptions = ConformanceCheckFlags::Used,
-      GenericRequirementsCheckListener *listener = nullptr);
+      GenericRequirementsCheckListener *listener = nullptr,
+      SubstOptions options = None);
 
   /// Resolve the superclass of the given class.
   void resolveSuperclass(ClassDecl *classDecl) override;
diff --git a/lib/Serialization/Deserialization.cpp b/lib/Serialization/Deserialization.cpp
index 940b9d1..f2c521e 100644
--- a/lib/Serialization/Deserialization.cpp
+++ b/lib/Serialization/Deserialization.cpp
@@ -165,13 +165,20 @@
     getContext().Diags.diagnose(SourceLoc(), diag::serialization_fatal, Name);
 
     if (!CompatibilityVersion.empty()) {
-      SmallString<16> buffer;
-      llvm::raw_svector_ostream out(buffer);
-      out << getContext().LangOpts.EffectiveLanguageVersion;
-      if (out.str() != CompatibilityVersion) {
+      if (getContext().LangOpts.EffectiveLanguageVersion
+            != CompatibilityVersion) {
+        SmallString<16> effectiveVersionBuffer, compatVersionBuffer;
+        {
+          llvm::raw_svector_ostream out(effectiveVersionBuffer);
+          out << getContext().LangOpts.EffectiveLanguageVersion;
+        }
+        {
+          llvm::raw_svector_ostream out(compatVersionBuffer);
+          out << CompatibilityVersion;
+        }
         getContext().Diags.diagnose(
             SourceLoc(), diag::serialization_compatibility_version_mismatch,
-            out.str(), Name, CompatibilityVersion);
+            effectiveVersionBuffer, Name, compatVersionBuffer);
       }
     }
   }
@@ -1272,8 +1279,52 @@
     return nullptr;
   }
 
+  auto getXRefDeclNameForError = [&]() -> DeclName {
+    DeclName result = pathTrace.getLastName();
+    while (--pathLen) {
+      auto entry = DeclTypeCursor.advance(AF_DontPopBlockAtEnd);
+      if (entry.Kind != llvm::BitstreamEntry::Record)
+        return Identifier();
+
+      unsigned recordID = DeclTypeCursor.readRecord(entry.ID, scratch,
+                                                    &blobData);
+      switch (recordID) {
+      case XREF_TYPE_PATH_PIECE: {
+        IdentifierID IID;
+        XRefTypePathPieceLayout::readRecord(scratch, IID, None);
+        result = getIdentifier(IID);
+        break;
+      }
+      case XREF_VALUE_PATH_PIECE: {
+        IdentifierID IID;
+        XRefValuePathPieceLayout::readRecord(scratch, None, IID, None, None);
+        result = getIdentifier(IID);
+        break;
+      }
+      case XREF_INITIALIZER_PATH_PIECE:
+        result = getContext().Id_init;
+        break;
+
+      case XREF_EXTENSION_PATH_PIECE:
+      case XREF_OPERATOR_OR_ACCESSOR_PATH_PIECE:
+        break;
+
+      case XREF_GENERIC_PARAM_PATH_PIECE:
+        // Can't get the name without deserializing.
+        result = Identifier();
+        break;
+
+      default:
+        // Unknown encoding.
+        return Identifier();
+      }
+    }
+    return result;
+  };
+
   if (values.empty()) {
-    return llvm::make_error<XRefError>("top-level value not found", pathTrace);
+    return llvm::make_error<XRefError>("top-level value not found", pathTrace,
+                                       getXRefDeclNameForError());
   }
 
   // Filters for values discovered in the remaining path pieces.
@@ -1393,7 +1444,8 @@
 
       if (values.size() != 1) {
         return llvm::make_error<XRefError>("multiple matching base values",
-                                           pathTrace);
+                                           pathTrace,
+                                           getXRefDeclNameForError());
       }
 
       auto nominal = dyn_cast<NominalTypeDecl>(values.front());
@@ -1401,7 +1453,8 @@
 
       if (!nominal) {
         return llvm::make_error<XRefError>("base is not a nominal type",
-                                           pathTrace);
+                                           pathTrace,
+                                           getXRefDeclNameForError());
       }
 
       auto members = nominal->lookupDirect(memberName);
@@ -1491,7 +1544,8 @@
     case XREF_GENERIC_PARAM_PATH_PIECE: {
       if (values.size() != 1) {
         return llvm::make_error<XRefError>("multiple matching base values",
-                                           pathTrace);
+                                           pathTrace,
+                                           getXRefDeclNameForError());
       }
 
       uint32_t paramIndex;
@@ -1527,12 +1581,12 @@
       if (!paramList) {
         return llvm::make_error<XRefError>(
             "cross-reference to generic param for non-generic type",
-            pathTrace);
+            pathTrace, getXRefDeclNameForError());
       }
       if (paramIndex >= paramList->size()) {
         return llvm::make_error<XRefError>(
             "generic argument index out of bounds",
-            pathTrace);
+            pathTrace, getXRefDeclNameForError());
       }
 
       values.clear();
@@ -1556,7 +1610,8 @@
     }
 
     if (values.empty()) {
-      return llvm::make_error<XRefError>("result not found", pathTrace);
+      return llvm::make_error<XRefError>("result not found", pathTrace,
+                                         getXRefDeclNameForError());
     }
 
     // Reset the module filter.
@@ -2036,6 +2091,9 @@
     ctx.Stats->getFrontendCounters().NumDeclsDeserialized++;
 
   // Read the attributes (if any).
+  // This isn't just using DeclAttributes because that would result in the
+  // attributes getting reversed.
+  // FIXME: If we reverse them at serialization time we could get rid of this.
   DeclAttribute *DAttrs = nullptr;
   DeclAttribute **AttrsNext = &DAttrs;
   auto AddAttribute = [&](DeclAttribute *Attr) {
@@ -2518,6 +2576,7 @@
     uint8_t storedInitKind, rawAccessLevel;
     TypeID interfaceID, canonicalTypeID;
     DeclID overriddenID;
+    bool needsNewVTableEntry, firstTimeRequired;
     ArrayRef<uint64_t> argNameIDs;
 
     decls_block::ConstructorLayout::readRecord(scratch, contextID,
@@ -2526,7 +2585,10 @@
                                                throws, storedInitKind,
                                                genericEnvID, interfaceID,
                                                canonicalTypeID, overriddenID,
-                                               rawAccessLevel, argNameIDs);
+                                               rawAccessLevel,
+                                               needsNewVTableEntry,
+                                               firstTimeRequired,
+                                               argNameIDs);
 
     // Resolve the name ids.
     SmallVector<Identifier, 2> argNames;
@@ -2537,20 +2599,29 @@
     Optional<swift::CtorInitializerKind> initKind =
         getActualCtorInitializerKind(storedInitKind);
 
-    auto errorKind = DeclDeserializationError::Normal;
+    DeclDeserializationError::Flags errorFlags;
     if (initKind == CtorInitializerKind::Designated)
-      errorKind = DeclDeserializationError::DesignatedInitializer;
+      errorFlags |= DeclDeserializationError::DesignatedInitializer;
+    if (needsNewVTableEntry) {
+      errorFlags |= DeclDeserializationError::NeedsVTableEntry;
+      DeclAttributes attrs;
+      attrs.setRawAttributeChain(DAttrs);
+      if (attrs.hasAttribute<RequiredAttr>())
+        errorFlags |= DeclDeserializationError::NeedsAllocatingVTableEntry;
+    }
+    if (firstTimeRequired)
+      errorFlags |= DeclDeserializationError::NeedsAllocatingVTableEntry;
 
     auto overridden = getDeclChecked(overriddenID);
     if (!overridden) {
       llvm::consumeError(overridden.takeError());
-      return llvm::make_error<OverrideError>(name, errorKind);
+      return llvm::make_error<OverrideError>(name, errorFlags);
     }
 
     auto canonicalType = getTypeChecked(canonicalTypeID);
     if (!canonicalType) {
       return llvm::make_error<TypeError>(
-          name, takeErrorInfo(canonicalType.takeError()), errorKind);
+          name, takeErrorInfo(canonicalType.takeError()), errorFlags);
     }
 
     auto parent = getDeclContext(contextID);
@@ -2618,6 +2689,7 @@
       ctor->setInitKind(initKind.getValue());
     if (auto overriddenCtor = cast_or_null<ConstructorDecl>(overridden.get()))
       ctor->setOverriddenDecl(overriddenCtor);
+    ctor->setNeedsNewVTableEntry(needsNewVTableEntry);
     break;
   }
 
@@ -2744,7 +2816,7 @@
     DeclID associatedDeclID;
     DeclID overriddenID;
     DeclID accessorStorageDeclID;
-    bool hasCompoundName;
+    bool hasCompoundName, needsNewVTableEntry;
     ArrayRef<uint64_t> nameIDs;
 
     decls_block::FuncLayout::readRecord(scratch, contextID, isImplicit,
@@ -2755,7 +2827,7 @@
                                         associatedDeclID, overriddenID,
                                         accessorStorageDeclID, hasCompoundName,
                                         rawAddressorKind, rawAccessLevel,
-                                        nameIDs);
+                                        needsNewVTableEntry, nameIDs);
 
     // Resolve the name ids.
     SmallVector<Identifier, 2> names;
@@ -2771,16 +2843,20 @@
         name = DeclName(names[0]);
     }
 
+    DeclDeserializationError::Flags errorFlags;
+    if (needsNewVTableEntry)
+      errorFlags |= DeclDeserializationError::NeedsVTableEntry;
+
     Expected<Decl *> overridden = getDeclChecked(overriddenID);
     if (!overridden) {
       llvm::consumeError(overridden.takeError());
-      return llvm::make_error<OverrideError>(name);
+      return llvm::make_error<OverrideError>(name, errorFlags);
     }
 
     auto canonicalType = getTypeChecked(canonicalTypeID);
     if (!canonicalType) {
       return llvm::make_error<TypeError>(
-          name, takeErrorInfo(canonicalType.takeError()));
+          name, takeErrorInfo(canonicalType.takeError()), errorFlags);
     }
 
     auto DC = getDeclContext(contextID);
@@ -2790,8 +2866,11 @@
     // If we are an accessor on a var or subscript, make sure it is deserialized
     // first.
     auto accessor = getDeclChecked(accessorStorageDeclID);
-    if (!accessor)
-      return accessor.takeError();
+    if (!accessor) {
+      // FIXME: "TypeError" isn't exactly correct for this.
+      return llvm::make_error<TypeError>(
+          name, takeErrorInfo(accessor.takeError()), errorFlags);
+    }
 
     // Read generic params before reading the type, because the type may
     // reference generic parameters, and we want them to have a dummy
@@ -2873,6 +2952,7 @@
       fn->setImplicit();
     fn->setMutating(isMutating);
     fn->setDynamicSelf(hasDynamicSelf);
+    fn->setNeedsNewVTableEntry(needsNewVTableEntry);
     break;
   }
 
@@ -3689,9 +3769,10 @@
     auto nominal = dyn_cast<NominalTypeDecl>(nominalOrError.get());
     if (!nominal) {
       XRefTracePath tinyTrace{*nominalOrError.get()->getModuleContext()};
-      tinyTrace.addValue(cast<ValueDecl>(nominalOrError.get())->getName());
+      DeclName fullName = cast<ValueDecl>(nominalOrError.get())->getFullName();
+      tinyTrace.addValue(fullName.getBaseName());
       return llvm::make_error<XRefError>("declaration is not a nominal type",
-                                         tinyTrace);
+                                         tinyTrace, fullName);
     }
     typeOrOffset = NominalType::get(nominal, parentTy.get(), ctx);
 
@@ -4371,17 +4452,48 @@
         fatal(next.takeError());
 
       // Drop the member if it had a problem.
-      // FIXME: If this was a non-final, non-dynamic, non-@objc-overriding
-      // member, it's going to affect the vtable layout, and /every single call/
-      // will be wrong.
+      // FIXME: Handle overridable members in class extensions too, someday.
       if (auto *containingClass = dyn_cast<ClassDecl>(container)) {
-        auto handleMissingDesignatedInit =
-            [containingClass](const DeclDeserializationError &error) {
-          if (error.getKind() != OverrideError::DesignatedInitializer)
-            return;
-          containingClass->setHasMissingDesignatedInitializers();
+        auto handleMissingClassMember =
+            [&](const DeclDeserializationError &error) {
+          if (error.isDesignatedInitializer())
+            containingClass->setHasMissingDesignatedInitializers();
+          if (error.needsVTableEntry() || error.needsAllocatingVTableEntry())
+            containingClass->setHasMissingVTableEntries();
+
+          if (error.getName().getBaseName() == getContext().Id_init) {
+            members.push_back(MissingMemberDecl::forInitializer(
+                getContext(), containingClass, error.getName(),
+                error.needsVTableEntry(), error.needsAllocatingVTableEntry()));
+          } else if (error.needsVTableEntry()) {
+            members.push_back(MissingMemberDecl::forMethod(
+                getContext(), containingClass, error.getName(),
+                error.needsVTableEntry()));
+          }
+          // FIXME: Handle other kinds of missing members: properties,
+          // subscripts, and methods that don't need vtable entries.
         };
-        llvm::handleAllErrors(next.takeError(), handleMissingDesignatedInit);
+        llvm::handleAllErrors(next.takeError(), handleMissingClassMember);
+      } else if (auto *containingProto = dyn_cast<ProtocolDecl>(container)) {
+        auto handleMissingProtocolMember =
+            [&](const DeclDeserializationError &error) {
+          assert(!error.needsAllocatingVTableEntry());
+          if (error.needsVTableEntry())
+            containingProto->setHasMissingRequirements(true);
+
+          if (error.getName().getBaseName() == getContext().Id_init) {
+            members.push_back(MissingMemberDecl::forInitializer(
+                getContext(), containingProto, error.getName(),
+                error.needsVTableEntry(), error.needsAllocatingVTableEntry()));
+          } else if (error.needsVTableEntry()) {
+            members.push_back(MissingMemberDecl::forMethod(
+                getContext(), containingProto, error.getName(),
+                error.needsVTableEntry()));
+          }
+          // FIXME: Handle other kinds of missing members: properties,
+          // subscripts, and methods that don't need vtable entries.
+        };
+        llvm::handleAllErrors(next.takeError(), handleMissingProtocolMember);
       } else {
         llvm::consumeError(next.takeError());
       }
@@ -4464,20 +4576,69 @@
 
   ArrayRef<uint64_t>::iterator rawIDIter = rawIDs.begin();
 
+  // An imported requirement may have changed type between Swift versions.
+  // In this situation we need to do a post-pass to fill in missing
+  // requirements with opaque witnesses.
+  bool needToFillInOpaqueValueWitnesses = false;
   while (valueCount--) {
-    auto req = cast<ValueDecl>(getDecl(*rawIDIter++));
-    auto witness = cast_or_null<ValueDecl>(getDecl(*rawIDIter++));
-    assert(witness ||
+    ValueDecl *req;
+    
+    auto trySetWitness = [&](Witness w) {
+      if (req)
+        conformance->setWitness(req, w);
+    };
+    
+    auto deserializedReq = getDeclChecked(*rawIDIter++);
+    if (deserializedReq) {
+      req = cast<ValueDecl>(*deserializedReq);
+    } else if (getContext().LangOpts.EnableDeserializationRecovery) {
+      consumeError(deserializedReq.takeError());
+      req = nullptr;
+      needToFillInOpaqueValueWitnesses = true;
+    } else {
+      fatal(deserializedReq.takeError());
+    }
+    
+    bool isOpaque = false;
+    ValueDecl *witness;
+    auto deserializedWitness = getDeclChecked(*rawIDIter++);
+    if (deserializedWitness) {
+      witness = cast<ValueDecl>(*deserializedWitness);
+    // Across language compatibility versions, the witnessing decl may have
+    // changed its signature as seen by the current compatibility version.
+    // In that case, we want the conformance to still be available, but
+    // we can't make use of the relationship to the underlying decl.
+    } else if (getContext().LangOpts.EnableDeserializationRecovery) {
+      consumeError(deserializedWitness.takeError());
+      isOpaque = true;
+      witness = nullptr;
+    } else {
+      fatal(deserializedWitness.takeError());
+    }
+    
+    assert(!req || isOpaque || witness ||
            req->getAttrs().hasAttribute<OptionalAttr>() ||
            req->getAttrs().isUnavailable(getContext()));
-    if (!witness) {
-      conformance->setWitness(req, Witness());
+    if (!witness && !isOpaque) {
+      trySetWitness(Witness());
       continue;
     }
 
     // Generic signature and environment.
     GenericSignature *syntheticSig = nullptr;
     GenericEnvironment *syntheticEnv = nullptr;
+    
+    auto trySetOpaqueWitness = [&]{
+      if (!req)
+        return;
+      
+      // We shouldn't yet need to worry about generic requirements, since
+      // an imported ObjC method should never be generic.
+      assert(syntheticSig == nullptr && syntheticEnv == nullptr &&
+             "opaque witness shouldn't be generic yet. when this is "
+             "possible, it should use forwarding substitutions");
+      conformance->setWitness(req, Witness::forOpaque(req));
+    };
 
     // Requirement -> synthetic map.
     SmallVector<Substitution, 4> reqToSyntheticSubs;
@@ -4518,16 +4679,22 @@
       }
     }
 
+    // Handle opaque witnesses that couldn't be deserialized.
+    if (isOpaque) {
+      trySetOpaqueWitness();
+      continue;
+    }
+
     // Handle simple witnesses.
     if (witnessSubstitutions.empty() && !syntheticSig && !syntheticEnv &&
         reqToSyntheticSubs.empty()) {
-      conformance->setWitness(req, Witness(witness));
+      trySetWitness(Witness(witness));
       continue;
     }
 
     // Set the witness.
-    conformance->setWitness(req, Witness(witness, witnessSubstitutions,
-                                         syntheticEnv, reqToSyntheticSubs));
+    trySetWitness(Witness(witness, witnessSubstitutions,
+                          syntheticEnv, reqToSyntheticSubs));
   }
   assert(rawIDIter <= rawIDs.end() && "read too much");
 
@@ -4558,6 +4725,20 @@
     conformance->setTypeWitness(typeWitness.first, typeWitness.second.first,
                                 typeWitness.second.second);
   }
+  
+  // Fill in opaque value witnesses if we need to.
+  if (needToFillInOpaqueValueWitnesses) {
+    for (auto member : proto->getMembers()) {
+      // We only care about non-associated-type requirements.
+      auto valueMember = dyn_cast<ValueDecl>(member);
+      if (!valueMember || !valueMember->isProtocolRequirement()
+          || isa<AssociatedTypeDecl>(valueMember))
+        continue;
+      
+      if (!conformance->hasWitness(valueMember))
+        conformance->setWitness(valueMember, Witness::forOpaque(valueMember));
+    }
+  }
 }
 
 GenericEnvironment *ModuleFile::loadGenericEnvironment(const DeclContext *decl,
diff --git a/lib/Serialization/DeserializationErrors.h b/lib/Serialization/DeserializationErrors.h
index 5af0465..6742a4f 100644
--- a/lib/Serialization/DeserializationErrors.h
+++ b/lib/Serialization/DeserializationErrors.h
@@ -50,6 +50,21 @@
       : kind(K),
         data(llvm::PointerLikeTypeTraits<T>::getAsVoidPointer(value)) {}
 
+    Identifier getAsIdentifier() const {
+      switch (kind) {
+      case Kind::Value:
+      case Kind::Operator:
+        return getDataAs<Identifier>();
+      case Kind::Type:
+      case Kind::OperatorFilter:
+      case Kind::Accessor:
+      case Kind::Extension:
+      case Kind::GenericParam:
+      case Kind::Unknown:
+        return Identifier();
+      }
+    }
+
     void print(raw_ostream &os) const {
       switch (kind) {
       case Kind::Value:
@@ -164,6 +179,15 @@
     path.push_back({ PathPiece::Kind::Unknown, kind });
   }
 
+  Identifier getLastName() const {
+    for (auto &piece : reversed(path)) {
+      Identifier result = piece.getAsIdentifier();
+      if (!result.empty())
+        return result;
+    }
+    return Identifier();
+  }
+
   void removeLast() {
     path.pop_back();
   }
@@ -183,17 +207,30 @@
   void anchor() override;
 
 public:
-  enum Kind {
-    Normal,
-    DesignatedInitializer
+  enum Flag : unsigned {
+    DesignatedInitializer = 1 << 0,
+    NeedsVTableEntry = 1 << 1,
+    NeedsAllocatingVTableEntry = 1 << 2,
   };
+  using Flags = OptionSet<Flag>;
 
 protected:
-  Kind kind = Normal;
+  DeclName name;
+  Flags flags;
 
 public:
-  Kind getKind() const {
-    return kind;
+  DeclName getName() const {
+    return name;
+  }
+
+  bool isDesignatedInitializer() const {
+    return flags.contains(Flag::DesignatedInitializer);
+  }
+  bool needsVTableEntry() const {
+    return flags.contains(Flag::NeedsVTableEntry);
+  }
+  bool needsAllocatingVTableEntry() const {
+    return flags.contains(Flag::NeedsAllocatingVTableEntry);
   }
 
   bool isA(const void *const ClassID) const override {
@@ -212,8 +249,10 @@
   const char *message;
 public:
   template <size_t N>
-  XRefError(const char (&message)[N], XRefTracePath path)
-      : path(path), message(message) {}
+  XRefError(const char (&message)[N], XRefTracePath path, DeclName name)
+      : path(path), message(message) {
+    this->name = name;
+  }
 
   void log(raw_ostream &OS) const override {
     OS << message << "\n";
@@ -232,11 +271,10 @@
   static const char ID;
   void anchor() override;
 
-  DeclName name;
-
 public:
-  explicit OverrideError(DeclName name, Kind kind = Normal) : name(name) {
-    this->kind = kind;
+  explicit OverrideError(DeclName name, Flags flags = {}) {
+    this->name = name;
+    this->flags = flags;
   }
 
   void log(raw_ostream &OS) const override {
@@ -253,13 +291,13 @@
   static const char ID;
   void anchor() override;
 
-  DeclName name;
   std::unique_ptr<ErrorInfoBase> underlyingReason;
 public:
   explicit TypeError(DeclName name, std::unique_ptr<ErrorInfoBase> reason,
-                     Kind kind = Normal)
-      : name(name), underlyingReason(std::move(reason)) {
-    this->kind = kind;
+                     Flags flags = {})
+      : underlyingReason(std::move(reason)) {
+    this->name = name;
+    this->flags = flags;
   }
 
   void log(raw_ostream &OS) const override {
diff --git a/lib/Serialization/DeserializeSIL.cpp b/lib/Serialization/DeserializeSIL.cpp
index c9b1319..50e7df9 100644
--- a/lib/Serialization/DeserializeSIL.cpp
+++ b/lib/Serialization/DeserializeSIL.cpp
@@ -698,7 +698,9 @@
   SILDeclRef DRef(cast<ValueDecl>(MF->getDecl(ListOfValues[NextIdx])),
                   (SILDeclRef::Kind)ListOfValues[NextIdx+1],
                   (ResilienceExpansion)ListOfValues[NextIdx+2],
-                  ListOfValues[NextIdx+3], ListOfValues[NextIdx+4] > 0);
+                  /*isCurried=*/false, ListOfValues[NextIdx+4] > 0);
+  if (ListOfValues[NextIdx+3] < DRef.getUncurryLevel())
+    DRef = DRef.asCurried();
   NextIdx += 5;
   return DRef;
 }
@@ -1081,10 +1083,9 @@
       Substitutions.push_back(*sub);
     }
 
-    ResultVal =
-        Builder.createApply(Loc, getLocalValue(ValID, FnTy), SubstFnTy,
-                            substConventions.getSILResultType(), Substitutions,
-                            Args, IsNonThrowingApply != 0);
+    ResultVal = Builder.createApply(Loc, getLocalValue(ValID, FnTy),
+                                    Substitutions, Args,
+                                    IsNonThrowingApply != 0);
     break;
   }
   case ValueKind::TryApplyInst: {
@@ -1119,10 +1120,8 @@
       Substitutions.push_back(*sub);
     }
 
-    ResultVal = Builder.createTryApply(Loc,
-                                       getLocalValue(ValID, FnTy),
-                                       SubstFnTy, Substitutions, Args,
-                                       normalBB, errorBB);
+    ResultVal = Builder.createTryApply(Loc, getLocalValue(ValID, FnTy),
+                                       Substitutions, Args, normalBB, errorBB);
     break;
   }
   case ValueKind::PartialApplyInst: {
@@ -1157,9 +1156,9 @@
           ListOfValues[I], fnConv.getSILArgumentType(I + unappliedArgs)));
 
     // FIXME: Why the arbitrary order difference in IRBuilder type argument?
-    ResultVal = Builder.createPartialApply(Loc, FnVal, SubstFnTy,
-                                           Substitutions, Args,
-                                           closureTy);
+    ResultVal = Builder.createPartialApply(
+        Loc, FnVal, Substitutions, Args,
+        closureTy.getAs<SILFunctionType>()->getCalleeConvention());
     break;
   }
   case ValueKind::BuiltinInst: {
@@ -2071,8 +2070,106 @@
     ResultVal = Builder.createUnreachable(Loc);
     break;
   }
+  case ValueKind::KeyPathInst: {
+    unsigned nextValue = 0;
+    SILType kpTy
+      = getSILType(MF->getType(TyID), (SILValueCategory)TyCategory);
+
+    auto rootTy = MF->getType(ListOfValues[nextValue++]);
+    auto valueTy = MF->getType(ListOfValues[nextValue++]);
+    auto numComponents = ListOfValues[nextValue++];
+    auto numOperands = ListOfValues[nextValue++];
+    assert(numOperands == 0 && "operands not implemented yet");
+    auto numSubstitutions = ListOfValues[nextValue++];
+    auto objcString = MF->getIdentifier(ListOfValues[nextValue++]).str();
+    auto numGenericParams = ListOfValues[nextValue++];
+    
+    SmallVector<GenericTypeParamType *, 4> genericParams;
+    while (numGenericParams-- > 0) {
+      genericParams.push_back(MF->getType(ListOfValues[nextValue++])
+                                ->castTo<GenericTypeParamType>());
+    }
+    
+    SmallVector<KeyPathPatternComponent, 4> components;
+    while (numComponents-- > 0) {
+      auto kind =
+        (KeyPathComponentKindEncoding)ListOfValues[nextValue++];
+      auto type = MF->getType(ListOfValues[nextValue++])
+        ->getCanonicalType();
+      
+      auto handleComputedId =
+      [&]() -> KeyPathPatternComponent::ComputedPropertyId {
+        auto kind =
+          (KeyPathComputedComponentIdKindEncoding)ListOfValues[nextValue++];
+        switch (kind) {
+        case KeyPathComputedComponentIdKindEncoding::Property:
+          return cast<VarDecl>(MF->getDecl(ListOfValues[nextValue++]));
+        case KeyPathComputedComponentIdKindEncoding::Function: {
+          auto name = MF->getIdentifier(ListOfValues[nextValue++]);
+          return getFuncForReference(name.str());
+        }
+        case KeyPathComputedComponentIdKindEncoding::DeclRef: {
+          // read SILDeclRef
+          return getSILDeclRef(MF, ListOfValues, nextValue);
+        }
+        }
+      };
+      
+      switch (kind) {
+      case KeyPathComponentKindEncoding::StoredProperty: {
+        auto decl = cast<VarDecl>(MF->getDecl(ListOfValues[nextValue++]));
+        components.push_back(
+          KeyPathPatternComponent::forStoredProperty(decl, type));
+        break;
+      }
+      case KeyPathComponentKindEncoding::GettableProperty: {
+        auto id = handleComputedId();
+        auto getterName = MF->getIdentifier(ListOfValues[nextValue++]);
+        auto getter = getFuncForReference(getterName.str());
+        components.push_back(
+          KeyPathPatternComponent::forComputedGettableProperty(id, getter, {},
+                                                               type));
+        break;
+      }
+      case KeyPathComponentKindEncoding::SettableProperty: {
+        auto id = handleComputedId();
+        auto getterName = MF->getIdentifier(ListOfValues[nextValue++]);
+        auto getter = getFuncForReference(getterName.str());
+        auto setterName = MF->getIdentifier(ListOfValues[nextValue++]);
+        auto setter = getFuncForReference(setterName.str());
+        components.push_back(
+          KeyPathPatternComponent::forComputedSettableProperty(id,
+                                                               getter, setter,
+                                                               {}, type));
+        break;
+      }
+      }
+    }
+    
+    SmallVector<Requirement, 4> requirements;
+    MF->readGenericRequirements(requirements, SILCursor);
+    
+    SmallVector<Substitution, 4> substitutions;
+    while (numSubstitutions-- > 0) {
+      auto sub = MF->maybeReadSubstitution(SILCursor);
+      substitutions.push_back(*sub);
+    }
+    
+    CanGenericSignature sig = nullptr;
+    if (!genericParams.empty() || !requirements.empty())
+      sig = GenericSignature::get(genericParams, requirements)
+         ->getCanonicalSignature();
+    
+    auto pattern = KeyPathPattern::get(SILMod, sig,
+                                       rootTy->getCanonicalType(),
+                                       valueTy->getCanonicalType(),
+                                       components,
+                                       objcString);
+    
+    ResultVal = Builder.createKeyPath(Loc, pattern, substitutions, kpTy);
+    break;
+  }
   case ValueKind::MarkUninitializedBehaviorInst:
-  case ValueKind::KeyPathInst:
     llvm_unreachable("todo");
   }
 
diff --git a/lib/Serialization/ModuleFile.cpp b/lib/Serialization/ModuleFile.cpp
index 02bc030..56f6e40 100644
--- a/lib/Serialization/ModuleFile.cpp
+++ b/lib/Serialization/ModuleFile.cpp
@@ -200,7 +200,9 @@
       default:
         // Add new cases here, in descending order.
       case 4:
-        result.compatibilityVersion = blobData.substr(scratch[2]+1, scratch[3]);
+        result.compatibilityVersion =
+          version::Version(blobData.substr(scratch[2]+1, scratch[3]),
+                           SourceLoc(), nullptr);
         LLVM_FALLTHROUGH;
       case 3:
         result.shortVersion = blobData.slice(0, scratch[2]);
@@ -1923,3 +1925,7 @@
   assert(hasEntryPoint());
   return cast_or_null<ClassDecl>(File.getDecl(File.Bits.EntryPointDeclID));
 }
+
+const version::Version &SerializedASTFile::getLanguageVersionBuiltWith() const {
+  return File.CompatibilityVersion;
+}
diff --git a/lib/Serialization/SILFormat.h b/lib/Serialization/SILFormat.h
index 2e5987a..c7efa32 100644
--- a/lib/Serialization/SILFormat.h
+++ b/lib/Serialization/SILFormat.h
@@ -69,6 +69,17 @@
   SIL_CAST_CONSUMPTION_COPY_ON_SUCCESS,
 };
 
+enum class KeyPathComponentKindEncoding : uint8_t {
+  StoredProperty,
+  GettableProperty,
+  SettableProperty,
+};
+enum class KeyPathComputedComponentIdKindEncoding : uint8_t {
+  Property,
+  Function,
+  DeclRef,
+};
+
 // Constants for packing an encoded CheckedCastKind and
 // CastConsumptionKind together.
 enum {
diff --git a/lib/Serialization/Serialization.cpp b/lib/Serialization/Serialization.cpp
index b0c983e..078b5d5 100644
--- a/lib/Serialization/Serialization.cpp
+++ b/lib/Serialization/Serialization.cpp
@@ -1526,6 +1526,9 @@
   case DeclKind::PrecedenceGroup:
     llvm_unreachable("decl should never be a member");
 
+  case DeclKind::MissingMember:
+    llvm_unreachable("should never need to reserialize a member placeholder");
+
   case DeclKind::IfConfig:
     return false;
 
@@ -1948,6 +1951,7 @@
   case DAK_SynthesizedProtocol:
   case DAK_Count:
   case DAK_Implements:
+  case DAK_NSKeyedArchiveLegacy:
     llvm_unreachable("cannot serialize attribute");
     return;
 
@@ -2314,6 +2318,8 @@
 void Serializer::writeDecl(const Decl *D) {
   using namespace decls_block;
 
+  PrettyStackTraceDecl trace("serializing", D);
+
   auto id = DeclAndTypeIDs[D].first;
   assert(id != 0 && "decl or type not referenced properly");
   (void)id;
@@ -2502,6 +2508,9 @@
     break;
   }
 
+  case DeclKind::MissingMember:
+    llvm_unreachable("member placeholders shouldn't be serialized");
+
   case DeclKind::InfixOperator: {
     auto op = cast<InfixOperatorDecl>(D);
     verifyAttrSerializable(op);
@@ -2849,6 +2858,7 @@
                            !fn->getFullName().isSimpleName(),
                            rawAddressorKind,
                            rawAccessLevel,
+                           fn->needsNewVTableEntry(),
                            nameComponents);
 
     writeGenericParams(fn->getGenericParams());
@@ -2954,6 +2964,11 @@
       getRawStableAccessibility(ctor->getFormalAccess());
     Type ty = ctor->getInterfaceType();
 
+    bool firstTimeRequired = ctor->isRequired();
+    if (auto *overridden = ctor->getOverriddenDecl())
+      if (firstTimeRequired && overridden->isRequired())
+        firstTimeRequired = false;
+
     unsigned abbrCode = DeclTypeAbbrCodes[ConstructorLayout::Code];
     ConstructorLayout::emitRecord(Out, ScratchRecord, abbrCode,
                                   contextID,
@@ -2971,6 +2986,8 @@
                                   addTypeRef(ty->getCanonicalType()),
                                   addDeclRef(ctor->getOverriddenDecl()),
                                   rawAccessLevel,
+                                  ctor->needsNewVTableEntry(),
+                                  firstTimeRequired,
                                   nameComponents);
 
     writeGenericParams(ctor->getGenericParams());
@@ -3848,7 +3865,7 @@
 
   bool parseRoot(FileNameToGroupNameMap &Map, llvm::yaml::Node *Root,
                  StringRef ParentName) {
-    llvm::yaml::MappingNode *MapNode = dyn_cast<llvm::yaml::MappingNode>(Root);
+    auto *MapNode = dyn_cast<llvm::yaml::MappingNode>(Root);
     if (!MapNode) {
       return true;
     }
@@ -3922,7 +3939,7 @@
 
     // The format is a map of ("group0" : ["file1", "file2"]), meaning all
     // symbols from file1 and file2 belong to "group0".
-    llvm::yaml::MappingNode *Map = dyn_cast<llvm::yaml::MappingNode>(Root);
+    auto *Map = dyn_cast<llvm::yaml::MappingNode>(Root);
     if (!Map) {
       return true;
     }
diff --git a/lib/Serialization/SerializeSIL.cpp b/lib/Serialization/SerializeSIL.cpp
index 52845ca..9f8f1c3 100644
--- a/lib/Serialization/SerializeSIL.cpp
+++ b/lib/Serialization/SerializeSIL.cpp
@@ -235,6 +235,8 @@
     /// deserialization if the function body for F should be deserialized.
     bool shouldEmitFunctionBody(const SILFunction *F, bool isReference = true);
 
+    IdentifierID addSILFunctionRef(SILFunction *F);
+
   public:
     SILSerializer(Serializer &S, ASTContext &Ctx,
                   llvm::BitstreamWriter &Out, bool serializeAll)
@@ -466,10 +468,17 @@
   ListOfValues.push_back(S.addDeclRef(Ref.getDecl()));
   ListOfValues.push_back((unsigned)Ref.kind);
   ListOfValues.push_back((unsigned)Ref.getResilienceExpansion());
-  ListOfValues.push_back(Ref.uncurryLevel);
+  ListOfValues.push_back(Ref.getUncurryLevel());
   ListOfValues.push_back(Ref.isForeign);
 }
 
+/// Get an identifier ref for a SILFunction and add it to the list of referenced
+/// functions.
+IdentifierID SILSerializer::addSILFunctionRef(SILFunction *F) {
+  addReferencedSILFunction(F);
+  return S.addIdentifierRef(Ctx.getIdentifier(F->getName()));
+}
+
 /// Helper function to update ListOfValues for MethodInst. Format:
 /// Attr, SILDeclRef (DeclID, Kind, uncurryLevel, IsObjC), and an operand.
 void SILSerializer::handleMethodInst(const MethodInst *MI,
@@ -1110,10 +1119,8 @@
         (unsigned)SI.getKind(), 0,
         S.addTypeRef(FRI->getType().getSwiftRValueType()),
         (unsigned)FRI->getType().getCategory(),
-        S.addIdentifierRef(Ctx.getIdentifier(ReferencedFunction->getName())));
+        addSILFunctionRef(ReferencedFunction));
 
-    // Make sure we declare the referenced function.
-    addReferencedSILFunction(ReferencedFunction);
     break;
   }
   case ValueKind::DeallocPartialRefInst:
@@ -1821,8 +1828,93 @@
 
     break;
   }
+  case ValueKind::KeyPathInst: {
+    auto KPI = cast<KeyPathInst>(&SI);
+    SmallVector<ValueID, 6> ListOfValues;
+
+    auto pattern = KPI->getPattern();
+    ListOfValues.push_back(S.addTypeRef(pattern->getRootType()));
+    ListOfValues.push_back(S.addTypeRef(pattern->getValueType()));
+    ListOfValues.push_back(pattern->getComponents().size());
+    ListOfValues.push_back(pattern->getNumOperands());
+    ListOfValues.push_back(KPI->getSubstitutions().size());
+    
+    ListOfValues.push_back(
+       S.addIdentifierRef(Ctx.getIdentifier(pattern->getObjCString())));
+
+    ArrayRef<Requirement> reqts;
+    if (auto sig = pattern->getGenericSignature()) {
+      ListOfValues.push_back(sig->getGenericParams().size());
+      for (auto param : sig->getGenericParams())
+        ListOfValues.push_back(S.addTypeRef(param));
+      reqts = sig->getRequirements();
+    } else {
+      ListOfValues.push_back(0);
+    }
+    
+    for (auto &component : pattern->getComponents()) {
+      auto handleComponentCommon = [&](KeyPathComponentKindEncoding kind) {
+        ListOfValues.push_back((unsigned)kind);
+        ListOfValues.push_back(S.addTypeRef(component.getComponentType()));
+      };
+      auto handleComputedId = [&](KeyPathPatternComponent::ComputedPropertyId id) {
+        switch (id.getKind()) {
+        case KeyPathPatternComponent::ComputedPropertyId::Property:
+          ListOfValues.push_back(
+            (unsigned)KeyPathComputedComponentIdKindEncoding::Property);
+          ListOfValues.push_back(S.addDeclRef(id.getProperty()));
+          break;
+        case KeyPathPatternComponent::ComputedPropertyId::Function:
+          ListOfValues.push_back(
+            (unsigned)KeyPathComputedComponentIdKindEncoding::Function);
+          ListOfValues.push_back(addSILFunctionRef(id.getFunction()));
+          break;
+        case KeyPathPatternComponent::ComputedPropertyId::DeclRef:
+          ListOfValues.push_back(
+            (unsigned)KeyPathComputedComponentIdKindEncoding::DeclRef);
+          handleSILDeclRef(S, id.getDeclRef(), ListOfValues);
+          break;
+        }
+      };
+    
+      switch (component.getKind()) {
+      case KeyPathPatternComponent::Kind::StoredProperty:
+        handleComponentCommon(KeyPathComponentKindEncoding::StoredProperty);
+        ListOfValues.push_back(S.addDeclRef(component.getStoredPropertyDecl()));
+        break;
+      case KeyPathPatternComponent::Kind::GettableProperty:
+        handleComponentCommon(KeyPathComponentKindEncoding::GettableProperty);
+        handleComputedId(component.getComputedPropertyId());
+        ListOfValues.push_back(
+                      addSILFunctionRef(component.getComputedPropertyGetter()));
+        assert(component.getComputedPropertyIndices().empty()
+               && "indices not implemented");
+        break;
+      case KeyPathPatternComponent::Kind::SettableProperty:
+        handleComponentCommon(KeyPathComponentKindEncoding::SettableProperty);
+        handleComputedId(component.getComputedPropertyId());
+        ListOfValues.push_back(
+                      addSILFunctionRef(component.getComputedPropertyGetter()));
+        ListOfValues.push_back(
+                      addSILFunctionRef(component.getComputedPropertySetter()));
+        assert(component.getComputedPropertyIndices().empty()
+               && "indices not implemented");
+        break;
+      }
+    }
+    
+    assert(KPI->getAllOperands().empty() && "operands not implemented yet");
+    SILOneTypeValuesLayout::emitRecord(Out, ScratchRecord,
+         SILAbbrCodes[SILOneTypeValuesLayout::Code], (unsigned)SI.getKind(),
+         S.addTypeRef(KPI->getType().getSwiftRValueType()),
+         (unsigned)KPI->getType().getCategory(),
+         ListOfValues);
+    S.writeGenericRequirements(reqts, SILAbbrCodes);
+    S.writeSubstitutions(KPI->getSubstitutions(), SILAbbrCodes);
+
+    break;
+  }
   case ValueKind::MarkUninitializedBehaviorInst:
-  case ValueKind::KeyPathInst:
     llvm_unreachable("todo");
   }
   // Non-void values get registered in the value table.
diff --git a/lib/Syntax/LegacyASTTransformer.cpp b/lib/Syntax/LegacyASTTransformer.cpp
index 84a6418..5737261 100644
--- a/lib/Syntax/LegacyASTTransformer.cpp
+++ b/lib/Syntax/LegacyASTTransformer.cpp
@@ -278,6 +278,15 @@
   return getUnknownDecl(D);
 }
 
+
+RC<SyntaxData>
+LegacyASTTransformer::visitMissingMemberDecl(
+    MissingMemberDecl *D,
+    const SyntaxData *Parent,
+    const CursorIndex IndexInParent) {
+  return getUnknownDecl(D);
+}
+
 RC<SyntaxData>
 LegacyASTTransformer::visitGenericTypeParamDecl(
     GenericTypeParamDecl *D,
@@ -1263,6 +1272,13 @@
   return getUnknownExpr(E);
 }
 
+RC<SyntaxData>
+LegacyASTTransformer::visitKeyPathDotExpr(KeyPathDotExpr *E,
+                                          const SyntaxData *Parent,
+                                          const CursorIndex IndexInParent) {
+  return getUnknownExpr(E);
+}
+
 RC<TokenSyntax>
 syntax::findTokenSyntax(tok ExpectedKind,
                         OwnedString ExpectedText,
diff --git a/lib/TBDGen/TBDGen.cpp b/lib/TBDGen/TBDGen.cpp
index d9153ba..f27bdd2 100644
--- a/lib/TBDGen/TBDGen.cpp
+++ b/lib/TBDGen/TBDGen.cpp
@@ -202,7 +202,7 @@
     paramLists = paramLists.slice(1);
   for (auto *paramList : paramLists) {
     for (auto *param : *paramList) {
-      if (auto defaultArg = param->getDefaultValue())
+      if (param->getDefaultValue())
         addSymbol(SILDeclRef::getDefaultArgGenerator(AFD, index));
       index++;
     }
diff --git a/stdlib/private/StdlibCollectionUnittest/CheckCollectionInstance.swift.gyb b/stdlib/private/StdlibCollectionUnittest/CheckCollectionInstance.swift.gyb
index 3bb4871..f4dea7b 100644
--- a/stdlib/private/StdlibCollectionUnittest/CheckCollectionInstance.swift.gyb
+++ b/stdlib/private/StdlibCollectionUnittest/CheckCollectionInstance.swift.gyb
@@ -257,8 +257,7 @@
   ${TRACE},
   resiliencyChecks: CollectionMisuseResiliencyChecks = .all,
   sameValue: (${Element}, ${Element}) -> Bool
-) where C.Iterator.Element == ${Element},
-  C.SubSequence : Collection {
+) where C.Iterator.Element == ${Element} {
 
   checkForwardCollection(expected, collection, message(),
     stackTrace: stackTrace, showFrame: showFrame, file: file, line: line,
@@ -278,7 +277,6 @@
   resiliencyChecks: CollectionMisuseResiliencyChecks = .all
 ) where
   C.Iterator.Element == ${Element},
-  C.SubSequence : ${TraversalCollection},
   ${Element} : Equatable {
 
   check${Traversal}Collection(
@@ -298,8 +296,7 @@
   resiliencyChecks: CollectionMisuseResiliencyChecks = .all,
   sameValue: (${Element}, ${Element}) -> Bool
 ) where
-  C.Iterator.Element == ${Element},
-  C.SubSequence : ${TraversalCollection} {
+  C.Iterator.Element == ${Element} {
 
   checkOneLevelOf${Traversal}Collection(expected, collection, ${trace},
     resiliencyChecks: resiliencyChecks, sameValue: sameValue)
@@ -504,8 +501,7 @@
   resiliencyChecks: CollectionMisuseResiliencyChecks = .all,
   sameValue: (${Element}, ${Element}) -> Bool
 ) where
-  S.Iterator.Element == ${Element},
-  S.SubSequence : ${TraversalCollection} {
+  S.Iterator.Element == ${Element} {
 
   let expectedArray = Array(expected)
 
diff --git a/stdlib/private/StdlibCollectionUnittest/CheckCollectionType.swift.gyb b/stdlib/private/StdlibCollectionUnittest/CheckCollectionType.swift.gyb
index 8ce2040..a550216 100644
--- a/stdlib/private/StdlibCollectionUnittest/CheckCollectionType.swift.gyb
+++ b/stdlib/private/StdlibCollectionUnittest/CheckCollectionType.swift.gyb
@@ -471,16 +471,9 @@
 %{
   from gyb_stdlib_support import collectionForTraversal
   def testConstraints(protocol):
-    if protocol == 'Collection':
-      subseq_as_collection = 'CollectionWithEquatableElement.SubSequence : Collection,'
-    else:
-      subseq_as_collection=''
     return '''
     C : %(protocol)s,
     CollectionWithEquatableElement : %(protocol)s,
-    %(subseq_as_collection)s
-    C.SubSequence : %(protocol)s,
-    C.Indices : %(protocol)s,
     CollectionWithEquatableElement.Iterator.Element : Equatable
   ''' % locals()
 
@@ -494,6 +487,7 @@
       [CollectionWithEquatableElement.Iterator.Element]
     ) -> CollectionWithEquatableElement,
 
+
     wrapValueIntoEquatable: @escaping (
       MinimalEquatableValue) -> CollectionWithEquatableElement.Iterator.Element,
 
diff --git a/stdlib/private/StdlibCollectionUnittest/CheckMutableCollectionType.swift.gyb b/stdlib/private/StdlibCollectionUnittest/CheckMutableCollectionType.swift.gyb
index c20f755..fb13a1a 100644
--- a/stdlib/private/StdlibCollectionUnittest/CheckMutableCollectionType.swift.gyb
+++ b/stdlib/private/StdlibCollectionUnittest/CheckMutableCollectionType.swift.gyb
@@ -121,8 +121,6 @@
     isFixedLengthCollection: Bool,
     collectionIsBidirectional: Bool = false
   ) where
-    C.SubSequence : MutableCollection,
-    C.Indices : Collection,
     CollectionWithEquatableElement.Iterator.Element : Equatable,
     CollectionWithComparableElement.Iterator.Element : Comparable {
 
@@ -783,8 +781,6 @@
     withUnsafeMutableBufferPointerIsSupported: Bool,
     isFixedLengthCollection: Bool
   ) where
-    C.SubSequence : BidirectionalCollection & MutableCollection,
-    C.Indices : BidirectionalCollection,
     CollectionWithEquatableElement.Iterator.Element : Equatable,
     CollectionWithComparableElement.Iterator.Element : Comparable {
 
@@ -929,8 +925,6 @@
     withUnsafeMutableBufferPointerIsSupported: Bool,
     isFixedLengthCollection: Bool
   ) where
-    C.SubSequence : RandomAccessCollection & MutableCollection,
-    C.Indices : RandomAccessCollection,
     CollectionWithEquatableElement.Iterator.Element : Equatable,
     CollectionWithComparableElement.Iterator.Element : Comparable {
 
diff --git a/stdlib/private/StdlibCollectionUnittest/CheckRangeReplaceableCollectionType.swift b/stdlib/private/StdlibCollectionUnittest/CheckRangeReplaceableCollectionType.swift
index 14363c6..245f486 100644
--- a/stdlib/private/StdlibCollectionUnittest/CheckRangeReplaceableCollectionType.swift
+++ b/stdlib/private/StdlibCollectionUnittest/CheckRangeReplaceableCollectionType.swift
@@ -462,10 +462,7 @@
     outOfBoundsIndexOffset: Int = 1,
     collectionIsBidirectional: Bool = false
   ) where
-    C.SubSequence : Collection,
-    C.Indices : Collection,
-    CollectionWithEquatableElement.Iterator.Element : Equatable,
-    CollectionWithEquatableElement.SubSequence : Collection {
+    CollectionWithEquatableElement.Iterator.Element : Equatable {
 
     var testNamePrefix = testNamePrefix
 
@@ -1180,8 +1177,6 @@
     resiliencyChecks: CollectionMisuseResiliencyChecks = .all,
     outOfBoundsIndexOffset: Int = 1
   ) where
-    C.SubSequence : BidirectionalCollection & RangeReplaceableCollection,
-    C.Indices : BidirectionalCollection,
     CollectionWithEquatableElement.Iterator.Element : Equatable {
 
     var testNamePrefix = testNamePrefix
@@ -1302,8 +1297,6 @@
     resiliencyChecks: CollectionMisuseResiliencyChecks = .all,
     outOfBoundsIndexOffset: Int = 1
   ) where
-    C.SubSequence : RandomAccessCollection & RangeReplaceableCollection,
-    C.Indices : RandomAccessCollection,
     CollectionWithEquatableElement.Iterator.Element : Equatable {
 
     var testNamePrefix = testNamePrefix
diff --git a/stdlib/private/StdlibCollectionUnittest/CheckRangeReplaceableSliceType.swift b/stdlib/private/StdlibCollectionUnittest/CheckRangeReplaceableSliceType.swift
index fb10e30..28a802e 100644
--- a/stdlib/private/StdlibCollectionUnittest/CheckRangeReplaceableSliceType.swift
+++ b/stdlib/private/StdlibCollectionUnittest/CheckRangeReplaceableSliceType.swift
@@ -33,7 +33,6 @@
     collectionIsBidirectional: Bool = false
   ) where
     C.SubSequence == C,
-    C.Indices : Collection,
     CollectionWithEquatableElement.SubSequence == CollectionWithEquatableElement,
     CollectionWithEquatableElement.Iterator.Element : Equatable {
 
@@ -165,7 +164,6 @@
     outOfBoundsIndexOffset: Int = 1
   ) where
     C.SubSequence == C,
-    C.Indices : BidirectionalCollection,
     CollectionWithEquatableElement.SubSequence == CollectionWithEquatableElement,
     CollectionWithEquatableElement.Iterator.Element : Equatable {
 
@@ -310,7 +308,6 @@
     outOfBoundsIndexOffset: Int = 1
   ) where
     C.SubSequence == C,
-    C.Indices : RandomAccessCollection,
     CollectionWithEquatableElement.SubSequence == CollectionWithEquatableElement,
     CollectionWithEquatableElement.Iterator.Element : Equatable {
 
diff --git a/stdlib/private/StdlibUnittest/StdlibUnittest.swift.gyb b/stdlib/private/StdlibUnittest/StdlibUnittest.swift.gyb
index 2d61bee..02b1df0 100644
--- a/stdlib/private/StdlibUnittest/StdlibUnittest.swift.gyb
+++ b/stdlib/private/StdlibUnittest/StdlibUnittest.swift.gyb
@@ -376,14 +376,7 @@
 % for Mutable in ['', 'Mutable']:
 public func expect${Mutable}CollectionType<X : ${Mutable}Collection>(
   _ x: X.Type
-) where
-  // FIXME(ABI)#2 (Associated Types with where clauses): there should be no constraints in
-  // the 'where' clause, all of these should be required by the protocol.
-%   if Mutable == '':
-  X.SubSequence : Collection,
-%   end
-  // X.SubSequence.Indices == X.Indices, // FIXME(ABI)#3 (Recursive Protocol Constraints): can't have this constraint now.
-  X.Indices : Collection {}
+) { }
 % end
 
 /// A slice is a `Collection` that when sliced returns an instance of
@@ -421,12 +414,7 @@
   indexType: X.Index.Type,
   indexDistanceType: X.IndexDistance.Type,
   indicesType: X.Indices.Type
-) where
-  // FIXME(ABI)#6 (Associated Types with where clauses): there should be no constraints in
-  // the 'where' clause, all of these should be required by the protocol.
-  X.SubSequence : Collection,
-  // X.SubSequence.Indices == X.Indices, // FIXME(ABI)#7 (Recursive Protocol Constraints): can't have this constraint now.
-  X.Indices : Collection {}
+) { }
 
 /// Check that all associated types of a `BidirectionalCollection` are what we
 /// expect them to be.
@@ -437,12 +425,7 @@
   indexType: X.Index.Type,
   indexDistanceType: X.IndexDistance.Type,
   indicesType: X.Indices.Type
-) where
-  // FIXME(ABI)#8 (Associated Types with where clauses): there should be no constraints in
-  // the 'where' clause, all of these should be required by the protocol.
-  X.SubSequence : BidirectionalCollection,
-  // X.SubSequence.Indices == X.Indices, // FIXME(ABI)#9 (Recursive Protocol Constraints): can't have this constraint now.
-  X.Indices : BidirectionalCollection {}
+) { }
 
 /// Check that all associated types of a `RandomAccessCollection` are what we
 /// expect them to be.
@@ -453,12 +436,7 @@
   indexType: X.Index.Type,
   indexDistanceType: X.IndexDistance.Type,
   indicesType: X.Indices.Type
-) where
-  // FIXME(ABI)#10 (Associated Types with where clauses): there should be no constraints in
-  // the 'where' clause, all of these should be required by the protocol.
-  X.SubSequence : RandomAccessCollection,
-  // X.SubSequence.Indices == X.Indices, // FIXME(ABI)#11 (Recursive Protocol Constraints): can't have this constraint now.
-  X.Indices : RandomAccessCollection {}
+) { }
 
 public struct AssertionResult : CustomStringConvertible {
   init(isPass: Bool) {
diff --git a/stdlib/public/Reflection/TypeLowering.cpp b/stdlib/public/Reflection/TypeLowering.cpp
index 1594317..f872afd 100644
--- a/stdlib/public/Reflection/TypeLowering.cpp
+++ b/stdlib/public/Reflection/TypeLowering.cpp
@@ -206,13 +206,19 @@
 /// Utility class for building values that contain witness tables.
 class ExistentialTypeInfoBuilder {
   TypeConverter &TC;
-  ExistentialTypeRepresentation Representation;
   std::vector<const ProtocolTypeRef *> Protocols;
+  ExistentialTypeRepresentation Representation;
+  ReferenceCounting Refcounting;
   bool ObjC;
   unsigned WitnessTableCount;
   bool Invalid;
 
   bool isSingleError() const {
+    // If we changed representation, it means we added a
+    // superclass constraint or an AnyObject member.
+    if (Representation != ExistentialTypeRepresentation::Opaque)
+      return false;
+
     if (Protocols.size() != 1)
       return false;
 
@@ -231,13 +237,6 @@
     }
 
     for (auto *P : Protocols) {
-      // FIXME: AnyObject should go away
-      if (P->isAnyObject()) {
-        Representation = ExistentialTypeRepresentation::Class;
-        // No extra witness table for AnyObject
-        continue;
-      }
-
       const FieldDescriptor *FD = TC.getBuilder().getFieldTypeInfo(P);
       if (FD == nullptr) {
         DEBUG(std::cerr << "No field descriptor: "; P->dump())
@@ -271,15 +270,69 @@
 public:
   ExistentialTypeInfoBuilder(TypeConverter &TC)
     : TC(TC), Representation(ExistentialTypeRepresentation::Opaque),
-      ObjC(false), WitnessTableCount(0), Invalid(false) {}
+      Refcounting(ReferenceCounting::Unknown),
+      ObjC(false), WitnessTableCount(0),
+      Invalid(false) {}
 
-  void addProtocol(const TypeRef *TR) {
-    if (auto *P = dyn_cast<const ProtocolTypeRef>(TR)) {
-      Protocols.push_back(P);
-    } else {
-      DEBUG(std::cerr << "Not a protocol: "; TR->dump())
-      Invalid = true;
+  void addProtocol(const ProtocolTypeRef *P) {
+    Protocols.push_back(P);
+  }
+
+  void addProtocolComposition(const ProtocolCompositionTypeRef *PC) {
+    for (auto *T : PC->getMembers()) {
+      if (auto *P = dyn_cast<ProtocolTypeRef>(T)) {
+        addProtocol(P);
+        continue;
+      }
+
+      if (auto *PC = dyn_cast<ProtocolCompositionTypeRef>(T)) {
+        addProtocolComposition(PC);
+        continue;
+      }
+
+      // Anything else should either be a superclass constraint, or
+      // we have an invalid typeref.
+      if (!isa<NominalTypeRef>(T) &&
+          !isa<BoundGenericTypeRef>(T)) {
+        DEBUG(std::cerr << "Bad existential member: "; T->dump())
+        Invalid = true;
+        continue;
+      }
+      auto *FD = TC.getBuilder().getFieldTypeInfo(T);
+      if (FD == nullptr) {
+        DEBUG(std::cerr << "No field descriptor: "; T->dump())
+        Invalid = true;
+        continue;
+      }
+
+      // We have a valid superclass constraint. It only affects
+      // lowering by class-constraining the entire existential.
+      switch (FD->Kind) {
+      case FieldDescriptorKind::Class:
+        Refcounting = ReferenceCounting::Native;
+        LLVM_FALLTHROUGH;
+
+      case FieldDescriptorKind::ObjCClass:
+        addAnyObject();
+        break;
+
+      default:
+        DEBUG(std::cerr << "Bad existential member: "; T->dump())
+        Invalid = true;
+        continue;
+      }
     }
+
+    if (PC->hasExplicitAnyObject())
+      addAnyObject();
+  }
+
+  void addAnyObject() {
+    Representation = ExistentialTypeRepresentation::Class;
+  }
+
+  void markInvalid() {
+    Invalid = true;
   }
 
   const TypeInfo *build() {
@@ -295,7 +348,7 @@
       }
 
       return TC.getReferenceTypeInfo(ReferenceKind::Strong,
-                                     ReferenceCounting::Unknown);
+                                     Refcounting);
     }
 
     RecordKind Kind;
@@ -317,7 +370,10 @@
     case ExistentialTypeRepresentation::Class:
       // Class existentials consist of a single retainable pointer
       // followed by witness tables.
-      builder.addField("object", TC.getUnknownObjectTypeRef());
+      if (Refcounting == ReferenceCounting::Unknown)
+        builder.addField("object", TC.getUnknownObjectTypeRef());
+      else
+        builder.addField("object", TC.getNativeObjectTypeRef());
       break;
     case ExistentialTypeRepresentation::Opaque: {
       auto *TI = TC.getTypeInfo(TC.getRawPointerTypeRef());
@@ -1097,8 +1153,7 @@
   const TypeInfo *
   visitProtocolCompositionTypeRef(const ProtocolCompositionTypeRef *PC) {
     ExistentialTypeInfoBuilder builder(TC);
-    for (auto *P : PC->getProtocols())
-      builder.addProtocol(P);
+    builder.addProtocolComposition(PC);
     return builder.build();
   }
 
@@ -1124,8 +1179,7 @@
     if (auto *P = dyn_cast<ProtocolTypeRef>(TR)) {
       builder.addProtocol(P);
     } else if (auto *PC = dyn_cast<ProtocolCompositionTypeRef>(TR)) {
-      for (auto *P : PC->getProtocols())
-        builder.addProtocol(P);
+      builder.addProtocolComposition(PC);
     } else {
       DEBUG(std::cerr << "Invalid existential metatype: "; EM->dump());
       return nullptr;
diff --git a/stdlib/public/Reflection/TypeRef.cpp b/stdlib/public/Reflection/TypeRef.cpp
index 1ff2bbb..0d470bf 100644
--- a/stdlib/public/Reflection/TypeRef.cpp
+++ b/stdlib/public/Reflection/TypeRef.cpp
@@ -140,8 +140,10 @@
 
   void visitProtocolCompositionTypeRef(const ProtocolCompositionTypeRef *PC) {
     printHeader("protocol_composition");
-    for (auto protocol : PC->getProtocols())
-      printRec(protocol);
+    if (PC->hasExplicitAnyObject())
+      OS << " any_object";
+    for (auto member : PC->getMembers())
+      printRec(member);
     OS << ')';
   }
 
@@ -253,7 +255,6 @@
   }
 
   bool visitFunctionTypeRef(const FunctionTypeRef *F) {
-    std::vector<TypeRef *> SubstitutedArguments;
     for (auto Argument : F->getArguments())
       if (!visit(Argument))
         return false;
@@ -266,8 +267,8 @@
 
   bool
   visitProtocolCompositionTypeRef(const ProtocolCompositionTypeRef *PC) {
-    for (auto Protocol : PC->getProtocols())
-      if (!visit(Protocol))
+    for (auto Member : PC->getMembers())
+      if (!visit(Member))
         return false;
     return true;
   }
diff --git a/stdlib/public/Reflection/TypeRefBuilder.cpp b/stdlib/public/Reflection/TypeRefBuilder.cpp
index 078513e..a84eeee 100644
--- a/stdlib/public/Reflection/TypeRefBuilder.cpp
+++ b/stdlib/public/Reflection/TypeRefBuilder.cpp
@@ -72,14 +72,6 @@
 }
 
 const TypeRef * TypeRefBuilder::
-lookupSuperclass(const std::string &MangledTypeName) {
-  // Superclasses are recorded as a special associated type named 'super'
-  // on the 'AnyObject' protocol.
-  return lookupTypeWitness(MangledTypeName, "super",
-                           ProtocolTypeRef::create(*this, "s9AnyObject_p"));
-}
-
-const TypeRef * TypeRefBuilder::
 lookupSuperclass(const TypeRef *TR) {
   auto *FD = getFieldTypeInfo(TR);
   if (FD == nullptr)
diff --git a/stdlib/public/SDK/CMakeLists.txt b/stdlib/public/SDK/CMakeLists.txt
index 237cbbc..c9cbe44 100644
--- a/stdlib/public/SDK/CMakeLists.txt
+++ b/stdlib/public/SDK/CMakeLists.txt
@@ -8,7 +8,7 @@
   list(APPEND SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES STATIC)
 endif()
 
-set(all_overlays "AppKit;AssetsLibrary;AVFoundation;CallKit;CloudKit;Contacts;CoreAudio;CoreData;CoreGraphics;CoreImage;CoreLocation;CoreMedia;CryptoTokenKit;Dispatch;Foundation;GameplayKit;GLKit;HomeKit;IOKit;Intents;MapKit;ObjectiveC;OpenCL;os;Photos;QuartzCore;SafariServices;SceneKit;simd;SpriteKit;UIKit;WatchKit;XCTest;XPC")
+set(all_overlays "AppKit;AssetsLibrary;AVFoundation;CallKit;CloudKit;Contacts;CoreAudio;CoreData;CoreFoundation;CoreGraphics;CoreImage;CoreLocation;CoreMedia;CryptoTokenKit;Dispatch;Foundation;GameplayKit;GLKit;HomeKit;IOKit;Intents;MapKit;ObjectiveC;OpenCL;os;Photos;QuartzCore;SafariServices;SceneKit;simd;SpriteKit;UIKit;WatchKit;XCTest;XPC")
 
 if(DEFINED SWIFT_OVERLAY_TARGETS)
   set(overlays_to_build ${SWIFT_OVERLAY_TARGETS})
diff --git a/stdlib/public/SDK/CloudKit/CMakeLists.txt b/stdlib/public/SDK/CloudKit/CMakeLists.txt
index 2a4ab81..8ec5c22 100644
--- a/stdlib/public/SDK/CloudKit/CMakeLists.txt
+++ b/stdlib/public/SDK/CloudKit/CMakeLists.txt
@@ -8,18 +8,10 @@
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   TARGET_SDKS OSX IOS IOS_SIMULATOR TVOS TVOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR
 
-  # The dependency on the 'os' module only appears in particular Apple-internal
-  # configurations, but it causes no harm to specify it unconditionally.
-  # The ./utils/find-overlay-dependencies.sh tool only touches the
-  # OSX|IOS|TVOS|WATCHOS lines, so the standalone "os" lines remain.
-  SWIFT_MODULE_DEPENDS_OSX Darwin Contacts CoreGraphics CoreLocation Dispatch Foundation IOKit ObjectiveC # auto-updated
-    os
-  SWIFT_MODULE_DEPENDS_IOS Darwin Contacts CoreLocation Dispatch Foundation ObjectiveC # auto-updated
-    os
-  SWIFT_MODULE_DEPENDS_TVOS Darwin CoreLocation Dispatch Foundation ObjectiveC # auto-updated
-    os
-  SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreLocation Dispatch Foundation ObjectiveC # auto-updated
-    os
+  SWIFT_MODULE_DEPENDS_OSX Darwin CoreGraphics CoreLocation Dispatch Foundation IOKit ObjectiveC os XPC # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics CoreLocation Dispatch Foundation ObjectiveC os # auto-updated
+  SWIFT_MODULE_DEPENDS_TVOS Darwin CoreGraphics CoreLocation Dispatch Foundation ObjectiveC os # auto-updated
+  SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreGraphics CoreLocation Dispatch Foundation ObjectiveC os # auto-updated
   FRAMEWORK_DEPENDS_WEAK CloudKit
 
   DEPLOYMENT_VERSION_OSX ${SWIFTLIB_DEPLOYMENT_VERSION_CLOUDKIT_OSX}
diff --git a/stdlib/public/SDK/Contacts/CMakeLists.txt b/stdlib/public/SDK/Contacts/CMakeLists.txt
index 67a45a9..8f5bd4f 100644
--- a/stdlib/public/SDK/Contacts/CMakeLists.txt
+++ b/stdlib/public/SDK/Contacts/CMakeLists.txt
@@ -8,8 +8,8 @@
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   TARGET_SDKS OSX IOS IOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR
   SWIFT_MODULE_DEPENDS_OSX Darwin CoreGraphics Dispatch Foundation IOKit ObjectiveC # auto-updated
-  SWIFT_MODULE_DEPENDS_IOS Darwin Dispatch Foundation ObjectiveC # auto-updated
-  SWIFT_MODULE_DEPENDS_WATCHOS Darwin Dispatch Foundation ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics Dispatch Foundation ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreGraphics Dispatch Foundation ObjectiveC # auto-updated
   FRAMEWORK_DEPENDS_WEAK Contacts
 
   DEPLOYMENT_VERSION_OSX ${SWIFTLIB_DEPLOYMENT_VERSION_CONTACTS_OSX}
diff --git a/stdlib/public/SDK/CoreAudio/CMakeLists.txt b/stdlib/public/SDK/CoreAudio/CMakeLists.txt
index d438ab8..0c51071 100644
--- a/stdlib/public/SDK/CoreAudio/CMakeLists.txt
+++ b/stdlib/public/SDK/CoreAudio/CMakeLists.txt
@@ -8,10 +8,10 @@
   SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   TARGET_SDKS OSX IOS IOS_SIMULATOR TVOS TVOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR
-  SWIFT_MODULE_DEPENDS_OSX Darwin Dispatch ObjectiveC # auto-updated
-  SWIFT_MODULE_DEPENDS_IOS Darwin Dispatch ObjectiveC # auto-updated
-  SWIFT_MODULE_DEPENDS_TVOS Darwin Dispatch ObjectiveC # auto-updated
-  SWIFT_MODULE_DEPENDS_WATCHOS Darwin Dispatch ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_OSX Darwin CoreFoundation Dispatch ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin CoreFoundation Dispatch ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_TVOS Darwin CoreFoundation Dispatch ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreFoundation Dispatch ObjectiveC # auto-updated
   FRAMEWORK_DEPENDS CoreAudio
 
   DEPLOYMENT_VERSION_OSX ${SWIFTLIB_DEPLOYMENT_VERSION_COREAUDIO_OSX}
diff --git a/stdlib/public/SDK/CoreData/CMakeLists.txt b/stdlib/public/SDK/CoreData/CMakeLists.txt
index 4079769..05c7645 100644
--- a/stdlib/public/SDK/CoreData/CMakeLists.txt
+++ b/stdlib/public/SDK/CoreData/CMakeLists.txt
@@ -9,9 +9,9 @@
   SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   SWIFT_MODULE_DEPENDS_OSX Darwin CoreGraphics Dispatch Foundation IOKit ObjectiveC # auto-updated
-  SWIFT_MODULE_DEPENDS_IOS Darwin Dispatch Foundation ObjectiveC # auto-updated
-  SWIFT_MODULE_DEPENDS_TVOS Darwin Dispatch Foundation ObjectiveC # auto-updated
-  SWIFT_MODULE_DEPENDS_WATCHOS Darwin Dispatch Foundation ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics Dispatch Foundation ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_TVOS Darwin CoreGraphics Dispatch Foundation ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreGraphics Dispatch Foundation ObjectiveC # auto-updated
   FRAMEWORK_DEPENDS CoreData
 
   DEPLOYMENT_VERSION_OSX ${SWIFTLIB_DEPLOYMENT_VERSION_COREDATA_OSX}
diff --git a/stdlib/public/SDK/CoreFoundation/CMakeLists.txt b/stdlib/public/SDK/CoreFoundation/CMakeLists.txt
new file mode 100644
index 0000000..4989eb4
--- /dev/null
+++ b/stdlib/public/SDK/CoreFoundation/CMakeLists.txt
@@ -0,0 +1,10 @@
+add_swift_library(swiftCoreFoundation ${SWIFT_SDK_OVERLAY_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY
+  CoreFoundation.swift
+
+  SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
+  LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
+  SWIFT_MODULE_DEPENDS_OSX Darwin Dispatch ObjectiveC
+  SWIFT_MODULE_DEPENDS_IOS Darwin Dispatch ObjectiveC
+  SWIFT_MODULE_DEPENDS_TVOS Darwin Dispatch ObjectiveC
+  SWIFT_MODULE_DEPENDS_WATCHOS Darwin Dispatch ObjectiveC
+  FRAMEWORK_DEPENDS CoreFoundation)
diff --git a/stdlib/public/SDK/CoreFoundation/CoreFoundation.swift b/stdlib/public/SDK/CoreFoundation/CoreFoundation.swift
new file mode 100644
index 0000000..29b7799
--- /dev/null
+++ b/stdlib/public/SDK/CoreFoundation/CoreFoundation.swift
@@ -0,0 +1,23 @@
+//===----------------------------------------------------------------------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+
+@_exported import CoreFoundation
+
+public protocol _CFObject: class, Hashable {}
+extension _CFObject {
+  public var hashValue: Int {
+    return Int(bitPattern: CFHash(self))
+  }
+  public static func ==(left: Self, right: Self) -> Bool {
+    return CFEqual(left, right)
+  }
+}
diff --git a/stdlib/public/SDK/CoreGraphics/CMakeLists.txt b/stdlib/public/SDK/CoreGraphics/CMakeLists.txt
index c0ca2f8..abfbe75 100644
--- a/stdlib/public/SDK/CoreGraphics/CMakeLists.txt
+++ b/stdlib/public/SDK/CoreGraphics/CMakeLists.txt
@@ -10,10 +10,10 @@
   # SWIFT_COMPILE_FLAGS ${STDLIB_SIL_SERIALIZE_ALL}
   SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
-  SWIFT_MODULE_DEPENDS_OSX Darwin Dispatch IOKit ObjectiveC # auto-updated
-  SWIFT_MODULE_DEPENDS_IOS Darwin Dispatch ObjectiveC # auto-updated
-  SWIFT_MODULE_DEPENDS_TVOS Darwin Dispatch ObjectiveC # auto-updated
-  SWIFT_MODULE_DEPENDS_WATCHOS Darwin Dispatch ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_OSX Darwin CoreFoundation Dispatch IOKit ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin CoreFoundation Dispatch ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_TVOS Darwin CoreFoundation Dispatch ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreFoundation Dispatch ObjectiveC # auto-updated
   FRAMEWORK_DEPENDS CoreGraphics
 
   DEPLOYMENT_VERSION_OSX ${SWIFTLIB_DEPLOYMENT_VERSION_COREGRAPHICS_OSX}
diff --git a/stdlib/public/SDK/CoreGraphics/CoreGraphics.swift b/stdlib/public/SDK/CoreGraphics/CoreGraphics.swift
index 7191e4c..6cfca5b 100644
--- a/stdlib/public/SDK/CoreGraphics/CoreGraphics.swift
+++ b/stdlib/public/SDK/CoreGraphics/CoreGraphics.swift
@@ -46,11 +46,6 @@
 #endif
 }
 
-extension CGColor: Equatable {}
-public func ==(lhs: CGColor, rhs: CGColor) -> Bool {
-  return lhs.__equalTo(rhs)
-}
-
 
 //===----------------------------------------------------------------------===//
 // CGColorSpace
@@ -476,11 +471,6 @@
   }
 }
 
-extension CGPath: Equatable {}
-public func ==(lhs: CGPath, rhs: CGPath) -> Bool {
-  return lhs.__equalTo(rhs)
-}
-
 extension CGMutablePath {
 
   public func addRoundedRect(in rect: CGRect, cornerWidth: CGFloat,
diff --git a/stdlib/public/SDK/CoreLocation/CMakeLists.txt b/stdlib/public/SDK/CoreLocation/CMakeLists.txt
index 2170918..123cb8b 100644
--- a/stdlib/public/SDK/CoreLocation/CMakeLists.txt
+++ b/stdlib/public/SDK/CoreLocation/CMakeLists.txt
@@ -8,9 +8,9 @@
   SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   SWIFT_MODULE_DEPENDS_OSX Darwin CoreGraphics Dispatch Foundation IOKit ObjectiveC # auto-updated
-  SWIFT_MODULE_DEPENDS_IOS Darwin Dispatch Foundation ObjectiveC # auto-updated
-  SWIFT_MODULE_DEPENDS_TVOS Darwin Dispatch Foundation ObjectiveC # auto-updated
-  SWIFT_MODULE_DEPENDS_WATCHOS Darwin Dispatch Foundation ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics Dispatch Foundation ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_TVOS Darwin CoreGraphics Dispatch Foundation ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreGraphics Dispatch Foundation ObjectiveC # auto-updated
   FRAMEWORK_DEPENDS CoreLocation
 
   DEPLOYMENT_VERSION_OSX ${SWIFTLIB_DEPLOYMENT_VERSION_CORELOCATION_OSX}
diff --git a/stdlib/public/SDK/Foundation/AffineTransform.swift b/stdlib/public/SDK/Foundation/AffineTransform.swift
index dccdb01..3c50307 100644
--- a/stdlib/public/SDK/Foundation/AffineTransform.swift
+++ b/stdlib/public/SDK/Foundation/AffineTransform.swift
@@ -320,9 +320,8 @@
     }
 
     public static func _unconditionallyBridgeFromObjectiveC(_ x: NSAffineTransform?) -> AffineTransform {
-        var result: AffineTransform?
-        _forceBridgeFromObjectiveC(x!, result: &result)
-        return result!
+        guard let src = x else { return AffineTransform.identity }
+        return AffineTransform(reference: src)
     }
 }
 
diff --git a/stdlib/public/SDK/Foundation/CMakeLists.txt b/stdlib/public/SDK/Foundation/CMakeLists.txt
index 01eca9b..2aa04e7 100644
--- a/stdlib/public/SDK/Foundation/CMakeLists.txt
+++ b/stdlib/public/SDK/Foundation/CMakeLists.txt
@@ -31,7 +31,7 @@
   NSFastEnumeration.swift
   NSGeometry.swift
   NSIndexSet.swift
-  NSNumber.swift.gyb
+  NSNumber.swift
   NSPredicate.swift
   NSRange.swift
   NSSet.swift
@@ -47,7 +47,6 @@
   ReferenceConvertible.swift
   String.swift
   TimeZone.swift
-  TypePreservingNSNumber.mm
   URL.swift
   URLComponents.swift
   URLRequest.swift
@@ -56,17 +55,10 @@
   SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
 
-  SWIFT_MODULE_DEPENDS_OSX Darwin CoreGraphics Dispatch IOKit ObjectiveC # auto-updated
-  # CoreGraphics is used by the overlay but not by the Foundation
-  # framework, so we need to add it as a dependency.
-  # The ./utils/find-overlay-dependencies.sh tool only touches the
-  # OSX|IOS|TVOS|WATCHOS lines, so the standalone CoreGraphics lines remain.
-  SWIFT_MODULE_DEPENDS_IOS Darwin Dispatch ObjectiveC # auto-updated
-    CoreGraphics
-  SWIFT_MODULE_DEPENDS_TVOS Darwin Dispatch ObjectiveC # auto-updated
-    CoreGraphics
-  SWIFT_MODULE_DEPENDS_WATCHOS Darwin Dispatch ObjectiveC # auto-updated
-    CoreGraphics
+  SWIFT_MODULE_DEPENDS_OSX Darwin CoreFoundation CoreGraphics Dispatch IOKit ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin CoreFoundation CoreGraphics Dispatch ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_TVOS Darwin CoreFoundation CoreGraphics Dispatch ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreFoundation CoreGraphics Dispatch ObjectiveC # auto-updated
   FRAMEWORK_DEPENDS Foundation
 
   DEPLOYMENT_VERSION_OSX ${SWIFTLIB_DEPLOYMENT_VERSION_FOUNDATION_OSX}
diff --git a/stdlib/public/SDK/Foundation/CharacterSet.swift b/stdlib/public/SDK/Foundation/CharacterSet.swift
index f100ddb..39ae9f8 100644
--- a/stdlib/public/SDK/Foundation/CharacterSet.swift
+++ b/stdlib/public/SDK/Foundation/CharacterSet.swift
@@ -758,7 +758,8 @@
     }
     
     public static func _unconditionallyBridgeFromObjectiveC(_ source: NSCharacterSet?) -> CharacterSet {
-        return CharacterSet(_bridged: source!)
+        guard let src = source else { return CharacterSet() }
+        return CharacterSet(_bridged: src)
     }
     
 }
diff --git a/stdlib/public/SDK/Foundation/Data.swift b/stdlib/public/SDK/Foundation/Data.swift
index da2ad57..c120796 100644
--- a/stdlib/public/SDK/Foundation/Data.swift
+++ b/stdlib/public/SDK/Foundation/Data.swift
@@ -1731,9 +1731,8 @@
     }
     
     public static func _unconditionallyBridgeFromObjectiveC(_ source: NSData?) -> Data {
-        var result: Data?
-        _forceBridgeFromObjectiveC(source!, result: &result)
-        return result!
+        guard let src = source else { return Data() }
+        return Data(referencing: src)
     }
 }
 
diff --git a/stdlib/public/SDK/Foundation/DateComponents.swift b/stdlib/public/SDK/Foundation/DateComponents.swift
index 2765132..101a8af 100644
--- a/stdlib/public/SDK/Foundation/DateComponents.swift
+++ b/stdlib/public/SDK/Foundation/DateComponents.swift
@@ -339,9 +339,8 @@
     }
 
     public static func _unconditionallyBridgeFromObjectiveC(_ source: NSDateComponents?) -> DateComponents {
-        var result: DateComponents?
-        _forceBridgeFromObjectiveC(source!, result: &result)
-        return result!
+        guard let src = source else { return DateComponents() }
+        return DateComponents(reference: src)
     }
 }
 
diff --git a/stdlib/public/SDK/Foundation/Decimal.swift b/stdlib/public/SDK/Foundation/Decimal.swift
index ea97301..7f91804 100644
--- a/stdlib/public/SDK/Foundation/Decimal.swift
+++ b/stdlib/public/SDK/Foundation/Decimal.swift
@@ -470,8 +470,7 @@
     }
 
     public static func _unconditionallyBridgeFromObjectiveC(_ source: NSDecimalNumber?) -> Decimal {
-        var result: Decimal?
-        _forceBridgeFromObjectiveC(source!, result: &result)
-        return result!
+        guard let src = source else { return Decimal(_exponent: 0, _length: 0, _isNegative: 0, _isCompact: 0, _reserved: 0, _mantissa: (0, 0, 0, 0, 0, 0, 0, 0)) }
+        return src.decimalValue
     }
 }
diff --git a/stdlib/public/SDK/Foundation/Foundation.swift b/stdlib/public/SDK/Foundation/Foundation.swift
index 67605af..13edba1 100644
--- a/stdlib/public/SDK/Foundation/Foundation.swift
+++ b/stdlib/public/SDK/Foundation/Foundation.swift
@@ -95,3 +95,20 @@
     return _encodeBitsAsWords(object)
   }
 }
+
+//===----------------------------------------------------------------------===//
+// Runtime support for NSKeyedArchives
+//===----------------------------------------------------------------------===//
+
+@_silgen_name("swift_registerClassNameForArchiving")
+public func _registerClassNameForArchiving(_ nameForClass: UnsafePointer<CChar>,
+                                           _ classType: AnyClass) {
+  // If it's not possible to create a String from the name, it should abort
+  // and not fail silently.
+  let nameStr = String(utf8String: nameForClass)!
+
+  // Register the class name mapping for archiving and unarchiving.
+  NSKeyedArchiver.setClassName(nameStr, for: classType)
+  NSKeyedUnarchiver.setClass(classType, forClassName: nameStr)
+}
+
diff --git a/stdlib/public/SDK/Foundation/IndexPath.swift b/stdlib/public/SDK/Foundation/IndexPath.swift
index 7e788b4..49e95d5 100644
--- a/stdlib/public/SDK/Foundation/IndexPath.swift
+++ b/stdlib/public/SDK/Foundation/IndexPath.swift
@@ -11,22 +11,516 @@
 //===----------------------------------------------------------------------===//
 
 @_exported import Foundation // Clang module
-
-// Implementation note: NSIndexPath is an efficient array of integers for Objective-C.
-// For Swift, we bridge to this wrapper of Array<Int>. This gives us great Swift performance and interop with Objective-C.
+import _SwiftFoundationOverlayShims
 
 /**
  `IndexPath` represents the path to a specific node in a tree of nested array collections.
  
  Each index in an index path represents the index into an array of children from one node in the tree to another, deeper, node.
-*/
+ */
 public struct IndexPath : ReferenceConvertible, Equatable, Hashable, MutableCollection, RandomAccessCollection, Comparable, ExpressibleByArrayLiteral {
     public typealias ReferenceType = NSIndexPath
     public typealias Element = Int
     public typealias Index = Array<Int>.Index
     public typealias Indices = DefaultRandomAccessIndices<IndexPath>
     
-    fileprivate var _indexes : Array<Int>
+    fileprivate enum Storage : ExpressibleByArrayLiteral {
+        typealias Element = Int
+        case empty
+        case single(Int)
+        case pair(Int, Int)
+        case array([Int])
+        
+        init(arrayLiteral elements: Int...) {
+            self.init(elements)
+        }
+        
+        init(_ elements: [Int]) {
+            switch elements.count {
+            case 0:
+                self = .empty
+                break
+            case 1:
+                self = .single(elements[0])
+                break
+            case 2:
+                self = .pair(elements[0], elements[1])
+                break
+            default:
+                self = .array(elements)
+                break
+            }
+        }
+        
+        func dropLast() -> Storage {
+            switch self {
+            case .empty:
+                return .empty
+            case .single(_):
+                return .empty
+            case .pair(let first, _):
+                return .single(first)
+            case .array(let indexes):
+                switch indexes.count {
+                case 3:
+                    return .pair(indexes[0], indexes[1])
+                default:
+                    return .array(Array<Int>(indexes.dropLast()))
+                }
+            }
+        }
+        
+        mutating func append(_ other: Int) {
+            switch self {
+            case .empty:
+                self = .single(other)
+                break
+            case .single(let first):
+                self = .pair(first, other)
+                break
+            case .pair(let first, let second):
+                self = .array([first, second, other])
+                break
+            case .array(let indexes):
+                self = .array(indexes + [other])
+                break
+            }
+        }
+        
+        mutating func append(contentsOf other: Storage) {
+            switch self {
+            case .empty:
+                switch other {
+                case .empty:
+                    // DO NOTHING
+                    break
+                case .single(let rhsIndex):
+                    self = .single(rhsIndex)
+                    break
+                case .pair(let rhsFirst, let rhsSecond):
+                    self = .pair(rhsFirst, rhsSecond)
+                    break
+                case .array(let rhsIndexes):
+                    self = .array(rhsIndexes)
+                    break
+                }
+                break
+            case .single(let lhsIndex):
+                switch other {
+                case .empty:
+                    // DO NOTHING
+                    break
+                case .single(let rhsIndex):
+                    self = .pair(lhsIndex, rhsIndex)
+                    break
+                case .pair(let rhsFirst, let rhsSecond):
+                    self = .array([lhsIndex, rhsFirst, rhsSecond])
+                    break
+                case .array(let rhsIndexes):
+                    self = .array([lhsIndex] + rhsIndexes)
+                    break
+                }
+                break
+            case .pair(let lhsFirst, let lhsSecond):
+                switch other {
+                case .empty:
+                    // DO NOTHING
+                    break
+                case .single(let rhsIndex):
+                    self = .array([lhsFirst, lhsSecond, rhsIndex])
+                    break
+                case .pair(let rhsFirst, let rhsSecond):
+                    self = .array([lhsFirst, lhsSecond, rhsFirst, rhsSecond])
+                    break
+                case .array(let rhsIndexes):
+                    self = .array([lhsFirst, lhsSecond] + rhsIndexes)
+                    break
+                }
+                break
+            case .array(let lhsIndexes):
+                switch other {
+                case .empty:
+                    // DO NOTHING
+                    break
+                case .single(let rhsIndex):
+                    self = .array(lhsIndexes + [rhsIndex])
+                    break
+                case .pair(let rhsFirst, let rhsSecond):
+                    self = .array(lhsIndexes + [rhsFirst, rhsSecond])
+                    break
+                case .array(let rhsIndexes):
+                    self = .array(lhsIndexes + rhsIndexes)
+                    break
+                }
+                break
+            }
+        }
+        
+        mutating func append(contentsOf other: [Int]) {
+            switch self {
+            case .empty:
+                switch other.count {
+                case 0:
+                    // DO NOTHING
+                    break
+                case 1:
+                    self = .single(other[0])
+                    break
+                case 2:
+                    self = .pair(other[0], other[1])
+                    break
+                default:
+                    self = .array(other)
+                    break
+                }
+                break
+            case .single(let first):
+                switch other.count {
+                case 0:
+                    // DO NOTHING
+                    break
+                case 1:
+                    self = .pair(first, other[0])
+                    break
+                default:
+                    self = .array([first] + other)
+                    break
+                }
+                break
+            case .pair(let first, let second):
+                switch other.count {
+                case 0:
+                    // DO NOTHING
+                    break
+                default:
+                    self = .array([first, second] + other)
+                    break
+                }
+                break
+            case .array(let indexes):
+                self = .array(indexes + other)
+                break
+            }
+        }
+        
+        subscript(_ index: Int) -> Int {
+            get {
+                switch self {
+                case .empty:
+                    fatalError("index \(index) out of bounds of count 0")
+                    break
+                case .single(let first):
+                    precondition(index == 0, "index \(index) out of bounds of count 1")
+                    return first
+                case .pair(let first, let second):
+                    precondition(index >= 0 && index < 2, "index \(index) out of bounds of count 2")
+                    return index == 0 ? first : second
+                case .array(let indexes):
+                    return indexes[index]
+                }
+            }
+            set {
+                switch self {
+                case .empty:
+                    fatalError("index \(index) out of bounds of count 0")
+                    break
+                case .single(_):
+                    precondition(index == 0, "index \(index) out of bounds of count 1")
+                    self = .single(newValue)
+                    break
+                case .pair(let first, let second):
+                    precondition(index >= 0 && index < 2, "index \(index) out of bounds of count 2")
+                    if index == 0 {
+                        self = .pair(newValue, second)
+                    } else {
+                        self = .pair(first, newValue)
+                    }
+                    break
+                case .array(let indexes_):
+                    var indexes = indexes_
+                    indexes[index] = newValue
+                    self = .array(indexes)
+                    break
+                }
+            }
+        }
+        
+        subscript(range: Range<Index>) -> Storage {
+            get {
+                switch self {
+                case .empty:
+                    switch (range.lowerBound, range.upperBound) {
+                    case (0, 0):
+                        return .empty
+                    default:
+                        fatalError("range \(range) is out of bounds of count 0")
+                    }
+                case .single(let index):
+                    switch (range.lowerBound, range.upperBound) {
+                    case (0, 0):
+                        return .empty
+                    case (0, 1):
+                        return .single(index)
+                    default:
+                        fatalError("range \(range) is out of bounds of count 1")
+                    }
+                    return self
+                case .pair(let first, let second):
+                    
+                    switch (range.lowerBound, range.upperBound) {
+                    case (0, 0):
+                        fallthrough
+                    case (1, 1):
+                        fallthrough
+                    case (2, 2):
+                        return .empty
+                    case (0, 1):
+                        return .single(first)
+                    case (1, 2):
+                        return .single(second)
+                    case (0, 2):
+                        return self
+                    default:
+                        fatalError("range \(range) is out of bounds of count 2")
+                    }
+                case .array(let indexes):
+                    let slice = indexes[range]
+                    switch slice.count {
+                    case 0:
+                        return .empty
+                    case 1:
+                        return .single(slice[0])
+                    case 2:
+                        return .pair(slice[0], slice[1])
+                    default:
+                        return .array(Array<Int>(slice))
+                    }
+                }
+            }
+            set {
+                switch self {
+                case .empty:
+                    precondition(range.lowerBound == 0 && range.upperBound == 0, "range \(range) is out of bounds of count 0")
+                    self = newValue
+                    break
+                case .single(let index):
+                    switch (range.lowerBound, range.upperBound, newValue) {
+                    case (0, 0, .empty):
+                        fallthrough
+                    case (1, 1, .empty):
+                        break
+                    case (0, 0, .single(let other)):
+                        self = .pair(other, index)
+                        break
+                    case (0, 0, .pair(let first, let second)):
+                        self = .array([first, second, index])
+                        break
+                    case (0, 0, .array(let other)):
+                        self = .array(other + [index])
+                        break
+                    case (0, 1, .empty):
+                        fallthrough
+                    case (0, 1, .single):
+                        fallthrough
+                    case (0, 1, .pair):
+                        fallthrough
+                    case (0, 1, .array):
+                        self = newValue
+                    case (1, 1, .single(let other)):
+                        self = .pair(index, other)
+                        break
+                    case (1, 1, .pair(let first, let second)):
+                        self = .array([index, first, second])
+                        break
+                    case (1, 1, .array(let other)):
+                        self = .array([index] + other)
+                        break
+                    default:
+                        fatalError("range \(range) is out of bounds of count 1")
+                    }
+                case .pair(let first, let second):
+                    switch (range.lowerBound, range.upperBound) {
+                    case (0, 0):
+                        switch newValue {
+                        case .empty:
+                            break
+                        case .single(let other):
+                            self = .array([other, first, second])
+                            break
+                        case .pair(let otherFirst, let otherSecond):
+                            self = .array([otherFirst, otherSecond, first, second])
+                            break
+                        case .array(let other):
+                            self = .array(other + [first, second])
+                            break
+                        }
+                        break
+                    case (0, 1):
+                        switch newValue {
+                        case .empty:
+                            self = .single(second)
+                            break
+                        case .single(let other):
+                            self = .pair(other, second)
+                            break
+                        case .pair(let otherFirst, let otherSecond):
+                            self = .array([otherFirst, otherSecond, second])
+                            break
+                        case .array(let other):
+                            self = .array(other + [second])
+                            break
+                        }
+                        break
+                    case (0, 2):
+                        self = newValue
+                        break
+                    case (1, 2):
+                        switch newValue {
+                        case .empty:
+                            self = .single(first)
+                            break
+                        case .single(let other):
+                            self = .pair(first, other)
+                            break
+                        case .pair(let otherFirst, let otherSecond):
+                            self = .array([first, otherFirst, otherSecond])
+                            break
+                        case .array(let other):
+                            self = .array([first] + other)
+                        }
+                        break
+                    case (2, 2):
+                        switch newValue {
+                        case .empty:
+                            break
+                        case .single(let other):
+                            self = .array([first, second, other])
+                            break
+                        case .pair(let otherFirst, let otherSecond):
+                            self = .array([first, second, otherFirst, otherSecond])
+                            break
+                        case .array(let other):
+                            self = .array([first, second] + other)
+                        }
+                        break
+                    default:
+                        fatalError("range \(range) is out of bounds of count 2")
+                    }
+                case .array(let indexes):
+                    var newIndexes = indexes
+                    newIndexes.removeSubrange(range)
+                    switch newValue {
+                    case .empty:
+                        break
+                    case .single(let index):
+                        newIndexes.insert(index, at: range.lowerBound)
+                        break
+                    case .pair(let first, let second):
+                        newIndexes.insert(first, at: range.lowerBound)
+                        newIndexes.insert(second, at: range.lowerBound + 1)
+                        break
+                    case .array(let other):
+                        newIndexes.insert(contentsOf: other, at: range.lowerBound)
+                        break
+                    }
+                    self = Storage(newIndexes)
+                    break
+                }
+            }
+        }
+        
+        var count: Int {
+            switch self {
+            case .empty:
+                return 0
+            case .single:
+                return 1
+            case .pair:
+                return 2
+            case .array(let indexes):
+                return indexes.count
+            }
+        }
+        
+        var startIndex: Int {
+            return 0
+        }
+        
+        var endIndex: Int {
+            return count
+        }
+        
+        func index(before i: Int) -> Int {
+            return i - 1
+        }
+        
+        func index(after i: Int) -> Int {
+            return i + 1
+        }
+        
+        var description: String {
+            switch self {
+            case .empty:
+                return "[]"
+            case .single(let index):
+                return "[\(index)]"
+            case .pair(let first, let second):
+                return "[\(first), \(second)]"
+            case .array(let indexes):
+                return indexes.description
+            }
+        }
+        
+        func withUnsafeBufferPointer<R>(_ body: (UnsafeBufferPointer<Int>) throws -> R) rethrows -> R {
+            switch self {
+            case .empty:
+                return try body(UnsafeBufferPointer<Int>(start: nil, count: 0))
+            case .single(let index_):
+                var index = index_
+                return try withUnsafePointer(to: &index) { (start) throws -> R in
+                    return try body(UnsafeBufferPointer<Int>(start: start, count: 1))
+                }
+            case .pair(let first, let second):
+                var pair = (first, second)
+                return try withUnsafeBytes(of: &pair) { (rawBuffer: UnsafeRawBufferPointer) throws -> R in
+                    return try body(UnsafeBufferPointer<Int>(start: rawBuffer.baseAddress?.assumingMemoryBound(to: Int.self), count: 2))
+                }
+            case .array(let indexes):
+                return try indexes.withUnsafeBufferPointer(body)
+            }
+        }
+        
+        var debugDescription: String { return description }
+        
+        static func +(_ lhs: Storage, _ rhs: Storage) -> Storage {
+            var res = lhs
+            res.append(contentsOf: rhs)
+            return res
+        }
+        
+        static func +(_ lhs: Storage, _ rhs: [Int]) -> Storage {
+            var res = lhs
+            res.append(contentsOf: rhs)
+            return res
+        }
+        
+        static func ==(_ lhs: Storage, _ rhs: Storage) -> Bool {
+            switch (lhs, rhs) {
+            case (.empty, .empty):
+                return true
+            case (.single(let lhsIndex), .single(let rhsIndex)):
+                return lhsIndex == rhsIndex
+            case (.pair(let lhsFirst, let lhsSecond), .pair(let rhsFirst, let rhsSecond)):
+                return lhsFirst == rhsFirst && lhsSecond == rhsSecond
+            case (.array(let lhsIndexes), .array(let rhsIndexes)):
+                return lhsIndexes == rhsIndexes
+            default:
+                return false
+            }
+        }
+    }
+    
+    fileprivate var _indexes : Storage
     
     /// Initialize an empty index path.
     public init() {
@@ -35,20 +529,24 @@
     
     /// Initialize with a sequence of integers.
     public init<ElementSequence : Sequence>(indexes: ElementSequence)
-      where ElementSequence.Iterator.Element == Element {
-        _indexes = Array(indexes)
+        where ElementSequence.Iterator.Element == Element {
+            _indexes = Storage(indexes.map { $0 })
     }
     
     /// Initialize with an array literal.
     public init(arrayLiteral indexes: Element...) {
-        _indexes = indexes
+        _indexes = Storage(indexes)
     }
-
+    
     /// Initialize with an array of elements.
     public init(indexes: Array<Element>) {
-        _indexes = indexes
+        _indexes = Storage(indexes)
     }
-
+    
+    fileprivate init(storage: Storage) {
+        _indexes = storage
+    }
+    
     /// Initialize with a single element.
     public init(index: Element) {
         _indexes = [index]
@@ -56,7 +554,7 @@
     
     /// Return a new `IndexPath` containing all but the last element.
     public func dropLast() -> IndexPath {
-        return IndexPath(indexes: _indexes.dropLast())
+        return IndexPath(storage: _indexes.dropLast())
     }
     
     /// Append an `IndexPath` to `self`.
@@ -68,7 +566,7 @@
     public mutating func append(_ other: Element) {
         _indexes.append(other)
     }
-
+    
     /// Append an array of elements to `self`.
     public mutating func append(_ other: Array<Element>) {
         _indexes.append(contentsOf: other)
@@ -78,17 +576,17 @@
     public func appending(_ other: Element) -> IndexPath {
         var result = _indexes
         result.append(other)
-        return IndexPath(indexes: result)
+        return IndexPath(storage: result)
     }
     
     /// Return a new `IndexPath` containing the elements in self and the elements in `other`.
     public func appending(_ other: IndexPath) -> IndexPath {
-        return IndexPath(indexes: _indexes + other._indexes)
+        return IndexPath(storage: _indexes + other._indexes)
     }
     
     /// Return a new `IndexPath` containing the elements in self and the elements in `other`.
     public func appending(_ other: Array<Element>) -> IndexPath {
-        return IndexPath(indexes: _indexes + other)
+        return IndexPath(storage: _indexes + other)
     }
     
     public subscript(index: Index) -> Element {
@@ -102,10 +600,10 @@
     
     public subscript(range: Range<Index>) -> IndexPath {
         get {
-            return IndexPath(indexes: _indexes[range])
+            return IndexPath(storage: _indexes[range])
         }
         set {
-            _indexes.replaceSubrange(range, with: newValue._indexes)
+            _indexes[range] = newValue._indexes
         }
     }
     
@@ -124,7 +622,7 @@
     public var endIndex: Index {
         return _indexes.endIndex
     }
-
+    
     public func index(before i: Index) -> Index {
         return _indexes.index(before: i)
     }
@@ -132,70 +630,107 @@
     public func index(after i: Index) -> Index {
         return _indexes.index(after: i)
     }
-
+    
     /// Sorting an array of `IndexPath` using this comparison results in an array representing nodes in depth-first traversal order.
     public func compare(_ other: IndexPath) -> ComparisonResult  {
-        // This is temporary
-        let me = self.makeReference()
-        let other = other.makeReference()
-        return me.compare(other as IndexPath)
+        let thisLength = count
+        let otherLength = other.count
+        let length = Swift.min(thisLength, otherLength)
+        for idx in 0..<length {
+            let otherValue = other[idx]
+            let value = self[idx]
+            if value < otherValue {
+                return .orderedAscending
+            } else if value > otherValue {
+                return .orderedDescending
+            }
+        }
+        if thisLength > otherLength {
+            return .orderedDescending
+        } else if thisLength < otherLength {
+            return .orderedAscending
+        }
+        return .orderedSame
     }
-
+    
     public var hashValue: Int {
-        // This is temporary
-        let me = self.makeReference()
-        return me.hash
+        func hashIndexes(first: Int, last: Int, count: Int) -> Int {
+            let totalBits = MemoryLayout<Int>.size * 8
+            let lengthBits = 8
+            let firstIndexBits = (totalBits - lengthBits) / 2
+            return count &+ (first << lengthBits) &+ (last << (lengthBits + firstIndexBits))
+        }
+
+        switch _indexes {
+            case .empty: return 0
+            case .single(let index): return index.hashValue
+            case .pair(let first, let second):
+                return hashIndexes(first: first, last: second, count: 2)
+            default:
+                let cnt = _indexes.count
+                return hashIndexes(first: _indexes[0], last: _indexes[cnt - 1], count: cnt)
+        }
     }
-        
+    
     // MARK: - Bridging Helpers
     
     fileprivate init(nsIndexPath: ReferenceType) {
         let count = nsIndexPath.length
         if count == 0 {
             _indexes = []
+        } else if count == 1 {
+            _indexes = .single(nsIndexPath.index(atPosition: 0))
+        } else if count == 2 {
+            _indexes = .pair(nsIndexPath.index(atPosition: 0), nsIndexPath.index(atPosition: 1))
         } else {
-            var ptr = malloc(count * MemoryLayout<Element>.size)
-            defer { free(ptr) }
-
-            let elementPtr = ptr!.bindMemory(to: Element.self, capacity: count)
-            nsIndexPath.getIndexes(elementPtr, range: NSMakeRange(0, count))
-            
-            let buffer = UnsafeBufferPointer(start: elementPtr, count: count)
-            _indexes = Array(buffer)
+            var indexes = Array<Int>(repeating: 0, count: count)
+            indexes.withUnsafeMutableBufferPointer { (buffer: inout UnsafeMutableBufferPointer<Int>) -> Void in
+                nsIndexPath.getIndexes(buffer.baseAddress!, range: NSRange(location: 0, length: count))
+            }
+            _indexes = .array(indexes)
         }
     }
     
     fileprivate func makeReference() -> ReferenceType {
-        return _indexes.withUnsafeBufferPointer {
-            return ReferenceType(indexes: $0.baseAddress, length: $0.count)
+        switch _indexes {
+        case .empty:
+            return ReferenceType()
+        case .single(let index):
+            return ReferenceType(index: index)
+        case .pair(let first, let second):
+            return _NSIndexPathCreateFromIndexes(first, second) as! ReferenceType
+        default:
+            return _indexes.withUnsafeBufferPointer {
+                return ReferenceType(indexes: $0.baseAddress, length: $0.count)
+            }
         }
     }
-
+    
     public static func ==(lhs: IndexPath, rhs: IndexPath) -> Bool {
         return lhs._indexes == rhs._indexes
     }
-
+    
     public static func +(lhs: IndexPath, rhs: IndexPath) -> IndexPath {
         return lhs.appending(rhs)
     }
-
+    
     public static func +=(lhs: inout IndexPath, rhs: IndexPath) {
         lhs.append(rhs)
     }
-
+    
     public static func <(lhs: IndexPath, rhs: IndexPath) -> Bool {
         return lhs.compare(rhs) == ComparisonResult.orderedAscending
     }
-
+    
     public static func <=(lhs: IndexPath, rhs: IndexPath) -> Bool {
         let order = lhs.compare(rhs)
         return order == ComparisonResult.orderedAscending || order == ComparisonResult.orderedSame
     }
-
+    
     public static func >(lhs: IndexPath, rhs: IndexPath) -> Bool {
         return lhs.compare(rhs) == ComparisonResult.orderedDescending
     }
-
+    
     public static func >=(lhs: IndexPath, rhs: IndexPath) -> Bool {
         let order = lhs.compare(rhs)
         return order == ComparisonResult.orderedDescending || order == ComparisonResult.orderedSame
@@ -210,9 +745,9 @@
     public var debugDescription: String {
         return _indexes.debugDescription
     }
-
+    
     public var customMirror: Mirror {
-        return _indexes.customMirror
+        return Mirror(self, unlabeledChildren: self, displayStyle: .collection)
     }
 }
 
@@ -234,10 +769,11 @@
         result = IndexPath(nsIndexPath: x)
         return true
     }
-
+    
     public static func _unconditionallyBridgeFromObjectiveC(_ source: NSIndexPath?) -> IndexPath {
-        return IndexPath(nsIndexPath: source!)
-    }    
+        guard let src = source else { return IndexPath() }
+        return IndexPath(nsIndexPath: src)
+    }
 }
 
 extension NSIndexPath : _HasCustomAnyHashableRepresentation {
@@ -247,4 +783,3 @@
         return AnyHashable(self as IndexPath)
     }
 }
-
diff --git a/stdlib/public/SDK/Foundation/IndexSet.swift b/stdlib/public/SDK/Foundation/IndexSet.swift
index f74d88e..653eb89 100644
--- a/stdlib/public/SDK/Foundation/IndexSet.swift
+++ b/stdlib/public/SDK/Foundation/IndexSet.swift
@@ -839,7 +839,8 @@
     }
 
     public static func _unconditionallyBridgeFromObjectiveC(_ source: NSIndexSet?) -> IndexSet {
-        return IndexSet(reference: source!)
+        guard let src = source else { return IndexSet() }
+        return IndexSet(reference: src)
     }    
     
 }
diff --git a/stdlib/public/SDK/Foundation/JSONEncoder.swift b/stdlib/public/SDK/Foundation/JSONEncoder.swift
index 994007a..b720e13 100644
--- a/stdlib/public/SDK/Foundation/JSONEncoder.swift
+++ b/stdlib/public/SDK/Foundation/JSONEncoder.swift
@@ -148,7 +148,7 @@
     let options: JSONEncoder._Options
 
     /// The path to the current point in encoding.
-    var codingPath: [CodingKey?] = []
+    var codingPath: [CodingKey?]
 
     /// Contextual user-provided information for use during encoding.
     var userInfo: [CodingUserInfoKey : Any] {
@@ -158,9 +158,10 @@
     // MARK: - Initialization
 
     /// Initializes `self` with the given top-level encoder options.
-    init(options: JSONEncoder._Options) {
+    init(options: JSONEncoder._Options, codingPath: [CodingKey?] = []) {
         self.options = options
         self.storage = _JSONEncodingStorage()
+        self.codingPath = codingPath
     }
 
     // MARK: - Coding Path Actions
@@ -697,16 +698,34 @@
     init(referencing encoder: _JSONEncoder, wrapping array: NSMutableArray, at index: Int) {
         self.encoder = encoder
         self.reference = .array(array, index)
-        super.init(options: encoder.options)
+        super.init(options: encoder.options, codingPath: encoder.codingPath)
     }
 
     /// Initializes `self` by referencing the given dictionary container in the given encoder.
     init(referencing encoder: _JSONEncoder, wrapping dictionary: NSMutableDictionary, key: String) {
         self.encoder = encoder
         self.reference = .dictionary(dictionary, key)
-        super.init(options: encoder.options)
+        super.init(options: encoder.options, codingPath: encoder.codingPath)
     }
 
+    // MARK: - Overridden Implementations
+
+    /// Asserts that we can add a new container at this coding path. See _JSONEncoder.assertCanRequestNewContainer for the logic behind this.
+    /// This differs from super's implementation only in the condition: we need to account for the fact that we copied our reference's coding path, but not its list of containers, so the counts are mismatched.
+    override func assertCanRequestNewContainer() {
+        guard self.storage.count == self.codingPath.count - self.encoder.codingPath.count else {
+            let previousContainerType: String
+            if self.storage.containers.last is NSDictionary {
+                previousContainerType = "keyed"
+            } else if self.storage.containers.last is NSArray {
+                previousContainerType = "unkeyed"
+            } else {
+                previousContainerType = "single value"
+            }
+
+            preconditionFailure("Attempt to encode with new container when already encoded with \(previousContainerType) container.")
+        }
+    }
 
     // MARK: - Deinitialization
 
diff --git a/stdlib/public/SDK/Foundation/NSNumber.swift b/stdlib/public/SDK/Foundation/NSNumber.swift
new file mode 100644
index 0000000..b436850
--- /dev/null
+++ b/stdlib/public/SDK/Foundation/NSNumber.swift
@@ -0,0 +1,663 @@
+//===----------------------------------------------------------------------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+
+@_exported import Foundation // Clang module
+import CoreGraphics
+
+extension Int8 : _ObjectiveCBridgeable {
+    @available(swift, deprecated: 4)
+    public init(_ number: NSNumber) {
+        self = number.int8Value
+    }
+
+    public init(truncating number: NSNumber) {
+        self = number.int8Value
+    }
+
+    public init?(exactly number: NSNumber) {
+        let value = number.int8Value
+        guard NSNumber(value: value) == number else { return nil }
+        self = value
+    }
+
+    @_semantics("convertToObjectiveC")
+    public func _bridgeToObjectiveC() -> NSNumber {
+        return NSNumber(value: self)
+    }
+    
+    public static func _forceBridgeFromObjectiveC(_ x: NSNumber, result: inout Int8?) {
+        if !_conditionallyBridgeFromObjectiveC(x, result: &result) {
+            fatalError("Unable to bridge \(_ObjectiveCType.self) to \(self)")
+        }
+    }
+    
+    public static func _conditionallyBridgeFromObjectiveC(_ x: NSNumber, result: inout Int8?) -> Bool {
+        guard let value = Int8(exactly: x) else { return false }
+        result = value
+        return true
+    }
+    
+    public static func _unconditionallyBridgeFromObjectiveC(_ source: NSNumber?) -> Int8 {
+        var result: Int8?
+        guard let src = source else { return Int8(0) }
+        guard _conditionallyBridgeFromObjectiveC(src, result: &result) else { return Int8(0) }
+        return result!
+    }
+}
+
+extension UInt8 : _ObjectiveCBridgeable {
+    @available(swift, deprecated: 4)
+    public init(_ number: NSNumber) {
+        self = number.uint8Value
+    }
+
+    public init(truncating number: NSNumber) {
+        self = number.uint8Value
+    }
+
+    public init?(exactly number: NSNumber) {
+        let value = number.uint8Value
+        guard NSNumber(value: value) == number else { return nil }
+        self = value
+    }
+
+    @_semantics("convertToObjectiveC")
+    public func _bridgeToObjectiveC() -> NSNumber {
+        return NSNumber(value: self)
+    }
+    
+    public static func _forceBridgeFromObjectiveC(_ x: NSNumber, result: inout UInt8?) {
+        if !_conditionallyBridgeFromObjectiveC(x, result: &result) {
+            fatalError("Unable to bridge \(_ObjectiveCType.self) to \(self)")
+        }
+    }
+    
+    public static func _conditionallyBridgeFromObjectiveC(_ x: NSNumber, result: inout UInt8?) -> Bool {
+        guard let value = UInt8(exactly: x) else { return false }
+        result = value
+        return true
+    }
+    
+    public static func _unconditionallyBridgeFromObjectiveC(_ source: NSNumber?) -> UInt8 {
+        var result: UInt8?
+        guard let src = source else { return UInt8(0) }
+        guard _conditionallyBridgeFromObjectiveC(src, result: &result) else { return UInt8(0) }
+        return result!
+    }
+}
+
+extension Int16 : _ObjectiveCBridgeable {
+    @available(swift, deprecated: 4)
+    public init(_ number: NSNumber) {
+        self = number.int16Value
+    }
+
+    public init(truncating number: NSNumber) {
+        self = number.int16Value
+    }
+
+    public init?(exactly number: NSNumber) {
+        let value = number.int16Value
+        guard NSNumber(value: value) == number else { return nil }
+        self = value
+    }
+
+    @_semantics("convertToObjectiveC")
+    public func _bridgeToObjectiveC() -> NSNumber {
+        return NSNumber(value: self)
+    }
+    
+    public static func _forceBridgeFromObjectiveC(_ x: NSNumber, result: inout Int16?) {
+        if !_conditionallyBridgeFromObjectiveC(x, result: &result) {
+            fatalError("Unable to bridge \(_ObjectiveCType.self) to \(self)")
+        }
+    }
+    
+    public static func _conditionallyBridgeFromObjectiveC(_ x: NSNumber, result: inout Int16?) -> Bool {
+        guard let value = Int16(exactly: x) else { return false }
+        result = value
+        return true
+    }
+    
+    public static func _unconditionallyBridgeFromObjectiveC(_ source: NSNumber?) -> Int16 {
+        var result: Int16?
+        guard let src = source else { return Int16(0) }
+        guard _conditionallyBridgeFromObjectiveC(src, result: &result) else { return Int16(0) }
+        return result!
+    }
+}
+
+extension UInt16 : _ObjectiveCBridgeable {
+    @available(swift, deprecated: 4)
+    public init(_ number: NSNumber) {
+        self = number.uint16Value
+    }
+
+    public init(truncating number: NSNumber) {
+        self = number.uint16Value
+    }
+
+    public init?(exactly number: NSNumber) {
+        let value = number.uint16Value
+        guard NSNumber(value: value) == number else { return nil }
+        self = value
+    }
+
+    @_semantics("convertToObjectiveC")
+    public func _bridgeToObjectiveC() -> NSNumber {
+        return NSNumber(value: self)
+    }
+    
+    public static func _forceBridgeFromObjectiveC(_ x: NSNumber, result: inout UInt16?) {
+        if !_conditionallyBridgeFromObjectiveC(x, result: &result) {
+            fatalError("Unable to bridge \(_ObjectiveCType.self) to \(self)")
+        }
+    }
+    
+    public static func _conditionallyBridgeFromObjectiveC(_ x: NSNumber, result: inout UInt16?) -> Bool {
+        guard let value = UInt16(exactly: x) else { return false }
+        result = value
+        return true
+    }
+    
+    public static func _unconditionallyBridgeFromObjectiveC(_ source: NSNumber?) -> UInt16 {
+        var result: UInt16?
+        guard let src = source else { return UInt16(0) }
+        guard _conditionallyBridgeFromObjectiveC(src, result: &result) else { return UInt16(0) }
+        return result!
+    }
+}
+
+extension Int32 : _ObjectiveCBridgeable {
+    @available(swift, deprecated: 4)
+    public init(_ number: NSNumber) {
+        self = number.int32Value
+    }
+
+    public init(truncating number: NSNumber) {
+        self = number.int32Value
+    }
+
+    public init?(exactly number: NSNumber) {
+        let value = number.int32Value
+        guard NSNumber(value: value) == number else { return nil }
+        self = value
+    }
+
+    @_semantics("convertToObjectiveC")
+    public func _bridgeToObjectiveC() -> NSNumber {
+        return NSNumber(value: self)
+    }
+    
+    public static func _forceBridgeFromObjectiveC(_ x: NSNumber, result: inout Int32?) {
+        if !_conditionallyBridgeFromObjectiveC(x, result: &result) {
+            fatalError("Unable to bridge \(_ObjectiveCType.self) to \(self)")
+        }
+    }
+    
+    public static func _conditionallyBridgeFromObjectiveC(_ x: NSNumber, result: inout Int32?) -> Bool {
+        guard let value = Int32(exactly: x) else { return false }
+        result = value
+        return true
+    }
+    
+    public static func _unconditionallyBridgeFromObjectiveC(_ source: NSNumber?) -> Int32 {
+        var result: Int32?
+        guard let src = source else { return Int32(0) }
+        guard _conditionallyBridgeFromObjectiveC(src, result: &result) else { return Int32(0) }
+        return result!
+    }
+}
+
+extension UInt32 : _ObjectiveCBridgeable {
+    @available(swift, deprecated: 4)
+    public init(_ number: NSNumber) {
+        self = number.uint32Value
+    }
+
+    public init(truncating number: NSNumber) {
+        self = number.uint32Value
+    }
+
+    public init?(exactly number: NSNumber) {
+        let value = number.uint32Value
+        guard NSNumber(value: value) == number else { return nil }
+        self = value
+    }
+
+    @_semantics("convertToObjectiveC")
+    public func _bridgeToObjectiveC() -> NSNumber {
+        return NSNumber(value: self)
+    }
+    
+    public static func _forceBridgeFromObjectiveC(_ x: NSNumber, result: inout UInt32?) {
+        if !_conditionallyBridgeFromObjectiveC(x, result: &result) {
+            fatalError("Unable to bridge \(_ObjectiveCType.self) to \(self)")
+        }
+    }
+    
+    public static func _conditionallyBridgeFromObjectiveC(_ x: NSNumber, result: inout UInt32?) -> Bool {
+        guard let value = UInt32(exactly: x) else { return false }
+        result = value
+        return true
+    }
+    
+    public static func _unconditionallyBridgeFromObjectiveC(_ source: NSNumber?) -> UInt32 {
+        var result: UInt32?
+        guard let src = source else { return UInt32(0) }
+        guard _conditionallyBridgeFromObjectiveC(src, result: &result) else { return UInt32(0) }
+        return result!
+    }
+}
+
+extension Int64 : _ObjectiveCBridgeable {
+    @available(swift, deprecated: 4)
+    public init(_ number: NSNumber) {
+        self = number.int64Value
+    }
+
+    public init(truncating number: NSNumber) {
+        self = number.int64Value
+    }
+
+    public init?(exactly number: NSNumber) {
+        let value = number.int64Value
+        guard NSNumber(value: value) == number else { return nil }
+        self = value
+    }
+
+    @_semantics("convertToObjectiveC")
+    public func _bridgeToObjectiveC() -> NSNumber {
+        return NSNumber(value: self)
+    }
+    
+    public static func _forceBridgeFromObjectiveC(_ x: NSNumber, result: inout Int64?) {
+        if !_conditionallyBridgeFromObjectiveC(x, result: &result) {
+            fatalError("Unable to bridge \(_ObjectiveCType.self) to \(self)")
+        }
+    }
+    
+    public static func _conditionallyBridgeFromObjectiveC(_ x: NSNumber, result: inout Int64?) -> Bool {
+        guard let value = Int64(exactly: x) else { return false }
+        result = value
+        return true
+    }
+    
+    public static func _unconditionallyBridgeFromObjectiveC(_ source: NSNumber?) -> Int64 {
+        var result: Int64?
+        guard let src = source else { return Int64(0) }
+        guard _conditionallyBridgeFromObjectiveC(src, result: &result) else { return Int64(0) }
+        return result!
+    }
+}
+
+extension UInt64 : _ObjectiveCBridgeable {
+    @available(swift, deprecated: 4)
+    public init(_ number: NSNumber) {
+        self = number.uint64Value
+    }
+
+    public init(truncating number: NSNumber) {
+        self = number.uint64Value
+    }
+
+    public init?(exactly number: NSNumber) {
+        let value = number.uint64Value
+        guard NSNumber(value: value) == number else { return nil }
+        self = value
+    }
+
+    @_semantics("convertToObjectiveC")
+    public func _bridgeToObjectiveC() -> NSNumber {
+        return NSNumber(value: self)
+    }
+    
+    public static func _forceBridgeFromObjectiveC(_ x: NSNumber, result: inout UInt64?) {
+        if !_conditionallyBridgeFromObjectiveC(x, result: &result) {
+            fatalError("Unable to bridge \(_ObjectiveCType.self) to \(self)")
+        }
+    }
+    
+    public static func _conditionallyBridgeFromObjectiveC(_ x: NSNumber, result: inout UInt64?) -> Bool {
+        guard let value = UInt64(exactly: x) else { return false }
+        result = value
+        return true
+    }
+    
+    public static func _unconditionallyBridgeFromObjectiveC(_ source: NSNumber?) -> UInt64 {
+        var result: UInt64?
+        guard let src = source else { return UInt64(0) }
+        guard _conditionallyBridgeFromObjectiveC(src, result: &result) else { return UInt64(0) }
+        return result!
+    }
+}
+
+extension Int : _ObjectiveCBridgeable {
+    @available(swift, deprecated: 4)
+    public init(_ number: NSNumber) {
+        self = number.intValue
+    }
+
+    public init(truncating number: NSNumber) {
+        self = number.intValue
+    }
+
+    public init?(exactly number: NSNumber) {
+        let value = number.intValue
+        guard NSNumber(value: value) == number else { return nil }
+        self = value
+    }
+
+    @_semantics("convertToObjectiveC")
+    public func _bridgeToObjectiveC() -> NSNumber {
+        return NSNumber(value: self)
+    }
+    
+    public static func _forceBridgeFromObjectiveC(_ x: NSNumber, result: inout Int?) {
+        if !_conditionallyBridgeFromObjectiveC(x, result: &result) {
+            fatalError("Unable to bridge \(_ObjectiveCType.self) to \(self)")
+        }
+    }
+    
+    public static func _conditionallyBridgeFromObjectiveC(_ x: NSNumber, result: inout Int?) -> Bool {
+        guard let value = Int(exactly: x) else { return false }
+        result = value
+        return true
+    }
+    
+    public static func _unconditionallyBridgeFromObjectiveC(_ source: NSNumber?) -> Int {
+        var result: Int?
+        guard let src = source else { return Int(0) }
+        guard _conditionallyBridgeFromObjectiveC(src, result: &result) else { return Int(0) }
+        return result!
+    }
+}
+
+extension UInt : _ObjectiveCBridgeable {
+    @available(swift, deprecated: 4)
+    public init(_ number: NSNumber) {
+        self = number.uintValue
+    }
+
+    public init(truncating number: NSNumber) {
+        self = number.uintValue
+    }
+
+    public init?(exactly number: NSNumber) {
+        let value = number.uintValue
+        guard NSNumber(value: value) == number else { return nil }
+        self = value
+    }
+
+    @_semantics("convertToObjectiveC")
+    public func _bridgeToObjectiveC() -> NSNumber {
+        return NSNumber(value: self)
+    }
+    
+    public static func _forceBridgeFromObjectiveC(_ x: NSNumber, result: inout UInt?) {
+        if !_conditionallyBridgeFromObjectiveC(x, result: &result) {
+            fatalError("Unable to bridge \(_ObjectiveCType.self) to \(self)")
+        }
+    }
+    
+    public static func _conditionallyBridgeFromObjectiveC(_ x: NSNumber, result: inout UInt?) -> Bool {
+        guard let value = UInt(exactly: x) else { return false }
+        result = value
+        return true
+    }
+    
+    public static func _unconditionallyBridgeFromObjectiveC(_ source: NSNumber?) -> UInt {
+        var result: UInt?
+        guard let src = source else { return UInt(0) }
+        guard _conditionallyBridgeFromObjectiveC(src, result: &result) else { return UInt(0) }
+        return result!
+    }
+}
+
+extension Float : _ObjectiveCBridgeable {
+    @available(swift, deprecated: 4)
+    public init(_ number: NSNumber) {
+        self = number.floatValue
+    }
+
+    public init(truncating number: NSNumber) {
+        self = number.floatValue
+    }
+
+    public init?(exactly number: NSNumber) {
+        guard let value = Double(exactly: number) else { return nil }
+        guard let result = Float(exactly: value) else { return nil }
+        self = result
+    }
+
+    @_semantics("convertToObjectiveC")
+    public func _bridgeToObjectiveC() -> NSNumber {
+        return NSNumber(value: self)
+    }
+    
+    public static func _forceBridgeFromObjectiveC(_ x: NSNumber, result: inout Float?) {
+        if !_conditionallyBridgeFromObjectiveC(x, result: &result) {
+            fatalError("Unable to bridge \(_ObjectiveCType.self) to \(self)")
+        }
+    }
+    
+    public static func _conditionallyBridgeFromObjectiveC(_ x: NSNumber, result: inout Float?) -> Bool {
+        guard let value = Float(exactly: x) else { return false }
+        result = value
+        return true
+    }
+    
+    public static func _unconditionallyBridgeFromObjectiveC(_ source: NSNumber?) -> Float {
+        var result: Float?
+        guard let src = source else { return Float(0) }
+        guard _conditionallyBridgeFromObjectiveC(src, result: &result) else { return Float(0) }
+        return result!
+    }
+}
+
+extension Double : _ObjectiveCBridgeable {
+    @available(swift, deprecated: 4)
+    public init(_ number: NSNumber) {
+        self = number.doubleValue
+    }
+
+    public init(truncating number: NSNumber) {
+        self = number.doubleValue
+    }
+
+    public init?(exactly number: NSNumber) {
+        let type = number.objCType.pointee
+        if type == 0x51 {
+            guard let result = Double(exactly: number.uint64Value) else { return nil }
+            self = result
+        } else if type == 0x71 {
+            guard let result = Double(exactly: number.int64Value) else  { return nil }
+            self = result
+        } else {
+            self = number.doubleValue
+        }
+    }
+
+    @_semantics("convertToObjectiveC")
+    public func _bridgeToObjectiveC() -> NSNumber {
+        return NSNumber(value: self)
+    }
+    
+    public static func _forceBridgeFromObjectiveC(_ x: NSNumber, result: inout Double?) {
+        if !_conditionallyBridgeFromObjectiveC(x, result: &result) {
+            fatalError("Unable to bridge \(_ObjectiveCType.self) to \(self)")
+        }
+    }
+    
+    public static func _conditionallyBridgeFromObjectiveC(_ x: NSNumber, result: inout Double?) -> Bool {
+        guard let value = Double(exactly: x) else { return false }
+        result = value
+        return true
+    }
+    
+    public static func _unconditionallyBridgeFromObjectiveC(_ source: NSNumber?) -> Double {
+        var result: Double?
+        guard let src = source else { return Double(0) }
+        guard _conditionallyBridgeFromObjectiveC(src, result: &result) else { return Double(0) }
+        return result!
+    }
+}
+
+extension Bool : _ObjectiveCBridgeable {
+    @available(swift, deprecated: 4)
+    public init(_ number: NSNumber) {
+        self = number.boolValue
+    }
+
+    public init(truncating number: NSNumber) {
+        self = number.boolValue
+    }
+
+    public init?(exactly number: NSNumber) {
+        if number === kCFBooleanTrue as NSNumber || NSNumber(value: 1) == number {
+            self = true
+        } else if number === kCFBooleanFalse as NSNumber || NSNumber(value: 0) == number {
+            self = false
+        } else {
+            return nil
+        }
+    }
+
+    @_semantics("convertToObjectiveC")
+    public func _bridgeToObjectiveC() -> NSNumber {
+        return NSNumber(value: self)
+    }
+    
+    public static func _forceBridgeFromObjectiveC(_ x: NSNumber, result: inout Bool?) {
+        if !_conditionallyBridgeFromObjectiveC(x, result: &result) {
+            fatalError("Unable to bridge \(_ObjectiveCType.self) to \(self)")
+        }
+    }
+    
+    public static func _conditionallyBridgeFromObjectiveC(_ x: NSNumber, result: inout Bool?) -> Bool {
+        if x === kCFBooleanTrue as NSNumber || NSNumber(value: 1) == x {
+            result = true
+            return true
+        } else if x === kCFBooleanFalse as NSNumber || NSNumber(value: 0) == x {
+            result = false
+            return true
+        }
+        
+        return false
+    }
+    
+    public static func _unconditionallyBridgeFromObjectiveC(_ source: NSNumber?) -> Bool {
+        var result: Bool?
+        guard let src = source else { return false }
+        guard _conditionallyBridgeFromObjectiveC(src, result: &result) else { return false }
+        return result!
+    }
+}
+
+extension CGFloat : _ObjectiveCBridgeable {
+    @available(swift, deprecated: 4)
+    public init(_ number: NSNumber) {
+        native = CGFloat.NativeType(truncating: number)
+    }
+
+    public init(truncating number: NSNumber) {
+        native = CGFloat.NativeType(truncating: number)
+    }
+
+    public init?(exactly number: NSNumber) {
+        var nativeValue: CGFloat.NativeType? = 0
+        guard CGFloat.NativeType._conditionallyBridgeFromObjectiveC(number, result: &nativeValue) else { return nil }
+        self.native = nativeValue!
+    }
+
+    @_semantics("convertToObjectiveC")
+    public func _bridgeToObjectiveC() -> NSNumber {
+        return NSNumber(value: self.native)
+    }
+    
+    public static func _forceBridgeFromObjectiveC(_ x: NSNumber, result: inout CGFloat?) {
+        if !_conditionallyBridgeFromObjectiveC(x, result: &result) {
+            fatalError("Unable to bridge \(_ObjectiveCType.self) to \(self)")
+        }
+    }
+    
+    public static func _conditionallyBridgeFromObjectiveC(_ x: NSNumber, result: inout CGFloat?) -> Bool {
+        var nativeValue: CGFloat.NativeType? = 0
+        guard CGFloat.NativeType._conditionallyBridgeFromObjectiveC(x, result: &nativeValue) else { return false }
+        result = CGFloat(nativeValue!)
+        return true
+    }
+    
+    public static func _unconditionallyBridgeFromObjectiveC(_ source: NSNumber?) -> CGFloat {
+        var result: CGFloat?
+        guard let src = source else { return CGFloat(0) }
+        guard _conditionallyBridgeFromObjectiveC(src, result: &result) else { return CGFloat(0) }
+        return result!
+    }
+}
+
+// Literal support for NSNumber
+extension NSNumber : ExpressibleByFloatLiteral, ExpressibleByIntegerLiteral, ExpressibleByBooleanLiteral {
+    /// Create an instance initialized to `value`.
+    @nonobjc
+    public required convenience init(integerLiteral value: Int) {
+        self.init(value: value)
+    }
+
+    /// Create an instance initialized to `value`.
+    @nonobjc
+    public required convenience init(floatLiteral value: Double) {
+        self.init(value: value)
+    }
+
+    /// Create an instance initialized to `value`.
+    @nonobjc
+    public required convenience init(booleanLiteral value: Bool) {
+        self.init(value: value)
+    }
+}
+
+extension NSNumber : _HasCustomAnyHashableRepresentation {
+    // Must be @nonobjc to prevent infinite recursion trying to bridge
+    // AnyHashable to NSObject.
+    @nonobjc
+    public func _toCustomAnyHashable() -> AnyHashable? {
+        if let nsDecimalNumber: NSDecimalNumber = self as? NSDecimalNumber {
+            return AnyHashable(nsDecimalNumber.decimalValue)
+        } else if self === kCFBooleanTrue as NSNumber {
+            return AnyHashable(true)
+        } else if self === kCFBooleanFalse as NSNumber {
+            return AnyHashable(false)
+        } else if NSNumber(value: int8Value) == self {
+            return AnyHashable(int8Value)
+        } else  if NSNumber(value: uint8Value) == self {
+            return AnyHashable(uint8Value)
+        } else if NSNumber(value: int16Value) == self {
+            return AnyHashable(int16Value)
+        } else if NSNumber(value: uint16Value) == self {
+            return AnyHashable(uint16Value)
+        } else if NSNumber(value: int32Value) == self {
+            return AnyHashable(int32Value)
+        } else if NSNumber(value: uint32Value) == self {
+            return AnyHashable(uint32Value)
+        } else if NSNumber(value: int64Value) == self {
+            return AnyHashable(int64Value)
+        } else if NSNumber(value: floatValue) == self {
+            return AnyHashable(floatValue)
+        } else if NSNumber(value: doubleValue) == self {
+            return AnyHashable(doubleValue)
+        } else {
+            return nil
+        }
+    }
+}
+
diff --git a/stdlib/public/SDK/Foundation/NSNumber.swift.gyb b/stdlib/public/SDK/Foundation/NSNumber.swift.gyb
deleted file mode 100644
index 1354430..0000000
--- a/stdlib/public/SDK/Foundation/NSNumber.swift.gyb
+++ /dev/null
@@ -1,326 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// This source file is part of the Swift.org open source project
-//
-// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
-// Licensed under Apache License v2.0 with Runtime Library Exception
-//
-// See https://swift.org/LICENSE.txt for license information
-// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
-//
-//===----------------------------------------------------------------------===//
-
-@_exported import Foundation // Clang module
-import CoreGraphics
-
-//===----------------------------------------------------------------------===//
-// Numbers
-//===----------------------------------------------------------------------===//
-
-@_silgen_name("_swift_Foundation_TypePreservingNSNumberGetKind")
-internal func _swift_Foundation_TypePreservingNSNumberGetKind(
-  _ value: NSNumber
-) -> UInt8
-
-// This enum has a matching counterpart in TypePreservingNSNumber.mm. Please
-// update both copies when changing it.
-internal enum _SwiftTypePreservingNSNumberTag : UInt8 {
-  case SwiftInt     =  0
-  case SwiftInt64   =  1
-  case SwiftInt32   =  2
-  case SwiftInt16   =  3
-  case SwiftInt8    =  4
-  case SwiftUInt    =  5
-  case SwiftUInt64  =  6
-  case SwiftUInt32  =  7
-  case SwiftUInt16  =  8
-  case SwiftUInt8   =  9
-  case SwiftFloat   = 10
-  case SwiftDouble  = 11
-  case SwiftCGFloat = 12
-  case SwiftBool    = 13
-}
-
-// Conversions between NSNumber and various numeric types. The
-// conversion to NSNumber is automatic (auto-boxing), while conversion
-// back to a specific numeric type requires a cast.
-
-%{
-# The set of types we bridge to NSNumber using a Swift-type-preserving
-# subclass. Note that this doesn't include Bool or CGFloat, which require
-# special handling.
-bridgedNumberTypes = [
-  ('Int',     'int'),
-  ('Int64',   'int64'),
-  ('Int32',   'int32'),
-  ('Int16',   'int16'),
-  ('Int8',    'int8'),
-  ('UInt',    'uint'),
-  ('UInt64',  'uint64'),
-  ('UInt32',  'uint32'),
-  ('UInt16',  'uint16'),
-  ('UInt8',   'uint8'),
-  ('Float',   'float'),
-  ('Double',  'double'),
-]
-}%
-
-% for NumberType, accessorName in bridgedNumberTypes:
-
-@_silgen_name("_swift_Foundation_TypePreservingNSNumberWith${NumberType}")
-internal func _swift_Foundation_TypePreservingNSNumberWith${NumberType}(
-  _ value: ${NumberType}
-) -> NSNumber
-
-@_silgen_name("_swift_Foundation_TypePreservingNSNumberGetAs${NumberType}")
-internal func _swift_Foundation_TypePreservingNSNumberGetAs${NumberType}(
-  _ value: NSNumber
-) -> ${NumberType}
-
-extension ${NumberType} : _ObjectiveCBridgeable {
-  public init(_ number: NSNumber) {
-    self = number.${accessorName}Value
-  }
-
-  @_semantics("convertToObjectiveC")
-  public func _bridgeToObjectiveC() -> NSNumber {
-    return _swift_Foundation_TypePreservingNSNumberWith${NumberType}(self)
-  }
-
-  public static func _forceBridgeFromObjectiveC(
-    _ x: NSNumber,
-    result: inout ${NumberType}?
-  ) {
-    // If the NSNumber instance preserved its Swift type, we only want to allow
-    // the cast if the type matches.
-    if let tag = _SwiftTypePreservingNSNumberTag(rawValue:
-        _swift_Foundation_TypePreservingNSNumberGetKind(x)) {
-      precondition(tag == .Swift${NumberType},
-        "NSNumber does not contain right type to be cast to ${NumberType}")
-    }
-
-    result = x.${accessorName}Value
-  }
-
-  public static func _conditionallyBridgeFromObjectiveC(
-    _ x: NSNumber,
-    result: inout ${NumberType}?
-  ) -> Bool {
-    // If the NSNumber instance preserved its Swift type, we only want to allow
-    // the cast if the type matches.
-    if let tag = _SwiftTypePreservingNSNumberTag(rawValue:
-        _swift_Foundation_TypePreservingNSNumberGetKind(x)),
-       tag != .Swift${NumberType} {
-      result = nil
-      return false
-    }
-
-    result = x.${accessorName}Value
-    return true
-  }
-
-  public static func _unconditionallyBridgeFromObjectiveC(
-    _ source: NSNumber?
-  ) -> ${NumberType} {
-    let unwrappedSource = source!
-
-    // If the NSNumber instance preserved its Swift type, we only want to allow
-    // the cast if the type matches.
-    if let tag = _SwiftTypePreservingNSNumberTag(rawValue:
-        _swift_Foundation_TypePreservingNSNumberGetKind(unwrappedSource)) {
-      precondition(tag == .Swift${NumberType},
-        "NSNumber does not contain right type to be cast to ${NumberType}")
-    }
-
-    return unwrappedSource.${accessorName}Value
-  }
-}
-% end
-
-// Cocoa's implementation of NSNumber already preserves the type of Bool
-// values by producing a CFBoolean instance instead of a CFNumber instance
-// under the hood. Property list and JSON serialization in Foundation rely
-// on -[NSNumber numberWithBool:] producing the correct implementation-
-// internal subclass to know when to serialize as a boolean instead of a
-// number, so implement Bool's bridging in terms of the standard NSNumber
-// interfaces.
-extension Bool: _ObjectiveCBridgeable {
-  public init(_ number: NSNumber) {
-    self = number.boolValue
-  }
-
-  @_semantics("convertToObjectiveC")
-  public func _bridgeToObjectiveC() -> NSNumber {
-    return NSNumber(value: self)
-  }
-
-  public static func _forceBridgeFromObjectiveC(
-    _ x: NSNumber,
-    result: inout Bool?
-  ) {
-    // If the NSNumber instance preserved its Swift type, we only want to allow
-    // the cast if the type matches.
-    if let tag = _SwiftTypePreservingNSNumberTag(rawValue:
-        _swift_Foundation_TypePreservingNSNumberGetKind(x)) {
-      precondition(tag == .SwiftBool,
-        "NSNumber does not contain right type to be cast to Bool")
-    }
-
-    result = x.boolValue
-  }
-
-  public static func _conditionallyBridgeFromObjectiveC(
-    _ x: NSNumber,
-    result: inout Bool?
-  ) -> Bool {
-    // If the NSNumber instance preserved its Swift type, we only want to allow
-    // the cast if the type matches.
-    if let tag = _SwiftTypePreservingNSNumberTag(rawValue:
-        _swift_Foundation_TypePreservingNSNumberGetKind(x)),
-       tag != .SwiftBool {
-      result = nil
-      return false
-    }
-
-    result = x.boolValue
-    return true
-  }
-
-  public static func _unconditionallyBridgeFromObjectiveC(
-    _ source: NSNumber?
-  ) -> Bool {
-    let unwrappedSource = source!
-
-    // If the NSNumber instance preserved its Swift type, we only want to allow
-    // the cast if the type matches.
-    if let tag = _SwiftTypePreservingNSNumberTag(rawValue:
-        _swift_Foundation_TypePreservingNSNumberGetKind(unwrappedSource)) {
-      precondition(tag == .SwiftBool,
-        "NSNumber does not contain right type to be cast to Bool")
-    }
-
-    return unwrappedSource.boolValue
-  }
-}
-
-// CGFloat bridging.
-
-@_silgen_name("_swift_Foundation_TypePreservingNSNumberWithCGFloat")
-internal func _swift_Foundation_TypePreservingNSNumberWithCGFloat(
-  _ value: CGFloat
-) -> NSNumber
-
-@_silgen_name("_swift_Foundation_TypePreservingNSNumberGetAsCGFloat")
-internal func _swift_Foundation_TypePreservingNSNumberGetAsCGFloat(
-  _ value: NSNumber
-) -> CGFloat
-
-extension CGFloat : _ObjectiveCBridgeable {
-  public init(_ number: NSNumber) {
-    self.native = CGFloat.NativeType(number)
-  }
-
-  @_semantics("convertToObjectiveC")
-  public func _bridgeToObjectiveC() -> NSNumber {
-    return _swift_Foundation_TypePreservingNSNumberWithCGFloat(self)
-  }
-
-  public static func _forceBridgeFromObjectiveC(
-    _ x: NSNumber,
-    result: inout CGFloat?
-  ) {
-    // If the NSNumber instance preserved its Swift type, we only want to allow
-    // the cast if the type matches.
-    if let tag = _SwiftTypePreservingNSNumberTag(rawValue:
-        _swift_Foundation_TypePreservingNSNumberGetKind(x)) {
-      precondition(tag == .SwiftCGFloat,
-        "NSNumber does not contain right type to be cast to CGFloat")
-    }
-
-    result = CGFloat(x)
-  }
-
-  public static func _conditionallyBridgeFromObjectiveC(
-    _ x: NSNumber,
-    result: inout CGFloat?
-  ) -> Bool {
-    // If the NSNumber instance preserved its Swift type, we only want to allow
-    // the cast if the type matches.
-    if let tag = _SwiftTypePreservingNSNumberTag(rawValue:
-        _swift_Foundation_TypePreservingNSNumberGetKind(x)),
-       tag != .SwiftCGFloat {
-      result = nil
-      return false
-    }
-
-    result = CGFloat(x)
-    return true
-  }
-
-  public static func _unconditionallyBridgeFromObjectiveC(
-    _ source: NSNumber?
-  ) -> CGFloat {
-    let unwrappedSource = source!
-
-    // If the NSNumber instance preserved its Swift type, we only want to allow
-    // the cast if the type matches.
-    if let tag = _SwiftTypePreservingNSNumberTag(rawValue:
-        _swift_Foundation_TypePreservingNSNumberGetKind(unwrappedSource)) {
-      precondition(tag == .SwiftCGFloat,
-        "NSNumber does not contain right type to be cast to CGFloat")
-    }
-
-    return CGFloat(unwrappedSource)
-  }
-}
-
-// Literal support for NSNumber
-extension NSNumber
-  : ExpressibleByFloatLiteral,
-    ExpressibleByIntegerLiteral,
-    ExpressibleByBooleanLiteral
-{
-  /// Create an instance initialized to `value`.
-  @nonobjc
-  public required convenience init(integerLiteral value: Int) {
-    self.init(value: value)
-  }
-
-  /// Create an instance initialized to `value`.
-  @nonobjc
-  public required convenience init(floatLiteral value: Double) {
-    self.init(value: value)
-  }
-
-  /// Create an instance initialized to `value`.
-  @nonobjc
-  public required convenience init(booleanLiteral value: Bool) {
-    self.init(value: value)
-  }
-}
-
-extension NSNumber : _HasCustomAnyHashableRepresentation {
-  // Must be @nonobjc to prevent infinite recursion trying to bridge
-  // AnyHashable to NSObject.
-  @nonobjc
-  public func _toCustomAnyHashable() -> AnyHashable? {
-    guard let kind = _SwiftTypePreservingNSNumberTag(
-      rawValue: _swift_Foundation_TypePreservingNSNumberGetKind(self)
-    ) else {
-      if let nsDecimalNumber: NSDecimalNumber = self as? NSDecimalNumber {
-        return AnyHashable(nsDecimalNumber as Decimal)
-      }
-      return nil
-    }
-    switch kind {
-% for NumberType, _ in bridgedNumberTypes:
-    case .Swift${NumberType}:
-      return AnyHashable(_swift_Foundation_TypePreservingNSNumberGetAs${NumberType}(self))
-% end
-    case .SwiftCGFloat:
-      return AnyHashable(_swift_Foundation_TypePreservingNSNumberGetAsCGFloat(self))
-    case .SwiftBool:
-      return AnyHashable(self.boolValue)
-    }
-  }
-}
diff --git a/stdlib/public/SDK/Foundation/NSRange.swift b/stdlib/public/SDK/Foundation/NSRange.swift
index 7874fe1..72a10e0 100644
--- a/stdlib/public/SDK/Foundation/NSRange.swift
+++ b/stdlib/public/SDK/Foundation/NSRange.swift
@@ -12,33 +12,121 @@
 
 @_exported import Foundation // Clang module
 
+extension NSRange : Hashable {
+    public var hashValue: Int {
+#if arch(i386) || arch(arm)
+        return Int(bitPattern: (UInt(bitPattern: location) | (UInt(bitPattern: length) << 16)))
+#elseif arch(x86_64) || arch(arm64)
+        return Int(bitPattern: (UInt(bitPattern: location) | (UInt(bitPattern: length) << 32)))
+#endif
+    }
+
+    public static func==(_ lhs: NSRange, _ rhs: NSRange) -> Bool {
+        return lhs.location == rhs.location && rhs.length == rhs.length
+    }
+}
+
+extension NSRange : CustomStringConvertible, CustomDebugStringConvertible {
+    public var description: String { return "{\(location), \(length)}" }
+    public var debugDescription: String { return "{\(location), \(length)}" }
+}
+
+extension NSRange {
+    public init?(_ string: String) {
+        if string.isEmpty {
+            // fail early if the string is empty
+            return nil
+        }
+        let scanner = Scanner(string: string)
+        let digitSet = CharacterSet.decimalDigits
+        let _ = scanner.scanUpToCharacters(from: digitSet, into: nil)
+        if scanner.isAtEnd {
+            // fail early if there are no decimal digits
+            return nil
+        }
+        var location = 0
+        guard scanner.scanInt(&location) else {
+            return nil
+        }
+        if scanner.isAtEnd {
+            // return early if there are no more characters after the first int in the string
+            return nil
+        }
+        let _ = scanner.scanUpToCharacters(from: digitSet, into: nil)
+        if scanner.isAtEnd {
+            // return early if there are no integer characters after the first int in the string
+            return nil
+        }
+        var length = 0
+        guard scanner.scanInt(&length) else {
+            return nil
+        }
+        
+        self.location = location
+        self.length = length
+    }
+}
+
+extension NSRange {
+    public var lowerBound: Int { return location }
+    
+    public var upperBound: Int { return location + length }
+    
+    public func contains(_ index: Int) -> Bool { return (!(index < location) && (index - location) < length) }
+    
+    public mutating func formUnion(_ other: NSRange) {
+        self = union(other)
+    }
+
+    public func union(_ other: NSRange) -> NSRange {
+        let max1 = location + length
+        let max2 = other.location + other.length
+        let maxend = (max1 < max2) ? max2 : max1
+        let minloc = location < other.location ? location : other.location
+        return NSRange(location: minloc, length: maxend - minloc)
+    }
+
+    public func intersection(_ other: NSRange) -> NSRange? {
+        let max1 = location + length
+        let max2 = other.location + other.length
+        let minend = (max1 < max2) ? max1 : max2
+        if other.location <= location && location < max2 {
+            return NSRange(location: location, length: minend - location)
+        } else if location <= other.location && other.location < max1 {
+            return NSRange(location: other.location, length: minend - other.location);
+        }
+        return nil
+    }
+}
+
+
 //===----------------------------------------------------------------------===//
 // Ranges
 //===----------------------------------------------------------------------===//
 
 extension NSRange {
-  public init(_ x: Range<Int>) {
-    location = x.lowerBound
-    length = x.count
-  }
+    public init(_ x: Range<Int>) {
+        location = x.lowerBound
+        length = x.count
+    }
 
-  // FIXME(ABI)#75 (Conditional Conformance): this API should be an extension on Range.
-  // Can't express it now because the compiler does not support conditional
-  // extensions with type equality constraints.
-  public func toRange() -> Range<Int>? {
-    if location == NSNotFound { return nil }
-    return location..<(location+length)
-  }
+    // FIXME(ABI)#75 (Conditional Conformance): this API should be an extension on Range.
+    // Can't express it now because the compiler does not support conditional
+    // extensions with type equality constraints.
+    public func toRange() -> Range<Int>? {
+        if location == NSNotFound { return nil }
+        return location..<(location+length)
+    }
 }
 
 extension NSRange : CustomReflectable {
-  public var customMirror: Mirror {
-    return Mirror(self, children: ["location": location, "length": length])
-  }
+    public var customMirror: Mirror {
+        return Mirror(self, children: ["location": location, "length": length])
+    }
 }
 
 extension NSRange : CustomPlaygroundQuickLookable {
-  public var customPlaygroundQuickLook: PlaygroundQuickLook {
-    return .range(Int64(location), Int64(length))
-  }
+    public var customPlaygroundQuickLook: PlaygroundQuickLook {
+        return .range(Int64(location), Int64(length))
+    }
 }
diff --git a/stdlib/public/SDK/Foundation/Notification.swift b/stdlib/public/SDK/Foundation/Notification.swift
index 816c48f..68d351f 100644
--- a/stdlib/public/SDK/Foundation/Notification.swift
+++ b/stdlib/public/SDK/Foundation/Notification.swift
@@ -121,9 +121,8 @@
     }
 
     public static func _unconditionallyBridgeFromObjectiveC(_ source: NSNotification?) -> Notification {
-        var result: Notification?
-        _forceBridgeFromObjectiveC(source!, result: &result)
-        return result!
+        guard let src = source else { return Notification(name: Notification.Name("")) }
+        return Notification(name: src.name, object: src.object, userInfo: src.userInfo)
     }
 }
 
diff --git a/stdlib/public/SDK/Foundation/PlistEncoder.swift b/stdlib/public/SDK/Foundation/PlistEncoder.swift
index 8dbb707..7f61126 100644
--- a/stdlib/public/SDK/Foundation/PlistEncoder.swift
+++ b/stdlib/public/SDK/Foundation/PlistEncoder.swift
@@ -90,7 +90,7 @@
     let options: PropertyListEncoder._Options
 
     /// The path to the current point in encoding.
-    var codingPath: [CodingKey?] = []
+    var codingPath: [CodingKey?]
 
     /// Contextual user-provided information for use during encoding.
     var userInfo: [CodingUserInfoKey : Any] {
@@ -100,9 +100,10 @@
     // MARK: - Initialization
 
     /// Initializes `self` with the given top-level encoder options.
-    init(options: PropertyListEncoder._Options) {
+    init(options: PropertyListEncoder._Options, codingPath: [CodingKey?] = []) {
         self.options = options
         self.storage = _PlistEncodingStorage()
+        self.codingPath = codingPath
     }
 
     // MARK: - Coding Path Actions
@@ -507,16 +508,34 @@
     init(referencing encoder: _PlistEncoder, wrapping array: NSMutableArray, at index: Int) {
         self.encoder = encoder
         self.reference = .array(array, index)
-        super.init(options: encoder.options)
+        super.init(options: encoder.options, codingPath: encoder.codingPath)
     }
 
     /// Initializes `self` by referencing the given dictionary container in the given encoder.
     init(referencing encoder: _PlistEncoder, wrapping dictionary: NSMutableDictionary, key: String) {
         self.encoder = encoder
         self.reference = .dictionary(dictionary, key)
-        super.init(options: encoder.options)
+        super.init(options: encoder.options, codingPath: encoder.codingPath)
     }
 
+    // MARK: - Overridden Implementations
+
+    /// Asserts that we can add a new container at this coding path. See _PlistEncoder.assertCanRequestNewContainer for the logic behind this.
+    /// This differs from super's implementation only in the condition: we need to account for the fact that we copied our reference's coding path, but not its list of containers, so the counts are mismatched.
+    override func assertCanRequestNewContainer() {
+        guard self.storage.count == self.codingPath.count - self.encoder.codingPath.count else {
+            let previousContainerType: String
+            if self.storage.containers.last is NSDictionary {
+                previousContainerType = "keyed"
+            } else if self.storage.containers.last is NSArray {
+                previousContainerType = "unkeyed"
+            } else {
+                previousContainerType = "single value"
+            }
+
+            preconditionFailure("Attempt to encode with new container when already encoded with \(previousContainerType) container.")
+        }
+    }
 
     // MARK: - Deinitialization
 
diff --git a/stdlib/public/SDK/Foundation/URLComponents.swift b/stdlib/public/SDK/Foundation/URLComponents.swift
index bd4291a..652c63a 100644
--- a/stdlib/public/SDK/Foundation/URLComponents.swift
+++ b/stdlib/public/SDK/Foundation/URLComponents.swift
@@ -364,9 +364,8 @@
     }
 
     public static func _unconditionallyBridgeFromObjectiveC(_ source: NSURLComponents?) -> URLComponents {
-        var result: URLComponents?
-        _forceBridgeFromObjectiveC(source!, result: &result)
-        return result!
+        guard let src = source else { return URLComponents() }
+        return URLComponents(reference: src)
     }
 }
 
diff --git a/stdlib/public/SDK/GLKit/CMakeLists.txt b/stdlib/public/SDK/GLKit/CMakeLists.txt
index eb12e0a..fa8ab37 100644
--- a/stdlib/public/SDK/GLKit/CMakeLists.txt
+++ b/stdlib/public/SDK/GLKit/CMakeLists.txt
@@ -8,7 +8,7 @@
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   TARGET_SDKS OSX IOS IOS_SIMULATOR TVOS TVOS_SIMULATOR
   SWIFT_MODULE_DEPENDS_OSX Darwin AppKit CoreData CoreGraphics CoreImage Dispatch Foundation IOKit ObjectiveC QuartzCore simd XPC # auto-updated
-  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics CoreImage Dispatch Foundation ObjectiveC QuartzCore simd UIKit # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics CoreImage Dispatch Foundation ObjectiveC os QuartzCore simd UIKit # auto-updated
   SWIFT_MODULE_DEPENDS_TVOS Darwin CoreGraphics CoreImage Dispatch Foundation ObjectiveC QuartzCore simd UIKit # auto-updated
   FRAMEWORK_DEPENDS GLKit
 
diff --git a/stdlib/public/SDK/GameplayKit/CMakeLists.txt b/stdlib/public/SDK/GameplayKit/CMakeLists.txt
index 5e93092..61ecd0e 100644
--- a/stdlib/public/SDK/GameplayKit/CMakeLists.txt
+++ b/stdlib/public/SDK/GameplayKit/CMakeLists.txt
@@ -8,7 +8,7 @@
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   TARGET_SDKS OSX IOS IOS_SIMULATOR TVOS TVOS_SIMULATOR
   SWIFT_MODULE_DEPENDS_OSX Darwin AppKit CoreData CoreGraphics CoreImage Dispatch Foundation GLKit IOKit ObjectiveC QuartzCore SceneKit simd SpriteKit XPC # auto-updated
-  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics CoreImage Dispatch Foundation GLKit ObjectiveC QuartzCore SceneKit simd SpriteKit UIKit # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin CoreAudio CoreGraphics CoreImage CoreMedia Dispatch Foundation GLKit ObjectiveC os QuartzCore SceneKit simd SpriteKit UIKit # auto-updated
   SWIFT_MODULE_DEPENDS_TVOS Darwin CoreGraphics CoreImage Dispatch Foundation GLKit ObjectiveC QuartzCore SceneKit simd SpriteKit UIKit # auto-updated
   FRAMEWORK_DEPENDS_WEAK GameplayKit
 
diff --git a/stdlib/public/SDK/HomeKit/CMakeLists.txt b/stdlib/public/SDK/HomeKit/CMakeLists.txt
index e4dd0ac..997f991 100644
--- a/stdlib/public/SDK/HomeKit/CMakeLists.txt
+++ b/stdlib/public/SDK/HomeKit/CMakeLists.txt
@@ -7,7 +7,7 @@
   SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   TARGET_SDKS IOS IOS_SIMULATOR TVOS TVOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR
-  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics CoreImage Dispatch Foundation ObjectiveC QuartzCore UIKit # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics CoreImage Dispatch Foundation ObjectiveC os QuartzCore UIKit # auto-updated
   SWIFT_MODULE_DEPENDS_TVOS Darwin CoreGraphics CoreImage Dispatch Foundation ObjectiveC QuartzCore UIKit # auto-updated
   SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreGraphics Dispatch Foundation ObjectiveC # auto-updated
     UIKit # required in some configurations but not found by tool
diff --git a/stdlib/public/SDK/IOKit/CMakeLists.txt b/stdlib/public/SDK/IOKit/CMakeLists.txt
index f2a15cb..d8babc3 100644
--- a/stdlib/public/SDK/IOKit/CMakeLists.txt
+++ b/stdlib/public/SDK/IOKit/CMakeLists.txt
@@ -7,7 +7,7 @@
   SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   TARGET_SDKS OSX
-  SWIFT_MODULE_DEPENDS_OSX Darwin Dispatch ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_OSX Darwin CoreFoundation Dispatch ObjectiveC # auto-updated
   FRAMEWORK_DEPENDS IOKit
 
   DEPLOYMENT_VERSION_OSX ${SWIFTLIB_DEPLOYMENT_VERSION_IOKIT_OSX}
diff --git a/stdlib/public/SDK/Intents/CMakeLists.txt b/stdlib/public/SDK/Intents/CMakeLists.txt
index 27d691a..863198c 100644
--- a/stdlib/public/SDK/Intents/CMakeLists.txt
+++ b/stdlib/public/SDK/Intents/CMakeLists.txt
@@ -23,8 +23,8 @@
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   TARGET_SDKS OSX IOS IOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR
   SWIFT_MODULE_DEPENDS_OSX Darwin CoreGraphics CoreLocation Dispatch Foundation IOKit ObjectiveC # auto-updated
-  SWIFT_MODULE_DEPENDS_IOS Darwin CoreLocation Dispatch Foundation ObjectiveC # auto-updated
-  SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreLocation Dispatch Foundation ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics CoreLocation Dispatch Foundation ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreGraphics CoreLocation Dispatch Foundation ObjectiveC # auto-updated
   FRAMEWORK_DEPENDS_WEAK Intents
 
   DEPLOYMENT_VERSION_OSX ${SWIFTLIB_DEPLOYMENT_VERSION_INTENTS_OSX}
diff --git a/stdlib/public/SDK/MapKit/CMakeLists.txt b/stdlib/public/SDK/MapKit/CMakeLists.txt
index 6413362..99eefc8 100644
--- a/stdlib/public/SDK/MapKit/CMakeLists.txt
+++ b/stdlib/public/SDK/MapKit/CMakeLists.txt
@@ -7,7 +7,7 @@
   SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   SWIFT_MODULE_DEPENDS_OSX Darwin AppKit CoreData CoreGraphics CoreImage CoreLocation Dispatch Foundation IOKit ObjectiveC QuartzCore XPC # auto-updated
-  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics CoreImage CoreLocation Dispatch Foundation ObjectiveC QuartzCore UIKit # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics CoreImage CoreLocation Dispatch Foundation ObjectiveC os QuartzCore UIKit # auto-updated
   SWIFT_MODULE_DEPENDS_TVOS Darwin CoreGraphics CoreImage CoreLocation Dispatch Foundation ObjectiveC QuartzCore UIKit # auto-updated
   SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreGraphics CoreLocation Dispatch Foundation ObjectiveC # auto-updated
     UIKit # required in some configurations but not found by tool
diff --git a/stdlib/public/SDK/Photos/CMakeLists.txt b/stdlib/public/SDK/Photos/CMakeLists.txt
index bef618e..d7c6fcd 100644
--- a/stdlib/public/SDK/Photos/CMakeLists.txt
+++ b/stdlib/public/SDK/Photos/CMakeLists.txt
@@ -7,8 +7,8 @@
   SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   TARGET_SDKS IOS IOS_SIMULATOR TVOS TVOS_SIMULATOR
-  SWIFT_MODULE_DEPENDS_IOS Darwin AVFoundation CoreAudio CoreGraphics CoreImage CoreLocation CoreMedia Dispatch Foundation ObjectiveC QuartzCore simd UIKit # auto-updated
-  SWIFT_MODULE_DEPENDS_TVOS Darwin AVFoundation CoreAudio CoreGraphics CoreImage CoreLocation CoreMedia Dispatch Foundation ObjectiveC QuartzCore simd UIKit # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin AVFoundation CoreAudio CoreData CoreGraphics CoreImage CoreLocation CoreMedia Dispatch Foundation ObjectiveC os QuartzCore simd UIKit # auto-updated
+  SWIFT_MODULE_DEPENDS_TVOS Darwin AVFoundation CoreAudio CoreData CoreGraphics CoreImage CoreLocation CoreMedia Dispatch Foundation ObjectiveC QuartzCore simd UIKit # auto-updated
   FRAMEWORK_DEPENDS Photos
 
   DEPLOYMENT_VERSION_IOS ${SWIFTLIB_DEPLOYMENT_VERSION_PHOTOS_IOS}
diff --git a/stdlib/public/SDK/SceneKit/CMakeLists.txt b/stdlib/public/SDK/SceneKit/CMakeLists.txt
index 704215d..0f3a360 100644
--- a/stdlib/public/SDK/SceneKit/CMakeLists.txt
+++ b/stdlib/public/SDK/SceneKit/CMakeLists.txt
@@ -8,9 +8,9 @@
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   TARGET_SDKS OSX IOS IOS_SIMULATOR TVOS TVOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR
   SWIFT_MODULE_DEPENDS_OSX Darwin AppKit CoreData CoreGraphics CoreImage Dispatch Foundation GLKit IOKit ObjectiveC QuartzCore simd XPC # auto-updated
-  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics CoreImage Dispatch Foundation GLKit ObjectiveC QuartzCore simd UIKit # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin CoreAudio CoreGraphics CoreImage CoreMedia Dispatch Foundation GLKit ObjectiveC os QuartzCore simd UIKit # auto-updated
   SWIFT_MODULE_DEPENDS_TVOS Darwin CoreGraphics CoreImage Dispatch Foundation GLKit ObjectiveC QuartzCore simd UIKit # auto-updated
-  SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreGraphics Dispatch Foundation ObjectiveC simd # auto-updated
+  SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreGraphics Dispatch Foundation ObjectiveC simd UIKit # auto-updated
     UIKit # required in some configurations but not found by tool
   FRAMEWORK_DEPENDS_WEAK SceneKit
 
diff --git a/stdlib/public/SDK/SpriteKit/CMakeLists.txt b/stdlib/public/SDK/SpriteKit/CMakeLists.txt
index b2d2556..f164e2a 100644
--- a/stdlib/public/SDK/SpriteKit/CMakeLists.txt
+++ b/stdlib/public/SDK/SpriteKit/CMakeLists.txt
@@ -9,7 +9,7 @@
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   TARGET_SDKS OSX IOS IOS_SIMULATOR TVOS TVOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR
   SWIFT_MODULE_DEPENDS_OSX Darwin AppKit CoreData CoreGraphics CoreImage Dispatch Foundation GLKit IOKit ObjectiveC QuartzCore simd XPC # auto-updated
-  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics CoreImage Dispatch Foundation GLKit ObjectiveC QuartzCore simd UIKit # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics CoreImage Dispatch Foundation GLKit ObjectiveC os QuartzCore simd UIKit # auto-updated
   SWIFT_MODULE_DEPENDS_TVOS Darwin CoreGraphics CoreImage Dispatch Foundation GLKit ObjectiveC QuartzCore simd UIKit # auto-updated
   SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreGraphics Dispatch Foundation ObjectiveC simd UIKit # auto-updated
   FRAMEWORK_DEPENDS SpriteKit
diff --git a/stdlib/public/SDK/UIKit/CMakeLists.txt b/stdlib/public/SDK/UIKit/CMakeLists.txt
index 401c8b1..05ddec8 100644
--- a/stdlib/public/SDK/UIKit/CMakeLists.txt
+++ b/stdlib/public/SDK/UIKit/CMakeLists.txt
@@ -9,7 +9,7 @@
   SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   TARGET_SDKS IOS IOS_SIMULATOR TVOS TVOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR
-  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics CoreImage Dispatch Foundation ObjectiveC QuartzCore # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics CoreImage Dispatch Foundation ObjectiveC os QuartzCore # auto-updated
   SWIFT_MODULE_DEPENDS_TVOS Darwin CoreGraphics CoreImage Dispatch Foundation ObjectiveC QuartzCore # auto-updated
   SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreGraphics Dispatch Foundation ObjectiveC # auto-updated
   SWIFT_COMPILE_FLAGS_WATCHOS -Xfrontend -disable-autolink-framework -Xfrontend CoreText
diff --git a/stdlib/public/SDK/WatchKit/CMakeLists.txt b/stdlib/public/SDK/WatchKit/CMakeLists.txt
index f10c5b0..05b12ae 100644
--- a/stdlib/public/SDK/WatchKit/CMakeLists.txt
+++ b/stdlib/public/SDK/WatchKit/CMakeLists.txt
@@ -7,8 +7,8 @@
   SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   TARGET_SDKS IOS IOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR
-  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics CoreImage CoreLocation Dispatch Foundation MapKit ObjectiveC QuartzCore UIKit # auto-updated
-  SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreGraphics CoreLocation Dispatch Foundation HomeKit MapKit ObjectiveC SceneKit simd UIKit # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin CoreGraphics CoreImage CoreLocation Dispatch Foundation MapKit ObjectiveC os QuartzCore UIKit # auto-updated
+  SWIFT_MODULE_DEPENDS_WATCHOS Darwin CoreGraphics CoreLocation Dispatch Foundation ObjectiveC SceneKit simd UIKit # auto-updated
   FRAMEWORK_DEPENDS_WEAK WatchKit
   SWIFT_COMPILE_FLAGS_WATCHOS -Xfrontend -disable-autolink-framework -Xfrontend CoreText
 
diff --git a/stdlib/public/SDK/os/CMakeLists.txt b/stdlib/public/SDK/os/CMakeLists.txt
index 7f7e84d..dba1657 100644
--- a/stdlib/public/SDK/os/CMakeLists.txt
+++ b/stdlib/public/SDK/os/CMakeLists.txt
@@ -10,11 +10,11 @@
   SWIFT_COMPILE_FLAGS "${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}"
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   SWIFT_MODULE_DEPENDS_OSX Darwin Dispatch ObjectiveC XPC # auto-updated
-  SWIFT_MODULE_DEPENDS_IOS Darwin ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin Dispatch ObjectiveC # auto-updated
     Dispatch # required in some configurations but not found by tool
-  SWIFT_MODULE_DEPENDS_TVOS Darwin ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_TVOS Darwin Dispatch ObjectiveC # auto-updated
     Dispatch # required in some configurations but not found by tool
-  SWIFT_MODULE_DEPENDS_WATCHOS Darwin ObjectiveC # auto-updated
+  SWIFT_MODULE_DEPENDS_WATCHOS Darwin Dispatch ObjectiveC # auto-updated
     Dispatch # required in some configurations but not found by tool
 
   DEPLOYMENT_VERSION_OSX ${SWIFTLIB_DEPLOYMENT_VERSION_OS_OSX}
diff --git a/stdlib/public/SwiftShims/CMakeLists.txt b/stdlib/public/SwiftShims/CMakeLists.txt
index d68dc46..0368470 100644
--- a/stdlib/public/SwiftShims/CMakeLists.txt
+++ b/stdlib/public/SwiftShims/CMakeLists.txt
@@ -34,6 +34,7 @@
   NSDictionaryShims.h
   NSErrorShims.h
   NSFileManagerShims.h
+  NSIndexPathShims.h
   NSIndexSetShims.h
   NSKeyedArchiverShims.h
   NSLocaleShims.h
diff --git a/stdlib/public/SwiftShims/FoundationOverlayShims.h b/stdlib/public/SwiftShims/FoundationOverlayShims.h
index 153b40b..98e0a85 100644
--- a/stdlib/public/SwiftShims/FoundationOverlayShims.h
+++ b/stdlib/public/SwiftShims/FoundationOverlayShims.h
@@ -22,6 +22,7 @@
 #import "NSDictionaryShims.h"
 #import "NSErrorShims.h"
 #import "NSFileManagerShims.h"
+#import "NSIndexPathShims.h"
 #import "NSIndexSetShims.h"
 #import "NSKeyedArchiverShims.h"
 #import "NSLocaleShims.h"
diff --git a/stdlib/public/SwiftShims/GlobalObjects.h b/stdlib/public/SwiftShims/GlobalObjects.h
index 12c6ee8..ad1aa18 100644
--- a/stdlib/public/SwiftShims/GlobalObjects.h
+++ b/stdlib/public/SwiftShims/GlobalObjects.h
@@ -89,6 +89,14 @@
 __swift_uint64_t _swift_stdlib_HashingDetail_fixedSeedOverride;
 
 #ifdef __cplusplus
+
+static_assert(std::is_pod<_SwiftEmptyArrayStorage>::value,
+              "empty array type should be POD");
+static_assert(std::is_pod<_SwiftEmptyDictionaryStorage>::value,
+              "empty dictionary type should be POD");
+static_assert(std::is_pod<_SwiftEmptySetStorage>::value,
+              "empty set type should be POD");
+
 }} // extern "C", namespace swift
 #endif
 
diff --git a/stdlib/public/SwiftShims/HeapObject.h b/stdlib/public/SwiftShims/HeapObject.h
index a888f63..4c93a7e 100644
--- a/stdlib/public/SwiftShims/HeapObject.h
+++ b/stdlib/public/SwiftShims/HeapObject.h
@@ -14,6 +14,10 @@
 
 #include "RefCount.h"
 
+#define SWIFT_ABI_HEAP_OBJECT_HEADER_SIZE_64 16
+// TODO: Should be 8
+#define SWIFT_ABI_HEAP_OBJECT_HEADER_SIZE_32 12
+
 #ifdef __cplusplus
 #include <type_traits>
 #include "swift/Basic/type_traits.h"
@@ -69,9 +73,17 @@
               "HeapObject must be trivially initializable");
 static_assert(std::is_trivially_destructible<HeapObject>::value,
               "HeapObject must be trivially destructible");
+
 // FIXME: small header for 32-bit
 //static_assert(sizeof(HeapObject) == 2*sizeof(void*),
 //              "HeapObject must be two pointers long");
+//
+static_assert(sizeof(HeapObject) ==
+  (sizeof(void*) == 8 ? SWIFT_ABI_HEAP_OBJECT_HEADER_SIZE_64 :
+   sizeof(void*) == 4 ? SWIFT_ABI_HEAP_OBJECT_HEADER_SIZE_32 :
+   0 && "unexpected pointer size"),
+  "HeapObject must match ABI heap object header size");
+
 static_assert(alignof(HeapObject) == alignof(void*),
               "HeapObject must be pointer-aligned");
 
diff --git a/stdlib/public/SwiftShims/KeyPath.h b/stdlib/public/SwiftShims/KeyPath.h
index 3d91ab1..327e034 100644
--- a/stdlib/public/SwiftShims/KeyPath.h
+++ b/stdlib/public/SwiftShims/KeyPath.h
@@ -1,4 +1,4 @@
-//===--- KeyPath.h - ABI constants for key path objects ----------*- C++ *-===//
+//===--- KeyPath.h - ABI constants for key path objects ---------*- C++ -*-===//
 //
 // This source file is part of the Swift.org open source project
 //
diff --git a/stdlib/public/SwiftShims/NSIndexPathShims.h b/stdlib/public/SwiftShims/NSIndexPathShims.h
new file mode 100644
index 0000000..4e60d80
--- /dev/null
+++ b/stdlib/public/SwiftShims/NSIndexPathShims.h
@@ -0,0 +1,22 @@
+//===--- NSIndexPathShims.h - Found. decl. for IndexPath overl. -*- C++ -*-===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+
+#import "FoundationShimSupport.h"
+
+NS_BEGIN_DECLS
+
+NS_INLINE NS_NON_BRIDGED(NSIndexPath *)_NSIndexPathCreateFromIndexes(NSUInteger idx1, NSUInteger idx2) NS_RETURNS_RETAINED {
+    NSUInteger indexes[] = {idx1, idx2};
+    return [[NSIndexPath alloc] initWithIndexes:&indexes[0] length:2];
+}
+
+NS_END_DECLS
diff --git a/stdlib/public/SwiftShims/RefCount.h b/stdlib/public/SwiftShims/RefCount.h
index fe82b3b..29ec54a 100644
--- a/stdlib/public/SwiftShims/RefCount.h
+++ b/stdlib/public/SwiftShims/RefCount.h
@@ -13,16 +13,16 @@
 #define SWIFT_STDLIB_SHIMS_REFCOUNT_H
 
 #include "Visibility.h"
+#include "SwiftStdint.h"
 
 #if !defined(__cplusplus)
 
 // These definitions are placeholders for importing into Swift.
 // They provide size and alignment but cannot be manipulated safely there.
 
-#include "SwiftStdint.h"
-
 typedef struct {
-  __swift_uint64_t refCounts SWIFT_ATTRIBUTE_UNAVAILABLE;
+  _Alignas(__swift_uintptr_t) __swift_uint32_t refCounts1 SWIFT_ATTRIBUTE_UNAVAILABLE;
+  __swift_uint32_t refCounts2 SWIFT_ATTRIBUTE_UNAVAILABLE;
 } InlineRefCounts;
 
 // not __cplusplus
@@ -1293,14 +1293,6 @@
 static_assert(std::is_trivially_destructible<InlineRefCounts>::value,
               "InlineRefCounts must be trivially destructible");
 
-// FIXME: small header for 32-bit
-#if 0
-static_assert(sizeof(InlineRefCounts) == sizeof(uintptr_t),
-  "InlineRefCounts must be pointer-sized");
-static_assert(alignof(InlineRefCounts) == alignof(uintptr_t),
-"InlineRefCounts must be pointer-aligned");
-#endif
-
 class HeapObjectSideTableEntry {
   // FIXME: does object need to be atomic?
   std::atomic<HeapObject*> object;
@@ -1566,4 +1558,16 @@
 // __cplusplus
 #endif
 
+// These assertions apply to both the C and the C++ declarations.
+_Static_assert(_Alignof(InlineRefCounts) == _Alignof(__swift_uintptr_t),
+  "InlineRefCounts must be pointer-aligned");
+// FIXME: small header for 32-bit
+#if 0
+_Static_assert(sizeof(InlineRefCounts) == sizeof(__swift_uintptr_t),
+  "InlineRefCounts must be pointer-sized");
+#else
+_Static_assert(sizeof(InlineRefCounts) == 2*sizeof(__swift_uint32_t),
+  "InlineRefCounts must be 8 bytes");
+#endif
+
 #endif
diff --git a/stdlib/public/core/ASCII.swift b/stdlib/public/core/ASCII.swift
new file mode 100644
index 0000000..5b681c3
--- /dev/null
+++ b/stdlib/public/core/ASCII.swift
@@ -0,0 +1,88 @@
+//===--- ASCII.swift ------------------------------------------------------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+extension _Unicode {
+  @_fixed_layout
+  public enum ASCII {}
+}
+
+extension _Unicode.ASCII : UnicodeEncoding {
+  public typealias CodeUnit = UInt8
+  public typealias EncodedScalar = CollectionOfOne<CodeUnit>
+
+  public static var encodedReplacementCharacter : EncodedScalar {
+    return EncodedScalar(0x1a) // U+001A SUBSTITUTE; best we can do for ASCII
+  }
+
+  @inline(__always)
+  @_inlineable
+  public static func _isScalar(_ x: CodeUnit) -> Bool {
+    return true
+  }
+
+  @inline(__always)
+  @_inlineable
+  public static func decode(_ source: EncodedScalar) -> UnicodeScalar {
+    return UnicodeScalar(_unchecked: UInt32(
+        source.first._unsafelyUnwrappedUnchecked))
+  }
+  
+  @inline(__always)
+  @_inlineable
+  public static func encode(
+    _ source: UnicodeScalar
+  ) -> EncodedScalar? {
+    guard source.value < (1&<<7) else { return nil }
+    return EncodedScalar(UInt8(extendingOrTruncating: source.value))
+  }
+
+  @inline(__always)
+  public static func transcode<FromEncoding : UnicodeEncoding>(
+    _ content: FromEncoding.EncodedScalar, from _: FromEncoding.Type
+  ) -> EncodedScalar? {
+    if _fastPath(FromEncoding.self == UTF16.self) {
+      let c = unsafeBitCast(content, to: UTF16.EncodedScalar.self)
+      guard (c._storage & 0xFF80 == 0) else { return nil }
+      return EncodedScalar(CodeUnit(c._storage & 0x7f))
+    }
+    else if _fastPath(FromEncoding.self == UTF8.self) {
+      let c = unsafeBitCast(content, to: UTF8.EncodedScalar.self)
+      guard (c._storage & 0x80 == 0) else { return nil }
+      return EncodedScalar(CodeUnit(c._storage & 0x7f))
+    }
+    return encode(FromEncoding.decode(content))
+  }
+
+  public struct Parser {
+    public init() { }
+  }
+  
+  public typealias ForwardParser = Parser
+  public typealias ReverseParser = Parser
+}
+
+extension _Unicode.ASCII.Parser : UnicodeParser {
+  public typealias Encoding = _Unicode.ASCII
+
+  /// Parses a single Unicode scalar value from `input`.
+  public mutating func parseScalar<I : IteratorProtocol>(
+    from input: inout I
+  ) -> _Unicode.ParseResult<Encoding.EncodedScalar>
+  where I.Element == Encoding.CodeUnit {
+    let n = input.next()
+    if _fastPath(n != nil), let x = n {
+      guard _fastPath(Int8(extendingOrTruncating: x) >= 0)
+      else { return .error(length: 1) }
+      return .valid(_Unicode.ASCII.EncodedScalar(x))
+    }
+    return .emptyInput
+  }
+}
diff --git a/stdlib/public/core/ArrayBufferProtocol.swift b/stdlib/public/core/ArrayBufferProtocol.swift
index 2748e6d..c5a248c 100644
--- a/stdlib/public/core/ArrayBufferProtocol.swift
+++ b/stdlib/public/core/ArrayBufferProtocol.swift
@@ -16,7 +16,7 @@
 internal protocol _ArrayBufferProtocol
   : MutableCollection, RandomAccessCollection {
 
-  associatedtype Indices : RandomAccessCollection = CountableRange<Int>
+  associatedtype Indices = CountableRange<Int>
 
   /// The type of elements stored in the buffer.
   associatedtype Element
diff --git a/stdlib/public/core/BidirectionalCollection.swift b/stdlib/public/core/BidirectionalCollection.swift
index f7349e2..0668e05 100644
--- a/stdlib/public/core/BidirectionalCollection.swift
+++ b/stdlib/public/core/BidirectionalCollection.swift
@@ -65,8 +65,8 @@
 ///   `c.index(before: c.index(after: i)) == i`.
 /// - If `i > c.startIndex && i <= c.endIndex`
 ///   `c.index(after: c.index(before: i)) == i`.
-public protocol BidirectionalCollection
-  : _BidirectionalIndexable, Collection {
+public protocol BidirectionalCollection : _BidirectionalIndexable, Collection 
+where SubSequence: BidirectionalCollection, Indices: BidirectionalCollection {
 
 // TODO: swift-3-indexing-model - replaces functionality in BidirectionalIndex
   /// Returns the position immediately before the given index.
@@ -84,17 +84,11 @@
 
   /// A sequence that can represent a contiguous subrange of the collection's
   /// elements.
-  associatedtype SubSequence : _BidirectionalIndexable, Collection
-    = BidirectionalSlice<Self>
-  // FIXME(ABI)#93 (Recursive Protocol Constraints):
-  // associatedtype SubSequence : BidirectionalCollection
+  associatedtype SubSequence = BidirectionalSlice<Self>
 
   /// A type that represents the indices that are valid for subscripting the
   /// collection, in ascending order.
-  associatedtype Indices : _BidirectionalIndexable, Collection
-    = DefaultBidirectionalIndices<Self>
-  // FIXME(ABI)#95 (Recursive Protocol Constraints):
-  // associatedtype Indices : BidirectionalCollection
+  associatedtype Indices = DefaultBidirectionalIndices<Self>
 
   /// The indices that are valid for subscripting the collection, in ascending
   /// order.
diff --git a/stdlib/public/core/CMakeLists.txt b/stdlib/public/core/CMakeLists.txt
index c50e7ae..4b142d8 100644
--- a/stdlib/public/core/CMakeLists.txt
+++ b/stdlib/public/core/CMakeLists.txt
@@ -25,6 +25,7 @@
   ArrayCast.swift
   Arrays.swift.gyb
   ArrayType.swift
+  ASCII.swift
   Assert.swift
   AssertCommon.swift
   BidirectionalCollection.swift
@@ -104,6 +105,7 @@
   Reverse.swift
   Runtime.swift.gyb
   SipHash.swift.gyb
+  SentinelCollection.swift
   Sequence.swift
   SequenceAlgorithms.swift.gyb
   SequenceWrapper.swift
@@ -115,12 +117,12 @@
   StaticString.swift
   Stride.swift.gyb
   StringCharacterView.swift # ORDER DEPENDENCY: Must precede String.swift
+  StringHashable.swift  # ORDER DEPENDENCY: Must precede String.swift
   String.swift
   StringBridge.swift
   StringBuffer.swift
   StringComparable.swift
   StringCore.swift
-  StringHashable.swift
   StringInterpolation.swift
   StringLegacy.swift
   StringRangeReplaceableCollection.swift.gyb
@@ -132,7 +134,6 @@
   SwiftNativeNSArray.swift
   UIntBuffer.swift
   UnavailableStringAPIs.swift.gyb
-  Unicode.swift
   UnicodeEncoding.swift
   UnicodeParser.swift
   UnicodeScalar.swift
@@ -146,6 +147,8 @@
   UTFEncoding.swift
   UTF8.swift
   UTF16.swift
+  UTF32.swift
+  Unicode.swift # ORDER DEPENDENCY: must follow new unicode support
   WriteBackMutableSlice.swift
   )
 
diff --git a/stdlib/public/core/CString.swift b/stdlib/public/core/CString.swift
index 241c520..2a29195 100644
--- a/stdlib/public/core/CString.swift
+++ b/stdlib/public/core/CString.swift
@@ -46,8 +46,8 @@
   public init(cString: UnsafePointer<CChar>) {
     let len = UTF8._nullCodeUnitOffset(in: cString)
     let (result, _) = cString.withMemoryRebound(to: UInt8.self, capacity: len) {
-      _decodeCString($0, as: UTF8.self, length: len,
-        repairingInvalidCodeUnits: true)!
+      _decodeCString(
+        $0, as: UTF8.self, length: len, repairingInvalidCodeUnits: true)!
     }
     self = result
   }
@@ -58,8 +58,8 @@
   /// This is identical to init(cString: UnsafePointer<CChar> but operates on an
   /// unsigned sequence of bytes.
   public init(cString: UnsafePointer<UInt8>) {
-    self = String.decodeCString(cString, as: UTF8.self,
-      repairingInvalidCodeUnits: true)!.result
+    self = String.decodeCString(
+      cString, as: UTF8.self, repairingInvalidCodeUnits: true)!.result
   }
 
   /// Creates a new string by copying and validating the null-terminated UTF-8
@@ -145,7 +145,7 @@
   ///   ill-formed sequence is detected, this method returns `nil`.
   ///
   /// - SeeAlso: `UnicodeCodec`
-  public static func decodeCString<Encoding : UnicodeCodec>(
+  public static func decodeCString<Encoding : UnicodeEncoding>(
     _ cString: UnsafePointer<Encoding.CodeUnit>?,
     as encoding: Encoding.Type,
     repairingInvalidCodeUnits isRepairing: Bool = true)
@@ -154,8 +154,11 @@
     guard let cString = cString else {
       return nil
     }
-    let len = encoding._nullCodeUnitOffset(in: cString)
-    return _decodeCString(cString, as: encoding, length: len,
+    var end = cString
+    while end.pointee != 0 { end += 1 }
+    let len = end - cString
+    return _decodeCString(
+      cString, as: encoding, length: len,
       repairingInvalidCodeUnits: isRepairing)
   }
 
@@ -180,7 +183,7 @@
 /// the given pointer using the specified encoding.
 ///
 /// This internal helper takes the string length as an argument.
-func _decodeCString<Encoding : UnicodeCodec>(
+func _decodeCString<Encoding : UnicodeEncoding>(
   _ cString: UnsafePointer<Encoding.CodeUnit>,
   as encoding: Encoding.Type, length: Int,
   repairingInvalidCodeUnits isRepairing: Bool = true)
diff --git a/stdlib/public/core/CTypes.swift b/stdlib/public/core/CTypes.swift
index 24d1791..487f615 100644
--- a/stdlib/public/core/CTypes.swift
+++ b/stdlib/public/core/CTypes.swift
@@ -206,6 +206,8 @@
   }
 }
 
+@_versioned
+@_inlineable
 func _memcpy(
   dest destination: UnsafeMutableRawPointer,
   src: UnsafeMutableRawPointer,
diff --git a/stdlib/public/core/Character.swift b/stdlib/public/core/Character.swift
index cf3b1f2..013b511 100644
--- a/stdlib/public/core/Character.swift
+++ b/stdlib/public/core/Character.swift
@@ -60,6 +60,7 @@
 /// [glossary]: http://www.unicode.org/glossary/
 /// [clusters]: http://www.unicode.org/glossary/#extended_grapheme_cluster
 /// [scalars]: http://www.unicode.org/glossary/#unicode_scalar_value
+@_fixed_layout
 public struct Character :
   _ExpressibleByBuiltinExtendedGraphemeClusterLiteral,
   ExpressibleByExtendedGraphemeClusterLiteral, Hashable {
@@ -104,6 +105,9 @@
         UTF32.self, input: CollectionOfOne(UInt32(value))))
   }
 
+  // Inlining ensures that the whole constructor can be folded away to a single
+  // integer constant in case of small character literals.
+  @inline(__always)
   @effects(readonly)
   public init(
     _builtinExtendedGraphemeClusterLiteral start: Builtin.RawPointer,
@@ -195,6 +199,7 @@
 
   /// Creates a Character from a String that is already known to require the
   /// large representation.
+  @_versioned
   internal init(_largeRepresentationString s: String) {
     if let native = s._core.nativeBuffer,
        native.start == s._core._baseAddress! {
diff --git a/stdlib/public/core/Codable.swift b/stdlib/public/core/Codable.swift
index fc50668..70e1325 100644
--- a/stdlib/public/core/Codable.swift
+++ b/stdlib/public/core/Codable.swift
@@ -2894,13 +2894,28 @@
 //===----------------------------------------------------------------------===//
 
 // FIXME: Uncomment when conditional conformance is available.
-extension Array : Codable /* where Element : Codable */ {
-    public init(from decoder: Decoder) throws {
-        guard Element.self is Decodable.Type else {
-            preconditionFailure("Array<\(Element.self)> does not conform to Decodable because \(Element.self) does not conform to Decodable.")
+extension Array : Encodable /* where Element : Encodable */ {
+    public func encode(to encoder: Encoder) throws {
+        guard Element.self is Encodable.Type else {
+            preconditionFailure("\(type(of: self)) does not conform to Encodable because \(Element.self) does not conform to Encodable.")
         }
 
+        var container = encoder.unkeyedContainer()
+        for element in self {
+            // superEncoder appends an empty element and wraps an Encoder around it.
+            // This is normally appropriate for encoding super, but this is really what we want to do.
+            let subencoder = container.superEncoder()
+            try (element as! Encodable).encode(to: subencoder)
+        }
+    }
+}
+
+extension Array : Decodable /* where Element : Decodable */ {
+    public init(from decoder: Decoder) throws {
         self.init()
+        guard Element.self is Decodable.Type else {
+            preconditionFailure("\(type(of: self)) does not conform to Decodable because \(Element.self) does not conform to Decodable.")
+        }
 
         let metaType = (Element.self as! Decodable.Type)
         var container = try decoder.unkeyedContainer()
@@ -2912,10 +2927,12 @@
             self.append(element as! Element)
         }
     }
+}
 
+extension Set : Encodable /* where Element : Encodable */ {
     public func encode(to encoder: Encoder) throws {
         guard Element.self is Encodable.Type else {
-            preconditionFailure("Array<\(Element.self)> does not conform to Encodable because \(Element.self) does not conform to Encodable.")
+            preconditionFailure("\(type(of: self)) does not conform to Encodable because \(Element.self) does not conform to Encodable.")
         }
 
         var container = encoder.unkeyedContainer()
@@ -2928,6 +2945,160 @@
     }
 }
 
+extension Set : Decodable /* where Element : Decodable */ {
+    public init(from decoder: Decoder) throws {
+        self.init()
+
+        guard Element.self is Decodable.Type else {
+            preconditionFailure("\(type(of: self)) does not conform to Decodable because \(Element.self) does not conform to Decodable.")
+        }
+
+        let metaType = (Element.self as! Decodable.Type)
+        var container = try decoder.unkeyedContainer()
+        while !container.isAtEnd {
+            // superDecoder fetches the next element as a container and wraps a Decoder around it.
+            // This is normally appropriate for decoding super, but this is really what we want to do.
+            let subdecoder = try container.superDecoder()
+            let element = try metaType.init(from: subdecoder)
+            self.insert(element as! Element)
+        }
+    }
+}
+
+/// A wrapper for dictionary keys which are Strings or Ints.
+internal struct _DictionaryCodingKey : CodingKey {
+    let stringValue: String
+    let intValue: Int?
+
+    init?(stringValue: String) {
+        self.stringValue = stringValue
+        self.intValue = Int(stringValue)
+    }
+
+    init?(intValue: Int) {
+        self.stringValue = "\(intValue)"
+        self.intValue = intValue
+    }
+}
+
+extension Dictionary : Encodable /* where Key : Encodable, Value : Encodable */ {
+    public func encode(to encoder: Encoder) throws {
+        guard Key.self is Encodable.Type else {
+            preconditionFailure("\(type(of: self)) does not conform to Encodable because \(Key.self) does not conform to Encodable.")
+        }
+
+        guard Value.self is Encodable.Type else {
+            preconditionFailure("\(type(of: self)) does not conform to Encodable because \(Value.self) does not conform to Encodable.")
+        }
+
+        if Key.self == String.self {
+            // Since the keys are already Strings, we can use them as keys directly.
+            var container = encoder.container(keyedBy: _DictionaryCodingKey.self)
+            for (key, value) in self {
+                let codingKey = _DictionaryCodingKey(stringValue: key as! String)!
+                let valueEncoder = container.superEncoder(forKey: codingKey)
+                try (value as! Encodable).encode(to: valueEncoder)
+            }
+        } else if Key.self == Int.self {
+            // Since the keys are already Ints, we can use them as keys directly.
+            var container = encoder.container(keyedBy: _DictionaryCodingKey.self)
+            for (key, value) in self {
+                let codingKey = _DictionaryCodingKey(intValue: key as! Int)!
+                let valueEncoder = container.superEncoder(forKey: codingKey)
+                try (value as! Encodable).encode(to: valueEncoder)
+            }
+        } else {
+            // Keys are Encodable but not Strings or Ints, so we cannot arbitrarily convert to keys.
+            // We can encode as an array of alternating key-value pairs, though.
+            var container = encoder.unkeyedContainer()
+            for (key, value) in self {
+                // superEncoder appends an empty element and wraps an Encoder around it.
+                // This is normally appropriate for encoding super, but this is really what we want to do.
+                let keyEncoder = container.superEncoder()
+                try (key as! Encodable).encode(to: keyEncoder)
+
+                let valueEncoder = container.superEncoder()
+                try (value as! Encodable).encode(to: valueEncoder)
+            }
+        }
+    }
+}
+
+extension Dictionary : Decodable /* where Key : Decodable, Value : Decodable */ {
+    public init(from decoder: Decoder) throws {
+        self.init()
+
+        guard Key.self is Encodable.Type else {
+            preconditionFailure("\(type(of: self)) does not conform to Decodable because \(Key.self) does not conform to Decodable.")
+        }
+
+        guard Value.self is Encodable.Type else {
+            preconditionFailure("\(type(of: self)) does not conform to Decodable because \(Value.self) does not conform to Decodable.")
+        }
+
+        if Key.self == String.self {
+            // The keys are Strings, so we should be able to expect a keyed container.
+            let container = try decoder.container(keyedBy: _DictionaryCodingKey.self)
+            let valueMetaType = Value.self as! Decodable.Type
+            for key in container.allKeys {
+                let valueDecoder = try container.superDecoder(forKey: key)
+                let value = try valueMetaType.init(from: valueDecoder)
+                self[key.stringValue as! Key] = (value as! Value)
+            }
+        } else if Key.self == Int.self {
+            // The keys are Ints, so we should be able to expect a keyed container.
+            let valueMetaType = Value.self as! Decodable.Type
+            let container = try decoder.container(keyedBy: _DictionaryCodingKey.self)
+            for key in container.allKeys {
+                guard key.intValue != nil else {
+                    // We provide stringValues for Int keys; if an encoder chooses not to use the actual intValues, we've encoded string keys.
+                    // So on init, _DictionaryCodingKey tries to parse string keys as Ints. If that succeeds, then we would have had an intValue here.
+                    // We don't, so this isn't a valid Int key.
+                    var codingPath = decoder.codingPath
+                    codingPath.append(key)
+                    throw DecodingError.typeMismatch(Int.self,
+                                                     DecodingError.Context(codingPath: codingPath,
+                                                                           debugDescription: "Expected Int key but found String key instead."))
+                }
+
+                let valueDecoder = try container.superDecoder(forKey: key)
+                let value = try valueMetaType.init(from: valueDecoder)
+                self[key.intValue! as! Key] = (value as! Value)
+            }
+        } else {
+            // We should have encoded as an array of alternating key-value pairs.
+            var container = try decoder.unkeyedContainer()
+
+            // We're expecting to get pairs. If the container has a known count, it had better be even; no point in doing work if not.
+            if let count = container.count {
+                guard count % 2 == 0 else {
+                    throw DecodingError.dataCorrupted(DecodingError.Context(codingPath: decoder.codingPath,
+                                                                            debugDescription: "Expected collection of key-value pairs; encountered odd-length array instead."))
+                }
+            }
+
+            let keyMetaType = (Key.self as! Decodable.Type)
+            let valueMetaType = (Value.self as! Decodable.Type)
+            while !container.isAtEnd {
+                // superDecoder fetches the next element as a container and wraps a Decoder around it.
+                // This is normally appropriate for decoding super, but this is really what we want to do.
+                let keyDecoder = try container.superDecoder()
+                let key = try keyMetaType.init(from: keyDecoder)
+
+                guard !container.isAtEnd else {
+                    throw DecodingError.dataCorrupted(DecodingError.Context(codingPath: decoder.codingPath,
+                                                                                 debugDescription: "Unkeyed container reached end before value in key-value pair."))
+                }
+
+                let valueDecoder = try container.superDecoder()
+                let value = try valueMetaType.init(from: valueDecoder)
+
+                self[key as! Key] = (value as! Value)
+            }
+        }
+    }
+}
+
 //===----------------------------------------------------------------------===//
 // Convenience Default Implementations
 //===----------------------------------------------------------------------===//
diff --git a/stdlib/public/core/Collection.swift b/stdlib/public/core/Collection.swift
index f7a8175..f2d94f0 100644
--- a/stdlib/public/core/Collection.swift
+++ b/stdlib/public/core/Collection.swift
@@ -379,6 +379,7 @@
 > : IteratorProtocol, Sequence {
 
   @_inlineable
+  @inline(__always)
   /// Creates an iterator over the given collection.
   public /// @testable
   init(_elements: Elements) {
@@ -387,6 +388,7 @@
   }
 
   @_inlineable
+  @inline(__always)
   /// Creates an iterator over the given collection.
   public /// @testable
   init(_elements: Elements, _position: Elements.Index) {
@@ -419,12 +421,14 @@
   /// - Returns: The next element in the underlying sequence if a next element
   ///   exists; otherwise, `nil`.
   @_inlineable
+  @inline(__always)
   public mutating func next() -> Elements._Element? {
     if _position == _elements.endIndex { return nil }
     let element = _elements[_position]
     _elements.formIndex(after: &_position)
     return element
   }
+  
   @_versioned
   internal let _elements: Elements
   @_versioned
@@ -642,7 +646,10 @@
 /// forward or bidirectional collection must traverse the entire collection to
 /// count the number of contained elements, accessing its `count` property is
 /// an O(*n*) operation.
-public protocol Collection : _Indexable, Sequence {
+public protocol Collection : _Indexable, Sequence 
+where SubSequence: Collection, Indices: Collection,
+      SubSequence.Index == Index
+{
   /// A type that represents the number of steps between a pair of
   /// indices.
   associatedtype IndexDistance = Int
@@ -668,10 +675,10 @@
   /// This associated type appears as a requirement in the `Sequence`
   /// protocol, but it is restated here with stricter constraints. In a
   /// collection, the subsequence should also conform to `Collection`.
-  associatedtype SubSequence : _IndexableBase, Sequence = Slice<Self>
-      where Self.SubSequence.Index == Index,
-            Self.Iterator.Element == Self.SubSequence.Iterator.Element,
+  associatedtype SubSequence = Slice<Self>
+      where Iterator.Element == SubSequence.Iterator.Element,
             SubSequence.SubSequence == SubSequence
+
   // FIXME(ABI)#98 (Recursive Protocol Constraints):
   // FIXME(ABI)#99 (Associated Types with where clauses):
   // associatedtype SubSequence : Collection
@@ -732,10 +739,9 @@
 
   /// A type that represents the indices that are valid for subscripting the
   /// collection, in ascending order.
-  associatedtype Indices : _Indexable, Sequence = DefaultIndices<Self>
+  associatedtype Indices = DefaultIndices<Self>
     where Indices.Iterator.Element == Index,
-          Indices.Index == Index,
-          Indices.SubSequence == Indices
+          Indices.Index == Index
 
   // FIXME(ABI)#100 (Recursive Protocol Constraints):
   // associatedtype Indices : Collection
@@ -1326,12 +1332,15 @@
   ///     // Prints "10"
   @_inlineable
   public var first: Iterator.Element? {
-    // NB: Accessing `startIndex` may not be O(1) for some lazy collections,
-    // so instead of testing `isEmpty` and then returning the first element,
-    // we'll just rely on the fact that the iterator always yields the
-    // first element first.
-    var i = makeIterator()
-    return i.next()
+    @inline(__always)
+    get {
+      // NB: Accessing `startIndex` may not be O(1) for some lazy collections,
+      // so instead of testing `isEmpty` and then returning the first element,
+      // we'll just rely on the fact that the iterator always yields the
+      // first element first.
+      var i = makeIterator()
+      return i.next()
+    }
   }
   
   // TODO: swift-3-indexing-model - uncomment and replace above ready (or should we still use the iterator one?)
diff --git a/stdlib/public/core/ExistentialCollection.swift.gyb b/stdlib/public/core/ExistentialCollection.swift.gyb
index 6cdb79d..204ca5c 100644
--- a/stdlib/public/core/ExistentialCollection.swift.gyb
+++ b/stdlib/public/core/ExistentialCollection.swift.gyb
@@ -426,14 +426,11 @@
 @_fixed_layout
 @_versioned
 internal final class _${Kind}Box<S : ${Kind}> : _Any${Kind}Box<S.Iterator.Element>
+%  if Kind == 'Sequence':
   where
   S.SubSequence : ${Kind},
-%  if Kind == 'Sequence':
   S.SubSequence.Iterator.Element == S.Iterator.Element,
   S.SubSequence.SubSequence == S.SubSequence
-%  else:
-  S.SubSequence.Indices : ${Kind},
-  S.Indices : ${Kind}
 %  end
 {
   internal typealias Element = S.Iterator.Element
@@ -1040,10 +1037,7 @@
     where
     // FIXME(ABI)#101 (Associated Types with where clauses): these constraints should be applied to
     // associated types of Collection.
-    C.SubSequence : ${SubProtocol},
-    C.SubSequence.Iterator.Element == Element,
-    C.SubSequence.Indices : ${SubProtocol},
-    C.Indices : ${SubProtocol}
+    C.SubSequence.Iterator.Element == Element
      {
     // Traversal: ${Traversal}
     // SubTraversal: ${SubTraversal}
diff --git a/stdlib/public/core/Flatten.swift.gyb b/stdlib/public/core/Flatten.swift.gyb
index f90b17a..4e17aad 100644
--- a/stdlib/public/core/Flatten.swift.gyb
+++ b/stdlib/public/core/Flatten.swift.gyb
@@ -133,10 +133,7 @@
   }
 }
 
-extension LazySequenceProtocol
-  where
-  Elements.Iterator.Element == Iterator.Element,
-  Iterator.Element : Sequence {
+extension LazySequenceProtocol where Iterator.Element : Sequence {
 
   /// Returns a lazy sequence that concatenates the elements of this sequence of
   /// sequences.
@@ -418,8 +415,8 @@
   Self : ${collectionForTraversal(traversal)},
   Elements : ${collectionForTraversal(traversal)},
 %   end
-  ${constraints % {'Base': 'Elements.'}},
-  Iterator.Element == Elements.Iterator.Element {
+  ${constraints % {'Base': 'Elements.'}}
+{
   /// A concatenation of the elements of `self`.
   public func joined() -> LazyCollection<${Collection}<Elements>> {
     return ${Collection}(elements).lazy
diff --git a/stdlib/public/core/GroupInfo.json b/stdlib/public/core/GroupInfo.json
index d1bf621..da82a1b 100644
--- a/stdlib/public/core/GroupInfo.json
+++ b/stdlib/public/core/GroupInfo.json
@@ -4,6 +4,7 @@
     "AssertCommon.swift"
   ],
   "String": [
+    "ASCII.swift",
     "CString.swift",
     "Character.swift",
     "StaticString.swift",
@@ -30,7 +31,8 @@
     "UnavailableStringAPIs.swift",
     "UTFEncoding.swift",
     "UTF8.swift",
-    "UTF16.swift"
+    "UTF16.swift",
+    "UTF32.swift"
   ],
   "Bool": [
     "Bool.swift"
@@ -46,6 +48,7 @@
     "Repeat.swift",
     "Sort.swift",
     "Range.swift",
+    "SentinelCollection.swift",
     "ClosedRange.swift",
     "CollectionOfOne.swift",
     "HeapBuffer.swift",
diff --git a/stdlib/public/core/HashedCollections.swift.gyb b/stdlib/public/core/HashedCollections.swift.gyb
index 313426e..eea88bf 100644
--- a/stdlib/public/core/HashedCollections.swift.gyb
+++ b/stdlib/public/core/HashedCollections.swift.gyb
@@ -778,6 +778,38 @@
     }
   }
 
+  /// Returns a new set containing the elements of the set that satisfy the
+  /// given predicate.
+  ///
+  /// In this example, `filter(_:)` is used to include only names shorter than
+  /// five characters.
+  ///
+  ///     let cast: Set = ["Vivien", "Marlon", "Kim", "Karl"]
+  ///     let shortNames = cast.filter { $0.characters.count < 5 }
+  ///
+  ///     shortNames.isSubset(of: cast)
+  ///     // true
+  ///     shortNames.contains("Vivien")
+  ///     // false
+  ///
+  /// - Parameter isIncluded: A closure that takes an element as its argument
+  ///   and returns a Boolean value indicating whether the element should be
+  ///   included in the returned set.
+  /// - Returns: A set of the elements that `isIncluded` allows.
+  @_inlineable
+  @available(swift, introduced: 4.0)
+  public func filter(
+    _ isIncluded: (Element) throws -> Bool
+  ) rethrows -> Set {
+    var result = Set()
+    for element in self {
+      if try isIncluded(element) {
+        result.insert(element)
+      }
+    }
+    return result
+  }
+
   /// Returns a Boolean value that indicates whether the set is a subset of the
   /// given sequence.
   ///
@@ -1681,11 +1713,120 @@
       .native(_NativeBuffer(minimumCapacity: minimumCapacity))
   }
 
+  /// Creates a new dictionary from the key-value pairs in the given sequence.
+  ///
+  /// You use this initializer to create a dictionary when you have a sequence
+  /// of key-value tuples with unique keys. If your sequence might have
+  /// duplicate keys, use the `Dictionary(_:uniquingKeysWith:)` initializer
+  /// instead.
+  ///
+  /// The following example creates a new dictionary using an array of strings
+  /// as the keys and the integers in a countable range as the values:
+  ///
+  ///     let digitWords = ["one", "two", "three", "four", "five"]
+  ///     let wordToValue = Dictionary(uniqueKeysWithValues: zip(digitWords, 1...5))
+  ///     print(wordToValue["three"]!)
+  ///     // Prints "3"
+  ///     print(wordToValue)
+  ///     // Prints "["three": 3, "four": 4, "five": 5, "one": 1, "two": 2]"
+  ///
+  /// - Parameter keysAndValues: A sequence of `(Key, Value)` tuples to use for
+  ///   the new dictionary. Every key in `keysAndValues` must be unique.
+  /// - Returns: A new dictionary initialized with the elements of
+  ///   `keysAndValues`.
+  public init<S: Sequence>(
+    uniqueKeysWithValues keysAndValues: S
+  ) where S.Iterator.Element == (Key, Value) {
+    if let d = keysAndValues as? Dictionary<Key, Value> {
+      self = d
+    } else {
+      self = Dictionary(minimumCapacity: keysAndValues.underestimatedCount)
+      // '_MergeError.keyCollision' is caught and handled with an appropriate
+      // error message one level down, inside _variantBuffer.merge(_:...).
+      try! _variantBuffer.merge(keysAndValues, uniquingKeysWith: { _ in
+        throw _MergeError.keyCollision
+      })
+    }
+  }
+
+  /// Creates a new dictionary from the key-value pairs in the given sequence,
+  /// using a combining closure to determine the value for any duplicate keys.
+  ///
+  /// You use this initializer to create a dictionary when you have a sequence
+  /// of key-value tuples that might have duplicate keys. As the dictionary is
+  /// built, the initializer calls the `combine` closure with the current and
+  /// new values for any duplicate keys. Pass a closure as `combine` that
+  /// selects which value to use in the returned dictionary, or to combine the
+  /// values as the dictionary is initialized.
+  ///
+  /// The following example shows how to choose the first and last values for
+  /// any duplicate keys:
+  ///
+  ///     let pairsWithDuplicateKeys = [("a", 1), ("b", 2), ("a", 3), ("b", 4)]
+  ///
+  ///     let firstValues = Dictionary(pairsWithDuplicateKeys,
+  ///                                  uniquingKeysWith: { (first, _) in first })
+  ///     // ["b": 2, "a": 1]
+  ///
+  ///     let lastValues = Dictionary(pairsWithDuplicateKeys,
+  ///                                 uniquingKeysWith: { (_, last) in last })
+  ///     // ["b": 4, "a": 3]
+  ///
+  /// - Parameters:
+  ///   - keysAndValues: A sequence of `(Key, Value)` tuples to use for the new
+  ///     dictionary.
+  ///   - combine: A closure that is called with the values for any duplicate
+  ///     keys that are encountered. The closure returns the desired value for
+  ///     the final dictionary.
+  public init<S: Sequence>(
+    _ keysAndValues: S,
+    uniquingKeysWith combine: (Value, Value) throws -> Value
+  ) rethrows where S.Iterator.Element == (Key, Value) {
+    self = Dictionary(minimumCapacity: keysAndValues.underestimatedCount)
+    try _variantBuffer.merge(keysAndValues, uniquingKeysWith: combine)
+  }
+
+  /// Creates a new dictionary where the keys are the groupings returned by the
+  /// given closure and the values are arrays of the elements that returned
+  /// each specific key.
+  ///
+  /// The arrays in the "values" position of the new dictionary each contain at
+  /// least one element, with the elements in the same order as the source
+  /// sequence.
+  ///
+  /// The following example declares an array of names, and then creates a
+  /// dictionary from that array by grouping the names by their first letter:
+  ///
+  ///     let students = ["Kofi", "Abena", "Efua", "Kweku", "Akosua"]
+  ///     let studentsByLetter = Dictionary(grouping: students, by: { $0.first! })
+  ///     // ["E": ["Efua"], "K": ["Kofi", "Kweku"], "A": ["Abena", "Akosua"]]
+  ///
+  /// The new `studentsByLetter` dictionary has three entries, with students'
+  /// names grouped by the keys `"E"`, `"K"`, and `"A"`.
+  ///
+  /// - Parameters:
+  ///   - values: A sequence of values to group into a dictionary.
+  ///   - keyForValue: A closure that returns a key for each element in
+  ///     `values`.
+  public init<S: Sequence>(
+    grouping values: S,
+    by keyForValue: (S.Iterator.Element) throws -> Key
+  ) rethrows where Value == [S.Iterator.Element] {
+    self = [:]
+    for value in values {
+      self[try keyForValue(value), default: []].append(value)
+    }
+  }
+
   internal init(_nativeBuffer: _NativeDictionaryBuffer<Key, Value>) {
     _variantBuffer =
       .native(_nativeBuffer)
   }
 
+  internal init(_variantBuffer: _VariantBuffer) {
+    self._variantBuffer = _variantBuffer
+  }
+
 #if _runtime(_ObjC)
   /// Private initializer used for bridging.
   ///
@@ -1846,6 +1987,57 @@
     }
   }
 
+  /// Accesses the element with the given key, or the specified default value,
+  /// if the dictionary doesn't contain the given key.
+  public subscript(
+    key: Key, default defaultValue: @autoclosure () -> Value
+  ) -> Value {
+    @inline(__always)
+    get {
+      return _variantBuffer.maybeGet(key) ?? defaultValue()
+    }
+    set(newValue) {
+      // FIXME(performance): this loads and discards the old value.
+      _variantBuffer.updateValue(newValue, forKey: key)
+    }
+  }
+
+  /// Returns a new dictionary containing the key-value pairs of the dictionary
+  /// that satisfy the given predicate.
+  ///
+  /// - Parameter isIncluded: A closure that takes a key-value pair as its
+  ///   argument and returns a Boolean value indicating whether the pair
+  ///   should be included in the returned dictionary.
+  /// - Returns: A dictionary of the key-value pairs that `isIncluded` allows.
+  @_inlineable
+  @available(swift, introduced: 4.0)
+  public func filter(
+    _ isIncluded: (Element) throws -> Bool
+  ) rethrows -> [Key: Value] {
+    var result = Dictionary()
+    for el in self {
+      if try isIncluded(el) {
+        result[el.key] = el.value
+      }
+    }
+    return result
+  }
+
+  /// Returns a new dictionary containing the keys of this dictionary with the
+  /// values transformed by the given closure.
+  ///
+  /// - Parameter transform: A closure that transforms a value. `transform`
+  ///   accepts each value of the dictionary as its parameter and returns a
+  ///   transformed value of the same or of a different type.
+  /// - Returns: A dictionary containing the keys and transformed values of
+  ///   this dictionary.
+  public func mapValues<T>(
+    _ transform: (Value) throws -> T
+  ) rethrows -> Dictionary<Key, T> {
+    return try Dictionary<Key, T>(
+      _variantBuffer: _variantBuffer.mapValues(transform))
+  }
+
   /// Updates the value stored in the dictionary for the given key, or adds a
   /// new key-value pair if the key does not exist.
   ///
@@ -1886,6 +2078,80 @@
     return _variantBuffer.updateValue(value, forKey: key)
   }
 
+  /// Merges the key-value pairs in the given sequence into the dictionary,
+  /// using a combining closure to determine the value for any duplicate keys.
+  ///
+  /// Use the `combine` closure to select which value to use in the updated
+  /// dictionary, or to combine existing and new values. As the key-value
+  /// pairs are merged with the dictionary, the `combine` closure is called
+  /// with the current and new values for any duplicate keys that are
+  /// encountered.
+  ///
+  /// This example shows how to choose the current or new values for any
+  /// duplicate keys:
+  ///
+  ///     var dictionary = ["a": 1, "b": 2]
+  ///
+  ///     // Keeping existing value for key "a":
+  ///     dictionary.merge(["a": 3, "c": 4])
+  ///           { (current, _) in current }
+  ///     // ["b": 2, "a": 1, "c": 4]
+  ///
+  ///     // Taking the new value for key "a":
+  ///     dictionary.merge(["a": 5, "d": 6])
+  ///           { (_, new) in new }
+  ///     // ["b": 2, "a": 5, "c": 4, "d": 6]
+  ///
+  /// - Parameters:
+  ///   - other:  A sequence of `(Key, Value)` tuples.
+  ///   - combine: A closure that takes the current and new values for any
+  ///     duplicate keys. The closure returns the desired value for the final
+  ///     dictionary.
+  public mutating func merge<S: Sequence>(
+    _ other: S,
+    uniquingKeysWith combine: (Value, Value) throws -> Value
+  ) rethrows where S.Iterator.Element == (Key, Value) {
+    try _variantBuffer.merge(other, uniquingKeysWith: combine)
+  }
+
+  /// Returns a new dictionary created by merging the key-value pairs in the
+  /// given sequence into the dictionary, using a combining closure to
+  /// determine the value for any duplicate keys.
+  ///
+  /// Use the `combine` closure to select which value to use in the returned
+  /// dictionary, or to combine existing and new values. As the key-value
+  /// pairs are merged with the dictionary, the `combine` closure is called
+  /// with the current and new values for any duplicate keys that are
+  /// encountered.
+  ///
+  /// This example shows how to choose the current or new values for any
+  /// duplicate keys:
+  ///
+  ///     let dictionary = ["a": 1, "b": 2]
+  ///     let otherDictionary = ["a": 3, "b": 4]
+  ///     let keepingCurrent = dictionary.merging(otherDictionary)
+  ///           { (current, _) in current }
+  ///     // ["b": 2, "a": 1]
+  ///     let replacingCurrent = dictionary.merging(otherDictionary)
+  ///           { (_, new) in new }
+  ///     // ["b": 4, "a": 3]
+  ///
+  /// - Parameters:
+  ///   - other:  A sequence of `(Key, Value)` tuples.
+  ///   - combine: A closure that takes the current and new values for any
+  ///     duplicate keys. The closure returns the desired value for the final
+  ///     dictionary.
+  /// - Returns: A new dictionary with the combined keys and values of this
+  ///   dictionary and `other`.
+  public func merging<S: Sequence>(
+    _ other: S,
+    uniquingKeysWith combine: (Value, Value) throws -> Value
+  ) rethrows -> [Key: Value] where S.Iterator.Element == (Key, Value) {
+    var result = self
+    try result.merge(other, uniquingKeysWith: combine)
+    return result
+  }
+
   /// Removes and returns the key-value pair at the specified index.
   ///
   /// Calling this method invalidates any existing indices for use with this
@@ -2025,45 +2291,10 @@
   // API itself.
   //
 
-  /// A collection containing just the keys of the dictionary.
-  ///
-  /// When iterated over, keys appear in this collection in the same order as they
-  /// occur in the dictionary's key-value pairs. Each key in the keys
-  /// collection has a unique value.
-  ///
-  ///     let countryCodes = ["BR": "Brazil", "GH": "Ghana", "JP": "Japan"]
-  ///     for k in countryCodes.keys {
-  ///         print(k)
-  ///     }
-  ///     // Prints "BR"
-  ///     // Prints "JP"
-  ///     // Prints "GH"
-  public var keys: LazyMapCollection<Dictionary, Key> {
-    return self.lazy.map { $0.key }
-  }
-
-  /// A collection containing just the values of the dictionary.
-  ///
-  /// When iterated over, values appear in this collection in the same order as they
-  /// occur in the dictionary's key-value pairs.
-  ///
-  ///     let countryCodes = ["BR": "Brazil", "GH": "Ghana", "JP": "Japan"]
-  ///     print(countryCodes)
-  ///     // Prints "["BR": "Brazil", "JP": "Japan", "GH": "Ghana"]"
-  ///     for v in countryCodes.values {
-  ///         print(v)
-  ///     }
-  ///     // Prints "Brazil"
-  ///     // Prints "Japan"
-  ///     // Prints "Ghana"
-  public var values: LazyMapCollection<Dictionary, Value> {
-    return self.lazy.map { $0.value }
-  }
-
   //
   // Collection conformance
   //
-
+  
   /// A Boolean value that indicates whether the dictionary is empty.
   ///
   /// Dictionaries are empty when created with an initializer or an empty
@@ -2075,7 +2306,225 @@
   public var isEmpty: Bool {
     return count == 0
   }
+}
 
+// Maintain old `keys` and `values` types in Swift 3 mode.
+
+extension Dictionary {
+  /// A collection containing just the keys of the dictionary.
+  ///
+  /// When iterated over, keys appear in this collection in the same order as
+  /// they occur in the dictionary's key-value pairs. Each key in the keys
+  /// collection has a unique value.
+  ///
+  ///     let countryCodes = ["BR": "Brazil", "GH": "Ghana", "JP": "Japan"]
+  ///     print(countryCodes)
+  ///     // Prints "["BR": "Brazil", "JP": "Japan", "GH": "Ghana"]"
+  ///
+  ///     for k in countryCodes.keys {
+  ///         print(k)
+  ///     }
+  ///     // Prints "BR"
+  ///     // Prints "JP"
+  ///     // Prints "GH"
+  @available(swift, obsoleted: 4.0)
+  public var keys: LazyMapCollection<[Key: Value], Key> {
+    return self.lazy.map { $0.key }
+  }
+  
+  /// A collection containing just the values of the dictionary.
+  ///
+  /// When iterated over, values appear in this collection in the same order as
+  /// they occur in the dictionary's key-value pairs.
+  ///
+  ///     let countryCodes = ["BR": "Brazil", "GH": "Ghana", "JP": "Japan"]
+  ///     print(countryCodes)
+  ///     // Prints "["BR": "Brazil", "JP": "Japan", "GH": "Ghana"]"
+  ///
+  ///     for v in countryCodes.values {
+  ///         print(v)
+  ///     }
+  ///     // Prints "Brazil"
+  ///     // Prints "Japan"
+  ///     // Prints "Ghana"
+  @available(swift, obsoleted: 4.0)
+  public var values: LazyMapCollection<[Key: Value], Value> {
+    return self.lazy.map { $0.value }
+  }
+}
+
+extension Dictionary {
+  /// A collection containing just the keys of the dictionary.
+  ///
+  /// When iterated over, keys appear in this collection in the same order as
+  /// they occur in the dictionary's key-value pairs. Each key in the keys
+  /// collection has a unique value.
+  ///
+  ///     let countryCodes = ["BR": "Brazil", "GH": "Ghana", "JP": "Japan"]
+  ///     print(countryCodes)
+  ///     // Prints "["BR": "Brazil", "JP": "Japan", "GH": "Ghana"]"
+  ///
+  ///     for k in countryCodes.keys {
+  ///         print(k)
+  ///     }
+  ///     // Prints "BR"
+  ///     // Prints "JP"
+  ///     // Prints "GH"
+  @available(swift, introduced: 4.0)
+  public var keys: Keys {
+    return Keys(self)
+  }
+
+  /// A collection containing just the values of the dictionary.
+  ///
+  /// When iterated over, values appear in this collection in the same order as
+  /// they occur in the dictionary's key-value pairs.
+  ///
+  ///     let countryCodes = ["BR": "Brazil", "GH": "Ghana", "JP": "Japan"]
+  ///     print(countryCodes)
+  ///     // Prints "["BR": "Brazil", "JP": "Japan", "GH": "Ghana"]"
+  ///
+  ///     for v in countryCodes.values {
+  ///         print(v)
+  ///     }
+  ///     // Prints "Brazil"
+  ///     // Prints "Japan"
+  ///     // Prints "Ghana"
+  @available(swift, introduced: 4.0)
+  public var values: Values {
+    get {
+      return Values(self)
+    }
+    set {
+      self = Dictionary(_variantBuffer: newValue._variantBuffer)
+    }
+  }
+
+  /// A view of a dictionary's keys.
+  public struct Keys : Collection, Equatable {
+    public typealias Element = Key
+
+    internal var _variantBuffer: Dictionary._VariantBuffer
+
+    internal init(_ _dictionary: Dictionary) {
+      self._variantBuffer = _dictionary._variantBuffer
+    }
+
+    // Collection Conformance
+    // ----------------------
+
+    public var startIndex: Index {
+      return _variantBuffer.startIndex
+    }
+
+    public var endIndex: Index {
+      return _variantBuffer.endIndex
+    }
+
+    public func index(after i: Index) -> Index {
+      return _variantBuffer.index(after: i)
+    }
+
+    public subscript(position: Index) -> Element {
+      return _variantBuffer.assertingGet(position).key
+    }
+
+    // Customization
+    // -------------
+
+    /// The number of keys in the dictionary.
+    ///
+    /// - Complexity: O(1).
+    public var count: Int {
+      return _variantBuffer.count
+    }
+
+    public var isEmpty: Bool {
+      return count == 0
+    }
+
+    public func _customContainsEquatableElement(_ element: Element) -> Bool? {
+      return _variantBuffer.index(forKey: element) != nil
+    }
+
+    public func _customIndexOfEquatableElement(_ element: Element) -> Index?? {
+      return Optional(_variantBuffer.index(forKey: element))
+    }
+
+    public static func ==(lhs: Keys, rhs: Keys) -> Bool {
+      // Equal if the two dictionaries share storage.
+      if case (.native(let lhsNative), .native(let rhsNative)) =
+        (lhs._variantBuffer, rhs._variantBuffer),
+        lhsNative._storage === rhsNative._storage {
+        return true
+      }
+
+      // Not equal if the dictionaries are different sizes.
+      if lhs.count != rhs.count {
+        return false
+      }
+
+      // Perform unordered comparison of keys.
+      for key in lhs {
+        if !rhs.contains(key) {
+          return false
+        }
+      }
+
+      return true
+    }
+  }
+
+  /// A view of a dictionary's values.
+  public struct Values : MutableCollection {
+    public typealias Element = Value
+
+    internal var _variantBuffer: Dictionary._VariantBuffer
+
+    internal init(_ _dictionary: Dictionary) {
+      self._variantBuffer = _dictionary._variantBuffer
+    }
+
+    // Collection Conformance
+    // ----------------------
+
+    public var startIndex: Index {
+      return _variantBuffer.startIndex
+    }
+
+    public var endIndex: Index {
+      return _variantBuffer.endIndex
+    }
+
+    public func index(after i: Index) -> Index {
+      return _variantBuffer.index(after: i)
+    }
+
+    public subscript(position: Index) -> Element {
+      get {
+        return _variantBuffer.assertingGet(position).value
+      }
+      mutableAddressWithNativeOwner {
+        let address = _variantBuffer.pointerToValue(at: position)
+        return (address, Builtin.castToNativeObject(
+          _variantBuffer.asNative._storage))
+      }
+    }
+
+    // Customization
+    // -------------
+
+    /// The number of values in the dictionary.
+    ///
+    /// - Complexity: O(1).
+    public var count: Int {
+      return _variantBuffer.count
+    }
+
+    public var isEmpty: Bool {
+      return count == 0
+    }
+  }
 }
 
 extension Dictionary where Value : Equatable {
@@ -2193,6 +2642,10 @@
   }
 }
 
+internal enum _MergeError : Error {
+  case keyCollision
+}
+
 #if _runtime(_ObjC)
 /// Equivalent to `NSDictionary.allKeys`, but does not leave objects on the
 /// autorelease pool.
@@ -2450,6 +2903,8 @@
 #
 # a_self: Type name when using a generic noun
 #
+# element: English description of an element
+#
 # TypeParametersDecl: Generic parameters appearing in top-level declarations
 #
 # TypeParameters: Generic parameters appearing in typealiases, etc.
@@ -2462,6 +2917,7 @@
 collections = [
   ('Set',
    'set',
+   'element',
    'Element : Hashable',
    'Element',
    'AnyObject',
@@ -2470,6 +2926,7 @@
 
   ('Dictionary',
    'dictionary',
+   'key-value pair',
    'Key : Hashable, Value',
    'Key, Value',
    'AnyObject, AnyObject',
@@ -2478,7 +2935,7 @@
 ]
 }%
 
-% for (Self, a_self, TypeParametersDecl, TypeParameters, AnyTypeParameters, Sequence, AnySequenceType) in collections:
+% for (Self, a_self, element, TypeParametersDecl, TypeParameters, AnyTypeParameters, Sequence, AnySequenceType) in collections:
 
 /// An instance of this class has all `${Self}` data tail-allocated.
 /// Enough bytes are allocated to hold the bitmap for marking valid entries,
@@ -4074,6 +4531,36 @@
   }
 #endif
 
+  /// Reserves enough space for the specified number of elements to be stored
+  /// without reallocating additional storage.
+  internal mutating func reserveCapacity(_ capacity: Int) {
+    let minCapacity = NativeBuffer.minimumCapacity(
+      minimumCount: capacity,
+      maxLoadFactorInverse: _hashContainerDefaultMaxLoadFactorInverse)
+    _ = ensureUniqueNativeBuffer(minCapacity)
+  }
+
+  /// The number of elements that can be stored without expanding the current
+  /// storage.
+  ///
+  /// For bridged storage, this is equal to the current count of the
+  /// collection, since any addition will trigger a copy of the elements into
+  /// newly allocated storage. For native storage, this is the element count
+  /// at which adding any more elements will exceed the load factor.
+  internal var effectiveCapacity: Int {
+    switch self {
+    case .native:
+      return Int(Double(asNative.capacity) /
+        _hashContainerDefaultMaxLoadFactorInverse)
+    case .cocoa(let cocoaBuffer):
+#if _runtime(_ObjC)
+      return cocoaBuffer.count
+#else
+      _sanityCheckFailure("internal error: unexpected cocoa ${Self}")
+#endif
+    }
+  }
+
   //
   // _HashBuffer conformance
   //
@@ -4305,6 +4792,42 @@
     }
   }
 
+%if Self == 'Dictionary':
+  internal mutating func nativePointerToValue(at i: Index)
+    -> UnsafeMutablePointer<Value> {
+    _ = ensureUniqueNativeBuffer(asNative.capacity)
+    return asNative.values + i._nativeIndex.offset
+  }
+
+  internal mutating func pointerToValue(at i: Index)
+    -> UnsafeMutablePointer<Value> {
+    if _fastPath(guaranteedNative) {
+      return nativePointerToValue(at: i)
+    }
+
+    switch self {
+    case .native:
+      return nativePointerToValue(at: i)
+    case .cocoa(let cocoaStorage):
+#if _runtime(_ObjC)
+      // We have to migrate the data to native storage before we can return a
+      // mutable pointer. But after we migrate, the Cocoa index becomes
+      // useless, so get the key first.
+      let cocoaIndex = i._cocoaIndex
+      let anyObjectKey: AnyObject =
+        cocoaIndex.allKeys[cocoaIndex.currentKeyIndex]
+      migrateDataToNativeBuffer(cocoaStorage)
+      let key = _forceBridgeFromObjectiveC(anyObjectKey, Key.self)
+      let nativeIndex = asNative.index(forKey: key)!
+
+      return nativePointerToValue(at: ._native(nativeIndex))
+#else
+      _sanityCheckFailure("internal error: unexpected cocoa ${Self}")
+#endif
+    }
+  }
+%end
+
   internal mutating func nativeInsert(
     _ value: Value, forKey key: Key
   ) -> (inserted: Bool, memberAfterInsert: Value) {
@@ -4361,6 +4884,111 @@
     }
   }
 
+%if Self == 'Dictionary':
+  internal func nativeMapValues<T>(
+    _ transform: (Value) throws -> T
+  ) rethrows -> _Variant${Self}Buffer<Key, T> {
+    var buffer = _Native${Self}Buffer<Key, T>(capacity: asNative.capacity)
+
+    // Because the keys in the current and new buffer are the same, we can 
+    // initialize to the same locations in the new buffer, skipping hash value
+    // recalculations.
+    var i = asNative.startIndex
+    while i != asNative.endIndex {
+      let (k, v) = asNative.assertingGet(i)
+      try buffer.initializeKey(k, value: transform(v), at: i.offset)
+      asNative.formIndex(after: &i)
+    }
+    buffer.count = asNative.count
+
+    return .native(buffer)
+  }
+
+  internal func mapValues<T>(
+    _ transform: (Value) throws -> T
+  ) rethrows -> _Variant${Self}Buffer<Key, T> {
+    if _fastPath(guaranteedNative) {
+      return try nativeMapValues(transform)
+    }
+
+    switch self {
+    case .native:
+      return try nativeMapValues(transform)
+    case .cocoa(let cocoaStorage):
+#if _runtime(_ObjC)
+      var storage: _Variant${Self}Buffer<Key, T> = .native(
+        _Native${Self}Buffer<Key, T>(capacity: cocoaStorage.count))
+
+      var i = cocoaStorage.startIndex
+      while i != cocoaStorage.endIndex {
+        let (anyObjectKey, anyObjectValue) = cocoaStorage.assertingGet(i)
+        let nativeKey = _forceBridgeFromObjectiveC(anyObjectKey, Key.self)
+        let nativeValue = _forceBridgeFromObjectiveC(anyObjectValue, Value.self)
+        _ = try storage.nativeInsert(transform(nativeValue), forKey: nativeKey)
+        cocoaStorage.formIndex(after: &i)
+      }
+
+      return storage
+#else
+      _sanityCheckFailure("internal error: unexpected cocoa ${Self}")
+#endif
+    }
+  }
+
+  internal mutating func nativeMerge<S: Sequence>(
+    _ keysAndValues: S,
+    uniquingKeysWith combine: (Value, Value) throws -> Value
+  ) rethrows where S.Iterator.Element == (Key, Value) {
+    for (key, value) in keysAndValues {
+      var (i, found) = asNative._find(key, startBucket: asNative._bucket(key))
+
+      if found {
+        _ = ensureUniqueNativeBuffer(asNative.capacity)
+        do {
+          let newValue = try combine(asNative.value(at: i.offset), value)
+          asNative.setKey(key, value: newValue, at: i.offset)
+        } catch _MergeError.keyCollision {
+          fatalError("Duplicate values for key: '\(key)'")
+        }
+      } else {
+        let minCapacity = NativeBuffer.minimumCapacity(
+          minimumCount: asNative.count + 1,
+          maxLoadFactorInverse: _hashContainerDefaultMaxLoadFactorInverse)
+
+        let (_, capacityChanged) = ensureUniqueNativeBuffer(minCapacity)
+        if capacityChanged {
+          i = asNative._find(key, startBucket: asNative._bucket(key)).pos
+        }
+
+        asNative.initializeKey(key, value: value, at: i.offset)
+        asNative.count += 1
+      }
+    }
+  }
+
+  internal mutating func merge<S: Sequence>(
+    _ keysAndValues: S,
+    uniquingKeysWith combine: (Value, Value) throws -> Value
+  ) rethrows where S.Iterator.Element == (Key, Value) {
+    if _fastPath(guaranteedNative) {
+      try nativeMerge(keysAndValues, uniquingKeysWith: combine)
+      return
+    }
+
+    switch self {
+    case .native:
+      try nativeMerge(keysAndValues, uniquingKeysWith: combine)
+    case .cocoa(let cocoaStorage):
+#if _runtime(_ObjC)
+      migrateDataToNativeBuffer(cocoaStorage)
+      try nativeMerge(keysAndValues, uniquingKeysWith: combine)
+#else
+      _sanityCheckFailure("internal error: unexpected cocoa ${Self}")
+#endif
+    }
+  }
+%end
+
   /// - parameter idealBucket: The ideal bucket for the element being deleted.
   /// - parameter offset: The offset of the element that will be deleted.
   /// Precondition: there should be an initialized entry at offset.
@@ -5164,6 +5792,43 @@
     guard !isEmpty else { return nil }
     return remove(at: startIndex)
   }
+
+  @_inlineable
+  @available(swift, obsoleted: 4.0)
+  public func filter(
+    _ isIncluded: (Element) throws -> Bool
+  ) rethrows -> [Element] {
+    var result: [Element] = []
+    for x in self {
+      if try isIncluded(x) {
+        result.append(x)
+      }
+    }
+    return result
+  }
+
+  /// The total number of ${element}s that the ${a_self} can contain without
+  /// allocating new storage.
+  public var capacity: Int {
+    return _variantBuffer.effectiveCapacity
+  }
+
+  /// Reserves enough space to store the specified number of ${element}s.
+  ///
+  /// If you are adding a known number of ${element}s to a ${a_self}, use this
+  /// method to avoid multiple reallocations. This method ensures that the
+  /// ${a_self} has unique, mutable, contiguous storage, with space allocated
+  /// for at least the requested number of ${element}s.
+  ///
+  /// Calling the `reserveCapacity(_:)` method on a ${a_self} with bridged
+  /// storage triggers a copy to contiguous storage even if the existing
+  /// storage has room to store `minimumCapacity` ${element}s.
+  ///
+  /// - Parameter minimumCapacity: The requested number of ${element}s to
+  ///   store.
+  public mutating func reserveCapacity(_ minimumCapacity: Int) {
+    _variantBuffer.reserveCapacity(minimumCapacity)
+  }
 }
 
 //===--- Bridging ---------------------------------------------------------===//
diff --git a/stdlib/public/core/IntegerParsing.swift.gyb b/stdlib/public/core/IntegerParsing.swift.gyb
index 24d2076..6ca0627 100644
--- a/stdlib/public/core/IntegerParsing.swift.gyb
+++ b/stdlib/public/core/IntegerParsing.swift.gyb
@@ -28,6 +28,7 @@
 /// - Note: If `text` begins with `"+"` or `"-"`, even if the rest of
 ///   the characters are `"0"`, the result is `nil`.
   // FIXME(integers): support a more general BinaryInteger protocol
+@inline(__always)
 internal func _parseUnsignedAsciiAsUInt64(
   _ u16: String.UTF16View, _ radix: Int, _ maximum: UInt64
 ) -> UInt64? {
@@ -70,6 +71,7 @@
 /// - Note: For text matching the regular expression "-0+", the result
 ///   is `0`, not `nil`.
   // FIXME(integers): support a more general BinaryInteger protocol
+@inline(__always)
 internal func _parseAsciiAsUInt64(
   _ utf16: String.UTF16View, _ radix: Int, _ maximum: UInt64
 ) -> UInt64? {
@@ -92,6 +94,7 @@
 /// - Note: For text matching the regular expression "-0+", the result
 ///   is `0`, not `nil`.
   // FIXME(integers): support a more general BinaryInteger protocol
+@inline(__always)
 internal func _parseAsciiAsInt64(
   _ utf16: String.UTF16View, _ radix: Int, _ maximum: Int64
 ) -> Int64? {
@@ -109,6 +112,7 @@
 }
 
 /// Strip an optional single leading ASCII plus/minus sign from `utf16`.
+@inline(__always)
 private func _parseOptionalAsciiSign(
   _ utf16: String.UTF16View
 ) -> (digitsUTF16: String.UTF16View, isMinus: Bool) {
diff --git a/stdlib/public/core/Integers.swift.gyb b/stdlib/public/core/Integers.swift.gyb
index 8132ff7..a2d0070 100644
--- a/stdlib/public/core/Integers.swift.gyb
+++ b/stdlib/public/core/Integers.swift.gyb
@@ -1574,9 +1574,7 @@
 
   @_transparent
   public func signum() -> Self {
-    if self < (0 as Self) { return -1 }
-    if self > (0 as Self) { return 1 }
-    return 0
+    return (self > (0 as Self) ? 1 : 0) - (self < (0 as Self) ? 1 : 0)
   }
 
   /// The number of words used for the current binary representation of this
@@ -2640,80 +2638,6 @@
     return Bool(Builtin.cmp_${u}lt_Int${bits}(lhs._value, rhs._value))
   }
 
-// FIXME(integers): it should be possible to turn this into an optimizer pass
-%   if Self != 'Int':
-  @_transparent
-  public static func < (lhs: ${Self}, rhs: Int) -> Bool {
-%     if not signed:
-    if rhs < 0 { return false }
-%     end
-
-%     if bits < word_bits:
-    let lhs_ = Int(_truncatingBits: lhs._lowUWord)
-    return lhs_ < rhs
-%     elif bits == word_bits:
-    return Bool(Builtin.cmp_${u}lt_Int${bits}(lhs._value, rhs._value))
-%     else:
-    let rhs_ = ${Self}(_truncatingBits: rhs._lowUWord)
-    return lhs < rhs_
-%     end
-  }
-
-  @_transparent
-  public static func < (lhs: Int, rhs: ${Self}) -> Bool {
-%     if not signed:
-    if lhs < 0 { return true }
-%     end
-%     if bits < word_bits:
-    let rhs_ = Int(_truncatingBits: rhs._lowUWord)
-    return lhs < rhs_
-%     elif bits == word_bits:
-    return Bool(Builtin.cmp_${u}lt_Int${bits}(lhs._value, rhs._value))
-%     else:
-    let lhs_ = ${Self}(_truncatingBits: lhs._lowUWord)
-    return lhs_ < rhs
-%     end
-  }
-
-%     for Args in ['lhs: %s, rhs: Int' % Self, 'lhs: Int, rhs: %s' % Self]:
-  @_transparent
-  public static func > (${Args}) -> Bool {
-    return rhs < lhs
-  }
-
-  @_transparent
-  public static func <= (${Args}) -> Bool {
-    return !(rhs < lhs)
-  }
-
-  @_transparent
-  public static func >= (${Args}) -> Bool {
-    return !(lhs < rhs)
-  }
-
-%     end
-
-%   else: # if Self != 'Int'
-
-  // FIXME(integers): Comparable default implementations should really be
-  // chosen by the compiler. <rdar://problem/29340480>
-  @_transparent
-  public static func > (lhs: Int, rhs: Int) -> Bool {
-    return rhs < lhs
-  }
-
-  @_transparent
-  public static func <= (lhs: Int, rhs: Int) -> Bool {
-    return !(rhs < lhs)
-  }
-
-  @_transparent
-  public static func >= (lhs: Int, rhs: Int) -> Bool {
-    return !(lhs < rhs)
-  }
-
-%   end # if Self != 'Int'
-
 // FIXME(integers): pending compiler improvements.
 // Basically, most simple arithmetic expressions become too complex when `+`
 // gets defined on the protocol rather than on concrete type.
@@ -3109,6 +3033,13 @@
 
   @available(swift, obsoleted: 4)
   public static var _sizeInBytes: ${Self} { return ${bits}/8 }
+
+  @inline(__always)
+  public func signum() -> ${Self} {
+    let isPositive = ${Self}(Builtin.zext_Int1_Int${bits}(
+      (self > (0 as ${Self}))._value))
+    return isPositive | (self &>> ${bits - 1})
+  }
 }
 %# end of concrete type: ${Self}
 
diff --git a/stdlib/public/core/KeyPath.swift b/stdlib/public/core/KeyPath.swift
index 07e34cf..039f4ad 100644
--- a/stdlib/public/core/KeyPath.swift
+++ b/stdlib/public/core/KeyPath.swift
@@ -1414,7 +1414,8 @@
 }
 
 // The distance in bytes from the address point of a KeyPath object to its
-// buffer header. Includes the size of the Swift heap object header and
+// buffer header. Includes the size of the Swift heap object header and the
+// pointer to the KVC string.
 
 internal var keyPathObjectHeaderSize: Int {
   return MemoryLayout<HeapObject>.size + MemoryLayout<Int>.size
@@ -1437,7 +1438,7 @@
   //   global object will itself always have the "trivial" bit set, since it
   //   never needs to be destroyed.)
   // - Components may have unresolved forms that require instantiation.
-  // - The component type metadata pointers are unresolved, and instead
+  // - Type metadata pointers are unresolved, and instead
   //   point to accessor functions that instantiate the metadata.
   //
   // The pattern never precomputes the capabilities of the key path (readonly/
@@ -1649,7 +1650,7 @@
 ) {
   // NB: patternBuffer and destData alias when the pattern is instantiable
   // in-line. Therefore, do not read from patternBuffer after the same position
-  // in destBuffer has been written to.
+  // in destData has been written to.
 
   var patternBuffer = origPatternBuffer
   let destHeaderPtr = origDestData.baseAddress.unsafelyUnwrapped
diff --git a/stdlib/public/core/LazySequence.swift b/stdlib/public/core/LazySequence.swift
index 373ef47..d8fb32d 100644
--- a/stdlib/public/core/LazySequence.swift
+++ b/stdlib/public/core/LazySequence.swift
@@ -133,6 +133,7 @@
   ///
   /// - See also: `elements`
   associatedtype Elements : Sequence = Self
+  where Elements.Iterator.Element == Iterator.Element
 
   /// A sequence containing the same elements as this one, possibly with
   /// a simpler type.
diff --git a/stdlib/public/core/Mirror.swift b/stdlib/public/core/Mirror.swift
index c2d319e..37d95d8 100644
--- a/stdlib/public/core/Mirror.swift
+++ b/stdlib/public/core/Mirror.swift
@@ -214,13 +214,7 @@
     children: C,
     displayStyle: DisplayStyle? = nil,
     ancestorRepresentation: AncestorRepresentation = .generated
-  ) where
-    C.Iterator.Element == Child,
-    // FIXME(ABI)#47 (Associated Types with where clauses): these constraints should be applied to
-    // associated types of Collection.
-    C.SubSequence : Collection,
-    C.SubSequence.Indices : Collection,
-    C.Indices : Collection {
+  ) where C.Iterator.Element == Child {
 
     self.subjectType = Subject.self
     self._makeSuperclassMirror = Mirror._superclassIterator(
@@ -267,11 +261,7 @@
     unlabeledChildren: C,
     displayStyle: DisplayStyle? = nil,
     ancestorRepresentation: AncestorRepresentation = .generated
-  ) where
-    // FIXME(ABI)#48 (Associated Types with where clauses): these constraints should be applied to
-    // associated types of Collection.
-    C.SubSequence : Collection,
-    C.Indices : Collection {
+  ) {
 
     self.subjectType = Subject.self
     self._makeSuperclassMirror = Mirror._superclassIterator(
diff --git a/stdlib/public/core/MutableCollection.swift b/stdlib/public/core/MutableCollection.swift
index a1ae475..3dfde8d 100644
--- a/stdlib/public/core/MutableCollection.swift
+++ b/stdlib/public/core/MutableCollection.swift
@@ -196,14 +196,9 @@
 ///     // Must be equivalent to:
 ///     a[i] = x
 ///     let y = x
-public protocol MutableCollection : _MutableIndexable, Collection {
-  // FIXME(ABI)#181: should be constrained to MutableCollection
-  // (<rdar://problem/20715009> Implement recursive protocol
-  // constraints)
-  /// A collection that represents a contiguous subrange of the collection's
-  /// elements.
-  associatedtype SubSequence : Collection /*: MutableCollection*/
-    = MutableSlice<Self>
+public protocol MutableCollection : _MutableIndexable, Collection
+where SubSequence: MutableCollection {
+  associatedtype SubSequence = MutableSlice<Self>
 
   /// Accesses the element at the specified position.
   ///
diff --git a/stdlib/public/core/NewtypeWrapper.swift.gyb b/stdlib/public/core/NewtypeWrapper.swift.gyb
index 0fbdf51..fbceca7 100644
--- a/stdlib/public/core/NewtypeWrapper.swift.gyb
+++ b/stdlib/public/core/NewtypeWrapper.swift.gyb
@@ -21,13 +21,6 @@
   }
 }
 
-% for op in ['<', '>', '<=', '>=']:
-public func ${op} <T: _SwiftNewtypeWrapper>(lhs: T, rhs: T) -> Bool
-  where T : Comparable, T.RawValue : Comparable {
-  return lhs.rawValue ${op} rhs.rawValue
-}
-% end
-
 #if _runtime(_ObjC)
 extension _SwiftNewtypeWrapper where Self.RawValue : _ObjectiveCBridgeable {
   public func _bridgeToObjectiveC() -> Self.RawValue._ObjectiveCType {
diff --git a/stdlib/public/core/Policy.swift b/stdlib/public/core/Policy.swift
index 95efedf..7d5b81e 100644
--- a/stdlib/public/core/Policy.swift
+++ b/stdlib/public/core/Policy.swift
@@ -250,22 +250,12 @@
 ///     // Prints "The value of 'obj' is 100"
 ///
 /// - SeeAlso: `AnyClass`
-@objc
-public protocol AnyObject : class {}
 #else
 /// The protocol to which all classes implicitly conform.
 ///
 /// - SeeAlso: `AnyClass`
-public protocol AnyObject : class {}
 #endif
-// Implementation note: the `AnyObject` protocol *must* not have any method or
-// property requirements.
-
-// FIXME: AnyObject should have an alternate version for non-objc without
-// the @objc attribute, but AnyObject needs to be not be an address-only
-// type to be able to be the target of castToNativeObject and an empty
-// non-objc protocol appears not to be. There needs to be another way to make
-// this the right kind of object.
+public typealias AnyObject = Builtin.AnyObject
 
 /// The protocol to which all class types implicitly conform.
 ///
diff --git a/stdlib/public/core/RandomAccessCollection.swift b/stdlib/public/core/RandomAccessCollection.swift
index 88f4253..8a4dec0 100644
--- a/stdlib/public/core/RandomAccessCollection.swift
+++ b/stdlib/public/core/RandomAccessCollection.swift
@@ -48,20 +48,15 @@
 /// `distance(from:to:)` methods with O(1) efficiency.
 public protocol RandomAccessCollection :
   _RandomAccessIndexable, BidirectionalCollection
+  where SubSequence: RandomAccessCollection, Indices: RandomAccessCollection
 {
   /// A collection that represents a contiguous subrange of the collection's
   /// elements.
-  associatedtype SubSequence : _RandomAccessIndexable, BidirectionalCollection
-    = RandomAccessSlice<Self>
-  // FIXME(ABI)#102 (Recursive Protocol Constraints):
-  // associatedtype SubSequence : RandomAccessCollection
+  associatedtype SubSequence = RandomAccessSlice<Self>
 
   /// A type that represents the indices that are valid for subscripting the
   /// collection, in ascending order.
-  associatedtype Indices : _RandomAccessIndexable, BidirectionalCollection
-    = DefaultRandomAccessIndices<Self>
-  // FIXME(ABI)#103 (Recursive Protocol Constraints):
-  // associatedtype Indices : RandomAccessCollection
+  associatedtype Indices = DefaultRandomAccessIndices<Self>
 
   /// The indices that are valid for subscripting the collection, in ascending
   /// order.
diff --git a/stdlib/public/core/SentinelCollection.swift b/stdlib/public/core/SentinelCollection.swift
new file mode 100644
index 0000000..6b9f293
--- /dev/null
+++ b/stdlib/public/core/SentinelCollection.swift
@@ -0,0 +1,109 @@
+//===--- SentinelCollection.swift -----------------------------------------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+public // @testable
+protocol _Function {
+  associatedtype Input
+  associatedtype Output
+  func apply(_: Input) -> Output
+}
+
+protocol _Predicate : _Function where Output == Bool { }
+
+struct _SentinelIterator<
+  Base: IteratorProtocol, 
+  IsSentinel : _Predicate
+> : IteratorProtocol, Sequence
+where IsSentinel.Input == Base.Element {
+  var _base: Base
+  var _isSentinel: IsSentinel
+  var _expired: Bool = false
+
+  init(_ base: Base, until condition: IsSentinel) {
+    _base = base
+    _isSentinel = condition
+  }
+  
+  mutating func next() -> Base.Element? {
+    guard _fastPath(!_expired) else { return nil }
+    let x = _base.next()
+    // We don't need this check if it's a precondition that the sentinel will be
+    // found
+    // guard _fastPath(x != nil), let y = x else { return x }
+    guard _fastPath(!_isSentinel.apply(x!)) else { _expired = true; return nil }
+    return x
+  }
+}
+
+struct _SentinelCollection<
+  Base: Collection, 
+  IsSentinel : _Predicate
+> : Collection
+where IsSentinel.Input == Base.Iterator.Element {
+  let _isSentinel: IsSentinel
+  var _base : Base
+  
+  typealias IndexDistance = Base.IndexDistance
+
+  func makeIterator() -> _SentinelIterator<Base.Iterator, IsSentinel> {
+    return _SentinelIterator(_base.makeIterator(), until: _isSentinel)
+  }
+  
+  struct Index : Comparable {
+    var _impl: (position: Base.Index, element: Base.Iterator.Element)?
+
+    static func == (lhs: Index, rhs: Index) -> Bool {
+      if rhs._impl == nil { return lhs._impl == nil }
+      return lhs._impl != nil && rhs._impl!.position == lhs._impl!.position
+    }
+
+    static func < (lhs: Index, rhs: Index) -> Bool {
+      if rhs._impl == nil { return lhs._impl != nil }
+      return lhs._impl != nil && rhs._impl!.position < lhs._impl!.position
+    }
+  }
+
+  var startIndex : Index {
+    return _index(at: _base.startIndex)
+  }
+  
+  var endIndex : Index {
+    return Index(_impl: nil)
+  }
+
+  subscript(i: Index) -> Base.Iterator.Element {
+    return i._impl!.element
+  }
+
+  func index(after i: Index) -> Index {
+    return _index(at: _base.index(after: i._impl!.position))
+  }
+
+  func _index(at i: Base.Index) -> Index {
+    // We don't need this check if it's a precondition that the sentinel will be
+    // found
+    // guard _fastPath(i != _base.endIndex) else { return endIndex }
+    let e = _base[i]
+    guard _fastPath(!_isSentinel.apply(e)) else { return endIndex }
+    return Index(_impl: (position: i, element: e))
+  }
+  
+  init(_ base: Base, until condition: IsSentinel) {
+    _base = base
+    _isSentinel = condition
+  }
+}
+
+struct _IsZero<T : BinaryInteger> : _Predicate {
+  func apply(_ x: T) -> Bool {
+    return x == 0
+  }
+}
diff --git a/stdlib/public/core/SequenceAlgorithms.swift.gyb b/stdlib/public/core/SequenceAlgorithms.swift.gyb
index a5b99de..2bf2f53 100644
--- a/stdlib/public/core/SequenceAlgorithms.swift.gyb
+++ b/stdlib/public/core/SequenceAlgorithms.swift.gyb
@@ -721,6 +721,16 @@
   public func flatMap<ElementOfResult>(
     _ transform: (${GElement}) throws -> ElementOfResult?
   ) rethrows -> [ElementOfResult] {
+    return try _flatMap(transform)
+  }
+
+  // The implementation of flatMap accepting a closure with an optional result.
+  // Factored out into a separate functions in order to be used in multiple
+  // overloads.
+  @inline(__always)
+  public func _flatMap<ElementOfResult>(
+    _ transform: (${GElement}) throws -> ElementOfResult?
+  ) rethrows -> [ElementOfResult] {
     var result: [ElementOfResult] = []
     for element in self {
       if let newElement = try transform(element) {
@@ -729,13 +739,6 @@
     }
     return result
   }
-
-  @available(*, deprecated, message: "This call uses implicit promotion to optional. Please use map instead.")
-  public func flatMap<T>(
-    _ transform: (${GElement}) throws -> T
-  ) rethrows -> [T] {
-    return try map(transform)
-  }
 }
 
 extension Sequence {
diff --git a/stdlib/public/core/String.swift b/stdlib/public/core/String.swift
index 69219c0..b8ced8e 100644
--- a/stdlib/public/core/String.swift
+++ b/stdlib/public/core/String.swift
@@ -14,18 +14,13 @@
 
 public protocol StringProtocol
   : RangeReplaceableCollection, BidirectionalCollection,
-  CustomStringConvertible, CustomDebugStringConvertible,
+  CustomDebugStringConvertible,
   CustomReflectable, CustomPlaygroundQuickLookable,
   TextOutputStream, TextOutputStreamable,
   LosslessStringConvertible, ExpressibleByStringLiteral,
   Hashable
   where Iterator.Element == Character {
 
-  // this should be just <T : StringProtocol>
-  init<
-    T : LosslessStringConvertible & Sequence
-  >(_ other: T) where T.Iterator.Element == Character
-
   associatedtype UTF8Index
   var utf8: String.UTF8View { get }
   associatedtype UTF16Index
@@ -42,17 +37,188 @@
 
   func lowercased() -> String
   func uppercased() -> String
+
+  /// Constructs a `String` having the same contents as `codeUnits`.
+  ///
+  /// - Parameter codeUnits: a collection of code units in
+  ///   the given `encoding`.
+  /// - Parameter encoding: describes the encoding in which the code units
+  ///   should be interpreted.
+  init<C: Collection, Encoding: UnicodeEncoding>(
+    decoding codeUnits: C, as encoding: Encoding.Type
+  )
+    where C.Iterator.Element == Encoding.CodeUnit
+
+  /// Constructs a `String` having the same contents as `nulTerminatedUTF8`.
+  ///
+  /// - Parameter nulTerminatedUTF8: a sequence of contiguous UTF-8 encoded 
+  ///   bytes ending just before the first zero byte (NUL character).
+  init(cString nulTerminatedUTF8: UnsafePointer<CChar>)
+  
+  /// Constructs a `String` having the same contents as `nulTerminatedCodeUnits`.
+  ///
+  /// - Parameter nulTerminatedCodeUnits: a sequence of contiguous code units in
+  ///   the given `encoding`, ending just before the first zero code unit.
+  /// - Parameter encoding: describes the encoding in which the code units
+  ///   should be interpreted.
+  init<Encoding: UnicodeEncoding>(
+    decodingCString nulTerminatedCodeUnits: UnsafePointer<Encoding.CodeUnit>,
+    as: Encoding.Type)
+    
+  /// Invokes the given closure on the contents of the string, represented as a
+  /// pointer to a null-terminated sequence of UTF-8 code units.
+  func withCString<Result>(
+    _ body: (UnsafePointer<CChar>) throws -> Result) rethrows -> Result
+
+  /// Invokes the given closure on the contents of the string, represented as a
+  /// pointer to a null-terminated sequence of code units in the given encoding.
+  func withCString<Result, Encoding: UnicodeEncoding>(
+    encodedAs: Encoding.Type,
+    _ body: (UnsafePointer<Encoding.CodeUnit>) throws -> Result
+  ) rethrows -> Result
 }
 
-extension StringProtocol {
-  public init<
-    T : LosslessStringConvertible & Sequence
-  >(_ other: T) where T.Iterator.Element == Character {
-    self.init(other.description.characters)
+extension StringProtocol /* : LosslessStringConvertible */ {
+  public init?(_ description: String) {
+    self.init(description.characters)
   }
 }
 
-// FIXME: complexity documentation for most of methods on String is ought to be
+/// Call body with a pointer to zero-terminated sequence of
+/// `TargetEncoding.CodeUnit` representing the same string as `source`, when
+/// `source` is interpreted as being encoded with `SourceEncoding`.
+internal func _withCString<
+  Source : Collection,
+  SourceEncoding : UnicodeEncoding, 
+  TargetEncoding : UnicodeEncoding, 
+  Result
+>(
+  encodedAs targetEncoding: TargetEncoding.Type,
+  from source: Source,
+  encodedAs sourceEncoding: SourceEncoding.Type,
+  execute body : (UnsafePointer<TargetEncoding.CodeUnit>) throws -> Result
+) rethrows -> Result
+where Source.Iterator.Element == SourceEncoding.CodeUnit {
+  return try _withCStringAndLength(
+    encodedAs: targetEncoding,
+    from: source,
+    encodedAs: sourceEncoding) { p, _ in try body(p) }
+}
+
+internal func _withCStringAndLength<
+  Source : Collection,
+  SourceEncoding : UnicodeEncoding, 
+  TargetEncoding : UnicodeEncoding, 
+  Result
+>(
+  encodedAs targetEncoding: TargetEncoding.Type,
+  from source: Source,
+  encodedAs sourceEncoding: SourceEncoding.Type,
+  execute body : (UnsafePointer<TargetEncoding.CodeUnit>, Int) throws -> Result
+) rethrows -> Result
+where Source.Iterator.Element == SourceEncoding.CodeUnit {
+  var targetLength = 0 // nul terminator
+  var i = source.makeIterator()
+  SourceEncoding.ForwardParser._parse(&i) {
+    targetLength += numericCast(
+      targetEncoding._transcode($0, from: SourceEncoding.self).count)
+  }
+  var a: [TargetEncoding.CodeUnit] = []
+  a.reserveCapacity(targetLength + 1)
+  i = source.makeIterator()
+  SourceEncoding.ForwardParser._parse(&i) {
+    a.append(
+      contentsOf: targetEncoding._transcode($0, from: SourceEncoding.self))
+  }
+  a.append(0)
+  return try body(a, targetLength)
+}
+
+extension _StringCore {
+  /// Invokes `body` on a null-terminated sequence of code units in the given
+  /// encoding corresponding to the substring in `bounds`.
+  internal func _withCSubstring<Result, TargetEncoding: UnicodeEncoding>(
+    in bounds: Range<Index>,
+    encoding targetEncoding: TargetEncoding.Type,
+    _ body: (UnsafePointer<TargetEncoding.CodeUnit>) throws -> Result
+  ) rethrows -> Result {
+    return try _withCSubstringAndLength(in: bounds, encoding: targetEncoding) {
+      p,_ in try body(p)
+    }
+  }
+
+  internal func _withCSubstringAndLength<
+    Result, TargetEncoding: UnicodeEncoding
+  >(
+    in bounds: Range<Index>,
+    encoding targetEncoding: TargetEncoding.Type,
+    _ body: (UnsafePointer<TargetEncoding.CodeUnit>, Int) throws -> Result
+  ) rethrows -> Result {
+    if _fastPath(hasContiguousStorage) {
+      defer { _fixLifetime(self) }
+      if isASCII {
+        return try Swift._withCStringAndLength(
+          encodedAs: targetEncoding,
+          from: UnsafeBufferPointer(start: startASCII, count: count)[bounds],
+          encodedAs: _Unicode.ASCII.self,
+          execute: body
+        )
+      }
+      else {
+        return try Swift._withCStringAndLength(
+          encodedAs: targetEncoding,
+          from: UnsafeBufferPointer(start: startUTF16, count: count)[bounds],
+          encodedAs: _Unicode.UTF16.self,
+          execute: body
+        )
+      }
+    }
+    return try Swift._withCStringAndLength(
+      encodedAs: targetEncoding,
+      from: self[bounds],
+      encodedAs: _Unicode.UTF16.self,
+      execute: body
+    )
+  }
+}
+
+extension String {
+  public init<C: Collection, Encoding: UnicodeEncoding>(
+    decoding codeUnits: C, as sourceEncoding: Encoding.Type
+  ) where C.Iterator.Element == Encoding.CodeUnit {
+    let (b,_) = _StringBuffer.fromCodeUnits(
+      codeUnits, encoding: sourceEncoding, repairIllFormedSequences: true)
+    self = String(_StringCore(b!))
+  }
+
+  /// Constructs a `String` having the same contents as `nulTerminatedCodeUnits`.
+  ///
+  /// - Parameter nulTerminatedCodeUnits: a sequence of contiguous code units in
+  ///   the given `encoding`, ending just before the first zero code unit.
+  /// - Parameter encoding: describes the encoding in which the code units
+  ///   should be interpreted.
+  public init<Encoding: UnicodeEncoding>(
+    decodingCString nulTerminatedCodeUnits: UnsafePointer<Encoding.CodeUnit>,
+    as sourceEncoding: Encoding.Type) {
+
+    let codeUnits = _SentinelCollection(
+      UnsafeBufferPointer(_unboundedStartingAt: nulTerminatedCodeUnits),
+      until: _IsZero()
+    )
+    self.init(decoding: codeUnits, as: sourceEncoding)
+  }
+
+  /// Invokes the given closure on the contents of the string, represented as a
+  /// pointer to a null-terminated sequence of code units in the given encoding.
+  public func withCString<Result, TargetEncoding: UnicodeEncoding>(
+    encodedAs targetEncoding: TargetEncoding.Type,
+    _ body: (UnsafePointer<TargetEncoding.CodeUnit>) throws -> Result
+  ) rethrows -> Result {
+    return try _core._withCSubstring(
+      in: _core.startIndex..<_core.endIndex, encoding: targetEncoding, body)
+  }
+}
+// FIXME: complexity documentation for most of methods on String ought to be
 // qualified with "amortized" at least, as Characters are variable-length.
 
 /// A Unicode string value.
@@ -344,23 +510,22 @@
 
 extension String {
   public // @testable
-  static func _fromWellFormedCodeUnitSequence<Encoding, Input>(
+  static func _fromWellFormedCodeUnitSequence<
+    Encoding : UnicodeEncoding, Input : Collection
+  >(
     _ encoding: Encoding.Type, input: Input
   ) -> String
-    where
-    Encoding: UnicodeCodec,
-    Input: Collection,
-    Input.Iterator.Element == Encoding.CodeUnit {
+    where  Input.Iterator.Element == Encoding.CodeUnit {
     return String._fromCodeUnitSequence(encoding, input: input)!
   }
 
   public // @testable
-  static func _fromCodeUnitSequence<Encoding, Input>(
+  static func _fromCodeUnitSequence<
+    Encoding : UnicodeEncoding, Input : Collection
+  >(
     _ encoding: Encoding.Type, input: Input
   ) -> String?
     where
-    Encoding: UnicodeCodec,
-    Input: Collection,
     Input.Iterator.Element == Encoding.CodeUnit {
     let (stringBufferOptional, _) =
         _StringBuffer.fromCodeUnits(input, encoding: encoding,
@@ -369,12 +534,12 @@
   }
 
   public // @testable
-  static func _fromCodeUnitSequenceWithRepair<Encoding, Input>(
+  static func _fromCodeUnitSequenceWithRepair<
+    Encoding : UnicodeEncoding, Input : Collection
+  >(
     _ encoding: Encoding.Type, input: Input
   ) -> (String, hadError: Bool)
     where
-    Encoding: UnicodeCodec,
-    Input: Collection,
     Input.Iterator.Element == Encoding.CodeUnit {
 
     let (stringBuffer, hadError) =
@@ -485,23 +650,21 @@
   /// Returns the number of code units occupied by this string
   /// in the given encoding.
   func _encodedLength<
-    Encoding: UnicodeCodec
+    Encoding: UnicodeEncoding
   >(_ encoding: Encoding.Type) -> Int {
     var codeUnitCount = 0
     self._encode(encoding, into: { _ in codeUnitCount += 1 })
     return codeUnitCount
   }
 
-  // FIXME: this function does not handle the case when a wrapped NSString
+  // FIXME: this function may not handle the case when a wrapped NSString
   // contains unpaired surrogates.  Fix this before exposing this function as a
   // public API.  But it is unclear if it is valid to have such an NSString in
   // the first place.  If it is not, we should not be crashing in an obscure
   // way -- add a test for that.
   // Related: <rdar://problem/17340917> Please document how NSString interacts
   // with unpaired surrogates
-  func _encode<
-    Encoding: UnicodeCodec
-  >(
+  func _encode<Encoding: UnicodeEncoding>(
     _ encoding: Encoding.Type,
     into processCodeUnit: (Encoding.CodeUnit) -> Void
   ) {
@@ -866,12 +1029,6 @@
   }
 }
 
-extension String : LosslessStringConvertible {
-  public init?(_ description: String) {
-    self = description
-  }
-}
-
 extension String {
   @available(*, unavailable, renamed: "append(_:)")
   public mutating func appendContentsOf(_ other: String) {
diff --git a/stdlib/public/core/StringBuffer.swift b/stdlib/public/core/StringBuffer.swift
index 8ac18fc..2665c83 100644
--- a/stdlib/public/core/StringBuffer.swift
+++ b/stdlib/public/core/StringBuffer.swift
@@ -91,14 +91,11 @@
       = ((_storage._capacity() - capacityBump) &<< 1) + elementShift
   }
 
-  static func fromCodeUnits<Input, Encoding>(
+  static func fromCodeUnits<Input : Sequence, Encoding : UnicodeEncoding>(
     _ input: Input, encoding: Encoding.Type, repairIllFormedSequences: Bool,
     minimumCapacity: Int = 0
   ) -> (_StringBuffer?, hadError: Bool)
-    where
-    Input : Collection, // Sequence?
-    Encoding : UnicodeCodec,
-    Input.Iterator.Element == Encoding.CodeUnit {
+    where Input.Iterator.Element == Encoding.CodeUnit {
     // Determine how many UTF-16 code units we'll need
     let inputStream = input.makeIterator()
     guard let (utf16Count, isAscii) = UTF16.transcodedLength(
diff --git a/stdlib/public/core/StringCharacterView.swift b/stdlib/public/core/StringCharacterView.swift
index 8b78ad5..1201400 100644
--- a/stdlib/public/core/StringCharacterView.swift
+++ b/stdlib/public/core/StringCharacterView.swift
@@ -439,6 +439,29 @@
   /// - Parameter position: A valid index of the character view. `position`
   ///   must be less than the view's end index.
   public subscript(i: Index) -> Character {
+    if i._countUTF16 == 1 {
+      // For single-code-unit graphemes, we can construct a Character directly
+      // from a single unicode scalar (if sub-surrogate).
+      let relativeOffset = i._base._position - _coreOffset
+      if _core.isASCII {
+        let asciiBuffer = _core.asciiBuffer._unsafelyUnwrappedUnchecked
+        // Bounds checks in an UnsafeBufferPointer (asciiBuffer) are only
+        // performed in Debug mode, so they need to be duplicated here.
+        // Falling back to the non-optimal behavior in the case they don't
+        // pass.
+        if relativeOffset >= asciiBuffer.startIndex &&
+          relativeOffset < asciiBuffer.endIndex {
+          return Character(UnicodeScalar(asciiBuffer[relativeOffset]))
+        }
+      } else if _core._baseAddress != nil {
+        let cu = _core._nthContiguous(relativeOffset)
+        // Only constructible if sub-surrogate
+        if (cu < 0xd800) {
+          return Character(UnicodeScalar(cu)._unsafelyUnwrappedUnchecked)
+        }
+      }
+    }
+
     return Character(String(unicodeScalars[i._base..<i._endBase]))
   }
 }
diff --git a/stdlib/public/core/StringComparable.swift b/stdlib/public/core/StringComparable.swift
index ddbbdcf..74bbcc6 100644
--- a/stdlib/public/core/StringComparable.swift
+++ b/stdlib/public/core/StringComparable.swift
@@ -120,6 +120,7 @@
 }
 
 extension String : Equatable {
+  @inline(__always)
   public static func == (lhs: String, rhs: String) -> Bool {
 #if _runtime(_ObjC)
     // We only want to perform this optimization on objc runtimes. Elsewhere,
diff --git a/stdlib/public/core/StringCore.swift b/stdlib/public/core/StringCore.swift
index cd6ddb6..862a46a 100644
--- a/stdlib/public/core/StringCore.swift
+++ b/stdlib/public/core/StringCore.swift
@@ -336,32 +336,60 @@
     }
   }
 
+  var _unmanagedASCII : UnsafeBufferPointer<_Unicode.ASCII.CodeUnit>? {
+    @inline(__always)
+    get {
+      guard _fastPath(_baseAddress != nil && elementWidth == 1) else {
+        return nil
+      }
+      return UnsafeBufferPointer(
+        start: _baseAddress!.assumingMemoryBound(
+          to: _Unicode.ASCII.CodeUnit.self),
+        count: count
+      )
+    }
+  }
+  
+  var _unmanagedUTF16 : UnsafeBufferPointer<UTF16.CodeUnit>? {
+    @inline(__always)
+    get {
+      guard _fastPath(_baseAddress != nil && elementWidth != 1) else {
+        return nil
+      }
+      return UnsafeBufferPointer(
+        start: _baseAddress!.assumingMemoryBound(to: UTF16.CodeUnit.self),
+        count: count
+      )
+    }
+  }
+  
   /// Write the string, in the given encoding, to output.
-  func encode<Encoding: UnicodeCodec>(
+  func encode<Encoding: UnicodeEncoding>(
     _ encoding: Encoding.Type,
     into processCodeUnit: (Encoding.CodeUnit) -> Void)
   {
-    if _fastPath(_baseAddress != nil) {
-      if _fastPath(elementWidth == 1) {
-        for x in UnsafeBufferPointer(
-          start: _baseAddress!.assumingMemoryBound(to: UTF8.CodeUnit.self),
-          count: count
-        ) {
-          Encoding.encode(UnicodeScalar(x), into: processCodeUnit)
+    defer { _fixLifetime(self) }
+    if let bytes = _unmanagedASCII {
+      if encoding == _Unicode.ASCII.self
+      || encoding == _Unicode.UTF8.self
+      || encoding == _Unicode.UTF16.self
+      || encoding == _Unicode.UTF32.self {
+        bytes.forEach {
+          processCodeUnit(Encoding.CodeUnit(extendingOrTruncating: $0))
         }
       }
       else {
-        let hadError = transcode(
-          UnsafeBufferPointer(
-            start: _baseAddress!.assumingMemoryBound(to: UTF16.CodeUnit.self),
-            count: count
-          ).makeIterator(),
-          from: UTF16.self,
-          to: encoding,
-          stoppingOnError: true,
-          into: processCodeUnit
-        )
-        _sanityCheck(!hadError, "Swift.String with native storage should not have unpaired surrogates")
+        // TODO: be sure tests exercise this code path.
+        for b in bytes {
+          Encoding._encode(
+            UnicodeScalar(_unchecked: UInt32(b))).forEach(processCodeUnit)
+        }
+      }
+    }
+    else if let content = _unmanagedUTF16 {
+      var i = content.makeIterator()
+      _Unicode.UTF16.ForwardParser._parse(&i) {
+        Encoding._transcode($0, from: UTF16.self).forEach(processCodeUnit)
       }
     }
     else if hasCocoaBuffer {
diff --git a/stdlib/public/core/StringHashable.swift b/stdlib/public/core/StringHashable.swift
index 6cec11d..c3c9115 100644
--- a/stdlib/public/core/StringHashable.swift
+++ b/stdlib/public/core/StringHashable.swift
@@ -18,6 +18,9 @@
 
 @_silgen_name("swift_stdlib_NSStringHashValuePointer")
 func _stdlib_NSStringHashValuePointer(_ str: OpaquePointer, _ isASCII: Bool) -> Int
+
+@_silgen_name("swift_stdlib_CFStringHashCString")
+func _stdlib_CFStringHashCString(_ str: OpaquePointer, _ len: Int) -> Int
 #endif
 
 extension _Unicode {
@@ -64,12 +67,9 @@
   }
 }
 
-extension String : Hashable {
-  /// The string's hash value.
-  ///
-  /// Hash values are not guaranteed to be equal across different executions of
-  /// your program. Do not save hash values to use during a future execution.
-  public var hashValue: Int {
+@inline(never) @_semantics("stdlib_binary_only") // Hide the CF dependency
+internal func _hashString(_ string: String) -> Int {
+  let core = string._core
 #if _runtime(_ObjC)
     // Mix random bits into NSString's hash so that clients don't rely on
     // Swift.String.hashValue and NSString.hash being the same.
@@ -78,29 +78,43 @@
 #else
     let hashOffset = Int(bitPattern: 0x429b_1266_88dd_cc21)
 #endif
-    // If we have a contiguous string then we can use the stack optimization.
-    let core = self._core
-    let isASCII = core.isASCII
-    if core.hasContiguousStorage {
+  // If we have a contiguous string then we can use the stack optimization.
+  let isASCII = core.isASCII
+  if core.hasContiguousStorage {
+    if isASCII {
+      return hashOffset ^ _stdlib_CFStringHashCString(
+                              OpaquePointer(core.startASCII), core.count)
+    } else {
       let stackAllocated = _NSContiguousString(core)
       return hashOffset ^ stackAllocated._unsafeWithNotEscapedSelfPointer {
-        return _stdlib_NSStringHashValuePointer($0, isASCII)
+        return _stdlib_NSStringHashValuePointer($0, false)
       }
-    } else {
-      let cocoaString = unsafeBitCast(
-        self._bridgeToObjectiveCImpl(), to: _NSStringCore.self)
-      return hashOffset ^ _stdlib_NSStringHashValue(cocoaString, isASCII)
     }
+  } else {
+    let cocoaString = unsafeBitCast(
+      string._bridgeToObjectiveCImpl(), to: _NSStringCore.self)
+    return hashOffset ^ _stdlib_NSStringHashValue(cocoaString, isASCII)
+  }
 #else
-    if let asciiBuffer = self._core.asciiBuffer {
-      return _Unicode.hashASCII(UnsafeBufferPointer(
-        start: asciiBuffer.baseAddress!,
-        count: asciiBuffer.count))
-    } else {
-      return _Unicode.hashUTF16(
-        UnsafeBufferPointer(start: _core.startUTF16, count: _core.count))
-    }
+  if let asciiBuffer = core.asciiBuffer {
+    return _Unicode.hashASCII(UnsafeBufferPointer(
+      start: asciiBuffer.baseAddress!,
+      count: asciiBuffer.count))
+  } else {
+    return _Unicode.hashUTF16(
+      UnsafeBufferPointer(start: core.startUTF16, count: core.count))
+  }
 #endif
+}
+
+
+extension String : Hashable {
+  /// The string's hash value.
+  ///
+  /// Hash values are not guaranteed to be equal across different executions of
+  /// your program. Do not save hash values to use during a future execution.
+  public var hashValue: Int {
+    return _hashString(self)
   }
 }
 
diff --git a/stdlib/public/core/StringRangeReplaceableCollection.swift.gyb b/stdlib/public/core/StringRangeReplaceableCollection.swift.gyb
index abec712..1a3de08 100644
--- a/stdlib/public/core/StringRangeReplaceableCollection.swift.gyb
+++ b/stdlib/public/core/StringRangeReplaceableCollection.swift.gyb
@@ -41,11 +41,8 @@
   // - init<S>(_ characters: S) where S : Sequence, S.Iterator.Element == Character
   // Cannot simply do init(_: String) as that would itself be ambiguous with
   // init?(_ description: String)
-  public init<
-    T : LosslessStringConvertible & Sequence
-  >(_ other: T)
-  where T.Iterator.Element == Character {
-    self = other.description
+  public init(_ other: String) {
+    self.init(other._core)
   }
 
   /// The position of the first character in a nonempty string.
@@ -383,6 +380,35 @@
   }
 }
 
+//===----------------------------------------------------------------------===//
+// The following overloads of flatMap are carefully crafted to allow the code
+// like the following:
+//   ["hello"].flatMap { $0 }
+// return an array of strings without any type context in Swift 3 mode, at the
+// same time allowing the following code snippet to compile:
+//   [0, 1].flatMap { x in
+//     if String(x) == "foo" { return "bar" } else { return nil }
+//   }
+// Note that the second overload is delcared on a more specific protocol.
+// See: test/stdlib/StringFlatMap.swift for tests.
+extension Sequence {
+  @available(swift, obsoleted: 4)
+  public func flatMap(
+    _ transform: (Iterator.Element) throws -> String
+  ) rethrows -> [String] {
+    return try map(transform)
+  }
+}
+
+extension Collection {
+  public func flatMap(
+    _ transform: (Iterator.Element) throws -> String?
+  ) rethrows -> [String] {
+    return try _flatMap(transform)
+  }
+}
+//===----------------------------------------------------------------------===//
+
 extension String {
   @available(*, unavailable, message: "Operator '+' cannot be used to append a String to a sequence of strings")
   public static func + <S : Sequence>(lhs: S, rhs: String) -> Never
diff --git a/stdlib/public/core/StringUTF8.swift b/stdlib/public/core/StringUTF8.swift
index 70c754c..6857a1a 100644
--- a/stdlib/public/core/StringUTF8.swift
+++ b/stdlib/public/core/StringUTF8.swift
@@ -32,6 +32,7 @@
   /// and the second element contains the encoded UTF-8 starting in its
   /// low byte.  Any unused high bytes in the result will be set to
   /// 0xFF.
+  @inline(__always)
   func _encodeSomeUTF8(from i: Int) -> (Int, _UTF8Chunk) {
     _sanityCheck(i <= count)
 
diff --git a/stdlib/public/core/Substring.swift.gyb b/stdlib/public/core/Substring.swift.gyb
index aadd9a6..48c16b5 100644
--- a/stdlib/public/core/Substring.swift.gyb
+++ b/stdlib/public/core/Substring.swift.gyb
@@ -32,7 +32,9 @@
     _slice = RangeReplaceableBidirectionalSlice(base: base, bounds: bounds)
   }
 
-  internal init<R: RangeExpression>(_base base: String, _ bounds: R) where R.Bound == Index {
+  internal init<R: RangeExpression>(
+    _base base: String, _ bounds: R
+  ) where R.Bound == Index {
     self.init(_base: base, bounds.relative(to: base))
   }
 
@@ -57,7 +59,7 @@
     let result = _slice.index(i, offsetBy: n)
     // FIXME(strings): slice types currently lack necessary bound checks
     _precondition(
-      (_slice._startIndex ..< _slice.endIndex).contains(result),
+      (_slice._startIndex ... _slice.endIndex).contains(result),
       "Operation results in an invalid index")
     return result
   }
@@ -68,7 +70,7 @@
     let result = _slice.index(i, offsetBy: n, limitedBy: limit)
     // FIXME(strings): slice types currently lack necessary bound checks
     _precondition(result.map {
-        (_slice._startIndex ..< _slice.endIndex).contains($0)
+        (_slice._startIndex ... _slice.endIndex).contains($0)
       } ?? true,
       "Operation results in an invalid index")
     return result
@@ -99,6 +101,54 @@
   }
 
 % end
+
+  public init<C: Collection, Encoding: UnicodeEncoding>(
+    decoding codeUnits: C, as sourceEncoding: Encoding.Type
+  ) where C.Iterator.Element == Encoding.CodeUnit {
+    self.init(String(decoding: codeUnits, as: sourceEncoding))
+  }
+
+  public init(cString nulTerminatedUTF8: UnsafePointer<CChar>) {
+    self.init(String(cString: nulTerminatedUTF8))
+  }
+  
+  /// Constructs a `String` having the same contents as `nulTerminatedCodeUnits`.
+  ///
+  /// - Parameter nulTerminatedCodeUnits: a sequence of contiguous code units in
+  ///   the given `encoding`, ending just before the first zero code unit.
+  /// - Parameter encoding: describes the encoding in which the code units
+  ///   should be interpreted.
+  public init<Encoding: UnicodeEncoding>(
+    decodingCString nulTerminatedCodeUnits: UnsafePointer<Encoding.CodeUnit>,
+    as targetEncoding: Encoding.Type
+  ) {
+    self.init(
+      String(decodingCString: nulTerminatedCodeUnits, as: targetEncoding))
+  }
+    
+  /// Invokes the given closure on the contents of the string, represented as a
+  /// pointer to a null-terminated sequence of UTF-8 code units.
+  public func withCString<Result>(
+    _ body: (UnsafePointer<CChar>) throws -> Result) rethrows -> Result {
+    return try _slice._base._core._withCSubstringAndLength(
+      in: startIndex._base._position..<endIndex._base._position,
+      encoding: UTF8.self) {
+      p, length in try p.withMemoryRebound(to: CChar.self, capacity: length) {
+        try body($0)
+      }
+    }
+  }
+
+  /// Invokes the given closure on the contents of the string, represented as a
+  /// pointer to a null-terminated sequence of code units in the given encoding.
+  public func withCString<Result, TargetEncoding: UnicodeEncoding>(
+    encodedAs targetEncoding: TargetEncoding.Type,
+    _ body: (UnsafePointer<TargetEncoding.CodeUnit>) throws -> Result
+  ) rethrows -> Result {
+    return try _slice._base._core._withCSubstring(
+      in: startIndex._base._position..<endIndex._base._position,
+      encoding: targetEncoding, body)
+  }
 }
 
 
@@ -127,8 +177,8 @@
 }
 
 extension Substring : LosslessStringConvertible {
-  public init?(_ description: String) {
-    self.init(_base: description, description.startIndex ..< description.endIndex)
+  public init(_ content: String) {
+    self.init(_base: content, content.startIndex ..< content.endIndex)
   }
 }
 
diff --git a/stdlib/public/core/UIntBuffer.swift b/stdlib/public/core/UIntBuffer.swift
index ae809a6..7721d04 100644
--- a/stdlib/public/core/UIntBuffer.swift
+++ b/stdlib/public/core/UIntBuffer.swift
@@ -1,4 +1,4 @@
-//===--- UIntBuffer.swift - Bounded Collection of Unisigned Integer -------===//
+//===--- UIntBuffer.swift - Bounded Collection of Unsigned Integer --------===//
 //
 // This source file is part of the Swift.org open source project
 //
diff --git a/stdlib/public/core/UTF16.swift b/stdlib/public/core/UTF16.swift
index b8eaaee..265340f 100644
--- a/stdlib/public/core/UTF16.swift
+++ b/stdlib/public/core/UTF16.swift
@@ -9,7 +9,14 @@
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 //
 //===----------------------------------------------------------------------===//
+extension _Unicode {
+  public enum UTF16 {
+  case _swift3Buffer(_Unicode.UTF16.ForwardParser)
+  }
+}
+
 extension _Unicode.UTF16 : UnicodeEncoding {
+  public typealias CodeUnit = UInt16
   public typealias EncodedScalar = _UIntBuffer<UInt32, UInt16>
 
   public static var encodedReplacementCharacter : EncodedScalar {
@@ -30,17 +37,62 @@
     return UnicodeScalar(_unchecked: value)
   }
 
-  public static func encode(_ source: UnicodeScalar) -> EncodedScalar {
+  public static func encode(
+    _ source: UnicodeScalar
+  ) -> EncodedScalar? {
     let x = source.value
     if _fastPath(x < (1 << 16)) {
       return EncodedScalar(_storage: x, _bitCount: 16)
     }
     let x1 = x - (1 << 16)
     var r = (0xdc00 + (x1 & 0x3ff))
-    r <<= 16
-    r |= (0xd800 + (x1 >> 10 & 0x3ff))
+    r &<<= 16
+    r |= (0xd800 + (x1 &>> 10 & 0x3ff))
     return EncodedScalar(_storage: r, _bitCount: 32)
   }
+
+  @inline(__always)
+  public static func transcode<FromEncoding : UnicodeEncoding>(
+    _ content: FromEncoding.EncodedScalar, from _: FromEncoding.Type
+  ) -> EncodedScalar? {
+    if _fastPath(FromEncoding.self == UTF8.self) {
+      let c = unsafeBitCast(content, to: UTF8.EncodedScalar.self)
+      var b = c._bitCount
+      b = b &- 8
+      if _fastPath(b == 0) {
+        return EncodedScalar(
+          _storage: c._storage & 0b0__111_1111, _bitCount: 16)
+      }
+      var s = c._storage
+      var r = s
+      r &<<= 6
+      s &>>= 8
+      r |= s & 0b0__11_1111
+      b = b &- 8
+      
+      if _fastPath(b == 0) {
+        return EncodedScalar(_storage: r & 0b0__111_1111_1111, _bitCount: 16)
+      }
+      r &<<= 6
+      s &>>= 8
+      r |= s & 0b0__11_1111
+      b = b &- 8
+      
+      if _fastPath(b == 0) {
+        return EncodedScalar(_storage: r & 0xFFFF, _bitCount: 16)
+      }
+      
+      r &<<= 6
+      s &>>= 8
+      r |= s & 0b0__11_1111
+      r &= (1 &<< 21) - 1
+      return encode(UnicodeScalar(_unchecked: r))
+    }
+    else if _fastPath(FromEncoding.self == UTF16.self) {
+      return unsafeBitCast(content, to: UTF16.EncodedScalar.self)
+    }
+    return encode(FromEncoding.decode(content))
+  }
   
   public struct ForwardParser {
     public typealias _Buffer = _UIntBuffer<UInt32, UInt16>
diff --git a/stdlib/public/core/UTF32.swift b/stdlib/public/core/UTF32.swift
new file mode 100644
index 0000000..7d67f68
--- /dev/null
+++ b/stdlib/public/core/UTF32.swift
@@ -0,0 +1,70 @@
+//===--- UTF32.swift ------------------------------------------------------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+extension _Unicode {
+  public enum UTF32 {
+  case _swift3Codec
+  }
+}
+
+extension _Unicode.UTF32 : UnicodeEncoding {
+  public typealias CodeUnit = UInt32
+  public typealias EncodedScalar = CollectionOfOne<UInt32>
+
+  public static var encodedReplacementCharacter : EncodedScalar {
+    return EncodedScalar(0xFFFD)
+  }
+
+  @inline(__always)
+  public static func _isScalar(_ x: CodeUnit) -> Bool  {
+    return true
+  }
+
+  @inline(__always)
+  public static func decode(_ source: EncodedScalar) -> UnicodeScalar {
+    return UnicodeScalar(_unchecked: source.first!)
+  }
+
+  @inline(__always)
+  public static func encode(
+    _ source: UnicodeScalar
+  ) -> EncodedScalar? {
+    return EncodedScalar(source.value)
+  }
+  
+  public struct Parser {
+    public init() { }
+  }
+  
+  public typealias ForwardParser = Parser
+  public typealias ReverseParser = Parser
+}
+
+extension UTF32.Parser : UnicodeParser {
+  public typealias Encoding = _Unicode.UTF32
+
+  /// Parses a single Unicode scalar value from `input`.
+  public mutating func parseScalar<I : IteratorProtocol>(
+    from input: inout I
+  ) -> _Unicode.ParseResult<Encoding.EncodedScalar>
+  where I.Element == Encoding.CodeUnit {
+    let n = input.next()
+    if _fastPath(n != nil), let x = n {
+      // Check code unit is valid: not surrogate-reserved and within range.
+      guard _fastPath((x &>> 11) != 0b1101_1 && x <= 0x10ffff)
+      else { return .error(length: 1) }
+      
+      // x is a valid scalar.
+      return .valid(UTF32.EncodedScalar(x))
+    }
+    return .emptyInput
+  }
+}
diff --git a/stdlib/public/core/UTF8.swift b/stdlib/public/core/UTF8.swift
index e9f3a60..22d1f27 100644
--- a/stdlib/public/core/UTF8.swift
+++ b/stdlib/public/core/UTF8.swift
@@ -9,17 +9,29 @@
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 //
 //===----------------------------------------------------------------------===//
+extension _Unicode {
+  @_fixed_layout
+  public enum UTF8 {
+  case _swift3Buffer(_Unicode.UTF8.ForwardParser)
+  }
+}
+
 extension _Unicode.UTF8 : UnicodeEncoding {
+  public typealias CodeUnit = UInt8
   public typealias EncodedScalar = _UIntBuffer<UInt32, UInt8>
 
   public static var encodedReplacementCharacter : EncodedScalar {
     return EncodedScalar(_storage: 0xbdbfef, _bitCount: 24)
   }
 
+  @inline(__always)
+  @_inlineable
   public static func _isScalar(_ x: CodeUnit) -> Bool {
     return x & 0x80 == 0
   }
 
+  @inline(__always)
+  @_inlineable
   public static func decode(_ source: EncodedScalar) -> UnicodeScalar {
     let bits = source._storage
     switch source._bitCount {
@@ -44,42 +56,85 @@
     }
   }
   
-  public static func encode(_ source: UnicodeScalar) -> EncodedScalar {
-    let x = source.value
-    if _fastPath(x < (1 << 7)) {
-      return EncodedScalar(_storage: x, _bitCount: 8)
+  @inline(__always)
+  @_inlineable
+  public static func encode(
+    _ source: UnicodeScalar
+  ) -> EncodedScalar? {
+    var c = source.value
+    if _fastPath(c < (1&<<7)) {
+      return EncodedScalar(_storage: c, _bitCount: 8)
     }
-    else if _fastPath(x < (1 << 11)) {
-      var r = x &>> 6
-      r |= (x & 0b11_1111) &<< 8
-      r |= 0b1000_0000__1100_0000
-      return EncodedScalar(_storage: r, _bitCount: 2*8)
+    var o = c & 0b0__0011_1111
+    c &>>= 6
+    o &<<= 8
+    if _fastPath(c < (1&<<5)) {
+      return EncodedScalar(
+        _storage: o | c | 0b0__1000_0000__1100_0000, _bitCount: 16)
     }
-    else if _fastPath(x < (1 << 16)) {
-      var r = x &>> 12
-      r |= (x & 0b1111__1100_0000) &<< 2
-      r |= (x & 0b11_1111) &<< 16
-      r |= 0b1000_0000__1000_0000__1110_0000
-      return EncodedScalar(_storage:  r, _bitCount: 3*8)
+    o |= c & 0b0__0011_1111
+    c &>>= 6
+    o &<<= 8
+    if _fastPath(c < (1&<<4)) {
+      return EncodedScalar(
+        _storage: o | c | 0b0__1000_0000__1000_0000__1110_0000, _bitCount: 24)
     }
-    else {
-      var r = x &>> 18
-      r |= (x & 0b11__1111_0000__0000_0000) &>> 4
-      r |= (x & 0b1111__1100_0000) &<< 10
-      r |= (x & 0b11_1111) << 24
-      r |= 0b1000_0000__1000_0000__1000_0000__1111_0000
-      return EncodedScalar(_storage: r, _bitCount: 4*8)
-    }
+    o |= c & 0b0__0011_1111
+    c &>>= 6
+    o &<<= 8
+    return EncodedScalar(
+      _storage: o | c | 0b0__1000_0000__1000_0000__1000_0000__1111_0000,
+      _bitCount: 32)
   }
-  
+
+  @inline(__always)
+  public static func transcode<FromEncoding : UnicodeEncoding>(
+    _ content: FromEncoding.EncodedScalar, from _: FromEncoding.Type
+  ) -> EncodedScalar? {
+    if _fastPath(FromEncoding.self == UTF16.self) {
+      let c = unsafeBitCast(content, to: UTF16.EncodedScalar.self)
+      var u0 = UInt16(extendingOrTruncating: c._storage) 
+      if _fastPath(u0 < 0x80) {
+        return EncodedScalar(containing: UInt8(extendingOrTruncating: u0))
+      }
+      var r = UInt32(u0 & 0b0__11_1111)
+      r &<<= 8
+      u0 &>>= 6
+      if _fastPath(u0 < (1&<<5)) {
+        return EncodedScalar(
+          _storage: UInt32(u0) | r | 0b0__1000_0000__1100_0000,
+          _bitCount: 16)
+      }
+      r |= UInt32(u0 & 0b0__11_1111)
+      r &<<= 8
+      if _fastPath(u0 & (0xF800 &>> 6) != (0xD800 &>> 6)) {
+        u0 &>>= 6
+        return EncodedScalar(
+          _storage: UInt32(u0)
+            | r | 0b0__1000_0000__1000_0000__1000_0000__1110_0000,
+          _bitCount: 24)
+      }
+    }
+    else if _fastPath(FromEncoding.self == UTF8.self) {
+      return unsafeBitCast(content, to: UTF8.EncodedScalar.self)
+    }
+    return encode(FromEncoding.decode(content))
+  }
+
+  @_fixed_layout
   public struct ForwardParser {
     public typealias _Buffer = _UIntBuffer<UInt32, UInt8>
+    @inline(__always)
+    @_inlineable
     public init() { _buffer = _Buffer() }
     public var _buffer: _Buffer
   }
   
+  @_fixed_layout
   public struct ReverseParser {
     public typealias _Buffer = _UIntBuffer<UInt32, UInt8>
+    @inline(__always)
+    @_inlineable
     public init() { _buffer = _Buffer() }
     public var _buffer: _Buffer
   }
@@ -87,7 +142,8 @@
 
 extension UTF8.ReverseParser : UnicodeParser, _UTFParser {
   public typealias Encoding = _Unicode.UTF8
-
+  @inline(__always)
+  @_inlineable
   public func _parseMultipleCodeUnits() -> (isValid: Bool, bitCount: UInt8) {
     _sanityCheck(_buffer._storage & 0x80 != 0) // this case handled elsewhere
     if _buffer._storage                & 0b0__1110_0000__1100_0000
@@ -122,6 +178,7 @@
   /// Returns the length of the invalid sequence that ends with the LSB of
   /// buffer.
   @inline(never)
+  @_versioned
   func _invalidLength() -> UInt8 {
     if _buffer._storage                 & 0b0__1111_0000__1100_0000
                                        == 0b0__1110_0000__1000_0000 {
@@ -150,6 +207,8 @@
     return 1
   }
   
+  @inline(__always)
+  @_inlineable
   public func _bufferedScalar(bitCount: UInt8) -> Encoding.EncodedScalar {
     return Encoding.EncodedScalar(
       _storage: _buffer._storage.byteSwapped &>> (32 - bitCount),
@@ -160,7 +219,9 @@
 
 extension _Unicode.UTF8.ForwardParser : UnicodeParser, _UTFParser {
   public typealias Encoding = _Unicode.UTF8
-  
+
+  @inline(__always)
+  @_inlineable
   public func _parseMultipleCodeUnits() -> (isValid: Bool, bitCount: UInt8) {
     _sanityCheck(_buffer._storage & 0x80 != 0) // this case handled elsewhere
     
@@ -195,6 +256,7 @@
   /// Returns the length of the invalid sequence that starts with the LSB of
   /// buffer.
   @inline(never)
+  @_versioned
   func _invalidLength() -> UInt8 {
     if _buffer._storage               & 0b0__1100_0000__1111_0000
                                      == 0b0__1000_0000__1110_0000 {
diff --git a/stdlib/public/core/UTFEncoding.swift b/stdlib/public/core/UTFEncoding.swift
index cfefd2e..d124200 100644
--- a/stdlib/public/core/UTFEncoding.swift
+++ b/stdlib/public/core/UTFEncoding.swift
@@ -27,7 +27,8 @@
 
 extension _UTFParser
 where Encoding.EncodedScalar == _UIntBuffer<UInt32, Encoding.CodeUnit> {
-  
+
+  @inline(__always)
   public mutating func parseScalar<I : IteratorProtocol>(
     from input: inout I
   ) -> _Unicode.ParseResult<Encoding.EncodedScalar>
@@ -80,7 +81,7 @@
     if _fastPath(isValid) {
       return .valid(encodedScalar)
     }
-    return .invalid(
+    return .error(
       length: Int(scalarBitCount / numericCast(Encoding.CodeUnit.bitWidth)))
   }
 }
diff --git a/stdlib/public/core/Unicode.swift b/stdlib/public/core/Unicode.swift
index c9b7596..9b1909b 100644
--- a/stdlib/public/core/Unicode.swift
+++ b/stdlib/public/core/Unicode.swift
@@ -61,10 +61,7 @@
 /// decoded Unicode scalar values.
 ///
 /// - SeeAlso: `UTF8`, `UTF16`, `UTF32`, `UnicodeScalar`
-public protocol UnicodeCodec {
-
-  /// A type that can hold code unit values for this encoding.
-  associatedtype CodeUnit
+public protocol UnicodeCodec : UnicodeEncoding {
 
   /// Creates an instance of the codec.
   init()
@@ -145,24 +142,9 @@
 
 /// A codec for translating between Unicode scalar values and UTF-8 code
 /// units.
-public struct UTF8 : UnicodeCodec {
-  // See Unicode 8.0.0, Ch 3.9, UTF-8.
-  // http://www.unicode.org/versions/Unicode8.0.0/ch03.pdf
-
-  /// A type that can hold code unit values for this encoding.
-  public typealias CodeUnit = UInt8
-
+extension _Unicode.UTF8 : UnicodeCodec {
   /// Creates an instance of the UTF-8 codec.
-  public init() {}
-
-  /// Lookahead buffer used for UTF-8 decoding.  New bytes are inserted at MSB,
-  /// and bytes are read at LSB.  Note that we need to use a buffer, because
-  /// in case of invalid subsequences we sometimes don't know whether we should
-  /// consume a certain byte before looking at it.
-  internal var _decodeBuffer: UInt32 = 0
-
-  /// The number of bits in `_decodeBuffer` that are current filled.
-  internal var _bitsInBuffer: UInt8 = 0
+  public init() { self = ._swift3Buffer(ForwardParser()) }
 
   /// Starts or continues decoding a UTF-8 sequence.
   ///
@@ -205,63 +187,20 @@
   /// - Returns: A `UnicodeDecodingResult` instance, representing the next
   ///   Unicode scalar, an indication of an error, or an indication that the
   ///   UTF sequence has been fully decoded.
+  @inline(__always)
   public mutating func decode<I : IteratorProtocol>(
     _ input: inout I
   ) -> UnicodeDecodingResult where I.Element == CodeUnit {
-
-    // Bufferless ASCII fastpath.
-    if _fastPath(_bitsInBuffer == 0) {
-      guard let codeUnit = input.next() else { return .emptyInput }
-      // ASCII, return immediately.
-      if codeUnit & 0x80 == 0 {
-        return .scalarValue(UnicodeScalar(
-          _unchecked: UInt32(extendingOrTruncating: codeUnit)))
-      }
-      // Non-ASCII, proceed to buffering mode.
-      _decodeBuffer = UInt32(extendingOrTruncating: codeUnit)
-      _bitsInBuffer = 8
-    } else if _decodeBuffer & 0x80 == 0 {
-      // ASCII in buffer.  We don't refill the buffer so we can return
-      // to bufferless mode once we've exhausted it.
-      let codeUnit = _decodeBuffer & 0xff
-      _decodeBuffer &>>= 8
-      _bitsInBuffer = _bitsInBuffer &- 8
-      return .scalarValue(UnicodeScalar(_unchecked: codeUnit))
+    guard case ._swift3Buffer(var parser) = self else {
+      Builtin.unreachable()
     }
-    // Buffering mode.
-    // Fill buffer back to 4 bytes (or as many as are left in the iterator).
-    _sanityCheck(_bitsInBuffer < 32)
-    repeat {
-      if let codeUnit = input.next() {
-        // We know _bitsInBuffer < 32 so we use `& 0x1f` (31) to make the
-        // compiler omit a bounds check branch for the bitshift.
-        _decodeBuffer |=
-          (UInt32(extendingOrTruncating: codeUnit) &<<
-          UInt32(extendingOrTruncating: _bitsInBuffer & 0x1f))
-        _bitsInBuffer = _bitsInBuffer &+ 8
-      } else {
-        if _bitsInBuffer == 0 { return .emptyInput }
-        break // We still have some bytes left in our buffer.
-      }
-    } while _bitsInBuffer < 32
+    defer { self = ._swift3Buffer(parser) }
 
-    // Decode one unicode scalar.
-    // Note our empty bytes are always 0x00, which is required for this call.
-    let (result, length) = UTF8._decodeOne(_decodeBuffer)
-
-    // Consume the decoded bytes (or maximal subpart of ill-formed sequence).
-    let bitsConsumed = 8 &* length
-    _sanityCheck(1...4 ~= length && bitsConsumed <= _bitsInBuffer)
-    // Swift doesn't allow shifts greater than or equal to the type width.
-    // _decodeBuffer >>= UInt32(bitsConsumed) // >>= 32 crashes.
-    // Mask with 0x3f (63) to let the compiler omit the '>= 64' bounds check.
-    _decodeBuffer = UInt32(extendingOrTruncating:
-      UInt64(extendingOrTruncating: _decodeBuffer) &>>
-      (UInt64(extendingOrTruncating: bitsConsumed) & 0x3f))
-    _bitsInBuffer = _bitsInBuffer &- bitsConsumed
-
-    guard _fastPath(result != nil) else { return .error }
-    return .scalarValue(UnicodeScalar(_unchecked: result!))
+    switch parser.parseScalar(from: &input) {
+    case .valid(let s): return .scalarValue(UTF8.decode(s))
+    case .error: return .error
+    case .emptyInput: return .emptyInput
+    }
   }
 
   /// Attempts to decode a single UTF-8 code unit sequence starting at the LSB
@@ -288,80 +227,18 @@
       let value = buffer & 0xff
       return (value, 1)
     }
-
-    // Determine sequence length using high 5 bits of 1st byte.  We use a
-    // look-up table to branch less.  1-byte sequences are handled above.
-    //
-    //  case | pattern | description
-    // ----------------------------
-    //   00  |  110xx  | 2-byte sequence
-    //   01  |  1110x  | 3-byte sequence
-    //   10  |  11110  | 4-byte sequence
-    //   11  |  other  | invalid
-    //
-    //                     11xxx      10xxx      01xxx      00xxx
-    let lut0: UInt32 = 0b1011_0000__1111_1111__1111_1111__1111_1111
-    let lut1: UInt32 = 0b1100_0000__1111_1111__1111_1111__1111_1111
-
-    let index: UInt32 = (buffer &>> (3 as UInt32)) & 0x1f
-    let bit0 = (lut0 &>> index) & 1
-    let bit1 = (lut1 &>> index) & 1
-
-    switch (bit1, bit0) {
-    case (0, 0): // 2-byte sequence, buffer: [ ... ... CU1 CU0 ].
-      // Require 10xx xxxx  110x xxxx.
-      if _slowPath(buffer & 0xc0e0 != 0x80c0) { return (nil, 1) }
-      // Disallow xxxx xxxx  xxx0 000x (<= 7 bits case).
-      if _slowPath(buffer & 0x001e == 0x0000) { return (nil, 1) }
-      // Extract data bits.
-      // FIXME(integers): split into multiple expressions to help the typechecker
-      var value = (buffer & 0x3f00) &>> (8 as UInt32)
-      value    |= (buffer & 0x001f) &<< (6 as UInt32)
-      return (value, 2)
-
-    case (0, 1): // 3-byte sequence, buffer: [ ... CU2 CU1 CU0 ].
-      // Disallow xxxx xxxx  xx0x xxxx  xxxx 0000 (<= 11 bits case).
-      if _slowPath(buffer & 0x00200f == 0x000000) { return (nil, 1) }
-      // Disallow xxxx xxxx  xx1x xxxx  xxxx 1101 (surrogate code points).
-      if _slowPath(buffer & 0x00200f == 0x00200d) { return (nil, 1) }
-      // Require 10xx xxxx  10xx xxxx  1110 xxxx.
-      if _slowPath(buffer & 0xc0c0f0 != 0x8080e0) {
-        if buffer & 0x00c000 != 0x008000 { return (nil, 1) }
-        return (nil, 2) // All checks on CU0 & CU1 passed.
-      }
-      // Extract data bits.
-      // FIXME(integers): split into multiple expressions to help the typechecker
-      var value = (buffer & 0x3f0000) &>> (16 as UInt32)
-      value    |= (buffer & 0x003f00) &>> (2  as UInt32)
-      value    |= (buffer & 0x00000f) &<< (12 as UInt32)
-      return (value, 3)
-
-    case (1, 0): // 4-byte sequence, buffer: [ CU3 CU2 CU1 CU0 ].
-      // Disallow xxxx xxxx  xxxx xxxx  xx00 xxxx  xxxx x000 (<= 16 bits case).
-      if _slowPath(buffer & 0x00003007 == 0x00000000) { return (nil, 1) }
-      // If xxxx xxxx  xxxx xxxx  xxxx xxxx  xxxx x1xx.
-      if buffer & 0x00000004 == 0x00000004 {
-        // Require xxxx xxxx  xxxx xxxx  xx00 xxxx  xxxx xx00 (<= 0x10FFFF).
-        if _slowPath(buffer & 0x00003003 != 0x00000000) { return (nil, 1) }
-      }
-      // Require 10xx xxxx  10xx xxxx  10xx xxxx  1111 0xxx.
-      if _slowPath(buffer & 0xc0c0c0f8 != 0x808080f0) {
-        if buffer & 0x0000c000 != 0x00008000 { return (nil, 1) }
-        // All other checks on CU0, CU1 & CU2 passed.
-        if buffer & 0x00c00000 != 0x00800000 { return (nil, 2) }
-        return (nil, 3)
-      }
-      // Extract data bits.
-      // FIXME(integers): remove extra type hints
-      // FIXME(integers): split into multiple expressions to help the typechecker
-      var value = (buffer & 0x3f000000) &>> (24 as UInt32)
-      value    |= (buffer & 0x003f0000) &>> (10 as UInt32)
-      value    |= (buffer & 0x00003f00) &<< (4  as UInt32)
-      value    |= (buffer & 0x00000007) &<< (18 as UInt32)
-      return (value, 4)
-
-    default: // Invalid sequence (CU0 invalid).
-      return (nil, 1)
+    var p = ForwardParser()
+    p._buffer._storage = buffer
+    p._buffer._bitCount = 32
+    var i = EmptyCollection<UInt8>().makeIterator()
+    switch p.parseScalar(from: &i) {
+    case .valid(let s):
+      return (
+        result: UTF8.decode(s).value,
+        length: UInt8(extendingOrTruncating: s.count))
+    case .error(let l):
+      return (result: nil, length: UInt8(extendingOrTruncating: l))
+    case .emptyInput: Builtin.unreachable()
     }
   }
 
@@ -385,33 +262,17 @@
     _ input: UnicodeScalar,
     into processCodeUnit: (CodeUnit) -> Void
   ) {
-    var c = UInt32(input)
-    var buf3 = UInt8(extendingOrTruncating: c & 0xFF)
-
-    if c >= ((1 as UInt32) &<< 7) {
-      c &>>= 6
-      buf3 = (buf3 & 0x3F) | 0x80 // 10xxxxxx
-      var buf2 = UInt8(extendingOrTruncating: c & 0xFF)
-      if c < ((1 as UInt32) &<< 5) {
-        buf2 |= 0xC0              // 110xxxxx
-      }
-      else {
-        c &>>= 6
-        buf2 = (buf2 & 0x3F) | 0x80 // 10xxxxxx
-        var buf1 = UInt8(extendingOrTruncating: c & 0xFF)
-        if c < UInt32(1 &<< 4) {
-          buf1 |= 0xE0              // 1110xxxx
-        }
-        else {
-          c &>>= 6
-          buf1 = (buf1 & 0x3F) | 0x80 // 10xxxxxx
-          processCodeUnit(UInt8(extendingOrTruncating: c | 0xF0)) // 11110xxx
-        }
-        processCodeUnit(buf1)
-      }
-      processCodeUnit(buf2)
-    }
-    processCodeUnit(buf3)
+    var s = encode(input)!._storage
+    processCodeUnit(UInt8(extendingOrTruncating: s))
+    s &>>= 8
+    if _fastPath(s == 0) { return }
+    processCodeUnit(UInt8(extendingOrTruncating: s))
+    s &>>= 8
+    if _fastPath(s == 0) { return }
+    processCodeUnit(UInt8(extendingOrTruncating: s))
+    s &>>= 8
+    if _fastPath(s == 0) { return }
+    processCodeUnit(UInt8(extendingOrTruncating: s))
   }
 
   /// Returns a Boolean value indicating whether the specified code unit is a
@@ -447,18 +308,13 @@
     return Int(_swift_stdlib_strlen(input))
   }
 }
+public typealias UTF8 = _Unicode.UTF8
 
 /// A codec for translating between Unicode scalar values and UTF-16 code
 /// units.
-public struct UTF16 : UnicodeCodec {
-  /// A type that can hold code unit values for this encoding.
-  public typealias CodeUnit = UInt16
-
+extension _Unicode.UTF16 : UnicodeCodec {
   /// Creates an instance of the UTF-16 codec.
-  public init() {}
-
-  /// A lookahead buffer for one UTF-16 code unit.
-  internal var _decodeLookahead: UInt16?
+  public init() { self = ._swift3Buffer(ForwardParser()) }
 
   /// Starts or continues decoding a UTF-16 sequence.
   ///
@@ -504,47 +360,15 @@
   public mutating func decode<I : IteratorProtocol>(
     _ input: inout I
   ) -> UnicodeDecodingResult where I.Element == CodeUnit {
-    // Note: maximal subpart of ill-formed sequence for UTF-16 can only have
-    // length 1.  Length 0 does not make sense.  Neither does length 2 -- in
-    // that case the sequence is valid.
-
-    let unit0: UInt16
-    if _fastPath(_decodeLookahead == nil) {
-      guard let next = input.next() else { return .emptyInput }
-      unit0 = next
-    } else { // Consume lookahead first.
-      unit0 = _decodeLookahead!
-      _decodeLookahead = nil
+    guard case ._swift3Buffer(var parser) = self else {
+      Builtin.unreachable()
     }
-
-    // A well-formed pair of surrogates looks like this:
-    //     high-surrogate        low-surrogate
-    // [1101 10xx xxxx xxxx] [1101 11xx xxxx xxxx]
-
-    // Common case first, non-surrogate -- just a sequence of 1 code unit.
-    if _fastPath((unit0 &>> 11) != 0b1101_1) {
-      return .scalarValue(UnicodeScalar(
-        _unchecked: UInt32(extendingOrTruncating: unit0)))
+    defer { self = ._swift3Buffer(parser) }
+    switch parser.parseScalar(from: &input) {
+    case .valid(let s): return .scalarValue(UTF16.decode(s))
+    case .error: return .error
+    case .emptyInput: return .emptyInput
     }
-
-    // Ensure `unit0` is a high-surrogate.
-    guard _fastPath((unit0 &>> 10) == 0b1101_10) else { return .error }
-
-    // We already have a high-surrogate, so there should be a next code unit.
-    guard let unit1 = input.next() else { return .error }
-
-    // `unit0` is a high-surrogate, so `unit1` should be a low-surrogate.
-    guard _fastPath((unit1 &>> 10) == 0b1101_11) else {
-      // Invalid sequence, discard `unit0` and store `unit1` for the next call.
-      _decodeLookahead = unit1
-      return .error
-    }
-
-    // We have a well-formed surrogate pair, decode it.
-    let result = 0x10000 + (
-      (UInt32(extendingOrTruncating: unit0 & 0x03ff) &<< 10) |
-      UInt32(extendingOrTruncating: unit1 & 0x03ff))
-    return .scalarValue(UnicodeScalar(_unchecked: result))
   }
 
   /// Try to decode one Unicode scalar, and return the actual number of code
@@ -587,28 +411,20 @@
     _ input: UnicodeScalar,
     into processCodeUnit: (CodeUnit) -> Void
   ) {
-    let scalarValue: UInt32 = UInt32(input)
-
-    if scalarValue <= UInt32(extendingOrTruncating: UInt16.max) {
-      processCodeUnit(UInt16(extendingOrTruncating: scalarValue))
-    }
-    else {
-      let lead_offset =
-        (0xd800 as UInt32) - UInt32(extendingOrTruncating: 0x10000 &>> 10)
-      processCodeUnit(UInt16(lead_offset + (scalarValue &>> (10 as UInt32))))
-      processCodeUnit(UInt16(0xdc00 + (scalarValue & 0x3ff)))
-    }
+    var s = encode(input)!._storage
+    processCodeUnit(UInt16(extendingOrTruncating: s))
+    s &>>= 16
+    if _fastPath(s == 0) { return }
+    processCodeUnit(UInt16(extendingOrTruncating: s))
   }
 }
+public typealias UTF16 = _Unicode.UTF16
 
 /// A codec for translating between Unicode scalar values and UTF-32 code
 /// units.
-public struct UTF32 : UnicodeCodec {
-  /// A type that can hold code unit values for this encoding.
-  public typealias CodeUnit = UInt32
-
+extension _Unicode.UTF32 : UnicodeCodec {
   /// Creates an instance of the UTF-32 codec.
-  public init() {}
+  public init() { self = ._swift3Codec }
 
   /// Starts or continues decoding a UTF-32 sequence.
   ///
@@ -660,12 +476,13 @@
   internal static func _decode<I : IteratorProtocol>(
     _ input: inout I
   ) -> UnicodeDecodingResult where I.Element == CodeUnit {
-    guard let x = input.next() else { return .emptyInput }
-    // Check code unit is valid: not surrogate-reserved and within range.
-    guard _fastPath((x &>> 11) != 0b1101_1 && x <= 0x10ffff)
-      else { return .error }
-    // x is a valid scalar.
-    return .scalarValue(UnicodeScalar(_unchecked: x))
+    var parser = ForwardParser()
+    
+    switch parser.parseScalar(from: &input) {
+    case .valid(let s): return .scalarValue(UTF32.decode(s))
+    case .error:      return .error
+    case .emptyInput:   return .emptyInput
+    }
   }
 
   /// Encodes a Unicode scalar as a UTF-32 code unit by calling the given
@@ -691,6 +508,7 @@
     processCodeUnit(UInt32(input))
   }
 }
+public typealias UTF32 = _Unicode.UTF32
 
 /// Translates the given input from one Unicode encoding to another by calling
 /// the given closure.
@@ -727,54 +545,53 @@
 ///     unit at a time.
 /// - Returns: `true` if the translation detected encoding errors in `input`;
 ///   otherwise, `false`.
-public func transcode<Input, InputEncoding, OutputEncoding>(
+@inline(__always)
+public func transcode<
+  Input : IteratorProtocol,
+  InputEncoding : UnicodeEncoding,
+  OutputEncoding : UnicodeEncoding
+>(
   _ input: Input,
   from inputEncoding: InputEncoding.Type,
   to outputEncoding: OutputEncoding.Type,
   stoppingOnError stopOnError: Bool,
   into processCodeUnit: (OutputEncoding.CodeUnit) -> Void
 ) -> Bool
-  where
-  Input : IteratorProtocol,
-  InputEncoding : UnicodeCodec,
-  OutputEncoding : UnicodeCodec,
-  InputEncoding.CodeUnit == Input.Element {
+  where InputEncoding.CodeUnit == Input.Element {
   var input = input
 
   // NB.  It is not possible to optimize this routine to a memcpy if
   // InputEncoding == OutputEncoding.  The reason is that memcpy will not
   // substitute U+FFFD replacement characters for ill-formed sequences.
 
-  var inputDecoder = inputEncoding.init()
+  var p = InputEncoding.ForwardParser()
   var hadError = false
   loop:
   while true {
-    switch inputDecoder.decode(&input) {
-    case .scalarValue(let us):
-      OutputEncoding.encode(us, into: processCodeUnit)
+    switch p.parseScalar(from: &input) {
+    case .valid(let s):
+      let t = OutputEncoding.transcode(s, from: inputEncoding)
+      guard _fastPath(t != nil), let s = t else { break }
+      s.forEach(processCodeUnit)
+      continue loop
     case .emptyInput:
-      break loop
+      return hadError
     case .error:
+      if _slowPath(stopOnError) { return true }
       hadError = true
-      if stopOnError {
-        break loop
-      }
-      OutputEncoding.encode("\u{fffd}", into: processCodeUnit)
     }
+    OutputEncoding.encodedReplacementCharacter.forEach(processCodeUnit)
   }
-  return hadError
 }
 
 /// Transcode UTF-16 to UTF-8, replacing ill-formed sequences with U+FFFD.
 ///
 /// Returns the index of the first unhandled code unit and the UTF-8 data
 /// that was encoded.
-internal func _transcodeSomeUTF16AsUTF8<Input>(
+internal func _transcodeSomeUTF16AsUTF8<Input : Collection>(
   _ input: Input, _ startIndex: Input.Index
 ) -> (Input.Index, _StringCore._UTF8Chunk)
-  where
-  Input : Collection,
-  Input.Iterator.Element == UInt16 {
+  where Input.Iterator.Element == UInt16 {
 
   typealias _UTF8Chunk = _StringCore._UTF8Chunk
 
@@ -1084,40 +901,32 @@
   ///   contained only ASCII characters. If `repairingIllFormedSequences` is
   ///   `false` and an ill-formed sequence is detected, this method returns
   ///   `nil`.
-  public static func transcodedLength<Input, Encoding>(
+  public static func transcodedLength<
+    Input : IteratorProtocol,
+    Encoding : UnicodeEncoding
+  >(
     of input: Input,
     decodedAs sourceEncoding: Encoding.Type,
     repairingIllFormedSequences: Bool
   ) -> (count: Int, isASCII: Bool)?
-    where
-    Input : IteratorProtocol,
-    Encoding : UnicodeCodec,
-    Encoding.CodeUnit == Input.Element {
+    where Encoding.CodeUnit == Input.Element {
 
-    var input = input
+    var i = input
+    var isASCII = true
     var count = 0
-    var isAscii = true
-
-    var inputDecoder = Encoding()
-    loop:
-    while true {
-      switch inputDecoder.decode(&input) {
-      case .scalarValue(let us):
-        if us.value > 0x7f {
-          isAscii = false
-        }
-        count += width(us)
-      case .emptyInput:
-        break loop
-      case .error:
-        if !repairingIllFormedSequences {
-          return nil
-        }
-        isAscii = false
-        count += width(UnicodeScalar(0xfffd)!)
+    let errorCount = Encoding.ForwardParser._parse(
+      &i, repairingIllFormedSequences: repairingIllFormedSequences
+    ) {
+      if isASCII {
+        isASCII = _Unicode.ASCII.transcode($0, from: Encoding.self) != nil
       }
+      count += numericCast(self._transcode($0, from: Encoding.self).count)
     }
-    return (count, isAscii)
+    
+    if _fastPath(errorCount == 0 || repairingIllFormedSequences) {
+      return (count: count, isASCII: isASCII)
+    }
+    else { return nil }
   }
 }
 
@@ -1136,7 +945,7 @@
   }
 }
 
-extension UnicodeCodec where CodeUnit : UnsignedInteger {
+extension UnicodeCodec {
   public static func _nullCodeUnitOffset(in input: UnsafePointer<CodeUnit>) -> Int {
     var length = 0
     while input[length] != 0 {
@@ -1146,12 +955,6 @@
   }
 }
 
-extension UnicodeCodec {
-  public static func _nullCodeUnitOffset(in input: UnsafePointer<CodeUnit>) -> Int {
-    fatalError("_nullCodeUnitOffset(in:) implementation should be provided")
-  }
-}
-
 @available(*, unavailable, renamed: "UnicodeCodec")
 public typealias UnicodeCodecType = UnicodeCodec
 
@@ -1193,9 +996,5 @@
 }
 
 /// A namespace for Unicode utilities.
-public enum _Unicode {
-  public typealias UTF8 = Swift.UTF8
-  public typealias UTF16 = Swift.UTF16
-  public typealias UTF32 = Swift.UTF32
-}
+public enum _Unicode {}
 
diff --git a/stdlib/public/core/UnicodeEncoding.swift b/stdlib/public/core/UnicodeEncoding.swift
index fcb3872..949e76c 100644
--- a/stdlib/public/core/UnicodeEncoding.swift
+++ b/stdlib/public/core/UnicodeEncoding.swift
@@ -18,18 +18,39 @@
   associatedtype EncodedScalar : BidirectionalCollection
     where EncodedScalar.Iterator.Element == CodeUnit
 
-  /// The replacement character U+FFFD as represented in this encoding
+  /// A unicode scalar value to be used when repairing
+  /// encoding/decoding errors, as represented in this encoding.
+  ///
+  /// If the Unicode replacement character U+FFFD is representable in this
+  /// encoding, `encodedReplacementCharacter` encodes that scalar value.
   static var encodedReplacementCharacter : EncodedScalar { get }
 
   /// Converts from encoded to encoding-independent representation
   static func decode(_ content: EncodedScalar) -> UnicodeScalar
 
-  /// Converts from encoding-independent to encoded representation
-  static func encode(_ content: UnicodeScalar) -> EncodedScalar
+  /// Converts from encoding-independent to encoded representation, returning
+  /// `nil` if the scalar can't be represented in this encoding.
+  static func encode(_ content: UnicodeScalar) -> EncodedScalar?
 
+  /// Converts a scalar from another encoding's representation, returning
+  /// `nil` if the scalar can't be represented in this encoding.
+  ///
+  /// A default implementation of this method will be provided 
+  /// automatically for any conforming type that does not implement one.
+  static func transcode<FromEncoding : UnicodeEncoding>(
+    _ content: FromEncoding.EncodedScalar, from _: FromEncoding.Type
+  ) -> EncodedScalar?
+
+  /// A type that can be used to parse `CodeUnits` into
+  /// `EncodedScalar`s.
   associatedtype ForwardParser : UnicodeParser
-  associatedtype ReverseParser : UnicodeParser
+  // where ForwardParser.Encoding == Self
   
+  /// A type that can be used to parse a reversed sequence of
+  /// `CodeUnits` into `EncodedScalar`s.
+  associatedtype ReverseParser : UnicodeParser
+  // where ReverseParser.Encoding == Self
+
   //===--------------------------------------------------------------------===//
   // FIXME: this requirement shouldn't be here and is mitigated by the default
   // implementation below.  Compiler bugs prevent it from being expressed in an
@@ -47,3 +68,26 @@
 public protocol UnicodeEncoding : _UnicodeEncoding
 where ForwardParser.Encoding == Self, ReverseParser.Encoding == Self {}
 
+extension _UnicodeEncoding {
+  public static func transcode<FromEncoding : UnicodeEncoding>(
+    _ content: FromEncoding.EncodedScalar, from _: FromEncoding.Type
+  ) -> EncodedScalar? {
+    return encode(FromEncoding.decode(content))
+  }
+
+  /// Converts from encoding-independent to encoded representation, returning
+  /// `encodedReplacementCharacter` if the scalar can't be represented in this
+  /// encoding.
+  internal static func _encode(_ content: UnicodeScalar) -> EncodedScalar {
+    return encode(content) ?? encodedReplacementCharacter
+  }
+
+  /// Converts a scalar from another encoding's representation, returning
+  /// `encodedReplacementCharacter` if the scalar can't be represented in this
+  /// encoding.
+  internal static func _transcode<FromEncoding : UnicodeEncoding>(
+    _ content: FromEncoding.EncodedScalar, from _: FromEncoding.Type
+  ) -> EncodedScalar {
+    return _encode(FromEncoding.decode(content))
+  }
+}
diff --git a/stdlib/public/core/UnicodeParser.swift b/stdlib/public/core/UnicodeParser.swift
index 8837e43..9156b11 100644
--- a/stdlib/public/core/UnicodeParser.swift
+++ b/stdlib/public/core/UnicodeParser.swift
@@ -10,25 +10,31 @@
 //
 //===----------------------------------------------------------------------===//
 extension _Unicode {
+  /// The result of attempting to parse a `T` from some input.
   public enum ParseResult<T> {
+  /// A `T` was parsed successfully
   case valid(T)
+  
+  /// The input was entirely consumed.
   case emptyInput
-  case invalid(length: Int)
-
-    var isEmpty : Bool {
-      switch self {
-      case .emptyInput: return true
-      default: return false
-      }
-    }
+  
+  /// An encoding error was detected.
+  ///
+  /// `length` is the number of underlying code units consumed by this
+  /// error (the length of the longest prefix of a valid encoding
+  /// sequence that could be recognized).
+  case error(length: Int)
   }
 }
 
-/// Types that separate streams of code units into encoded unicode scalar values
+/// Types that separate streams of code units into encoded Unicode
+/// scalar values.
 public protocol UnicodeParser {
   /// The encoding with which this parser is associated
   associatedtype Encoding : _UnicodeEncoding
 
+  /// Constructs an instance that can be used to begin parsing `CodeUnit`s at
+  /// any Unicode scalar boundary.
   init()
 
   /// Parses a single Unicode scalar value from `input`.
@@ -39,12 +45,13 @@
 }
 
 extension UnicodeParser {
+  @_versioned
   @inline(__always)
   @discardableResult
-  public static func decode<I: IteratorProtocol>(
+  internal static func _parse<I: IteratorProtocol>(
     _ input: inout I,
-    repairingIllFormedSequences makeRepairs: Bool,
-    into output: (UnicodeScalar)->Void
+    repairingIllFormedSequences makeRepairs: Bool = true,
+    into output: (Encoding.EncodedScalar)->Void
   ) -> Int
   where I.Element == Encoding.CodeUnit
   {
@@ -53,23 +60,41 @@
     while true {
       switch d.parseScalar(from: &input) {
       case let .valid(scalarContent):
-        output(Encoding.decode(scalarContent))
-      case .invalid:
-        if !makeRepairs { return 1 }
+        output(scalarContent)
+      case .error:
+        if _slowPath(!makeRepairs) { return 1 }
         errorCount += 1
-        output(UnicodeScalar(_unchecked: 0xFFFD))
+        output(Encoding.encodedReplacementCharacter)
       case .emptyInput:
         return errorCount
       }
     }
   }
+
+  @inline(__always)
+  @discardableResult
+  public static func _decode<I: IteratorProtocol>(
+    _ input: inout I,
+    repairingIllFormedSequences makeRepairs: Bool,
+    into output: (UnicodeScalar)->Void
+  ) -> Int
+  where I.Element == Encoding.CodeUnit
+  {
+    return _parse(&input, repairingIllFormedSequences: makeRepairs) {
+      output(Encoding.decode($0))
+    }
+  }
 }
 
 extension _Unicode {
-  public struct ParsingIterator<
+  @_fixed_layout
+  public // @testable
+  struct _ParsingIterator<
     CodeUnitIterator : IteratorProtocol, 
     Parser: UnicodeParser
   > where Parser.Encoding.CodeUnit == CodeUnitIterator.Element {
+    @inline(__always)
+    @_inlineable
     public init(codeUnits: CodeUnitIterator, parser: Parser) {
       self.codeUnits = codeUnits
       self.parser = parser
@@ -79,11 +104,13 @@
   }
 }
 
-extension _Unicode.ParsingIterator : IteratorProtocol, Sequence {
+extension _Unicode._ParsingIterator : IteratorProtocol, Sequence {
+  @inline(__always)
+  @_inlineable
   public mutating func next() -> Parser.Encoding.EncodedScalar? {
     switch parser.parseScalar(from: &codeUnits) {
     case let .valid(scalarContent): return scalarContent
-    case .invalid: return Parser.Encoding.encodedReplacementCharacter
+    case .error: return Parser.Encoding.encodedReplacementCharacter
     case .emptyInput: return nil
     }
   }
diff --git a/stdlib/public/core/UnsafeBufferPointer.swift.gyb b/stdlib/public/core/UnsafeBufferPointer.swift.gyb
index 50c220d..c067943 100644
--- a/stdlib/public/core/UnsafeBufferPointer.swift.gyb
+++ b/stdlib/public/core/UnsafeBufferPointer.swift.gyb
@@ -297,6 +297,20 @@
     _end = start.map { $0 + count }
   }
 
+  /// Creates a buffer pointer starting at `start` and extending up to the last
+  /// addressable pointer to `Element` in the memory space
+  @_inlineable
+  public init(_unboundedStartingAt start: Unsafe${Mutable}Pointer<Element>) {
+    _position = start
+    _end = type(of: start)._max
+  }
+
+  @_inlineable
+  public init(_empty: ()) {
+    _position = Unsafe${Mutable}Pointer._max
+    _end = _position
+  }
+  
 %  if not Mutable:
   /// Creates a buffer over the same memory as the given buffer slice.
   ///
diff --git a/stdlib/public/core/UnsafePointer.swift.gyb b/stdlib/public/core/UnsafePointer.swift.gyb
index f30d379..ad243be 100644
--- a/stdlib/public/core/UnsafePointer.swift.gyb
+++ b/stdlib/public/core/UnsafePointer.swift.gyb
@@ -1222,6 +1222,15 @@
     }
   }
 }
+
+extension ${Self} {
+  @_versioned
+  static var _max : ${Self} {
+    return ${Self}(
+      bitPattern: 0 as Int &- MemoryLayout<Pointee>.stride
+    )._unsafelyUnwrappedUnchecked
+  }
+}
 % end # for mutable
 
 // ${'Local Variables'}:
diff --git a/stdlib/public/runtime/CMakeLists.txt b/stdlib/public/runtime/CMakeLists.txt
index dc2b0e0..5263c15 100644
--- a/stdlib/public/runtime/CMakeLists.txt
+++ b/stdlib/public/runtime/CMakeLists.txt
@@ -23,6 +23,22 @@
     "-DSWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS=1")
 endif()
 
+if(SWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING)
+  list(APPEND swift_runtime_compile_flags
+    "-DSWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING=1")
+else()
+  list(APPEND swift_runtime_compile_flags
+    "-DSWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING=0")
+endif()
+
+if(SWIFT_RUNTIME_DLADDR_ALLOWED)
+  list(APPEND swift_runtime_compile_flags
+    "-DSWIFT_RUNTIME_DLADDR_ALLOW=1")
+else()
+  list(APPEND swift_runtime_compile_flags
+    "-DSWIFT_RUNTIME_DLADDR_ALLOW=0")
+endif()
+
 set(section_magic_compile_flags ${swift_runtime_compile_flags})
 
 list(APPEND swift_runtime_compile_flags
@@ -33,6 +49,7 @@
     SwiftObject.mm
     SwiftValue.mm
     Reflection.mm
+    "${SWIFT_SOURCE_DIR}/lib/Demangling/OldRemangler.cpp"
     "${SWIFT_SOURCE_DIR}/lib/Demangling/Remangler.cpp")
 
 set(swift_runtime_sources
@@ -92,13 +109,18 @@
   string(TOLOWER "${sdk}" lowercase_sdk)
 
   # These two libraries are only used with the static swiftcore
-  add_library(swiftImageInspectionStatic STATIC
-              ImageInspectionStatic.cpp
-              StaticBinaryELF.cpp)
+  add_swift_library(swiftImageInspectionStatic STATIC
+    ImageInspectionStatic.cpp
+    StaticBinaryELF.cpp
+    C_COMPILE_FLAGS ${swift_runtime_library_compile_flags}
+    LINK_FLAGS ${swift_runtime_linker_flags})
   set_target_properties(swiftImageInspectionStatic PROPERTIES
     ARCHIVE_OUTPUT_DIRECTORY "${SWIFTSTATICLIB_DIR}/${lowercase_sdk}")
 
-  add_library(swiftImageInspectionShared STATIC ImageInspectionELF.cpp)
+  add_swift_library(swiftImageInspectionShared STATIC
+    ImageInspectionELF.cpp
+    C_COMPILE_FLAGS ${swift_runtime_library_compile_flags}
+    LINK_FLAGS ${swift_runtime_linker_flags})
   set_target_properties(swiftImageInspectionShared PROPERTIES
     ARCHIVE_OUTPUT_DIRECTORY "${SWIFTSTATICLIB_DIR}/${lowercase_sdk}")
 
diff --git a/stdlib/public/runtime/Casting.cpp b/stdlib/public/runtime/Casting.cpp
index 9c54fdc..2158485 100644
--- a/stdlib/public/runtime/Casting.cpp
+++ b/stdlib/public/runtime/Casting.cpp
@@ -313,38 +313,6 @@
                                 const Metadata *type,
                                 const ProtocolDescriptor *protocol,
                                 const WitnessTable **conformance) {
-  // Handle AnyObject directly.
-  if (protocol->Flags.getSpecialProtocol() == SpecialProtocol::AnyObject) {
-    switch (type->getKind()) {
-    case MetadataKind::Class:
-    case MetadataKind::ObjCClassWrapper:
-    case MetadataKind::ForeignClass:
-      // Classes conform to AnyObject.
-      return true;
-
-    case MetadataKind::Existential: {
-      auto sourceExistential = cast<ExistentialTypeMetadata>(type);
-      // The existential conforms to AnyObject if it's class-constrained.
-      // FIXME: It also must not carry witness tables.
-      return sourceExistential->isClassBounded();
-    }
-      
-    case MetadataKind::ExistentialMetatype:
-    case MetadataKind::Metatype:
-    case MetadataKind::Function:
-    case MetadataKind::HeapLocalVariable:
-    case MetadataKind::HeapGenericLocalVariable:
-    case MetadataKind::ErrorObject:
-    case MetadataKind::Enum:
-    case MetadataKind::Optional:
-    case MetadataKind::Opaque:
-    case MetadataKind::Struct:
-    case MetadataKind::Tuple:
-      return false;
-    }
-    _failCorruptType(type);
-  }
-
   // Look up the witness table for protocols that need them.
   if (protocol->Flags.needsWitnessTable()) {
     auto witness = swift_conformsToProtocol(type, protocol);
@@ -459,15 +427,9 @@
 static bool
 isAnyObjectExistentialType(const ExistentialTypeMetadata *targetType) {
   unsigned numProtos =  targetType->Protocols.NumProtocols;
-  if (numProtos != 1)
-    return false;
-  const ProtocolDescriptor *protocol = targetType->Protocols[0];
-  bool isAnyObjectProtocol =
-      protocol->Flags.getSpecialProtocol() == SpecialProtocol::AnyObject;
-  // Assert that AnyObject does not need any witness tables. We rely on this.
-  assert(!isAnyObjectProtocol || !protocol->Flags.needsWitnessTable() &&
-         "AnyObject should not require witness tables");
-  return isAnyObjectProtocol;
+  return (numProtos == 0 &&
+          targetType->getSuperclassConstraint() == nullptr &&
+          targetType->isClassBounded());
 }
 
 /// Given a possibly-existential value, find its dynamic type and the
@@ -1075,10 +1037,6 @@
       return nullptr;
     case ProtocolDispatchStrategy::ObjC:
 #if SWIFT_OBJC_INTEROP
-      // All classes conform to AnyObject.
-      if (protocol->Flags.getSpecialProtocol() == SpecialProtocol::AnyObject)
-        break;
-
       if (!objectConformsToObjCProtocol(object, protocol))
         return nullptr;
       break;
@@ -1086,13 +1044,6 @@
       assert(false && "ObjC interop disabled?!");
       return nullptr;
 #endif
-    case ProtocolDispatchStrategy::Empty:
-      // The only non-@objc, non-witness-table-requiring protocol should be
-      // AnyObject for now.
-      assert(protocol->Flags.getSpecialProtocol() == SpecialProtocol::AnyObject
-             && "swift protocols besides AnyObject should always require a "
-                "witness table");
-      break;
     }
   }
   
@@ -2212,9 +2163,7 @@
   // Swift type should be AnyObject or a class type.
   if (!srcType->isAnyClass()) {
     auto existential = dyn_cast<ExistentialTypeMetadata>(srcType);
-    if (!existential ||
-        existential->Flags.getSpecialProtocol()
-          != SpecialProtocol::AnyObject)
+    if (!existential || !isAnyObjectExistentialType(existential))
       return false;
   }
   
@@ -2565,8 +2514,7 @@
     if (auto srcExistentialType = dyn_cast<ExistentialTypeMetadata>(srcType)) {
 #if SWIFT_OBJC_INTEROP
       // If coming from AnyObject, we may want to bridge.
-      if (srcExistentialType->Flags.getSpecialProtocol()
-            == SpecialProtocol::AnyObject) {
+      if (isAnyObjectExistentialType(srcExistentialType)) {
         if (auto targetBridgeWitness = findBridgeWitness(targetType)) {
           return _dynamicCastClassToValueViaObjCBridgeable(dest, src, srcType,
                                                            targetType,
@@ -3213,7 +3161,8 @@
   // If the type is the Any type, we can bridge by "upcasting" the object
   // to Any.
   if (auto nativeExistential = dyn_cast<ExistentialTypeMetadata>(nativeType)) {
-    if (nativeExistential->Protocols.NumProtocols == 0) {
+    if (nativeExistential->Protocols.NumProtocols == 0 &&
+        !nativeExistential->isClassBounded()) {
       _swift_bridgeNonVerbatimFromObjectiveCToAny(sourceValue,
                                                   destValue);
       return true;
diff --git a/stdlib/public/runtime/Demangle.cpp b/stdlib/public/runtime/Demangle.cpp
index 6904a57..0659076 100644
--- a/stdlib/public/runtime/Demangle.cpp
+++ b/stdlib/public/runtime/Demangle.cpp
@@ -131,7 +131,9 @@
     auto objcWrapper = static_cast<const ObjCClassWrapperMetadata *>(type);
     const char *className = class_getName((Class)objcWrapper->Class);
     
-    auto module = Dem.createNode(Node::Kind::Module, MANGLING_MODULE_OBJC);
+    // ObjC classes mangle as being in the magic "__ObjC" module.
+    auto module = Dem.createNode(Node::Kind::Module, "__ObjC");
+    
     auto node = Dem.createNode(Node::Kind::Class);
     node->addChild(module, Dem);
     node->addChild(Dem.createNode(Node::Kind::Identifier,
@@ -159,14 +161,10 @@
     auto proto_list = Dem.createNode(Node::Kind::ProtocolList);
     proto_list->addChild(type_list, Dem);
 
-    // Sort the protocols by their mangled names.
-    // The ordering in the existential type metadata is by metadata pointer,
-    // which isn't necessarily stable across invocations.
-    std::sort(protocols.begin(), protocols.end(),
-          [](const ProtocolDescriptor *a, const ProtocolDescriptor *b) -> bool {
-            return strcmp(a->Name, b->Name) < 0;
-          });
-    
+    // The protocol descriptors should be pre-sorted since the compiler will
+    // only ever make a swift_getExistentialTypeMetadata invocation using
+    // its canonical ordering of protocols.
+
     for (auto *protocol : protocols) {
       // The protocol name is mangled as a type symbol, with the _Tt prefix.
       StringRef ProtoName(protocol->Name);
diff --git a/stdlib/public/runtime/Errors.cpp b/stdlib/public/runtime/Errors.cpp
index 5f24d8f..4bf7646 100644
--- a/stdlib/public/runtime/Errors.cpp
+++ b/stdlib/public/runtime/Errors.cpp
@@ -14,12 +14,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#if defined(__CYGWIN__) || defined(__ANDROID__) || defined(_WIN32)
-#  define SWIFT_SUPPORTS_BACKTRACE_REPORTING 0
-#else
-#  define SWIFT_SUPPORTS_BACKTRACE_REPORTING 1
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -40,7 +34,11 @@
 #include <cxxabi.h>
 #endif
 
-#if SWIFT_SUPPORTS_BACKTRACE_REPORTING
+#ifndef SWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING
+#error "SWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING must be defined"
+#endif
+
+#if SWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING
 // execinfo.h is not available on Android. Checks in this file ensure that
 // fatalError behaves as expected, but without stack traces.
 #include <execinfo.h>
@@ -58,7 +56,7 @@
 
 using namespace swift;
 
-#if SWIFT_SUPPORTS_BACKTRACE_REPORTING
+#if SWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING
 
 static bool getSymbolNameAddr(llvm::StringRef libraryName, SymbolInfo syminfo,
                               std::string &symbolName, uintptr_t &addrOut) {
@@ -207,7 +205,7 @@
 #ifdef __APPLE__
   asl_log(nullptr, nullptr, ASL_LEVEL_ERR, "%s", message);
 #endif
-#if SWIFT_SUPPORTS_BACKTRACE_REPORTING
+#if SWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING
   if (flags & FatalErrorFlags::ReportBacktrace) {
     fputs("Current stack trace:\n", stderr);
     constexpr unsigned maxSupportedStackDepth = 128;
diff --git a/stdlib/public/runtime/Exclusivity.cpp b/stdlib/public/runtime/Exclusivity.cpp
index 4737269..06938f3 100644
--- a/stdlib/public/runtime/Exclusivity.cpp
+++ b/stdlib/public/runtime/Exclusivity.cpp
@@ -19,6 +19,7 @@
 #include "swift/Runtime/Exclusivity.h"
 #include "swift/Runtime/Metadata.h"
 #include <memory>
+#include <stdio.h>
 
 // Pick an implementation strategy.
 #ifndef SWIFT_EXCLUSIVITY_USE_THREADLOCAL
@@ -38,9 +39,20 @@
 
 #if SWIFT_EXCLUSIVITY_USE_PTHREAD_SPECIFIC
 #include <pthread.h>
-#include <stdio.h>
 #endif
 
+// Pick a return-address strategy
+#if __GNUC__
+#define get_return_address() __builtin_return_address(0)
+#elif _MSC_VER
+#include <intrin.h>
+#define get_return_address() _ReturnAddress()
+#else
+#error missing implementation for get_return_address
+#define get_return_address() ((void*) 0)
+#endif
+
+
 using namespace swift;
 
 bool swift::_swift_disableExclusivityChecking = false;
@@ -49,8 +61,37 @@
   switch (flags) {
   case ExclusivityFlags::Read: return "read";
   case ExclusivityFlags::Modify: return "modify";
+  default: return "unknown";
   }
-  return "unknown";
+}
+
+static void reportExclusivityConflict(ExclusivityFlags oldAction, void *oldPC,
+                                      ExclusivityFlags newFlags, void *newPC,
+                                      void *pointer) {
+  // TODO: print something about where the pointer came from?
+  // TODO: if we do something more computationally intense here,
+  //   suppress warnings if the total warning count exceeds some limit
+
+  if (isWarningOnly(newFlags)) {
+    fprintf(stderr,
+            "WARNING: %s/%s access conflict detected on address %p\n"
+            "  first access started at PC=%p\n"
+            "  second access started at PC=%p\n",
+            getAccessName(oldAction),
+            getAccessName(getAccessAction(newFlags)),
+            pointer, oldPC, newPC);
+    return;
+  }
+
+  // TODO: try to recover source-location information from the return
+  // address.
+  fatalError(0,
+             "%s/%s access conflict detected on address %p, aborting\n"
+             "  first access started at PC=%p\n"
+             "  second access started at PC=%p\n",
+             getAccessName(oldAction),
+             getAccessName(getAccessAction(newFlags)),
+             pointer, oldPC, newPC);
 }
 
 namespace {
@@ -58,31 +99,32 @@
 /// A single access that we're tracking.
 struct Access {
   void *Pointer;
-  uintptr_t HereAndAction;
-  Access *Next;
+  void *PC;
+  uintptr_t NextAndAction;
 
   enum : uintptr_t {
     ActionMask = (uintptr_t)ExclusivityFlags::ActionMask,
-    HereMask = ~ActionMask
+    NextMask = ~ActionMask
   };
 
-  Access **getHere() const {
-    return reinterpret_cast<Access**>(HereAndAction & HereMask);
+  Access *getNext() const {
+    return reinterpret_cast<Access*>(NextAndAction & NextMask);
   }
 
-  void setHere(Access **newHere) {
-    HereAndAction = reinterpret_cast<uintptr_t>(newHere) | uintptr_t(getAccessAction());
+  void setNext(Access *next) {
+    NextAndAction =
+      reinterpret_cast<uintptr_t>(next) | (NextAndAction & NextMask);
   }
 
   ExclusivityFlags getAccessAction() const {
-    return ExclusivityFlags(HereAndAction & ActionMask);
+    return ExclusivityFlags(NextAndAction & ActionMask);
   }
 
-  void initialize(void *pointer, Access **here, ExclusivityFlags action) {
-    assert(*here == nullptr && "not inserting to end of list");
+  void initialize(void *pc, void *pointer, Access *next,
+                  ExclusivityFlags action) {
     Pointer = pointer;
-    HereAndAction = reinterpret_cast<uintptr_t>(here) | uintptr_t(action);
-    Next = nullptr;
+    PC = pc;
+    NextAndAction = reinterpret_cast<uintptr_t>(next) | uintptr_t(action);
   }
 };
 
@@ -96,11 +138,10 @@
 public:
   constexpr AccessSet() {}
 
-  void insert(Access *access, void *pointer, ExclusivityFlags flags) {
+  void insert(Access *access, void *pc, void *pointer, ExclusivityFlags flags) {
     auto action = getAccessAction(flags);
 
-    Access **curP = &Head;
-    for (Access *cur = *curP; cur != nullptr; curP = &cur->Next, cur = *curP) {
+    for (Access *cur = Head; cur != nullptr; cur = cur->getNext()) {
       // Ignore accesses to different values.
       if (cur->Pointer != pointer)
         continue;
@@ -111,22 +152,34 @@
         continue;
 
       // Otherwise, it's a conflict.
-      // TODO: try to recover source-location information from the return
-      // address.
-      fatalError(0, "%s/%s access conflict detected on address %p, aborting\n",
-                 getAccessName(action), getAccessName(cur->getAccessAction()),
-                 pointer);
+      reportExclusivityConflict(cur->getAccessAction(), cur->PC,
+                                flags, pc, pointer);
+
+      // If we're only warning, don't report multiple conflicts.
+      break;
     }
 
-    access->initialize(pointer, curP, action);
-    *curP = access;
+    // Insert to the front of the array so that remove tends to find it faster.
+    access->initialize(pc, pointer, Head, action);
+    Head = access;
   }
 
-  static void remove(Access *access) {
-    Access **here = access->getHere();
-    *here = access->Next;
-    if (access->Next != nullptr)
-      access->Next->setHere(here);
+  void remove(Access *access) {
+    auto cur = Head;
+    // Fast path: stack discipline.
+    if (cur == access) {
+      Head = cur->getNext();
+      return;
+    }
+
+    for (Access *last = cur; cur != nullptr; last = cur, cur = cur->getNext()) {
+      if (last == access) {
+        last->setNext(cur->getNext());
+        return;
+      }
+    }
+
+    swift_runtime_unreachable("access not found in set");
   }
 };
 
@@ -205,7 +258,7 @@
 /// This may cause a runtime failure if an incompatible access is
 /// already underway.
 void swift::swift_beginAccess(void *pointer, ValueBuffer *buffer,
-                              ExclusivityFlags flags) {
+                              ExclusivityFlags flags, void *pc) {
   assert(pointer && "beginning an access on a null pointer?");
 
   Access *access = reinterpret_cast<Access*>(buffer);
@@ -217,7 +270,9 @@
     return;
   }
 
-  getAccessSet(pointer).insert(access, pointer, flags);
+  if (!pc) pc = get_return_address();
+
+  getAccessSet(pointer).insert(access, pc, pointer, flags);
 }
 
 /// End tracking a dynamic access.
@@ -231,5 +286,5 @@
     return;
   }
 
-  AccessSet::remove(access);
+  getAccessSet(pointer).remove(access);
 }
diff --git a/stdlib/public/runtime/ExistentialMetadataImpl.h b/stdlib/public/runtime/ExistentialMetadataImpl.h
index 69e858c..0a21f31 100644
--- a/stdlib/public/runtime/ExistentialMetadataImpl.h
+++ b/stdlib/public/runtime/ExistentialMetadataImpl.h
@@ -232,6 +232,7 @@
         // Move dest value asside so we can destroy it later.
         destType->vw_initializeWithTake(opaqueTmpBuffer, destValue);
 
+        src->copyTypeInto(dest, args...);
         if (srcVwt->isValueInline()) {
           // Inline src value.
 
@@ -252,6 +253,7 @@
         auto *destRef =
             *reinterpret_cast<HeapObject **>(dest->getBuffer(args...));
 
+        src->copyTypeInto(dest, args...);
         if (srcVwt->isValueInline()) {
 
           // initWithCopy.
@@ -329,6 +331,8 @@
 
         // Move dest value asside.
         destType->vw_initializeWithTake(opaqueTmpBuffer, destValue);
+
+        src->copyTypeInto(dest, args...);
         if (srcVwt->isValueInline()) {
           // Inline src value.
 
@@ -349,6 +353,7 @@
         auto *destRef =
             *reinterpret_cast<HeapObject **>(dest->getBuffer(args...));
 
+        src->copyTypeInto(dest, args...);
         if (srcVwt->isValueInline()) {
           // initWithCopy.
 
diff --git a/stdlib/public/runtime/ImageInspection.h b/stdlib/public/runtime/ImageInspection.h
index 33dddff3..e714749 100644
--- a/stdlib/public/runtime/ImageInspection.h
+++ b/stdlib/public/runtime/ImageInspection.h
@@ -9,27 +9,30 @@
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 //
 //===----------------------------------------------------------------------===//
-//
-// This file includes routines that extract metadata from executable and
-// dynamic library image files generated by the Swift compiler. The
-// concrete implementations vary greatly by platform.
-//
+///
+/// \file
+///
+/// This file includes routines that extract metadata from executable and
+/// dynamic library image files generated by the Swift compiler. The concrete
+/// implementations vary greatly by platform.
+///
 //===----------------------------------------------------------------------===//
 
-#ifndef SWIFT_RUNTIME_IMAGE_INSPECTION_H
-#define SWIFT_RUNTIME_IMAGE_INSPECTION_H
+#ifndef SWIFT_RUNTIME_IMAGEINSPECTION_H
+#define SWIFT_RUNTIME_IMAGEINSPECTION_H
 
 #include "ImageInspectionELF.h"
 #include <cstdint>
 
 namespace swift {
-  // This is a platform independent version of Dl_info from dlfcn.h
-  struct SymbolInfo {
-    const char *fileName;
-    void *baseAddress;
-    const char *symbolName;
-    void *symbolAddress;
-  };
+
+/// This is a platform independent version of Dl_info from dlfcn.h
+struct SymbolInfo {
+  const char *fileName;
+  void *baseAddress;
+  const char *symbolName;
+  void *symbolAddress;
+};
 
 /// Load the metadata from the image necessary to find a type's
 /// protocol conformance.
@@ -46,6 +49,7 @@
                                              uintptr_t size);
 
 int lookupSymbol(const void *address, SymbolInfo *info);
+
 } // end namespace swift
 
-#endif // SWIFT_RUNTIME_IMAGE_INSPECTION_H
+#endif
diff --git a/stdlib/public/runtime/ImageInspectionELF.cpp b/stdlib/public/runtime/ImageInspectionELF.cpp
index 6065eef..307f805 100644
--- a/stdlib/public/runtime/ImageInspectionELF.cpp
+++ b/stdlib/public/runtime/ImageInspectionELF.cpp
@@ -9,11 +9,13 @@
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 //
 //===----------------------------------------------------------------------===//
-//
-// This file includes routines that interact with ld*.so on ELF-based platforms
-// to extract runtime metadata embedded in dynamically linked ELF images
-// generated by the Swift compiler.
-//
+///
+/// \file
+///
+/// This file includes routines that interact with ld*.so on ELF-based platforms
+/// to extract runtime metadata embedded in dynamically linked ELF images
+/// generated by the Swift compiler.
+///
 //===----------------------------------------------------------------------===//
 
 #if defined(__ELF__) || defined(__ANDROID__)
@@ -25,6 +27,10 @@
 #include <link.h>
 #include <string.h>
 
+#ifndef SWIFT_RUNTIME_DLADDR_ALLOW
+#error "SWIFT_RUNTIME_DLADDR_ALLOW must be defined!"
+#endif
+
 using namespace swift;
 
 /// The symbol name in the image that identifies the beginning of the
@@ -156,6 +162,7 @@
 }
 
 int swift::lookupSymbol(const void *address, SymbolInfo *info) {
+#if SWIFT_RUNTIME_DLADDR_ALLOW
   Dl_info dlinfo;
   if (dladdr(address, &dlinfo) == 0) {
     return 0;
@@ -166,6 +173,9 @@
   info->symbolName = dlinfo.dli_sname;
   info->symbolAddress = dlinfo.dli_saddr;
   return 1;
+#else
+  return 0;
+#endif
 }
 
 #endif // defined(__ELF__) || defined(__ANDROID__)
diff --git a/stdlib/public/runtime/ImageInspectionELF.h b/stdlib/public/runtime/ImageInspectionELF.h
index 8909c5e..0a48696 100644
--- a/stdlib/public/runtime/ImageInspectionELF.h
+++ b/stdlib/public/runtime/ImageInspectionELF.h
@@ -9,13 +9,15 @@
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 //
 //===----------------------------------------------------------------------===//
-//
-// ELF specific image inspection routines.
-//
+///
+/// \file
+///
+/// ELF specific image inspection routines.
+///
 //===----------------------------------------------------------------------===//
 
-#ifndef SWIFT_RUNTIME_IMAGE_INSPECTION_ELF_H
-#define SWIFT_RUNTIME_IMAGE_INSPECTION_ELF_H
+#ifndef SWIFT_RUNTIME_IMAGEINSPECTIONELF_H
+#define SWIFT_RUNTIME_IMAGEINSPECTIONELF_H
 
 #if defined(__ELF__) || defined(__ANDROID__)
 
diff --git a/stdlib/public/runtime/ImageInspectionInit.cpp b/stdlib/public/runtime/ImageInspectionInit.cpp
index a5ae708..3a7c5d8 100644
--- a/stdlib/public/runtime/ImageInspectionInit.cpp
+++ b/stdlib/public/runtime/ImageInspectionInit.cpp
@@ -9,10 +9,12 @@
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 //
 //===----------------------------------------------------------------------===//
-//
-// This file along with swift_sections.S is prepended to each shared library
-// on an ELF target which contains protocol and metadata sections.
-//
+///
+/// \file
+///
+/// This file along with swift_sections.S is prepended to each shared library on
+/// an ELF target which contains protocol and metadata sections.
+///
 //===----------------------------------------------------------------------===//
 
 #if defined(__ELF__) || defined(__ANDROID__)
diff --git a/stdlib/public/runtime/ImageInspectionMachO.cpp b/stdlib/public/runtime/ImageInspectionMachO.cpp
index f5d8b11..88788da 100644
--- a/stdlib/public/runtime/ImageInspectionMachO.cpp
+++ b/stdlib/public/runtime/ImageInspectionMachO.cpp
@@ -9,11 +9,13 @@
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 //
 //===----------------------------------------------------------------------===//
-//
-// This file includes routines that interact with dyld on Mach-O-based platforms
-// to extract runtime metadata embedded in images generated by the Swift
-// compiler.
-//
+///
+/// \file
+///
+/// This file includes routines that interact with dyld on Mach-O-based
+/// platforms to extract runtime metadata embedded in images generated by the
+/// Swift compiler.
+///
 //===----------------------------------------------------------------------===//
 
 #if defined(__APPLE__) && defined(__MACH__)
@@ -24,6 +26,10 @@
 #include <assert.h>
 #include <dlfcn.h>
 
+#ifndef SWIFT_RUNTIME_DLADDR_ALLOW
+#error "SWIFT_RUNTIME_DLADDR_ALLOW must be defined"
+#endif
+
 using namespace swift;
 
 namespace {
@@ -72,6 +78,7 @@
 }
 
 int swift::lookupSymbol(const void *address, SymbolInfo *info) {
+#if SWIFT_RUNTIME_DLADDR_ALLOW
   Dl_info dlinfo;
   if (dladdr(address, &dlinfo) == 0) {
     return 0;
@@ -82,6 +89,9 @@
   info->symbolName = dlinfo.dli_sname;
   info->symbolAddress = dlinfo.dli_saddr;
   return 1;
+#else
+  return 0;
+#endif
 }
 
 #endif // defined(__APPLE__) && defined(__MACH__)
diff --git a/stdlib/public/runtime/ImageInspectionWin32.cpp b/stdlib/public/runtime/ImageInspectionWin32.cpp
index 3a354ad..3083bff 100644
--- a/stdlib/public/runtime/ImageInspectionWin32.cpp
+++ b/stdlib/public/runtime/ImageInspectionWin32.cpp
@@ -33,6 +33,10 @@
 #include <dlfcn.h>
 #endif
 
+#ifndef SWIFT_RUNTIME_DLADDR_ALLOW
+#error "SWIFT_RUNTIME_DLADDR_ALLOW must be defined!"
+#endif
+
 using namespace swift;
 
 /// PE section name for the section that contains protocol conformance records.
@@ -219,7 +223,7 @@
 
 
 int swift::lookupSymbol(const void *address, SymbolInfo *info) {
-#if defined(__CYGWIN__)
+#if defined(__CYGWIN__) || SWIFT_RUNTIME_DLADDR_ALLOW
   Dl_info dlinfo;
   if (dladdr(address, &dlinfo) == 0) {
     return 0;
diff --git a/stdlib/public/runtime/Metadata.cpp b/stdlib/public/runtime/Metadata.cpp
index 583178f..f490c1c 100644
--- a/stdlib/public/runtime/Metadata.cpp
+++ b/stdlib/public/runtime/Metadata.cpp
@@ -1532,7 +1532,7 @@
   auto globalNode = Dem.createNode(Demangle::Node::Kind::Global);
   globalNode->addChild(typeNode, Dem);
 
-  auto string = Demangle::mangleNode(globalNode);
+  auto string = Demangle::mangleNodeOld(globalNode);
 
   auto fullNameBuf = (char*)swift_slowAlloc(string.size() + 1, 0);
   memcpy(fullNameBuf, string.c_str(), string.size() + 1);
@@ -2282,7 +2282,6 @@
 #endif
       
   // Other existentials use standard representation.
-  case SpecialProtocol::AnyObject:
   case SpecialProtocol::None:
     break;
   }
@@ -2305,7 +2304,6 @@
   switch (Flags.getSpecialProtocol()) {
   case SpecialProtocol::Error:
     return ExistentialTypeRepresentation::Error;
-  case SpecialProtocol::AnyObject:
   case SpecialProtocol::None:
     break;
   }
@@ -2503,8 +2501,9 @@
                                         const ProtocolDescriptor **protocols)
     SWIFT_CC(RegisterPreservingCC_IMPL) {
 
-  // Sort the protocol set.
-  std::sort(protocols, protocols + numProtocols);
+  // We entrust that the compiler emitting the call to
+  // swift_getExistentialTypeMetadata always sorts the `protocols` array using
+  // a globally stable ordering that's consistent across modules.
 
   ExistentialCacheEntry::Key key = {
     superclassConstraint, classConstraint, numProtocols, protocols
@@ -2521,24 +2520,6 @@
       ++numWitnessTables;
   }
 
-#ifndef NDEBUG
-  // Verify the class constraint.
-  {
-    auto classConstraint = ProtocolClassConstraint::Any;
-
-    if (key.SuperclassConstraint)
-      classConstraint = ProtocolClassConstraint::Class;
-    else {
-      for (auto p : make_range(key.Protocols, key.Protocols + key.NumProtocols)) {
-        if (p->Flags.getClassConstraint() == ProtocolClassConstraint::Class)
-          classConstraint = ProtocolClassConstraint::Class;
-      }
-    }
-    
-    assert(classConstraint == key.ClassConstraint);
-  }
-#endif
-
   // Get the special protocol kind for an uncomposed protocol existential.
   // Protocol compositions are currently never special.
   auto special = SpecialProtocol::None;
diff --git a/stdlib/public/runtime/RuntimeEntrySymbols.cpp b/stdlib/public/runtime/RuntimeEntrySymbols.cpp
index c0fccf7..1e48c06 100644
--- a/stdlib/public/runtime/RuntimeEntrySymbols.cpp
+++ b/stdlib/public/runtime/RuntimeEntrySymbols.cpp
@@ -36,6 +36,10 @@
 // implementations.
 #define FOR_CONV_DefaultCC(...)
 #define FOR_CONV_C_CC(...)
+
+// Entry points implemented in swift using the swift calling convention.
+#define FOR_CONV_SwiftCC(...)
+
 // Entry points using the new calling convention require global symbols
 // referring to their implementations.
 #define FOR_CONV_RegisterPreservingCC(x) x
diff --git a/stdlib/public/runtime/SwiftValue.mm b/stdlib/public/runtime/SwiftValue.mm
index 88a5e23..098dade 100644
--- a/stdlib/public/runtime/SwiftValue.mm
+++ b/stdlib/public/runtime/SwiftValue.mm
@@ -229,19 +229,7 @@
   for (size_t i = 0, e = protocols.NumProtocols; i != e; ++i) {
     auto protocol = protocols[i];
 
-    // _SwiftValue does conform to AnyObject.
-    switch (protocol->Flags.getSpecialProtocol()) {
-    case SpecialProtocol::AnyObject:
-      continue;
-
-    case SpecialProtocol::Error:
-      return false;
-
-    case SpecialProtocol::None:
-      break;
-    }
-
-    // Otherwise, it only conforms to ObjC protocols.  We specifically
+    // _SwiftValue only conforms to ObjC protocols.  We specifically
     // don't want to say that _SwiftValue conforms to the Swift protocols
     // that NSObject conforms to because that would create a situation
     // where arguably an arbitrary type would conform to those protocols
diff --git a/stdlib/public/stubs/SwiftNativeNSXXXBase.mm.gyb b/stdlib/public/stubs/SwiftNativeNSXXXBase.mm.gyb
index a252255..d0c2675 100644
--- a/stdlib/public/stubs/SwiftNativeNSXXXBase.mm.gyb
+++ b/stdlib/public/stubs/SwiftNativeNSXXXBase.mm.gyb
@@ -45,6 +45,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+extern "C" CFHashCode CFStringHashCString(const uint8_t *bytes, CFIndex len);
+
 using namespace swift;
 
 % for Class in ('Array', 'Dictionary', 'Set', 'String', 'Enumerator', 'Data', 'IndexSet'):
@@ -131,6 +133,14 @@
 
 SWIFT_CC(swift) SWIFT_RUNTIME_STDLIB_INTERFACE
 size_t
+swift_stdlib_CFStringHashCString(const uint8_t *bytes, CFIndex len) {
+  CFHashCode Result = CFStringHashCString(bytes, len);
+
+  return Result;
+}
+
+SWIFT_CC(swift) SWIFT_RUNTIME_STDLIB_INTERFACE
+size_t
 swift_stdlib_NSStringHashValue(NSString *NS_RELEASES_ARGUMENT str,
                                bool isASCII) {
   size_t Result =
diff --git a/test/APINotes/Inputs/custom-frameworks/APINotesFrameworkTest.framework/Headers/APINotesFrameworkTest.apinotes b/test/APINotes/Inputs/custom-frameworks/APINotesFrameworkTest.framework/Headers/APINotesFrameworkTest.apinotes
index 4851864..3d5497b 100644
--- a/test/APINotes/Inputs/custom-frameworks/APINotesFrameworkTest.framework/Headers/APINotesFrameworkTest.apinotes
+++ b/test/APINotes/Inputs/custom-frameworks/APINotesFrameworkTest.framework/Headers/APINotesFrameworkTest.apinotes
@@ -106,4 +106,5 @@
     Typedefs:
       - Name: SomeCAlias
         SwiftName: ImportantCAlias
-
+      - Name: EnclosingStructIdentifier
+        SwiftName: EnclosingStructIdentifier
diff --git a/test/APINotes/Inputs/custom-frameworks/APINotesFrameworkTest.framework/Headers/APINotesFrameworkTest.h b/test/APINotes/Inputs/custom-frameworks/APINotesFrameworkTest.framework/Headers/APINotesFrameworkTest.h
index eefdfa3..f07c838 100644
--- a/test/APINotes/Inputs/custom-frameworks/APINotesFrameworkTest.framework/Headers/APINotesFrameworkTest.h
+++ b/test/APINotes/Inputs/custom-frameworks/APINotesFrameworkTest.framework/Headers/APINotesFrameworkTest.h
@@ -26,3 +26,4 @@
 #import <APINotesFrameworkTest/Properties.h>
 #import <APINotesFrameworkTest/Protocols.h>
 #import <APINotesFrameworkTest/Types.h>
+#import <APINotesFrameworkTest/SwiftWrapper.h>
diff --git a/test/APINotes/Inputs/custom-frameworks/APINotesFrameworkTest.framework/Headers/SwiftWrapper.h b/test/APINotes/Inputs/custom-frameworks/APINotesFrameworkTest.framework/Headers/SwiftWrapper.h
new file mode 100644
index 0000000..249e337
--- /dev/null
+++ b/test/APINotes/Inputs/custom-frameworks/APINotesFrameworkTest.framework/Headers/SwiftWrapper.h
@@ -0,0 +1,6 @@
+typedef _Bool EnclosingStructIdentifier
+  __attribute__((swift_wrapper(struct))) __attribute__((swift_name("EnclosingStruct.Identifier")));
+
+struct EnclosingStruct { };
+
+extern const EnclosingStructIdentifier EnclosingStructIdentifierMember;
diff --git a/test/APINotes/versioned.swift b/test/APINotes/versioned.swift
index a0c539a..8459d9a 100644
--- a/test/APINotes/versioned.swift
+++ b/test/APINotes/versioned.swift
@@ -60,12 +60,16 @@
   // CHECK-DIAGS-3-NOTE: versioned.swift:[[@LINE-1]]:
 
   // CHECK-DIAGS-3-NOT: versioned.swift:[[@LINE+1]]:
-  _ = InnerInSwift4()
-  // CHECK-DIAGS-4: versioned.swift:[[@LINE-1]]:7: error: 'InnerInSwift4' has been renamed to 'Outer.Inner'
+  let s = InnerInSwift4()
+  // CHECK-DIAGS-4: versioned.swift:[[@LINE-1]]:11: error: 'InnerInSwift4' has been renamed to 'Outer.Inner'
   // CHECK-DIAGS-4: note: 'InnerInSwift4' was obsoleted in Swift 4
+  _ = s.value
+  // CHECK-DIAGS-4-NOT: versioned.swift:[[@LINE-1]]:
 
   // CHECK-DIAGS-4-NOT: versioned.swift:[[@LINE+1]]:
-  _ = Outer.Inner()
+  let t = Outer.Inner()
+  // CHECK-DIAGS-3-NOT: versioned.swift:[[@LINE-1]]:
+  _ = s.value
   // CHECK-DIAGS-3-NOT: versioned.swift:[[@LINE-1]]:
 }
 
@@ -84,16 +88,32 @@
   let _: Int = optAliasValue
   // CHECK-DIAGS-3: versioned.swift:[[@LINE-1]]:16: error: cannot convert value of type 'Optional<ImportantCAlias>' (aka 'Optional<Int32>') to specified type 'Int'
 }
+
 #endif
 
 #if !swift(>=4)
+
 func useSwift3Name(_: ImportantCStruct) {}
-// CHECK-SILGEN-3: sil hidden @_T09versioned13useSwift3NameySo20VeryImportantCStructVF
+// CHECK-SILGEN-3: sil hidden @_T09versioned13useSwift3NameySC20VeryImportantCStructVF
 
 func useNewlyNested(_: InnerInSwift4) {}
-// CHECK-SILGEN-3: sil hidden @_T09versioned14useNewlyNestedySo5OuterV5InnerVF
+// CHECK-SILGEN-3: sil hidden @_T09versioned14useNewlyNestedySC5OuterV5InnerVF
 #endif
 
 func useSwift4Name(_: VeryImportantCStruct) {}
-// CHECK-SILGEN: sil hidden @_T09versioned13useSwift4NameySo20VeryImportantCStructVF
+// CHECK-SILGEN: sil hidden @_T09versioned13useSwift4NameySC20VeryImportantCStructVF
 
+
+
+#if swift(>=4)
+func testSwiftWrapperInSwift4() {
+  _ = EnclosingStruct.Identifier.member
+  let _: EnclosingStruct.Identifier = .member
+}
+
+#else
+func testSwiftWrapperInSwift3() {
+  _ = EnclosingStruct.Identifier.member
+  let _: EnclosingStruct.Identifier = .member
+}
+#endif
diff --git a/test/ClangImporter/Inputs/SwiftPrivateAttr.txt b/test/ClangImporter/Inputs/SwiftPrivateAttr.txt
index d191fd5..fc9e65d 100644
--- a/test/ClangImporter/Inputs/SwiftPrivateAttr.txt
+++ b/test/ClangImporter/Inputs/SwiftPrivateAttr.txt
@@ -109,7 +109,7 @@
 }
 @available(swift, obsoleted: 3, renamed: "__PrivCFType")
 typealias __PrivCFTypeRef = __PrivCFType
-class __PrivCFType {
+class __PrivCFType : _CFObject {
 }
 @available(swift, obsoleted: 3, renamed: "__PrivCFSub")
 typealias __PrivCFSubRef = __PrivCFSub
diff --git a/test/ClangImporter/ctypes_ir.swift b/test/ClangImporter/ctypes_ir.swift
index c99a369..edcb3a8 100644
--- a/test/ClangImporter/ctypes_ir.swift
+++ b/test/ClangImporter/ctypes_ir.swift
@@ -27,7 +27,7 @@
 }
 
 // Make sure flexible array struct member isn't represented in IR function signature as i0 (or at all). rdar://problem/18510461
-// CHECK-LABEL: define hidden swiftcc void @_T09ctypes_ir27testStructWithFlexibleArrayySo0defG0VF(i32)
+// CHECK-LABEL: define hidden swiftcc void @_T09ctypes_ir27testStructWithFlexibleArrayySC0defG0VF(i32)
 
 typealias EightUp = (Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8)
 
diff --git a/test/ClangImporter/enum-dataflow.swift b/test/ClangImporter/enum-dataflow.swift
index b230941..9b9b023 100644
--- a/test/ClangImporter/enum-dataflow.swift
+++ b/test/ClangImporter/enum-dataflow.swift
@@ -7,15 +7,15 @@
 
 let aliasOriginal = NSAliasesEnum.byName
 
-switch aliasOriginal { // expected-error {{switch must be exhaustive, consider adding missing cases:}}
-// expected-note@-1 {{missing case: '.differentValue'}}
+switch aliasOriginal { // expected-error {{switch must be exhaustive}}
+// expected-note@-1 {{add missing case: '.differentValue'}}
 case .original:
   break
 }
 
-switch aliasOriginal { // expected-error {{switch must be exhaustive, consider adding missing cases:}}
-// expected-note@-1 {{missing case: '.original'}}
-// expected-note@-2 {{missing case: '.differentValue'}}
+switch aliasOriginal { // expected-error {{switch must be exhaustive}}
+// expected-note@-1 {{add missing case: '.original'}}
+// expected-note@-2 {{add missing case: '.differentValue'}}
 case .bySameValue:
   break
 }
diff --git a/test/ClangImporter/enum-error.swift b/test/ClangImporter/enum-error.swift
index 0f16167..babf82f 100644
--- a/test/ClangImporter/enum-error.swift
+++ b/test/ClangImporter/enum-error.swift
@@ -83,8 +83,8 @@
   switch (terr) { case .TENone, .TEOne, .TETwo: break } // ok
 
   switch (terr) { case .TENone, .TEOne: break }
-  // EXHAUSTIVE: [[@LINE-1]]:{{.+}}: error: switch must be exhaustive, consider adding missing cases
-  // EXHAUSTIVE: [[@LINE-2]]:{{.+}}: note: missing case: '.TETwo'
+  // EXHAUSTIVE: [[@LINE-1]]:{{.+}}: error: switch must be exhaustive
+  // EXHAUSTIVE: [[@LINE-2]]:{{.+}}: note: add missing case: '.TETwo'
   let _ = TestError.Code(rawValue: 2)!
 
   do {
diff --git a/test/ClangImporter/enum-new.swift b/test/ClangImporter/enum-new.swift
index 14bfe8c..b07723a 100644
--- a/test/ClangImporter/enum-new.swift
+++ b/test/ClangImporter/enum-new.swift
@@ -13,12 +13,11 @@
   case .Yellow, .Magenta, .Black, .Cyan: break
   } // no-error
 
-  switch getColorOptions() { // expected-error {{switch must be exhaustive, consider adding a default clause}}
+  switch getColorOptions() { // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause?}}
   case ColorOptions.Pastel: break
   case ColorOptions.Swift: break
   }
   
-  switch 5 as Int16 { // expected-error {{switch must be exhaustive, consider adding a default clause}}
-  case Zero: break // no-error
+  switch 5 as Int16 { // expected-error {{'switch' statement body must have at least one 'case' or 'default' block; do you want to add a default case?}}
   }
 }
diff --git a/test/ClangImporter/newtype_conformance.swift b/test/ClangImporter/newtype_conformance.swift
index 6ef73e3..df3e4dd 100644
--- a/test/ClangImporter/newtype_conformance.swift
+++ b/test/ClangImporter/newtype_conformance.swift
@@ -15,18 +15,14 @@
 func acceptHashable<T: Hashable>(_: T) {}
 func acceptComparable<T: Comparable>(_: T) {}
 
-func testNewTypeWrapperComparable(x: NSNotification.Name, y: NSNotification.Name) {
+func testNewTypeWrapper(x: NSNotification.Name, y: NSNotification.Name) {
   acceptEquatable(x)
   acceptHashable(x)
-  acceptComparable(x)
+  acceptComparable(x) // expected-error {{does not conform to expected type 'Comparable'}}
 
   _ = x == y
   _ = x != y
   _ = x.hashValue
-  _ = x < y
-  _ = x > y
-  _ = x <= y
-  _ = x >= y
   _ = x as NSString
 }
 
diff --git a/test/ClangImporter/objc_bridging_generics.swift b/test/ClangImporter/objc_bridging_generics.swift
index 8ce8439..6daa42d 100644
--- a/test/ClangImporter/objc_bridging_generics.swift
+++ b/test/ClangImporter/objc_bridging_generics.swift
@@ -384,3 +384,11 @@
 func getContainerForFungiblePanda() -> FungibleAnimalContainer<Animal & Fungible> {
   return Panda.getFungibleContainer()
 }
+
+// rdar://problem/30832766 - Infinite recursion while checking conformance
+// to AnyObject
+let third: Third! = Third()
+
+func useThird() {
+  _ = third.description
+}
diff --git a/test/ClangImporter/objc_parse.swift b/test/ClangImporter/objc_parse.swift
index 1e55e92..370a077 100644
--- a/test/ClangImporter/objc_parse.swift
+++ b/test/ClangImporter/objc_parse.swift
@@ -340,8 +340,8 @@
   // Instance method on a base class with instancetype result, called on the
   // class itself.
   // FIXME: This should be accepted.
-  // FIXME: The error is lousy, too.
-  let baseClass: ObjCParseExtras.Base.Type = ObjCParseExtras.Base.returnMyself() // expected-error{{missing argument for parameter #1 in call}}
+  let baseClass: ObjCParseExtras.Base.Type = ObjCParseExtras.Base.returnMyself()
+  // expected-error@-1 {{instance member 'returnMyself' cannot be used on type 'Base'}}
 }
 
 func testRepeatedProtocolAdoption(_ w: NSWindow) {
diff --git a/test/ClangImporter/serialization-sil.swift b/test/ClangImporter/serialization-sil.swift
index 4b0d81e..1e7c073 100644
--- a/test/ClangImporter/serialization-sil.swift
+++ b/test/ClangImporter/serialization-sil.swift
@@ -13,7 +13,7 @@
     // CHECK: [[CURRIED1_FALSE]]:
     // CHECK: [[CURRIED1_TRUE]]([[CURRIED1_METHOD:%.+]] : $@convention(objc_method) (@opened([[CURRIED1_EXISTENTIAL]]) Test) -> @autoreleased AnyObject):
     // CHECK: [[CURRIED1_PARTIAL:%.+]] = partial_apply [[CURRIED1_METHOD]]([[CURRIED1_OBJ]]) : $@convention(objc_method) (@opened([[CURRIED1_EXISTENTIAL]]) Test) -> @autoreleased AnyObject
-    // CHECK: [[CURRIED1_THUNK:%.+]] = function_ref @_T0s9AnyObject_pIxo_ypIxr_TR : $@convention(thin) (@owned @callee_owned () -> @owned AnyObject) -> @out Any
+    // CHECK: [[CURRIED1_THUNK:%.+]] = function_ref @_T0yXlIxo_ypIxr_TR : $@convention(thin) (@owned @callee_owned () -> @owned AnyObject) -> @out Any
     // CHECK: = partial_apply [[CURRIED1_THUNK]]([[CURRIED1_PARTIAL]])
     curried1()
   }
diff --git a/test/ClangImporter/swift2_warnings.swift b/test/ClangImporter/swift2_warnings.swift
index 323a257..ed26e7d 100644
--- a/test/ClangImporter/swift2_warnings.swift
+++ b/test/ClangImporter/swift2_warnings.swift
@@ -99,9 +99,9 @@
 func makeProgress<T: NSProgressReporting>(thing: T) {} // expected-error {{'NSProgressReporting' has been renamed to 'ProgressReporting'}} {{22-41=ProgressReporting}} 
 
 func useLowercasedEnumCase(x: NSRuncingMode) {
-  switch x { // expected-error {{switch must be exhaustive, consider adding missing cases:}}
-    // expected-note@-1 {{missing case: '.mince'}}
-    // expected-note@-2 {{missing case: '.quince'}}
+  switch x { // expected-error {{switch must be exhaustive}}
+    // expected-note@-1 {{add missing case: '.mince'}}
+    // expected-note@-2 {{add missing case: '.quince'}}
     case .Mince: return // expected-error {{'Mince' has been renamed to 'mince'}} {{11-16=mince}}
     case .Quince: return // expected-error {{'Quince' has been renamed to 'quince'}} {{11-17=quince}}
   }
diff --git a/test/Compatibility/MixAndMatch/Inputs/SomeObjCModule.apinotes b/test/Compatibility/MixAndMatch/Inputs/SomeObjCModule.apinotes
new file mode 100644
index 0000000..adad67b
--- /dev/null
+++ b/test/Compatibility/MixAndMatch/Inputs/SomeObjCModule.apinotes
@@ -0,0 +1,9 @@
+Name: SomeObjCModule
+Classes:
+- Name: NSRuncibleSpoon
+  SwiftBridge: RuncibleSpoon
+SwiftVersions:
+- Version: 3
+  Classes:
+  - Name: NSRuncibleSpoon
+    SwiftBridge: ""
diff --git a/test/Compatibility/MixAndMatch/Inputs/SomeObjCModule.h b/test/Compatibility/MixAndMatch/Inputs/SomeObjCModule.h
new file mode 100644
index 0000000..a12b1af
--- /dev/null
+++ b/test/Compatibility/MixAndMatch/Inputs/SomeObjCModule.h
@@ -0,0 +1,24 @@
+// Swift 3 sees the ObjC class NSRuncibleSpoon as the class, and uses methods
+// with type signatures involving NSRuncibleSpoon to conform to protocols
+// across the language boundary. Swift 4 sees the type as bridged to
+// a RuncibleSpoon value type, but still needs to be able to use conformances
+// declared by Swift 3.
+
+@import Foundation;
+
+@interface NSRuncibleSpoon: NSObject
+@end
+
+@interface SomeObjCClass: NSObject
+- (instancetype _Nonnull)initWithSomeSwiftInitRequirement:(NSRuncibleSpoon* _Nonnull)s;
+- (void)someSwiftMethodRequirement:(NSRuncibleSpoon* _Nonnull)s;
+@property NSRuncibleSpoon * _Nonnull someSwiftPropertyRequirement;
+@end
+
+@protocol SomeObjCProtocol
+- (instancetype _Nonnull)initWithSomeObjCInitRequirement:(NSRuncibleSpoon * _Nonnull)string;
+- (void)someObjCMethodRequirement:(NSRuncibleSpoon * _Nonnull)string;
+@property NSRuncibleSpoon * _Nonnull someObjCPropertyRequirement;
+@end
+
+
diff --git a/test/Compatibility/MixAndMatch/Inputs/SomeObjCModuleX.swift b/test/Compatibility/MixAndMatch/Inputs/SomeObjCModuleX.swift
new file mode 100644
index 0000000..2abcabe
--- /dev/null
+++ b/test/Compatibility/MixAndMatch/Inputs/SomeObjCModuleX.swift
@@ -0,0 +1,22 @@
+// NB: This file is not named SomeObjCModule.swift to avoid getting picked up
+// by -enable-source-import
+
+@_exported import SomeObjCModule
+
+public struct RuncibleSpoon: _ObjectiveCBridgeable {
+  public init() {}
+
+  public func _bridgeToObjectiveC() -> NSRuncibleSpoon {
+    fatalError()
+  }
+  public static func _forceBridgeFromObjectiveC(_: NSRuncibleSpoon, result: inout RuncibleSpoon?) {
+    fatalError()
+  }
+  public static func _conditionallyBridgeFromObjectiveC(_: NSRuncibleSpoon, result: inout RuncibleSpoon?) -> Bool {
+    fatalError()
+  }
+  public static func _unconditionallyBridgeFromObjectiveC(_: NSRuncibleSpoon?) -> RuncibleSpoon {
+    fatalError()
+  }
+}
+
diff --git a/test/Compatibility/MixAndMatch/Inputs/module.modulemap b/test/Compatibility/MixAndMatch/Inputs/module.modulemap
new file mode 100644
index 0000000..154dc37
--- /dev/null
+++ b/test/Compatibility/MixAndMatch/Inputs/module.modulemap
@@ -0,0 +1,4 @@
+module SomeObjCModule {
+  header "SomeObjCModule.h"
+  export *
+}
diff --git a/test/Compatibility/MixAndMatch/Inputs/witness_change_swift3_leaf.swift b/test/Compatibility/MixAndMatch/Inputs/witness_change_swift3_leaf.swift
new file mode 100644
index 0000000..89a5a70
--- /dev/null
+++ b/test/Compatibility/MixAndMatch/Inputs/witness_change_swift3_leaf.swift
@@ -0,0 +1,71 @@
+
+// Swift 3 sees the ObjC class NSRuncibleSpoon as the class, and uses methods
+// with type signatures involving NSRuncibleSpoon to conform to protocols
+// across the language boundary. Swift 4 sees the type as bridged to
+// a RuncibleSpoon value type, but still needs to be able to use conformances
+// declared by Swift 3.
+
+// Swift 3, importing Swift 3 and Swift 4 code
+
+import SomeObjCModule
+import SomeSwift3Module
+import SomeSwift4Module
+
+func testMatchAndMix(bridged: RuncibleSpoon, unbridged: NSRuncibleSpoon) {
+  let objcInstanceViaClass
+    = SomeObjCClass(someSwiftInitRequirement: unbridged)
+
+  let objcClassAsS3Protocol: SomeSwift3Protocol.Type = SomeObjCClass.self
+  let objcInstanceViaS3Protocol
+    = objcClassAsS3Protocol.init(someSwiftInitRequirement: unbridged)
+
+  let objcClassAsS4Protocol: SomeSwift4Protocol.Type = SomeObjCClass.self
+  let objcInstanceViaS4Protocol
+    = objcClassAsS4Protocol.init(someSwiftInitRequirement: bridged)
+
+  var bridgedSink: RuncibleSpoon
+  var unbridgedSink: NSRuncibleSpoon
+
+  let swiftPropertyViaClass = objcInstanceViaClass.someSwiftPropertyRequirement
+  unbridgedSink = swiftPropertyViaClass
+  let swiftPropertyViaS3Protocol = objcInstanceViaS3Protocol.someSwiftPropertyRequirement
+  unbridgedSink = swiftPropertyViaS3Protocol
+  let swiftPropertyViaS4Protocol = objcInstanceViaS4Protocol.someSwiftPropertyRequirement
+  bridgedSink = swiftPropertyViaS4Protocol
+
+  objcInstanceViaClass.someSwiftMethodRequirement(unbridged)
+  objcInstanceViaS3Protocol.someSwiftMethodRequirement(unbridged)
+  objcInstanceViaS4Protocol.someSwiftMethodRequirement(bridged)
+
+  let swift3InstanceViaClass
+    = SomeSwift3Class(someObjCInitRequirement: unbridged)
+  let swift3ClassAsProtocol: SomeObjCProtocol.Type = SomeSwift3Class.self
+  let swift3InstanceViaProtocol
+    = swift3ClassAsProtocol.init(someObjCInitRequirement: unbridged)
+  
+  let objcPropertyViaClassS3 = swift3InstanceViaClass.someObjCPropertyRequirement
+  unbridgedSink = objcPropertyViaClassS3
+  let objcPropertyViaProtocolS3 = swift3InstanceViaProtocol.someObjCPropertyRequirement
+  unbridgedSink = objcPropertyViaProtocolS3
+
+  swift3InstanceViaClass.someObjCMethodRequirement(unbridged)
+  swift3InstanceViaProtocol.someObjCMethodRequirement(unbridged)
+
+  let swift4InstanceViaClass
+    = SomeSwift4Class(someObjCInitRequirement: bridged)
+  let swift4ClassAsProtocol: SomeObjCProtocol.Type = SomeSwift4Class.self
+  let swift4InstanceViaProtocol
+    = swift4ClassAsProtocol.init(someObjCInitRequirement: unbridged)
+  
+  let objcPropertyViaClassS4 = swift4InstanceViaClass.someObjCPropertyRequirement
+  bridgedSink = objcPropertyViaClassS4
+  let objcPropertyViaProtocolS4 = swift4InstanceViaProtocol.someObjCPropertyRequirement
+  unbridgedSink = objcPropertyViaProtocolS4
+
+  swift4InstanceViaClass.someObjCMethodRequirement(bridged)
+  swift4InstanceViaProtocol.someObjCMethodRequirement(unbridged)
+
+  _ = bridgedSink
+  _ = unbridgedSink
+}
+
diff --git a/test/Compatibility/MixAndMatch/Inputs/witness_change_swift4.swift b/test/Compatibility/MixAndMatch/Inputs/witness_change_swift4.swift
new file mode 100644
index 0000000..0ebad72
--- /dev/null
+++ b/test/Compatibility/MixAndMatch/Inputs/witness_change_swift4.swift
@@ -0,0 +1,65 @@
+
+// Swift 3 sees the ObjC class NSRuncibleSpoon as the class, and uses methods
+// with type signatures involving NSRuncibleSpoon to conform to protocols
+// across the language boundary. Swift 4 sees the type as bridged to
+// a RuncibleSpoon value type, but still needs to be able to use conformances
+// declared by Swift 3.
+
+// Swift 4
+
+import SomeObjCModule
+import SomeSwift3Module
+
+public func testMixAndMatch(bridged: RuncibleSpoon, unbridged: NSRuncibleSpoon) {
+  let objcInstanceViaClass
+    = SomeObjCClass(someSwiftInitRequirement: bridged)
+  let objcClassAsProtocol: SomeSwift3Protocol.Type = SomeObjCClass.self
+  let objcInstanceViaProtocol
+    = objcClassAsProtocol.init(someSwiftInitRequirement: unbridged)
+
+  var bridgedSink: RuncibleSpoon
+  var unbridgedSink: NSRuncibleSpoon
+
+  let swiftPropertyViaClass = objcInstanceViaClass.someSwiftPropertyRequirement
+  bridgedSink = swiftPropertyViaClass
+  let swiftPropertyViaProtocol = objcInstanceViaProtocol.someSwiftPropertyRequirement
+  unbridgedSink = swiftPropertyViaProtocol
+
+  objcInstanceViaClass.someSwiftMethodRequirement(bridged)
+  objcInstanceViaProtocol.someSwiftMethodRequirement(unbridged)
+
+  let swiftInstanceViaClass
+    = SomeSwift3Class(someObjCInitRequirement: unbridged)
+  let swiftClassAsProtocol: SomeObjCProtocol.Type = SomeSwift3Class.self
+  let swiftInstanceViaProtocol
+    = swiftClassAsProtocol.init(someObjCInitRequirement: bridged)
+  
+  let objcPropertyViaClass = swiftInstanceViaClass.someObjCPropertyRequirement
+  unbridgedSink = objcPropertyViaClass
+  let objcPropertyViaProtocol = swiftInstanceViaProtocol.someObjCPropertyRequirement
+  bridgedSink = objcPropertyViaProtocol
+
+  swiftInstanceViaClass.someObjCMethodRequirement(unbridged)
+  swiftInstanceViaProtocol.someObjCMethodRequirement(bridged)
+
+  _ = bridgedSink
+  _ = unbridgedSink
+}
+
+public protocol SomeSwift4Protocol {
+  init(someSwiftInitRequirement: RuncibleSpoon)
+  func someSwiftMethodRequirement(_: RuncibleSpoon)
+  var someSwiftPropertyRequirement: RuncibleSpoon { get }
+}
+
+extension SomeObjCClass: SomeSwift4Protocol {}
+
+public class SomeSwift4Class: NSObject {
+  public required init(someObjCInitRequirement x: RuncibleSpoon) {
+    someObjCPropertyRequirement = x
+  }
+  public func someObjCMethodRequirement(_: RuncibleSpoon) {}
+  public var someObjCPropertyRequirement: RuncibleSpoon
+}
+
+extension SomeSwift4Class: SomeObjCProtocol {}
diff --git a/test/Compatibility/MixAndMatch/witness_change.swift b/test/Compatibility/MixAndMatch/witness_change.swift
new file mode 100644
index 0000000..159bf4a6
--- /dev/null
+++ b/test/Compatibility/MixAndMatch/witness_change.swift
@@ -0,0 +1,37 @@
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t/SomeObjCModule.swiftmodule -module-name SomeObjCModule -I %t -I %S/Inputs -swift-version 3 %S/Inputs/SomeObjCModuleX.swift
+// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t/SomeSwift3Module.swiftmodule -module-name SomeSwift3Module -I %t -I %S/Inputs -swift-version 3 %s
+// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t/SomeSwift4Module.swiftmodule -module-name SomeSwift4Module -I %t -I %S/Inputs -swift-version 4 %S/Inputs/witness_change_swift4.swift
+// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -c -I %t -I %S/Inputs -swift-version 3 %S/Inputs/witness_change_swift3_leaf.swift
+
+// REQUIRES: objc_interop
+
+// Swift 3 sees the ObjC class NSRuncibleSpoon as the class, and uses methods
+// with type signatures involving NSRuncibleSpoon to conform to protocols
+// across the language boundary. Swift 4 sees the type as bridged to
+// a RuncibleSpoon value type, but still needs to be able to use conformances
+// declared by Swift 3.
+
+// Swift 3
+
+import SomeObjCModule
+
+_ = RuncibleSpoon()
+
+public class SomeSwift3Class: NSObject {
+  public required init(someObjCInitRequirement x: NSRuncibleSpoon) {
+    someObjCPropertyRequirement = x
+  }
+  public func someObjCMethodRequirement(_: NSRuncibleSpoon) {}
+  public var someObjCPropertyRequirement: NSRuncibleSpoon
+}
+extension SomeSwift3Class: SomeObjCProtocol {}
+
+public protocol SomeSwift3Protocol {
+  init(someSwiftInitRequirement: NSRuncibleSpoon)
+  func someSwiftMethodRequirement(_: NSRuncibleSpoon)
+  var someSwiftPropertyRequirement: NSRuncibleSpoon { get }
+}
+extension SomeObjCClass: SomeSwift3Protocol {}
+
diff --git a/test/Compatibility/accessibility_private.swift b/test/Compatibility/accessibility_private.swift
new file mode 100644
index 0000000..ee5b6d8
--- /dev/null
+++ b/test/Compatibility/accessibility_private.swift
@@ -0,0 +1,213 @@
+// RUN: %target-typecheck-verify-swift -swift-version 3
+
+class Container {
+  private func foo() {} // expected-note * {{declared here}}
+  private var bar = 0 // expected-note * {{declared here}}
+
+  private struct PrivateInner {} // expected-note * {{declared here}}
+
+  func localTest() {
+    foo()
+    self.foo()
+
+    _ = bar
+    bar = 5
+    _ = self.bar
+    self.bar = 5
+
+    privateExtensionMethod() // expected-error {{'privateExtensionMethod' is inaccessible due to 'private' protection level}}
+    self.privateExtensionMethod() // expected-error {{'privateExtensionMethod' is inaccessible due to 'private' protection level}}
+
+    _ = PrivateInner()
+    _ = Container.PrivateInner()
+  }
+
+  struct Inner {
+    func test(obj: Container) {
+      obj.foo()
+      _ = obj.bar
+      obj.bar = 5
+      obj.privateExtensionMethod() // expected-error {{'privateExtensionMethod' is inaccessible due to 'private' protection level}}
+
+      _ = PrivateInner()
+      _ = Container.PrivateInner()
+    }
+
+    var inner: PrivateInner? // expected-error {{property must be declared private because its type uses a private type}}
+    var innerQualified: Container.PrivateInner? // expected-error {{property must be declared private because its type uses a private type}}
+  }
+
+  var inner: PrivateInner? // expected-error {{property must be declared private because its type uses a private type}}
+  var innerQualified: Container.PrivateInner? // expected-error {{property must be declared private because its type uses a private type}}
+}
+
+func test(obj: Container) {
+  obj.foo() // expected-error {{'foo' is inaccessible due to 'private' protection level}}
+  _ = obj.bar // expected-error {{'bar' is inaccessible due to 'private' protection level}}
+  obj.bar = 5 // expected-error {{'bar' is inaccessible due to 'private' protection level}}
+  obj.privateExtensionMethod() // expected-error {{'privateExtensionMethod' is inaccessible due to 'private' protection level}}
+
+  _ = Container.PrivateInner() // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
+}
+
+extension Container {
+  private func privateExtensionMethod() {} // expected-note * {{declared here}}
+
+  func extensionTest() {
+    foo() // expected-error {{'foo' is inaccessible due to 'private' protection level}}
+    self.foo() // expected-error {{'foo' is inaccessible due to 'private' protection level}}
+
+    _ = bar // expected-error {{'bar' is inaccessible due to 'private' protection level}}
+    bar = 5 // expected-error {{'bar' is inaccessible due to 'private' protection level}}
+    _ = self.bar // expected-error {{'bar' is inaccessible due to 'private' protection level}}
+    self.bar = 5 // expected-error {{'bar' is inaccessible due to 'private' protection level}}
+
+    privateExtensionMethod()
+    self.privateExtensionMethod()
+
+    _ = PrivateInner() // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
+    _ = Container.PrivateInner() // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
+  }
+
+  // FIXME: Why do these errors happen twice?
+  var extensionInner: PrivateInner? { return nil } // expected-error 2 {{'PrivateInner' is inaccessible due to 'private' protection level}}
+  var extensionInnerQualified: Container.PrivateInner? { return nil } // expected-error 2 {{'PrivateInner' is inaccessible due to 'private' protection level}}
+}
+
+extension Container.Inner {
+  func extensionTest(obj: Container) {
+    obj.foo() // expected-error {{'foo' is inaccessible due to 'private' protection level}}
+    _ = obj.bar // expected-error {{'bar' is inaccessible due to 'private' protection level}}
+    obj.bar = 5 // expected-error {{'bar' is inaccessible due to 'private' protection level}}
+    obj.privateExtensionMethod() // expected-error {{'privateExtensionMethod' is inaccessible due to 'private' protection level}}
+
+    // FIXME: Unqualified lookup won't look into Container from here.
+    _ = PrivateInner() // expected-error {{use of unresolved identifier 'PrivateInner'}}
+    _ = Container.PrivateInner() // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
+  }
+
+  // FIXME: Why do these errors happen twice?
+  // FIXME: Unqualified lookup won't look into Container from here.
+  var inner: PrivateInner? { return nil } // expected-error 2 {{use of undeclared type 'PrivateInner'}}
+  var innerQualified: Container.PrivateInner? { return nil } // expected-error 2 {{'PrivateInner' is inaccessible due to 'private' protection level}}
+}
+
+class Sub : Container {
+  func subTest() {
+    foo() // expected-error {{'foo' is inaccessible due to 'private' protection level}}
+    self.foo() // expected-error {{'foo' is inaccessible due to 'private' protection level}}
+
+    _ = bar // expected-error {{'bar' is inaccessible due to 'private' protection level}}
+    bar = 5 // expected-error {{'bar' is inaccessible due to 'private' protection level}}
+    _ = self.bar // expected-error {{'bar' is inaccessible due to 'private' protection level}}
+    self.bar = 5 // expected-error {{'bar' is inaccessible due to 'private' protection level}}
+
+    privateExtensionMethod() // expected-error {{'privateExtensionMethod' is inaccessible due to 'private' protection level}}
+    self.privateExtensionMethod() // expected-error {{'privateExtensionMethod' is inaccessible due to 'private' protection level}}
+
+    _ = PrivateInner() // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
+    _ = Container.PrivateInner() // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
+  }
+
+  var subInner: PrivateInner? // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
+  var subInnerQualified: Container.PrivateInner? // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
+}
+
+
+protocol VeryImportantProto {
+  associatedtype Assoc
+  var value: Int { get set } // expected-note {{protocol requires property 'value' with type 'Int'; do you want to add a stub?}}
+}
+
+private struct VIPPrivateType : VeryImportantProto {
+  private typealias Assoc = Int // expected-error {{type alias 'Assoc' must be as accessible as its enclosing type because it matches a requirement in protocol 'VeryImportantProto'}}
+  var value: Int
+}
+
+private struct VIPPrivateProp : VeryImportantProto {
+  typealias Assoc = Int
+  private var value: Int // expected-error {{property 'value' must be as accessible as its enclosing type because it matches a requirement in protocol 'VeryImportantProto'}} {{3-10=fileprivate}}
+}
+
+private struct VIPPrivateSetProp : VeryImportantProto {
+  typealias Assoc = Int
+  private(set) var value: Int // expected-error {{setter for property 'value' must be as accessible as its enclosing type because it matches a requirement in protocol 'VeryImportantProto'}} {{3-10=fileprivate}}
+}
+
+private class VIPPrivateSetBase {
+  private var value: Int = 0
+}
+private class VIPPrivateSetSub : VIPPrivateSetBase, VeryImportantProto { // expected-error {{type 'VIPPrivateSetSub' does not conform to protocol 'VeryImportantProto'}}
+  typealias Assoc = Int
+}
+
+private class VIPPrivateSetPropBase {
+  private(set) var value: Int = 0 // expected-error {{setter for property 'value' must be as accessible as its enclosing type because it matches a requirement in protocol 'VeryImportantProto'}} {{3-10=fileprivate}}
+}
+private class VIPPrivateSetPropSub : VIPPrivateSetPropBase, VeryImportantProto {
+  typealias Assoc = Int
+}
+
+extension Container {
+  private typealias ExtensionConflictingType = Int // expected-note * {{declared here}}
+}
+extension Container {
+  private typealias ExtensionConflictingType = Double // expected-note * {{declared here}}
+}
+extension Container {
+  func test() {
+    let a: ExtensionConflictingType? = nil // expected-error {{'ExtensionConflictingType' is inaccessible due to 'private' protection level}}
+    let b: Container.ExtensionConflictingType? = nil // expected-error {{'ExtensionConflictingType' is inaccessible due to 'private' protection level}}
+    _ = ExtensionConflictingType() // expected-error {{'ExtensionConflictingType' is inaccessible due to 'private' protection level}}
+    _ = Container.ExtensionConflictingType() // expected-error {{'ExtensionConflictingType' is inaccessible due to 'private' protection level}}
+  }
+}
+
+// All of these should be errors, but didn't have the correct behavior in Swift 
+// 3.0GM.
+extension Container {
+  private struct VeryPrivateStruct { // expected-note * {{type declared here}}
+    private typealias VeryPrivateType = Int // expected-note * {{type declared here}}
+    var privateVar: VeryPrivateType { fatalError() } // expected-warning {{property should be declared private because its type uses a private type}}
+    var privateVar2 = VeryPrivateType() // expected-warning {{property should be declared private because its type 'Container.VeryPrivateStruct.VeryPrivateType' (aka 'Int') uses a private type}}
+    typealias PrivateAlias = VeryPrivateType // expected-warning {{type alias should be declared private because its underlying type uses a private type}}
+    subscript(_: VeryPrivateType) -> Void { return () } // expected-warning {{subscript should be declared private because its index uses a private type}}
+    func privateMethod(_: VeryPrivateType) -> Void {} // expected-warning {{method should be declared private because its parameter uses a private type}} {{none}}
+    enum PrivateRawValue: VeryPrivateType { // expected-warning {{enum should be declared private because its raw type uses a private type}} {{none}}
+      case A
+    }
+    enum PrivatePayload {
+      case A(VeryPrivateType) // expected-warning {{enum case in an internal enum uses a private type}} {{none}}
+    }
+
+    private class PrivateInnerClass {} // expected-note * {{declared here}}
+    class PrivateSuper: PrivateInnerClass {} // expected-warning {{class should be declared private because its superclass is private}} {{none}}
+  }
+
+  fileprivate var privateVar: VeryPrivateStruct { fatalError() } // expected-warning {{property should not be declared fileprivate because its type uses a private type}} {{none}}
+  fileprivate typealias PrivateAlias = VeryPrivateStruct // expected-warning {{type alias should not be declared fileprivate because its underlying type uses a private type}} {{none}}
+  fileprivate subscript(_: VeryPrivateStruct) -> Void { return () } // expected-warning {{subscript should not be declared fileprivate because its index uses a private type}} {{none}}
+  fileprivate func privateMethod(_: VeryPrivateStruct) -> Void {} // expected-warning {{method should not be declared fileprivate because its parameter uses a private type}} {{none}}
+  fileprivate enum PrivateRawValue: VeryPrivateStruct {} // expected-warning {{enum should not be declared fileprivate because its raw type uses a private type}} {{none}}
+  // expected-error@-1 {{raw type 'Container.VeryPrivateStruct' is not expressible by any literal}}
+  // expected-error@-2 {{'Container.PrivateRawValue' declares raw type 'Container.VeryPrivateStruct', but does not conform to RawRepresentable and conformance could not be synthesized}}
+  // expected-error@-3 {{RawRepresentable conformance cannot be synthesized because raw type 'Container.VeryPrivateStruct' is not Equatable}}
+  fileprivate enum PrivatePayload {
+    case A(VeryPrivateStruct) // expected-warning {{enum case in an internal enum uses a private type}} {{none}}
+  }
+
+  private class PrivateInnerClass {} // expected-note * {{declared here}}
+  fileprivate class PrivateSuperClass: PrivateInnerClass {} // expected-warning {{class should not be declared fileprivate because its superclass is private}} {{none}}
+  fileprivate class PrivateGenericUser<T> where T: PrivateInnerClass {} // expected-warning {{generic class should not be declared fileprivate because its generic requirement uses a private type}} {{none}}
+}
+
+fileprivate struct SR2579 {
+  private struct Inner {
+    private struct InnerPrivateType {}
+    var innerProperty = InnerPrivateType() // expected-warning {{property should be declared private because its type 'SR2579.Inner.InnerPrivateType' uses a private type}}
+  }
+  // FIXME: We need better errors when one access violation results in more
+  // downstream.
+  private var outerProperty = Inner().innerProperty // expected-warning {{property should not be declared in this context because its type 'SR2579.Inner.InnerPrivateType' uses a private type}}
+  var outerProperty2 = Inner().innerProperty // expected-warning {{property should be declared private because its type 'SR2579.Inner.InnerPrivateType' uses a private type}}
+}
diff --git a/test/Compatibility/anyobject.swift b/test/Compatibility/anyobject.swift
new file mode 100644
index 0000000..10bf0c9
--- /dev/null
+++ b/test/Compatibility/anyobject.swift
@@ -0,0 +1,10 @@
+// RUN: %target-typecheck-verify-swift -swift-version 3
+
+protocol P { }
+protocol Q { }
+
+class Foo: AnyObject { } // expected-warning{{conformance of class 'Foo' to 'AnyObject' is redundant}}{{10-21=}}
+
+class Bar: AnyObject, P { } // expected-warning{{conformance of class 'Bar' to 'AnyObject' is redundant}}{{12-23=}}
+
+class Wibble: Bar, AnyObject, Q { } // expected-warning{{conformance of class 'Wibble' to 'AnyObject' is redundant}}{{18-29=}}
diff --git a/test/Compatibility/bridging-nsnumber-and-nsvalue.swift.gyb b/test/Compatibility/bridging-nsnumber-and-nsvalue.swift.gyb
index 11d60b0..a140a00 100644
--- a/test/Compatibility/bridging-nsnumber-and-nsvalue.swift.gyb
+++ b/test/Compatibility/bridging-nsnumber-and-nsvalue.swift.gyb
@@ -45,7 +45,6 @@
   }
 }
 extension Hashable { public var hashValue: Int { fatalError("trill hiphy") } }
-extension NSRange: Hashable {}
 extension CGSize: Hashable {}
 extension CGPoint: Hashable {}
 extension CGRect: Hashable {}
diff --git a/test/Compatibility/range_hashable.swift b/test/Compatibility/range_hashable.swift
new file mode 100644
index 0000000..c31f693
--- /dev/null
+++ b/test/Compatibility/range_hashable.swift
@@ -0,0 +1,9 @@
+// RUN: %target-typecheck-verify-swift -swift-version 3
+
+// REQUIRES: objc_interop
+
+import Foundation
+
+extension NSRange : Hashable { // expected-warning{{conformance of '_NSRange' to protocol 'Hashable' was already stated in the type's module 'Foundation'}}
+  var hashValue: Int { return 0 } // expected-note{{var 'hashValue' will not be used to satisfy the conformance to 'Hashable'}}
+}
diff --git a/test/Compatibility/tuple_arguments.swift b/test/Compatibility/tuple_arguments.swift
index bf720ab..e12dc5c 100644
--- a/test/Compatibility/tuple_arguments.swift
+++ b/test/Compatibility/tuple_arguments.swift
@@ -621,9 +621,10 @@
 }
 
 do {
-  var a = 3 // expected-warning {{variable 'a' was never mutated; consider changing to 'let' constant}}
-  var b = 4 // expected-warning {{variable 'b' was never mutated; consider changing to 'let' constant}}
-  var d = (a, b) // expected-warning {{variable 'd' was never mutated; consider changing to 'let' constant}}
+  // TODO: Restore regressed diagnostics rdar://problem/31724211
+  var a = 3 // e/xpected-warning {{variable 'a' was never mutated; consider changing to 'let' constant}}
+  var b = 4 // e/xpected-warning {{variable 'b' was never mutated; consider changing to 'let' constant}}
+  var d = (a, b) // e/xpected-warning {{variable 'd' was never mutated; consider changing to 'let' constant}}
 
   var s1 = SubscriptTwo()
   _ = s1[a, b]
@@ -1046,7 +1047,8 @@
 }
 
 struct GenericSubscript<T> {
-  subscript(_ x: T) -> Int { get { return 0 } set { } }
+  // TODO: Restore regressed diagnostics rdar://problem/31724211
+  subscript(_ x: T) -> Int { get { return 0 } set { } } // expected-note* {{}}
 }
 
 struct GenericSubscriptLabeled<T> {
@@ -1054,7 +1056,7 @@
 }
 
 struct GenericSubscriptTwo<T> {
-  subscript(_ x: T, _ y: T) -> Int { get { return 0 } set { } } // expected-note {{'subscript' declared here}}
+  subscript(_ x: T, _ y: T) -> Int { get { return 0 } set { } } // expected-note 3 {{'subscript' declared here}}
 }
 
 struct GenericSubscriptTuple<T> {
@@ -1068,7 +1070,8 @@
 do {
   let s1 = GenericSubscript<(Double, Double)>()
   _ = s1[3.0, 4.0]
-  _ = s1[(3.0, 4.0)] // expected-error {{expression type 'Int' is ambiguous without more context}}
+  // TODO: Restore regressed diagnostics rdar://problem/31724211
+  _ = s1[(3.0, 4.0)] // expected-error {{}}
 
   let s1a  = GenericSubscriptLabeled<(Double, Double)>()
   _ = s1a [x: 3.0, 4.0] // expected-error {{extra argument in call}}
@@ -1109,19 +1112,22 @@
 }
 
 do {
-  var a = 3.0 // expected-warning {{variable 'a' was never mutated; consider changing to 'let' constant}}
-  var b = 4.0 // expected-warning {{variable 'b' was never mutated; consider changing to 'let' constant}}
-  var d = (a, b) // expected-warning {{variable 'd' was never mutated; consider changing to 'let' constant}}
+  // TODO: Restore regressed diagnostics rdar://problem/31724211
+  var a = 3.0 // e/xpected-warning {{variable 'a' was never mutated; consider changing to 'let' constant}}
+  var b = 4.0 // e/xpected-warning {{variable 'b' was never mutated; consider changing to 'let' constant}}
+  var d = (a, b) // e/xpected-warning {{variable 'd' was never mutated; consider changing to 'let' constant}}
 
   var s1 = GenericSubscript<(Double, Double)>()
   _ = s1[a, b]
-  _ = s1[(a, b)] // expected-error {{expression type '@lvalue Int' is ambiguous without more context}}
-  _ = s1[d] // expected-error {{expression type '@lvalue Int' is ambiguous without more context}}
+  // TODO: Restore regressed diagnostics rdar://problem/31724211
+  // These two lines give different regressed behavior in S3 and S4 mode
+  // _ = s1[(a, b)] // e/xpected-error {{expression type '@lvalue Int' is ambiguous without more context}}
+  // _ = s1[d] // e/xpected-error {{expression type '@lvalue Int' is ambiguous without more context}}
 
   var s2 = GenericSubscriptTwo<Double>()
   _ = s2[a, b]
-  _ = s2[(a, b)] // expected-error {{cannot convert value of type '(Double, Double)' to expected argument type '(_, _)'}}
-  _ = s2[d] // expected-error {{cannot convert value of type '(Double, Double)' to expected argument type '(_, _)'}}
+  _ = s2[(a, b)] // expected-error {{missing argument for parameter #2 in call}}
+  _ = s2[d] // expected-error {{missing argument for parameter #2 in call}}
 
   var s3 = GenericSubscriptTuple<Double>()
   _ = s3[a, b] // expected-error {{extra argument in call}}
diff --git a/test/Constraints/associated_types.swift b/test/Constraints/associated_types.swift
index 6dee6f6..fda2568 100644
--- a/test/Constraints/associated_types.swift
+++ b/test/Constraints/associated_types.swift
@@ -62,8 +62,8 @@
 protocol YReqt {}
 
 protocol SameTypedDefaultWithReqts {
-    associatedtype X: XReqt // expected-note{{}}
-    associatedtype Y: YReqt // expected-note{{}}
+    associatedtype X: XReqt
+    associatedtype Y: YReqt
     static var x: X { get }
     static var y: Y { get }
 }
@@ -86,7 +86,7 @@
 }
 
 protocol SameTypedDefaultBaseWithReqts {
-    associatedtype X: XReqt // expected-note{{}}
+    associatedtype X: XReqt
     static var x: X { get }
 }
 protocol SameTypedDefaultDerivedWithReqts: SameTypedDefaultBaseWithReqts {
diff --git a/test/Constraints/bridging-nsnumber-and-nsvalue.swift.gyb b/test/Constraints/bridging-nsnumber-and-nsvalue.swift.gyb
index b8ca30f..273676e 100644
--- a/test/Constraints/bridging-nsnumber-and-nsvalue.swift.gyb
+++ b/test/Constraints/bridging-nsnumber-and-nsvalue.swift.gyb
@@ -29,7 +29,6 @@
     'CGRect',
     'CGPoint',
     'CGSize',
-    'NSRange',
   ],
 }
 }%
@@ -41,7 +40,6 @@
   }
 }
 extension Hashable { public var hashValue: Int { fatalError("trill hiphy") } }
-extension NSRange: Hashable {}
 extension CGSize: Hashable {}
 extension CGPoint: Hashable {}
 extension CGRect: Hashable {}
diff --git a/test/Constraints/closures.swift b/test/Constraints/closures.swift
index a78ab61..250ca2b 100644
--- a/test/Constraints/closures.swift
+++ b/test/Constraints/closures.swift
@@ -366,7 +366,8 @@
 func r22058555() {
   var firstChar: UInt8 = 0
   "abc".withCString { chars in
-    firstChar = chars[0]  // expected-error {{cannot assign value of type 'Int8' to type 'UInt8'}}
+    // FIXME https://bugs.swift.org/browse/SR-4836: was {{cannot assign value of type 'Int8' to type 'UInt8'}}
+    firstChar = chars[0]  // expected-error {{cannot subscript a value of incorrect or ambiguous type}}
   }
 }
 
@@ -512,8 +513,7 @@
 
 returnsArray().flatMap { $0 }.flatMap { }
 // expected-warning@-1 {{expression of type 'Int' is unused}}
-// expected-warning@-2 {{Please use map instead.}}
-// expected-warning@-3 {{result of call to 'flatMap' is unused}}
+// expected-warning@-2 {{result of call to 'flatMap' is unused}}
 
 // rdar://problem/30271695
 _ = ["hi"].flatMap { $0.isEmpty ? nil : $0 }
diff --git a/test/Constraints/construction.swift b/test/Constraints/construction.swift
index 17a7272..834eff8 100644
--- a/test/Constraints/construction.swift
+++ b/test/Constraints/construction.swift
@@ -139,3 +139,16 @@
 let xx: UInt64 = 100
 let yy = ((xx + 10) - 5) / 5
 let zy = (xx + (10 - 5)) / 5
+
+// rdar://problem/30588177
+struct S3 {
+  init() { }
+}
+
+let s3a = S3()
+
+extension S3 {
+  init?(maybe: S3) { return nil }
+}
+
+let s3b = S3(maybe: s3a)
diff --git a/test/Constraints/diagnostics.swift b/test/Constraints/diagnostics.swift
index f30f5d3..39af4fc 100644
--- a/test/Constraints/diagnostics.swift
+++ b/test/Constraints/diagnostics.swift
@@ -222,7 +222,8 @@
 }
 
 func testStructWithOptionalArray(_ foo: StructWithOptionalArray) -> Int {
-  return foo.array[0]  // expected-error {{value of optional type '[Int]?' not unwrapped; did you mean to use '!' or '?'?}} {{19-19=!}}
+  // TODO: Restore regressed diagnostics rdar://problem/31724211
+  return foo.array[0]  // expected-error {{}}
 }
 
 
@@ -237,7 +238,7 @@
 // <rdar://problem/21553065> Spurious diagnostic: '_' can only appear in a pattern or on the left side of an assignment
 protocol r21553065Protocol {}
 class r21553065Class<T : AnyObject> {}
-_ = r21553065Class<r21553065Protocol>()  // expected-error {{type 'r21553065Protocol' does not conform to protocol 'AnyObject'}}
+_ = r21553065Class<r21553065Protocol>()  // expected-error {{'r21553065Protocol' is not convertible to 'AnyObject'}}
 
 // Type variables not getting erased with nested closures
 struct Toe {
@@ -428,7 +429,7 @@
 let _: (Int) -> (Int, Color) = { ($0, .Unknown("")) } // expected-error {{missing argument label 'description:' in call}} {{48-48=description: }}
 let _: Color = .Unknown("") // expected-error {{missing argument label 'description:' in call}} {{25-25=description: }}
 let _: Color = .Unknown // expected-error {{member 'Unknown' expects argument of type '(description: String)'}}
-let _: Color = .Unknown(42) // expected-error {{cannot convert value of type 'Int' to expected argument type 'String'}}
+let _: Color = .Unknown(42) // expected-error {{missing argument label 'description:' in call}}
 let _ : Color = .rainbow(42)  // expected-error {{argument passed to call that takes no arguments}}
 
 let _ : (Int, Float) = (42.0, 12)  // expected-error {{cannot convert value of type 'Double' to specified type 'Int'}}
@@ -440,10 +441,11 @@
 // expected-note @-1 {{overloads for 'overload' exist with these partially matching parameter lists: (a: Int), (b: Int)}}
 let _: Color = .overload(1)  // expected-error {{ambiguous reference to member 'overload'}}
 // expected-note @-1 {{overloads for 'overload' exist with these partially matching parameter lists: (a: Int), (b: Int)}}
-let _: Color = .frob(1.0, &i) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}}
-let _: Color = .frob(1, i)  // expected-error {{passing value of type 'Int' to an inout parameter requires explicit '&'}}
+let _: Color = .frob(1.0, &i) // expected-error {{missing argument label 'b:' in call}}
+let _: Color = .frob(1.0, b: &i) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}}
+let _: Color = .frob(1, i)  // expected-error {{missing argument label 'b:' in call}}
 let _: Color = .frob(1, b: i)  // expected-error {{passing value of type 'Int' to an inout parameter requires explicit '&'}}
-let _: Color = .frob(1, &d) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}}
+let _: Color = .frob(1, &d) // expected-error {{missing argument label 'b:' in call}}
 let _: Color = .frob(1, b: &d) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}}
 var someColor : Color = .red // expected-error {{enum type 'Color' has no case 'red'; did you mean 'Red'}}
 someColor = .red  // expected-error {{enum type 'Color' has no case 'red'; did you mean 'Red'}}
@@ -930,3 +932,38 @@
 // expected-note@-1 {{overloads for '+' exist with these partially matching parameter lists: (Double, Double), (Int, Int), (Int, UnsafeMutablePointer<Pointee>), (Int, UnsafePointer<Pointee>)}}
 let _ = ((r29850459_flag || r29850459()) ? r29850459_a : r29850459_b) + 42.0 // expected-error {{binary operator '+' cannot be applied to operands of type 'Int' and 'Double'}}
 // expected-note@-1 {{overloads for '+' exist with these partially matching parameter lists: (Double, Double), (Int, Int), (Int, UnsafeMutablePointer<Pointee>), (Int, UnsafePointer<Pointee>)}}
+
+// Ambiguous overload inside a trailing closure
+
+func ambiguousCall() -> Int {} // expected-note {{found this candidate}}
+func ambiguousCall() -> Float {} // expected-note {{found this candidate}}
+
+func takesClosure(fn: () -> ()) {}
+
+takesClosure() { ambiguousCall() } // expected-error {{ambiguous use of 'ambiguousCall()'}}
+
+// SR-4692: Useless diagnostics calling non-static method
+
+class SR_4692_a {
+  private static func foo(x: Int, y: Bool) {
+    self.bar(x: x)
+    // expected-error@-1 {{instance member 'bar' cannot be used on type 'SR_4692_a'}}
+  }
+
+  private func bar(x: Int) {
+  }
+}
+
+class SR_4692_b {
+  static func a() {
+    self.f(x: 3, y: true)
+    // expected-error@-1 {{instance member 'f' cannot be used on type 'SR_4692_b'}}
+  }
+
+  private func f(a: Int, b: Bool, c: String) {
+    self.f(x: a, y: b)
+  }
+
+  private func f(x: Int, y: Bool) {
+  }
+}
\ No newline at end of file
diff --git a/test/Constraints/diagnostics_swift4.swift b/test/Constraints/diagnostics_swift4.swift
index eb1caeb..2552169 100644
--- a/test/Constraints/diagnostics_swift4.swift
+++ b/test/Constraints/diagnostics_swift4.swift
@@ -26,3 +26,13 @@
 
 let c_2505 = C_2505(arg: [C2_2505()]) // expected-error {{argument labels '(arg:)' do not match any available overloads}} expected-note {{overloads for 'C_2505' exist}}
 
+// rdar://problem/31898542 - Swift 4: 'type of expression is ambiguous without more context' errors, without a fixit
+
+enum R31898542<T> {
+  case success(T) // expected-note {{'success' declared here}}
+  case failure
+}
+
+func foo() -> R31898542<()> {
+  return .success() // expected-error {{missing argument for parameter #1 in call}} {{19-19=<#T#>}}
+}
\ No newline at end of file
diff --git a/test/Constraints/dynamic_lookup.swift b/test/Constraints/dynamic_lookup.swift
index 0e13502..3dde136 100644
--- a/test/Constraints/dynamic_lookup.swift
+++ b/test/Constraints/dynamic_lookup.swift
@@ -199,7 +199,7 @@
 
 var obj2 : AnyObject & P = Y()
 
-class Z2 : AnyObject { }
+class Z2 { }
 class Z3<T : AnyObject> { }
 class Z4<T> where T : AnyObject { }
 
diff --git a/test/Constraints/function_conversion.swift b/test/Constraints/function_conversion.swift
new file mode 100644
index 0000000..695a062
--- /dev/null
+++ b/test/Constraints/function_conversion.swift
@@ -0,0 +1,38 @@
+// RUN: %target-typecheck-verify-swift -swift-version 3
+// RUN: %target-typecheck-verify-swift -swift-version 4
+
+// rdar://problem/31969605
+
+class Base {}
+class Derived : Base {}
+
+protocol Refined {}
+protocol Proto : Refined {}
+extension Base : Refined {}
+
+func baseFn(_: Base) {}
+
+func superclassConversion(fn: @escaping (Base) -> ()) {
+  let _: (Derived) -> () = fn
+}
+
+func existentialConversion(fn: @escaping (Refined) -> ()) {
+  let _: (Proto) -> () = fn
+  let _: (Base) -> () = fn
+  let _: (Derived) -> () = fn
+}
+
+// rdar://problem/31725325
+
+func a<b>(_: [(String, (b) -> () -> Void)]) {}
+func a<b>(_: [(String, (b) -> () throws -> Void)]) {}
+
+class c {
+  func e() {}
+  static var d = [("", e)]
+}
+a(c.d)
+
+func b<T>(_: (T) -> () -> ()) {}
+
+b(c.e)
diff --git a/test/Constraints/generics.swift b/test/Constraints/generics.swift
index 125be6e..d6613f5 100644
--- a/test/Constraints/generics.swift
+++ b/test/Constraints/generics.swift
@@ -299,11 +299,11 @@
   _ = FullyGeneric<Any>()
 
   _ = AnyClassBound() // expected-error {{generic parameter 'Foo' could not be inferred}} expected-note {{explicitly specify the generic arguments to fix this issue}} {{20-20=<AnyObject>}}
-  _ = AnyClassBound<Any>() // expected-error {{type 'Any' does not conform to protocol 'AnyObject'}}
+  _ = AnyClassBound<Any>() // expected-error {{'Any' is not convertible to 'AnyObject'}}
   _ = AnyClassBound<AnyObject>()
 
   _ = AnyClassBound2() // expected-error {{generic parameter 'Foo' could not be inferred}} expected-note {{explicitly specify the generic arguments to fix this issue}} {{21-21=<AnyObject>}}
-  _ = AnyClassBound2<Any>() // expected-error {{type 'Any' does not conform to protocol 'AnyObject'}}
+  _ = AnyClassBound2<Any>() // expected-error {{'Any' is not convertible to 'AnyObject'}}
   _ = AnyClassBound2<AnyObject>()
 
   _ = ProtoBound() // expected-error {{generic parameter 'Foo' could not be inferred}} expected-note {{explicitly specify the generic arguments to fix this issue}} {{17-17=<<#Foo: SubProto#>>}}
@@ -324,8 +324,8 @@
   _ = ProtosBound2() // expected-error {{generic parameter 'Foo' could not be inferred}} expected-note {{explicitly specify the generic arguments to fix this issue}} {{19-19=<<#Foo: NSCopyish & SubProto#>>}}
   _ = ProtosBound3() // expected-error {{generic parameter 'Foo' could not be inferred}} expected-note {{explicitly specify the generic arguments to fix this issue}} {{19-19=<<#Foo: NSCopyish & SubProto#>>}}
 
-  _ = AnyClassAndProtoBound() // expected-error {{generic parameter 'Foo' could not be inferred}} expected-note {{explicitly specify the generic arguments to fix this issue}} {{28-28=<<#Foo: AnyObject & SubProto#>>}}
-  _ = AnyClassAndProtoBound2() // expected-error {{generic parameter 'Foo' could not be inferred}} expected-note {{explicitly specify the generic arguments to fix this issue}} {{29-29=<<#Foo: AnyObject & SubProto#>>}}
+  _ = AnyClassAndProtoBound() // expected-error {{generic parameter 'Foo' could not be inferred}} expected-note {{explicitly specify the generic arguments to fix this issue}} {{28-28=<<#Foo: SubProto & AnyObject#>>}}
+  _ = AnyClassAndProtoBound2() // expected-error {{generic parameter 'Foo' could not be inferred}} expected-note {{explicitly specify the generic arguments to fix this issue}} {{29-29=<<#Foo: SubProto & AnyObject#>>}}
 
   _ = ClassAndProtoBound() // expected-error {{generic parameter 'Foo' could not be inferred}} expected-note {{explicitly specify the generic arguments to fix this issue}} {{25-25=<<#Foo: X & SubProto#>>}}
 
diff --git a/test/Constraints/lvalues.swift b/test/Constraints/lvalues.swift
index 29b980d..53ef06a 100644
--- a/test/Constraints/lvalues.swift
+++ b/test/Constraints/lvalues.swift
@@ -232,3 +232,13 @@
 }
 r23331567 { $0 += 1 }
 
+// <rdar://problem/30685195> Compiler crash with invalid assignment
+struct G<T> {
+  subscript(x: Int) -> T { get { } nonmutating set { } }
+  // expected-note@-1 {{'subscript' declared here}}
+}
+
+func wump<T>(to: T, _ body: (G<T>) -> ()) {}
+
+wump(to: 0, { $0[] = 0 })
+// expected-error@-1 {{missing argument for parameter #1 in call}}
diff --git a/test/Constraints/members.swift b/test/Constraints/members.swift
index 3636ea4..09bf137 100644
--- a/test/Constraints/members.swift
+++ b/test/Constraints/members.swift
@@ -7,9 +7,9 @@
 struct X {
   func f0(_ i: Int) -> X { }
 
-  func f1(_ i: Int) { } // expected-note {{found this candidate}}
+  func f1(_ i: Int) { }
 
-  mutating func f1(_ f: Float) { } // expected-note {{found this candidate}}
+  mutating func f1(_ f: Float) { }
 
   func f2<T>(_ x: T) -> T { }
 }
@@ -28,9 +28,7 @@
 _ = x.f0(i)
 x.f0(i).f1(i)
 
-// FIXME: Is this a bug in Swift 4 mode?
 g0(X.f1)
-// expected-error@-1 {{ambiguous reference to member 'f1'}}
 
 _ = x.f0(x.f2(1))
 _ = x.f0(1).f2(i)
diff --git a/test/Constraints/overload.swift b/test/Constraints/overload.swift
index c25ee5f..05338ee 100644
--- a/test/Constraints/overload.swift
+++ b/test/Constraints/overload.swift
@@ -209,3 +209,16 @@
 	let _: (X1a) -> Void = f6
 	let _: (X1a) -> X6 = X6.init
 }
+
+func curry<LHS, RHS, R>(_ f: @escaping (LHS, RHS) -> R) -> (LHS) -> (RHS) -> R {
+  return { lhs in { rhs in f(lhs, rhs) } }
+}
+
+// We need to have an alternative version of this to ensure that there's an overload disjunction created.
+func curry<F, S, T, R>(_ f: @escaping (F, S, T) -> R) -> (F) -> (S) -> (T) -> R {
+  return { fst in { snd in { thd in f(fst, snd, thd) } } }
+}
+
+// Ensure that we consider these unambiguous
+let _ = curry(+)(1)
+let _ = [0].reduce(0, +)
diff --git a/test/Constraints/tuple.swift b/test/Constraints/tuple.swift
index f607e6f..85fe9f1 100644
--- a/test/Constraints/tuple.swift
+++ b/test/Constraints/tuple.swift
@@ -213,3 +213,22 @@
 let _ = (x, (y, 0))
 takesRValue((x, (y, 0)))
 takesAny((x, (y, 0)))
+
+// SR-2600 - Closure cannot infer tuple parameter names
+typealias Closure<A, B> = ((a: A, b: B)) -> String
+
+func invoke<A, B>(a: A, b: B, _ closure: Closure<A,B>) {
+  print(closure((a, b)))
+}
+
+invoke(a: 1, b: "B") { $0.b }
+
+invoke(a: 1, b: "B") { $0.1 }
+
+invoke(a: 1, b: "B") { (c: (a: Int, b: String)) in
+  return c.b
+}
+
+invoke(a: 1, b: "B") { c in
+  return c.b
+}
diff --git a/test/Constraints/tuple_arguments.swift b/test/Constraints/tuple_arguments.swift
index e95b5d6..be84e3e 100644
--- a/test/Constraints/tuple_arguments.swift
+++ b/test/Constraints/tuple_arguments.swift
@@ -606,9 +606,10 @@
 }
 
 do {
-  var a = 3 // expected-warning {{variable 'a' was never mutated; consider changing to 'let' constant}}
-  var b = 4 // expected-warning {{variable 'b' was never mutated; consider changing to 'let' constant}}
-  var d = (a, b) // expected-warning {{variable 'd' was never mutated; consider changing to 'let' constant}}
+  // TODO: Restore regressed diagnostics rdar://problem/31724211
+  var a = 3 // e/xpected-warning {{variable 'a' was never mutated; consider changing to 'let' constant}}
+  var b = 4 // e/xpected-warning {{variable 'b' was never mutated; consider changing to 'let' constant}}
+  var d = (a, b) // e/xpected-warning {{variable 'd' was never mutated; consider changing to 'let' constant}}
 
   var s1 = SubscriptTwo()
   _ = s1[a, b]
@@ -1039,7 +1040,7 @@
 }
 
 struct GenericSubscriptTwo<T> {
-  subscript(_ x: T, _ y: T) -> Int { get { return 0 } set { } } // expected-note {{'subscript' declared here}}
+  subscript(_ x: T, _ y: T) -> Int { get { return 0 } set { } } // expected-note 5 {{'subscript' declared here}}
 }
 
 struct GenericSubscriptLabeledTuple<T> {
@@ -1084,8 +1085,8 @@
 
   let s2 = GenericSubscriptTwo<Double>()
   _ = s2[a, b]
-  _ = s2[(a, b)] // expected-error {{cannot convert value of type '(Double, Double)' to expected argument type '(_, _)'}}
-  _ = s2[d] // expected-error {{cannot convert value of type '(Double, Double)' to expected argument type '(_, _)'}}
+  _ = s2[(a, b)] // expected-error {{missing argument for parameter #2 in call}}
+  _ = s2[d] // expected-error {{missing argument for parameter #2 in call}}
 
   let s3 = GenericSubscriptTuple<Double>()
   _ = s3[a, b] // expected-error {{extra argument in call}}
@@ -1094,9 +1095,10 @@
 }
 
 do {
-  var a = 3.0 // expected-warning {{variable 'a' was never mutated; consider changing to 'let' constant}}
-  var b = 4.0 // expected-warning {{variable 'b' was never mutated; consider changing to 'let' constant}}
-  var d = (a, b) // expected-warning {{variable 'd' was never mutated; consider changing to 'let' constant}}
+  // TODO: Restore regressed diagnostics rdar://problem/31724211
+  var a = 3.0 // e/xpected-warning {{variable 'a' was never mutated; consider changing to 'let' constant}}
+  var b = 4.0 // e/xpected-warning {{variable 'b' was never mutated; consider changing to 'let' constant}}
+  var d = (a, b) // e/xpected-warning {{variable 'd' was never mutated; consider changing to 'let' constant}}
 
   var s1 = GenericSubscript<(Double, Double)>()
   _ = s1[a, b] // expected-error {{extra argument in call}}
@@ -1105,8 +1107,8 @@
 
   var s2 = GenericSubscriptTwo<Double>()
   _ = s2[a, b]
-  _ = s2[(a, b)] // expected-error {{cannot convert value of type '(Double, Double)' to expected argument type '(_, _)'}}
-  _ = s2[d] // expected-error {{cannot convert value of type '(Double, Double)' to expected argument type '(_, _)'}}
+  _ = s2[(a, b)] // expected-error {{missing argument for parameter #2 in call}}
+  _ = s2[d] // expected-error {{missing argument for parameter #2 in call}}
 
   var s3 = GenericSubscriptTuple<Double>()
   _ = s3[a, b] // expected-error {{extra argument in call}}
@@ -1336,17 +1338,17 @@
   s.takesClosureTuple({ _ = $0 })
   s.takesClosureTuple({ x in })
   s.takesClosureTuple({ (x: (Double, Double)) in })
-  s.takesClosureTuple({ _ = $0; _ = $1 }) // expected-error {{cannot convert value of type '(_, _) -> ()' to expected argument type '((Double, Double)) -> ()'}}
-  s.takesClosureTuple({ (x, y) in }) // expected-error {{cannot convert value of type '(_, _) -> ()' to expected argument type '((Double, Double)) -> ()'}}
-  s.takesClosureTuple({ (x: Double, y:Double) in }) // expected-error {{cannot convert value of type '(Double, Double) -> ()' to expected argument type '((Double, Double)) -> ()'}}
+  s.takesClosureTuple({ _ = $0; _ = $1 }) // expected-error {{closure tuple parameter '(Double, Double)' does not support destructuring with implicit parameters}}
+  s.takesClosureTuple({ (x, y) in }) // expected-error {{closure tuple parameter '(Double, Double)' does not support destructuring}} {{25-31=(arg)}} {{34-34=let (x, y) = arg; }}
+  s.takesClosureTuple({ (x: Double, y:Double) in }) // expected-error {{closure tuple parameter '(Double, Double)' does not support destructuring}} {{25-46=(arg: (Double, Double))}} {{49-49=let (x, y) = arg; }}
 
   let sTwo = GenericConforms<(Double, Double)>()
   sTwo.takesClosure({ _ = $0 })
   sTwo.takesClosure({ x in })
   sTwo.takesClosure({ (x: (Double, Double)) in })
-  sTwo.takesClosure({ _ = $0; _ = $1 }) // expected-error {{cannot convert value of type '(_, _) -> ()' to expected argument type '((Double, Double)) -> ()'}}
-  sTwo.takesClosure({ (x, y) in }) // expected-error {{cannot convert value of type '(_, _) -> ()' to expected argument type '((Double, Double)) -> ()'}}
-  sTwo.takesClosure({ (x: Double, y: Double) in }) // expected-error {{cannot convert value of type '(Double, Double) -> ()' to expected argument type '((Double, Double)) -> ()'}}
+  sTwo.takesClosure({ _ = $0; _ = $1 }) // expected-error {{closure tuple parameter '(Double, Double)' does not support destructuring with implicit parameters}}
+  sTwo.takesClosure({ (x, y) in }) // expected-error {{closure tuple parameter '(Double, Double)' does not support destructuring}} {{23-29=(arg)}} {{32-32=let (x, y) = arg; }}
+  sTwo.takesClosure({ (x: Double, y: Double) in }) // expected-error {{closure tuple parameter '(Double, Double)' does not support destructuring}} {{23-45=(arg: (Double, Double))}} {{48-48=let (x, y) = arg; }}
 }
 
 do {
@@ -1354,8 +1356,8 @@
   let _: ((Int, Int)) -> () = { _ = ($0.0, $0.1) }
   let _: ((Int, Int)) -> () = { t in _ = (t.0, t.1) }
 
-  let _: ((Int, Int)) -> () = { _ = ($0, $1) } // expected-error {{cannot convert value of type '(_, _) -> ()' to specified type '((Int, Int)) -> ()'}}
-  let _: ((Int, Int)) -> () = { t, u in _ = (t, u) } // expected-error {{cannot convert value of type '(_, _) -> ()' to specified type '((Int, Int)) -> ()'}}
+  let _: ((Int, Int)) -> () = { _ = ($0, $1) } // expected-error {{closure tuple parameter '(Int, Int)' does not support destructuring}}
+  let _: ((Int, Int)) -> () = { t, u in _ = (t, u) } // expected-error {{closure tuple parameter '(Int, Int)' does not support destructuring}} {{33-37=(arg)}} {{41-41=let (t, u) = arg; }}
 
   let _: (Int, Int) -> () = { _ = $0 } // expected-error {{contextual closure type '(Int, Int) -> ()' expects 2 arguments, but 1 was used in closure body}}
   let _: (Int, Int) -> () = { _ = ($0.0, $0.1) } // expected-error {{contextual closure type '(Int, Int) -> ()' expects 2 arguments, but 1 was used in closure body}}
@@ -1455,3 +1457,45 @@
     data: DataSourcePage<Int>.notLoaded,
     totalCount: 0
 ))
+
+// SR-4745
+let sr4745 = [1, 2]
+let _ = sr4745.enumerated().map { (count, element) in "\(count): \(element)" }
+// expected-error@-1 {{closure tuple parameter '(offset: Int, element: Int)' does not support destructuring}} {{35-51=(arg) -> <#Result#>}} {{55-55=let (count, element) = arg; return }}
+
+// SR-4738
+
+let sr4738 = (1, (2, 3))
+[sr4738].map { (x, (y, z)) -> Int in x + y + z } // expected-error {{use of undeclared type 'y'}}
+// expected-error@-1 {{closure tuple parameter does not support destructuring}} {{20-26=arg1}} {{38-38=let (y, z) = arg1; }}
+
+// rdar://problem/31892961
+let r31892961_1 = [1: 1, 2: 2]
+r31892961_1.forEach { (k, v) in print(k + v) }
+// expected-error@-1 {{closure tuple parameter '(key: Int, value: Int)' does not support destructuring}} {{23-29=(arg)}} {{33-33=let (k, v) = arg; }}
+
+let r31892961_2 = [1, 2, 3]
+let _: [Int] = r31892961_2.enumerated().map { ((index, val)) in
+  // expected-error@-1 {{closure tuple parameter does not support destructuring}} {{48-60=arg0}} {{3-3=\n  let (index, val) = arg0\n  }}
+  // expected-error@-2 {{use of undeclared type 'index'}}
+  val + 1
+}
+
+let r31892961_3 = (x: 1, y: 42)
+[r31892961_3].map { (x: Int, y: Int) in x + y }
+// expected-error@-1 {{closure tuple parameter '(x: Int, y: Int)' does not support destructuring}} {{21-37=(arg: (x: Int, y: Int)) -> <#Result#>}} {{41-41=let (x, y) = arg; return }}
+
+[r31892961_3].map { (x, y: Int) in x + y }
+// expected-error@-1 {{closure tuple parameter '(x: Int, y: Int)' does not support destructuring}} {{21-32=(arg: (x: Int, y: Int)) -> <#Result#>}} {{36-36=let (x, y) = arg; return }}
+
+let r31892961_4 = (1, 2)
+[r31892961_4].map { x, y in x + y }
+// expected-error@-1 {{closure tuple parameter '(Int, Int)' does not support destructuring}} {{21-25=(arg) -> <#Result#>}} {{29-29=let (x, y) = arg; return }}
+
+let r31892961_5 = (x: 1, (y: 2, (w: 3, z: 4)))
+[r31892961_5].map { (x: Int, (y: Int, (w: Int, z: Int))) in x + y }
+// expected-error@-1 {{closure tuple parameter does not support destructuring}} {{30-56=arg1}} {{61-61=let (y, (w, z)) = arg1; }}
+
+let r31892961_6 = (x: 1, (y: 2, z: 4))
+[r31892961_6].map { (x: Int, (y: Int, z: Int)) in x + y }
+// expected-error@-1 {{closure tuple parameter does not support destructuring}} {{30-46=arg1}} {{51-51=let (y, z) = arg1; }}
\ No newline at end of file
diff --git a/test/DebugInfo/ImportClangSubmodule.swift b/test/DebugInfo/ImportClangSubmodule.swift
index ff4d274..c2a35fe 100644
--- a/test/DebugInfo/ImportClangSubmodule.swift
+++ b/test/DebugInfo/ImportClangSubmodule.swift
@@ -1,13 +1,16 @@
-// RUN: rm -rf %t && mkdir -p %t
-// REQUIRES: OS=macosx
+// RUN: %target-swift-frontend -emit-ir %s -g -I %S/Inputs \
+// RUN:   -Xcc -DFOO="foo" -Xcc -UBAR -o - | %FileCheck %s
 
-// RUN: %target-swift-frontend -emit-ir %s -g -o - | %FileCheck %s
+// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "Bar",
+// CHECK-SAME:             scope: ![[SUBMODULE:[0-9]+]]
 
-// CHECK: !DIImportedEntity(
-// CHECK: tag: DW_TAG_imported_module{{.*}}entity: ![[C:.*]], line: [[@LINE+1]])
-import Darwin.C
+// CHECK: ![[SUBMODULE]] = !DIModule(scope: ![[CLANGMODULE:[0-9]+]],
+// CHECK-SAME:                       name: "SubModule",
+// CHECK: ![[CLANGMODULE]] = !DIModule(scope: null, name: "ClangModule",
+// CHECK-SAME:                         configMacros:
+// CHECK-SAME:                         {{..}}-DFOO=foo{{..}}
+// CHECK-SAME:                         {{..}}-UBAR{{..}}
+// CHECK: !DIImportedEntity({{.*}}, entity: ![[SUBMODULE]], line: [[@LINE+1]])
+import ClangModule.SubModule
 
-let irrational = sqrt(2 as Double)
-
-// CHECK: ![[C]] = !DIModule(scope: ![[Darwin:.*]], name: "C",
-// CHECK: ![[Darwin]] = !DIModule(scope: null, name: "Darwin",
+let bar = Bar()
diff --git a/test/DebugInfo/Inputs/SubModule.h b/test/DebugInfo/Inputs/SubModule.h
new file mode 100644
index 0000000..be5cba2
--- /dev/null
+++ b/test/DebugInfo/Inputs/SubModule.h
@@ -0,0 +1 @@
+struct Bar {};
diff --git a/test/DebugInfo/Inputs/module.map b/test/DebugInfo/Inputs/module.map
deleted file mode 100644
index 752d569..0000000
--- a/test/DebugInfo/Inputs/module.map
+++ /dev/null
@@ -1,3 +0,0 @@
-module ClangModule {
-  header "ClangModule.h"
-}
diff --git a/test/DebugInfo/Inputs/module.modulemap b/test/DebugInfo/Inputs/module.modulemap
new file mode 100644
index 0000000..d0af8a8
--- /dev/null
+++ b/test/DebugInfo/Inputs/module.modulemap
@@ -0,0 +1,8 @@
+module ClangModule {
+  header "ClangModule.h"
+  export *
+  module SubModule {
+    header "SubModule.h"
+    export *
+  }
+}
diff --git a/test/DebugInfo/guard-let.swift b/test/DebugInfo/guard-let.swift
index e926d2f..06cc206 100644
--- a/test/DebugInfo/guard-let.swift
+++ b/test/DebugInfo/guard-let.swift
@@ -20,10 +20,9 @@
 {
   // CHECK2: define {{.*}}@_T04main1gySSSgF
   // The shadow copy store should not have a location.
-  // CHECK2-64: getelementptr inbounds {{.*}} %s.debug, {{.*}}, !dbg ![[DBG0:.*]]
+  // CHECK2: getelementptr inbounds {{.*}} %s.debug, {{.*}}, !dbg ![[DBG0:.*]]
   // CHECK2: ![[G:.*]] = distinct !DISubprogram(name: "g",
-  // CHECK2-63: ![[DBG0]] = !DILocation(line: 0, scope: ![[G]])
-  // CHECK2-32: ![[DBG0]] = !DILocation(line: 0, scope: !
+  // CHECK2: ![[DBG0]] = !DILocation(line: 0, scope: ![[G]])
   guard let val = s else { return }
   use(val)
 }
diff --git a/test/DebugInfo/test-foundation.swift b/test/DebugInfo/test-foundation.swift
index 6f5d867..00ec545 100644
--- a/test/DebugInfo/test-foundation.swift
+++ b/test/DebugInfo/test-foundation.swift
@@ -18,8 +18,9 @@
   var MyArr = NSArray()
 // IMPORT-CHECK: filename: "test-foundation.swift"
 // IMPORT-CHECK-DAG: [[FOUNDATION:[0-9]+]] = !DIModule({{.*}} name: "Foundation",{{.*}} includePath:
-// IMPORT-CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "NSArray", scope: ![[FOUNDATION]]
-// IMPORT-CHECK-DAG: !DIImportedEntity(tag: DW_TAG_imported_module, {{.*}}entity: ![[FOUNDATION]]
+  // IMPORT-CHECK-DAG: !DICompositeType(tag: DW_TAG_structure_type, name: "NSArray", scope: ![[NSARRAY:[0-9]+]]
+  //  IMPORT-CHECK-DAG: ![[NSARRAY]] = !DIModule(scope: ![[FOUNDATION:[0-9]+]], name: "NSArray"
+  // IMPORT-CHECK-DAG: !DIImportedEntity(tag: DW_TAG_imported_module, {{.*}}entity: ![[FOUNDATION]]
 
   func foo(_ obj: MyObject) {
     return obj.foo(obj)
diff --git a/test/Demangle/Inputs/manglings.txt b/test/Demangle/Inputs/manglings.txt
index c1e3737..bce8c10 100644
--- a/test/Demangle/Inputs/manglings.txt
+++ b/test/Demangle/Inputs/manglings.txt
@@ -25,7 +25,7 @@
 _TtGSQSS_ ---> Swift.String!
 _TtGVs10DictionarySSSi_ ---> [Swift.String : Swift.Int]
 _TtVs7CString ---> Swift.CString
-_TtCSo8NSObject ---> __C.NSObject
+_TtCSo8NSObject ---> __ObjC.NSObject
 _TtO6Monads6Either ---> Monads.Either
 _TtbSiSu ---> @convention(block) (Swift.Int) -> Swift.UInt
 _TtcSiSu ---> @convention(c) (Swift.Int) -> Swift.UInt
@@ -78,11 +78,11 @@
 _TF3foos3barSi ---> foo.bar.setter : Swift.Int
 _TFC3foo3bar3basfT3zimCS_3zim_T_ ---> foo.bar.bas(zim: foo.zim) -> ()
 _TToFC3foo3bar3basfT3zimCS_3zim_T_ ---> {T:_TFC3foo3bar3basfT3zimCS_3zim_T_,C} @objc foo.bar.bas(zim: foo.zim) -> ()
-_TTOFSC3fooFTSdSd_Sd ---> {T:_TFSC3fooFTSdSd_Sd} @nonobjc __C_Synthesized.foo(Swift.Double, Swift.Double) -> Swift.Double
+_TTOFSC3fooFTSdSd_Sd ---> {T:_TFSC3fooFTSdSd_Sd} @nonobjc __C.foo(Swift.Double, Swift.Double) -> Swift.Double
 _T03foo3barC3basyAA3zimCAE_tFTo ---> {T:_T03foo3barC3basyAA3zimCAE_tF,C} @objc foo.bar.bas(zim: foo.zim) -> ()
-_T0SC3fooS2d_SdtFTO ---> {T:_T0SC3fooS2d_SdtF} @nonobjc __C_Synthesized.foo(Swift.Double, Swift.Double) -> Swift.Double
+_T0SC3fooS2d_SdtFTO ---> {T:_T0SC3fooS2d_SdtF} @nonobjc __C.foo(Swift.Double, Swift.Double) -> Swift.Double
 _S3foo3barC3basyAA3zimCAE_tFTo ---> {T:_S3foo3barC3basyAA3zimCAE_tF,C} @objc foo.bar.bas(zim: foo.zim) -> ()
-_SSC3fooS2d_SdtFTO ---> {T:_SSC3fooS2d_SdtF} @nonobjc __C_Synthesized.foo(Swift.Double, Swift.Double) -> Swift.Double
+_SSC3fooS2d_SdtFTO ---> {T:_SSC3fooS2d_SdtF} @nonobjc __C.foo(Swift.Double, Swift.Double) -> Swift.Double
 _TTDFC3foo3bar3basfT3zimCS_3zim_T_ ---> dynamic foo.bar.bas(zim: foo.zim) -> ()
 _TFC3foo3bar3basfT3zimCS_3zim_T_ ---> foo.bar.bas(zim: foo.zim) -> ()
 _TF3foooi1pFTCS_3barVS_3bas_OS_3zim ---> foo.+ infix(foo.bar, foo.bas) -> foo.zim
@@ -120,7 +120,7 @@
 _TWIC3foo3barS_8barrableS_ ---> {C} instantiation function for generic protocol witness table for foo.bar : foo.barrable in foo
 _TWtC3foo3barS_8barrableS_4fred ---> {C} associated type metadata accessor for fred in foo.bar : foo.barrable in foo
 _TWTC3foo3barS_8barrableS_4fredS_6thomas ---> {C} associated type witness table accessor for fred : foo.thomas in foo.bar : foo.barrable in foo
-_TFSCg5greenVSC5Color ---> __C_Synthesized.green.getter : __C_Synthesized.Color
+_TFSCg5greenVSC5Color ---> __C.green.getter : __C.Color
 _TIF1t1fFT1iSi1sSS_T_A_ ---> default argument 0 of t.f(i: Swift.Int, s: Swift.String) -> ()
 _TIF1t1fFT1iSi1sSS_T_A0_ ---> default argument 1 of t.f(i: Swift.Int, s: Swift.String) -> ()
 _TFSqcfT_GSqx_ ---> Swift.Optional.init() -> A?
@@ -169,8 +169,8 @@
 _TFF17capture_promotion22test_capture_promotionFT_FT_SiU_FT_Si_promote0 ---> closure #1 () -> Swift.Int in capture_promotion.test_capture_promotion() -> () -> Swift.Int with unmangled suffix "_promote0"
 _TFIVs8_Processi10_argumentsGSaSS_U_FT_GSaSS_ ---> _arguments : [Swift.String] in variable initialization expression of Swift._Process with unmangled suffix "U_FT_GSaSS_"
 _TFIvVs8_Process10_argumentsGSaSS_iU_FT_GSaSS_ ---> closure #1 () -> [Swift.String] in variable initialization expression of Swift._Process._arguments : [Swift.String]
-_TFCSo1AE ---> __C.A.__ivar_destroyer
-_TFCSo1Ae ---> __C.A.__ivar_initializer
+_TFCSo1AE ---> __ObjC.A.__ivar_destroyer
+_TFCSo1Ae ---> __ObjC.A.__ivar_initializer
 _TTWC13call_protocol1CS_1PS_FS1_3foofT_Si ---> protocol witness for call_protocol.P.foo() -> Swift.Int in conformance call_protocol.C : call_protocol.P in call_protocol
 _T013call_protocol1CCAA1PA2aDP3fooSiyFTW ---> {T:} protocol witness for call_protocol.P.foo() -> Swift.Int in conformance call_protocol.C : call_protocol.P in call_protocol
 _TFC12dynamic_self1X1ffT_DS0_ ---> dynamic_self.X.f() -> Self
@@ -249,7 +249,9 @@
 _T08mangling14varargsVsArrayySaySiG3arrd_SS1ntF ---> mangling.varargsVsArray(arr: Swift.Int..., n: Swift.String) -> ()
 _T08mangling14varargsVsArrayySaySiG3arrd_tF ---> mangling.varargsVsArray(arr: Swift.Int...) -> ()
 _T0s13_UnicodeViewsVss22RandomAccessCollectionRzs0A8EncodingR_11SubSequence_5IndexQZAFRtzsAcERpzAE_AEQZAIRSs15UnsignedInteger8Iterator_7ElementRPzAE_AlMQZANRS13EncodedScalar_AlMQY_AORSr0_lE13CharacterViewVyxq__G ---> (extension in Swift):Swift._UnicodeViews<A, B><A, B where A: Swift.RandomAccessCollection, B: Swift.UnicodeEncoding, A.Index == A.SubSequence.Index, A.SubSequence: Swift.RandomAccessCollection, A.SubSequence == A.SubSequence.SubSequence, A.Iterator.Element: Swift.UnsignedInteger, A.Iterator.Element == A.SubSequence.Iterator.Element, A.SubSequence.Iterator.Element == B.EncodedScalar.Iterator.Element>.CharacterView
-_T010Foundation11MeasurementV12SimulatorKitSo9UnitAngleCRszlE11OrientationO2eeoiSbAcDEAGOyAF_G_AKtFZ ---> static (extension in SimulatorKit):Foundation.Measurement<A where A == __C.UnitAngle>.Orientation.== infix((extension in SimulatorKit):Foundation.Measurement<__C.UnitAngle>.Orientation, (extension in SimulatorKit):Foundation.Measurement<__C.UnitAngle>.Orientation) -> Swift.Bool
+_T010Foundation11MeasurementV12SimulatorKitSo9UnitAngleCRszlE11OrientationO2eeoiSbAcDEAGOyAF_G_AKtFZ ---> static (extension in SimulatorKit):Foundation.Measurement<A where A == __ObjC.UnitAngle>.Orientation.== infix((extension in SimulatorKit):Foundation.Measurement<__ObjC.UnitAngle>.Orientation, (extension in SimulatorKit):Foundation.Measurement<__ObjC.UnitAngle>.Orientation) -> Swift.Bool
 _T04main1_yyF ---> main._() -> ()
 _T04test6testitSiyt_tF ---> test.testit(()) -> Swift.Int
+_T08_ElementQzSbs5Error_pIxxdzo_ABSbsAC_pIxidzo_s26RangeReplaceableCollectionRzABRLClTR -> reabstraction thunk helper <A where A: Swift.RangeReplaceableCollection, A._Element: AnyObject> from @callee_owned (@owned A._Element) -> (@unowned Swift.Bool, @error @owned Swift.Error) to @callee_owned (@in A._Element) -> (@unowned Swift.Bool, @error @owned Swift.Error)
+
 
diff --git a/test/FixCode/Inputs/fixits-enum-multifile.swift b/test/FixCode/Inputs/fixits-enum-multifile.swift
new file mode 100644
index 0000000..c00394f
--- /dev/null
+++ b/test/FixCode/Inputs/fixits-enum-multifile.swift
@@ -0,0 +1,6 @@
+enum EMulti {
+  case e1
+  case e2
+  case e3(Bool)
+}
+
diff --git a/test/FixCode/fixits-empty-switch-multifile.swift b/test/FixCode/fixits-empty-switch-multifile.swift
new file mode 100644
index 0000000..03a0d16
--- /dev/null
+++ b/test/FixCode/fixits-empty-switch-multifile.swift
@@ -0,0 +1,7 @@
+// RUN: not %swift -typecheck -target %target-triple %s %S/Inputs/fixits-enum-multifile.swift -emit-fixits-path %t.remap -I %S/Inputs -diagnostics-editor-mode
+// RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %s.result
+
+func foo1(_ e: EMulti) {
+  switch e {
+  }
+}
diff --git a/test/FixCode/fixits-empty-switch-multifile.swift.result b/test/FixCode/fixits-empty-switch-multifile.swift.result
new file mode 100644
index 0000000..acba965
--- /dev/null
+++ b/test/FixCode/fixits-empty-switch-multifile.swift.result
@@ -0,0 +1,10 @@
+// RUN: not %swift -typecheck -target %target-triple %s %S/Inputs/fixits-enum-multifile.swift -emit-fixits-path %t.remap -I %S/Inputs -diagnostics-editor-mode
+// RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %s.result
+
+func foo1(_ e: EMulti) {
+  switch e {
+  case .e1: <#code#>
+case .e2: <#code#>
+case .e3(_): <#code#>
+}
+}
diff --git a/test/Generics/associated_type_where_clause.swift b/test/Generics/associated_type_where_clause.swift
index a94d6f0..5c936e1 100644
--- a/test/Generics/associated_type_where_clause.swift
+++ b/test/Generics/associated_type_where_clause.swift
@@ -157,3 +157,48 @@
 protocol P5: P3, P4 {
   associatedtype B where B == A?
 }
+
+// Associated type inference should account for where clauses.
+protocol P6 {
+  associatedtype A
+}
+
+struct X1 { }
+
+struct X2 { }
+
+struct Y1 : P6 {
+  typealias A = X1
+}
+
+struct Y2 : P6 {
+  typealias A = X2
+}
+
+protocol P7 {
+  associatedtype B: P6 // expected-note{{ambiguous inference of associated type 'B': 'Y1' vs. 'Y2'}}
+  associatedtype C: P6 where B.A == C.A
+
+  func getB() -> B
+  func getC() -> C
+}
+
+struct Z1 : P7 {
+  func getB() -> Y1 { return Y1() }
+  func getB() -> Y2 { return Y2() }
+
+  func getC() -> Y1 { return Y1() }
+}
+
+func testZ1(z1: Z1) {
+  let _: Z1.C = Y1()
+}
+
+
+struct Z2 : P7 { // expected-error{{type 'Z2' does not conform to protocol 'P7'}}
+  func getB() -> Y1 { return Y1() } // expected-note{{matching requirement 'getB()' to this declaration inferred associated type to 'Y1'}}
+  func getB() -> Y2 { return Y2() } // expected-note{{matching requirement 'getB()' to this declaration inferred associated type to 'Y2'}}
+
+  func getC() -> Y1 { return Y1() }
+  func getC() -> Y2 { return Y2() }
+}
diff --git a/test/Generics/existential_restrictions.swift b/test/Generics/existential_restrictions.swift
index 0e9e1c3..d109ccf 100644
--- a/test/Generics/existential_restrictions.swift
+++ b/test/Generics/existential_restrictions.swift
@@ -61,9 +61,9 @@
   blackHole(GP<P>()) // expected-error{{using 'P' as a concrete type conforming to protocol 'P' is not supported}}
   blackHole(GOP<OP>())
   blackHole(GCP<CP>()) // expected-error{{using 'CP' as a concrete type conforming to protocol 'CP' is not supported}}
-  blackHole(GAO<P>()) // expected-error{{type 'P' does not conform to protocol 'AnyObject'}}
+  blackHole(GAO<P>()) // expected-error{{'P' is not convertible to 'AnyObject'}}
   blackHole(GAO<OP>())
-  blackHole(GAO<CP>()) // expected-error{{using 'CP' as a concrete type conforming to protocol 'AnyObject' is not supported}}
+  blackHole(GAO<CP>()) // expected-error{{'CP' is not convertible to 'AnyObject'}}
   blackHole(GSP<SP>()) // expected-error{{'SP' cannot be used as a type conforming to protocol 'SP' because 'SP' has static requirements}}
   blackHole(GAO<AnyObject>())
 }
diff --git a/test/IDE/Inputs/print_clang_header/Foo.modulemap b/test/IDE/Inputs/print_clang_header/Foo.modulemap
index 76f187e..895cd8e 100644
--- a/test/IDE/Inputs/print_clang_header/Foo.modulemap
+++ b/test/IDE/Inputs/print_clang_header/Foo.modulemap
@@ -1,4 +1,5 @@
 framework module Foo {
   header "header-to-print.h"
   header "other-header.h"
+  export *
 }
diff --git a/test/IDE/Inputs/print_clang_header/header-to-print.h b/test/IDE/Inputs/print_clang_header/header-to-print.h
index ea1c76d..c91373e 100644
--- a/test/IDE/Inputs/print_clang_header/header-to-print.h
+++ b/test/IDE/Inputs/print_clang_header/header-to-print.h
@@ -1,4 +1,5 @@
 #import <Foundation.h>
+#import <CoreFoundation.h>
 @import Dispatch;
 #include "other-header.h"
 
@@ -29,3 +30,5 @@
 @class Cake;
 struct Arkham;
 @protocol Soul;
+
+typedef struct __attribute__((objc_bridge(id))) __MyLittleCFType *MyLittleCFType;
diff --git a/test/IDE/Inputs/print_clang_header/header-to-print.h.command-line-include.printed.txt b/test/IDE/Inputs/print_clang_header/header-to-print.h.command-line-include.printed.txt
new file mode 100644
index 0000000..0edba34
--- /dev/null
+++ b/test/IDE/Inputs/print_clang_header/header-to-print.h.command-line-include.printed.txt
@@ -0,0 +1,30 @@
+import Foundation
+import CoreFoundation
+import Dispatch
+
+var MY_MACRO: Int32 { get }
+
+func doSomethingInHead(_ arg: Int32)
+
+class BaseInHead {
+  class func doIt(_ arg: Int32)
+  func doIt(_ arg: Int32)
+}
+
+/// Awesome name.
+class SameName {
+}
+protocol SameNameProtocol {
+}
+
+extension BaseInHead {
+  class func doItInCategory()
+  func doItInCategory()
+}
+
+protocol Superproto {
+  func lala()
+}
+
+class MyLittleCFType {
+}
diff --git a/test/IDE/Inputs/print_clang_header/header-to-print.h.module.printed.txt b/test/IDE/Inputs/print_clang_header/header-to-print.h.module.printed.txt
index 280f169..c0d06bb 100644
--- a/test/IDE/Inputs/print_clang_header/header-to-print.h.module.printed.txt
+++ b/test/IDE/Inputs/print_clang_header/header-to-print.h.module.printed.txt
@@ -22,3 +22,6 @@
 protocol Superproto {
   func lala()
 }
+
+class MyLittleCFType : _CFObject {
+}
diff --git a/test/IDE/Inputs/print_clang_header/header-to-print.h.printed.txt b/test/IDE/Inputs/print_clang_header/header-to-print.h.printed.txt
index a6df4fe..7511750 100644
--- a/test/IDE/Inputs/print_clang_header/header-to-print.h.printed.txt
+++ b/test/IDE/Inputs/print_clang_header/header-to-print.h.printed.txt
@@ -1,4 +1,5 @@
 import Foundation
+import CoreFoundation
 import Dispatch
 
 var MY_MACRO: Int32 { get }
@@ -24,3 +25,6 @@
 protocol Superproto {
   func lala()
 }
+
+class MyLittleCFType : _CFObject {
+}
diff --git a/test/IDE/annotation.swift b/test/IDE/annotation.swift
index cf1c87c..a528b53 100644
--- a/test/IDE/annotation.swift
+++ b/test/IDE/annotation.swift
@@ -225,7 +225,7 @@
 }
 
 class C9 {}
-// CHECK: func <Func>test6</Func>(_ <Param>o</Param>: <iProtocol@>AnyObject</iProtocol>) {
+// CHECK: func <Func>test6</Func>(_ <Param>o</Param>: <iTypeAlias@>AnyObject</iTypeAlias>) {
 func test6(_ o: AnyObject) {
   // CHECK: let <Var>x</Var> = <Param@[[@LINE-1]]:14>o</Param> as! <Class@[[@LINE-3]]:7>C9</Class>
   let x = o as! C9
diff --git a/test/IDE/complete_decl_attribute.swift b/test/IDE/complete_decl_attribute.swift
index a6815ca..ae75575 100644
--- a/test/IDE/complete_decl_attribute.swift
+++ b/test/IDE/complete_decl_attribute.swift
@@ -58,7 +58,7 @@
 @#^KEYWORD3^#
 class C {}
 
-// KEYWORD3:                  Begin completions, 8 items
+// KEYWORD3:                  Begin completions, 10 items
 // KEYWORD3-NEXT:             Keyword/None:                       available[#Class Attribute#]; name=available{{$}}
 // KEYWORD3-NEXT:             Keyword/None:                       objc[#Class Attribute#]; name=objc{{$}}
 // KEYWORD3-NEXT:             Keyword/None:                       IBDesignable[#Class Attribute#]; name=IBDesignable{{$}}
@@ -67,6 +67,8 @@
 // KEYWORD3-NEXT:             Keyword/None:                       objcMembers[#Class Attribute#]; name=objcMembers{{$}}
 // KEYWORD3-NEXT:             Keyword/None:                       NSApplicationMain[#Class Attribute#]; name=NSApplicationMain{{$}}
 // KEYWORD3-NEXT:             Keyword/None:                       objc_non_lazy_realization[#Class Attribute#]; name=objc_non_lazy_realization{{$}}
+// KEYWORD3-NEXT:             Keyword/None:                       NSKeyedArchiveLegacy[#Class Attribute#]; name=NSKeyedArchiveLegacy{{$}}
+// KEYWORD3-NEXT:             Keyword/None:                       NSKeyedArchiveSubclassesOnly[#Class Attribute#]; name=NSKeyedArchiveSubclassesOnly{{$}}
 // KEYWORD3-NEXT:             End completions
 
 @#^KEYWORD4^#
@@ -86,7 +88,7 @@
 
 @#^KEYWORD_LAST^#
 
-// KEYWORD_LAST:                  Begin completions, 21 items
+// KEYWORD_LAST:                  Begin completions, 23 items
 // KEYWORD_LAST-NEXT:             Keyword/None:                       available[#Declaration Attribute#]; name=available{{$}}
 // KEYWORD_LAST-NEXT:             Keyword/None:                       objc[#Declaration Attribute#]; name=objc{{$}}
 // KEYWORD_LAST-NEXT:             Keyword/None:                       noreturn[#Declaration Attribute#]; name=noreturn{{$}}
@@ -108,4 +110,6 @@
 // KEYWORD_LAST-NEXT:             Keyword/None:                       warn_unqualified_access[#Declaration Attribute#]; name=warn_unqualified_access
 // KEYWORD_LAST-NEXT:             Keyword/None:                       discardableResult[#Declaration Attribute#]; name=discardableResult
 // KEYWORD_LAST-NEXT:             Keyword/None:                       GKInspectable[#Declaration Attribute#]; name=GKInspectable{{$}}
+// KEYWORD_LAST-NEXT:             Keyword/None:                       NSKeyedArchiveLegacy[#Declaration Attribute#]; name=NSKeyedArchiveLegacy{{$}}
+// KEYWORD_LAST-NEXT:             Keyword/None:                       NSKeyedArchiveSubclassesOnly[#Declaration Attribute#]; name=NSKeyedArchiveSubclassesOnly{{$}}
 // KEYWORD_LAST-NEXT:             End completions
diff --git a/test/IDE/complete_swift_key_path.swift b/test/IDE/complete_swift_key_path.swift
new file mode 100644
index 0000000..cc70455
--- /dev/null
+++ b/test/IDE/complete_swift_key_path.swift
@@ -0,0 +1,45 @@
+// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PART_1 | %FileCheck %s -check-prefix=PERSON-MEMBER
+// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PART_2 | %FileCheck %s -check-prefix=PERSON-MEMBER
+// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PART_3 | %FileCheck %s -check-prefix=PERSON-MEMBER
+
+// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PART_5 | %FileCheck %s -check-prefix=PERSON-MEMBER
+// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PART_6 | %FileCheck %s -check-prefix=PERSON-MEMBER
+// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PART_7 | %FileCheck %s -check-prefix=PERSON-MEMBER
+// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PART_8 | %FileCheck %s -check-prefix=PERSON-MEMBER
+// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PART_9 | %FileCheck %s -check-prefix=PERSON-MEMBER
+// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PART_10 | %FileCheck %s -check-prefix=PERSON-MEMBER
+// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PART_11 | %FileCheck %s -check-prefix=PERSON-MEMBER
+
+class Person {
+    var name: String
+    var friends: [Person] = []
+    var bestFriend: Person? = nil
+    init(name: String) {
+        self.name = name
+    }
+    func getName() -> String { return name }
+    subscript(_ index: Int) -> Int { get { return 1} }
+}
+
+let keyPath1 = \Person.#^PART_1^#
+let keyPath2 = \Person.friends[0].#^PART_2^#
+let keyPath3 = \Person.friends[0].friends[0].friends[0].#^PART_3^#
+
+// FIXME: the optionality keypath should work after our compiler is ready.
+let keyPath4 = \Person.bestFriend?.#^PART_4^#
+let keyPath5 = \Person.friends.[0].friends[0].friends[0].#^PART_5^#
+let keyPath6 = \[Person].[0].#^PART_6^#
+let keyPath7 = \[Person].[0].friends[0].#^PART_7^#
+
+func foo1(_ p : Person) {
+  _ = p[keyPath:\Person.#^PART_8^#]
+  _ = p[keyPath:\Person.friends[0].#^PART_9^#]
+  _ = p[keyPath:\[Person].[0].#^PART_10^#]
+  _ = p[keyPath:\Person.friends.[0].friends[0].friends[0].#^PART_11^#]
+}
+
+// PERSON-MEMBER: Begin completions, 4 items
+// PERSON-MEMBER-NEXT: Decl[InstanceVar]/CurrNominal:      name[#String#]; name=name
+// PERSON-MEMBER-NEXT: Decl[InstanceVar]/CurrNominal:      friends[#[Person]#]; name=friends
+// PERSON-MEMBER-NEXT: Decl[InstanceVar]/CurrNominal:      bestFriend[#Person?#]; name=bestFriend 
+// PERSON-MEMBER-NEXT: Decl[Subscript]/CurrNominal:        [{#Int#}][#Int#]; name=[Int]
diff --git a/test/IDE/complete_with_header_import.swift b/test/IDE/complete_with_header_import.swift
index 2da9189..3ba7ab9 100644
--- a/test/IDE/complete_with_header_import.swift
+++ b/test/IDE/complete_with_header_import.swift
@@ -4,6 +4,11 @@
 // RUN: %target-swift-ide-test -code-completion -pch-output-dir %t -source-filename %s -code-completion-token=TOP -import-objc-header %S/Inputs/header.h | %FileCheck %s -check-prefix=CHECK-TOP
 // RUN: %target-swift-ide-test -code-completion -pch-output-dir %t -source-filename %s -code-completion-token=TYPE -import-objc-header %S/Inputs/header.h | %FileCheck %s -check-prefix=CHECK-TYPE
 // RUN: stat %t/*.pch
+// RUN: cp %S/Inputs/header.h %t
+// RUN: %target-swift-ide-test -code-completion -pch-output-dir %t/pch -source-filename %s -code-completion-token=TOP -import-objc-header %t/header.h | %FileCheck %s -check-prefix=CHECK-TOP
+// RUN: stat %t/pch/*.pch
+// RUN: echo '// new stuff' >> %t/header.h
+// RUN: %target-swift-ide-test -code-completion -pch-output-dir %t/pch -source-filename %s -code-completion-token=TOP -import-objc-header %t/header.h | %FileCheck %s -check-prefix=CHECK-TOP
 
 // REQUIRES: objc_interop
 
diff --git a/test/IDE/newtype.swift b/test/IDE/newtype.swift
index 364a19f..c9316b3 100644
--- a/test/IDE/newtype.swift
+++ b/test/IDE/newtype.swift
@@ -6,7 +6,7 @@
 // RUN: %target-typecheck-verify-swift -sdk %clang-importer-sdk -I %S/Inputs/custom-modules -I %t
 // REQUIRES: objc_interop
 
-// PRINT-LABEL: struct ErrorDomain : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, Comparable, _ObjectiveCBridgeable {
+// PRINT-LABEL: struct ErrorDomain : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, _ObjectiveCBridgeable {
 // PRINT-NEXT:    init(_ rawValue: String)
 // PRINT-NEXT:    init(rawValue: String)
 // PRINT-NEXT:    var _rawValue: NSString
@@ -28,7 +28,7 @@
 // PRINT-NEXT:  extension Food {
 // PRINT-NEXT:    static let err: ErrorDomain
 // PRINT-NEXT:  }
-// PRINT-NEXT:  struct ClosedEnum : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, Comparable, _ObjectiveCBridgeable {
+// PRINT-NEXT:  struct ClosedEnum : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, _ObjectiveCBridgeable {
 // PRINT-NEXT:    init(rawValue: String)
 // PRINT-NEXT:    var _rawValue: NSString
 // PRINT-NEXT:    var rawValue: String { get }
@@ -40,7 +40,7 @@
 // PRINT-NEXT:    static let secondEntry: ClosedEnum
 // PRINT-NEXT:    static let thirdEntry: ClosedEnum
 // PRINT-NEXT:  }
-// PRINT-NEXT:  struct IUONewtype : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, Comparable, _ObjectiveCBridgeable {
+// PRINT-NEXT:  struct IUONewtype : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, _ObjectiveCBridgeable {
 // PRINT-NEXT:    init(_ rawValue: String)
 // PRINT-NEXT:    init(rawValue: String)
 // PRINT-NEXT:    var _rawValue: NSString
@@ -48,7 +48,7 @@
 // PRINT-NEXT:    typealias RawValue = String
 // PRINT-NEXT:    typealias _ObjectiveCType = NSString
 // PRINT-NEXT:  }
-// PRINT-NEXT:  struct MyFloat : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, Comparable {
+// PRINT-NEXT:  struct MyFloat : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable {
 // PRINT-NEXT:    init(_ rawValue: Float)
 // PRINT-NEXT:    init(rawValue: Float)
 // PRINT-NEXT:    let rawValue: Float
@@ -60,7 +60,7 @@
 // PRINT-NEXT:    static let version: MyFloat{{$}}
 // PRINT-NEXT:  }
 //
-// PRINT-LABEL: struct MyInt : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, Comparable {
+// PRINT-LABEL: struct MyInt : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable {
 // PRINT-NEXT:    init(_ rawValue: Int32)
 // PRINT-NEXT:    init(rawValue: Int32)
 // PRINT-NEXT:    let rawValue: Int32
@@ -87,7 +87,7 @@
 // PRINT-NEXT:  let Notification: String
 // PRINT-NEXT:  let swiftNamedNotification: String
 //
-// PRINT-LABEL: struct CFNewType : RawRepresentable, _SwiftNewtypeWrapper {
+// PRINT-LABEL: struct CFNewType : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable {
 // PRINT-NEXT:    init(_ rawValue: CFString)
 // PRINT-NEXT:    init(rawValue: CFString)
 // PRINT-NEXT:    let rawValue: CFString
@@ -101,7 +101,7 @@
 // PRINT-NEXT:  func FooAudited() -> CFNewType
 // PRINT-NEXT:  func FooUnaudited() -> Unmanaged<CFString>
 //
-// PRINT-NEXT:  struct MyABINewType : RawRepresentable, _SwiftNewtypeWrapper {
+// PRINT-LABEL: struct MyABINewType : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable {
 // PRINT-NEXT:    init(_ rawValue: CFString)
 // PRINT-NEXT:    init(rawValue: CFString)
 // PRINT-NEXT:    let rawValue: CFString
@@ -118,7 +118,7 @@
 // PRINT-NEXT:  func takeMyABIOldType(_: MyABIOldType!)
 // PRINT-NEXT:  func takeMyABINewTypeNonNull(_: MyABINewType)
 // PRINT-NEXT:  func takeMyABIOldTypeNonNull(_: MyABIOldType)
-// PRINT-NEXT:  struct MyABINewTypeNS : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, Comparable, _ObjectiveCBridgeable {
+// PRINT-LABEL: struct MyABINewTypeNS : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, _ObjectiveCBridgeable {
 // PRINT-NEXT:    init(_ rawValue: String)
 // PRINT-NEXT:    init(rawValue: String)
 // PRINT-NEXT:    var _rawValue: NSString
@@ -138,7 +138,7 @@
 // PRINT-NEXT:    init(i: Int32)
 // PRINT-NEXT:  }
 // PRINT-NEXT:  extension NSSomeContext {
-// PRINT-NEXT:    struct Name : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, Comparable, _ObjectiveCBridgeable {
+// PRINT-NEXT:    struct Name : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, _ObjectiveCBridgeable {
 // PRINT-NEXT:      init(_ rawValue: String)
 // PRINT-NEXT:      init(rawValue: String)
 // PRINT-NEXT:      var _rawValue: NSString
@@ -179,14 +179,12 @@
 func acceptSwiftNewtypeWrapper<T : _SwiftNewtypeWrapper>(_ t: T) { }
 func acceptEquatable<T : Equatable>(_ t: T) { }
 func acceptHashable<T : Hashable>(_ t: T) { }
-func acceptComparable<T : Hashable>(_ t: T) { }
 func acceptObjectiveCBridgeable<T : _ObjectiveCBridgeable>(_ t: T) { }
 
 func testConformances(ed: ErrorDomain) {
   acceptSwiftNewtypeWrapper(ed)
   acceptEquatable(ed)
   acceptHashable(ed)
-  acceptComparable(ed)
   acceptObjectiveCBridgeable(ed)
 }
 
diff --git a/test/IDE/print_clang_header.swift b/test/IDE/print_clang_header.swift
index 2ecebbb..c321a54 100644
--- a/test/IDE/print_clang_header.swift
+++ b/test/IDE/print_clang_header.swift
@@ -2,24 +2,24 @@
 // XFAIL: linux
 
 // RUN: echo '#include "header-to-print.h"' > %t.m
-// RUN: %target-swift-ide-test -source-filename %s -print-header -header-to-print %S/Inputs/print_clang_header/header-to-print.h -print-regular-comments --cc-args %target-cc-options -isysroot %clang-importer-sdk-path -fsyntax-only %t.m -I %S/Inputs/print_clang_header > %t.txt
+// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -source-filename %s -print-header -header-to-print %S/Inputs/print_clang_header/header-to-print.h -print-regular-comments --cc-args %target-cc-options -isysroot %clang-importer-sdk-path -fsyntax-only %t.m -I %S/Inputs/print_clang_header > %t.txt
 // RUN: diff -u %S/Inputs/print_clang_header/header-to-print.h.printed.txt %t.txt
 
 // RUN: %clang %target-cc-options -isysroot %clang-importer-sdk-path -fmodules -x objective-c-header %S/Inputs/print_clang_header/header-to-print.h -o %t.h.pch
 // RUN: touch %t.empty.m
-// RUN: %target-swift-ide-test -source-filename %s -print-header -header-to-print %S/Inputs/print_clang_header/header-to-print.h -print-regular-comments --cc-args %target-cc-options -isysroot %clang-importer-sdk-path -fsyntax-only %t.empty.m -I %S/Inputs/print_clang_header -include %t.h > %t.with-pch.txt
-// RUN: diff -u %S/Inputs/print_clang_header/header-to-print.h.printed.txt %t.with-pch.txt
-// RUN: %target-swift-ide-test -source-filename %s -print-header -header-to-print %S/Inputs/print_clang_header/header-to-print.h -print-regular-comments --cc-args %target-cc-options -isysroot %clang-importer-sdk-path -fsyntax-only %t.empty.m -I %S/Inputs/print_clang_header -include %S/Inputs/print_clang_header/header-to-print.h > %t.with-include.txt
-// RUN: diff -u %S/Inputs/print_clang_header/header-to-print.h.printed.txt %t.with-include.txt
+// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -source-filename %s -print-header -header-to-print %S/Inputs/print_clang_header/header-to-print.h -print-regular-comments --cc-args %target-cc-options -isysroot %clang-importer-sdk-path -fsyntax-only %t.empty.m -I %S/Inputs/print_clang_header -include %t.h > %t.with-pch.txt
+// RUN: diff -u %S/Inputs/print_clang_header/header-to-print.h.command-line-include.printed.txt %t.with-pch.txt
+// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -source-filename %s -print-header -header-to-print %S/Inputs/print_clang_header/header-to-print.h -print-regular-comments --cc-args %target-cc-options -isysroot %clang-importer-sdk-path -fsyntax-only %t.empty.m -I %S/Inputs/print_clang_header -include %S/Inputs/print_clang_header/header-to-print.h > %t.with-include.txt
+// RUN: diff -u %S/Inputs/print_clang_header/header-to-print.h.command-line-include.printed.txt %t.with-include.txt
 
 // RUN: echo '#include <Foo/header-to-print.h>' > %t.framework.m
 // RUN: sed -e "s:INPUT_DIR:%S/Inputs/print_clang_header:g" -e "s:OUT_DIR:%t:g" %S/Inputs/print_clang_header/Foo-vfsoverlay.yaml > %t.yaml
-// RUN: %target-swift-ide-test -source-filename %s -print-header -header-to-print %S/Inputs/print_clang_header/header-to-print.h -print-regular-comments --cc-args %target-cc-options -isysroot %clang-importer-sdk-path -fsyntax-only %t.framework.m -F %t -ivfsoverlay %t.yaml -Xclang -fmodule-name=Foo > %t.framework.txt
+// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -source-filename %s -print-header -header-to-print %S/Inputs/print_clang_header/header-to-print.h -print-regular-comments --cc-args %target-cc-options -isysroot %clang-importer-sdk-path -fsyntax-only %t.framework.m -F %t -ivfsoverlay %t.yaml -Xclang -fmodule-name=Foo > %t.framework.txt
 // RUN: diff -u %S/Inputs/print_clang_header/header-to-print.h.printed.txt %t.framework.txt
 
 // Test header interface printing from a clang module, with the preprocessing record enabled before the CC args.
-// RUN: %target-swift-ide-test -source-filename %s -print-header -header-to-print %S/Inputs/print_clang_header/header-to-print.h -print-regular-comments -Xcc -Xclang -Xcc -detailed-preprocessing-record --cc-args %target-cc-options -isysroot %clang-importer-sdk-path -fsyntax-only %t.framework.m -F %t -ivfsoverlay %t.yaml > %t.module.txt
+// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -source-filename %s -print-header -header-to-print %S/Inputs/print_clang_header/header-to-print.h -print-regular-comments -Xcc -Xclang -Xcc -detailed-preprocessing-record --cc-args %target-cc-options -isysroot %clang-importer-sdk-path -fsyntax-only %t.framework.m -F %t -ivfsoverlay %t.yaml > %t.module.txt
 // RUN: diff -u %S/Inputs/print_clang_header/header-to-print.h.module.printed.txt %t.module.txt
 // Test header interface printing from a clang module, with the preprocessing record enabled by the CC args.
-// RUN: %target-swift-ide-test -source-filename %s -print-header -header-to-print %S/Inputs/print_clang_header/header-to-print.h -print-regular-comments --cc-args %target-cc-options -isysroot %clang-importer-sdk-path -fsyntax-only %t.framework.m -F %t -ivfsoverlay %t.yaml -Xclang -detailed-preprocessing-record > %t.module2.txt
+// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -source-filename %s -print-header -header-to-print %S/Inputs/print_clang_header/header-to-print.h -print-regular-comments --cc-args %target-cc-options -isysroot %clang-importer-sdk-path -fsyntax-only %t.framework.m -F %t -ivfsoverlay %t.yaml -Xclang -detailed-preprocessing-record > %t.module2.txt
 // RUN: diff -u %S/Inputs/print_clang_header/header-to-print.h.module.printed.txt %t.module2.txt
diff --git a/test/IDE/print_usrs.swift b/test/IDE/print_usrs.swift
index 5b67ecd..58b2ad5 100644
--- a/test/IDE/print_usrs.swift
+++ b/test/IDE/print_usrs.swift
@@ -265,3 +265,14 @@
   _ = m1; _ = m2; _ = m3
 }
 
+class OverloadVarsByAvailability {
+  @available(swift, obsoleted: 4.0)
+  @available(*, deprecated, message: "not 4.0")
+  public var memory: Int8 { get { } set { } }
+  // CHECK: [[@LINE-1]]:14 s:14swift_ide_test26OverloadVarsByAvailabilityC6memorys4Int8Vv
+
+  @available(swift 4.0)
+  @available(*, deprecated, message: "yes 4.0")
+  public var memory: Int16 { get { } set { } }
+  // CHECK: [[@LINE-1]]:14 s:14swift_ide_test26OverloadVarsByAvailabilityC6memorys5Int16Vv
+}
diff --git a/test/IDE/range_info_basics.swift b/test/IDE/range_info_basics.swift
index 677eff0..e8a19c8 100644
--- a/test/IDE/range_info_basics.swift
+++ b/test/IDE/range_info_basics.swift
@@ -164,9 +164,9 @@
 // RUN: %target-swift-ide-test -range -pos=109:6 -end-pos=111:4 -source-filename %s | %FileCheck %s -check-prefix=CHECK-INVALID
 // RUN: %target-swift-ide-test -range -pos=114:1 -end-pos=115:15 -source-filename %s | %FileCheck %s -check-prefix=CHECK27
 // RUN: %target-swift-ide-test -range -pos=118:1 -end-pos=119:15 -source-filename %s | %FileCheck %s -check-prefix=CHECK27
-// RUN: %target-swift-ide-test -range -pos=126:11 -end-pos=126:12 -source-filename %s | %FileCheck %s -check-prefix=CHECK-INT
+// RUN: %target-swift-ide-test -range -pos=126:11 -end-pos=126:12 -source-filename %s | %FileCheck %s -check-prefix=CHECK-INT-LVALUE
 // RUN: %target-swift-ide-test -range -pos=126:11 -end-pos=126:20 -source-filename %s | %FileCheck %s -check-prefix=CHECK-INT
-// RUN: %target-swift-ide-test -range -pos=127:7 -end-pos=127:8 -source-filename %s | %FileCheck %s -check-prefix=CHECK-INT
+// RUN: %target-swift-ide-test -range -pos=127:7 -end-pos=127:8 -source-filename %s | %FileCheck %s -check-prefix=CHECK-INT-LVALUE
 // RUN: %target-swift-ide-test -range -pos=127:3 -end-pos=127:4 -source-filename %s | %FileCheck %s -check-prefix=CHECK-INT-LVALUE
 // RUN: %target-swift-ide-test -range -pos=128:13 -end-pos=128:15 -source-filename %s | %FileCheck %s -check-prefix=CHECK-INT-INOUT
 // RUN: %target-swift-ide-test -range -pos=118:1 -end-pos=120:22 -source-filename %s | %FileCheck %s -check-prefix=CHECK-INT
diff --git a/test/IDE/range_info_branches.swift b/test/IDE/range_info_branches.swift
new file mode 100644
index 0000000..049eea8
--- /dev/null
+++ b/test/IDE/range_info_branches.swift
@@ -0,0 +1,40 @@
+func foo(_ a: Bool) -> Int{
+  if a {
+    return 1
+  } else {
+  }
+  if a {
+    return 0
+  } else {
+    return 1
+  }
+}
+
+func foo1(_ a: Bool) {
+  if a {}
+  if a {}
+  else {}
+  if a {
+    return
+  } else {
+    return
+  }
+}
+
+// RUN: %target-swift-ide-test -range -pos=2:1 -end-pos 5:4 -source-filename %s | %FileCheck %s -check-prefix=CHECK-ERR
+// RUN: %target-swift-ide-test -range -pos=6:1 -end-pos 10:4 -source-filename %s | %FileCheck %s -check-prefix=CHECK-INT
+// RUN: %target-swift-ide-test -range -pos=14:1 -end-pos 14:10 -source-filename %s | %FileCheck %s -check-prefix=CHECK-VOID-NO-RETURN
+// RUN: %target-swift-ide-test -range -pos=15:1 -end-pos 16:10 -source-filename %s | %FileCheck %s -check-prefix=CHECK-VOID-NO-RETURN
+// RUN: %target-swift-ide-test -range -pos=17:1 -end-pos 21:4 -source-filename %s | %FileCheck %s -check-prefix=CHECK-VOID-RETURN
+
+// CHECK-ERR: <Type><<error type>></Type>
+// CHECK-ERR-NOT: <Exit>true</Exit>
+
+// CHECK-INT: <Type>Int</Type>
+// CHECK-INT: <Exit>true</Exit>
+
+// CHECK-VOID-NO-RETURN: <Type>Void</Type>
+// CHECK-VOID-NO-RETURN-NOT: <Exit>true</Exit>
+
+// CHECK-VOID-RETURN: <Type>Void</Type>
+// CHECK-VOID-RETURN: <Exit>true</Exit>
diff --git a/test/IDE/range_info_expr.swift b/test/IDE/range_info_expr.swift
new file mode 100644
index 0000000..814475f
--- /dev/null
+++ b/test/IDE/range_info_expr.swift
@@ -0,0 +1,16 @@
+struct S {
+  let count = 1
+}
+
+public class CC {
+  func foo(_ s : S) -> Int {
+    if s.count > 0 {
+      return 1
+    } else {
+      return 0
+    }
+  }
+}
+
+// RUN: %target-swift-ide-test -range -pos=7:8 -end-pos=7:19 -source-filename %s | %FileCheck %s -check-prefix=CHECK-BOOL
+// CHECK-BOOL: <Type>Bool</Type>
diff --git a/test/IDE/range_info_implicit.swift b/test/IDE/range_info_implicit.swift
new file mode 100644
index 0000000..8186622
--- /dev/null
+++ b/test/IDE/range_info_implicit.swift
@@ -0,0 +1,7 @@
+public class CC {
+  public init() {
+  }
+}
+
+// RUN: %target-swift-ide-test -range -pos=3:1 -end-pos=3:4 -source-filename %s | %FileCheck %s -check-prefix=CHECK-INVALID
+// CHECK-INVALID: <Kind>Invalid</Kind>
diff --git a/test/IDE/reconstruct_type_from_mangled_name.swift b/test/IDE/reconstruct_type_from_mangled_name.swift
index d45e5d7..7951a55 100644
--- a/test/IDE/reconstruct_type_from_mangled_name.swift
+++ b/test/IDE/reconstruct_type_from_mangled_name.swift
@@ -191,10 +191,9 @@
   foo2(p: p)
 }
 
-// CHECK: func foo3(p: AnyObject & P1)
+// CHECK: func foo3(p: P1 & AnyObject)
 func foo3(p: P1 & AnyObject) {
-// CHECK: decl: let p: AnyObject & P1
-// CHECK: dref: {{(@objc )?}}protocol AnyObject
+// CHECK: decl: let p: P1 & AnyObject
   foo3(p: p)
 }
 
@@ -205,7 +204,7 @@
 }
 
 func genericFunction<T : AnyObject>(t: T) {
-// CHECK: decl: FAILURE for 'T' usr=s:14swift_ide_test15genericFunctionyx1t_ts9AnyObjectRzlF1TL_xmfp
+// CHECK: decl: FAILURE for 'T' usr=s:14swift_ide_test15genericFunctionyx1t_tRlzClF1TL_xmfp
   genericFunction(t: t)
 }
 
diff --git a/test/IRGen/abi_v7k.swift b/test/IRGen/abi_v7k.swift
index e4052cd..99dceea 100644
--- a/test/IRGen/abi_v7k.swift
+++ b/test/IRGen/abi_v7k.swift
@@ -203,11 +203,12 @@
 // CHECK: ret float
 // V7K-LABEL: __T08test_v7k0A3Opt
 // V7K:         tst     r1, #1
-// V7K:         str     r0, [r7, #-4]
-// V7K:         ldr     r0, [r7, #-4]
+// V7K:         str     r0, [r7, #-20]
+// V7K:         ldr     r0, [r7, #-20]
 // V7K:         vmov    s0, r0
-// V7K:         mov     sp, r7
-// V7K:         pop     {r7, pc}
+// V7K:         sub     sp, r7, #16
+// V7K:         pop     {r11}
+// V7K:         pop      {r4, r5, r6, r7, pc}
 func testOpt(x: Float?) -> Float {
   return x!
 }
@@ -337,14 +338,43 @@
 // Passing struct: Int8, MyPoint x 10, MySize * 10
 // CHECK-LABEL: define hidden swiftcc double @_T08test_v7k0A4Ret5{{.*}}(%T8test_v7k7MyRect3V* noalias nocapture dereferenceable(328))
 // V7K-LABEL: __T08test_v7k0A4Ret5
-// V7K: ldrb [[TMP1:r[0-9]+]], [r0]
-// V7K: vldr [[REG1:d[0-9]+]], [r0, #8]
-// V7K: vldr [[REG2:d[0-9]+]], [r0]
-// V7K: sxtb r0, [[TMP1]]
-// V7K: vmov [[TMP2:s[0-9]+]], r0
-// V7K: vcvt.f64.s32 [[INTPART:d[0-9]+]], [[TMP2]]
-// V7K: vadd.f64 [[TMP3:d[0-9]+]], [[INTPART]], [[REG1]]
-// V7K: vadd.f64 d0, [[TMP3]], [[REG2]]
+// V7K:  sub     sp, sp, #56
+// V7K:  ldrb    r1, [r0]
+// V7K:  strb    r1, [sp, #52]
+// V7K:  ldrsb   r1, [sp, #52]
+// V7K:  vmov    s0, r1
+// V7K:  vcvt.f64.s32    d16, s0
+// V7K:  ldr     r1, [r0, #8]
+// V7K:  str     r1, [sp, #24]
+// V7K:  ldr     r1, [r0, #12]
+// V7K:  str     r1, [sp, #28]
+// V7K:  ldr     r1, [r0, #16]
+// V7K:  str     r1, [sp, #32]
+// V7K:  ldr     r1, [r0, #20]
+// V7K:  str     r1, [sp, #36]
+// V7K:  ldr     r1, [sp, #24]
+// V7K:  str     r1, [sp, #40]
+// V7K:  ldr     r1, [sp, #28]
+// V7K:  str     r1, [sp, #44]
+// V7K:  vldr    d18, [sp, #40]
+// V7K:  vadd.f64        d16, d16, d18
+// V7K:  ldr     r1, [r0, #296]
+// V7K:  str     r1, [sp]
+// V7K:  ldr     r1, [r0, #300]
+// V7K:  str     r1, [sp, #4]
+// V7K:  ldr     r1, [r0, #304]
+// V7K:  str     r1, [sp, #8]
+// V7K:  ldr     r0, [r0, #308]
+// V7K:  str     r0, [sp, #12]
+// V7K:  ldr     r0, [sp]
+// V7K:  str     r0, [sp, #16]
+// V7K:  ldr     r0, [sp, #4]
+// V7K:  str     r0, [sp, #20]
+// V7K:  vldr    d18, [sp, #16]
+// V7K:  vadd.f64        d0, d16, d18
+// V7K:  add     sp, sp, #56
+// V7K:  bx      lr
+
 struct MyRect3 {
   var t: Int8
   var p: MyPoint
diff --git a/test/IRGen/abitypes.swift b/test/IRGen/abitypes.swift
index f90ed1b..bda17a2 100644
--- a/test/IRGen/abitypes.swift
+++ b/test/IRGen/abitypes.swift
@@ -22,20 +22,20 @@
   // x86_64-macosx: define hidden { <2 x float>, <2 x float> } @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo(i8*, i8*) unnamed_addr {{.*}} {
   // x86_64-ios: define hidden swiftcc { i64, i64 } @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F(%T8abitypes3FooC* swiftself) {{.*}} {
   // x86_64-ios: define hidden { <2 x float>, <2 x float> } @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo(i8*, i8*) unnamed_addr {{.*}} {
-  // i386-ios: define hidden swiftcc void @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F(%TSo6MyRectV* noalias nocapture sret, %T8abitypes3FooC* swiftself) {{.*}} {
-  // i386-ios: define hidden void @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo(%TSo6MyRectV* noalias nocapture sret, i8*, i8*) unnamed_addr {{.*}} {
+  // i386-ios: define hidden swiftcc void @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F(%TSC6MyRectV* noalias nocapture sret, %T8abitypes3FooC* swiftself) {{.*}} {
+  // i386-ios: define hidden void @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo(%TSC6MyRectV* noalias nocapture sret, i8*, i8*) unnamed_addr {{.*}} {
   // armv7-ios: define hidden swiftcc { float, float, float, float } @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F(%T8abitypes3FooC* swiftself) {{.*}} {
-  // armv7-ios: define hidden void @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo(%TSo6MyRectV* noalias nocapture sret, i8*, i8*) unnamed_addr {{.*}} {
+  // armv7-ios: define hidden void @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo(%TSC6MyRectV* noalias nocapture sret, i8*, i8*) unnamed_addr {{.*}} {
   // armv7s-ios: define hidden swiftcc { float, float, float, float } @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F(%T8abitypes3FooC* swiftself) {{.*}} {
-  // armv7s-ios: define hidden void @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo(%TSo6MyRectV* noalias nocapture sret, i8*, i8*) unnamed_addr {{.*}} {
+  // armv7s-ios: define hidden void @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo(%TSC6MyRectV* noalias nocapture sret, i8*, i8*) unnamed_addr {{.*}} {
   // arm64-ios: define hidden swiftcc { i64, i64 } @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F(%T8abitypes3FooC* swiftself) {{.*}} {
   // arm64-ios: define hidden [[ARM64_MYRECT]] @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo(i8*, i8*) unnamed_addr {{.*}} {
   // x86_64-tvos: define hidden swiftcc { i64, i64 } @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F(%T8abitypes3FooC* swiftself) {{.*}} {
   // x86_64-tvos: define hidden { <2 x float>, <2 x float> } @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo(i8*, i8*) unnamed_addr {{.*}} {
   // arm64-tvos: define hidden swiftcc { i64, i64 }  @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F(%T8abitypes3FooC* swiftself) {{.*}} {
   // arm64-tvos: define hidden [[ARM64_MYRECT]] @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo(i8*, i8*) unnamed_addr {{.*}} {
-  // i386-watchos: define hidden swiftcc void @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F(%TSo6MyRectV* noalias nocapture sret, %T8abitypes3FooC* swiftself) {{.*}} {
-  // i386-watchos: define hidden void @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo(%TSo6MyRectV* noalias nocapture sret, i8*, i8*) unnamed_addr {{.*}} {
+  // i386-watchos: define hidden swiftcc void @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F(%TSC6MyRectV* noalias nocapture sret, %T8abitypes3FooC* swiftself) {{.*}} {
+  // i386-watchos: define hidden void @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo(%TSC6MyRectV* noalias nocapture sret, i8*, i8*) unnamed_addr {{.*}} {
   // armv7k-watchos: define hidden swiftcc { float, float, float, float } @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}F(%T8abitypes3FooC* swiftself) {{.*}} {
   // armv7k-watchos: define hidden [[ARMV7K_MYRECT]] @_T08abitypes3FooC3bar{{[_0-9a-zA-Z]*}}FTo(i8*, i8*) unnamed_addr {{.*}} {
   dynamic func bar() -> MyRect {
@@ -44,7 +44,7 @@
 
 
   // x86_64-macosx: define hidden swiftcc double @_T08abitypes3FooC14getXFromNSRect{{[_0-9a-zA-Z]*}}F(double, double, double, double, %T8abitypes3FooC* swiftself) {{.*}} {
-  // x86_64-macosx: define hidden double @_T08abitypes3FooC14getXFromNSRect{{[_0-9a-zA-Z]*}}FTo(i8*, i8*, %TSo6CGRectV* byval align 8) unnamed_addr {{.*}} {
+  // x86_64-macosx: define hidden double @_T08abitypes3FooC14getXFromNSRect{{[_0-9a-zA-Z]*}}FTo(i8*, i8*, %TSC6CGRectV* byval align 8) unnamed_addr {{.*}} {
   // armv7-ios: define hidden swiftcc double @_T08abitypes3FooC14getXFromNSRect{{[_0-9a-zA-Z]*}}F(float, float, float, float, %T8abitypes3FooC* swiftself) {{.*}} {
   // armv7-ios: define hidden double @_T08abitypes3FooC14getXFromNSRect{{[_0-9a-zA-Z]*}}FTo(i8*, i8*, [4 x i32]) unnamed_addr {{.*}} {
   // armv7s-ios: define hidden swiftcc double @_T08abitypes3FooC14getXFromNSRect{{[_0-9a-zA-Z]*}}F(float, float, float, float, %T8abitypes3FooC* swiftself) {{.*}} {
@@ -107,7 +107,7 @@
   }
 
   // Ensure that MyRect is passed as an indirect-byval on x86_64 because we run out of registers for direct arguments
-  // x86_64-macosx: define hidden float @_T08abitypes3FooC25getXFromRectIndirectByVal{{[_0-9a-zA-Z]*}}FTo(i8*, i8*, float, float, float, float, float, float, float, %TSo6MyRectV* byval align 4) unnamed_addr {{.*}} {
+  // x86_64-macosx: define hidden float @_T08abitypes3FooC25getXFromRectIndirectByVal{{[_0-9a-zA-Z]*}}FTo(i8*, i8*, float, float, float, float, float, float, float, %TSC6MyRectV* byval align 4) unnamed_addr {{.*}} {
   dynamic func getXFromRectIndirectByVal(_: Float, second _: Float, 
                                        third _: Float, fourth _: Float,
                                        fifth _: Float, sixth _: Float,
@@ -168,7 +168,7 @@
   }
 
   // x86_64-macosx: define hidden swiftcc { double, double, double } @_T08abitypes3FooC3baz{{[_0-9a-zA-Z]*}}F(%T8abitypes3FooC* swiftself) {{.*}} {
-  // x86_64-macosx: define hidden void @_T08abitypes3FooC3baz{{[_0-9a-zA-Z]*}}FTo(%TSo4TrioV* noalias nocapture sret, i8*, i8*) unnamed_addr {{.*}} {
+  // x86_64-macosx: define hidden void @_T08abitypes3FooC3baz{{[_0-9a-zA-Z]*}}FTo(%TSC4TrioV* noalias nocapture sret, i8*, i8*) unnamed_addr {{.*}} {
   dynamic func baz() -> Trio {
     return Trio(i: 1.0, j: 2.0, k: 3.0)
   }
@@ -176,7 +176,7 @@
   // x86_64-macosx:      define hidden swiftcc double @_T08abitypes3FooC4bazc{{[_0-9a-zA-Z]*}}F(%TSo13StructReturnsC*, %T8abitypes3FooC* swiftself) {{.*}} {
   // x86_64-macosx:      load i8*, i8** @"\01L_selector(newTrio)", align 8
   // x86_64-macosx:      [[CAST:%[0-9]+]] = bitcast {{%.*}}* %0
-  // x86_64-macosx:      call void bitcast (void ()* @objc_msgSend_stret to void (%TSo4TrioV*, [[OPAQUE:.*]]*, i8*)*)
+  // x86_64-macosx:      call void bitcast (void ()* @objc_msgSend_stret to void (%TSC4TrioV*, [[OPAQUE:.*]]*, i8*)*)
   func bazc(_ p: StructReturns) -> Double {
     return p.newTrio().j
   }
@@ -510,10 +510,10 @@
   }
 
   // arm64-ios: define hidden swiftcc { i64, i64, i64, i64 } @_T08abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}F(%TSo13StructReturnsC*, i64, i64, i64, i64, %T8abitypes3FooC* swiftself) {{.*}} {
-  // arm64-ios: define hidden void @_T08abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}FTo(%TSo9BigStructV* noalias nocapture sret, i8*, i8*, [[OPAQUE:.*]]*, %TSo9BigStructV*) unnamed_addr {{.*}} {
+  // arm64-ios: define hidden void @_T08abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}FTo(%TSC9BigStructV* noalias nocapture sret, i8*, i8*, [[OPAQUE:.*]]*, %TSC9BigStructV*) unnamed_addr {{.*}} {
   //
   // arm64-tvos: define hidden swiftcc { i64, i64, i64, i64 } @_T08abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}F(%TSo13StructReturnsC*, i64, i64, i64, i64, %T8abitypes3FooC* swiftself) {{.*}} {
-  // arm64-tvos: define hidden void @_T08abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}FTo(%TSo9BigStructV* noalias nocapture sret, i8*, i8*, [[OPAQUE:.*]]*, %TSo9BigStructV*) unnamed_addr {{.*}} {
+  // arm64-tvos: define hidden void @_T08abitypes3FooC14callJustReturn{{[_0-9a-zA-Z]*}}FTo(%TSC9BigStructV* noalias nocapture sret, i8*, i8*, [[OPAQUE:.*]]*, %TSC9BigStructV*) unnamed_addr {{.*}} {
   dynamic func callJustReturn(_ r: StructReturns, with v: BigStruct) -> BigStruct {
     return r.justReturn(v)
   }
@@ -530,11 +530,11 @@
 // armv7k-watchos: define internal %struct.One @makeOne(float %f, float %s)
 
 // rdar://17631440 - Expand direct arguments that are coerced to aggregates.
-// x86_64-macosx: define{{( protected)?}} swiftcc float @_T08abitypes13testInlineAggSfSo6MyRectVF(i64, i64) {{.*}} {
-// x86_64-macosx: [[COERCED:%.*]] = alloca %TSo6MyRectV, align 8
+// x86_64-macosx: define{{( protected)?}} swiftcc float @_T08abitypes13testInlineAggSfSC6MyRectVF(i64, i64) {{.*}} {
+// x86_64-macosx: [[COERCED:%.*]] = alloca %TSC6MyRectV, align 8
 // x86_64-macosx: store i64 %
 // x86_64-macosx: store i64 %
-// x86_64-macosx: [[CAST:%.*]] = bitcast %TSo6MyRectV* [[COERCED]] to { <2 x float>, <2 x float> }*
+// x86_64-macosx: [[CAST:%.*]] = bitcast %TSC6MyRectV* [[COERCED]] to { <2 x float>, <2 x float> }*
 // x86_64-macosx: [[T0:%.*]] = getelementptr inbounds { <2 x float>, <2 x float> }, { <2 x float>, <2 x float> }* [[CAST]], i32 0, i32 0
 // x86_64-macosx: [[FIRST_HALF:%.*]] = load <2 x float>, <2 x float>* [[T0]], align 8
 // x86_64-macosx: [[T0:%.*]] = getelementptr inbounds { <2 x float>, <2 x float> }, { <2 x float>, <2 x float> }* [[CAST]], i32 0, i32 1
@@ -548,8 +548,8 @@
 // We need to allocate enough memory on the stack to hold the argument value we load.
 // arm64-ios: define swiftcc void @_T08abitypes14testBOOLStructyyF()
 // arm64-ios:  [[COERCED:%.*]] = alloca i64
-// arm64-ios:  [[STRUCTPTR:%.*]] = bitcast i64* [[COERCED]] to %TSo14FiveByteStructV
-// arm64-ios:  [[PTR0:%.*]] = getelementptr inbounds %TSo14FiveByteStructV, %TSo14FiveByteStructV* [[STRUCTPTR]], {{i.*}} 0, {{i.*}} 0
+// arm64-ios:  [[STRUCTPTR:%.*]] = bitcast i64* [[COERCED]] to %TSC14FiveByteStructV
+// arm64-ios:  [[PTR0:%.*]] = getelementptr inbounds %TSC14FiveByteStructV, %TSC14FiveByteStructV* [[STRUCTPTR]], {{i.*}} 0, {{i.*}} 0
 // arm64-ios:  [[PTR1:%.*]] = getelementptr inbounds %T10ObjectiveC8ObjCBoolV, %T10ObjectiveC8ObjCBoolV* [[PTR0]], {{i.*}} 0, {{i.*}} 0
 // arm64-ios:  [[PTR2:%.*]] = getelementptr inbounds %TSb, %TSb* [[PTR1]], {{i.*}} 0, {{i.*}} 0
 // arm64-ios:  store i1 false, i1* [[PTR2]], align 8
diff --git a/test/IRGen/access_markers.sil b/test/IRGen/access_markers.sil
index a7726d3..e73b796 100644
--- a/test/IRGen/access_markers.sil
+++ b/test/IRGen/access_markers.sil
@@ -1,10 +1,11 @@
-// RUN: %target-swift-frontend -enforce-exclusivity=checked -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s --check-prefix=CHECK
+// RUN: %target-swift-frontend -swift-version 4 -enforce-exclusivity=checked -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s --check-prefix=CHECK
 
 import Builtin
 import Swift
 
 class A {
   @sil_stored var property: Int { get set }
+  @sil_stored var exProperty: Any { get set }
   deinit
   init()
 }
@@ -26,7 +27,7 @@
   // CHECK-NEXT: [[T0:%.*]] = bitcast [[BUFFER]]* [[SCRATCH1]] to i8*
   // CHECK-NEXT: call void @llvm.lifetime.start(i64 {{.*}}, i8* [[T0]])
   // CHECK-NEXT: [[T1:%.*]] = bitcast [[INT]]* [[PROPERTY]] to i8*
-  // CHECK-NEXT: call void @swift_beginAccess(i8* [[T1]], [[BUFFER]]* [[SCRATCH1]], [[SIZE]] 1)
+  // CHECK-NEXT: call void @swift_beginAccess(i8* [[T1]], [[BUFFER]]* [[SCRATCH1]], [[SIZE]] 1, i8* null)
   %3 = begin_access [modify] [dynamic] %2 : $*Int
 
   // CHECK-NEXT: call void @swift_endAccess([[BUFFER]]* [[SCRATCH1]])
@@ -37,7 +38,7 @@
   // CHECK-NEXT: [[T0:%.*]] = bitcast [[BUFFER]]* [[SCRATCH2]] to i8*
   // CHECK-NEXT: call void @llvm.lifetime.start(i64 {{.*}}, i8* [[T0]])
   // CHECK-NEXT: [[T1:%.*]] = bitcast [[INT]]* [[PROPERTY]] to i8*
-  // CHECK-NEXT: call void @swift_beginAccess(i8* [[T1]], [[BUFFER]]* [[SCRATCH2]], [[SIZE]] 0)
+  // CHECK-NEXT: call void @swift_beginAccess(i8* [[T1]], [[BUFFER]]* [[SCRATCH2]], [[SIZE]] 0, i8* null)
   %5 = begin_access [read] [dynamic] %2 : $*Int
 
   // CHECK-NEXT: call void @swift_endAccess([[BUFFER]]* [[SCRATCH2]])
@@ -59,14 +60,14 @@
   %2 = ref_element_addr %0 : $A, #A.property
 
   // CHECK-NEXT: [[T1:%.*]] = bitcast [[INT]]* [[PROPERTY]] to i8*
-  // CHECK-NEXT: call void @swift_beginAccess(i8* [[T1]], [[BUFFER]]* [[SCRATCH]], [[SIZE]] 1)
+  // CHECK-NEXT: call void @swift_beginAccess(i8* [[T1]], [[BUFFER]]* [[SCRATCH]], [[SIZE]] 1, i8* null)
   %3 = begin_unpaired_access [modify] [dynamic] %2 : $*Int, %1 : $*Builtin.UnsafeValueBuffer
 
   // CHECK-NEXT: call void @swift_endAccess([[BUFFER]]* [[SCRATCH]])
   %4 = end_unpaired_access [dynamic] %1 : $*Builtin.UnsafeValueBuffer
 
   // CHECK-NEXT: [[T1:%.*]] = bitcast [[INT]]* [[PROPERTY]] to i8*
-  // CHECK-NEXT: call void @swift_beginAccess(i8* [[T1]], [[BUFFER]]* [[SCRATCH]], [[SIZE]] 0)
+  // CHECK-NEXT: call void @swift_beginAccess(i8* [[T1]], [[BUFFER]]* [[SCRATCH]], [[SIZE]] 0, i8* null)
   %5 = begin_unpaired_access [read] [dynamic] %2 : $*Int, %1 : $*Builtin.UnsafeValueBuffer
 
   // CHECK-NEXT: call void @swift_endAccess([[BUFFER]]* [[SCRATCH]])
@@ -77,3 +78,44 @@
   %20 = tuple ()
   return %20 : $()
 }
+
+// CHECK-LABEL: define {{.*}}void @testUnpairedExternal(
+sil @testUnpairedExternal : $(@guaranteed A, @inout Builtin.UnsafeValueBuffer) -> () {
+bb0(%0 : $A, %1 : $*Builtin.UnsafeValueBuffer):
+  // CHECK:      [[PROPERTY:%.*]] = getelementptr inbounds [[C]], [[C]]* %0, i32 0, i32 1
+  %2 = ref_element_addr %0 : $A, #A.property
+
+  // CHECK-NEXT: [[T1:%.*]] = bitcast [[INT]]* [[PROPERTY]] to i8*
+  // CHECK-NEXT: [[PC:%.*]] = call i8* @llvm.returnaddress(i32 0)
+  // CHECK-NEXT: call void @swift_beginAccess(i8* [[T1]], [[BUFFER]]* [[SCRATCH:%1]], [[SIZE]] 1, i8* [[PC]])
+  %3 = begin_unpaired_access [modify] [dynamic] %2 : $*Int, %1 : $*Builtin.UnsafeValueBuffer
+
+  // CHECK-NEXT: call void @swift_endAccess([[BUFFER]]* [[SCRATCH]])
+  %4 = end_unpaired_access [dynamic] %1 : $*Builtin.UnsafeValueBuffer
+
+  // CHECK-NEXT: [[T1:%.*]] = bitcast [[INT]]* [[PROPERTY]] to i8*
+  // CHECK-NEXT: [[PC:%.*]] = call i8* @llvm.returnaddress(i32 0)
+  // CHECK-NEXT: call void @swift_beginAccess(i8* [[T1]], [[BUFFER]]* [[SCRATCH]], [[SIZE]] 0, i8* [[PC]])
+  %5 = begin_unpaired_access [read] [dynamic] %2 : $*Int, %1 : $*Builtin.UnsafeValueBuffer
+
+  // CHECK-NEXT: call void @swift_endAccess([[BUFFER]]* [[SCRATCH]])
+  %6 = end_unpaired_access [dynamic] %1 : $*Builtin.UnsafeValueBuffer
+
+  %20 = tuple ()
+  return %20 : $()
+}
+
+// rdar://31964550
+// Just check that this doesn't crash.
+sil @testCopyAddr : $(@guaranteed A) -> () {
+bb0(%0 : $A):
+  %1 = alloc_stack $Any
+  %2 = ref_element_addr %0 : $A, #A.exProperty
+  %3 = begin_access [dynamic] [read] %2 : $*Any
+  copy_addr %2 to [initialization] %1 : $*Any
+  end_access %3 : $*Any
+  destroy_addr %1 : $*Any
+  dealloc_stack %1 : $*Any
+  %20 = tuple ()
+  return %20 : $()
+}
diff --git a/test/IRGen/c_layout.sil b/test/IRGen/c_layout.sil
index e8cc56b..f56bd64 100644
--- a/test/IRGen/c_layout.sil
+++ b/test/IRGen/c_layout.sil
@@ -7,13 +7,13 @@
 
 // TODO: Provide tests for other architectures
 
-// CHECK-x86_64: %TSo11BitfieldOneV = type <{ %Ts6UInt32V, %TSo6NestedV, [4 x i8], [4 x i8], %TSf, [1 x i8], [7 x i8], %Ts6UInt64V, %Ts6UInt32V, [4 x i8] }>
-// CHECK-x86_64: %TSo6NestedV = type <{ %TSf, [3 x i8], [1 x i8] }>
+// CHECK-x86_64: %TSC11BitfieldOneV = type <{ %Ts6UInt32V, %TSC6NestedV, [4 x i8], [4 x i8], %TSf, [1 x i8], [7 x i8], %Ts6UInt64V, %Ts6UInt32V, [4 x i8] }>
+// CHECK-x86_64: %TSC6NestedV = type <{ %TSf, [3 x i8], [1 x i8] }>
 
-// CHECK-x86_64: %TSo26BitfieldSeparatorReferenceV = type [[BITFIELD_SEP_TYPE:<{ %Ts5UInt8V, \[3 x i8\], %Ts5UInt8V }>]]
-// CHECK-x86_64: %TSo25BitfieldSeparatorSameNameV = type [[BITFIELD_SEP_TYPE]]
-// CHECK-x86_64: %TSo36BitfieldSeparatorDifferentNameStructV = type [[BITFIELD_SEP_TYPE]]
-// CHECK-x86_64: %TSo21BitfieldSeparatorAnonV = type [[BITFIELD_SEP_TYPE]]
+// CHECK-x86_64: %TSC26BitfieldSeparatorReferenceV = type [[BITFIELD_SEP_TYPE:<{ %Ts5UInt8V, \[3 x i8\], %Ts5UInt8V }>]]
+// CHECK-x86_64: %TSC25BitfieldSeparatorSameNameV = type [[BITFIELD_SEP_TYPE]]
+// CHECK-x86_64: %TSC36BitfieldSeparatorDifferentNameStructV = type [[BITFIELD_SEP_TYPE]]
+// CHECK-x86_64: %TSC21BitfieldSeparatorAnonV = type [[BITFIELD_SEP_TYPE]]
 
 sil public_external @createBitfieldOne : $@convention(c) () -> BitfieldOne
 sil public_external @consumeBitfieldOne : $@convention(c) (BitfieldOne) -> ()
@@ -28,68 +28,68 @@
   return %r : $()
 }
 // CHECK-x86_64: define{{( protected)?}} swiftcc void @test0()
-// CHECK-x86_64:   [[RESULT:%.*]] = alloca %TSo11BitfieldOneV, align 8
-// CHECK-x86_64:   [[ARG:%.*]] = alloca %TSo11BitfieldOneV, align 8
+// CHECK-x86_64:   [[RESULT:%.*]] = alloca %TSC11BitfieldOneV, align 8
+// CHECK-x86_64:   [[ARG:%.*]] = alloca %TSC11BitfieldOneV, align 8
 //   Make the first call and pull all the values out of the indirect result.
-// CHECK-x86_64:   call void @createBitfieldOne(%TSo11BitfieldOneV* noalias nocapture sret [[RESULT]])
-// CHECK-x86_64:   [[ADDR_A:%.*]] = getelementptr inbounds %TSo11BitfieldOneV, %TSo11BitfieldOneV* [[RESULT]], i32 0, i32 0
+// CHECK-x86_64:   call void @createBitfieldOne(%TSC11BitfieldOneV* noalias nocapture sret [[RESULT]])
+// CHECK-x86_64:   [[ADDR_A:%.*]] = getelementptr inbounds %TSC11BitfieldOneV, %TSC11BitfieldOneV* [[RESULT]], i32 0, i32 0
 // CHECK-x86_64:   [[ADDR_A_V:%.*]] = getelementptr inbounds %Ts6UInt32V, %Ts6UInt32V* [[ADDR_A]], i32 0, i32 0
 // CHECK-x86_64:   [[A:%.*]] = load i32, i32* [[ADDR_A_V]], align 8
-// CHECK-x86_64:   [[ADDR_B:%.*]] = getelementptr inbounds %TSo11BitfieldOneV, %TSo11BitfieldOneV* [[RESULT]], i32 0, i32 1
-// CHECK-x86_64:   [[ADDR_B_X:%.*]] = getelementptr inbounds %TSo6NestedV, %TSo6NestedV* [[ADDR_B]], i32 0, i32 0
+// CHECK-x86_64:   [[ADDR_B:%.*]] = getelementptr inbounds %TSC11BitfieldOneV, %TSC11BitfieldOneV* [[RESULT]], i32 0, i32 1
+// CHECK-x86_64:   [[ADDR_B_X:%.*]] = getelementptr inbounds %TSC6NestedV, %TSC6NestedV* [[ADDR_B]], i32 0, i32 0
 // CHECK-x86_64:   [[ADDR_B_X_V:%.*]] = getelementptr inbounds %TSf, %TSf* [[ADDR_B_X]], i32 0, i32 0
 // CHECK-x86_64:   [[B_X:%.*]] = load float, float* [[ADDR_B_X_V]], align 4
-// CHECK-x86_64:   [[ADDR_B_YZ:%.*]] = getelementptr inbounds %TSo6NestedV, %TSo6NestedV* [[ADDR_B]], i32 0, i32 1
+// CHECK-x86_64:   [[ADDR_B_YZ:%.*]] = getelementptr inbounds %TSC6NestedV, %TSC6NestedV* [[ADDR_B]], i32 0, i32 1
 // CHECK-x86_64:   [[ADDR_B_YZ_1:%.*]] = bitcast [3 x i8]* [[ADDR_B_YZ]] to i24*
 // CHECK-x86_64:   [[B_YZ:%.*]] = load i24, i24* [[ADDR_B_YZ_1]], align 4
-// CHECK-x86_64:   [[ADDR_CDE:%.*]] = getelementptr inbounds %TSo11BitfieldOneV, %TSo11BitfieldOneV* [[RESULT]], i32 0, i32 2
+// CHECK-x86_64:   [[ADDR_CDE:%.*]] = getelementptr inbounds %TSC11BitfieldOneV, %TSC11BitfieldOneV* [[RESULT]], i32 0, i32 2
 // CHECK-x86_64:   [[ADDR_CDE_1:%.*]] = bitcast [4 x i8]* [[ADDR_CDE]] to i32*
 // CHECK-x86_64:   [[CDE:%.*]] = load i32, i32* [[ADDR_CDE_1]], align 4
-// CHECK-x86_64:   [[ADDR_FGH:%.*]] = getelementptr inbounds %TSo11BitfieldOneV, %TSo11BitfieldOneV* [[RESULT]], i32 0, i32 3
+// CHECK-x86_64:   [[ADDR_FGH:%.*]] = getelementptr inbounds %TSC11BitfieldOneV, %TSC11BitfieldOneV* [[RESULT]], i32 0, i32 3
 // CHECK-x86_64:   [[ADDR_FGH_1:%.*]] = bitcast [4 x i8]* [[ADDR_FGH]] to i32*
 // CHECK-x86_64:   [[FGH:%.*]] = load i32, i32* [[ADDR_FGH_1]], align 8
-// CHECK-x86_64:   [[ADDR_I:%.*]] = getelementptr inbounds %TSo11BitfieldOneV, %TSo11BitfieldOneV* [[RESULT]], i32 0, i32 4
+// CHECK-x86_64:   [[ADDR_I:%.*]] = getelementptr inbounds %TSC11BitfieldOneV, %TSC11BitfieldOneV* [[RESULT]], i32 0, i32 4
 // CHECK-x86_64:   [[ADDR_I_V:%.*]] = getelementptr inbounds %TSf, %TSf* [[ADDR_I]], i32 0, i32 0
 // CHECK-x86_64:   [[I:%.*]] = load float, float* [[ADDR_I_V]], align 4
-// CHECK-x86_64:   [[ADDR_JK:%.*]] = getelementptr inbounds %TSo11BitfieldOneV, %TSo11BitfieldOneV* [[RESULT]], i32 0, i32 5
+// CHECK-x86_64:   [[ADDR_JK:%.*]] = getelementptr inbounds %TSC11BitfieldOneV, %TSC11BitfieldOneV* [[RESULT]], i32 0, i32 5
 // CHECK-x86_64:   [[ADDR_JK_1:%.*]] = bitcast [1 x i8]* [[ADDR_JK]] to i8*
 // CHECK-x86_64:   [[JK:%.*]] = load i8, i8* [[ADDR_JK_1]], align 8
-// CHECK-x86_64:   [[ADDR_L:%.*]] = getelementptr inbounds %TSo11BitfieldOneV, %TSo11BitfieldOneV* [[RESULT]], i32 0, i32 7
+// CHECK-x86_64:   [[ADDR_L:%.*]] = getelementptr inbounds %TSC11BitfieldOneV, %TSC11BitfieldOneV* [[RESULT]], i32 0, i32 7
 // CHECK-x86_64:   [[ADDR_L_V:%.*]] = getelementptr inbounds %Ts6UInt64V, %Ts6UInt64V* [[ADDR_L]], i32 0, i32 0
 // CHECK-x86_64:   [[L:%.*]] = load i64, i64* [[ADDR_L_V]], align 8
-// CHECK-x86_64:   [[ADDR_M:%.*]] = getelementptr inbounds %TSo11BitfieldOneV, %TSo11BitfieldOneV* [[RESULT]], i32 0, i32 8
+// CHECK-x86_64:   [[ADDR_M:%.*]] = getelementptr inbounds %TSC11BitfieldOneV, %TSC11BitfieldOneV* [[RESULT]], i32 0, i32 8
 // CHECK-x86_64:   [[ADDR_M_V:%.*]] = getelementptr inbounds %Ts6UInt32V, %Ts6UInt32V* [[ADDR_M]], i32 0, i32 0
 // CHECK-x86_64:   [[M:%.*]] = load i32, i32* [[ADDR_M_V]], align 8
 //   Put all of the values into the indirect argument and make the second call.
-// CHECK-x86_64:   [[ADDR_A:%.*]] = getelementptr inbounds %TSo11BitfieldOneV, %TSo11BitfieldOneV* [[ARG]], i32 0, i32 0
+// CHECK-x86_64:   [[ADDR_A:%.*]] = getelementptr inbounds %TSC11BitfieldOneV, %TSC11BitfieldOneV* [[ARG]], i32 0, i32 0
 // CHECK-x86_64:   [[ADDR_A_V:%.*]] = getelementptr inbounds %Ts6UInt32V, %Ts6UInt32V* [[ADDR_A]], i32 0, i32 0
 // CHECK-x86_64:   store i32 [[A]], i32* [[ADDR_A_V]], align 8
-// CHECK-x86_64:   [[ADDR_B:%.*]] = getelementptr inbounds %TSo11BitfieldOneV, %TSo11BitfieldOneV* [[ARG]], i32 0, i32 1
-// CHECK-x86_64:   [[ADDR_B_X:%.*]] = getelementptr inbounds %TSo6NestedV, %TSo6NestedV* [[ADDR_B]], i32 0, i32 0
+// CHECK-x86_64:   [[ADDR_B:%.*]] = getelementptr inbounds %TSC11BitfieldOneV, %TSC11BitfieldOneV* [[ARG]], i32 0, i32 1
+// CHECK-x86_64:   [[ADDR_B_X:%.*]] = getelementptr inbounds %TSC6NestedV, %TSC6NestedV* [[ADDR_B]], i32 0, i32 0
 // CHECK-x86_64:   [[ADDR_B_X_V:%.*]] = getelementptr inbounds %TSf, %TSf* [[ADDR_B_X]], i32 0, i32 0
 // CHECK-x86_64:   store float [[B_X]], float* [[ADDR_B_X_V]], align 4
-// CHECK-x86_64:   [[ADDR_B_YZ:%.*]] = getelementptr inbounds %TSo6NestedV, %TSo6NestedV* [[ADDR_B]], i32 0, i32 1
+// CHECK-x86_64:   [[ADDR_B_YZ:%.*]] = getelementptr inbounds %TSC6NestedV, %TSC6NestedV* [[ADDR_B]], i32 0, i32 1
 // CHECK-x86_64:   [[ADDR_B_YZ_1:%.*]] = bitcast [3 x i8]* [[ADDR_B_YZ]] to i24*
 // CHECK-x86_64:   store i24 [[B_YZ]], i24* [[ADDR_B_YZ_1]], align 4
-// CHECK-x86_64:   [[ADDR_CDE:%.*]] = getelementptr inbounds %TSo11BitfieldOneV, %TSo11BitfieldOneV* [[ARG]], i32 0, i32 2
+// CHECK-x86_64:   [[ADDR_CDE:%.*]] = getelementptr inbounds %TSC11BitfieldOneV, %TSC11BitfieldOneV* [[ARG]], i32 0, i32 2
 // CHECK-x86_64:   [[ADDR_CDE_1:%.*]] = bitcast [4 x i8]* [[ADDR_CDE]] to i32*
 // CHECK-x86_64:   store i32 [[CDE]], i32* [[ADDR_CDE_1]], align 4
-// CHECK-x86_64:   [[ADDR_FGH:%.*]] = getelementptr inbounds %TSo11BitfieldOneV, %TSo11BitfieldOneV* [[ARG]], i32 0, i32 3
+// CHECK-x86_64:   [[ADDR_FGH:%.*]] = getelementptr inbounds %TSC11BitfieldOneV, %TSC11BitfieldOneV* [[ARG]], i32 0, i32 3
 // CHECK-x86_64:   [[ADDR_FGH_1:%.*]] = bitcast [4 x i8]* [[ADDR_FGH]] to i32*
 // CHECK-x86_64:   store i32 [[FGH]], i32* [[ADDR_FGH_1]], align 8
-// CHECK-x86_64:   [[ADDR_I:%.*]] = getelementptr inbounds %TSo11BitfieldOneV, %TSo11BitfieldOneV* [[ARG]], i32 0, i32 4
+// CHECK-x86_64:   [[ADDR_I:%.*]] = getelementptr inbounds %TSC11BitfieldOneV, %TSC11BitfieldOneV* [[ARG]], i32 0, i32 4
 // CHECK-x86_64:   [[ADDR_I_V:%.*]] = getelementptr inbounds %TSf, %TSf* [[ADDR_I]], i32 0, i32 0
 // CHECK-x86_64:   store float [[I]], float* [[ADDR_I_V]], align 4
-// CHECK-x86_64:   [[ADDR_JK:%.*]] = getelementptr inbounds %TSo11BitfieldOneV, %TSo11BitfieldOneV* [[ARG]], i32 0, i32 5
+// CHECK-x86_64:   [[ADDR_JK:%.*]] = getelementptr inbounds %TSC11BitfieldOneV, %TSC11BitfieldOneV* [[ARG]], i32 0, i32 5
 // CHECK-x86_64:   [[ADDR_JK_1:%.*]] = bitcast [1 x i8]* [[ADDR_JK]] to i8*
 // CHECK-x86_64:   store i8 [[JK]], i8* [[ADDR_JK_1]], align 8
-// CHECK-x86_64:   [[ADDR_L:%.*]] = getelementptr inbounds %TSo11BitfieldOneV, %TSo11BitfieldOneV* [[ARG]], i32 0, i32 7
+// CHECK-x86_64:   [[ADDR_L:%.*]] = getelementptr inbounds %TSC11BitfieldOneV, %TSC11BitfieldOneV* [[ARG]], i32 0, i32 7
 // CHECK-x86_64:   [[ADDR_L_V:%.*]] = getelementptr inbounds %Ts6UInt64V, %Ts6UInt64V* [[ADDR_L]], i32 0, i32 0
 // CHECK-x86_64:   store i64 [[L]], i64* [[ADDR_L_V]], align 8
-// CHECK-x86_64:   [[ADDR_M:%.*]] = getelementptr inbounds %TSo11BitfieldOneV, %TSo11BitfieldOneV* [[ARG]], i32 0, i32 8
+// CHECK-x86_64:   [[ADDR_M:%.*]] = getelementptr inbounds %TSC11BitfieldOneV, %TSC11BitfieldOneV* [[ARG]], i32 0, i32 8
 // CHECK-x86_64:   [[ADDR_M_V:%.*]] = getelementptr inbounds %Ts6UInt32V, %Ts6UInt32V* [[ADDR_M]], i32 0, i32 0
 // CHECK-x86_64:   store i32 [[M]], i32* [[ADDR_M_V]], align 8
-// CHECK-x86_64:   call void @consumeBitfieldOne(%TSo11BitfieldOneV* byval align 8 [[ARG]])
+// CHECK-x86_64:   call void @consumeBitfieldOne(%TSC11BitfieldOneV* byval align 8 [[ARG]])
 // CHECK-x86_64:   ret void
 
 
@@ -304,7 +304,7 @@
 }
 
 // CHECK-x86_64-LABEL: define{{( protected)?}} swiftcc void @testBitfieldInBlock
-// CHECK-x86_64:         call void {{%.*}}(%TSo11BitfieldOneV* noalias nocapture sret {{%.*}}, %objc_block* {{%.*}}, %struct.BitfieldOne* {{%.*}})
+// CHECK-x86_64:         call void {{%.*}}(%TSC11BitfieldOneV* noalias nocapture sret {{%.*}}, %objc_block* {{%.*}}, %TSC11BitfieldOneV* byval align 8 {{%.*}})
 sil @testBitfieldInBlock : $@convention(thin) (@owned @convention(block) (BitfieldOne) -> BitfieldOne, BitfieldOne) -> BitfieldOne  {
 entry(%b : $@convention(block) (BitfieldOne) -> BitfieldOne, %x : $BitfieldOne):
   %r = apply %b(%x) : $@convention(block) (BitfieldOne) -> BitfieldOne
diff --git a/test/IRGen/copy_value_destroy_value.sil b/test/IRGen/copy_value_destroy_value.sil
index a236d7b..ac656ab 100644
--- a/test/IRGen/copy_value_destroy_value.sil
+++ b/test/IRGen/copy_value_destroy_value.sil
@@ -27,18 +27,15 @@
   return %2 : $()
 }
 
-// CHECK-LABEL: define{{( protected)?}} swiftcc void @non_trivial(%T019copy_value_destroy_B03FooV* noalias nocapture dereferenceable(36))
-// CHECK: call void @llvm.memcpy
-// CHECK: [[GEP1:%.*]] = getelementptr inbounds %T019copy_value_destroy_B03FooV, %T019copy_value_destroy_B03FooV* %1, i32 0, i32 2
+// CHECK: define{{( protected)?}} swiftcc void @non_trivial(
+// CHECK: [[GEP1:%.*]] = getelementptr inbounds %T019copy_value_destroy_B03FooV, %T019copy_value_destroy_B03FooV* %0, i32 0, i32 2
 // CHECK: [[VAL1:%.*]] = load %swift.refcounted*, %swift.refcounted** [[GEP1]], align 8
-// CHECK: [[GEP2:%.*]] = getelementptr inbounds %T019copy_value_destroy_B03FooV, %T019copy_value_destroy_B03FooV* %1, i32 0, i32 5
+// CHECK: [[GEP2:%.*]] = getelementptr inbounds %T019copy_value_destroy_B03FooV, %T019copy_value_destroy_B03FooV* %0, i32 0, i32 5
 // CHECK: [[VAL2:%.*]] = load %swift.refcounted*, %swift.refcounted** [[GEP2]], align 8
 // CHECK: call void @swift_rt_swift_retain(%swift.refcounted* [[VAL1]])
 // CHECK: call void @swift_rt_swift_retain(%swift.refcounted* [[VAL2]])
 // CHECK: call void @swift_rt_swift_release(%swift.refcounted* [[VAL1]])
 // CHECK: call void @swift_rt_swift_release(%swift.refcounted* [[VAL2]])
-// CHECK: ret void
-// CHECK-LABEL: }
 sil @non_trivial : $@convention(thin) (Foo) -> () {
 bb0(%0 : $Foo):
   %1 = copy_value %0 : $Foo
diff --git a/test/IRGen/enum.sil b/test/IRGen/enum.sil
index 185bae4..df5448a 100644
--- a/test/IRGen/enum.sil
+++ b/test/IRGen/enum.sil
@@ -221,17 +221,26 @@
 // CHECK-32: entry:
 entry(%u : $Singleton):
 // CHECK-32:  [[CAST:%.*]] = bitcast %T4enum9SingletonO* %0 to <{ i64, i64 }>*
-// CHECK-32:  call void @llvm.memcpy.p0i8.p0i8.i32
+// CHECK-32:  [[GEP1:%.*]] = getelementptr inbounds <{ i64, i64 }>, <{ i64, i64 }>* [[CAST]], i32 0, i32 0
+// CHECK-32:  [[ELT1:%.*]] = load i64, i64* [[GEP1]]
+// CHECK-32:  [[GEP2:%.*]] = getelementptr inbounds <{ i64, i64 }>, <{ i64, i64 }>* [[CAST]], i32 0, i32 1
+// CHECK-32:  [[ELT2:%.*]] = load i64, i64* [[GEP2]]
 // CHECK-64:   br label %[[PREDEST:[0-9]+]]
+// CHECK-32:   br label %[[PREDEST:[0-9]+]]
   switch_enum %u : $Singleton, case #Singleton.value!enumelt.1: dest
 
 // CHECK-64: ; <label>:[[PREDEST]]
 // CHECK-64:   br label %[[DEST:[0-9]+]]
 // CHECK-64: ; <label>:[[DEST]]
+// CHECK-32: ; <label>:[[PREDEST]]
+// CHECK-32:   br label %[[DEST:[0-9]+]]
+// CHECK-32: ; <label>:[[DEST]]
 dest(%u2 : $(Builtin.Int64, Builtin.Int64)):
 // CHECK-64:   {{%.*}} = phi i64 [ %0, %[[PREDEST]] ]
 // CHECK-64:   {{%.*}} = phi i64 [ %1, %[[PREDEST]] ]
 // CHECK-64:   ret void
+// CHECK-32:   {{%.*}} = phi i64 [ [[ELT1]], %[[PREDEST]] ]
+// CHECK-32:   {{%.*}} = phi i64 [ [[ELT2]], %[[PREDEST]] ]
 // CHECK-32:   ret void
   %x = tuple ()
   return %x : $()
@@ -745,7 +754,11 @@
 // CHECK-32:  [[LOAD4:%.*]] = load i32, i32* {{.*}}
   switch_enum %u : $AggregateSinglePayload2, case #AggregateSinglePayload2.x!enumelt.1: x_dest, default end
 
-// CHECK-32:   call void @llvm.memcpy.p0i8.p0i8.i32
+// CHECK-32:   [[TRUNC:%.*]] = trunc [[WORD]] [[LOAD1]] to i21
+// CHECK-32:   phi i21 [ [[TRUNC]]
+// CHECK-32:   phi [[WORD]] [ [[LOAD2]]
+// CHECK-32:   phi [[WORD]] [ [[LOAD3]]
+// CHECK-32:   phi [[WORD]] [ [[LOAD4]]
 
 // CHECK-64:   [[TRUNC:%.*]] = trunc [[WORD]] %0 to i21
 // CHECK-64:   phi i21 [ [[TRUNC]]
diff --git a/test/IRGen/exclusivity.sil b/test/IRGen/exclusivity.sil
index 37fa5e1..7ed2b5e 100644
--- a/test/IRGen/exclusivity.sil
+++ b/test/IRGen/exclusivity.sil
@@ -1,4 +1,5 @@
-// RUN: %target-swift-frontend %s -emit-ir -enforce-exclusivity=checked | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s
+// RUN: %target-swift-frontend %s -swift-version 4 -emit-ir -enforce-exclusivity=checked | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-SWIFT4 --check-prefix=CHECK-%target-cpu %s
+// RUN: %target-swift-frontend %s -swift-version 3 -emit-ir -enforce-exclusivity=checked | %FileCheck --check-prefix=CHECK  --check-prefix=CHECK-SWIFT3 --check-prefix=CHECK-%target-cpu %s
 
 sil_stage canonical
 
@@ -24,8 +25,9 @@
   // CHECK: [[T0:%.*]] = bitcast [[BUFFER_T]]* [[SCRATCH0]] to i8*
   // CHECK: call void @llvm.lifetime.start(i64 -1, i8* [[T0]])
   // CHECK: [[T0:%.*]] = bitcast [[INT:%TSi]]* [[PROP]] to i8*
-  // CHECK: call void @swift_beginAccess(i8* [[T0]], [[BUFFER_T]]* [[SCRATCH0]], [[SIZE_T:i32|i64]] 0)
-  %4 = begin_access [read] [dynamic] %3 : $*Int
+  // CHECK-SWIFT3: call void @swift_beginAccess(i8* [[T0]], [[BUFFER_T]]* [[SCRATCH0]], [[SIZE_T:i32|i64]] 16, i8* null)
+  // CHECK-SWIFT4: call void @swift_beginAccess(i8* [[T0]], [[BUFFER_T]]* [[SCRATCH0]], [[SIZE_T:i32|i64]] 0, i8* null)
+    %4 = begin_access [read] [dynamic] %3 : $*Int
 
   // CHECK: [[T0:%.*]] = getelementptr inbounds [[INT]], [[INT]]* %1, i32 0, i32 0
   // CHECK: load {{.*}}* [[T0]]
@@ -44,7 +46,8 @@
   // CHECK: [[T0:%.*]] = bitcast [[BUFFER_T]]* [[SCRATCH1]] to i8*
   // CHECK: call void @llvm.lifetime.start(i64 -1, i8* [[T0]])
   // CHECK: [[T0:%.*]] = bitcast [[INT:%TSi]]* [[PROP]] to i8*
-  // CHECK: call void @swift_beginAccess(i8* [[T0]], [[BUFFER_T]]* [[SCRATCH1]], [[SIZE_T]] 1)
+  // CHECK-SWIFT3: call void @swift_beginAccess(i8* [[T0]], [[BUFFER_T]]* [[SCRATCH1]], [[SIZE_T:i32|i64]] 17, i8* null)
+  // CHECK-SWIFT4: call void @swift_beginAccess(i8* [[T0]], [[BUFFER_T]]* [[SCRATCH1]], [[SIZE_T:i32|i64]] 1, i8* null)
   %12 = begin_access [modify] [dynamic] %11 : $*Int
 
   // CHECK: call {{.*}} @changeInt([[INT]]*{{.*}} [[PROP]])
diff --git a/test/IRGen/foreign_types.sil b/test/IRGen/foreign_types.sil
index 987e685..b52ce5b 100644
--- a/test/IRGen/foreign_types.sil
+++ b/test/IRGen/foreign_types.sil
@@ -3,12 +3,12 @@
 sil_stage canonical
 import c_layout
 
-// CHECK-LABEL: @_T0So14HasNestedUnionV18__Unnamed_struct_sVN = linkonce_odr hidden global
+// CHECK-LABEL: @_T0SC14HasNestedUnionV18__Unnamed_struct_sVN = linkonce_odr hidden global
 // CHECK-SAME:  void (%swift.type*)* @initialize_metadata___Unnamed_struct_s,
 // CHECK-SAME:  i8* getelementptr inbounds
 // CHECK-SAME:  %swift.type* null,
 // CHECK-SAME:  [[INT:i[0-9]+]] 1,
-// CHECK-SAME:  @_T0So14HasNestedUnionV18__Unnamed_struct_sVWV
+// CHECK-SAME:  @_T0SC14HasNestedUnionV18__Unnamed_struct_sVWV
 // CHECK-SAME:  [[INT]] 1,
 // CHECK-SAME:  [[INT]] sub ({{.*}}),
 // CHECK-SAME:  %swift.type* null,
@@ -24,7 +24,7 @@
 }
 
 // CHECK-LABEL: define private void @initialize_metadata___Unnamed_struct_s
-// CHECK:       [[PARENT:%.*]] = call %swift.type* @_T0So14HasNestedUnionVMa()
+// CHECK:       [[PARENT:%.*]] = call %swift.type* @_T0SC14HasNestedUnionVMa()
 // CHECK-NEXT:  [[T0:%.]] = bitcast %swift.type* %0 to %swift.type**
 // CHECK-NEXT:  [[T1:%.]] = getelementptr inbounds %swift.type*, %swift.type** [[T0]], [[INT]] 2
 // CHECK-NEXT:  store %swift.type* [[PARENT]], %swift.type** [[T1]],
diff --git a/test/IRGen/generic_class_anyobject.swift b/test/IRGen/generic_class_anyobject.swift
index d37f4f4..1ad58e4 100644
--- a/test/IRGen/generic_class_anyobject.swift
+++ b/test/IRGen/generic_class_anyobject.swift
@@ -5,6 +5,6 @@
 
 func foo<T: AnyObject>(_ x: T) -> T { return x }
 
-// CHECK-LABEL: define hidden swiftcc %objc_object* @_T023generic_class_anyobject3bars9AnyObject_psAC_pF(%objc_object*)
+// CHECK-LABEL: define hidden swiftcc %objc_object* @_T023generic_class_anyobject3baryXlyXlF(%objc_object*)
 // CHECK:         call swiftcc %objc_object* @_T023generic_class_anyobject3foo{{[_0-9a-zA-Z]*}}F
 func bar(_ x: AnyObject) -> AnyObject { return foo(x) }
diff --git a/test/IRGen/indirect_argument.sil b/test/IRGen/indirect_argument.sil
index 7da2297..c96414f 100644
--- a/test/IRGen/indirect_argument.sil
+++ b/test/IRGen/indirect_argument.sil
@@ -12,9 +12,9 @@
 }
 
 // TODO: could be the context param
-// CHECK-LABEL-64: define{{( protected)?}} swiftcc void @huge_method(%T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}))
-// CHECK-LABEL-32: define{{( protected)?}} swiftcc void @huge_method(%T17indirect_argument4HugeV* noalias nocapture swiftself dereferenceable({{.*}}))
-// CHECK:         call swiftcc void @huge_method(%T17indirect_argument4HugeV* noalias nocapture swiftself dereferenceable({{.*}})
+// CHECK-LABEL: define{{( protected)?}} swiftcc void @huge_method(%T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}))
+// CHECK:         [[TMP:%.*]] = alloca
+// CHECK:         call swiftcc void @huge_method(%T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}) [[TMP]])
 sil @huge_method : $@convention(method) Huge -> () {
 entry(%x : $Huge):
   %f = function_ref @huge_method : $@convention(method) Huge -> ()
@@ -23,7 +23,8 @@
 }
 
 // CHECK-LABEL: define{{( protected)?}} swiftcc void @huge_param(%T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}))
-// CHECK:         call swiftcc void @huge_param(%T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}) %0)
+// CHECK:         [[TMP:%.*]] = alloca
+// CHECK:         call swiftcc void @huge_param(%T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}) [[TMP]])
 sil @huge_param : $@convention(thin) Huge -> () {
 entry(%x : $Huge):
   %f = function_ref @huge_param : $@convention(thin) Huge -> ()
@@ -32,7 +33,8 @@
 }
 
 // CHECK-LABEL: define{{( protected)?}} swiftcc void @huge_alignment_param(%T17indirect_argument13HugeAlignmentV* noalias nocapture dereferenceable({{.*}}))
-// CHECK:         call swiftcc void @huge_alignment_param(%T17indirect_argument13HugeAlignmentV* noalias nocapture dereferenceable({{.*}}) %0)
+// CHECK:         [[TMP:%.*]] = alloca
+// CHECK:         call swiftcc void @huge_alignment_param(%T17indirect_argument13HugeAlignmentV* noalias nocapture dereferenceable({{.*}}) [[TMP]])
 sil @huge_alignment_param : $@convention(thin) HugeAlignment -> () {
 entry(%x : $HugeAlignment):
   %f = function_ref @huge_alignment_param : $@convention(thin) HugeAlignment -> ()
@@ -41,8 +43,9 @@
 }
 
 // CHECK-LABEL: define{{( protected)?}} swiftcc void @huge_param_and_return(%T17indirect_argument4HugeV* noalias nocapture sret, %T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}))
-// CHECK:         [[TMP:%.*]] = alloca
-// CHECK:         call swiftcc void @huge_param_and_return(%T17indirect_argument4HugeV* noalias nocapture sret [[TMP]], %T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}) %1)
+// CHECK:         [[TMP_ARG:%.*]] = alloca
+// CHECK:         [[TMP_RET:%.*]] = alloca
+// CHECK:         call swiftcc void @huge_param_and_return(%T17indirect_argument4HugeV* noalias nocapture sret [[TMP_RET]], %T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}) [[TMP_ARG]])
 sil @huge_param_and_return : $@convention(thin) Huge -> Huge {
 entry(%x : $Huge):
   %f = function_ref @huge_param_and_return : $@convention(thin) Huge -> Huge
@@ -51,7 +54,8 @@
 }
 
 // CHECK-LABEL: define{{( protected)?}} swiftcc void @huge_param_and_indirect_return(%T17indirect_argument4HugeV* noalias nocapture sret, %T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}))
-// CHECK:         call swiftcc void @huge_param_and_indirect_return(%T17indirect_argument4HugeV* noalias nocapture sret %0, %T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}) %1)
+// CHECK:         [[TMP_ARG:%.*]] = alloca
+// CHECK:         call swiftcc void @huge_param_and_indirect_return(%T17indirect_argument4HugeV* noalias nocapture sret %0, %T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}) [[TMP_ARG]])
 sil @huge_param_and_indirect_return : $@convention(thin) (Huge) -> @out Huge {
 entry(%o : $*Huge, %x : $Huge):
   %f = function_ref @huge_param_and_indirect_return : $@convention(thin) (Huge) -> @out Huge
@@ -60,12 +64,10 @@
 }
 
 // CHECK-LABEL: define{{( protected)?}} swiftcc void @huge_partial_application(%T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}), %T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}))
-// CHECK-32:         [[CLOSURE:%.*]] = call noalias %swift.refcounted* @swift_rt_swift_allocObject
-// CHECK-64:         [[CLOSURE:%.*]] = call noalias %swift.refcounted* @swift_rt_swift_allocObject
+// CHECK:         [[TMP_ARG:%.*]] = alloca
+// CHECK:         [[CLOSURE:%.*]] = call noalias %swift.refcounted* @swift_rt_swift_allocObject
 // CHECK:         bitcast %swift.refcounted* [[CLOSURE]] to <{ %swift.refcounted, %T17indirect_argument4HugeV }>*
-// CHECK:         call void @llvm.memcpy
-// CHECK-64:         call swiftcc void @_T024huge_partial_applicationTA(%T17indirect_argument4HugeV* noalias nocapture dereferenceable(40) %0, %swift.refcounted* swiftself [[CLOSURE]])
-// CHECK-32:         call swiftcc void @_T024huge_partial_applicationTA(%T17indirect_argument4HugeV* noalias nocapture dereferenceable(20) %0, %swift.refcounted* swiftself [[CLOSURE]])
+// CHECK:         call swiftcc void @_T024huge_partial_applicationTA(%T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}) [[TMP_ARG]], %swift.refcounted* swiftself [[CLOSURE]])
 // CHECK:       define internal swiftcc void @_T024huge_partial_applicationTA(%T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}), %swift.refcounted* swiftself)
 // CHECK:         [[TMP_ARG:%.*]] = alloca
 // CHECK-NOT:     tail
@@ -79,10 +81,11 @@
 }
 
 // CHECK-LABEL: define{{( protected)?}} swiftcc void @huge_partial_application_stret(%T17indirect_argument4HugeV* noalias nocapture sret, %T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}), %T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}))
-// CHECK:         [[TMP:%.*]] = alloca
+// CHECK:         [[TMP_ARG:%.*]] = alloca
+// CHECK:         [[TMP_RET:%.*]] = alloca
 // CHECK:         [[CLOSURE:%.*]] = call noalias %swift.refcounted* @swift_rt_swift_allocObject
 // CHECK:         bitcast %swift.refcounted* [[CLOSURE]] to <{ %swift.refcounted, %T17indirect_argument4HugeV }>*
-// CHECK:         call swiftcc void @_T030huge_partial_application_stretTA(%T17indirect_argument4HugeV* noalias nocapture sret [[TMP]], %T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}) %1, %swift.refcounted* swiftself [[CLOSURE]])
+// CHECK:         call swiftcc void @_T030huge_partial_application_stretTA(%T17indirect_argument4HugeV* noalias nocapture sret [[TMP_RET]], %T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}) [[TMP_ARG]], %swift.refcounted* swiftself [[CLOSURE]])
 // CHECK:       define internal swiftcc void @_T030huge_partial_application_stretTA(%T17indirect_argument4HugeV* noalias nocapture sret, %T17indirect_argument4HugeV* noalias nocapture dereferenceable({{.*}}), %swift.refcounted* swiftself)
 // CHECK:         [[TMP_ARG:%.*]] = alloca
 // CHECK-NOT:     tail
diff --git a/test/IRGen/keypaths.sil b/test/IRGen/keypaths.sil
index 77fc3f4..851792f 100644
--- a/test/IRGen/keypaths.sil
+++ b/test/IRGen/keypaths.sil
@@ -1,6 +1,4 @@
 // RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
-// TODO: 32-bit support
-// REQUIRES: PTRSIZE=64
 
 sil_stage canonical
 import Swift
@@ -64,7 +62,7 @@
 //               -- 0x8000_0018 - instantiable in-line, size 4
 // CHECK-SAME: i32 -2147483644,
 // -- 0x4000_0000 (class) + offset of C.x
-// CHECK-32-SAME: i32 1073741832 }>
+// CHECK-32-SAME: i32 1073741836 }>
 // CHECK-64-SAME: i32 1073741840 }>
 
 // -- %e: C.y
@@ -75,7 +73,7 @@
 //               -- 0x8000_0018 - instantiable in-line, size 4
 // CHECK-SAME: i32 -2147483644,
 // -- 0x4000_0000 (class) + offset of C.y
-// CHECK-32-SAME: i32 1073741836 }>
+// CHECK-32-SAME: i32 1073741840 }>
 // CHECK-64-SAME: i32 1073741848 }>
 
 // -- %f: C.z
@@ -86,7 +84,7 @@
 //               -- 0x8000_0018 - instantiable in-line, size 4
 // CHECK-SAME: i32 -2147483644,
 // -- 0x4000_0000 (class) + offset of C.z
-// CHECK-32-SAME: i32 1073741848 }>
+// CHECK-32-SAME: i32 1073741852 }>
 // CHECK-64-SAME: i32 1073741872 }>
 
 // -- %g: S.z.x
@@ -103,7 +101,7 @@
 // CHECK-64-SAME: i32 32,
 // CHECK: %swift.type* (i8*)*
 // -- 0x4000_0000 (class) + offset of C.x
-// CHECK-32-SAME: i32 1073741832 }>
+// CHECK-32-SAME: i32 1073741836 }>
 // CHECK-64-SAME: i32 1073741840 }>
 
 // -- %h: C.z.x
@@ -116,7 +114,7 @@
 //                  -- 0x8000_0018 - instantiable in-line, size 16
 // CHECK-64-SAME: i32 -2147483632,
 // -- 0x4000_0000 (class) + offset of C.z
-// CHECK-32-SAME: i32 1073741848,
+// CHECK-32-SAME: i32 1073741852,
 // CHECK-64-SAME: i32 1073741872,
 // CHECK: %swift.type* (i8*)*
 // -- offset of S.x
@@ -130,7 +128,7 @@
 //              -- 0x8000_0014 - instantiable in-line, size 20
 // CHECK-64-SAME: i32 -2147483628,
 //              -- 0x8000_000c - instantiable in-line, size 12
-// CHECK-32-SAME: i32 -2147483640,
+// CHECK-32-SAME: i32 -2147483636,
 // -- 0x2000_0000 - computed, get-only, identified by function pointer, no args
 // CHECK-SAME: i32 536870912,
 // CHECK-SAME: void ()* @k_id,
@@ -144,7 +142,7 @@
 //              -- 0x8000_001c - instantiable in-line, size 28
 // CHECK-64-SAME: i32 -2147483620,
 //              -- 0x8000_0010 - instantiable in-line, size 16
-// CHECK-32-SAME: i32 -2147483636,
+// CHECK-32-SAME: i32 -2147483632,
 // -- 0x2a00_0000 - computed, settable, nonmutating, identified by vtable, no args
 // CHECK-SAME: i32 704643072,
 // CHECK-SAME: [[WORD]]
@@ -159,7 +157,7 @@
 //              -- 0x8000_001c - instantiable in-line, size 28
 // CHECK-64-SAME: i32 -2147483620,
 //              -- 0x8000_0010 - instantiable in-line, size 16
-// CHECK-32-SAME: i32 -2147483636,
+// CHECK-32-SAME: i32 -2147483632,
 // -- 0x3c00_0000 - computed, settable, nonmutating, identified by property offset, no args
 // CHECK-SAME: i32 1006632960,
 // CHECK-SAME: [[WORD]]
diff --git a/test/IRGen/newtype.swift b/test/IRGen/newtype.swift
index e12907b..16bceae 100644
--- a/test/IRGen/newtype.swift
+++ b/test/IRGen/newtype.swift
@@ -10,11 +10,11 @@
 // REQUIRES: objc_interop
 
 // Witness table for synthesized ClosedEnums : _ObjectiveCBridgeable.
-// CHECK: @_T0So10ClosedEnumVs21_ObjectiveCBridgeable7NewtypeWP = linkonce_odr
+// CHECK: @_T0SC10ClosedEnumVs21_ObjectiveCBridgeable7NewtypeWP = linkonce_odr
 
-// CHECK-LABEL: define swiftcc %TSo8NSStringC* @_T07newtype14getErrorDomainSo0cD0VyF()
+// CHECK-LABEL: define swiftcc %TSo8NSStringC* @_T07newtype14getErrorDomainSC0cD0VyF()
 public func getErrorDomain() -> ErrorDomain {
-  // CHECK: load %TSo8NSStringC*, %TSo8NSStringC** getelementptr inbounds (%TSo11ErrorDomainV, %TSo11ErrorDomainV* {{.*}}@SNTErrOne
+  // CHECK: load %TSo8NSStringC*, %TSo8NSStringC** getelementptr inbounds (%TSC11ErrorDomainV, %TSC11ErrorDomainV* {{.*}}@SNTErrOne
   return .one
 }
 
@@ -40,7 +40,7 @@
 // CHECK: ret
 }
 
-// CHECK-LABEL: _T07newtype17getCFNewTypeValueSo0cD0VSb6useVar_tF
+// CHECK-LABEL: _T07newtype17getCFNewTypeValueSC0cD0VSb6useVar_tF
 public func getCFNewTypeValue(useVar: Bool) -> CFNewType {
   if (useVar) {
     return CFNewType.MyCFNewTypeValue
@@ -133,26 +133,26 @@
 }
 
 class ObjCTest {
-  // CHECK-LABEL: define hidden %0* @_T07newtype8ObjCTestC19optionalPassThroughSo11ErrorDomainVSgAGFTo
+  // CHECK-LABEL: define hidden %0* @_T07newtype8ObjCTestC19optionalPassThroughSC11ErrorDomainVSgAGFTo
   // CHECK: [[CASTED:%.+]] = ptrtoint %0* %2 to i{{32|64}}
-  // CHECK: [[RESULT:%.+]] = call swiftcc i{{32|64}} @_T07newtype8ObjCTestC19optionalPassThroughSo11ErrorDomainVSgAGF(i{{32|64}} [[CASTED]], %T7newtype8ObjCTestC* swiftself {{%.+}})
+  // CHECK: [[RESULT:%.+]] = call swiftcc i{{32|64}} @_T07newtype8ObjCTestC19optionalPassThroughSC11ErrorDomainVSgAGF(i{{32|64}} [[CASTED]], %T7newtype8ObjCTestC* swiftself {{%.+}})
   // CHECK: [[OPAQUE_RESULT:%.+]] = inttoptr i{{32|64}} [[RESULT]] to %0*
   // CHECK: ret %0* [[OPAQUE_RESULT]]
   // CHECK: {{^}$}}
 
-  // OPT-LABEL: define hidden %0* @_T07newtype8ObjCTestC19optionalPassThroughSo11ErrorDomainVSgAGFTo
+  // OPT-LABEL: define hidden %0* @_T07newtype8ObjCTestC19optionalPassThroughSC11ErrorDomainVSgAGFTo
   // OPT: ret %0* %2
   // OPT: {{^}$}}
   @objc func optionalPassThrough(_ ed: ErrorDomain?) -> ErrorDomain? {
     return ed
   }
 
-  // CHECK-LABEL: define hidden i32 @_T07newtype8ObjCTestC18integerPassThroughSo5MyIntVAFFTo
-  // CHECK: [[RESULT:%.+]] = call swiftcc i32 @_T07newtype8ObjCTestC18integerPassThroughSo5MyIntVAFF(i32 %2, %T7newtype8ObjCTestC* swiftself {{%.+}})
+  // CHECK-LABEL: define hidden i32 @_T07newtype8ObjCTestC18integerPassThroughSC5MyIntVAFFTo
+  // CHECK: [[RESULT:%.+]] = call swiftcc i32 @_T07newtype8ObjCTestC18integerPassThroughSC5MyIntVAFF(i32 %2, %T7newtype8ObjCTestC* swiftself {{%.+}})
   // CHECK: ret i32 [[RESULT]]
   // CHECK: {{^}$}}
 
-  // OPT-LABEL: define hidden i32 @_T07newtype8ObjCTestC18integerPassThroughSo5MyIntVAFFTo
+  // OPT-LABEL: define hidden i32 @_T07newtype8ObjCTestC18integerPassThroughSC5MyIntVAFFTo
   // OPT: ret i32 %2
   // OPT: {{^}$}}
   @objc func integerPassThrough(_ num: MyInt) -> MyInt {
diff --git a/test/IRGen/objc.swift b/test/IRGen/objc.swift
index 7b424f7..9ab389f 100644
--- a/test/IRGen/objc.swift
+++ b/test/IRGen/objc.swift
@@ -13,16 +13,16 @@
 // CHECK: [[MYBLAMMO:%T4objc8MyBlammoC]] = type
 // CHECK: [[TEST2:%T4objc5Test2C]] = type
 // CHECK: [[OBJC:%objc_object]] = type
-// CHECK: [[ID:%T4objc2idV]] = type <{ %Ts9AnyObjectP }>
+// CHECK: [[ID:%T4objc2idV]] = type <{ %AnyObject }>
 // CHECK: [[GIZMO:%TSo5GizmoC]] = type
-// CHECK: [[RECT:%TSo4RectV]] = type
+// CHECK: [[RECT:%TSC4RectV]] = type
 // CHECK: [[FLOAT:%TSf]] = type
 
 // CHECK: @"\01L_selector_data(bar)" = private global [4 x i8] c"bar\00", section "__TEXT,__objc_methname,cstring_literals", align 1
 // CHECK: @"\01L_selector(bar)" = private externally_initialized global i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01L_selector_data(bar)", i64 0, i64 0), section "__DATA,__objc_selrefs,literal_pointers,no_dead_strip", align 8
 
-// CHECK: @_T0So4RectVMn = linkonce_odr hidden constant
-// CHECK: @_T0So4RectVN = linkonce_odr hidden global
+// CHECK: @_T0SC4RectVMn = linkonce_odr hidden constant
+// CHECK: @_T0SC4RectVN = linkonce_odr hidden global
 
 // CHECK: @"\01L_selector_data(acquiesce)"
 // CHECK-NOT: @"\01L_selector_data(disharmonize)"
@@ -124,8 +124,8 @@
 // Force the emission of the Rect metadata.
 func test11_helper<T>(_ t: T) {}
 // NSRect's metadata needs to be uniqued at runtime using getForeignTypeMetadata.
-// CHECK-LABEL: define hidden swiftcc void @_T04objc6test11ySo4RectVF
-// CHECK:         call %swift.type* @swift_getForeignTypeMetadata({{.*}} @_T0So4RectVN
+// CHECK-LABEL: define hidden swiftcc void @_T04objc6test11ySC4RectVF
+// CHECK:         call %swift.type* @swift_getForeignTypeMetadata({{.*}} @_T0SC4RectVN
 func test11(_ r: Rect) { test11_helper(r) }
 
 class WeakObjC {
diff --git a/test/IRGen/objc_class_export.swift b/test/IRGen/objc_class_export.swift
index dca2d45..1ec1dbe 100644
--- a/test/IRGen/objc_class_export.swift
+++ b/test/IRGen/objc_class_export.swift
@@ -10,9 +10,9 @@
 // CHECK: [[FOO:%T17objc_class_export3FooC]] = type <{ [[REF]], %TSi }>
 // CHECK: [[INT:%TSi]] = type <{ i64 }>
 // CHECK: [[DOUBLE:%TSd]] = type <{ double }>
-// CHECK: [[NSRECT:%TSo6NSRectV]] = type <{ %TSo7NSPointV, %TSo6NSSizeV }>
-// CHECK: [[NSPOINT:%TSo7NSPointV]] = type <{ %TSd, %TSd }>
-// CHECK: [[NSSIZE:%TSo6NSSizeV]] = type <{ %TSd, %TSd }>
+// CHECK: [[NSRECT:%TSC6NSRectV]] = type <{ %TSC7NSPointV, %TSC6NSSizeV }>
+// CHECK: [[NSPOINT:%TSC7NSPointV]] = type <{ %TSd, %TSd }>
+// CHECK: [[NSSIZE:%TSC6NSSizeV]] = type <{ %TSd, %TSd }>
 // CHECK: [[OBJC:%objc_object]] = type opaque
 
 // CHECK: @"OBJC_METACLASS_$__TtC17objc_class_export3Foo" = hidden global %objc_class {
@@ -58,7 +58,7 @@
 // CHECK:   %swift.opaque* null,
 // CHECK:   i64 add (i64 ptrtoint ({{.*}}* @_DATA__TtC17objc_class_export3Foo to i64), i64 1),
 // CHECK:   [[FOO]]* (%swift.type*)* @_T017objc_class_export3FooC6createACyFZ,
-// CHECK:   void (double, double, double, double, [[FOO]]*)* @_T017objc_class_export3FooC10drawInRectySo6NSRectV5dirty_tF
+// CHECK:   void (double, double, double, double, [[FOO]]*)* @_T017objc_class_export3FooC10drawInRectySC6NSRectV5dirty_tF
 // CHECK: }>, section "__DATA,__objc_data, regular"
 // -- TODO: The OBJC_CLASS symbol should reflect the qualified runtime name of
 //    Foo.
@@ -82,25 +82,25 @@
 
   @objc func drawInRect(dirty dirty: NSRect) {
   }
-  // CHECK: define internal void @_T017objc_class_export3FooC10drawInRectySo6NSRectV5dirty_tFTo([[OPAQUE:%.*]]*, i8*, [[NSRECT]]* byval align 8) unnamed_addr {{.*}} {
+  // CHECK: define internal void @_T017objc_class_export3FooC10drawInRectySC6NSRectV5dirty_tFTo([[OPAQUE:%.*]]*, i8*, [[NSRECT]]* byval align 8) unnamed_addr {{.*}} {
   // CHECK:   [[CAST:%[a-zA-Z0-9]+]] = bitcast [[OPAQUE]]* %0 to [[FOO]]*
-  // CHECK:   call swiftcc void @_T017objc_class_export3FooC10drawInRectySo6NSRectV5dirty_tF(double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}}, [[FOO]]* swiftself [[CAST]])
+  // CHECK:   call swiftcc void @_T017objc_class_export3FooC10drawInRectySC6NSRectV5dirty_tF(double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}}, [[FOO]]* swiftself [[CAST]])
   // CHECK: }
 
   @objc func bounds() -> NSRect {
     return NSRect(origin: NSPoint(x: 0, y: 0), 
                   size: NSSize(width: 0, height: 0))
   }
-  // CHECK: define internal void @_T017objc_class_export3FooC6boundsSo6NSRectVyFTo([[NSRECT]]* noalias nocapture sret, [[OPAQUE4:%.*]]*, i8*) unnamed_addr {{.*}} {
+  // CHECK: define internal void @_T017objc_class_export3FooC6boundsSC6NSRectVyFTo([[NSRECT]]* noalias nocapture sret, [[OPAQUE4:%.*]]*, i8*) unnamed_addr {{.*}} {
   // CHECK:   [[CAST:%[a-zA-Z0-9]+]] = bitcast [[OPAQUE4]]* %1 to [[FOO]]*
-  // CHECK:   call swiftcc { double, double, double, double } @_T017objc_class_export3FooC6boundsSo6NSRectVyF([[FOO]]* swiftself [[CAST]])
+  // CHECK:   call swiftcc { double, double, double, double } @_T017objc_class_export3FooC6boundsSC6NSRectVyF([[FOO]]* swiftself [[CAST]])
 
   @objc func convertRectToBacking(r r: NSRect) -> NSRect {
     return r
   }
-  // CHECK: define internal void @_T017objc_class_export3FooC20convertRectToBackingSo6NSRectVAF1r_tFTo([[NSRECT]]* noalias nocapture sret, [[OPAQUE5:%.*]]*, i8*, [[NSRECT]]* byval align 8) unnamed_addr {{.*}} {
+  // CHECK: define internal void @_T017objc_class_export3FooC20convertRectToBackingSC6NSRectVAF1r_tFTo([[NSRECT]]* noalias nocapture sret, [[OPAQUE5:%.*]]*, i8*, [[NSRECT]]* byval align 8) unnamed_addr {{.*}} {
   // CHECK:   [[CAST:%[a-zA-Z0-9]+]] = bitcast [[OPAQUE5]]* %1 to [[FOO]]*
-  // CHECK:   call swiftcc { double, double, double, double } @_T017objc_class_export3FooC20convertRectToBackingSo6NSRectVAF1r_tF(double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}}, [[FOO]]* swiftself [[CAST]])
+  // CHECK:   call swiftcc { double, double, double, double } @_T017objc_class_export3FooC20convertRectToBackingSC6NSRectVAF1r_tF(double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}}, [[FOO]]* swiftself [[CAST]])
 
   func doStuffToSwiftSlice(f f: [Int]) {
   }
diff --git a/test/IRGen/objc_deprecated_objc_thunks.swift b/test/IRGen/objc_deprecated_objc_thunks.swift
index f00a172..4bb1fa5 100644
--- a/test/IRGen/objc_deprecated_objc_thunks.swift
+++ b/test/IRGen/objc_deprecated_objc_thunks.swift
@@ -1,4 +1,6 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
+// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -disable-objc-attr-requires-foundation-module -enable-swift3-objc-inference -swift-version 4 | %FileCheck -check-prefix CHECK-SWIFT4 %s
+
+// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -disable-objc-attr-requires-foundation-module -swift-version 3 | %FileCheck -check-prefix CHECK-SWIFT3 %s
 
 // REQUIRES: CPU=x86_64
 // REQUIRES: objc_interop
@@ -9,7 +11,11 @@
   func foo() { }
 }
 
-// CHECK-LABEL: define hidden void @_T0016objc_deprecated_A7_thunks12ObjCSubclassC3fooyyFTo(%0*, i8*)
-// CHECK: entry:
-// CHECK: [[SELF:%[0-9]+]] = bitcast %0* %0 to %objc_object*
-// CHECK-NEXT: call void @swift_objc_swift3ImplicitObjCEntrypoint(%objc_object* [[SELF]], i8* %1)
\ No newline at end of file
+// CHECK-SWIFT4-LABEL: define hidden void @_T0016objc_deprecated_A7_thunks12ObjCSubclassC3fooyyFTo(%0*, i8*)
+// CHECK-SWIFT4: entry:
+// CHECK-SWIFT4: [[SELF:%[0-9]+]] = bitcast %0* %0 to %objc_object*
+// CHECK-SWIFT4-NEXT: call void @swift_objc_swift3ImplicitObjCEntrypoint(%objc_object* [[SELF]], i8* %1)
+
+// CHECK-SWIFT3-LABEL: define hidden void @_T0016objc_deprecated_A7_thunks12ObjCSubclassC3fooyyFTo(%0*, i8*)
+// CHECK-SWIFT3: entry:
+// CHECK-SWIFT3-NOT: call void @swift_objc_swift3ImplicitObjCEntrypoint(%objc_object* [[SELF]], i8* %1)
diff --git a/test/IRGen/objc_generic_class_metadata.sil b/test/IRGen/objc_generic_class_metadata.sil
index e1392b6..4fa627c 100644
--- a/test/IRGen/objc_generic_class_metadata.sil
+++ b/test/IRGen/objc_generic_class_metadata.sil
@@ -71,7 +71,7 @@
   unreachable
 }
 
-sil @_T027objc_generic_class_metadata8SubclassCSQyACGs10DictionaryVySo13GenericOptionVypGSg7options_tcfcTo : $@convention(objc_method) (@owned Subclass, @owned NSDictionary) -> @owned Subclass {
+sil @_T027objc_generic_class_metadata8SubclassCSQyACGs10DictionaryVySC13GenericOptionVypGSg7options_tcfcTo : $@convention(objc_method) (@owned Subclass, @owned NSDictionary) -> @owned Subclass {
 entry(%0: $Subclass, %1: $NSDictionary):
   unreachable
 }
diff --git a/test/IRGen/objc_generic_protocol_conformance.swift b/test/IRGen/objc_generic_protocol_conformance.swift
index ceea933..29ceb16 100644
--- a/test/IRGen/objc_generic_protocol_conformance.swift
+++ b/test/IRGen/objc_generic_protocol_conformance.swift
@@ -9,5 +9,5 @@
 
 extension Foo: P {}
 
-// SIL-LABEL: sil private [transparent] [thunk] @_T0So3FooCyxG33objc_generic_protocol_conformance1PADs9AnyObjectRzlAdEP3fooyyFTW {{.*}} @pseudogeneric
-// IR-LABEL: define internal swiftcc void @_T0So3FooCyxG33objc_generic_protocol_conformance1PADs9AnyObjectRzlAdEP3fooyyFTW(%TSo3FooC** noalias nocapture swiftself dereferenceable({{4|8}}), %swift.type*{{( %Self)?}}, i8**{{( %SelfWitnessTable)?}})
+// SIL-LABEL: sil private [transparent] [thunk] @_T0So3FooCyxG33objc_generic_protocol_conformance1PADRlzClAdEP3fooyyFTW {{.*}} @pseudogeneric
+// IR-LABEL: define internal swiftcc void @_T0So3FooCyxG33objc_generic_protocol_conformance1PADRlzClAdEP3fooyyFTW(%TSo3FooC** noalias nocapture swiftself dereferenceable({{4|8}}), %swift.type*{{( %Self)?}}, i8**{{( %SelfWitnessTable)?}})
diff --git a/test/IRGen/objc_methods.swift b/test/IRGen/objc_methods.swift
index c5c987b..543df7a 100644
--- a/test/IRGen/objc_methods.swift
+++ b/test/IRGen/objc_methods.swift
@@ -50,7 +50,7 @@
 // CHECK:   }, {
 // CHECK:     i8* getelementptr inbounds ([8 x i8], [8 x i8]* @"\01L_selector_data(garply:)", i64 0, i64 0),
 // CHECK:     i8* getelementptr inbounds ([11 x i8], [11 x i8]* [[GARPLY_SIGNATURE]], i64 0, i64 0),
-// CHECK:     i8* bitcast (void (i8*, i8*, i8*)* @_T012objc_methods3FooC6garplyys9AnyObject_pSgFTo to i8*)
+// CHECK:     i8* bitcast (void (i8*, i8*, i8*)* @_T012objc_methods3FooC6garplyyyXlSgFTo to i8*)
 // CHECK:   }, {
 // CHECK:     i8* getelementptr inbounds ([7 x i8], [7 x i8]* @"\01L_selector_data(block:)", i64 0, i64 0),
 // CHECK:     i8* getelementptr inbounds ([12 x i8], [12 x i8]* [[BLOCK_SIGNATURE_TRAD]], i64 0, i64 0),
diff --git a/test/IRGen/objc_ns_enum.swift b/test/IRGen/objc_ns_enum.swift
index a31b11d..ab1caf0 100644
--- a/test/IRGen/objc_ns_enum.swift
+++ b/test/IRGen/objc_ns_enum.swift
@@ -8,71 +8,71 @@
 import Foundation
 import gizmo
 
-// CHECK: @_T0So16NSRuncingOptionsOWV = linkonce_odr hidden constant
-// CHECK: @_T0So16NSRuncingOptionsOMn = linkonce_odr hidden constant
-// CHECK: @_T0So16NSRuncingOptionsON = linkonce_odr hidden global
-// CHECK: @_T0So28NeverActuallyMentionedByNameOs9Equatable5gizmoWP = linkonce_odr hidden constant
+// CHECK: @_T0SC16NSRuncingOptionsOWV = linkonce_odr hidden constant
+// CHECK: @_T0SC16NSRuncingOptionsOMn = linkonce_odr hidden constant
+// CHECK: @_T0SC16NSRuncingOptionsON = linkonce_odr hidden global
+// CHECK: @_T0SC28NeverActuallyMentionedByNameOs9Equatable5gizmoWP = linkonce_odr hidden constant
 
 // CHECK-LABEL: define{{( protected)?}} i32 @main
-// CHECK:         call %swift.type* @_T0So16NSRuncingOptionsOMa()
+// CHECK:         call %swift.type* @_T0SC16NSRuncingOptionsOMa()
 
-// CHECK: define hidden swiftcc i16 @_T012objc_ns_enum09imported_C9_inject_aSo16NSRuncingOptionsOyF()
+// CHECK: define hidden swiftcc i16 @_T012objc_ns_enum09imported_C9_inject_aSC16NSRuncingOptionsOyF()
 // CHECK:   ret i16 123
 func imported_enum_inject_a() -> NSRuncingOptions {
   return .mince
 }
 
-// CHECK: define hidden swiftcc i16 @_T012objc_ns_enum09imported_C9_inject_bSo16NSRuncingOptionsOyF()
+// CHECK: define hidden swiftcc i16 @_T012objc_ns_enum09imported_C9_inject_bSC16NSRuncingOptionsOyF()
 // CHECK:   ret i16 4567
 func imported_enum_inject_b() -> NSRuncingOptions {
   return .quinceSliced
 }
 
-// CHECK: define hidden swiftcc i16 @_T012objc_ns_enum09imported_C9_inject_cSo16NSRuncingOptionsOyF()
+// CHECK: define hidden swiftcc i16 @_T012objc_ns_enum09imported_C9_inject_cSC16NSRuncingOptionsOyF()
 // CHECK:   ret i16 5678
 func imported_enum_inject_c() -> NSRuncingOptions {
   return .quinceJulienned
 }
 
-// CHECK: define hidden swiftcc i16 @_T012objc_ns_enum09imported_C9_inject_dSo16NSRuncingOptionsOyF()
+// CHECK: define hidden swiftcc i16 @_T012objc_ns_enum09imported_C9_inject_dSC16NSRuncingOptionsOyF()
 // CHECK:   ret i16 6789
 func imported_enum_inject_d() -> NSRuncingOptions {
   return .quinceDiced
 }
 
-// CHECK: define hidden swiftcc i32 @_T012objc_ns_enum09imported_C17_inject_radixed_aSo16NSRadixedOptionsOyF() {{.*}} {
+// CHECK: define hidden swiftcc i32 @_T012objc_ns_enum09imported_C17_inject_radixed_aSC16NSRadixedOptionsOyF() {{.*}} {
 // -- octal 0755
 // CHECK:   ret i32 493
 func imported_enum_inject_radixed_a() -> NSRadixedOptions {
   return .octal
 }
 
-// CHECK: define hidden swiftcc i32 @_T012objc_ns_enum09imported_C17_inject_radixed_bSo16NSRadixedOptionsOyF() {{.*}} {
+// CHECK: define hidden swiftcc i32 @_T012objc_ns_enum09imported_C17_inject_radixed_bSC16NSRadixedOptionsOyF() {{.*}} {
 // -- hex 0xFFFF
 // CHECK:   ret i32 65535
 func imported_enum_inject_radixed_b() -> NSRadixedOptions {
   return .hex
 }
 
-// CHECK: define hidden swiftcc i32 @_T012objc_ns_enum09imported_C18_inject_negative_aSo17NSNegativeOptionsOyF() {{.*}} {
+// CHECK: define hidden swiftcc i32 @_T012objc_ns_enum09imported_C18_inject_negative_aSC17NSNegativeOptionsOyF() {{.*}} {
 // CHECK:   ret i32 -1
 func imported_enum_inject_negative_a() -> NSNegativeOptions {
   return .foo
 }
 
-// CHECK: define hidden swiftcc i32 @_T012objc_ns_enum09imported_C18_inject_negative_bSo17NSNegativeOptionsOyF() {{.*}} {
+// CHECK: define hidden swiftcc i32 @_T012objc_ns_enum09imported_C18_inject_negative_bSC17NSNegativeOptionsOyF() {{.*}} {
 // CHECK:   ret i32 -2147483648
 func imported_enum_inject_negative_b() -> NSNegativeOptions {
   return .bar
 }
 
-// CHECK: define hidden swiftcc i32 @_T012objc_ns_enum09imported_C27_inject_negative_unsigned_aSo25NSNegativeUnsignedOptionsOyF() {{.*}} {
+// CHECK: define hidden swiftcc i32 @_T012objc_ns_enum09imported_C27_inject_negative_unsigned_aSC25NSNegativeUnsignedOptionsOyF() {{.*}} {
 // CHECK:   ret i32 -1
 func imported_enum_inject_negative_unsigned_a() -> NSNegativeUnsignedOptions {
   return .foo
 }
 
-// CHECK: define hidden swiftcc i32 @_T012objc_ns_enum09imported_C27_inject_negative_unsigned_bSo25NSNegativeUnsignedOptionsOyF() {{.*}} {
+// CHECK: define hidden swiftcc i32 @_T012objc_ns_enum09imported_C27_inject_negative_unsigned_bSC25NSNegativeUnsignedOptionsOyF() {{.*}} {
 // CHECK:   ret i32 -2147483648
 func imported_enum_inject_negative_unsigned_b() -> NSNegativeUnsignedOptions {
   return .bar
@@ -85,8 +85,8 @@
 func use_metadata<T>(_ t:T){}
 use_metadata(NSRuncingOptions.mince)
 
-// CHECK-LABEL: define linkonce_odr hidden %swift.type* @_T0So16NSRuncingOptionsOMa()
-// CHECK:         call %swift.type* @swift_getForeignTypeMetadata({{.*}} @_T0So16NSRuncingOptionsON {{.*}}) [[NOUNWIND_READNONE:#[0-9]+]]
+// CHECK-LABEL: define linkonce_odr hidden %swift.type* @_T0SC16NSRuncingOptionsOMa()
+// CHECK:         call %swift.type* @swift_getForeignTypeMetadata({{.*}} @_T0SC16NSRuncingOptionsON {{.*}}) [[NOUNWIND_READNONE:#[0-9]+]]
 
 @objc enum ExportedToObjC: Int {
   case Foo = -1, Bar, Bas
diff --git a/test/IRGen/objc_pointers.swift b/test/IRGen/objc_pointers.swift
index 9ef9050..1a5c5b1 100644
--- a/test/IRGen/objc_pointers.swift
+++ b/test/IRGen/objc_pointers.swift
@@ -14,7 +14,7 @@
                               z: UnsafePointer<Int>,
                               w: AutoreleasingUnsafeMutablePointer<Foo?>) {}
 
-  // CHECK: define internal void @_T013objc_pointers3FooC24pointerMetatypeArgumentsys33AutoreleasingUnsafeMutablePointerVys9AnyObject_pXpG1x_AFysAG_pXpSgG1ytFTo(%0*, i8*, i8**, i8**)
+  // CHECK: define internal void @_T013objc_pointers3FooC24pointerMetatypeArgumentsys33AutoreleasingUnsafeMutablePointerVyyXlXpG1x_AFyyXlXpSgG1ytFTo(%0*, i8*, i8**, i8**)
   @objc func pointerMetatypeArguments(x: AutoreleasingUnsafeMutablePointer<AnyClass>,
                                       y: AutoreleasingUnsafeMutablePointer<AnyClass?>) {}
 }
diff --git a/test/IRGen/objc_structs.swift b/test/IRGen/objc_structs.swift
index 49fc4dc..ea84b2e 100644
--- a/test/IRGen/objc_structs.swift
+++ b/test/IRGen/objc_structs.swift
@@ -9,7 +9,7 @@
 import gizmo
 
 // CHECK: [[GIZMO:%TSo5GizmoC]] = type opaque
-// CHECK: [[NSRECT:%TSo6NSRectV]] = type <{ [[NSPOINT:%TSo7NSPointV]], [[NSSIZE:%TSo6NSSizeV]] }>
+// CHECK: [[NSRECT:%TSC6NSRectV]] = type <{ [[NSPOINT:%TSC7NSPointV]], [[NSSIZE:%TSC6NSSizeV]] }>
 // CHECK: [[NSPOINT]] = type <{ [[DOUBLE:%TSd]], [[DOUBLE]] }>
 // CHECK: [[DOUBLE]] = type <{ double }>
 // CHECK: [[NSSIZE]] = type <{ [[DOUBLE]], [[DOUBLE]] }>
@@ -61,7 +61,7 @@
 }
 // CHECK: }
 
-// CHECK: define hidden swiftcc { {{.*}}*, {{.*}}*, {{.*}}*, {{.*}}* } @_T012objc_structs20useStructOfNSStringsSo0deF0VADF({{.*}}*, {{.*}}*, {{.*}}*, {{.*}}*)
+// CHECK: define hidden swiftcc { {{.*}}*, {{.*}}*, {{.*}}*, {{.*}}* } @_T012objc_structs20useStructOfNSStringsSC0deF0VADF({{.*}}*, {{.*}}*, {{.*}}*, {{.*}}*)
 // CHECK:   call void @useStructOfNSStringsInObjC(%struct.StructOfNSStrings* noalias nocapture sret {{%.*}}, %struct.StructOfNSStrings* byval align 8 {{%.*}})
 func useStructOfNSStrings(_ s: StructOfNSStrings) -> StructOfNSStrings {
   return useStructOfNSStringsInObjC(s)
diff --git a/test/IRGen/objc_super.swift b/test/IRGen/objc_super.swift
index b4ed228..3d184e9 100644
--- a/test/IRGen/objc_super.swift
+++ b/test/IRGen/objc_super.swift
@@ -14,7 +14,7 @@
 // CHECK: [[SUPER:%objc_super]] = type
 // CHECK: [[OBJC:%objc_object]] = type
 // CHECK: [[GIZMO:%TSo5GizmoC]] = type
-// CHECK: [[NSRECT:%TSo6NSRectV]] = type
+// CHECK: [[NSRECT:%TSC6NSRectV]] = type
 
 class Hoozit : Gizmo {
   // CHECK: define hidden swiftcc void @_T010objc_super6HoozitC4frobyyF([[HOOZIT]]* swiftself) {{.*}} {
@@ -37,7 +37,7 @@
   }
   // CHECK: }
 
-  // CHECK: define hidden swiftcc { double, double, double, double } @_T010objc_super6HoozitC5frameSo6NSRectVyF(%T10objc_super6HoozitC* swiftself) {{.*}} {
+  // CHECK: define hidden swiftcc { double, double, double, double } @_T010objc_super6HoozitC5frameSC6NSRectVyF(%T10objc_super6HoozitC* swiftself) {{.*}} {
   override func frame() -> NSRect {
     // CHECK: [[T0:%.*]] = call [[TYPE]]* @_T010objc_super6HoozitCMa()
     // CHECK: [[T1:%.*]] = bitcast [[TYPE]]* [[T0]] to [[CLASS]]*
diff --git a/test/IRGen/partial_apply_objc.sil b/test/IRGen/partial_apply_objc.sil
index ce2864b..6f1aa22 100644
--- a/test/IRGen/partial_apply_objc.sil
+++ b/test/IRGen/partial_apply_objc.sil
@@ -37,7 +37,7 @@
   %v = tuple()
   return %v : $()
 }
-sil @_T018partial_apply_objc9ObjCClassC7method2ySo6NSRectV1r_tFTo : $@convention(objc_method) (NSRect, ObjCClass) -> () {
+sil @_T018partial_apply_objc9ObjCClassC7method2ySC6NSRectV1r_tFTo : $@convention(objc_method) (NSRect, ObjCClass) -> () {
 bb0(%0 : $NSRect, %1 : $ObjCClass):
   %v = tuple()
   return %v : $()
@@ -122,9 +122,9 @@
 // CHECK:  ret { i8*, %swift.refcounted* } [[CLOSURE]]
 // CHECK:}
 // CHECK: define internal swiftcc void [[OBJC_PARTIAL_APPLY_STUB2]](double, double, double, double, %swift.refcounted*
-// CHECK:  [[TMP:%.*]] = alloca %TSo6NSRectV
-// CHECK:  [[ORIGIN:%.*]] = getelementptr inbounds %TSo6NSRectV, %TSo6NSRectV* [[TMP]]
-// CHECK:  [[ORIGINX:%.*]] = getelementptr inbounds %TSo7NSPointV, %TSo7NSPointV* [[ORIGIN]]
+// CHECK:  [[TMP:%.*]] = alloca %TSC6NSRectV
+// CHECK:  [[ORIGIN:%.*]] = getelementptr inbounds %TSC6NSRectV, %TSC6NSRectV* [[TMP]]
+// CHECK:  [[ORIGINX:%.*]] = getelementptr inbounds %TSC7NSPointV, %TSC7NSPointV* [[ORIGIN]]
 // CHECK:  [[ORIGINXVAL:%*]] = getelementptr inbounds %TSd, %TSd* [[ORIGINX]]
 // CHECK:  store double %0, double* [[ORIGINXVAL]]
 sil @objc_partial_apply_indirect_sil_argument : $@convention(thin) ObjCClass -> @callee_owned NSRect -> () {
diff --git a/test/IRGen/protocol_conformance_records_objc.swift b/test/IRGen/protocol_conformance_records_objc.swift
index 1f20249..368064d 100644
--- a/test/IRGen/protocol_conformance_records_objc.swift
+++ b/test/IRGen/protocol_conformance_records_objc.swift
@@ -18,9 +18,9 @@
 // -- protocol descriptor
 // CHECK:           [[RUNCIBLE:%swift.protocol\* @_T033protocol_conformance_records_objc8RuncibleMp]]
 // -- type metadata
-// CHECK:           @_T0So6NSRectVN
+// CHECK:           @_T0SC6NSRectVN
 // -- witness table
-// CHECK:           @_T0So6NSRectV33protocol_conformance_records_objc8RuncibleACWP
+// CHECK:           @_T0SC6NSRectV33protocol_conformance_records_objc8RuncibleACWP
 // -- flags 0x02: nonunique direct metadata
 // CHECK:           i32 2 },
 extension NSRect: Runcible {
diff --git a/test/IRGen/reflection_metadata_imported.swift b/test/IRGen/reflection_metadata_imported.swift
index 673005f..cfcba86 100644
--- a/test/IRGen/reflection_metadata_imported.swift
+++ b/test/IRGen/reflection_metadata_imported.swift
@@ -5,9 +5,9 @@
 // CHECK-DAG: @__swift_reflection_version = linkonce_odr hidden constant i16 {{[0-9]+}}
 
 // CHECK-DAG: @_T028reflection_metadata_imported15HasImportedTypeVMF = internal constant {{.*}}swift3_fieldmd
-// CHECK-DAG: @_T0So1AVMB = linkonce_odr hidden constant {{.*}}swift3_builtin
-// CHECK-DAG: @_T0So11CrappyColorVMB = linkonce_odr hidden constant {{.*}}swift3_builtin
-// CHECK-DAG: @_T0So11CrappyColorVs16RawRepresentable8c_layoutMA = linkonce_odr hidden constant {{.*}}swift3_assocty
+// CHECK-DAG: @_T0SC1AVMB = linkonce_odr hidden constant {{.*}}swift3_builtin
+// CHECK-DAG: @_T0SC11CrappyColorVMB = linkonce_odr hidden constant {{.*}}swift3_builtin
+// CHECK-DAG: @_T0SC11CrappyColorVs16RawRepresentable8c_layoutMA = linkonce_odr hidden constant {{.*}}swift3_assocty
 
 struct HasImportedType {
   let a: A
diff --git a/test/IRGen/special_protocols.sil b/test/IRGen/special_protocols.sil
index 39a2424..4e57ffc 100644
--- a/test/IRGen/special_protocols.sil
+++ b/test/IRGen/special_protocols.sil
@@ -1,17 +1,9 @@
 // RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -parse-stdlib -module-name Swift | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
 
-public protocol AnyObject: class {}
-// CHECK-LABEL: @_T0s9AnyObjectMp = {{(protected )?}}constant %swift.protocol {
-// --                 0x0000_0049: special protocol 01, class, empty, swift
-// CHECK:         i32 73,
-// CHECK:         i16 0,
-// CHECK:         i16 0,
-// CHECK:         i32 0 }
-
 public protocol Error {}
 // CHECK-LABEL: @_T0s5ErrorMp = {{(protected )?}}constant %swift.protocol {
-// --                 0x0000_0087: special protocol 02, non-class, witness, swift
-// CHECK:         i32 135,
+// --                 0x0000_0047: special protocol 01, non-class, witness, swift
+// CHECK:         i32 71,
 // CHECK:         i16 0,
 // CHECK:         i16 0,
 // CHECK:         i32 0 }
diff --git a/test/IRGen/value_buffers.sil b/test/IRGen/value_buffers.sil
index fc651dc..d3c7fbd 100644
--- a/test/IRGen/value_buffers.sil
+++ b/test/IRGen/value_buffers.sil
@@ -58,11 +58,34 @@
 }
 // CHECK-LABEL: define{{( protected)?}} swiftcc void @alloc_big([24 x i8]* nocapture dereferenceable({{.*}}), %T13value_buffers9BigStructV* noalias nocapture dereferenceable({{.*}}))
 // CHECK-NEXT: entry:
+// CHECK: [[SLOT0:%.*]] = load i64
+// CHECK: [[SLOT1:%.*]] = load i64
+// CHECK: [[SLOT2:%.*]] = load i64
+// CHECK: [[SLOT3:%.*]] = load i64
+// CHECK: [[SLOT4:%.*]] = load i64
+// CHECK: [[SLOT5:%.*]] = load i64
 // CHECK-NEXT: [[T0:%.*]] = call noalias i8* @swift_rt_swift_slowAlloc(i64 48, i64 7)
 // CHECK-NEXT: [[T1:%.*]] = bitcast [24 x i8]* %0 to i8**
 // CHECK-NEXT: store i8* [[T0]], i8** [[T1]], align 8
 // CHECK-NEXT: [[ADDR:%.*]] = bitcast i8* [[T0]] to %T13value_buffers9BigStructV*
-// CHECK: call void @llvm.memcpy
+// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds %T13value_buffers9BigStructV, %T13value_buffers9BigStructV* [[ADDR]], i32 0, i32 0
+// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds %TSi, %TSi* [[T0]], i32 0, i32 0
+// CHECK-NEXT: store i64 [[SLOT0]], i64* [[T1]], align 8
+// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds %T13value_buffers9BigStructV, %T13value_buffers9BigStructV* [[ADDR]], i32 0, i32 1
+// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds %TSi, %TSi* [[T0]], i32 0, i32 0
+// CHECK-NEXT: store i64 [[SLOT1]], i64* [[T1]], align 8
+// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds %T13value_buffers9BigStructV, %T13value_buffers9BigStructV* [[ADDR]], i32 0, i32 2
+// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds %TSi, %TSi* [[T0]], i32 0, i32 0
+// CHECK-NEXT: store i64 [[SLOT2]], i64* [[T1]], align 8
+// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds %T13value_buffers9BigStructV, %T13value_buffers9BigStructV* [[ADDR]], i32 0, i32 3
+// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds %TSi, %TSi* [[T0]], i32 0, i32 0
+// CHECK-NEXT: store i64 [[SLOT3]], i64* [[T1]], align 8
+// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds %T13value_buffers9BigStructV, %T13value_buffers9BigStructV* [[ADDR]], i32 0, i32 4
+// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds %TSi, %TSi* [[T0]], i32 0, i32 0
+// CHECK-NEXT: store i64 [[SLOT4]], i64* [[T1]], align 8
+// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds %T13value_buffers9BigStructV, %T13value_buffers9BigStructV* [[ADDR]], i32 0, i32 5
+// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds %TSi, %TSi* [[T0]], i32 0, i32 0
+// CHECK-NEXT: store i64 [[SLOT5]], i64* [[T1]], align 8
 // CHECK-NEXT: ret void
 
 sil @project_big : $(@inout Builtin.UnsafeValueBuffer, BigStruct) -> () {
@@ -74,9 +97,32 @@
 }
 // CHECK-LABEL: define{{( protected)?}} swiftcc void @project_big([24 x i8]* nocapture dereferenceable({{.*}}), %T13value_buffers9BigStructV* noalias nocapture dereferenceable({{.*}}))
 // CHECK-NEXT: entry:
+// CHECK: [[SLOT0:%.*]] = load i64
+// CHECK: [[SLOT1:%.*]] = load i64
+// CHECK: [[SLOT2:%.*]] = load i64
+// CHECK: [[SLOT3:%.*]] = load i64
+// CHECK: [[SLOT4:%.*]] = load i64
+// CHECK: [[SLOT5:%.*]] = load i64
 // CHECK-NEXT: [[T0:%.*]] = bitcast [24 x i8]* %0 to %T13value_buffers9BigStructV**
 // CHECK-NEXT: [[ADDR:%.*]] = load %T13value_buffers9BigStructV*, %T13value_buffers9BigStructV** [[T0]], align 8
-// CHECK: call void @llvm.memcpy
+// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds %T13value_buffers9BigStructV, %T13value_buffers9BigStructV* [[ADDR]], i32 0, i32 0
+// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds %TSi, %TSi* [[T0]], i32 0, i32 0
+// CHECK-NEXT: store i64 [[SLOT0]], i64* [[T1]], align 8
+// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds %T13value_buffers9BigStructV, %T13value_buffers9BigStructV* [[ADDR]], i32 0, i32 1
+// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds %TSi, %TSi* [[T0]], i32 0, i32 0
+// CHECK-NEXT: store i64 [[SLOT1]], i64* [[T1]], align 8
+// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds %T13value_buffers9BigStructV, %T13value_buffers9BigStructV* [[ADDR]], i32 0, i32 2
+// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds %TSi, %TSi* [[T0]], i32 0, i32 0
+// CHECK-NEXT: store i64 [[SLOT2]], i64* [[T1]], align 8
+// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds %T13value_buffers9BigStructV, %T13value_buffers9BigStructV* [[ADDR]], i32 0, i32 3
+// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds %TSi, %TSi* [[T0]], i32 0, i32 0
+// CHECK-NEXT: store i64 [[SLOT3]], i64* [[T1]], align 8
+// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds %T13value_buffers9BigStructV, %T13value_buffers9BigStructV* [[ADDR]], i32 0, i32 4
+// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds %TSi, %TSi* [[T0]], i32 0, i32 0
+// CHECK-NEXT: store i64 [[SLOT4]], i64* [[T1]], align 8
+// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds %T13value_buffers9BigStructV, %T13value_buffers9BigStructV* [[ADDR]], i32 0, i32 5
+// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds %TSi, %TSi* [[T0]], i32 0, i32 0
+// CHECK-NEXT: store i64 [[SLOT5]], i64* [[T1]], align 8
 // CHECK-NEXT: ret void
 
 sil @dealloc_big : $(@inout Builtin.UnsafeValueBuffer) -> () {
diff --git a/test/IRGen/weak.sil b/test/IRGen/weak.sil
index 7504afa..69c79fe 100644
--- a/test/IRGen/weak.sil
+++ b/test/IRGen/weak.sil
@@ -6,9 +6,9 @@
 // CHECK: [[TYPE:%swift.type]] = type
 // CHECK: [[OPAQUE:%swift.opaque]] = type opaque
 // CHECK: [[C:%T4weak1CC]] = type <{ [[REF:%swift.refcounted]] }>
-// CHECK: [[UNKNOWN:%objc_object]] = type opaque
 // CHECK: [[A:%T4weak1AV]] = type <{ [[WEAK:%swift.weak]] }>
 // CHECK: [[WEAK]] = type
+// CHECK: [[UNKNOWN:%objc_object]] = type opaque
 // CHECK: [[B:%T4weak1BV]] = type <{ { [[WEAK]], i8** } }>
 
 sil_stage canonical
diff --git a/test/Index/roles.swift b/test/Index/roles.swift
index 52ec21a..dcf165f 100644
--- a/test/Index/roles.swift
+++ b/test/Index/roles.swift
@@ -74,6 +74,10 @@
   // CHECK-NEXT: RelCont | function/Swift | aCalledFunction(a:b:) | s:14swift_ide_test15aCalledFunctionySi1a_Siz1btF
   // CHECK: [[@LINE-3]]:7 | param/Swift | a | s:{{.*}} | Ref,Read,RelCont | rel: 1
   // CHECK-NEXT: RelCont | function/Swift | aCalledFunction(a:b:) | s:14swift_ide_test15aCalledFunctionySi1a_Siz1btF
+
+  _ = { ignored in ignored + 1}
+  // CHECK-NOT: [[@LINE-1]]:9 {{.*}} | ignored | {{.*}}
+
 }
 
 aCalledFunction(a: 1, b: &z)
@@ -225,7 +229,10 @@
   // CHECK-NEXT  RelChild,RelAcc | instance-property/Swift | reqProp_USR | [[reqProp_USR]]
 }
 
-class ImplementsX : X {
+protocol Y {}
+// CHECK: [[@LINE-1]]:10 | protocol/Swift | Y | [[Y_USR:.*]] | Def | rel: 0
+
+class ImplementsX : X, Y {
 // CHECK: [[@LINE-1]]:7 | class/Swift | ImplementsX | [[ImplementsX_USR:.*]] | Def | rel: 0
 // CHECK: [[@LINE-2]]:21 | protocol/Swift | X | [[X_USR]] | Ref,RelBase | rel: 1
 // CHECK-NEXT: RelBase | class/Swift | ImplementsX | [[ImplementsX_USR]]
@@ -244,16 +251,21 @@
 protocol AProtocol {
   // CHECK: [[@LINE-1]]:10 | protocol/Swift | AProtocol | [[AProtocol_USR:.*]] | Def | rel: 0
 
-  associatedtype T : X
-  // CHECK: [[@LINE-1]]:18 | type-alias/associated-type/Swift | T | s:14swift_ide_test9AProtocolP1T | Def,RelChild | rel: 1
+  associatedtype T : X where T:Y
+  // CHECK: [[@LINE-1]]:18 | type-alias/associated-type/Swift | T | [[AProtocol_T_USR:.*]] | Def,RelChild | rel: 1
   // CHECK-NEXT: RelChild | protocol/Swift | AProtocol | [[AProtocol_USR]]
   // CHECK: [[@LINE-3]]:22 | protocol/Swift | X | [[X_USR]] | Ref | rel: 0
+  // CHECK: [[@LINE-4]]:30 | type-alias/associated-type/Swift | T | [[AProtocol_T_USR]] | Ref | rel: 0
+  // CHECK: [[@LINE-5]]:32 | protocol/Swift | Y | [[Y_USR]] | Ref | rel: 0
 
   func foo() -> Int
   // CHECK: [[@LINE-1]]:8 | instance-method/Swift | foo() | s:14swift_ide_test9AProtocolP3fooSiyF | Def,Dyn,RelChild | rel: 1
   // CHECK-NEXT: RelChild | protocol/Swift | AProtocol | s:14swift_ide_test9AProtocolP
 }
 
+protocol Q where Self: AProtocol {}
+// CHECK: [[@LINE-1]]:24 | protocol/Swift | AProtocol | [[AProtocol_USR]] | Ref | rel: 0
+
 class ASubClass : AClass, AProtocol {
 // CHECK: [[@LINE-1]]:7 | class/Swift | ASubClass | s:14swift_ide_test9ASubClassC | Def | rel: 0
 // CHECK: [[@LINE-2]]:19 | class/Swift | AClass | s:14swift_ide_test6AClassC | Ref,RelBase | rel: 1
diff --git a/test/Inputs/clang-importer-sdk/swift-modules/CoreFoundation.swift b/test/Inputs/clang-importer-sdk/swift-modules/CoreFoundation.swift
new file mode 100644
index 0000000..9602507
--- /dev/null
+++ b/test/Inputs/clang-importer-sdk/swift-modules/CoreFoundation.swift
@@ -0,0 +1,3 @@
+@_exported import CoreFoundation
+
+protocol _CFObject {}
diff --git a/test/Inputs/clang-importer-sdk/usr/include/objc_generics.h b/test/Inputs/clang-importer-sdk/usr/include/objc_generics.h
index 59748f6..c67abe6 100644
--- a/test/Inputs/clang-importer-sdk/usr/include/objc_generics.h
+++ b/test/Inputs/clang-importer-sdk/usr/include/objc_generics.h
@@ -101,3 +101,14 @@
 + (FungibleAnimalContainer *)getFungibleContainer;
 
 @end
+
+@interface First<__covariant T> : NSObject
+@end
+
+@interface Second<__covariant T> : First<T>
+@end
+
+@class Third;
+
+@interface Third : Second<Third *>
+@end
diff --git a/test/Interpreter/SDK/Inputs/test.arc b/test/Interpreter/SDK/Inputs/test.arc
new file mode 100644
index 0000000..780fd62
--- /dev/null
+++ b/test/Interpreter/SDK/Inputs/test.arc
Binary files differ
diff --git a/test/Interpreter/SDK/archive_attributes.swift b/test/Interpreter/SDK/archive_attributes.swift
new file mode 100644
index 0000000..5f29891
--- /dev/null
+++ b/test/Interpreter/SDK/archive_attributes.swift
@@ -0,0 +1,178 @@
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: %target-build-swift %s -module-name=test -DENCODE -o %t/encode
+// RUN: %target-build-swift %s -module-name=test -o %t/decode
+// RUN: %target-run %t/encode %t/test.arc
+// RUN: %FileCheck -check-prefix=CHECK-ARCHIVE %s < %t/test.arc
+// RUN: %target-run %t/decode %t/test.arc | %FileCheck %s
+
+// REQUIRES: executable_test
+// REQUIRES: objc_interop
+// UNSUPPORTED: OS=tvos
+// UNSUPPORTED: OS=watchos
+
+import Foundation
+
+struct ABC {
+  // CHECK-ARCHIVE-DAG: nested_class_coding
+  @NSKeyedArchiveLegacy("nested_class_coding")
+  class NestedClass : NSObject, NSCoding {
+    var i : Int
+
+    init(_ ii: Int) {
+      i = ii
+    }
+
+    required init(coder aDecoder: NSCoder) {
+      i = aDecoder.decodeInteger(forKey: "i")
+    }
+
+    func encode(with aCoder: NSCoder) {
+      aCoder.encode(i, forKey: "i")
+    }
+  }
+}
+
+// CHECK-ARCHIVE-DAG: private_class_coding
+@NSKeyedArchiveLegacy("private_class_coding")
+private class PrivateClass : NSObject, NSCoding {
+  var pi : Int
+
+  init(_ ii: Int) {
+    pi = ii
+  }
+
+  required init(coder aDecoder: NSCoder) {
+    pi = aDecoder.decodeInteger(forKey: "pi")
+  }
+
+  func encode(with aCoder: NSCoder) {
+    aCoder.encode(pi, forKey: "pi")
+  }
+}
+
+@NSKeyedArchiveSubclassesOnly
+class GenericClass<T> : NSObject, NSCoding {
+  var gi : T? = nil
+
+  override init() {
+  }
+
+  required init(coder aDecoder: NSCoder) {
+  }
+
+  func encode(with aCoder: NSCoder) {
+  }
+}
+
+// CHECK-ARCHIVE-DAG: test.IntClass
+class IntClass : GenericClass<Int> {
+
+  init(ii: Int) {
+    super.init()
+    gi = ii
+  }
+
+  required init(coder aDecoder: NSCoder) {
+    super.init(coder: aDecoder)
+    gi = aDecoder.decodeInteger(forKey: "gi")
+  }
+
+  override func encode(with aCoder: NSCoder) {
+    aCoder.encode(gi!, forKey: "gi")
+  }
+}
+
+// CHECK-ARCHIVE-DAG: double_class_coding
+@NSKeyedArchiveLegacy("double_class_coding")
+class DoubleClass : GenericClass<Double> {
+
+  init(dd: Double) {
+    super.init()
+    gi = dd
+  }
+
+  required init(coder aDecoder: NSCoder) {
+    super.init(coder: aDecoder)
+    gi = aDecoder.decodeDouble(forKey: "gi")
+  }
+
+  override func encode(with aCoder: NSCoder) {
+    aCoder.encode(gi!, forKey: "gi")
+  }
+}
+
+// CHECK-ARCHIVE-DAG: top_level_coding
+@NSKeyedArchiveLegacy("top_level_coding")
+class TopLevel : NSObject, NSCoding {
+  var tli : Int
+
+  var nested: ABC.NestedClass?
+  fileprivate var priv: PrivateClass?
+  var intc : IntClass?
+  var doublec : DoubleClass?
+
+  init(_ ii: Int) {
+    tli = ii
+  }
+
+  required init(coder aDecoder: NSCoder) {
+    tli = aDecoder.decodeInteger(forKey: "tli")
+    nested = aDecoder.decodeObject(forKey: "nested") as? ABC.NestedClass
+    priv = aDecoder.decodeObject(forKey: "priv") as? PrivateClass
+    intc = aDecoder.decodeObject(forKey: "int") as? IntClass
+    doublec = aDecoder.decodeObject(forKey: "double") as? DoubleClass
+  }
+
+  func encode(with aCoder: NSCoder) {
+    aCoder.encode(tli, forKey: "tli")
+    aCoder.encode(nested, forKey: "nested")
+    aCoder.encode(priv, forKey: "priv")
+    aCoder.encode(intc, forKey: "int")
+    aCoder.encode(doublec, forKey: "double")
+  }
+}
+
+func main() {
+
+  let args = CommandLine.arguments
+
+#if ENCODE
+  let c = TopLevel(27)
+  c.nested = ABC.NestedClass(28)
+  c.priv = PrivateClass(29)
+  c.intc = IntClass(ii: 42)
+  c.doublec = DoubleClass(dd: 3.14)
+
+  NSKeyedArchiver.archiveRootObject(c, toFile: args[1])
+#else
+  if let u = NSKeyedUnarchiver.unarchiveObject(withFile: args[1]) {
+    if let x = u as? TopLevel {
+      // CHECK: top-level: 27
+      print("top-level: \(x.tli)")
+      if let n = x.nested {
+        // CHECK: nested: 28
+        print("nested: \(n.i)")
+      }
+      if let p = x.priv {
+        // CHECK: private: 29
+        print("private: \(p.pi)")
+      }
+      if let g = x.intc {
+        // CHECK: int: 42
+        print("int: \(g.gi!)")
+      }
+      if let d = x.doublec {
+        // CHECK: double: 3.14
+        print("double: \(d.gi!)")
+      }
+    } else {
+      print(u)
+    }
+  } else {
+    print("nil")
+  }
+#endif
+}
+
+main()
+
diff --git a/test/Interpreter/SDK/archive_compatibility.swift b/test/Interpreter/SDK/archive_compatibility.swift
new file mode 100644
index 0000000..19875d2
--- /dev/null
+++ b/test/Interpreter/SDK/archive_compatibility.swift
@@ -0,0 +1,131 @@
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: %target-build-swift %s -module-name=test -o %t/a.out
+// RUN: %target-run %t/a.out %S/Inputs/test.arc | %FileCheck %s
+
+// REQUIRES: executable_test
+// REQUIRES: objc_interop
+// UNSUPPORTED: OS=tvos
+// UNSUPPORTED: OS=watchos
+
+// This test checks if an archive, produced with the swift 3.1 compiler, can
+// still be read with the current compiler.
+
+import Foundation
+
+struct ABC {
+  class NestedClass : NSObject, NSCoding {
+    var i : Int
+
+    init(_ ii: Int) {
+      i = ii
+    }
+
+    required init(coder aDecoder: NSCoder) {
+      i = aDecoder.decodeInteger(forKey: "i")
+    }
+
+    func encode(with aCoder: NSCoder) {
+      aCoder.encode(i, forKey: "i")
+    }
+  }
+}
+
+private class PrivateClass : NSObject, NSCoding {
+  var pi : Int
+
+  init(_ ii: Int) {
+    pi = ii
+  }
+
+  required init(coder aDecoder: NSCoder) {
+    pi = aDecoder.decodeInteger(forKey: "pi")
+  }
+
+  func encode(with aCoder: NSCoder) {
+    aCoder.encode(pi, forKey: "pi")
+  }
+}
+
+class GenericClass<T> : NSObject, NSCoding {
+  var gi : Int
+
+  init(_ ii: Int) {
+    gi = ii
+  }
+
+  required init(coder aDecoder: NSCoder) {
+    gi = aDecoder.decodeInteger(forKey: "gi")
+  }
+
+  func encode(with aCoder: NSCoder) {
+    aCoder.encode(gi, forKey: "gi")
+  }
+}
+
+class TopLevel : NSObject, NSCoding {
+  var tli : Int
+
+  var nested: ABC.NestedClass?
+  fileprivate var priv: PrivateClass?
+  var generic : GenericClass<Int>?
+
+  init(_ ii: Int) {
+    tli = ii
+  }
+
+  required init(coder aDecoder: NSCoder) {
+    tli = aDecoder.decodeInteger(forKey: "tli")
+    nested = aDecoder.decodeObject(forKey: "nested") as? ABC.NestedClass
+    priv = aDecoder.decodeObject(forKey: "priv") as? PrivateClass
+    generic = aDecoder.decodeObject(forKey: "generic") as? GenericClass<Int>
+  }
+
+  func encode(with aCoder: NSCoder) {
+    aCoder.encode(tli, forKey: "tli")
+    aCoder.encode(nested, forKey: "nested")
+    aCoder.encode(priv, forKey: "priv")
+    aCoder.encode(generic, forKey: "generic")
+  }
+}
+
+func main() {
+
+  let args = CommandLine.arguments
+
+  let g = GenericClass<Int>(42)
+#if ENCODE
+  // This is how the archive was created with the swift 3.1 compiler.
+  let c = TopLevel(27)
+  c.nested = ABC.NestedClass(28)
+  c.priv = PrivateClass(29)
+  c.generic = g
+
+  NSKeyedArchiver.archiveRootObject(c, toFile: args[1])
+#else
+  if let u = NSKeyedUnarchiver.unarchiveObject(withFile: args[1]) {
+    if let x = u as? TopLevel {
+      // CHECK: top-level: 27
+      print("top-level: \(x.tli)")
+      if let n = x.nested {
+        // CHECK: nested: 28
+        print("nested: \(n.i)")
+      }
+      if let p = x.priv {
+        // CHECK: private: 29
+        print("private: \(p.pi)")
+      }
+      if let g = x.generic {
+        // CHECK: generic: 42
+        print("generic: \(g.gi)")
+      }
+    } else {
+      print(u)
+    }
+  } else {
+    print("nil")
+  }
+#endif
+}
+
+main()
+
diff --git a/test/Interpreter/SDK/archiving_generic_swift_class.swift b/test/Interpreter/SDK/archiving_generic_swift_class.swift
index 52c3bd6..38402e1 100644
--- a/test/Interpreter/SDK/archiving_generic_swift_class.swift
+++ b/test/Interpreter/SDK/archiving_generic_swift_class.swift
@@ -6,6 +6,7 @@
 
 import Foundation
 
+@NSKeyedArchiveSubclassesOnly
 final class Foo<T: NSCoding>: NSObject, NSCoding {
   var one, two: T
 
@@ -190,10 +191,10 @@
     fatalError("unable to unarchive Foo<NSNumber>")
   }
 
-  // CHECK-LABEL: <_T04main3FooCySo8NSStringCGD: {{0x[0-9a-f]+}}> #0
+  // CHECK-LABEL: <_TtGC4main3FooCSo8NSString_: {{0x[0-9a-f]+}}> #0
   // CHECK:         one: one
   // CHECK:         two: two
-  // CHECK-LABEL: <_T04main3FooCySo8NSNumberCGD: {{0x[0-9a-f]+}}> #0
+  // CHECK-LABEL: <_TtGC4main3FooCSo8NSNumber_: {{0x[0-9a-f]+}}> #0
   // CHECK:         one: 1
   // CHECK:         two: 2
   dump(strings)
diff --git a/test/Interpreter/SDK/cf.swift b/test/Interpreter/SDK/cf.swift
new file mode 100644
index 0000000..c582757
--- /dev/null
+++ b/test/Interpreter/SDK/cf.swift
@@ -0,0 +1,95 @@
+// RUN: %target-run-simple-swift
+
+// REQUIRES: executable_test
+
+// REQUIRES: objc_interop
+
+import Foundation
+import StdlibUnittest
+
+var CFTestSuite = TestSuite("CoreFoundation")
+
+extension CFString {
+  static func from(_ contents: String) -> CFString {
+    return CFStringCreateWithCString(nil, contents, /*ascii*/0)
+  }
+}
+
+CFTestSuite.test("Set<CFString>") {
+  var s = Set<CFString>()
+  // Use long strings to avoid the tagged pointer optimization.
+  s.insert(.from("abcxxxxxxxxxxx"))
+  s.insert(.from("defxxxxxxxxxxx"))
+  expectTrue(s.contains(.from("abcxxxxxxxxxxx")))
+  expectFalse(s.contains(.from("efxxxxxxxxxxx")))
+  expectTrue(s.contains("abcxxxxxxxxxxx" as NSString))
+  expectFalse(s.contains("efxxxxxxxxxxx" as NSString))
+  // Attempt to make this really a Swift string that's then bridged.
+  let good = "abcxxxxxxxxxxx"
+  expectTrue(s.contains(good as NSString))
+  let bad = "efxxxxxxxxxxx"
+  expectFalse(s.contains(bad as NSString))
+}
+
+CFTestSuite.test("AnyHashable") {
+  let strings = ["abc" as NSString as AnyHashable, "def" as CFString as AnyHashable]
+  expectTrue(strings.contains("abc"))
+  expectTrue(strings.contains("def"))
+
+  let stringSet = Set(strings)
+  expectTrue(stringSet.contains("abc"))
+  expectTrue(stringSet.contains("def"))
+}
+
+CFTestSuite.test("Dictionary/casting") {
+  let orig: [CFString: Any] = [
+    .from("abcxxxxxxxxxxx"): "abc",
+    .from("defxxxxxxxxxxx"): "def"
+  ]
+  expectEqual(orig[.from("abcxxxxxxxxxxx")] as! String?, "abc")
+
+  let bridged = orig as [String: Any]
+  expectEqual(bridged["abcxxxxxxxxxxx"] as! String?, "abc")
+
+  let upcast = orig as [AnyHashable: Any]
+  expectEqual(upcast["abcxxxxxxxxxxx"] as! String?, "abc")
+}
+
+CFTestSuite.test("Dictionary/as CFDictionary") {
+  let orig: [CFString: Any] = [
+    .from("abcxxxxxxxxxxx"): "abc",
+    .from("defxxxxxxxxxxx"): "def"
+  ]
+  expectEqual(orig[.from("abcxxxxxxxxxxx")] as! String?, "abc")
+
+  let cf = orig as CFDictionary
+  withExtendedLifetime(CFString.from("abcxxxxxxxxxxx")) {
+    expectTrue(CFDictionaryContainsKey(cf, Unmanaged.passUnretained($0).toOpaque()))
+  }
+}
+
+CFTestSuite.test("Dictionary/round-trip") {
+  let orig: [CFString: Any] = [
+    .from("abcxxxxxxxxxxx"): "abc",
+    .from("defxxxxxxxxxxx"): "def"
+  ]
+  expectEqual(orig[.from("abcxxxxxxxxxxx")] as! String?, "abc")
+
+  let cf = orig as CFDictionary
+
+  // This is an unchecked cast because we can't check the types of CF objects.
+  let swiftTyped = cf as! [CFString: Any]
+  expectEqual(swiftTyped[.from("abcxxxxxxxxxxx")] as! String?, "abc")
+
+  let swiftBridged = cf as? [String: Any]
+  expectNotNil(swiftBridged)
+  expectEqual(swiftBridged!["abcxxxxxxxxxxx"] as! String?, "abc")
+
+  // FIXME: CF-to-AnyHashable isn't permitted yet, so we need 'as?'.
+  let swiftAny = cf as? [AnyHashable: Any]
+  expectNotNil(swiftAny)
+  expectEqual(swiftAny!["abcxxxxxxxxxxx"] as! String?, "abc")
+}
+
+
+runAllTests()
diff --git a/test/Interpreter/SDK/cf_without_foundation.swift b/test/Interpreter/SDK/cf_without_foundation.swift
new file mode 100644
index 0000000..8211912
--- /dev/null
+++ b/test/Interpreter/SDK/cf_without_foundation.swift
@@ -0,0 +1,61 @@
+// RUN: %target-run-simple-swift | %FileCheck %s
+
+// REQUIRES: executable_test
+// REQUIRES: objc_interop
+
+import CoreFoundation
+// Can't import StdlibUnittest; that brings in Foundation.
+
+extension CFString {
+  static func from(_ contents: String) -> CFString {
+    return CFStringCreateWithCString(nil, contents, /*ascii*/0)
+  }
+
+  static func mutablyFrom(_ contents: String) -> CFMutableString {
+    return CFStringCreateMutableCopy(nil, /*maxLength*/0, CFString.from(contents))
+  }
+}
+
+do {
+  print("Testing Array<CFString>") // CHECK-LABEL: Testing Array<CFString>
+  var s = [CFString]()
+  // Use long strings to avoid the tagged pointer optimization.
+  s.append(.from("abcxxxxxxxxxxx"))
+  s.append(.from("defxxxxxxxxxxx"))
+  print(s.contains(.from("abcxxxxxxxxxxx"))) // CHECK-NEXT: true
+  print(s.contains(.from("efxxxxxxxxxxx"))) // CHECK-NEXT: false
+}
+
+do {
+  print("Testing Array<CFMutableString>") // CHECK-LABEL: Testing Array<CFMutableString>
+  var s = [CFMutableString]()
+  // Use long strings to avoid the tagged pointer optimization.
+  s.append(.mutablyFrom("abcxxxxxxxxxxx"))
+  s.append(.mutablyFrom("defxxxxxxxxxxx"))
+  print(s.contains(.mutablyFrom("abcxxxxxxxxxxx"))) // CHECK-NEXT: true
+  print(s.contains(.mutablyFrom("efxxxxxxxxxxx"))) // CHECK-NEXT: false
+
+  let upcast = s as [CFString]
+  print(upcast.contains(CFString.mutablyFrom("abcxxxxxxxxxxx"))) // CHECK-NEXT: true
+  print(upcast.contains(CFString.from("abcxxxxxxxxxxx"))) // CHECK-NEXT: true
+}
+
+do {
+  print("Testing Set<CFString>") // CHECK-LABEL: Testing Set<CFString>
+  var s = Set<CFString>()
+  // Use long strings to avoid the tagged pointer optimization.
+  s.insert(.from("abcxxxxxxxxxxx"))
+  s.insert(.from("defxxxxxxxxxxx"))
+  print(s.contains(.from("abcxxxxxxxxxxx"))) // CHECK-NEXT: true
+  print(s.contains(.from("efxxxxxxxxxxx"))) // CHECK-NEXT: false
+}
+
+do {
+  print("Testing Set<CFMutableString>") // CHECK-LABEL: Testing Set<CFMutableString>
+  // This is a horrible thing to do but we're just checking that the conformance works.
+  var s = Set<CFMutableString>()
+  s.insert(.mutablyFrom("abcxxxxxxxxxxx"))
+  s.insert(.mutablyFrom("defxxxxxxxxxxx"))
+  print(s.contains(.mutablyFrom("abcxxxxxxxxxxx"))) // CHECK-NEXT: true
+  print(s.contains(.mutablyFrom("efxxxxxxxxxxx"))) // CHECK-NEXT: false
+}
diff --git a/test/Interpreter/SDK/objc_swift3_deprecated_objc_inference.swift b/test/Interpreter/SDK/objc_swift3_deprecated_objc_inference.swift
index b59571e..4e50ae6 100644
--- a/test/Interpreter/SDK/objc_swift3_deprecated_objc_inference.swift
+++ b/test/Interpreter/SDK/objc_swift3_deprecated_objc_inference.swift
@@ -1,5 +1,5 @@
 // RUN: rm -rf %t  &&  mkdir -p %t
-// RUN: %target-build-swift %s -o %t/a.out
+// RUN: %target-build-swift -swift-version 4 -Xfrontend -enable-swift3-objc-inference %s -o %t/a.out
 // RUN: %target-run %t/a.out 2>&1 | %FileCheck %s -check-prefix=CHECK_NOTHING
 // RUN: env SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=0 SIMCTL_CHILD_SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=0 %target-run %t/a.out 2>&1 | %FileCheck %s -check-prefix=CHECK_NOTHING
 
diff --git a/test/Interpreter/dictOfAny.swift b/test/Interpreter/dictOfAny.swift
new file mode 100644
index 0000000..8d7c8c9
--- /dev/null
+++ b/test/Interpreter/dictOfAny.swift
@@ -0,0 +1,12 @@
+// RUN: %target-run-simple-swift | %FileCheck %s
+// REQUIRES: executable_test
+// REQUIRES: objc_interop
+
+import Foundation
+
+var dict: [String: Any] = ["foo": 0x11111111 as NSNumber]
+print(dict)  // succeeds
+// CHECK: ["foo": 286331153]
+dict["foo"] = 0x22222222
+print(dict)  // used to crash
+// CHECK: ["foo": 572662306]
diff --git a/test/Interpreter/enforce_exclusive_access.swift b/test/Interpreter/enforce_exclusive_access.swift
index f8a548a..6c5b8f6 100644
--- a/test/Interpreter/enforce_exclusive_access.swift
+++ b/test/Interpreter/enforce_exclusive_access.swift
@@ -1,6 +1,6 @@
 // RUN: rm -rf %t
 // RUN: mkdir -p %t
-// RUN: %target-build-swift %s -o %t/a.out -enforce-exclusivity=checked -Onone
+// RUN: %target-build-swift -swift-version 4 %s -o %t/a.out -enforce-exclusivity=checked -Onone
 //
 // RUN: %target-run %t/a.out
 // REQUIRES: executable_test
@@ -21,7 +21,7 @@
   closure()
 }
 
-/// Begin a modify access to the first paraemter and call the closure inside it.
+/// Begin a modify access to the first parameter and call the closure inside it.
 func modifyAndPerform<T>(_ _: UnsafeMutablePointer<T>, closure: () ->()) {
   closure()
 }
@@ -47,7 +47,7 @@
   .skip(.custom(
     { _isFastAssertConfiguration() },
     reason: "this trap is not guaranteed to happen in -Ounchecked"))
-  .crashOutputMatches("modify/read access conflict detected on address")
+  .crashOutputMatches("read/modify access conflict detected on address")
   .code
 {
   readAndPerform(&globalX) {
@@ -60,7 +60,7 @@
   .skip(.custom(
     { _isFastAssertConfiguration() },
     reason: "this trap is not guaranteed to happen in -Ounchecked"))
-  .crashOutputMatches("read/modify access conflict detected on address")
+  .crashOutputMatches("modify/read access conflict detected on address")
   .code
 {
   modifyAndPerform(&globalX) {
@@ -101,11 +101,67 @@
   globalX = X() // no-trap
 }
 
-ExclusiveAccessTestSuite.test("ClosureCaptureModifyModify") {
+// FIXME: This should be covered by static diagnostics.
+// Once this radar is fixed, confirm that a it is covered by a static diagnostic
+// (-verify) test in exclusivity_static_diagnostics.sil.
+// <rdar://problem/32061282> Enforce exclusive access in noescape closures.
+//
+//ExclusiveAccessTestSuite.test("ClosureCaptureModifyModify")
+//.skip(.custom(
+//    { _isFastAssertConfiguration() },
+//    reason: "this trap is not guaranteed to happen in -Ounchecked"))
+//  .crashOutputMatches("modify/modify access conflict detected on address")
+//  .code
+//{
+//  var x = X()
+//  modifyAndPerform(&x) {
+//    expectCrashLater()
+//    x.i = 12
+//  }
+//}
+
+// FIXME: This should be covered by static diagnostics.
+// Once this radar is fixed, confirm that a it is covered by a static diagnostic
+// (-verify) test in exclusivity_static_diagnostics.sil.
+// <rdar://problem/32061282> Enforce exclusive access in noescape closures.
+//
+//ExclusiveAccessTestSuite.test("ClosureCaptureReadModify")
+//.skip(.custom(
+//    { _isFastAssertConfiguration() },
+//    reason: "this trap is not guaranteed to happen in -Ounchecked"))
+//  .crashOutputMatches("modify/read access conflict detected on address")
+//  .code
+//{
+//  var x = X()
+//  modifyAndPerform(&x) {
+//    expectCrashLater()
+//    _blackHole(x.i)
+//  }
+//}
+
+// FIXME: This should be covered by static diagnostics.
+// Once this radar is fixed, confirm that a it is covered by a static diagnostic
+// (-verify) test in exclusivity_static_diagnostics.sil.
+// <rdar://problem/32061282> Enforce exclusive access in noescape closures.
+//
+//ExclusiveAccessTestSuite.test("ClosureCaptureModifyRead")
+//.skip(.custom(
+//    { _isFastAssertConfiguration() },
+//    reason: "this trap is not guaranteed to happen in -Ounchecked"))
+//  .crashOutputMatches("read/modify access conflict detected on address")
+//  .code
+//{
+//  var x = X()
+//  readAndPerform(&x) {
+//    expectCrashLater()
+//    x.i = 12
+//  }
+//}
+
+ExclusiveAccessTestSuite.test("ClosureCaptureReadRead") {
   var x = X()
-  modifyAndPerform(&x) {
-    // FIXME: This should be caught dynamically.
-    x.i = 12
+  readAndPerform(&x) {
+    _blackHole(x.i) // no-trap
   }
 }
 
@@ -113,7 +169,7 @@
 // have overlapping accesses
 ExclusiveAccessTestSuite.test("PerThreadEnforcement") {
   modifyAndPerform(&globalX) {
-    var (_, otherThread) = _stdlib_pthread_create_block(nil, { (_ : Void) -> () in
+    let (_, otherThread) = _stdlib_pthread_create_block(nil, { (_ : Void) -> () in
       globalX.i = 12 // no-trap
       return ()
     }, ())
diff --git a/test/Interpreter/enum.swift b/test/Interpreter/enum.swift
index 5c93eec..c6debb8 100644
--- a/test/Interpreter/enum.swift
+++ b/test/Interpreter/enum.swift
@@ -425,8 +425,8 @@
 // CHECK: X(222)
 // CHECK: X(444)
 // CHECK: .y(222, 444)
-// CHECK-DAG-64: ~X(222)
-// CHECK-DAG-64: ~X(444)
+// CHECK-DAG: ~X(222)
+// CHECK-DAG: ~X(444)
 test_spare_bit_aggregate(.y(Rdar15383966(222), Rdar15383966(444)))
 // CHECK: .z(S(a: 333, b: 666))
 test_spare_bit_aggregate(.z(S(333, 666)))
diff --git a/test/Interpreter/subclass_existentials.swift b/test/Interpreter/subclass_existentials.swift
index 142debb..6bdb898 100644
--- a/test/Interpreter/subclass_existentials.swift
+++ b/test/Interpreter/subclass_existentials.swift
@@ -154,10 +154,11 @@
   expectTrue(((Base<Int>) & P & Q).self == (P & (Base<Int>) & Q).self)
   expectTrue((P & Q & (Base<Int>)).self == (Q & (Base<Int>) & P).self)
 
-  // For now...
-  expectFalse((P & Q).self == (P & Q & AnyObject).self)
-  expectFalse((P & Q).self == (Q & P & AnyObject).self)
-  expectFalse(((Base<Int>) & Q).self == (Q & (Base<Int>) & AnyObject).self)
+  expectTrue((P & Q).self == (P & Q & AnyObject).self)
+  expectTrue((P & Q).self == (Q & P & AnyObject).self)
+  expectTrue(((Base<Int>) & Q).self == (Q & (Base<Int>) & AnyObject).self)
+
+  expectFalse((R & AnyObject).self == R.self)
 }
 
 SubclassExistentialsTestSuite.test("Metadata to string") {
diff --git a/test/Interpreter/subclass_existentials_objc.swift b/test/Interpreter/subclass_existentials_objc.swift
index 416af53..694f6b4 100644
--- a/test/Interpreter/subclass_existentials_objc.swift
+++ b/test/Interpreter/subclass_existentials_objc.swift
@@ -1,4 +1,4 @@
-//===--- subclass_existentials.swift --------------------------------------===//
+//===--- subclass_existentials_objc.swift ---------------------------------===//
 //
 // This source file is part of the Swift.org open source project
 //
diff --git a/test/Migrator/API.json b/test/Migrator/API.json
index c7809ea..072408a 100644
--- a/test/Migrator/API.json
+++ b/test/Migrator/API.json
@@ -207,12 +207,12 @@
   {
     "DiffItemKind": "CommonDiffItem",
     "NodeKind": "Function",
-    "NodeAnnotation": "UnwrapOptional",
-    "ChildIndex": "0",
+    "NodeAnnotation": "TypeRewritten",
+    "ChildIndex": "0:0",
     "LeftUsr": "s:6CitiesAAC7buderimABSgyF",
     "LeftComment": "",
     "RightUsr": "",
-    "RightComment": "",
+    "RightComment": "Cities & ExtraCities",
     "ModuleName": "Cities"
   },
   {
@@ -273,6 +273,28 @@
   {
     "DiffItemKind": "CommonDiffItem",
     "NodeKind": "Function",
+    "NodeAnnotation": "WrapOptional",
+    "ChildIndex": "1",
+    "LeftUsr": "s:6Cities05ExtraA0P6blibliySQySSGSSSg_SStc1x_tF",
+    "LeftComment": "",
+    "RightUsr": "",
+    "RightComment": "",
+    "ModuleName": "Cities"
+  },
+  {
+    "DiffItemKind": "CommonDiffItem",
+    "NodeKind": "Function",
+    "NodeAnnotation": "WrapOptional",
+    "ChildIndex": "1",
+    "LeftUsr": "s:6Cities05ExtraA0P6blibliySQySSGSSSg_SStc1x_tF",
+    "LeftComment": "",
+    "RightUsr": "",
+    "RightComment": "",
+    "ModuleName": "Cities"
+  },
+  {
+    "DiffItemKind": "CommonDiffItem",
+    "NodeKind": "Function",
     "NodeAnnotation": "ImplicitOptionalToOptional",
     "ChildIndex": "1:0",
     "LeftUsr": "s:6Cities05ExtraA0P6blibliySQySSGSSSg_SStc1x_tF",
@@ -346,5 +368,49 @@
     "RightUsr": "",
     "RightComment": "",
     "ModuleName": "Cities"
+  },
+  {
+    "DiffItemKind": "CommonDiffItem",
+    "NodeKind": "Function",
+    "NodeAnnotation": "Rename",
+    "ChildIndex": "0",
+    "LeftUsr": "s:6CitiesAAC10mooloolabayAB1x_ABSg1ytF",
+    "LeftComment": "",
+    "RightUsr": "",
+    "RightComment": "newMooloolaba(newX:newY:)",
+    "ModuleName": "Cities"
+  },
+    {
+    "DiffItemKind": "CommonDiffItem",
+    "NodeKind": "Function",
+    "NodeAnnotation": "Rename",
+    "ChildIndex": "0",
+    "LeftUsr": "s:6Cities04MoreA0P14setZooLocationySi1x_Si1ySi1ztF",
+    "LeftComment": "",
+    "RightUsr": "",
+    "RightComment": "setZooLocationNew(newX:newY:newZ:)",
+    "ModuleName": "Cities"
+  },
+  {
+    "DiffItemKind": "CommonDiffItem",
+    "NodeKind": "Function",
+    "NodeAnnotation": "TypeRewritten",
+    "ChildIndex": "1:0",
+    "LeftUsr": "s:6CitiesAAC8maroochyySiSg1x_AD1ytF",
+    "LeftComment": "Int",
+    "RightUsr": "",
+    "RightComment": "(Int) -> Int",
+    "ModuleName": "Cities"
+  },
+  {
+    "DiffItemKind": "CommonDiffItem",
+    "NodeKind": "Function",
+    "NodeAnnotation": "TypeRewritten",
+    "ChildIndex": "2:0",
+    "LeftUsr": "s:6CitiesAAC8maroochyySiSg1x_AD1ytF",
+    "LeftComment": "Int",
+    "RightUsr": "",
+    "RightComment": "(Int) -> Int",
+    "ModuleName": "Cities"
   }
 ]
diff --git a/test/Migrator/Inputs/cities.swift b/test/Migrator/Inputs/cities.swift
index 48e8497..4c2e4e1 100644
--- a/test/Migrator/Inputs/cities.swift
+++ b/test/Migrator/Inputs/cities.swift
@@ -8,6 +8,7 @@
   open func yandina(x: [[String : Cities]]!) {}
   open func buderim() -> Cities? { return Cities(x: 1) }
   open func noosa() -> [[String : Cities]?] { return [] }
+  open func maroochy(x: Int?, y: Int?) {}
 }
 
 public protocol ExtraCities {
@@ -15,3 +16,7 @@
   func blibli(x: (String?, String) -> String!)
   func currimundi(x: (Int, (Int, Int))!)
 }
+
+public protocol MoreCities {
+  func setZooLocation(x: Int, y: Int, z: Int)
+}
\ No newline at end of file
diff --git a/test/Migrator/Inputs/string_to_substring_conversion.swift b/test/Migrator/Inputs/string_to_substring_conversion.swift
index 785ea3a..ced2974 100644
--- a/test/Migrator/Inputs/string_to_substring_conversion.swift
+++ b/test/Migrator/Inputs/string_to_substring_conversion.swift
@@ -1,46 +1,80 @@
-let s = "foo"
+// RUN: %target-swift-frontend -typecheck -verify fix-string-substring-conversion %s
+
+let s = "Hello"
 let ss = s[s.startIndex..<s.endIndex]
 
-// CTP_ReturnStmt
-func returnStringButWantedSubstring() -> Substring {
-  return s
+// CTP_Initialization
+do {
+  let s1: Substring = { return s }()
+  _ = s1
 }
 
+// CTP_ReturnStmt
+do {
+  func returnsASubstring() -> Substring {
+    return s
+  }
+}
+
+// CTP_ThrowStmt
+// Doesn't really make sense for this fix-it - see case in diagnoseContextualConversionError:
+// The conversion destination of throw is always ErrorType (at the moment)
+// if this ever expands, this should be a specific form like () is for
+// return.
+
+// CTP_EnumCaseRawValue
+// Substrings can't be raw values because they aren't literals.
+
 // CTP_DefaultParameter
-// Never do this.
-func defaultArgIsSubstring(ss: Substring = s) {}
+do {
+  func foo(x: Substring = s) {}
+}
 
 // CTP_CalleeResult
-func returnString() -> String {
-  return s
+do {
+  func getString() -> String { return s }
+  let gottenSubstring: Substring = getString()
+  _ = gottenSubstring
 }
-let s2: Substring = returnString()
 
 // CTP_CallArgument
-func takeString(s: String) {}
-func takeSubstring(ss: Substring) {}
-
-takeSubstring(ss)
-takeSubstring(s)
+do {
+  func takesASubstring(_ ss: Substring) {}
+  takesASubstring(s)
+}
 
 // CTP_ClosureResult
-[1,2,3].map { (x: Int) -> Substring in
-  return s
+do {
+  [s].map { (x: String) -> Substring in x }
 }
 
 // CTP_ArrayElement
-let a: [Substring] = [ s ]
+do {
+  let a: [Substring] = [ s ]
+  _ = a
+}
 
 // CTP_DictionaryKey
+do {
+  let d: [ Substring : Substring ] = [ s : ss ]
+  _ = d
+}
+
 // CTP_DictionaryValue
-let d: [Substring : Substring] = [
-  "CTP_DictionaryValue" : s,
-  s : "CTP_DictionaryKey",
-]
+do {
+  let d: [ Substring : Substring ] = [ ss : s ]
+  _ = d
+}
 
 // CTP_CoerceOperand
-let s3: Substring = s as Substring
+do {
+  let s1: Substring = s as Substring
+  _ = s1
+}
 
 // CTP_AssignSource
-let s4: Substring = s
+do {
+  let s1: Substring = s
+  _ = s1
+}
 
diff --git a/test/Migrator/Inputs/substring_to_string_conversion.swift b/test/Migrator/Inputs/substring_to_string_conversion.swift
index 4b8bd11..3c969e1 100644
--- a/test/Migrator/Inputs/substring_to_string_conversion.swift
+++ b/test/Migrator/Inputs/substring_to_string_conversion.swift
@@ -1,46 +1,78 @@
-let s = "foo"
+let s = "Hello"
 let ss = s[s.startIndex..<s.endIndex]
 
-// CTP_ReturnStmt
-
-func returnSubstringButWantedString() -> String {
-  return ss
+// CTP_Initialization
+do {
+  let s1: String = { return ss }()
+  _ = s1
 }
 
+// CTP_ReturnStmt
+do {
+  func returnsAString() -> String {
+    return ss
+  }
+}
+
+// CTP_ThrowStmt
+// Doesn't really make sense for this fix-it - see case in diagnoseContextualConversionError:
+// The conversion destination of throw is always ErrorType (at the moment)
+// if this ever expands, this should be a specific form like () is for
+// return.
+
+// CTP_EnumCaseRawValue
+// Substrings can't be raw values because they aren't literals.
+
 // CTP_DefaultParameter
-
-// Never do this.
-func defaultArgIsString(s: String = ss) {}
+do {
+  func foo(x: String = ss) {}
+}
 
 // CTP_CalleeResult
-func returnSubstring() -> Substring {
-  return ss
+do {
+  func getSubstring() -> Substring { return ss }
+  let gottenString : String = getSubstring()
+  _ = gottenString
 }
-let s2: String = returnSubstring()
 
 // CTP_CallArgument
-func takeString(_ s: String) {}
-
-takeString(s)
-takeString(ss)
+do {
+  func takesAString(_ s: String) {}
+  takesAString(ss)
+}
 
 // CTP_ClosureResult
-[1,2,3].map { (x: Int) -> String in
-  return ss
+do {
+  [ss].map { (x: Substring) -> String in x }
 }
 
 // CTP_ArrayElement
-let a: [String] = [ ss ]
+do {
+  let a: [String] = [ ss ]
+  _ = a
+}
 
 // CTP_DictionaryKey
+do {
+  let d: [ String : String ] = [ ss : s ]
+  _ = d
+}
+
 // CTP_DictionaryValue
-let d: [String : String] = [
-  "CTP_DictionaryValue" : ss,
-  ss : "CTP_DictionaryKey",
-]
+do {
+  let d: [ String : String ] = [ s : ss ]
+  _ = d
+}
 
 // CTP_CoerceOperand
-let s3: String = ss as String
+do {
+  let s1: String = ss as String
+  _ = s1
+}
 
 // CTP_AssignSource
-let s4: String = ss
+do {
+  let s1: String = ss
+  _ = s1
+}
+
diff --git a/test/Migrator/pre_fixit_pass.swift b/test/Migrator/pre_fixit_pass.swift
new file mode 100644
index 0000000..fe7367c
--- /dev/null
+++ b/test/Migrator/pre_fixit_pass.swift
@@ -0,0 +1,15 @@
+// REQUIRES: objc_interop
+// RUN: rm -rf %t && mkdir -p %t && not %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -api-diff-data-file %S/API.json -emit-migrated-file-path %t/pre_fixit_pass.swift.result -o /dev/null
+// RUN: diff -u %S/pre_fixit_pass.swift.expected %t/pre_fixit_pass.swift.result
+
+import Bar
+
+struct New {}
+@available(*, unavailable, renamed: "New")
+struct Old {}
+Old()
+
+func foo(_ a : PropertyUserInterface) {
+  a.setField(1)
+  _ = a.field()
+}
diff --git a/test/Migrator/pre_fixit_pass.swift.expected b/test/Migrator/pre_fixit_pass.swift.expected
new file mode 100644
index 0000000..f0dcb37
--- /dev/null
+++ b/test/Migrator/pre_fixit_pass.swift.expected
@@ -0,0 +1,15 @@
+// REQUIRES: objc_interop
+// RUN: rm -rf %t && mkdir -p %t && not %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -api-diff-data-file %S/API.json -emit-migrated-file-path %t/pre_fixit_pass.swift.result -o /dev/null
+// RUN: diff -u %S/pre_fixit_pass.swift.expected %t/pre_fixit_pass.swift.result
+
+import Bar
+
+struct New {}
+@available(*, unavailable, renamed: "New")
+struct Old {}
+New()
+
+func foo(_ a : PropertyUserInterface) {
+  a.Field = 1
+  _ = a.field
+}
diff --git a/test/Migrator/pre_fixit_pass_still_failed.swift b/test/Migrator/pre_fixit_pass_still_failed.swift
new file mode 100644
index 0000000..ac6ddf3
--- /dev/null
+++ b/test/Migrator/pre_fixit_pass_still_failed.swift
@@ -0,0 +1,9 @@
+// RUN: rm -rf %t && mkdir -p %t && not %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/pre_fixit_pass.swift.result -o /dev/null
+
+// We shouldn't be able to successfully use the pre-fix-it passes to
+// fix this file before migration because there is a use of an
+// unresolved identifier 'bar'.
+
+func foo(s: String) {}
+foo("Hello")
+bar("Hello") // Unresolved failure
diff --git a/test/Migrator/prefix_typeof_expr.swift b/test/Migrator/prefix_typeof_expr.swift
new file mode 100644
index 0000000..04fb485
--- /dev/null
+++ b/test/Migrator/prefix_typeof_expr.swift
@@ -0,0 +1,25 @@
+// RUN: rm -rf %t && mkdir -p %t && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/prefix_typeof_expr.swift.result -emit-remap-file-path %t/prefix_typeof_expr.swift.remap -o /dev/null
+// RUN: diff -u %S/prefix_typeof_expr.swift.expected %t/prefix_typeof_expr.swift.result
+
+class HasTypeVar {
+  var type: Int {
+    precondition(true, "\(type(of: self)) should never be asked for its type")
+    _ = Swift.type(of: 1) // Don't add another prefix to this one
+    return 1
+  }
+}
+
+class HasTypeMethod {
+  func type<T>(of: T) -> Int {
+    _ = type(of: 1)
+    _ = Swift.type(of: 1) // Don't add another prefix to this one
+    return 1
+  }
+}
+
+func type<T>(of: T) -> Int {
+  return 1
+}
+
+_ = type(of: 1)
+_ = Swift.type(of: 1) // Don't add another prefix to this one
diff --git a/test/Migrator/prefix_typeof_expr.swift.expected b/test/Migrator/prefix_typeof_expr.swift.expected
new file mode 100644
index 0000000..ad489f4
--- /dev/null
+++ b/test/Migrator/prefix_typeof_expr.swift.expected
@@ -0,0 +1,25 @@
+// RUN: rm -rf %t && mkdir -p %t && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/prefix_typeof_expr.swift.result -emit-remap-file-path %t/prefix_typeof_expr.swift.remap -o /dev/null
+// RUN: diff -u %S/prefix_typeof_expr.swift.expected %t/prefix_typeof_expr.swift.result
+
+class HasTypeVar {
+  var type: Int {
+    precondition(true, "\(Swift.type(of: self)) should never be asked for its type")
+    _ = Swift.type(of: 1) // Don't add another prefix to this one
+    return 1
+  }
+}
+
+class HasTypeMethod {
+  func type<T>(of: T) -> Int {
+    _ = Swift.type(of: 1)
+    _ = Swift.type(of: 1) // Don't add another prefix to this one
+    return 1
+  }
+}
+
+func type<T>(of: T) -> Int {
+  return 1
+}
+
+_ = Swift.type(of: 1)
+_ = Swift.type(of: 1) // Don't add another prefix to this one
diff --git a/test/Migrator/rename-func-decl.swift b/test/Migrator/rename-func-decl.swift
new file mode 100644
index 0000000..e442048
--- /dev/null
+++ b/test/Migrator/rename-func-decl.swift
@@ -0,0 +1,11 @@
+// REQUIRES: objc_interop
+// RUN: rm -rf %t.mod && mkdir -p %t.mod
+// RUN: %target-swift-frontend -emit-module -o %t.mod/cities.swiftmodule %S/Inputs/cities.swift -module-name Cities -parse-as-library
+// RUN: rm -rf %t && mkdir -p %t && %target-swift-frontend -c -update-code -disable-migrator-fixits -primary-file %s  -I %t.mod -api-diff-data-file %S/API.json -emit-migrated-file-path %t/rename-func-decl.swift.result -o %t/rename-func-decl.swift.remap -o /dev/null
+// RUN: diff -u %S/rename-func-decl.swift.expected %t/rename-func-decl.swift.result
+
+import Cities
+
+class MyCities : MoreCities {
+  func setZooLocation(x ix: Int, y iy: Int, z iz: Int) {}
+}
diff --git a/test/Migrator/rename-func-decl.swift.expected b/test/Migrator/rename-func-decl.swift.expected
new file mode 100644
index 0000000..1154ba9
--- /dev/null
+++ b/test/Migrator/rename-func-decl.swift.expected
@@ -0,0 +1,11 @@
+// REQUIRES: objc_interop
+// RUN: rm -rf %t.mod && mkdir -p %t.mod
+// RUN: %target-swift-frontend -emit-module -o %t.mod/cities.swiftmodule %S/Inputs/cities.swift -module-name Cities -parse-as-library
+// RUN: rm -rf %t && mkdir -p %t && %target-swift-frontend -c -update-code -disable-migrator-fixits -primary-file %s  -I %t.mod -api-diff-data-file %S/API.json -emit-migrated-file-path %t/rename-func-decl.swift.result -o %t/rename-func-decl.swift.remap -o /dev/null
+// RUN: diff -u %S/rename-func-decl.swift.expected %t/rename-func-decl.swift.result
+
+import Cities
+
+class MyCities : MoreCities {
+  func setZooLocationNew(newX ix: Int, newY iy: Int, newZ iz: Int) {}
+}
diff --git a/test/Migrator/string_to_substring_conversion.swift.expected b/test/Migrator/string_to_substring_conversion.swift.expected
index 7a05293..87fc229 100644
--- a/test/Migrator/string_to_substring_conversion.swift.expected
+++ b/test/Migrator/string_to_substring_conversion.swift.expected
@@ -1,46 +1,80 @@
-let s = "foo"
+// RUN: %target-swift-frontend -typecheck -verify fix-string-substring-conversion %s
+
+let s = "Hello"
 let ss = s[s.startIndex..<s.endIndex]
 
-// CTP_ReturnStmt
-func returnStringButWantedSubstring() -> Substring {
-  return s[]
+// CTP_Initialization
+do {
+  let s1: Substring = { return s }()[]
+  _ = s1
 }
 
+// CTP_ReturnStmt
+do {
+  func returnsASubstring() -> Substring {
+    return s[]
+  }
+}
+
+// CTP_ThrowStmt
+// Doesn't really make sense for this fix-it - see case in diagnoseContextualConversionError:
+// The conversion destination of throw is always ErrorType (at the moment)
+// if this ever expands, this should be a specific form like () is for
+// return.
+
+// CTP_EnumCaseRawValue
+// Substrings can't be raw values because they aren't literals.
+
 // CTP_DefaultParameter
-// Never do this.
-func defaultArgIsSubstring(ss: Substring = s[]) {}
+do {
+  func foo(x: Substring = s[]) {}
+}
 
 // CTP_CalleeResult
-func returnString() -> String {
-  return s[]
+do {
+  func getString() -> String { return s[] }
+  let gottenSubstring: Substring = getString()[]
+  _ = gottenSubstring
 }
-let s2: Substring = returnString()[]
 
 // CTP_CallArgument
-func takeString(s: String) {}
-func takeSubstring(ss: Substring) {}
-
-takeSubstring(ss)
-takeSubstring(s[])
+do {
+  func takesASubstring(_ ss: Substring) {}
+  takesASubstring(s[])
+}
 
 // CTP_ClosureResult
-[1,2,3].map { (x: Int) -> Substring in
-  return s[]
+do {
+  [s].map { (x: String) -> Substring in x[] }
 }
 
 // CTP_ArrayElement
-let a: [Substring] = [ s[] ]
+do {
+  let a: [Substring] = [ s[] ]
+  _ = a
+}
 
 // CTP_DictionaryKey
+do {
+  let d: [ Substring : Substring ] = [ s[] : ss ]
+  _ = d
+}
+
 // CTP_DictionaryValue
-let d: [Substring : Substring] = [
-  "CTP_DictionaryValue" : s[],
-  s[] : "CTP_DictionaryKey",
-]
+do {
+  let d: [ Substring : Substring ] = [ ss : s[] ]
+  _ = d
+}
 
 // CTP_CoerceOperand
-let s3: Substring = s[] as Substring
+do {
+  let s1: Substring = s[] as Substring
+  _ = s1
+}
 
 // CTP_AssignSource
-let s4: Substring = s[]
+do {
+  let s1: Substring = s[]
+  _ = s1
+}
 
diff --git a/test/Migrator/substring_to_string_conversion.swift.expected b/test/Migrator/substring_to_string_conversion.swift.expected
index c00f298..8a2a547 100644
--- a/test/Migrator/substring_to_string_conversion.swift.expected
+++ b/test/Migrator/substring_to_string_conversion.swift.expected
@@ -1,47 +1,78 @@
-let s = "foo"
+let s = "Hello"
 let ss = s[s.startIndex..<s.endIndex]
 
-// CTP_ReturnStmt
-
-func returnSubstringButWantedString() -> String {
-  return String(ss)
+// CTP_Initialization
+do {
+  let s1: String = String({ return ss }())
+  _ = s1
 }
 
+// CTP_ReturnStmt
+do {
+  func returnsAString() -> String {
+    return String(ss)
+  }
+}
+
+// CTP_ThrowStmt
+// Doesn't really make sense for this fix-it - see case in diagnoseContextualConversionError:
+// The conversion destination of throw is always ErrorType (at the moment)
+// if this ever expands, this should be a specific form like () is for
+// return.
+
+// CTP_EnumCaseRawValue
+// Substrings can't be raw values because they aren't literals.
+
 // CTP_DefaultParameter
-
-// Never do this.
-func defaultArgIsString(s: String = String(ss)) {}
+do {
+  func foo(x: String = String(ss)) {}
+}
 
 // CTP_CalleeResult
-func returnSubstring() -> Substring {
-  return String(ss)
+do {
+  func getSubstring() -> Substring { return ss }
+  let gottenString : String = String(getSubstring())
+  _ = gottenString
 }
-let s2: String = String(returnSubstring())
 
 // CTP_CallArgument
-func takeString(s: String) {}
-func takeSubstring(ss: Substring) {}
-
-takeString(string)
-takeString(String(substring))
+do {
+  func takesAString(_ s: String) {}
+  takesAString(String(ss))
+}
 
 // CTP_ClosureResult
-[1,2,3].map { (x: Int) -> String in
-  return String(ss)
+do {
+  [ss].map { (x: Substring) -> String in String(x) }
 }
 
 // CTP_ArrayElement
-let a: [String] = [ String(ss) ]
+do {
+  let a: [String] = [ String(ss) ]
+  _ = a
+}
 
 // CTP_DictionaryKey
+do {
+  let d: [ String : String ] = [ String(ss) : s ]
+  _ = d
+}
+
 // CTP_DictionaryValue
-let d: [String : String] = [
-  "CTP_DictionaryValue" : String(ss),
-  String(ss) : "CTP_DictionaryKey",
-]
+do {
+  let d: [ String : String ] = [ s : String(ss) ]
+  _ = d
+}
 
 // CTP_CoerceOperand
-let s3: String = String(ss) as String
+do {
+  let s1: String = String(ss) as String
+  _ = s1
+}
 
 // CTP_AssignSource
-let s4: String = String(ss)
+do {
+  let s1: String = String(ss)
+  _ = s1
+}
+
diff --git a/test/Migrator/tuple-arguments.swift b/test/Migrator/tuple-arguments.swift
new file mode 100644
index 0000000..45b8020
--- /dev/null
+++ b/test/Migrator/tuple-arguments.swift
@@ -0,0 +1,38 @@
+// RUN: %target-swift-frontend -typecheck %s -swift-version 3
+// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t.result -disable-migrator-fixits -swift-version 3
+// RUN: diff -u %s.expected %t.result
+// RUN: %target-swift-frontend -typecheck %s.expected -swift-version 4
+
+func test1(_: ()) {}
+test1(())
+test1()
+func test2() {}
+test2()
+
+enum Result<T> {
+	case success(T)
+}
+func test3(_: Result<()>) {}
+test3(.success())
+
+func test4(_: (Int, Int) -> ()) {}
+test4({ (x,y) in })
+func test5(_: (Int, Int, Int) -> ()) {}
+test5({ (x,y,z) in })
+
+func test6(_: ((Int, Int)) -> ()) {}
+test6({ (x,y) in })
+func test7(_: ((Int, Int, Int)) -> ()) {}
+test7({ (x,y,z) in })
+test6({ (_ x, _ y) in })
+test6({ (_, _) in })
+test6({ (x:Int, y:Int) in })
+test6({ (_, _) ->() in })
+
+func toString(indexes: Int?...) -> String {
+  let _ = indexes.enumerated().flatMap({ (i: Int, index: Int?) -> String? in
+    let _: Int = i
+    if index != nil {}
+    return ""
+  })
+}
diff --git a/test/Migrator/tuple-arguments.swift.expected b/test/Migrator/tuple-arguments.swift.expected
new file mode 100644
index 0000000..388119a
--- /dev/null
+++ b/test/Migrator/tuple-arguments.swift.expected
@@ -0,0 +1,38 @@
+// RUN: %target-swift-frontend -typecheck %s -swift-version 3
+// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t.result -disable-migrator-fixits -swift-version 3
+// RUN: diff -u %s.expected %t.result
+// RUN: %target-swift-frontend -typecheck %s.expected -swift-version 4
+
+func test1(_: ()) {}
+test1(())
+test1(())
+func test2() {}
+test2()
+
+enum Result<T> {
+	case success(T)
+}
+func test3(_: Result<()>) {}
+test3(.success(()))
+
+func test4(_: (Int, Int) -> ()) {}
+test4({ (x,y) in })
+func test5(_: (Int, Int, Int) -> ()) {}
+test5({ (x,y,z) in })
+
+func test6(_: ((Int, Int)) -> ()) {}
+test6({ let (x,y) = $0; })
+func test7(_: ((Int, Int, Int)) -> ()) {}
+test7({ let (x,y,z) = $0; })
+test6({ let (x, y) = $0; })
+test6({ let (_, _) = $0; })
+test6({ (__val:(Int, Int)) in let (x,y) = __val;  })
+test6({ (__val:(Int, Int)) ->() in let (_,_) = __val;  })
+
+func toString(indexes: Int?...) -> String {
+  let _ = indexes.enumerated().flatMap({ (__val:(Int, Int?)) -> String? in let (i,index) = __val; 
+    let _: Int = i
+    if index != nil {}
+    return ""
+  })
+}
diff --git a/test/Migrator/wrap_optional.swift b/test/Migrator/wrap_optional.swift
index b70ebc3..c26b5d9 100644
--- a/test/Migrator/wrap_optional.swift
+++ b/test/Migrator/wrap_optional.swift
@@ -12,13 +12,14 @@
   override func mooloolaba(x: Cities, y: Cities?) {}
   override func toowoomba(x: [Cities], y: [Cities]?) {}
   override func mareeba(x: [String : Cities?], y: [String : Cities]?) {}
+  override func maroochy(x: (Int)?, y: Int?) {}
 }
 
 class MySubCities : MyCities {}
 
 class MySubSubCities : MySubCities {
   override func yandina(x: [[String : Cities]]!) {}
-  override func buderim() -> Cities? { return Cities(x: 1) }
+  override func buderim() -> Cities? { return nil }
   override func noosa() -> [[String : Cities]?] { return [] }
 }
 
@@ -33,3 +34,21 @@
   func blibli(x: (String?, String) -> String!) {}
   func currimundi(x: (Int, (Int, Int))!) {}
 }
+
+typealias IntAnd<T> = (Int, T)
+class Outer {
+  typealias Inner = (String?, String) -> String!
+}
+
+class MyExtraCitiesWithAliases : ExtraCities {
+  func blibli(x: Outer.Inner) {}
+  func currimundi(x: (Int, IntAnd<Int>)!) {}
+}
+
+typealias OptString = String?
+typealias ImplicitlyUnwrapped<T> = T!
+
+class MyExtraCitiesWithMoreAliases : ExtraCities {
+  func blibli(x: (OptString, String) -> String!) {}
+  func currimundi(x: ImplicitlyUnwrapped<(Int, (Int, Int))>) {}
+}
diff --git a/test/Migrator/wrap_optional.swift.expected b/test/Migrator/wrap_optional.swift.expected
index 1c063d9..aeeebaa 100644
--- a/test/Migrator/wrap_optional.swift.expected
+++ b/test/Migrator/wrap_optional.swift.expected
@@ -9,16 +9,17 @@
 class MyCities : Cities {
   override init?(x: Int?) { super.init(x: x) }
   override init?(y: Int) { super.init(y: y) }
-  override func mooloolaba(x: Cities?, y: Cities) {}
+  override func newMooloolaba(newX x: Cities?, newY y: Cities) {}
   override func toowoomba(x: [Cities?], y: [Cities?]) {}
   override func mareeba(x: [String? : Cities], y: [Int : Cities]) {}
+  override func maroochy(x: ((Int) -> Int)?, y: ((Int) -> Int)?) {}
 }
 
 class MySubCities : MyCities {}
 
 class MySubSubCities : MySubCities {
   override func yandina(x: [[Int : Cities]]?) {}
-  override func buderim() -> Cities { return Cities(x: 1) }
+  override func buderim() -> (Cities & ExtraCities)? { return nil }
   override func noosa() -> [[Int : Cities]] { return [] }
 }
 
@@ -33,3 +34,21 @@
   func blibli(x: ((String, String) -> String?)?) {}
   func currimundi(x: (Int, (Int?, Int))?) {}
 }
+
+typealias IntAnd<T> = (Int, T)
+class Outer {
+  typealias Inner = (String?, String) -> String!
+}
+
+class MyExtraCitiesWithAliases : ExtraCities {
+  func blibli(x: Outer.Inner?) {}
+  func currimundi(x: (Int, IntAnd<Int>)?) {}
+}
+
+typealias OptString = String?
+typealias ImplicitlyUnwrapped<T> = T!
+
+class MyExtraCitiesWithMoreAliases : ExtraCities {
+  func blibli(x: ((OptString, String) -> String?)?) {}
+  func currimundi(x: ImplicitlyUnwrapped<(Int, (Int, Int))>) {}
+}
diff --git a/test/Misc/serialized-diagnostics-file.swift b/test/Misc/serialized-diagnostics-file.swift
new file mode 100644
index 0000000..12c98f6
--- /dev/null
+++ b/test/Misc/serialized-diagnostics-file.swift
@@ -0,0 +1,12 @@
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+
+// RUN: not %target-swift-frontend -typecheck -serialize-diagnostics-path %t/nonexistent/some.dia %s 2>%t.err.txt
+// RUN: %FileCheck --input-file=%t.err.txt %s -check-prefix=OPEN-FAIL
+// OPEN-FAIL: cannot open file '{{.*}}/nonexistent/some.dia' for diagnostics emission
+
+var CRASH = 0
+
+// Make sure no diagnostic file is created if the compiler crashes.
+// RUN: not --crash %target-swift-frontend -typecheck -serialize-diagnostics-path %t/some.dia %s -debug-forbid-typecheck-prefix CRASH
+// RUN: not find %t/some.dia
diff --git a/test/NameBinding/name_lookup.swift b/test/NameBinding/name_lookup.swift
index 15874b7..416ca70 100644
--- a/test/NameBinding/name_lookup.swift
+++ b/test/NameBinding/name_lookup.swift
@@ -12,7 +12,7 @@
     set {}
   }
 
-  func baseFunc0() {} // expected-note 2 {{'baseFunc0()' declared here}}
+  func baseFunc0() {}
   func baseFunc1(_ a: Int) {}
 
   subscript(i: Int) -> Double {
@@ -58,7 +58,7 @@
     set {}
   }
 
-  func derivedFunc0() {}  // expected-note {{'derivedFunc0()' declared here}}
+  func derivedFunc0() {}
   func derivedFunc1(_ a: Int) {}
 
   subscript(i: Double) -> Int {
@@ -222,12 +222,12 @@
   class func staticTestSelf1() {
     self.baseInstanceVar = 42 // expected-error {{member 'baseInstanceVar' cannot be used on type 'ThisDerived1'}}
     self.baseProp = 42 // expected-error {{member 'baseProp' cannot be used on type 'ThisDerived1'}}
-    self.baseFunc0() // expected-error {{missing argument}}
-    self.baseFunc0(ThisBase1())() // expected-error {{'(ThisBase1) -> () -> ()' is not convertible to '(ThisDerived1) -> () -> ()'}}
+    self.baseFunc0() // expected-error {{instance member 'baseFunc0' cannot be used on type 'ThisDerived1'}}
+    self.baseFunc0(ThisBase1())() // expected-error {{'ThisBase1' is not convertible to 'ThisDerived1'}}
     
     self.baseFunc0(ThisDerived1())()
-    self.baseFunc1(42) // expected-error {{cannot convert value of type 'Int' to expected argument type 'ThisBase1'}}
-    self.baseFunc1(ThisBase1())(42) // expected-error {{'(ThisBase1) -> (Int) -> ()' is not convertible to '(ThisDerived1) -> (Int) -> ()'}}
+    self.baseFunc1(42) // expected-error {{instance member 'baseFunc1' cannot be used on type 'ThisDerived1'}}
+    self.baseFunc1(ThisBase1())(42) // expected-error {{'ThisBase1' is not convertible to 'ThisDerived1'}}
     self.baseFunc1(ThisDerived1())(42)
     self[0] = 42.0 // expected-error {{instance member 'subscript' cannot be used on type 'ThisDerived1'}}
     self.baseStaticVar = 42
@@ -235,7 +235,7 @@
     self.baseStaticFunc0()
 
     self.baseExtProp = 42 // expected-error {{member 'baseExtProp' cannot be used on type 'ThisDerived1'}}
-    self.baseExtFunc0() // expected-error {{missing argument}}
+    self.baseExtFunc0() // expected-error {{instance member 'baseExtFunc0' cannot be used on type 'ThisDerived1'}}
     self.baseExtStaticVar = 42
     self.baseExtStaticProp = 42 // expected-error {{member 'baseExtStaticProp' cannot be used on type 'ThisDerived1'}}
     self.baseExtStaticFunc0()
@@ -252,15 +252,15 @@
 
     self.derivedInstanceVar = 42 // expected-error {{member 'derivedInstanceVar' cannot be used on type 'ThisDerived1'}}
     self.derivedProp = 42 // expected-error {{member 'derivedProp' cannot be used on type 'ThisDerived1'}}
-    self.derivedFunc0() // expected-error {{missing argument}}
-    self.derivedFunc0(ThisBase1())() // expected-error {{cannot convert value of type 'ThisBase1' to expected argument type 'ThisDerived1'}}
+    self.derivedFunc0() // expected-error {{instance member 'derivedFunc0' cannot be used on type 'ThisDerived1'}}
+    self.derivedFunc0(ThisBase1())() // expected-error {{'ThisBase1' is not convertible to 'ThisDerived1'}}
     self.derivedFunc0(ThisDerived1())()
     self.derivedStaticVar = 42
     self.derivedStaticProp = 42
     self.derivedStaticFunc0()
 
     self.derivedExtProp = 42 // expected-error {{member 'derivedExtProp' cannot be used on type 'ThisDerived1'}}
-    self.derivedExtFunc0() // expected-error {{missing argument}}
+    self.derivedExtFunc0() // expected-error {{instance member 'derivedExtFunc0' cannot be used on type 'ThisDerived1'}}
     self.derivedExtStaticVar = 42
     self.derivedExtStaticProp = 42 // expected-error {{member 'derivedExtStaticProp' cannot be used on type 'ThisDerived1'}}
     self.derivedExtStaticFunc0()
@@ -291,9 +291,9 @@
   class func staticTestSuper1() {
     super.baseInstanceVar = 42 // expected-error {{member 'baseInstanceVar' cannot be used on type 'ThisBase1'}}
     super.baseProp = 42 // expected-error {{member 'baseProp' cannot be used on type 'ThisBase1'}}
-    super.baseFunc0() // expected-error {{missing argument}}
+    super.baseFunc0() // expected-error {{instance member 'baseFunc0' cannot be used on type 'ThisBase1'}}
     super.baseFunc0(ThisBase1())()
-    super.baseFunc1(42) // expected-error {{cannot convert value of type 'Int' to expected argument type 'ThisBase1'}}
+    super.baseFunc1(42) // expected-error {{instance member 'baseFunc1' cannot be used on type 'ThisBase1'}}
     super.baseFunc1(ThisBase1())(42)
     super[0] = 42.0 // expected-error {{instance member 'subscript' cannot be used on type 'ThisBase1'}}
     super.baseStaticVar = 42
@@ -301,7 +301,7 @@
     super.baseStaticFunc0()
 
     super.baseExtProp = 42 // expected-error {{member 'baseExtProp' cannot be used on type 'ThisBase1'}}
-    super.baseExtFunc0() // expected-error {{missing argument}}
+    super.baseExtFunc0() // expected-error {{instance member 'baseExtFunc0' cannot be used on type 'ThisBase1'}}
     super.baseExtStaticVar = 42 
     super.baseExtStaticProp = 42 // expected-error {{member 'baseExtStaticProp' cannot be used on type 'ThisBase1'}}
     super.baseExtStaticFunc0()
@@ -349,7 +349,7 @@
     set {}
   }
 
-  func baseExtFunc0() {} // expected-note 2 {{'baseExtFunc0()' declared here}}
+  func baseExtFunc0() {}
 
   var baseExtStaticVar: Int // expected-error {{extensions may not contain stored properties}} // expected-note 2 {{did you mean 'baseExtStaticVar'?}}
 
@@ -381,7 +381,7 @@
     set {}
   }
 
-  func derivedExtFunc0() {} // expected-note {{'derivedExtFunc0()' declared here}}
+  func derivedExtFunc0() {}
 
   var derivedExtStaticVar: Int // expected-error {{extensions may not contain stored properties}}
 
@@ -485,6 +485,12 @@
   func getFoo() -> Int {}
 }
 
+class Test19935319G<T> {
+  let i = getFoo()
+  // expected-error@-1 {{cannot use instance member 'getFoo' within property initializer; property initializers run before 'self' is available}}
+  func getFoo() -> Int { return 42 }
+}
+
 // <rdar://problem/27013358> Crash using instance member as default parameter
 class rdar27013358 {
   let defaultValue = 1
@@ -495,6 +501,15 @@
   init(another value: Int = returnTwo()) {} // expected-error {{cannot use instance member 'returnTwo' as a default parameter}}
 }
 
+class rdar27013358G<T> {
+  let defaultValue = 1
+  func returnTwo() -> Int {
+    return 2
+  }
+  init(defaulted value: Int = defaultValue) {} // expected-error {{cannot use instance member 'defaultValue' as a default parameter}}
+  init(another value: Int = returnTwo()) {} // expected-error {{cannot use instance member 'returnTwo' as a default parameter}}
+}
+
 // <rdar://problem/23904262> QoI: ivar default initializer cannot reference other default initialized ivars?
 class r23904262 {
   let x = 1
diff --git a/test/NameBinding/reference-dependencies.swift b/test/NameBinding/reference-dependencies.swift
index a130a7e..2464664 100644
--- a/test/NameBinding/reference-dependencies.swift
+++ b/test/NameBinding/reference-dependencies.swift
@@ -215,6 +215,8 @@
   switch getOtherFileEnum() {
   case .Value:
     break
+  default:
+    break
   }
 
   _ = .Value as OtherFileEnumWrapper.Enum
diff --git a/test/Parse/confusables.swift b/test/Parse/confusables.swift
new file mode 100644
index 0000000..94c0603
--- /dev/null
+++ b/test/Parse/confusables.swift
@@ -0,0 +1,22 @@
+// RUN: %target-typecheck-verify-swift
+
+// expected-error @+4 {{type annotation missing in pattern}}
+// expected-error @+3 {{use of unresolved operator '⁚'}}
+// expected-error @+2 {{operator with postfix spacing cannot start a subexpression}}
+// expected-error @+1 {{consecutive statements on a line must be separated by ';'}}
+let number⁚ Int // expected-note {{operator '⁚' contains possibly confused characters; did you mean to use ':'?}} {{11-14=:}}
+
+// expected-warning @+3 2 {{integer literal is unused}}
+// expected-error @+2 2 {{invalid character in source file}}
+// expected-error @+1 {{consecutive statements on a line must be separated by ';'}}
+5 ‒ 5 // expected-note 2 {{unicode character '‒' looks similar to '-'; did you mean to use '-'?}} {{3-6=-}}
+
+// expected-error @+2 {{use of unresolved identifier 'ꝸꝸꝸ'}}
+// expected-error @+1 {{expected ',' separator}}
+if (true ꝸꝸꝸ false) {} // expected-note {{identifier 'ꝸꝸꝸ' contains possibly confused characters; did you mean to use '&&&'?}} {{10-19=&&&}}
+
+// expected-error @+4 {{invalid character in source file}}
+// expected-error @+3 {{expected ',' separator}}
+// expected-error @+2 {{binary operator '==' cannot be applied to operands of type '(Int, Int)' and 'Int'}}
+// expected-note @+1 {{expected an argument list of type '(Int, Int)'}}
+if (5 ‒ 5) == 0 {} // expected-note {{unicode character '‒' looks similar to '-'; did you mean to use '-'?}} {{7-10=-}}
diff --git a/test/Parse/invalid.swift b/test/Parse/invalid.swift
index 093086f..281c5cb 100644
--- a/test/Parse/invalid.swift
+++ b/test/Parse/invalid.swift
@@ -1,12 +1,5 @@
 // RUN: %target-typecheck-verify-swift
 
-func foo(_ a: Int) {
-  // expected-error @+1 {{invalid character in source file}} {{8-9= }}
-  foo(<\a\>) // expected-error {{invalid character in source file}} {{10-11= }}
-  // expected-error @-1 {{'<' is not a prefix unary operator}}
-  // expected-error @-2 {{'>' is not a postfix unary operator}}
-}
-
 // rdar://15946844
 func test1(inout var x : Int) {}  // expected-error {{parameter may not have multiple 'inout', 'var', or 'let' specifiers}} {{18-22=}}
 // expected-error @-1 {{'inout' before a parameter name is not allowed, place it before the parameter type instead}} {{12-17=}} {{26-26=inout }}
diff --git a/test/Parse/matching_patterns.swift b/test/Parse/matching_patterns.swift
index d052b5b..3250453 100644
--- a/test/Parse/matching_patterns.swift
+++ b/test/Parse/matching_patterns.swift
@@ -58,7 +58,7 @@
 
 var e : Any = 0
 
-switch e { // expected-error {{switch must be exhaustive, consider adding a default clause:}}
+switch e { // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause?}}
 // 'is' pattern.
 case is Int,
      is A<Int>,
@@ -152,7 +152,7 @@
   }
 
   func member(_ n: Possible<Int>) {
-    switch n { // expected-error {{switch must be exhaustive, consider adding missing cases:}}
+    switch n { // expected-error {{switch must be exhaustive}}
     // expected-note@-1 {{missing case: '.Mere(_)'}}
     // expected-note@-2 {{missing case: '.Twain(_, _)'}}
     case ContainsEnum.Possible<Int>.Naught,
@@ -166,7 +166,7 @@
 }
 
 func nonmemberAccessesMemberType(_ n: ContainsEnum.Possible<Int>) {
-  switch n { // expected-error {{switch must be exhaustive, consider adding missing cases:}}
+  switch n { // expected-error {{switch must be exhaustive}}
   // expected-note@-1 {{missing case: '.Mere(_)'}}
   // expected-note@-2 {{missing case: '.Twain(_, _)'}}
   case ContainsEnum.Possible<Int>.Naught,
diff --git a/test/Parse/multiline_errors.swift b/test/Parse/multiline_errors.swift
index 5a478c8..e58b64b 100644
--- a/test/Parse/multiline_errors.swift
+++ b/test/Parse/multiline_errors.swift
@@ -4,48 +4,105 @@
 
 // ===---------- Multiline --------===
 
+// expecting at least 4 columns of leading indentation
 _ = """
     Eleven
   Mu
-    """ // expected-error@-1{{invalid mix of multi-line string literal indentation}}
-// expecting at least 4 columns of leading indentation
+    """ // expected-error@-1{{insufficient indentation of line in multi-line string literal}}
+        // expected-note@-1{{should match space here}}
+        // expected-note@-3{{change indentation of this line to match closing delimiter}} {{3-3=  }}
 
+// expecting at least 4 columns of leading indentation
 _ = """
     Eleven
    Mu
-    """ // expected-error@-1{{invalid mix of multi-line string literal indentation}}
-// expecting at least 4 columns of leading indentation
+    """ // expected-error@-1{{insufficient indentation of line in multi-line string literal}}
+        // expected-note@-1{{should match space here}}
+        // expected-note@-3{{change indentation of this line to match closing delimiter}} {{4-4= }}
 
+// \t is not the same as an actual tab for de-indentation
 _ = """
 	Twelve
 \tNu
-	""" // expected-error@-1{{invalid mix of multi-line string literal indentation}}
-// \t is not the same as an actual tab for de-indentation
+	""" // expected-error@-1{{insufficient indentation of line in multi-line string literal}}
+      // expected-note@-1{{should match tab here}}
+      // expected-note@-3{{change indentation of this line to match closing delimiter}} {{1-1=	}}
 
+// a tab is not the same as multiple spaces for de-indentation
 _ = """
   Thirteen
 	Xi
-  """ // expected-error@-1{{invalid mix of multi-line string literal indentation}}
-// a tab is not the same as multiple spaces for de-indentation
+  """ // expected-error@-1{{unexpected tab in indentation of line in multi-line string literal}}
+      // expected-note@-1{{should match space here}}
+      // expected-note@-3{{change indentation of this line to match closing delimiter}} {{1-2=  }}
 
+// a tab is not the same as multiple spaces for de-indentation
 _ = """
     Fourteen
   	Pi
-    """ // expected-error@-1{{invalid mix of multi-line string literal indentation}}
-// a tab is not the same as multiple spaces for de-indentation
+    """ // expected-error@-1{{unexpected tab in indentation of line in multi-line string literal}}
+        // expected-note@-1{{should match space here}}
+        // expected-note@-3{{change indentation of this line to match closing delimiter}} {{3-4=  }}
 
+// multiple spaces are not the same as a tab for de-indentation
+_ = """
+	Thirteen 2
+  Xi 2
+	""" // expected-error@-1{{unexpected space in indentation of line in multi-line string literal}}
+      // expected-note@-1{{should match tab here}}
+      // expected-note@-3{{change indentation of this line to match closing delimiter}} {{1-3=	}}
+
+// multiple spaces are not the same as a tab for de-indentation
+_ = """
+		Fourteen 2
+	  Pi 2
+		""" // expected-error@-1{{unexpected space in indentation of line in multi-line string literal}}
+        // expected-note@-1{{should match tab here}}
+        // expected-note@-3{{change indentation of this line to match closing delimiter}} {{2-4=	}}
+
+// newline currently required after opening """
 _ = """Fourteen
     Pi
-    """ // expected-error@-2{{invalid start of multi-line string literal}}
-// newline currently required after opening """
+    """ // expected-error@-2{{multi-line string literal content must begin on a new line}} {{8-8=\n}}
 
+// newline currently required before closing """
 _ = """
     Fourteen
-    Pi""" // expected-error@-0{{invalid end of multi-line string literal}}
-// newline currently required before closing """
+    Pi""" // expected-error@-0{{multi-line string literal closing delimiter must begin on a new line}} {{7-7=\n}}
 
-_ = """""" // expected-error@-0{{invalid start of multi-line string literal}}
 // newline currently required after opening """
+_ = """""" // expected-error@-0{{multi-line string literal content must begin on a new line}} {{8-8=\n}}
 
-_ = """ """ // expected-error@-0{{invalid start of multi-line string literal}}
 // newline currently required after opening """
+_ = """ """ // expected-error@-0{{multi-line string literal content must begin on a new line}} {{8-8=\n}}
+
+// two lines should get only one error
+_ = """
+    Hello,
+        World!
+	"""     // expected-error@-2{{unexpected space in indentation of next 2 lines in multi-line string literal}}
+          // expected-note@-1{{should match tab here}}
+          // expected-note@-4{{change indentation of these lines to match closing delimiter}} {{1-5=	}} {{1-5=	}}
+
+  _ = """
+Zero A
+Zero B
+	One A
+	One B
+  Two A
+  Two B
+Three A
+Three B
+		Four A
+		Four B
+			Five A
+			Five B
+		"""   // expected-error@-12{{insufficient indentation of next 2 lines in multi-line string literal}}
+          // expected-note@-1{{should match tab here}}
+          // expected-note@-14{{change indentation of these lines to match closing delimiter}} {{1-1=		}} {{1-1=		}}
+          // expected-error@-13{{insufficient indentation of next 2 lines in multi-line string literal}}
+          // expected-note@-4{{should match tab here}}
+          // expected-note@-15{{change indentation of these lines to match closing delimiter}} {{2-2=	}} {{2-2=	}}
+          // expected-error@-14{{unexpected space in indentation of next 4 lines in multi-line string literal}}
+          // expected-note@-7{{should match tab here}}
+          // expected-note@-16{{change indentation of these lines to match closing delimiter}} {{1-1=		}} {{1-1=		}} {{1-1=		}} {{1-1=		}}
\ No newline at end of file
diff --git a/test/Parse/switch.swift b/test/Parse/switch.swift
index 958c359..6cd34ed 100644
--- a/test/Parse/switch.swift
+++ b/test/Parse/switch.swift
@@ -71,7 +71,7 @@
 }
 
 // Multiple cases per case block
-switch x { // expected-error {{switch must be exhaustive, consider adding a default clause:}}
+switch x { // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause?}}
 case 0: // expected-error {{'case' label in a 'switch' should have at least one executable statement}} {{8-8= break}}
 case 1:
   x = 0
@@ -83,7 +83,7 @@
   x = 0
 }
 
-switch x { // expected-error {{switch must be exhaustive, consider adding a default clause:}}
+switch x { // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause?}}
 case 0:
   x = 0
 case 1: // expected-error {{'case' label in a 'switch' should have at least one executable statement}} {{8-8= break}}
@@ -95,7 +95,7 @@
 default: // expected-error {{'default' label in a 'switch' should have at least one executable statement}} {{9-9= break}}
 }
 
-switch x { // expected-error {{switch must be exhaustive, consider adding a default clause:}}
+switch x { // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause?}}
 case 0:
   ; // expected-error {{';' statements are not allowed}} {{3-5=}}
 case 1:
@@ -142,22 +142,22 @@
   x = 0
 }
 
-switch x { // expected-error {{switch must be exhaustive, consider adding a default clause:}}
+switch x { // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause?}}
 default where x == 0: // expected-error{{'default' cannot be used with a 'where' guard expression}}
   x = 0
 }
 
-switch x { // expected-error {{switch must be exhaustive, consider adding a default clause:}}
+switch x { // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause?}}
 case 0: // expected-error {{'case' label in a 'switch' should have at least one executable statement}} {{8-8= break}}
 }
 
-switch x { // expected-error {{switch must be exhaustive, consider adding a default clause:}}
+switch x { // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause?}}
 case 0: // expected-error{{'case' label in a 'switch' should have at least one executable statement}} {{8-8= break}}
 case 1:
   x = 0
 }
 
-switch x { // expected-error {{switch must be exhaustive, consider adding a default clause:}}
+switch x { // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause?}}
 case 0:
   x = 0
 case 1: // expected-error{{'case' label in a 'switch' should have at least one executable statement}} {{8-8= break}}
@@ -260,7 +260,7 @@
 }
 
 func test_label(x : Int) {
-Gronk: // expected-error {{switch must be exhaustive, consider adding a default clause:}}
+Gronk: // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause?}}
   switch x {
   case 42: return
   }
diff --git a/test/Parse/switch_incomplete.swift b/test/Parse/switch_incomplete.swift
index 3f5844b..db2d774 100644
--- a/test/Parse/switch_incomplete.swift
+++ b/test/Parse/switch_incomplete.swift
@@ -2,6 +2,6 @@
 
 // <rdar://problem/15971438> Incomplete switch was parsing to an AST that
 // triggered an assertion failure.
-// expected-error@+1 {{switch must be exhaustive, consider adding a default clause:}}
+// expected-error@+1 {{switch must be exhaustive}} expected-note@+1{{do you want to add a default clause?}}
 switch 1 { // expected-note{{to match this opening '{'}}
 case 1:    // expected-error@+1{{expected '}' at end of 'switch' statement}}
diff --git a/test/Prototypes/UnicodeDecoders.swift b/test/Prototypes/UnicodeDecoders.swift
index e993eea..f08f628 100644
--- a/test/Prototypes/UnicodeDecoders.swift
+++ b/test/Prototypes/UnicodeDecoders.swift
@@ -51,13 +51,13 @@
 
 extension _Unicode.DefaultScalarView : Sequence {
   struct Iterator {
-    var parsing: _Unicode.ParsingIterator<
+    var parsing: _Unicode._ParsingIterator<
       CodeUnits.Iterator, Encoding.ForwardParser>
   }
   
   func makeIterator() -> Iterator {
     return Iterator(
-      parsing: _Unicode.ParsingIterator(
+      parsing: _Unicode._ParsingIterator(
         codeUnits: codeUnits.makeIterator(),
         parser: Encoding.ForwardParser()
       ))
@@ -137,7 +137,7 @@
         codeUnitIndex: nextPosition,
         scalar: Encoding.decode(scalarContent),
         stride: numericCast(scalarContent.count))
-    case .invalid(let stride):
+    case .error(let stride):
       return Index(
         codeUnitIndex: nextPosition,
         scalar: UnicodeScalar(_unchecked: 0xfffd),
@@ -148,37 +148,6 @@
   }
 }
 
-/// An iterator that can be much faster than the iterator of a reversed slice.
-// TODO: See about using this in more places
-@_fixed_layout
-public struct _ReverseIndexingIterator<
-  Elements : BidirectionalCollection
-> : IteratorProtocol, Sequence {
-
-  @_inlineable
-  @inline(__always)
-  /// Creates an iterator over the given collection.
-  public /// @testable
-  init(_elements: Elements, _position: Elements.Index) {
-    self._elements = _elements
-    self._position = _position
-  }
-  
-  @_inlineable
-  @inline(__always)
-  public mutating func next() -> Elements._Element? {
-    guard _fastPath(_position != _elements.startIndex) else { return nil }
-    _position = _elements.index(before: _position)
-    return _elements[_position]
-  }
-  
-  @_versioned
-  internal let _elements: Elements
-  @_versioned
-  internal var _position: Elements.Index
-}
-
-
 extension _Unicode.DefaultScalarView : BidirectionalCollection {
   @inline(__always)
   public func index(before i: Index) -> Index {
@@ -194,7 +163,7 @@
         codeUnitIndex: codeUnits.index(i.codeUnitIndex, offsetBy: d),
         scalar: Encoding.decode(scalarContent),
         stride: numericCast(scalarContent.count))
-    case .invalid(let stride):
+    case .error(let stride):
       let d: CodeUnits.IndexDistance = -numericCast(stride)
       return Index(
         codeUnitIndex: codeUnits.index(i.codeUnitIndex, offsetBy: d) ,
@@ -210,9 +179,48 @@
 import StdlibUnittest
 import SwiftPrivate
 
+func utf32<S : StringProtocol>(_ s: S) -> [UInt32] {
+  return s.unicodeScalars.map { $0.value }
+}
+
+func checkStringProtocol<S : StringProtocol, Encoding: UnicodeEncoding>(
+  _ s: S,
+  _ utfStr: [Encoding.CodeUnit],
+  encodedAs: Encoding.Type,
+  expectingUTF32 expected: [UInt32]
+) {
+  expectEqualSequence(
+    expected, utf32(S(decoding: utfStr, as: Encoding.self)),
+    "\(S.self) init(decoding:as:)")
+
+  if !utfStr.contains(0) {
+    if Encoding.self == UTF8.self {
+      var ntbs = utfStr.map { CChar(extendingOrTruncating: $0) }
+      ntbs.append(0)
+      expectEqualSequence(
+        expected, utf32(S(cString: ntbs)), "\(S.self) init(cString:)")
+    }
+    
+    var ntbs = Array(utfStr); ntbs.append(0)
+    expectEqualSequence(
+      expected, utf32(S(decodingCString: ntbs, as: Encoding.self)),
+      "\(S.self) init(cString:encoding:)"
+    )
+
+    s.withCString {
+      expectEqual(s, S(cString: $0), "\(S.self) withCString(_:)")
+    }
+    
+    s.withCString(encodedAs: Encoding.self) {
+      expectEqual(s, S(decodingCString: $0, as: Encoding.self),
+        "\(S.self) withCString(encoding:_:)")
+    }
+  }
+}
+
 func checkDecodeUTF<Codec : UnicodeCodec & UnicodeEncoding>(
-    _ codec: Codec.Type, _ expectedHead: [UInt32],
-    _ expectedRepairedTail: [UInt32], _ utfStr: [Codec.CodeUnit]
+  _ codec: Codec.Type, _ expectedHead: [UInt32],
+  _ expectedRepairedTail: [UInt32], _ utfStr: [Codec.CodeUnit]
 ) -> AssertionResult {
   var decoded = [UInt32]()
   var expected = expectedHead
@@ -221,12 +229,12 @@
     decoded.append(scalar)
     expectEqual(
       UnicodeScalar(scalar),
-      Codec.decode(Codec.encode(UnicodeScalar(scalar)!)))
+      Codec.decode(Codec.encode(UnicodeScalar(scalar)!)!))
   }
   
   func output1(_ scalar: UnicodeScalar) {
     decoded.append(scalar.value)
-    expectEqual(scalar, Codec.decode(Codec.encode(scalar)))
+    expectEqual(scalar, Codec.decode(Codec.encode(scalar)!))
   }
   
   var result = assertionSuccess()
@@ -254,7 +262,7 @@
 
   do {
     var iterator = utfStr.makeIterator()
-    let errorCount = Codec.ForwardParser.decode(
+    let errorCount = Codec.ForwardParser._decode(
       &iterator, repairingIllFormedSequences: false, into: output1)
     expectEqual(expectedRepairedTail.isEmpty ? 0 : 1, errorCount)
   }
@@ -262,7 +270,7 @@
 
   do {
     var iterator = utfStr.reversed().makeIterator()
-    let errorCount = Codec.ReverseParser.decode(
+    let errorCount = Codec.ReverseParser._decode(
       &iterator, repairingIllFormedSequences: false, into: output1)
     if expectedRepairedTail.isEmpty {
       expectEqual(0, errorCount)
@@ -288,7 +296,7 @@
   check(expected, "legacy, repairing: true")
   do {
     var iterator = utfStr.makeIterator()
-    let errorCount = Codec.ForwardParser.decode(
+    let errorCount = Codec.ForwardParser._decode(
       &iterator, repairingIllFormedSequences: true, into: output1)
     
     if expectedRepairedTail.isEmpty { expectEqual(0, errorCount) }
@@ -297,13 +305,49 @@
   check(expected, "forward, repairing: true")
   do {
     var iterator = utfStr.reversed().makeIterator()
-    let errorCount = Codec.ReverseParser.decode(
+    let errorCount = Codec.ReverseParser._decode(
       &iterator, repairingIllFormedSequences: true, into: output1)
     if expectedRepairedTail.isEmpty { expectEqual(0, errorCount) }
     else { expectNotEqual(0, errorCount) }
   }
   check(expected.reversed(), "reverse, repairing: true")
+  
+  //===--- String/Substring Construction and C-String interop -------------===//
+  do {
+    let s = String(decoding: utfStr, as: Codec.self)
+    checkStringProtocol(
+      s, utfStr, encodedAs: Codec.self, expectingUTF32: expected)
+  }
+  
+  do {
+    let s0 = "\n" + String(decoding: utfStr, as: Codec.self) + "\n"
+    let s = s0.dropFirst().dropLast()
+    expectEqualSequence(expected, utf32(s), "Sliced Substring")
+    checkStringProtocol(
+      s0.dropFirst().dropLast(),
+      utfStr, encodedAs: Codec.self, expectingUTF32: expected)
+  }
 
+  //===--- Transcoded Scalars ---------------------------------------------===//
+  for x in decoded.lazy.map({ UnicodeScalar($0)! }) {
+    expectEqualSequence(
+      UTF8.encode(x)!,
+      UTF8.transcode(
+        Codec.encode(x)!, from: Codec.self)!
+    )
+    expectEqualSequence(
+      UTF16.encode(x)!,
+      UTF16.transcode(
+        Codec.encode(x)!, from: Codec.self)!
+    )
+    expectEqualSequence(
+      UTF32.encode(x)!,
+      UTF32.transcode(
+        Codec.encode(x)!, from: Codec.self)!
+    )
+  }
+  
+  //===--- Scalar View ----------------------------------------------------===//
   let scalars = _Unicode.DefaultScalarView(utfStr, fromEncoding: Codec.self)
   expectEqualSequence(expected, scalars.map { $0.value })
   expectEqualSequence(
@@ -319,6 +363,7 @@
     }
     expectNil(x.next())
   }
+
   return result
 }
 
@@ -337,7 +382,6 @@
       utf16Str)
 }
 
-/*
 func checkDecodeUTF32(
     _ expectedHead: [UInt32],
     _ expectedRepairedTail: [UInt32], _ utf32Str: [UInt32]
@@ -345,7 +389,6 @@
   return checkDecodeUTF(UTF32.self, expectedHead, expectedRepairedTail,
       utf32Str)
 }
-*/
 
 func checkEncodeUTF8(_ expected: [UInt8],
                      _ scalars: [UInt32]) -> AssertionResult {
@@ -369,6 +412,147 @@
   return assertionSuccess()
 }
 
+//===----------------------------------------------------------------------===//
+
+var UTF32Decoder = TestSuite("UTF32Decoder")
+
+UTF32Decoder.test("Empty") {
+  expectTrue(checkDecodeUTF32([], [], []))
+}
+
+UTF32Decoder.test("SmokeTest") {
+  // U+0041 LATIN CAPITAL LETTER A
+  expectTrue(checkDecodeUTF32([ 0x0041 ], [], [ 0x0000_0041 ]))
+
+  // U+0041 LATIN CAPITAL LETTER A
+  // U+0042 LATIN CAPITAL LETTER B
+  expectTrue(checkDecodeUTF32(
+      [ 0x0041, 0x0042 ], [],
+      [ 0x0000_0041, 0x0000_0042 ]))
+
+  // U+0000 NULL
+  // U+0041 LATIN CAPITAL LETTER A
+  // U+0042 LATIN CAPITAL LETTER B
+  // U+0000 NULL
+  expectTrue(checkDecodeUTF32(
+      [ 0x0000, 0x0041, 0x0042, 0x0000 ], [],
+      [ 0x0000_0000, 0x0000_0041, 0x0000_0042, 0x0000_0000 ]))
+
+  // U+0283 LATIN SMALL LETTER ESH
+  expectTrue(checkDecodeUTF32([ 0x0283 ], [], [ 0x0000_0283 ]))
+
+  // U+03BA GREEK SMALL LETTER KAPPA
+  // U+1F79 GREEK SMALL LETTER OMICRON WITH OXIA
+  // U+03C3 GREEK SMALL LETTER SIGMA
+  // U+03BC GREEK SMALL LETTER MU
+  // U+03B5 GREEK SMALL LETTER EPSILON
+  expectTrue(checkDecodeUTF32(
+      [ 0x03ba, 0x1f79, 0x03c3, 0x03bc, 0x03b5 ], [],
+      [ 0x0000_03ba, 0x0000_1f79, 0x0000_03c3, 0x0000_03bc, 0x0000_03b5 ]))
+
+  // U+4F8B CJK UNIFIED IDEOGRAPH-4F8B
+  // U+6587 CJK UNIFIED IDEOGRAPH-6587
+  expectTrue(checkDecodeUTF32(
+      [ 0x4f8b, 0x6587 ], [],
+      [ 0x0000_4f8b, 0x0000_6587 ]))
+
+  // U+D55C HANGUL SYLLABLE HAN
+  // U+AE00 HANGUL SYLLABLE GEUL
+  expectTrue(checkDecodeUTF32(
+      [ 0xd55c, 0xae00 ], [],
+      [ 0x0000_d55c, 0x0000_ae00 ]))
+
+  // U+1112 HANGUL CHOSEONG HIEUH
+  // U+1161 HANGUL JUNGSEONG A
+  // U+11AB HANGUL JONGSEONG NIEUN
+  // U+1100 HANGUL CHOSEONG KIYEOK
+  // U+1173 HANGUL JUNGSEONG EU
+  // U+11AF HANGUL JONGSEONG RIEUL
+  expectTrue(checkDecodeUTF32(
+      [ 0x1112, 0x1161, 0x11ab, 0x1100, 0x1173, 0x11af ], [],
+      [ 0x0000_1112, 0x0000_1161, 0x0000_11ab, 0x0000_1100, 0x0000_1173,
+        0x0000_11af ]))
+
+  // U+D7FF (unassigned)
+  expectTrue(checkDecodeUTF16([ 0xd7ff ], [], [ 0x0000_d7ff ]))
+
+  // U+E000 (private use)
+  expectTrue(checkDecodeUTF16([ 0xe000 ], [], [ 0x0000_e000 ]))
+
+  // U+FFFD REPLACEMENT CHARACTER
+  expectTrue(checkDecodeUTF16([ 0xfffd ], [], [ 0x0000_fffd ]))
+
+  // U+FFFF (noncharacter)
+  expectTrue(checkDecodeUTF16([ 0xffff ], [], [ 0x0000_ffff ]))
+
+  // U+10000 LINEAR B SYLLABLE B008 A
+  expectTrue(checkDecodeUTF32([ 0x00010000 ], [], [ 0x0001_0000 ]))
+
+  // U+10100 AEGEAN WORD SEPARATOR LINE
+  expectTrue(checkDecodeUTF32([ 0x00010100 ], [], [ 0x0001_0100 ]))
+
+  // U+103FF (unassigned)
+  expectTrue(checkDecodeUTF32([ 0x000103ff ], [], [ 0x0001_03ff ]))
+
+  // U+1D800 (unassigned)
+  expectTrue(checkDecodeUTF32([ 0x0001d800 ], [], [ 0x0001_d800 ]))
+
+
+  // U+E0000 (unassigned)
+  expectTrue(checkDecodeUTF32([ 0x000e0000 ], [], [ 0x000e_0000 ]))
+
+  // U+E0100 VARIATION SELECTOR-17
+  expectTrue(checkDecodeUTF32([ 0x000e0100 ], [], [ 0x000e_0100 ]))
+
+  // U+E03FF (unassigned)
+  expectTrue(checkDecodeUTF32([ 0x000e03ff ], [], [ 0x000e_03ff ]))
+
+
+  // U+10FC00 (private use)
+  expectTrue(checkDecodeUTF32([ 0x0010fc00 ], [], [ 0x0010_fc00 ]))
+
+  // U+10FD00 (private use)
+  expectTrue(checkDecodeUTF32([ 0x0010fd00 ], [], [ 0x0010_fd00 ]))
+
+  // U+10FFFF (private use, noncharacter)
+  expectTrue(checkDecodeUTF32([ 0x0010ffff ], [], [ 0x0010_ffff ]))
+}
+
+UTF32Decoder.test("IllFormed") {
+  // U+D800 (high-surrogate)
+  expectTrue(checkDecodeUTF32([], [ 0xfffd ], [ 0x0000_d800 ]))
+
+  // U+DB40 (high-surrogate)
+  expectTrue(checkDecodeUTF32([], [ 0xfffd ], [ 0x0000_db40 ]))
+
+  // U+DBFF (high-surrogate)
+  expectTrue(checkDecodeUTF32([], [ 0xfffd ], [ 0x0000_dbff ]))
+
+  // U+DC00 (low-surrogate)
+  expectTrue(checkDecodeUTF32([], [ 0xfffd ], [ 0x0000_dc00 ]))
+
+  // U+DD00 (low-surrogate)
+  expectTrue(checkDecodeUTF32([], [ 0xfffd ], [ 0x0000_dd00 ]))
+
+  // U+DFFF (low-surrogate)
+  expectTrue(checkDecodeUTF32([], [ 0xfffd ], [ 0x0000_dfff ]))
+
+  // U+110000 (invalid)
+  expectTrue(checkDecodeUTF32([], [ 0xfffd ], [ 0x0011_0000 ]))
+
+  // U+1000000 (invalid)
+  expectTrue(checkDecodeUTF32([], [ 0xfffd ], [ 0x0100_0000 ]))
+
+  // U+80000000 (invalid)
+  expectTrue(checkDecodeUTF32([], [ 0xfffd ], [ 0x8000_0000 ]))
+
+  // U+FFFF0000 (invalid)
+  expectTrue(checkDecodeUTF32([], [ 0xfffd ], [ 0xffff_0000 ]))
+
+  // U+FFFFFFFF (invalid)
+  expectTrue(checkDecodeUTF32([], [ 0xfffd ], [ 0xffff_ffff ]))
+}
+
 var UTF8Decoder = TestSuite("UTF8Decoder")
 
 //===----------------------------------------------------------------------===//
diff --git a/test/Reflection/Inputs/Protocols.swift b/test/Reflection/Inputs/Protocols.swift
index 4b377b6..123e2a8 100644
--- a/test/Reflection/Inputs/Protocols.swift
+++ b/test/Reflection/Inputs/Protocols.swift
@@ -19,3 +19,9 @@
 public protocol ClassBoundP: class {
   associatedtype Inner
 }
+
+fileprivate protocol FileprivateProtocol {}
+
+public struct HasFileprivateProtocol {
+  fileprivate let x: FileprivateProtocol
+}
diff --git a/test/Reflection/Inputs/TypeLowering.swift b/test/Reflection/Inputs/TypeLowering.swift
index d0b0404..c11b257 100644
--- a/test/Reflection/Inputs/TypeLowering.swift
+++ b/test/Reflection/Inputs/TypeLowering.swift
@@ -113,6 +113,8 @@
   
   public weak var weakAnyObject: AnyObject?
   public weak var weakAnyClassBoundProto: CP1?
+
+  public let classConstrainedP1: C & P1
 }
 
 public struct MetadataHolder<T, U> {
diff --git a/test/Reflection/capture_descriptors.sil b/test/Reflection/capture_descriptors.sil
index 67cd712..762d481 100644
--- a/test/Reflection/capture_descriptors.sil
+++ b/test/Reflection/capture_descriptors.sil
@@ -207,8 +207,8 @@
 }
 
 // CHECK:      - Capture types:
-// CHECK-NEXT:   (protocol Swift.AnyObject)
-// CHECK-NEXT:   (protocol Swift.AnyObject)
+// CHECK-NEXT:   (protocol_composition any_object)
+// CHECK-NEXT:   (protocol_composition any_object)
 // CHECK-NEXT: - Metadata sources:
 
 
diff --git a/test/Reflection/typeref_decoding.swift b/test/Reflection/typeref_decoding.swift
index 8246fb6..601a580 100644
--- a/test/Reflection/typeref_decoding.swift
+++ b/test/Reflection/typeref_decoding.swift
@@ -579,6 +579,14 @@
 // CHECK: TypesToReflect.ClassBoundP
 // CHECK: --------------------------
 
+// CHECK: TypesToReflect.(FileprivateProtocol in _{{[0-9A-F]+}})
+// CHECK: -------------------------------------------------------------------------
+
+// CHECK: TypesToReflect.HasFileprivateProtocol
+// CHECK: -------------------------------------
+// CHECK: x: TypesToReflect.(FileprivateProtocol in _{{[0-9A-F]+}})
+// CHECK: (protocol TypesToReflect.(FileprivateProtocol in _{{[0-9A-F]+}}))
+
 // CHECK: ASSOCIATED TYPES:
 // CHECK: =================
 // CHECK: - TypesToReflect.C1 : TypesToReflect.ClassBoundP
diff --git a/test/Reflection/typeref_decoding_objc.swift b/test/Reflection/typeref_decoding_objc.swift
index 10b826a..58bf6ce 100644
--- a/test/Reflection/typeref_decoding_objc.swift
+++ b/test/Reflection/typeref_decoding_objc.swift
@@ -10,34 +10,34 @@
 // CHECK: =======
 // CHECK: TypesToReflect.OC
 // CHECK: -----------------
-// CHECK: nsObject: __C.NSObject
-// CHECK: (class __C.NSObject)
+// CHECK: nsObject: __ObjC.NSObject
+// CHECK: (class __ObjC.NSObject)
 
-// CHECK: nsString: __C.NSString
-// CHECK: (class __C.NSString)
+// CHECK: nsString: __ObjC.NSString
+// CHECK: (class __ObjC.NSString)
 
-// CHECK: cfString: __C.CFString
-// CHECK: (class __C.CFString)
+// CHECK: cfString: __ObjC.CFString
+// CHECK: (class __ObjC.CFString)
 
 // CHECK: aBlock: @convention(block) () -> ()
 // CHECK: (function convention=block
 // CHECK:   (tuple))
 
-// CHECK: ocnss: TypesToReflect.GenericOC<__C.NSString>
+// CHECK: ocnss: TypesToReflect.GenericOC<__ObjC.NSString>
 // CHECK: (bound_generic_class TypesToReflect.GenericOC
-// CHECK:   (class __C.NSString))
+// CHECK:   (class __ObjC.NSString))
 
-// CHECK: occfs: TypesToReflect.GenericOC<__C.CFString>
+// CHECK: occfs: TypesToReflect.GenericOC<__ObjC.CFString>
 // CHECK: (bound_generic_class TypesToReflect.GenericOC
-// CHECK:   (class __C.CFString))
+// CHECK:   (class __ObjC.CFString))
 
 // CHECK: TypesToReflect.GenericOC
 // CHECK: ------------------------
 
 // CHECK: TypesToReflect.HasObjCClasses
 // CHECK: -----------------------------
-// CHECK: url: __C.NSURL
-// CHECK: (class __C.NSURL)
+// CHECK: url: __ObjC.NSURL
+// CHECK: (class __ObjC.NSURL)
 
 // CHECK: integer: Swift.Int
 // CHECK: (struct Swift.Int)
@@ -48,12 +48,12 @@
 // CHECK: TypesToReflect.OP
 // CHECK: -----------------
 
-// CHECK: __C.Bundle
-// CHECK: ----------
-// CHECK: __C.NSURL
-// CHECK: ---------
-// CHECK: __C.NSCoding
+// CHECK: __ObjC.Bundle
+// CHECK: ---------------
+// CHECK: __ObjC.NSURL
 // CHECK: ------------
+// CHECK: __ObjC.NSCoding
+// CHECK: ---------------
 
 // CHECK: ASSOCIATED TYPES:
 // CHECK: =================
@@ -77,6 +77,6 @@
 // CHECK-NEXT: ====================
 
 // CHECK:      - Capture types:
-// CHECK-NEXT: (class __C.Bundle)
-// CHECK-NEXT: (protocol __C.NSCoding)
+// CHECK-NEXT: (class __ObjC.Bundle)
+// CHECK-NEXT: (protocol __ObjC.NSCoding)
 // CHECK-NEXT: - Metadata sources:
diff --git a/test/Reflection/typeref_lowering.swift b/test/Reflection/typeref_lowering.swift
index e384c60..779134c 100644
--- a/test/Reflection/typeref_lowering.swift
+++ b/test/Reflection/typeref_lowering.swift
@@ -514,7 +514,7 @@
 
 12TypeLowering17ExistentialStructV
 // CHECK-64:      (struct TypeLowering.ExistentialStruct)
-// CHECK-64-NEXT: (struct size=448 alignment=8 stride=448 num_extra_inhabitants=0
+// CHECK-64-NEXT: (struct size=464 alignment=8 stride=464 num_extra_inhabitants=0
 // CHECK-64-NEXT:   (field name=any offset=0
 // CHECK-64-NEXT:     (opaque_existential size=32 alignment=8 stride=32 num_extra_inhabitants=0
 // CHECK-64-NEXT:       (field name=metadata offset=24
@@ -636,10 +636,16 @@
 // CHECK-64-NEXT:       (field name=object offset=0
 // CHECK-64-NEXT:         (reference kind=weak refcounting=unknown))
 // CHECK-64-NEXT:       (field name=wtable offset=8
+// CHECK-64-NEXT:         (builtin size=8 alignment=8 stride=8 num_extra_inhabitants=1))))
+// CHECK-64-NEXT:   (field name=classConstrainedP1 offset=448
+// CHECK-64-NEXT:     (class_existential size=16 alignment=8 stride=16 num_extra_inhabitants=[[PTR_XI]]
+// CHECK-64-NEXT:       (field name=object offset=0
+// CHECK-64-NEXT:         (reference kind=strong refcounting=native))
+// CHECK-64-NEXT:       (field name=wtable offset=8
 // CHECK-64-NEXT:         (builtin size=8 alignment=8 stride=8 num_extra_inhabitants=1)))))
 
 // CHECK-32: (struct TypeLowering.ExistentialStruct)
-// CHECK-32-NEXT: (struct size=224 alignment=4 stride=224 num_extra_inhabitants=0
+// CHECK-32-NEXT: (struct size=232 alignment=4 stride=232 num_extra_inhabitants=0
 // CHECK-32-NEXT:   (field name=any offset=0
 // CHECK-32-NEXT:     (opaque_existential size=16 alignment=4 stride=16 num_extra_inhabitants=0
 // CHECK-32-NEXT:       (field name=metadata offset=12
@@ -761,6 +767,12 @@
 // CHECK-32-NEXT:       (field name=object offset=0
 // CHECK-32-NEXT:         (reference kind=weak refcounting=unknown))
 // CHECK-32-NEXT:       (field name=wtable offset=4
+// CHECK-32-NEXT:         (builtin size=4 alignment=4 stride=4 num_extra_inhabitants=1))))
+// CHECK-32-NEXT:   (field name=classConstrainedP1 offset=224
+// CHECK-32-NEXT:     (class_existential size=8 alignment=4 stride=8 num_extra_inhabitants=4096
+// CHECK-32-NEXT:       (field name=object offset=0
+// CHECK-32-NEXT:         (reference kind=strong refcounting=native))
+// CHECK-32-NEXT:       (field name=wtable offset=4
 // CHECK-32-NEXT:         (builtin size=4 alignment=4 stride=4 num_extra_inhabitants=1)))))
 
 12TypeLowering14MetatypeStructV
diff --git a/test/Runtime/backtrace.swift b/test/Runtime/crash_with_backtrace.swift
similarity index 77%
rename from test/Runtime/backtrace.swift
rename to test/Runtime/crash_with_backtrace.swift
index a5a516c..be01e57 100644
--- a/test/Runtime/backtrace.swift
+++ b/test/Runtime/crash_with_backtrace.swift
@@ -8,12 +8,16 @@
 // UNSUPPORTED: OS=ios
 // UNSUPPORTED: OS=tvos
 
+// REQUIRES: runtime-dladdr-backtraces
 // REQUIRES: executable_test
 
 // Backtraces are not emitted when optimizations are enabled. This test can not
 // run when optimizations are enabled.
 // REQUIRES: swift_test_mode_optimize_none
 
+// This file just causes a crash in the runtime to check whether or not a stack
+// trace is produced from the runtime.
+
 func main() {
   let x = UnsafePointer<Int>(bitPattern: 0)!
   print("\(x.pointee)")
diff --git a/test/Runtime/crash_without_backtrace.swift b/test/Runtime/crash_without_backtrace.swift
new file mode 100644
index 0000000..7b08fb0
--- /dev/null
+++ b/test/Runtime/crash_without_backtrace.swift
@@ -0,0 +1,22 @@
+// RUN: rm -rf %t
+// RUN: mkdir %t
+// RUN: %target-build-swift %s -o %t/out
+// RUN: not --crash %t/out 2>&1 | %FileCheck %s
+
+// UNSUPPORTED: OS=watchos
+// UNSUPPORTED: OS=ios
+// UNSUPPORTED: OS=tvos
+// UNSUPPORTED: runtime-dladdr-backtraces
+
+// This file just causes a crash in the runtime to check whether or not a stack
+// trace is produced from the runtime.
+
+// CHECK-NOT: Current stack trace:
+
+import Swift
+
+func foo() -> Int {
+  return UnsafePointer<Int>(bitPattern: 0)!.pointee
+}
+
+foo()
diff --git a/test/Runtime/crash_without_backtrace_optimized.swift b/test/Runtime/crash_without_backtrace_optimized.swift
new file mode 100644
index 0000000..3c78570
--- /dev/null
+++ b/test/Runtime/crash_without_backtrace_optimized.swift
@@ -0,0 +1,24 @@
+// RUN: rm -rf %t
+// RUN: mkdir %t
+// RUN: %target-build-swift -O %s -o %t/out
+// RUN: not --crash %t/out 2>&1 | %FileCheck %s
+
+// UNSUPPORTED: OS=watchos
+// UNSUPPORTED: OS=ios
+// UNSUPPORTED: OS=tvos
+
+// This file just causes a crash in the runtime to check whether or not a stack
+// trace is produced from the runtime.
+//
+// It checks that no matter what when we compile with optimization, we do not
+// emit backtraces.
+
+// CHECK-NOT: Current stack trace:
+
+import Swift
+
+func foo() -> Int {
+  return UnsafePointer<Int>(bitPattern: 0)!.pointee
+}
+
+foo()
diff --git a/test/Runtime/linux-fatal-backtrace.swift b/test/Runtime/linux-fatal-backtrace.swift
index 03eaced..f4c7954 100644
--- a/test/Runtime/linux-fatal-backtrace.swift
+++ b/test/Runtime/linux-fatal-backtrace.swift
@@ -5,6 +5,7 @@
 // REQUIRES: executable_test
 // REQUIRES: OS=linux-gnu
 // REQUIRES: lldb
+// REQUIRES: runtime-dladdr-backtraces
 
 // Backtraces are not emitted when optimizations are enabled. This test can not
 // run when optimizations are enabled.
diff --git a/test/SIL/Serialization/keypath.sil b/test/SIL/Serialization/keypath.sil
new file mode 100644
index 0000000..f2c1b0c
--- /dev/null
+++ b/test/SIL/Serialization/keypath.sil
@@ -0,0 +1,107 @@
+// First parse this and then emit a *.sib. Then read in the *.sib, then recreate
+// RUN: rm -rfv %t
+// RUN: mkdir %t
+// RUN: %target-sil-opt %s -emit-sib -o %t/tmp.sib -module-name boxes
+// RUN: %target-sil-opt %t/tmp.sib -o %t/tmp.2.sib -module-name boxes
+// RUN: %target-sil-opt %t/tmp.2.sib -module-name boxes | %FileCheck %s
+
+sil_stage canonical
+
+import Swift
+
+struct S {
+  var x: Int
+  let y: String
+  var z: C
+}
+class C {
+  final var x: Int
+  final let y: String
+  final var z: S
+
+  init()
+  var overridable: Int {
+    get set
+  }
+}
+
+protocol P {}
+protocol Q {}
+protocol R {}
+
+struct Gen<A: P, B: Q, C: R> {
+  var x: A
+  let y: B
+  var z: C
+}
+
+// CHECK-LABEL: sil shared @stored_properties
+sil shared @stored_properties : $@convention(thin) () -> () {
+entry:
+  // CHECK: keypath $WritableKeyPath<S, Int>, (root $S; stored_property #S.x : $Int)
+  %a = keypath $WritableKeyPath<S, Int>, (root $S; stored_property #S.x : $Int)
+  // CHECK: keypath $ReferenceWritableKeyPath<C, Int>, (root $C; stored_property #C.x : $Int)
+  %b = keypath $ReferenceWritableKeyPath<C, Int>, (root $C; stored_property #C.x : $Int)
+  // CHECK: keypath $KeyPath<S, String>, (root $S; stored_property #S.y : $String)
+  %c = keypath $KeyPath<S, String>, (root $S; stored_property #S.y : $String)
+  // CHECK: keypath $ReferenceWritableKeyPath<S, Int>, (root $S; stored_property #S.z : $C; stored_property #C.x : $Int)
+  %d = keypath $ReferenceWritableKeyPath<S, Int>, (root $S; stored_property #S.z : $C; stored_property #C.x : $Int)
+
+  return undef : $()
+}
+
+// CHECK-LABEL: sil shared @stored_properties_generic
+sil shared @stored_properties_generic : $@convention(thin) <D: P, E: Q, F: R> () -> () {
+entry:
+  // CHECK: keypath $WritableKeyPath<Gen<D, E, F>, D>, <τ_0_0, τ_0_1, τ_0_2 where {{.*}}> (root $Gen<τ_0_0, τ_0_1, τ_0_2>; stored_property #Gen.x : $τ_0_0) <D, E, F>
+  %a = keypath $WritableKeyPath<Gen<D,E,F>, D>, <G: P, H: Q, I: R> (root $Gen<G, H, I>; stored_property #Gen.x : $G) <D, E, F>
+  // CHECK: keypath $KeyPath<Gen<D, E, F>, E>, <τ_0_0, τ_0_1, τ_0_2 where {{.*}}> (root $Gen<τ_0_0, τ_0_1, τ_0_2>; stored_property #Gen.y : $τ_0_1) <D, E, F>
+  %b = keypath $KeyPath<Gen<D,E,F>, E>, <G: P, H: Q, I: R> (root $Gen<G, H, I>; stored_property #Gen.y : $H) <D, E, F>
+
+  return undef : $()
+}
+
+sil @id_a : $@convention(thin) () -> ()
+sil @get_s_int : $@convention(thin) (@in S, @thick S.Type) -> @out Int
+sil @set_s_int : $@convention(thin) (@in Int, @in S, @thick S.Type) -> ()
+sil @get_c_int : $@convention(thin) (@in C, @thick C.Type) -> @out Int
+sil @set_c_int : $@convention(thin) (@in Int, @in C, @thick C.Type) -> ()
+sil @get_fns_fnc : $@convention(thin) (@in @callee_owned (@in S) -> @out S, @thick ((S) -> S).Type) -> @out @callee_owned (@in C) -> @out C
+sil @set_fns_fnc : $@convention(thin) (@in @callee_owned (@in C) -> @out C, @in @callee_owned (@in S) -> @out S, @thick ((S) -> S).Type) -> ()
+
+// CHECK-LABEL: sil shared @computed_properties
+sil shared @computed_properties : $@convention(thin) () -> () {
+entry:
+  // CHECK: keypath $KeyPath<S, Int>, (root $S; gettable_property $Int, id @id_a : $@convention(thin) () -> (), getter @get_s_int : $@convention(thin) (@in S, @thick S.Type) -> @out Int)
+  %a = keypath $KeyPath<S, Int>, (root $S; gettable_property $Int, id @id_a : $@convention(thin) () -> (), getter @get_s_int : $@convention(thin) (@in S, @thick S.Type) -> @out Int)
+  // CHECK: keypath $WritableKeyPath<S, Int>, (root $S; settable_property $Int, id @id_a : $@convention(thin) () -> (), getter @get_s_int : $@convention(thin) (@in S, @thick S.Type) -> @out Int, setter @set_s_int : $@convention(thin) (@in Int, @in S, @thick S.Type) -> ())
+  %b = keypath $WritableKeyPath<S, Int>, (root $S; settable_property $Int, id @id_a : $@convention(thin) () -> (), getter @get_s_int : $@convention(thin) (@in S, @thick S.Type) -> @out Int, setter @set_s_int : $@convention(thin) (@in Int, @in S, @thick S.Type) -> ())
+  // CHECK: keypath $WritableKeyPath<(S) -> S, (C) -> C>, (root $(S) -> S; settable_property $(C) -> C, id @id_a : $@convention(thin) () -> (), getter @get_fns_fnc : $@convention(thin) (@in @callee_owned (@in S) -> @out S, @thick ((S) -> S).Type) -> @out @callee_owned (@in C) -> @out C, setter @set_fns_fnc : $@convention(thin) (@in @callee_owned (@in C) -> @out C, @in @callee_owned (@in S) -> @out S, @thick ((S) -> S).Type) -> ())
+  %c = keypath $WritableKeyPath<(S) -> S, (C) -> C>, (root $(S) -> S; settable_property $(C) -> C, id @id_a : $@convention(thin) () -> (), getter @get_fns_fnc : $@convention(thin) (@in @callee_owned (@in S) -> @out S, @thick ((S) -> S).Type) -> @out @callee_owned (@in C) -> @out C, setter @set_fns_fnc : $@convention(thin) (@in @callee_owned (@in C) -> @out C, @in @callee_owned (@in S) -> @out S, @thick ((S) -> S).Type) -> ())
+  // CHECK: keypath $WritableKeyPath<C, Int>, (root $C; settable_property $Int, id #C.overridable!getter.1 : (C) -> () -> Int, getter @get_c_int : $@convention(thin) (@in C, @thick C.Type) -> @out Int, setter @set_c_int : $@convention(thin) (@in Int, @in C, @thick C.Type) -> ())
+  %d = keypath $WritableKeyPath<C, Int>, (root $C; settable_property $Int, id #C.overridable!getter.1 : (C) -> () -> Int, getter @get_c_int : $@convention(thin) (@in C, @thick C.Type) -> @out Int, setter @set_c_int : $@convention(thin) (@in Int, @in C, @thick C.Type) -> ())
+
+  return undef : $()
+}
+
+sil @get_gen_a : $@convention(thin) <X1: P, Y1: Q, Z1: R> (@in Gen<X1, Y1, Z1>) -> @out X1
+sil @set_gen_a : $@convention(thin) <X2: P, Y2: Q, Z2: R> (@in X2, @in Gen<X2, Y2, Z2>) -> ()
+
+// CHECK-LABEL: sil shared @computed_properties_generic
+sil shared @computed_properties_generic : $@convention(thin) <D: P, E: Q, F: R> () -> () {
+entry:
+  // CHECK: keypath $KeyPath<Gen<D, E, F>, D>, <τ_0_0, τ_0_1, τ_0_2 where τ_0_0 : P, τ_0_1 : Q, τ_0_2 : R> (root $Gen<τ_0_0, τ_0_1, τ_0_2>; settable_property $τ_0_0, id @id_a : $@convention(thin) () -> (), getter @get_gen_a : $@convention(thin) <τ_0_0, τ_0_1, τ_0_2 where τ_0_0 : P, τ_0_1 : Q, τ_0_2 : R> (@in Gen<τ_0_0, τ_0_1, τ_0_2>) -> @out τ_0_0, setter @set_gen_a : $@convention(thin) <τ_0_0, τ_0_1, τ_0_2 where τ_0_0 : P, τ_0_1 : Q, τ_0_2 : R> (@in τ_0_0, @in Gen<τ_0_0, τ_0_1, τ_0_2>) -> ()) <D, E, F>
+  %a = keypath $KeyPath<Gen<D, E, F>, D>, <G: P, H: Q, I: R> (root $Gen<G, H, I>; settable_property $G, id @id_a : $@convention(thin) () -> (), getter @get_gen_a : $@convention(thin) <X3: P, Y3: Q, Z3: R> (@in Gen<X3, Y3, Z3>) -> @out X3, setter @set_gen_a : $@convention(thin) <X4: P, Y4: Q, Z4: R> (@in X4, @in Gen<X4, Y4, Z4>) -> ()) <D, E, F>
+
+  return undef : $()
+}
+
+sil @serialize_all : $@convention(thin) () -> () {
+entry:
+  %0 = function_ref @stored_properties : $@convention(thin) () -> ()
+  %1 = function_ref @stored_properties_generic : $@convention(thin) <D: P, E: Q, F: R> () -> ()
+  %2 = function_ref @computed_properties : $@convention(thin) () -> ()
+  %3 = function_ref @computed_properties_generic : $@convention(thin) <D: P, E: Q, F: R> () -> ()
+
+  unreachable
+}
diff --git a/test/SILGen/access_marker_gen.swift b/test/SILGen/access_marker_gen.swift
index e21014d..b32d197 100644
--- a/test/SILGen/access_marker_gen.swift
+++ b/test/SILGen/access_marker_gen.swift
@@ -7,7 +7,7 @@
   var o: AnyObject?
 }
 
-// CHECK-LABEL: sil hidden [noinline] @_T017access_marker_gen5initSAA1SVs9AnyObject_pSgF : $@convention(thin) (@owned Optional<AnyObject>) -> @owned S {
+// CHECK-LABEL: sil hidden [noinline] @_T017access_marker_gen5initSAA1SVyXlSgF : $@convention(thin) (@owned Optional<AnyObject>) -> @owned S {
 // CHECK: bb0(%0 : $Optional<AnyObject>):
 // CHECK: [[BOX:%.*]] = alloc_box ${ var S }, var, name "s"
 // CHECK: [[MARKED_BOX:%.*]] = mark_uninitialized [var] [[BOX]] : ${ var S }
@@ -26,7 +26,7 @@
 // CHECK: [[RET:%.*]] = load [copy] [[ACCESS3]] : $*S
 // CHECK: end_access [[ACCESS3]] : $*S
 // CHECK: return [[RET]] : $S
-// CHECK-LABEL: } // end sil function '_T017access_marker_gen5initSAA1SVs9AnyObject_pSgF'
+// CHECK-LABEL: } // end sil function '_T017access_marker_gen5initSAA1SVyXlSgF'
 @inline(never)
 func initS(_ o: AnyObject?) -> S {
   var s: S
@@ -65,7 +65,7 @@
   return global.o
 }
 
-// CHECK-LABEL: sil hidden @_T017access_marker_gen10readGlobals9AnyObject_pSgyF
+// CHECK-LABEL: sil hidden @_T017access_marker_gen10readGlobalyXlSgyF
 // CHECK:         [[ADDRESSOR:%.*]] = function_ref @_T017access_marker_gen6globalAA1SVfau :
 // CHECK-NEXT:    [[T0:%.*]] = apply [[ADDRESSOR]]()
 // CHECK-NEXT:    [[T1:%.*]] = pointer_to_address [[T0]] : $Builtin.RawPointer to [strict] $*S
@@ -118,7 +118,7 @@
   var x: Int = 0
 }
 //   materializeForSet callback
-// CHECK-LABEL: sil hidden [transparent] @_T017access_marker_gen1DC1xSifmytfU_
+// CHECK-LABEL: sil private [transparent] @_T017access_marker_gen1DC1xSifmytfU_
 // CHECK:       end_unpaired_access [dynamic] %1 : $*Builtin.UnsafeValueBuffer
 
 //   materializeForSet
diff --git a/test/SILGen/addressors.swift b/test/SILGen/addressors.swift
index adf08ea..ead711d 100644
--- a/test/SILGen/addressors.swift
+++ b/test/SILGen/addressors.swift
@@ -347,7 +347,7 @@
 // CHECK:   strong_release [[OWNER]] : $Builtin.NativeObject
 
 //   materializeForSet callback for G.value
-// CHECK-LABEL: sil hidden [transparent] @_T010addressors1GC5values5Int32VfmytfU_ : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout G, @thick G.Type) -> () {
+// CHECK-LABEL: sil private [transparent] @_T010addressors1GC5values5Int32VfmytfU_ : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout G, @thick G.Type) -> () {
 // CHECK: bb0([[BUFFER:%0]] : $Builtin.RawPointer, [[STORAGE:%1]] : $*Builtin.UnsafeValueBuffer, [[SELF:%2]] : $*G, [[SELFTYPE:%3]] : $@thick G.Type):
 // CHECK:   [[T0:%.*]] = project_value_buffer $Builtin.NativeObject in [[STORAGE]] : $*Builtin.UnsafeValueBuffer
 // CHECK:   [[OWNER:%.*]] = load [[T0]]
@@ -467,7 +467,7 @@
 // CHECK:   strong_unpin [[OWNER]] : $Optional<Builtin.NativeObject>
 
 //   materializeForSet callback for I.value
-// CHECK-LABEL: sil hidden [transparent] @_T010addressors1IC5values5Int32VfmytfU_ : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout I, @thick I.Type) -> () {
+// CHECK-LABEL: sil private [transparent] @_T010addressors1IC5values5Int32VfmytfU_ : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout I, @thick I.Type) -> () {
 // CHECK: bb0([[BUFFER:%0]] : $Builtin.RawPointer, [[STORAGE:%1]] : $*Builtin.UnsafeValueBuffer, [[SELF:%2]] : $*I, [[SELFTYPE:%3]] : $@thick I.Type):
 // CHECK:   [[T0:%.*]] = project_value_buffer $Optional<Builtin.NativeObject> in [[STORAGE]] : $*Builtin.UnsafeValueBuffer
 // CHECK:   [[OWNER:%.*]] = load [[T0]]
diff --git a/test/SILGen/arguments_as_tuple_overloads.swift b/test/SILGen/arguments_as_tuple_overloads.swift
index c67d156..f382864 100644
--- a/test/SILGen/arguments_as_tuple_overloads.swift
+++ b/test/SILGen/arguments_as_tuple_overloads.swift
@@ -1,6 +1,7 @@
 // RUN: %target-swift-frontend -parse-as-library -module-name=test -emit-silgen -primary-file %s | %FileCheck %s
 
-// Check if we mangle the following constructors and functions correctly.
+// Check if we mangle the following constructors, functions, and
+// subscripts correctly.
 
 public struct Pair {
   // CHECK: sil @_T04test4PairVACSi_SitcfC :
@@ -18,6 +19,16 @@
   // CHECK: sil @_T04test4PairVAAySi_Sit_tF :
   public func test(_ t: (Int, Int)) {
   }
+
+  // CHECK: sil @_T04test4PairV9subscriptS2i_Sitcfg :
+  public subscript(_:Int, _:Int) -> Int {
+      get { return 0 }
+  }
+
+  // CHECK: sil @_T04test4PairV9subscriptS2i_Sit_tcfg :
+  public subscript(_:(Int, Int)) -> Int {
+      get { return 0 }
+  }
 }
 
 // CHECK: sil @_T04testAAySi_SitF :
diff --git a/test/SILGen/builtins.swift b/test/SILGen/builtins.swift
index 197a9b2..0ef25a4 100644
--- a/test/SILGen/builtins.swift
+++ b/test/SILGen/builtins.swift
@@ -792,7 +792,7 @@
   return Builtin.castReference(o)
 }
 
-// CHECK-LABEL: sil hidden @_T08builtins17refcast_class_anys9AnyObject_pAA1ACF :
+// CHECK-LABEL: sil hidden @_T08builtins17refcast_class_anyyXlAA1ACF :
 // CHECK: bb0([[ARG:%.*]] : $A):
 // CHECK:   [[BORROWED_ARG:%.*]] = begin_borrow [[ARG]]
 // CHECK:   [[ARG_COPY:%.*]] = copy_value [[BORROWED_ARG]]
@@ -800,7 +800,7 @@
 // CHECK:   end_borrow [[BORROWED_ARG]] from [[ARG]]
 // CHECK:   destroy_value [[ARG]]
 // CHECK:   return [[ARG_COPY_CASTED]]
-// CHECK: } // end sil function '_T08builtins17refcast_class_anys9AnyObject_pAA1ACF'
+// CHECK: } // end sil function '_T08builtins17refcast_class_anyyXlAA1ACF'
 func refcast_class_any(_ o: A) -> AnyObject {
   return Builtin.castReference(o)
 }
@@ -811,7 +811,7 @@
   return Builtin.castReference(o)
 }
 
-// CHECK-LABEL: sil hidden @_T08builtins18refcast_pclass_anys9AnyObject_pAA6PClass_pF :
+// CHECK-LABEL: sil hidden @_T08builtins18refcast_pclass_anyyXlAA6PClass_pF :
 // CHECK: bb0([[ARG:%.*]] : $PClass):
 // CHECK:   [[BORROWED_ARG:%.*]] = begin_borrow [[ARG]]
 // CHECK:   [[ARG_COPY:%.*]] = copy_value [[BORROWED_ARG]]
@@ -819,7 +819,7 @@
 // CHECK:   end_borrow [[BORROWED_ARG]] from [[ARG]]
 // CHECK:   destroy_value [[ARG]]
 // CHECK:   return [[ARG_COPY_CAST]]
-// CHECK: } // end sil function '_T08builtins18refcast_pclass_anys9AnyObject_pAA6PClass_pF'
+// CHECK: } // end sil function '_T08builtins18refcast_pclass_anyyXlAA6PClass_pF'
 func refcast_pclass_any(_ o: PClass) -> AnyObject {
   return Builtin.castReference(o)
 }
diff --git a/test/SILGen/c_materializeForSet_linkage.swift b/test/SILGen/c_materializeForSet_linkage.swift
index d60f169..3d64bdd 100644
--- a/test/SILGen/c_materializeForSet_linkage.swift
+++ b/test/SILGen/c_materializeForSet_linkage.swift
@@ -16,8 +16,8 @@
 // Make sure synthesized materializeForSet and its callbacks have shared linkage
 // for properties imported from Clang
 
-// CHECK-LABEL: sil shared [transparent] [serializable] @_T0So7NSPointV1xSffm
-// CHECK-LABEL: sil shared [transparent] [serializable] @_T0So7NSPointV1ySffm
+// CHECK-LABEL: sil shared [transparent] [serializable] @_T0SC7NSPointV1xSffm
+// CHECK-LABEL: sil shared [transparent] [serializable] @_T0SC7NSPointV1ySffm
 
 // CHECK-LABEL: sil shared [serializable] @_T0So16NSReferencePointC1xSffmytfU_
 // CHECK-LABEL: sil shared [serializable] @_T0So16NSReferencePointC1xSffm
diff --git a/test/SILGen/cf.swift b/test/SILGen/cf.swift
index b5a7aaa..4740273 100644
--- a/test/SILGen/cf.swift
+++ b/test/SILGen/cf.swift
@@ -65,10 +65,10 @@
 
 extension CCImpedance: Impedance {}
 
-// CHECK-LABEL: sil private [transparent] [thunk] @_T0So11CCImpedanceV2cf9ImpedanceA2cDP4real9ComponentQzfgTW
-// CHECK-LABEL: sil shared [transparent] [serializable] @_T0So11CCImpedanceV4realSdfg
-// CHECK-LABEL: sil private [transparent] [thunk] @_T0So11CCImpedanceV2cf9ImpedanceA2cDP4imag9ComponentQzfgTW
-// CHECK-LABEL: sil shared [transparent] [serializable] @_T0So11CCImpedanceV4imagSdfg
+// CHECK-LABEL: sil private [transparent] [thunk] @_T0SC11CCImpedanceV2cf9ImpedanceA2cDP4real9ComponentQzfgTW
+// CHECK-LABEL: sil shared [transparent] [serializable] @_T0SC11CCImpedanceV4realSdfg
+// CHECK-LABEL: sil private [transparent] [thunk] @_T0SC11CCImpedanceV2cf9ImpedanceA2cDP4imag9ComponentQzfgTW
+// CHECK-LABEL: sil shared [transparent] [serializable] @_T0SC11CCImpedanceV4imagSdfg
 
 class MyMagnetism : CCMagnetismModel {
   // CHECK-LABEL: sil hidden [thunk] @_T02cf11MyMagnetismC15getRefrigerator{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (MyMagnetism) -> @autoreleased CCRefrigerator
diff --git a/test/SILGen/cf_members.swift b/test/SILGen/cf_members.swift
index 76f2753..8f4a9e6 100644
--- a/test/SILGen/cf_members.swift
+++ b/test/SILGen/cf_members.swift
@@ -36,7 +36,7 @@
   // CHECK: apply [[FN]]([[X]])
   z = makeMetatype().init(value: x)
 
-  // CHECK: [[THUNK:%.*]] = function_ref @_T0So7Struct1VABSd5value_tcfCTcTO
+  // CHECK: [[THUNK:%.*]] = function_ref @_T0SC7Struct1VABSd5value_tcfCTcTO
   // CHECK: [[SELF_META:%.*]] = metatype $@thin Struct1.Type
   // CHECK: [[A:%.*]] = apply [[THUNK]]([[SELF_META]])
   // CHECK: [[BORROWED_A:%.*]] = begin_borrow [[A]]
@@ -62,7 +62,7 @@
   // CHECK: apply [[FN]]([[ZTMP]], [[X]])
   z = z.translate(radians: x)
 
-  // CHECK: [[THUNK:%.*]] = function_ref [[THUNK_NAME:@_T0So7Struct1V9translateABSd7radians_tFTcTO]]
+  // CHECK: [[THUNK:%.*]] = function_ref [[THUNK_NAME:@_T0SC7Struct1V9translateABSd7radians_tFTcTO]]
   // CHECK: [[READ:%.*]] = begin_access [read] [unknown] [[Z]] : $*Struct1
   // CHECK: [[ZVAL:%.*]] = load [trivial] [[READ]]
   // CHECK: [[C:%.*]] = apply [[THUNK]]([[ZVAL]])
@@ -90,7 +90,7 @@
   // CHECK: apply [[FN]]([[ZVAL]], [[X]])
   z = z.scale(x)
 
-  // CHECK: [[THUNK:%.*]] = function_ref @_T0So7Struct1V5scaleABSdFTcTO
+  // CHECK: [[THUNK:%.*]] = function_ref @_T0SC7Struct1V5scaleABSdFTcTO
   // CHECK: [[READ:%.*]] = begin_access [read] [unknown] [[Z]] : $*Struct1
   // CHECK: [[ZVAL:%.*]] = load [trivial] [[READ]]
   // CHECK: [[F:%.*]] = apply [[THUNK]]([[ZVAL]])
@@ -100,7 +100,7 @@
   // CHECK: apply [[F_COPY]]([[X]])
   // CHECK: end_borrow [[BORROWED_F]] from [[F]]
   z = f(x)
-  // CHECK: [[THUNK:%.*]] = function_ref @_T0So7Struct1V5scaleABSdFTcTO
+  // CHECK: [[THUNK:%.*]] = function_ref @_T0SC7Struct1V5scaleABSdFTcTO
   // CHECK: thin_to_thick_function [[THUNK]]
   let g = Struct1.scale
   // CHECK:  [[READ:%.*]] = begin_access [read] [unknown] [[Z]] : $*Struct1
@@ -143,7 +143,7 @@
   // CHECK: [[FN:%.*]] = function_ref @IAMStruct1StaticMethod
   // CHECK: apply [[FN]]()
   var y = Struct1.staticMethod()
-  // CHECK: [[THUNK:%.*]] = function_ref @_T0So7Struct1V12staticMethods5Int32VyFZTcTO
+  // CHECK: [[THUNK:%.*]] = function_ref @_T0SC7Struct1V12staticMethods5Int32VyFZTcTO
   // CHECK: [[SELF:%.*]] = metatype
   // CHECK: [[I:%.*]] = apply [[THUNK]]([[SELF]])
   // CHECK: [[BORROWED_I:%.*]] = begin_borrow [[I]]
@@ -215,37 +215,37 @@
 }
 // CHECK: } // end sil function '_T010cf_members3foo{{[_0-9a-zA-Z]*}}F'
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @_T0So7Struct1VABSd5value_tcfCTO
+// CHECK-LABEL: sil shared [serializable] [thunk] @_T0SC7Struct1VABSd5value_tcfCTO
 // CHECK:       bb0([[X:%.*]] : $Double, [[SELF:%.*]] : $@thin Struct1.Type):
 // CHECK:         [[CFUNC:%.*]] = function_ref @IAMStruct1CreateSimple
 // CHECK:         [[RET:%.*]] = apply [[CFUNC]]([[X]])
 // CHECK:         return [[RET]]
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @_T0So7Struct1V9translateABSd7radians_tFTO
+// CHECK-LABEL: sil shared [serializable] [thunk] @_T0SC7Struct1V9translateABSd7radians_tFTO
 // CHECK:       bb0([[X:%.*]] : $Double, [[SELF:%.*]] : $Struct1):
 // CHECK:         store [[SELF]] to [trivial] [[TMP:%.*]] :
 // CHECK:         [[CFUNC:%.*]] = function_ref @IAMStruct1Rotate
 // CHECK:         [[RET:%.*]] = apply [[CFUNC]]([[TMP]], [[X]])
 // CHECK:         return [[RET]]
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @_T0So7Struct1V5scaleABSdFTO
+// CHECK-LABEL: sil shared [serializable] [thunk] @_T0SC7Struct1V5scaleABSdFTO
 // CHECK:       bb0([[X:%.*]] : $Double, [[SELF:%.*]] : $Struct1):
 // CHECK:         [[CFUNC:%.*]] = function_ref @IAMStruct1Scale
 // CHECK:         [[RET:%.*]] = apply [[CFUNC]]([[SELF]], [[X]])
 // CHECK:         return [[RET]]
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @_T0So7Struct1V12staticMethods5Int32VyFZTO
+// CHECK-LABEL: sil shared [serializable] [thunk] @_T0SC7Struct1V12staticMethods5Int32VyFZTO
 // CHECK:       bb0([[SELF:%.*]] : $@thin Struct1.Type):
 // CHECK:         [[CFUNC:%.*]] = function_ref @IAMStruct1StaticMethod
 // CHECK:         [[RET:%.*]] = apply [[CFUNC]]()
 // CHECK:         return [[RET]]
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @_T0So7Struct1V13selfComesLastySd1x_tFTO
+// CHECK-LABEL: sil shared [serializable] [thunk] @_T0SC7Struct1V13selfComesLastySd1x_tFTO
 // CHECK:       bb0([[X:%.*]] : $Double, [[SELF:%.*]] : $Struct1):
 // CHECK:         [[CFUNC:%.*]] = function_ref @IAMStruct1SelfComesLast
 // CHECK:         apply [[CFUNC]]([[X]], [[SELF]])
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @_T0So7Struct1V14selfComesThirdys5Int32V1a_Sf1bSd1xtFTO
+// CHECK-LABEL: sil shared [serializable] [thunk] @_T0SC7Struct1V14selfComesThirdys5Int32V1a_Sf1bSd1xtFTO
 // CHECK:       bb0([[X:%.*]] : $Int32, [[Y:%.*]] : $Float, [[Z:%.*]] : $Double, [[SELF:%.*]] : $Struct1):
 // CHECK:         [[CFUNC:%.*]] = function_ref @IAMStruct1SelfComesThird
 // CHECK:         apply [[CFUNC]]([[X]], [[Y]], [[SELF]], [[Z]])
diff --git a/test/SILGen/constrained_extensions.swift b/test/SILGen/constrained_extensions.swift
index d1856d0..8ab683a 100644
--- a/test/SILGen/constrained_extensions.swift
+++ b/test/SILGen/constrained_extensions.swift
@@ -10,7 +10,7 @@
 
   // CHECK-LABEL: sil @_T0Sa22constrained_extensionsSiRszlE16instancePropertySifg : $@convention(method) (@guaranteed Array<Int>) -> Int
   // CHECK-LABEL: sil @_T0Sa22constrained_extensionsSiRszlE16instancePropertySifs : $@convention(method) (Int, @inout Array<Int>) -> ()
-  // CHECK-LABEL: sil [transparent] [serialized] @_T0Sa22constrained_extensionsSiRszlE16instancePropertySifmytfU_ : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout Array<Int>, @thick Array<Int>.Type) -> ()
+  // CHECK-LABEL: sil private [transparent] [serialized] @_T0Sa22constrained_extensionsSiRszlE16instancePropertySifmytfU_ : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout Array<Int>, @thick Array<Int>.Type) -> ()
   // CHECK-LABEL: sil [transparent] [serialized] @_T0Sa22constrained_extensionsSiRszlE16instancePropertySifm : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout Array<Int>) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>)
 
   public var instanceProperty: Element {
@@ -48,7 +48,7 @@
     return e!
   }
 
-  // CHECK-LABEL: sil @_T0Sa22constrained_extensionsSiRszlE9subscriptSiycfg : $@convention(method) (@guaranteed Array<Int>) -> Int
+  // CHECK-LABEL: sil @_T0Sa22constrained_extensionsSiRszlE9subscriptSiyt_tcfg : $@convention(method) (@guaranteed Array<Int>) -> Int
   public subscript(i: ()) -> Element {
     return self[0]
   }
@@ -71,7 +71,7 @@
 
   // CHECK-LABEL: sil @_T0s10DictionaryV22constrained_extensionsSiRszr0_lE16instancePropertyq_fg : $@convention(method) <Key, Value where Key == Int> (@guaranteed Dictionary<Int, Value>) -> @out Value
   // CHECK-LABEL: sil @_T0s10DictionaryV22constrained_extensionsSiRszr0_lE16instancePropertyq_fs : $@convention(method) <Key, Value where Key == Int> (@in Value, @inout Dictionary<Int, Value>) -> ()
-  // CHECK-LABEL: sil [transparent] [serialized] @_T0s10DictionaryV22constrained_extensionsSiRszr0_lE16instancePropertyq_fmytfU_ : $@convention(method) <Key, Value where Key == Int> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout Dictionary<Int, Value>, @thick Dictionary<Int, Value>.Type) -> ()
+  // CHECK-LABEL: sil private [transparent] [serialized] @_T0s10DictionaryV22constrained_extensionsSiRszr0_lE16instancePropertyq_fmytfU_ : $@convention(method) <Key, Value where Key == Int> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout Dictionary<Int, Value>, @thick Dictionary<Int, Value>.Type) -> ()
   // CHECK-LABEL: sil [transparent] [serialized] @_T0s10DictionaryV22constrained_extensionsSiRszr0_lE16instancePropertyq_fm : $@convention(method) <Key, Value where Key == Int> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout Dictionary<Int, Value>) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>)
   public var instanceProperty: Value {
     get {
@@ -119,7 +119,7 @@
     return Dictionary(x: ()).instanceMethod()
   }
 
-  // CHECK-LABEL: sil @_T0s10DictionaryV22constrained_extensionsSiRszr0_lE9subscriptq_ycfg : $@convention(method) <Key, Value where Key == Int> (@guaranteed Dictionary<Int, Value>) -> @out Value
+  // CHECK-LABEL: sil @_T0s10DictionaryV22constrained_extensionsSiRszr0_lE9subscriptq_yt_tcfg : $@convention(method) <Key, Value where Key == Int> (@guaranteed Dictionary<Int, Value>) -> @out Value
   public subscript(i: ()) -> Value {
     return self[0]!
   }
@@ -137,7 +137,7 @@
 extension GenericClass where Y == () {
   // CHECK-LABEL: sil @_T022constrained_extensions12GenericClassCAAytRs_r0_lE5valuexfg : $@convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) -> @out X
   // CHECK-LABEL: sil @_T022constrained_extensions12GenericClassCAAytRs_r0_lE5valuexfs : $@convention(method) <X, Y where Y == ()> (@in X, @guaranteed GenericClass<X, ()>) -> ()
-  // CHECK-LABEL: sil [transparent] [serialized] @_T022constrained_extensions12GenericClassCAAytRs_r0_lE5valuexfmytfU_ : $@convention(method) <X, Y where Y == ()> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout GenericClass<X, ()>, @thick GenericClass<X, ()>.Type) -> ()
+  // CHECK-LABEL: sil private [transparent] [serialized] @_T022constrained_extensions12GenericClassCAAytRs_r0_lE5valuexfmytfU_ : $@convention(method) <X, Y where Y == ()> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout GenericClass<X, ()>, @thick GenericClass<X, ()>.Type) -> ()
   // CHECK-LABEL: sil [transparent] [serialized] @_T022constrained_extensions12GenericClassCAAytRs_r0_lE5valuexfm : $@convention(method) <X, Y where Y == ()> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed GenericClass<X, ()>) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>)
   public var value: X {
     get { while true {} }
@@ -146,17 +146,17 @@
 
   // CHECK-LABEL: sil @_T022constrained_extensions12GenericClassCAAytRs_r0_lE5emptyytfg : $@convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) -> ()
   // CHECK-LABEL: sil @_T022constrained_extensions12GenericClassCAAytRs_r0_lE5emptyytfs : $@convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) -> ()
-  // CHECK-LABEL: sil [transparent] [serialized] @_T022constrained_extensions12GenericClassCAAytRs_r0_lE5emptyytfmytfU_ : $@convention(method) <X, Y where Y == ()> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout GenericClass<X, ()>, @thick GenericClass<X, ()>.Type) -> ()
+  // CHECK-LABEL: sil private [transparent] [serialized] @_T022constrained_extensions12GenericClassCAAytRs_r0_lE5emptyytfmytfU_ : $@convention(method) <X, Y where Y == ()> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout GenericClass<X, ()>, @thick GenericClass<X, ()>.Type) -> ()
   // CHECK-LABEL: sil [transparent] [serialized] @_T022constrained_extensions12GenericClassCAAytRs_r0_lE5emptyytfm : $@convention(method) <X, Y where Y == ()> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed GenericClass<X, ()>) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>)
   public var empty: Y {
     get { return () }
     set {}
   }
 
-  // CHECK-LABEL: sil @_T022constrained_extensions12GenericClassCAAytRs_r0_lE9subscriptxycfg : $@convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) -> @out X
-  // CHECK-LABEL: sil @_T022constrained_extensions12GenericClassCAAytRs_r0_lE9subscriptxycfs : $@convention(method) <X, Y where Y == ()> (@in X, @guaranteed GenericClass<X, ()>) -> ()
-  // CHECK-LABEL: sil [transparent] [serialized] @_T022constrained_extensions12GenericClassCAAytRs_r0_lE9subscriptxycfmytfU_ : $@convention(method) <X, Y where Y == ()> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout GenericClass<X, ()>, @thick GenericClass<X, ()>.Type) -> ()
-  // CHECK-LABEL: sil [transparent] [serialized] @_T022constrained_extensions12GenericClassCAAytRs_r0_lE9subscriptxycfm : $@convention(method) <X, Y where Y == ()> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed GenericClass<X, ()>) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>)
+  // CHECK-LABEL: sil @_T022constrained_extensions12GenericClassCAAytRs_r0_lE9subscriptxyt_tcfg : $@convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) -> @out X
+  // CHECK-LABEL: sil @_T022constrained_extensions12GenericClassCAAytRs_r0_lE9subscriptxyt_tcfs : $@convention(method) <X, Y where Y == ()> (@in X, @guaranteed GenericClass<X, ()>) -> ()
+  // CHECK-LABEL: sil private [transparent] [serialized] @_T022constrained_extensions12GenericClassCAAytRs_r0_lE9subscriptxyt_tcfmytfU_ : $@convention(method) <X, Y where Y == ()> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout GenericClass<X, ()>, @thick GenericClass<X, ()>.Type) -> ()
+  // CHECK-LABEL: sil [transparent] [serialized] @_T022constrained_extensions12GenericClassCAAytRs_r0_lE9subscriptxyt_tcfm : $@convention(method) <X, Y where Y == ()> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @guaranteed GenericClass<X, ()>) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>)
   public subscript(_: Y) -> X {
     get { while true {} }
     set {}
@@ -164,7 +164,7 @@
 
   // CHECK-LABEL: sil @_T022constrained_extensions12GenericClassCAAytRs_r0_lE9subscriptyxcfg : $@convention(method) <X, Y where Y == ()> (@in X, @guaranteed GenericClass<X, ()>) -> ()
   // CHECK-LABEL: sil @_T022constrained_extensions12GenericClassCAAytRs_r0_lE9subscriptyxcfs : $@convention(method) <X, Y where Y == ()> (@in X, @guaranteed GenericClass<X, ()>) -> ()
-  // CHECK-LABEL: sil [transparent] [serialized] @_T022constrained_extensions12GenericClassCAAytRs_r0_lE9subscriptyxcfmytfU_ : $@convention(method) <X, Y where Y == ()> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout GenericClass<X, ()>, @thick GenericClass<X, ()>.Type) -> ()
+  // CHECK-LABEL: sil private [transparent] [serialized] @_T022constrained_extensions12GenericClassCAAytRs_r0_lE9subscriptyxcfmytfU_ : $@convention(method) <X, Y where Y == ()> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout GenericClass<X, ()>, @thick GenericClass<X, ()>.Type) -> ()
   // CHECK-LABEL: sil [transparent] [serialized] @_T022constrained_extensions12GenericClassCAAytRs_r0_lE9subscriptyxcfm : $@convention(method) <X, Y where Y == ()> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @in X, @guaranteed GenericClass<X, ()>) -> (Builtin.RawPointer, Optional<Builtin.RawPointer>)
   public subscript(_: X) -> Y {
     get { while true {} }
diff --git a/test/SILGen/dynamic.swift b/test/SILGen/dynamic.swift
index 4a15ffd..8f24d21 100644
--- a/test/SILGen/dynamic.swift
+++ b/test/SILGen/dynamic.swift
@@ -70,8 +70,8 @@
 // CHECK-LABEL: sil hidden [thunk] @_T07dynamic3FooC10objcMethod{{[_0-9a-zA-Z]*}}FTo
 // CHECK-LABEL: sil hidden [transparent] [thunk] @_T07dynamic3FooC8objcPropSifgTo
 // CHECK-LABEL: sil hidden [transparent] [thunk] @_T07dynamic3FooC8objcPropSifsTo
-// CHECK-LABEL: sil hidden [thunk] @_T07dynamic3FooC9subscriptSis9AnyObject_p4objc_tcfgTo
-// CHECK-LABEL: sil hidden [thunk] @_T07dynamic3FooC9subscriptSis9AnyObject_p4objc_tcfsTo
+// CHECK-LABEL: sil hidden [thunk] @_T07dynamic3FooC9subscriptSiyXl4objc_tcfgTo
+// CHECK-LABEL: sil hidden [thunk] @_T07dynamic3FooC9subscriptSiyXl4objc_tcfsTo
 
 // TODO: dynamic initializing ctor must be objc dispatched
 // CHECK-LABEL: sil hidden @_T07dynamic3{{[_0-9a-zA-Z]*}}fC
@@ -107,9 +107,9 @@
 // CHECK:         class_method {{%.*}} : $Foo, #Foo.objcProp!getter.1 :
 // CHECK-LABEL: sil private [transparent] [thunk] @_T07dynamic3FooCAA5ProtoA2aDP8objcPropSifsTW
 // CHECK:         class_method {{%.*}} : $Foo, #Foo.objcProp!setter.1 :
-// CHECK-LABEL: sil private [transparent] [thunk] @_T07dynamic3FooCAA5ProtoA2aDP9subscriptSis9AnyObject_p4objc_tcfgTW
+// CHECK-LABEL: sil private [transparent] [thunk] @_T07dynamic3FooCAA5ProtoA2aDP9subscriptSiyXl4objc_tcfgTW
 // CHECK:         class_method {{%.*}} : $Foo, #Foo.subscript!getter.1 :
-// CHECK-LABEL: sil private [transparent] [thunk] @_T07dynamic3FooCAA5ProtoA2aDP9subscriptSis9AnyObject_p4objc_tcfsTW
+// CHECK-LABEL: sil private [transparent] [thunk] @_T07dynamic3FooCAA5ProtoA2aDP9subscriptSiyXl4objc_tcfsTW
 // CHECK:         class_method {{%.*}} : $Foo, #Foo.subscript!setter.1 :
 
 // Dynamic witnesses use objc dispatch:
@@ -194,11 +194,11 @@
 
   override subscript(objc objc: AnyObject) -> Int {
     get { return super[objc: objc] }
-    // CHECK-LABEL: sil hidden @_T07dynamic8SubclassC9subscriptSis9AnyObject_p4objc_tcfg
-    // CHECK:         function_ref @_T07dynamic3FooC9subscriptSis9AnyObject_p4objc_tcfg : $@convention(method) (@owned AnyObject, @guaranteed Foo) -> Int
+    // CHECK-LABEL: sil hidden @_T07dynamic8SubclassC9subscriptSiyXl4objc_tcfg
+    // CHECK:         function_ref @_T07dynamic3FooC9subscriptSiyXl4objc_tcfg : $@convention(method) (@owned AnyObject, @guaranteed Foo) -> Int
     set { super[objc: objc] = newValue }
-    // CHECK-LABEL: sil hidden @_T07dynamic8SubclassC9subscriptSis9AnyObject_p4objc_tcfs
-    // CHECK:         function_ref @_T07dynamic3FooC9subscriptSis9AnyObject_p4objc_tcfs : $@convention(method) (Int, @owned AnyObject, @guaranteed Foo) -> ()
+    // CHECK-LABEL: sil hidden @_T07dynamic8SubclassC9subscriptSiyXl4objc_tcfs
+    // CHECK:         function_ref @_T07dynamic3FooC9subscriptSiyXl4objc_tcfs : $@convention(method) (Int, @owned AnyObject, @guaranteed Foo) -> ()
   }
 
   // Dynamic methods are super-dispatched by objc_msgSend
@@ -235,6 +235,23 @@
   dynamic override func overriddenByDynamic() {}
 }
 
+class SubclassWithInheritedInits: Foo {
+  // CHECK-LABEL: sil hidden @_T07dynamic26SubclassWithInheritedInitsC{{[_0-9a-zA-Z]*}}fc
+  // CHECK:         super_method [volatile] {{%.*}} : $SubclassWithInheritedInits, #Foo.init!initializer.1.foreign :
+}
+class GrandchildWithInheritedInits: SubclassWithInheritedInits {
+  // CHECK-LABEL: sil hidden @_T07dynamic28GrandchildWithInheritedInitsC{{[_0-9a-zA-Z]*}}fc
+  // CHECK:         super_method [volatile] {{%.*}} : $GrandchildWithInheritedInits, #SubclassWithInheritedInits.init!initializer.1.foreign :
+}
+class GrandchildOfInheritedInits: SubclassWithInheritedInits {
+  // Dynamic methods are super-dispatched by objc_msgSend
+  override init(dynamic: Int) {
+    super.init(dynamic: dynamic)
+  }
+  // CHECK-LABEL: sil hidden @_T07dynamic26GrandchildOfInheritedInitsC{{[_0-9a-zA-Z]*}}fc
+  // CHECK:         super_method [volatile] {{%.*}} : $GrandchildOfInheritedInits, #SubclassWithInheritedInits.init!initializer.1.foreign :
+}
+
 // CHECK-LABEL: sil hidden @_T07dynamic20nativeMethodDispatchyyF : $@convention(thin) () -> ()
 func nativeMethodDispatch() {
   // CHECK: function_ref @_T07dynamic3{{[_0-9a-zA-Z]*}}fC
@@ -496,8 +513,8 @@
 // CHECK-NEXT:   #Foo.objcProp!getter.1: {{.*}} :    _T07dynamic3FooC8objcPropSifg  // dynamic.Foo.objcProp.getter : Swift.Int
 // CHECK-NEXT:   #Foo.objcProp!setter.1: {{.*}} :    _T07dynamic3FooC8objcPropSifs  // dynamic.Foo.objcProp.setter : Swift.Int
 // CHECK-NEXT:   #Foo.objcProp!materializeForSet.1
-// CHECK-NEXT:   #Foo.subscript!getter.1: {{.*}} : _T07dynamic3FooC9subscriptSis9AnyObject_p4objc_tcfg // dynamic.Foo.subscript.getter : (objc: Swift.AnyObject) -> Swift.Int
-// CHECK-NEXT:   #Foo.subscript!setter.1: {{.*}} : _T07dynamic3FooC9subscriptSis9AnyObject_p4objc_tcfs // dynamic.Foo.subscript.setter : (objc: Swift.AnyObject) -> Swift.Int
+// CHECK-NEXT:   #Foo.subscript!getter.1: {{.*}} : _T07dynamic3FooC9subscriptSiyXl4objc_tcfg // dynamic.Foo.subscript.getter : (objc: Swift.AnyObject) -> Swift.Int
+// CHECK-NEXT:   #Foo.subscript!setter.1: {{.*}} : _T07dynamic3FooC9subscriptSiyXl4objc_tcfs // dynamic.Foo.subscript.setter : (objc: Swift.AnyObject) -> Swift.Int
 // CHECK-NEXT:   #Foo.subscript!materializeForSet
 // CHECK-NEXT:   #Foo.overriddenByDynamic!1: {{.*}} : _T07dynamic3FooC19overriddenByDynamic{{[_0-9a-zA-Z]*}}
 // CHECK-NEXT:   #Foo.deinit!deallocator: {{.*}}
@@ -508,6 +525,25 @@
 // CHECK:   #Foo.overriddenByDynamic!1: {{.*}} : public _T07dynamic8SubclassC19overriddenByDynamic{{[_0-9a-zA-Z]*}}FTD
 // CHECK: }
 
+// Check vtables for implicitly-inherited initializers
+// CHECK-LABEL: sil_vtable SubclassWithInheritedInits {
+// CHECK:   #Foo.init!initializer.1: (Foo.Type) -> (Int) -> Foo : _T07dynamic26SubclassWithInheritedInitsCACSi6native_tcfc
+// CHECK:   #Foo.init!initializer.1: (Foo.Type) -> (Int) -> Foo : _T07dynamic26SubclassWithInheritedInitsCACSi4objc_tcfc
+// CHECK-NOT: .init!
+// CHECK: }
+
+// CHECK-LABEL: sil_vtable GrandchildWithInheritedInits {
+// CHECK:   #Foo.init!initializer.1: (Foo.Type) -> (Int) -> Foo : _T07dynamic28GrandchildWithInheritedInitsCACSi6native_tcfc
+// CHECK:   #Foo.init!initializer.1: (Foo.Type) -> (Int) -> Foo : _T07dynamic28GrandchildWithInheritedInitsCACSi4objc_tcfc
+// CHECK-NOT: .init!
+// CHECK: }
+
+// CHECK-LABEL: sil_vtable GrandchildOfInheritedInits {
+// CHECK:   #Foo.init!initializer.1: (Foo.Type) -> (Int) -> Foo : _T07dynamic26GrandchildOfInheritedInitsCACSi6native_tcfc
+// CHECK:   #Foo.init!initializer.1: (Foo.Type) -> (Int) -> Foo : _T07dynamic26GrandchildOfInheritedInitsCACSi4objc_tcfc
+// CHECK-NOT: .init!
+// CHECK: }
+
 // No vtable entry for override of @objc extension property
 // CHECK-LABEL: sil_vtable SubExt {
 // CHECK-NEXT: #BaseExt.init!initializer.1: (BaseExt.Type) -> () -> BaseExt : _T07dynamic6SubExtCACycfc // dynamic.SubExt.init() -> dynamic.SubExt
diff --git a/test/SILGen/dynamic_lookup_throws.swift b/test/SILGen/dynamic_lookup_throws.swift
index d07ebce..341f051 100644
--- a/test/SILGen/dynamic_lookup_throws.swift
+++ b/test/SILGen/dynamic_lookup_throws.swift
@@ -11,7 +11,7 @@
    func blub() throws {}
 }
 
-// CHECK-LABEL: sil hidden @_T021dynamic_lookup_throws8testBlubys9AnyObject_p1a_tKF : $@convention(thin) (@owned AnyObject) -> @error Error
+// CHECK-LABEL: sil hidden @_T021dynamic_lookup_throws8testBlubyyXl1a_tKF : $@convention(thin) (@owned AnyObject) -> @error Error
 // CHECK: bb0([[ARG:%.*]] : $AnyObject):
 func testBlub(a: AnyObject) throws {
   // CHECK:   [[BORROWED_ARG:%.*]] = begin_borrow [[ARG]]
diff --git a/test/SILGen/dynamic_self.swift b/test/SILGen/dynamic_self.swift
index 6f110f8..6d8574d 100644
--- a/test/SILGen/dynamic_self.swift
+++ b/test/SILGen/dynamic_self.swift
@@ -111,7 +111,7 @@
   @objc func method() -> Self { return self }
 }
 
-// CHECK-LABEL: sil hidden @_T012dynamic_self21testAnyObjectDispatchys0dE0_p1o_tF : $@convention(thin) (@owned AnyObject) -> () {
+// CHECK-LABEL: sil hidden @_T012dynamic_self21testAnyObjectDispatchyyXl1o_tF : $@convention(thin) (@owned AnyObject) -> () {
 func testAnyObjectDispatch(o: AnyObject) {
   // CHECK: dynamic_method_br [[O_OBJ:%[0-9]+]] : $@opened({{.*}}) AnyObject, #ObjC.method!1.foreign, bb1, bb2
 
@@ -120,7 +120,7 @@
   // CHECK:   [[VAR_9:%[0-9]+]] = partial_apply [[METHOD]]([[O_OBJ_COPY]]) : $@convention(objc_method) (@opened({{.*}}) AnyObject) -> @autoreleased AnyObject
   var _ = o.method
 }
-// CHECK: } // end sil function '_T012dynamic_self21testAnyObjectDispatchys0dE0_p1o_tF'
+// CHECK: } // end sil function '_T012dynamic_self21testAnyObjectDispatchyyXl1o_tF'
 
 
 // <rdar://problem/16270889> Dispatch through ObjC metatypes.
diff --git a/test/SILGen/external_definitions.swift b/test/SILGen/external_definitions.swift
index 195c3aa..758a151 100644
--- a/test/SILGen/external_definitions.swift
+++ b/test/SILGen/external_definitions.swift
@@ -19,7 +19,7 @@
 // CHECK:   [[NSANSE_RESULT:%.*]] = apply [[NSANSE]]([[ANSIBLE]])
 // CHECK:   destroy_value [[ANSIBLE]] : $Optional<Ansible>
 // -- Referencing unapplied C function goes through a thunk
-// CHECK:   [[NSANSE:%.*]] = function_ref @_T0So6NSAnseSQySo7AnsibleCGADFTO : $@convention(thin) (@owned Optional<Ansible>) -> @owned Optional<Ansible>
+// CHECK:   [[NSANSE:%.*]] = function_ref @_T0SC6NSAnseSQySo7AnsibleCGADFTO : $@convention(thin) (@owned Optional<Ansible>) -> @owned Optional<Ansible>
 // -- Referencing unprototyped C function passes no parameters
 // CHECK:   [[NOPROTO:%.*]] = function_ref @hasNoPrototype : $@convention(c) () -> ()
 // CHECK:   apply [[NOPROTO]]()
@@ -32,7 +32,7 @@
 // CHECK-LABEL: sil shared [serializable] @_T0So8NSObjectC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick NSObject.Type) -> @owned NSObject
 
 // -- Native Swift thunk for NSAnse
-// CHECK: sil shared [serialized] [thunk] @_T0So6NSAnseSQySo7AnsibleCGADFTO : $@convention(thin) (@owned Optional<Ansible>) -> @owned Optional<Ansible> {
+// CHECK: sil shared [serialized] [thunk] @_T0SC6NSAnseSQySo7AnsibleCGADFTO : $@convention(thin) (@owned Optional<Ansible>) -> @owned Optional<Ansible> {
 // CHECK: bb0(%0 : $Optional<Ansible>):
 // CHECK:   %1 = function_ref @NSAnse : $@convention(c) (Optional<Ansible>) -> @autoreleased Optional<Ansible>
 // CHECK:   %2 = apply %1(%0) : $@convention(c) (Optional<Ansible>) -> @autoreleased Optional<Ansible>
diff --git a/test/SILGen/foreign_errors.swift b/test/SILGen/foreign_errors.swift
index f768a75..6e64875 100644
--- a/test/SILGen/foreign_errors.swift
+++ b/test/SILGen/foreign_errors.swift
@@ -190,7 +190,7 @@
 // on than is being tested here, we should consider adding FileCheck tests for
 // it.
 
-// CHECK-LABEL:    sil hidden @_T014foreign_errors14VeryErrorProneCACs9AnyObject_pSg7withTwo_tKcfc
+// CHECK-LABEL:    sil hidden @_T014foreign_errors14VeryErrorProneCACyXlSg7withTwo_tKcfc
 // CHECK:    bb0([[ARG1:%.*]] : $Optional<AnyObject>, [[ARG2:%.*]] : $VeryErrorProne):
 // CHECK:      [[BOX:%.*]] = alloc_box ${ var VeryErrorProne }
 // CHECK:      [[MARKED_BOX:%.*]] = mark_uninitialized [derivedself] [[BOX]]
diff --git a/test/SILGen/function_conversion_objc.swift b/test/SILGen/function_conversion_objc.swift
index c184b5a..3ae7983 100644
--- a/test/SILGen/function_conversion_objc.swift
+++ b/test/SILGen/function_conversion_objc.swift
@@ -8,12 +8,12 @@
 
 // CHECK-LABEL: sil hidden @_T024function_conversion_objc20convMetatypeToObjectySo8NSObjectCmADcF
 func convMetatypeToObject(_ f: @escaping (NSObject) -> NSObject.Type) {
-// CHECK:         function_ref @_T0So8NSObjectCABXMTIxxd_ABs9AnyObject_pIxxo_TR
+// CHECK:         function_ref @_T0So8NSObjectCABXMTIxxd_AByXlIxxo_TR
 // CHECK:         partial_apply
   let _: (NSObject) -> AnyObject = f
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @_T0So8NSObjectCABXMTIxxd_ABs9AnyObject_pIxxo_TR : $@convention(thin) (@owned NSObject, @owned @callee_owned (@owned NSObject) -> @thick NSObject.Type) -> @owned AnyObject {
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @_T0So8NSObjectCABXMTIxxd_AByXlIxxo_TR : $@convention(thin) (@owned NSObject, @owned @callee_owned (@owned NSObject) -> @thick NSObject.Type) -> @owned AnyObject {
 // CHECK:         apply %1(%0)
 // CHECK:         thick_to_objc_metatype {{.*}} : $@thick NSObject.Type to $@objc_metatype NSObject.Type
 // CHECK:         objc_metatype_to_object {{.*}} : $@objc_metatype NSObject.Type to $AnyObject
@@ -23,12 +23,12 @@
 
 // CHECK-LABEL: sil hidden @_T024function_conversion_objc31convExistentialMetatypeToObjectyAA9NSBurrito_pXpAaC_pcF
 func convExistentialMetatypeToObject(_ f: @escaping (NSBurrito) -> NSBurrito.Type) {
-// CHECK:         function_ref @_T024function_conversion_objc9NSBurrito_pAaB_pXmTIxxd_AaB_ps9AnyObject_pIxxo_TR
+// CHECK:         function_ref @_T024function_conversion_objc9NSBurrito_pAaB_pXmTIxxd_AaB_pyXlIxxo_TR
 // CHECK:         partial_apply
   let _: (NSBurrito) -> AnyObject = f
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @_T024function_conversion_objc9NSBurrito_pAaB_pXmTIxxd_AaB_ps9AnyObject_pIxxo_TR : $@convention(thin) (@owned NSBurrito, @owned @callee_owned (@owned NSBurrito) -> @thick NSBurrito.Type) -> @owned AnyObject
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @_T024function_conversion_objc9NSBurrito_pAaB_pXmTIxxd_AaB_pyXlIxxo_TR : $@convention(thin) (@owned NSBurrito, @owned @callee_owned (@owned NSBurrito) -> @thick NSBurrito.Type) -> @owned AnyObject
 // CHECK:         apply %1(%0)
 // CHECK:         thick_to_objc_metatype {{.*}} : $@thick NSBurrito.Type to $@objc_metatype NSBurrito.Type
 // CHECK:         objc_existential_metatype_to_object {{.*}} : $@objc_metatype NSBurrito.Type to $AnyObject
diff --git a/test/SILGen/generic_casts.swift b/test/SILGen/generic_casts.swift
index e5f3830..efd719c 100644
--- a/test/SILGen/generic_casts.swift
+++ b/test/SILGen/generic_casts.swift
@@ -216,7 +216,7 @@
   // CHECK: checked_cast_br {{%.*}} to $C
 }
 
-// CHECK-LABEL: sil hidden @_T013generic_casts27optional_anyobject_to_classAA1CCSgs9AnyObject_pSgF 
+// CHECK-LABEL: sil hidden @_T013generic_casts27optional_anyobject_to_classAA1CCSgyXlSgF 
 // CHECK:         checked_cast_br {{%.*}} : $AnyObject to $C
 func optional_anyobject_to_class(_ p: AnyObject?) -> C? {
   return p as? C
diff --git a/test/SILGen/imported_struct_array_field.swift b/test/SILGen/imported_struct_array_field.swift
index 7549ef5..e2e3579 100644
--- a/test/SILGen/imported_struct_array_field.swift
+++ b/test/SILGen/imported_struct_array_field.swift
@@ -1,6 +1,6 @@
 // RUN: %target-swift-frontend -emit-silgen -import-objc-header %S/Inputs/array_typedef.h %s | %FileCheck %s
 
-// CHECK-LABEL: sil shared [transparent] [serializable] @_T0So4NameV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (UInt8, UInt8, UInt8, UInt8, @thin Name.Type) -> Name
+// CHECK-LABEL: sil shared [transparent] [serializable] @_T0SC4NameV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (UInt8, UInt8, UInt8, UInt8, @thin Name.Type) -> Name
 func useImportedArrayTypedefInit() -> Name {
   return Name(name: (0, 0, 0, 0))
 }
diff --git a/test/SILGen/keypaths.swift b/test/SILGen/keypaths.swift
index 9b7e2be..e81b553 100644
--- a/test/SILGen/keypaths.swift
+++ b/test/SILGen/keypaths.swift
@@ -1,5 +1,4 @@
 // RUN: %target-swift-frontend -enable-experimental-keypaths -emit-silgen %s | %FileCheck %s
-// REQUIRES: PTRSIZE=64
 
 struct S<T> {
   var x: T
@@ -31,19 +30,19 @@
 // CHECK-LABEL: sil hidden @{{.*}}storedProperties
 func storedProperties<T>(_: T) {
   // CHECK: keypath $WritableKeyPath<S<T>, T>, <τ_0_0> (root $S<τ_0_0>; stored_property #S.x : $τ_0_0) <T>
-  _ = #keyPath2(S<T>, .x)
+  _ = \S<T>.x
   // CHECK: keypath $KeyPath<S<T>, String>, <τ_0_0> (root $S<τ_0_0>; stored_property #S.y : $String) <T>
-  _ = #keyPath2(S<T>, .y)
+  _ = \S<T>.y
   // CHECK: keypath $ReferenceWritableKeyPath<S<T>, T>, <τ_0_0> (root $S<τ_0_0>; stored_property #S.z : $C<τ_0_0>; stored_property #C.x : $τ_0_0) <T>
-  _ = #keyPath2(S<T>, .z.x)
+  _ = \S<T>.z.x
   // CHECK: keypath $ReferenceWritableKeyPath<C<T>, T>, <τ_0_0> (root $C<τ_0_0>; stored_property #C.x : $τ_0_0) <T>
-  _ = #keyPath2(C<T>, .x)
+  _ = \C<T>.x
   // CHECK: keypath $KeyPath<C<T>, String>, <τ_0_0> (root $C<τ_0_0>; stored_property #C.y : $String) <T>
-  _ = #keyPath2(C<T>, .y)
+  _ = \C<T>.y
   // CHECK: keypath $ReferenceWritableKeyPath<C<T>, T>, <τ_0_0> (root $C<τ_0_0>; stored_property #C.z : $S<τ_0_0>; stored_property #S.x : $τ_0_0) <T>
-  _ = #keyPath2(C<T>, .z.x)
+  _ = \C<T>.z.x
   // CHECK: keypath $KeyPath<C<T>, String>, <τ_0_0> (root $C<τ_0_0>; stored_property #C.z : $S<τ_0_0>; stored_property #S.z : $C<τ_0_0>; stored_property #C.y : $String) <T>
-  _ = #keyPath2(C<T>, .z.z.y)
+  _ = \C<T>.z.z.y
 }
 
 // CHECK-LABEL: sil hidden @{{.*}}computedProperties
@@ -55,7 +54,7 @@
   // CHECK-SAME:   getter @_T08keypaths1CC8nonfinalAA1SVyxGvTK : $@convention(thin) <τ_0_0> (@in C<τ_0_0>, @thick C<τ_0_0>.Type) -> @out S<τ_0_0>,
   // CHECK-SAME:   setter @_T08keypaths1CC8nonfinalAA1SVyxGvTk : $@convention(thin) <τ_0_0> (@in S<τ_0_0>, @in C<τ_0_0>, @thick C<τ_0_0>.Type) -> ()
   // CHECK-SAME: ) <T>
-  _ = #keyPath2(C<T>, .nonfinal)
+  _ = \C<T>.nonfinal
 
   // CHECK: keypath $KeyPath<C<T>, S<T>>, <τ_0_0 where τ_0_0 : P> (
   // CHECK-SAME: root $C<τ_0_0>;
@@ -63,7 +62,7 @@
   // CHECK-SAME:   id #C.computed!getter.1 : <T> (C<T>) -> () -> S<T>,
   // CHECK-SAME:   getter @_T08keypaths1CC8computedAA1SVyxGvTK : $@convention(thin) <τ_0_0> (@in C<τ_0_0>, @thick C<τ_0_0>.Type) -> @out S<τ_0_0>
   // CHECK-SAME: ) <T>
-  _ = #keyPath2(C<T>, .computed)
+  _ = \C<T>.computed
 
   // CHECK: keypath $ReferenceWritableKeyPath<C<T>, S<T>>, <τ_0_0 where τ_0_0 : P> (
   // CHECK-SAME: root $C<τ_0_0>;
@@ -72,14 +71,14 @@
   // CHECK-SAME:   getter @_T08keypaths1CC8observedAA1SVyxGvTK : $@convention(thin) <τ_0_0> (@in C<τ_0_0>, @thick C<τ_0_0>.Type) -> @out S<τ_0_0>,
   // CHECK-SAME:   setter @_T08keypaths1CC8observedAA1SVyxGvTk : $@convention(thin) <τ_0_0> (@in S<τ_0_0>, @in C<τ_0_0>, @thick C<τ_0_0>.Type) -> ()
   // CHECK-SAME: ) <T>
-  _ = #keyPath2(C<T>, .observed)
+  _ = \C<T>.observed
 
-  _ = #keyPath2(C<T>, .nonfinal.x)
-  _ = #keyPath2(C<T>, .computed.x)
-  _ = #keyPath2(C<T>, .observed.x)
-  _ = #keyPath2(C<T>, .z.computed)
-  _ = #keyPath2(C<T>, .z.observed)
-  _ = #keyPath2(C<T>, .observed.x)
+  _ = \C<T>.nonfinal.x
+  _ = \C<T>.computed.x
+  _ = \C<T>.observed.x
+  _ = \C<T>.z.computed
+  _ = \C<T>.z.observed
+  _ = \C<T>.observed.x
 
   // CHECK: keypath $ReferenceWritableKeyPath<C<T>, () -> ()>, <τ_0_0 where τ_0_0 : P> (
   // CHECK-SAME: root $C<τ_0_0>;
@@ -88,14 +87,14 @@
   // CHECK-SAME:   getter @_T08keypaths1CC12reabstractedyycvTK : $@convention(thin) <τ_0_0> (@in C<τ_0_0>, @thick C<τ_0_0>.Type) -> @out @callee_owned (@in ()) -> @out (),
   // CHECK-SAME:   setter @_T08keypaths1CC12reabstractedyycvTk : $@convention(thin) <τ_0_0> (@in @callee_owned (@in ()) -> @out (), @in C<τ_0_0>, @thick C<τ_0_0>.Type) -> ()
   // CHECK-SAME: ) <T>
-  _ = #keyPath2(C<T>, .reabstracted)
+  _ = \C<T>.reabstracted
 
   // CHECK: keypath $KeyPath<S<T>, C<T>>, <τ_0_0 where τ_0_0 : P> (
   // CHECK-SAME: root $S<τ_0_0>; gettable_property $C<τ_0_0>,
   // CHECK-SAME: id @_T08keypaths1SV8computedAA1CCyxGfg : $@convention(method) <τ_0_0> (@in_guaranteed S<τ_0_0>) -> @owned C<τ_0_0>,
   // CHECK-SAME:   getter @_T08keypaths1SV8computedAA1CCyxGvTK : $@convention(thin) <τ_0_0> (@in S<τ_0_0>, @thick S<τ_0_0>.Type) -> @out C<τ_0_0>
   // CHECK-SAME: ) <T>
-  _ = #keyPath2(S<T>, .computed)
+  _ = \S<T>.computed
 
   // CHECK: keypath $WritableKeyPath<S<T>, C<T>>, <τ_0_0 where τ_0_0 : P> (
   // CHECK-SAME: root $S<τ_0_0>;
@@ -104,12 +103,12 @@
   // CHECK-SAME:   getter @_T08keypaths1SV8observedAA1CCyxGvTK : $@convention(thin) <τ_0_0> (@in S<τ_0_0>, @thick S<τ_0_0>.Type) -> @out C<τ_0_0>,
   // CHECK-SAME:   setter @_T08keypaths1SV8observedAA1CCyxGvTk : $@convention(thin) <τ_0_0> (@in C<τ_0_0>, @inout S<τ_0_0>, @thick S<τ_0_0>.Type) -> ()
   // CHECK-SAME: ) <T>
-  _ = #keyPath2(S<T>, .observed)
-  _ = #keyPath2(S<T>, .z.nonfinal)
-  _ = #keyPath2(S<T>, .z.computed)
-  _ = #keyPath2(S<T>, .z.observed)
-  _ = #keyPath2(S<T>, .computed.x)
-  _ = #keyPath2(S<T>, .computed.y)
+  _ = \S<T>.observed
+  _ = \S<T>.z.nonfinal
+  _ = \S<T>.z.computed
+  _ = \S<T>.z.observed
+  _ = \S<T>.computed.x
+  _ = \S<T>.computed.y
   // CHECK: keypath $WritableKeyPath<S<T>, () -> ()>, <τ_0_0 where τ_0_0 : P> (
   // CHECK-SAME:  root $S<τ_0_0>;
   // CHECK-SAME:  settable_property $() -> (),
@@ -117,7 +116,7 @@
   // CHECK-SAME:    getter @_T08keypaths1SV12reabstractedyycvTK : $@convention(thin) <τ_0_0> (@in S<τ_0_0>, @thick S<τ_0_0>.Type) -> @out @callee_owned (@in ()) -> @out (),
   // CHECK-SAME:    setter @_T08keypaths1SV12reabstractedyycvTk : $@convention(thin) <τ_0_0> (@in @callee_owned (@in ()) -> @out (), @inout S<τ_0_0>, @thick S<τ_0_0>.Type) -> ()
   // CHECK-SAME: ) <T>
-  _ = #keyPath2(S<T>, .reabstracted)
+  _ = \S<T>.reabstracted
 
   // CHECK: keypath $KeyPath<T, Int>, <τ_0_0 where τ_0_0 : P> (
   // CHECK-SAME: root $τ_0_0;
@@ -125,7 +124,7 @@
   // CHECK-SAME:   id #P.x!getter.1 : <Self where Self : P> (Self) -> () -> Int,
   // CHECK-SAME:   getter @_T08keypaths1PP1xSivTK : $@convention(thin) <τ_0_0 where τ_0_0 : P> (@in τ_0_0) -> @out Int
   // CHECK-SAME: ) <T>
-  _ = #keyPath2(T, .x)
+  _ = \T.x
   // CHECK: keypath $WritableKeyPath<T, String>, <τ_0_0 where τ_0_0 : P> (
   // CHECK-SAME: root $τ_0_0;
   // CHECK-SAME: settable_property $String,
@@ -133,5 +132,5 @@
   // CHECK-SAME:   getter @_T08keypaths1PP1ySSvTK : $@convention(thin) <τ_0_0 where τ_0_0 : P> (@in τ_0_0) -> @out String,
   // CHECK-SAME:   setter @_T08keypaths1PP1ySSvTk : $@convention(thin) <τ_0_0 where τ_0_0 : P> (@in String, @inout τ_0_0) -> ()
   // CHECK-SAME: ) <T>
-  _ = #keyPath2(T, .y)
+  _ = \T.y
 }
diff --git a/test/SILGen/keypaths_objc.swift b/test/SILGen/keypaths_objc.swift
index 1b1acb3..f7bb669 100644
--- a/test/SILGen/keypaths_objc.swift
+++ b/test/SILGen/keypaths_objc.swift
@@ -25,21 +25,21 @@
 // CHECK-LABEL: sil hidden @_T013keypaths_objc0B8KeypathsyyF
 func objcKeypaths() {
   // CHECK: keypath $WritableKeyPath<NonObjC, Int>, (root
-  _ = #keyPath2(NonObjC, .x)
+  _ = \NonObjC.x
   // CHECK: keypath $WritableKeyPath<NonObjC, NSObject>, (root
-  _ = #keyPath2(NonObjC, .y)
+  _ = \NonObjC.y
   // CHECK: keypath $KeyPath<Foo, Int>, (objc "int"
-  _ = #keyPath2(Foo, .int)
+  _ = \Foo.int
   // CHECK: keypath $KeyPath<Foo, Bar>, (objc "bar"
-  _ = #keyPath2(Foo, .bar)
+  _ = \Foo.bar
   // CHECK: keypath $KeyPath<Foo, Foo>, (objc "bar.foo"
-  _ = #keyPath2(Foo, .bar.foo)
+  _ = \Foo.bar.foo
   // CHECK: keypath $KeyPath<Foo, Bar>, (objc "bar.foo.bar"
-  _ = #keyPath2(Foo, .bar.foo.bar)
+  _ = \Foo.bar.foo.bar
   // CHECK: keypath $KeyPath<Foo, NonObjC>, (root
-  _ = #keyPath2(Foo, .nonobjc)
+  _ = \Foo.nonobjc
   // CHECK: keypath $KeyPath<Foo, NSObject>, (root
-  _ = #keyPath2(Foo, .bar.foo.nonobjc.y)
+  _ = \Foo.bar.foo.nonobjc.y
   // CHECK: keypath $KeyPath<Foo, Bar>, (objc "thisIsADifferentName"
-  _ = #keyPath2(Foo, .differentName)
+  _ = \Foo.differentName
 }
diff --git a/test/SILGen/mangling.swift b/test/SILGen/mangling.swift
index 2e28bf8..95748e1 100644
--- a/test/SILGen/mangling.swift
+++ b/test/SILGen/mangling.swift
@@ -81,7 +81,9 @@
 func uses_objc_class_and_protocol(o o: NSObject, p: NSAnsing) {}
 
 // Clang-imported structs get mangled using their Clang module name.
-// CHECK-LABEL: sil hidden @_T08mangling17uses_clang_structySo6NSRectV1r_tF
+// FIXME: Temporarily mangles everything into the virtual module __C__
+// <rdar://problem/14221244>
+// CHECK-LABEL: sil hidden @_T08mangling17uses_clang_structySC6NSRectV1r_tF
 func uses_clang_struct(r r: NSRect) {}
 
 // CHECK-LABEL: sil hidden @_T08mangling14uses_optionalsScSgSiSg1x_tF
diff --git a/test/SILGen/materializeForSet.swift b/test/SILGen/materializeForSet.swift
index e2973d7..1e71787 100644
--- a/test/SILGen/materializeForSet.swift
+++ b/test/SILGen/materializeForSet.swift
@@ -12,7 +12,7 @@
 // CHECK:   return [[T3]] : $(Builtin.RawPointer, Optional<Builtin.RawPointer>)
 // CHECK: }
 
-// CHECK-LABEL: sil hidden [transparent] @_T017materializeForSet4BaseC8computedSifmytfU_ : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout Base, @thick Base.Type) -> () {
+// CHECK-LABEL: sil private [transparent] @_T017materializeForSet4BaseC8computedSifmytfU_ : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout Base, @thick Base.Type) -> () {
 // CHECK: bb0([[BUFFER:%.*]] : $Builtin.RawPointer, [[STORAGE:%.*]] : $*Builtin.UnsafeValueBuffer, [[SELF:%.*]] : $*Base, [[SELFTYPE:%.*]] : $@thick Base.Type):
 // CHECK:   [[T0:%.*]] = load_borrow [[SELF]]
 // CHECK:   [[T1:%.*]] = pointer_to_address [[BUFFER]] : $Builtin.RawPointer to [strict] $*Int
@@ -246,7 +246,7 @@
     didSet {}
   }
 
-// CHECK-LABEL: sil hidden [transparent] @_T017materializeForSet012HasStoredDidC0C6storedSifmytfU_ : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout HasStoredDidSet, @thick HasStoredDidSet.Type) -> () {
+// CHECK-LABEL: sil private [transparent] @_T017materializeForSet012HasStoredDidC0C6storedSifmytfU_ : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout HasStoredDidSet, @thick HasStoredDidSet.Type) -> () {
 // CHECK: bb0([[BUFFER:%.*]] : $Builtin.RawPointer, [[STORAGE:%.*]] : $*Builtin.UnsafeValueBuffer, [[SELF:%.*]] : $*HasStoredDidSet, [[METATYPE:%.*]] : $@thick HasStoredDidSet.Type):
 // CHECK:   [[SELF_VALUE:%.*]] = load_borrow [[SELF]] : $*HasStoredDidSet
 // CHECK:   [[BUFFER_ADDR:%.*]] = pointer_to_address [[BUFFER]] : $Builtin.RawPointer to [strict] $*Int
@@ -372,7 +372,7 @@
   subscript<T>(_: T) -> T { get { } set { } }
 }
 
-// CHECK-LABEL: sil hidden [transparent] @_T017materializeForSet23GenericSubscriptWitnessV9subscriptxxclufmytfU_ : $@convention(method) <T> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout GenericSubscriptWitness, @thick GenericSubscriptWitness.Type) -> () {
+// CHECK-LABEL: sil private [transparent] @_T017materializeForSet23GenericSubscriptWitnessV9subscriptxxclufmytfU_ : $@convention(method) <T> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout GenericSubscriptWitness, @thick GenericSubscriptWitness.Type) -> () {
 // CHECK:       bb0(%0 : $Builtin.RawPointer, %1 : $*Builtin.UnsafeValueBuffer, %2 : $*GenericSubscriptWitness, %3 : $@thick GenericSubscriptWitness.Type):
 // CHECK:         [[BUFFER:%.*]] = project_value_buffer $T in %1 : $*Builtin.UnsafeValueBuffer
 // CHECK-NEXT:    [[INDICES:%.*]] = pointer_to_address %0 : $Builtin.RawPointer to [strict] $*T
diff --git a/test/SILGen/metatype_object_conversion.swift b/test/SILGen/metatype_object_conversion.swift
index 3f6eb8f..c40a43c 100644
--- a/test/SILGen/metatype_object_conversion.swift
+++ b/test/SILGen/metatype_object_conversion.swift
@@ -10,7 +10,7 @@
 
 @objc protocol OP {}
 
-// CHECK-LABEL: sil hidden @_T026metatype_object_conversion0A8ToObjects03AnyE0_pAA1CCmF 
+// CHECK-LABEL: sil hidden @_T026metatype_object_conversion0A8ToObjectyXlAA1CCmF 
 func metatypeToObject(_ x: C.Type) -> AnyObject {
   // CHECK: bb0([[THICK:%.*]] : $@thick C.Type):
   // CHECK:   [[OBJC:%.*]] = thick_to_objc_metatype [[THICK]]
@@ -19,7 +19,7 @@
   return x
 }
 
-// CHECK-LABEL: sil hidden @_T026metatype_object_conversion27existentialMetatypeToObjects03AnyG0_pAA2CP_pXpF
+// CHECK-LABEL: sil hidden @_T026metatype_object_conversion27existentialMetatypeToObjectyXlAA2CP_pXpF
 func existentialMetatypeToObject(_ x: CP.Type) -> AnyObject {
   // CHECK: bb0([[THICK:%.*]] : $@thick CP.Type):
   // CHECK:   [[OBJC:%.*]] = thick_to_objc_metatype [[THICK]]
diff --git a/test/SILGen/newtype.swift b/test/SILGen/newtype.swift
index faf8e4e..ae643fc 100644
--- a/test/SILGen/newtype.swift
+++ b/test/SILGen/newtype.swift
@@ -15,7 +15,7 @@
   return ErrorDomain(rawValue: str)
 }
 
-// CHECK-RAW-LABEL: sil shared [transparent] [serializable] @_T0So11ErrorDomainVABSS8rawValue_tcfC
+// CHECK-RAW-LABEL: sil shared [transparent] [serializable] @_T0SC11ErrorDomainVABSS8rawValue_tcfC
 // CHECK-RAW: bb0([[STR:%[0-9]+]] : $String,
 // CHECK-RAW: [[SELF_BOX:%[0-9]+]] = alloc_box ${ var ErrorDomain }, var, name "self"
 // CHECK-RAW: [[MARKED_SELF_BOX:%[0-9]+]] = mark_uninitialized [rootself] [[SELF_BOX]]
@@ -32,7 +32,7 @@
   return ed.rawValue
 }
 
-// CHECK-RAW-LABEL: sil shared [serializable] @_T0So11ErrorDomainV8rawValueSSfg
+// CHECK-RAW-LABEL: sil shared [serializable] @_T0SC11ErrorDomainV8rawValueSSfg
 // CHECK-RAW: bb0([[SELF:%[0-9]+]] : $ErrorDomain):
 // CHECK-RAW: [[FORCE_BRIDGE:%[0-9]+]] = function_ref @_forceBridgeFromObjectiveC_bridgeable
 // CHECK-RAW: [[STRING_RESULT_ADDR:%[0-9]+]] = alloc_stack $String
@@ -44,14 +44,14 @@
 // CHECK-RAW: return [[STRING_RESULT]]
 
 class ObjCTest {
-  // CHECK-RAW-LABEL: sil hidden @_T07newtype8ObjCTestC19optionalPassThroughSo11ErrorDomainVSgAGF : $@convention(method) (@owned Optional<ErrorDomain>, @guaranteed ObjCTest) -> @owned Optional<ErrorDomain> {
-  // CHECK-RAW: sil hidden [thunk] @_T07newtype8ObjCTestC19optionalPassThroughSo11ErrorDomainVSgAGFTo : $@convention(objc_method) (Optional<ErrorDomain>, ObjCTest) -> Optional<ErrorDomain> {
+  // CHECK-RAW-LABEL: sil hidden @_T07newtype8ObjCTestC19optionalPassThroughSC11ErrorDomainVSgAGF : $@convention(method) (@owned Optional<ErrorDomain>, @guaranteed ObjCTest) -> @owned Optional<ErrorDomain> {
+  // CHECK-RAW: sil hidden [thunk] @_T07newtype8ObjCTestC19optionalPassThroughSC11ErrorDomainVSgAGFTo : $@convention(objc_method) (Optional<ErrorDomain>, ObjCTest) -> Optional<ErrorDomain> {
   @objc func optionalPassThrough(_ ed: ErrorDomain?) -> ErrorDomain? {
     return ed
   }  
 
-  // CHECK-RAW-LABEL: sil hidden @_T07newtype8ObjCTestC18integerPassThroughSo5MyIntVAFF : $@convention(method) (MyInt, @guaranteed ObjCTest) -> MyInt {
-  // CHECK-RAW: sil hidden [thunk] @_T07newtype8ObjCTestC18integerPassThroughSo5MyIntVAFFTo : $@convention(objc_method) (MyInt, ObjCTest) -> MyInt {
+  // CHECK-RAW-LABEL: sil hidden @_T07newtype8ObjCTestC18integerPassThroughSC5MyIntVAFF : $@convention(method) (MyInt, @guaranteed ObjCTest) -> MyInt {
+  // CHECK-RAW: sil hidden [thunk] @_T07newtype8ObjCTestC18integerPassThroughSC5MyIntVAFFTo : $@convention(objc_method) (MyInt, ObjCTest) -> MyInt {
   @objc func integerPassThrough(_ ed: MyInt) -> MyInt {
     return ed
   }  
diff --git a/test/SILGen/objc_attr_NSManaged_multi.swift b/test/SILGen/objc_attr_NSManaged_multi.swift
index c70c3fc..42749fa 100644
--- a/test/SILGen/objc_attr_NSManaged_multi.swift
+++ b/test/SILGen/objc_attr_NSManaged_multi.swift
@@ -4,7 +4,7 @@
 
 import Foundation
 
-// CHECK-LABEL: sil hidden @_T025objc_attr_NSManaged_multi9testMultis9AnyObject_pAA10SwiftGizmoCF : $@convention(thin) (@owned SwiftGizmo) -> @owned AnyObject {
+// CHECK-LABEL: sil hidden @_T025objc_attr_NSManaged_multi9testMultiyXlAA10SwiftGizmoCF : $@convention(thin) (@owned SwiftGizmo) -> @owned AnyObject {
 // CHECK: bb0([[ARG:%.*]] : $SwiftGizmo):
 // CHECK: [[BORROWED_ARG:%.*]] = begin_borrow [[ARG]]
 // CHECK: = class_method [volatile] [[BORROWED_ARG]] : $SwiftGizmo, #SwiftGizmo.kvc!1.foreign : (SwiftGizmo) -> () -> (), $@convention(objc_method) (SwiftGizmo) -> ()
diff --git a/test/SILGen/objc_bridging.swift b/test/SILGen/objc_bridging.swift
index a86f0a4..e560ded 100644
--- a/test/SILGen/objc_bridging.swift
+++ b/test/SILGen/objc_bridging.swift
@@ -467,7 +467,7 @@
     super.init()
   }
 
-  // CHECK-LABEL: sil hidden [thunk] @_T013objc_bridging3BasC8arrayArgySays9AnyObject_pGFTo : $@convention(objc_method) (NSArray, Bas) -> ()
+  // CHECK-LABEL: sil hidden [thunk] @_T013objc_bridging3BasC8arrayArgySayyXlGFTo : $@convention(objc_method) (NSArray, Bas) -> ()
   // CHECK: bb0([[NSARRAY:%[0-9]+]] : $NSArray, [[SELF:%[0-9]+]] : $Bas):
   // CHECK:   [[NSARRAY_COPY:%.*]] = copy_value [[NSARRAY]] : $NSArray
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]] : $Bas
@@ -476,18 +476,18 @@
   // CHECK:   [[ARRAY_META:%[0-9]+]] = metatype $@thin Array<AnyObject>.Type
   // CHECK:   [[ARRAY:%[0-9]+]] = apply [[CONV_FN]]<AnyObject>([[OPT_NSARRAY]], [[ARRAY_META]])
   // CHECK:   [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
-  // CHECK:   [[SWIFT_FN:%[0-9]+]] = function_ref @_T013objc_bridging3BasC8arrayArgySays9AnyObject_pGF : $@convention(method) (@owned Array<AnyObject>, @guaranteed Bas) -> ()
+  // CHECK:   [[SWIFT_FN:%[0-9]+]] = function_ref @_T013objc_bridging3BasC8arrayArgySayyXlGF : $@convention(method) (@owned Array<AnyObject>, @guaranteed Bas) -> ()
   // CHECK:   [[RESULT:%[0-9]+]] = apply [[SWIFT_FN]]([[ARRAY]], [[BORROWED_SELF_COPY]]) : $@convention(method) (@owned Array<AnyObject>, @guaranteed Bas) -> ()
   // CHECK:   end_borrow [[BORROWED_SELF_COPY]] from [[SELF_COPY]]
   // CHECK:   destroy_value [[SELF_COPY]] : $Bas
   // CHECK:   return [[RESULT]] : $()
   func arrayArg(_ array: [AnyObject]) { }
   
-  // CHECK-LABEL: sil hidden [thunk] @_T013objc_bridging3BasC11arrayResultSays9AnyObject_pGyFTo : $@convention(objc_method) (Bas) -> @autoreleased NSArray
+  // CHECK-LABEL: sil hidden [thunk] @_T013objc_bridging3BasC11arrayResultSayyXlGyFTo : $@convention(objc_method) (Bas) -> @autoreleased NSArray
   // CHECK: bb0([[SELF:%[0-9]+]] : $Bas):
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]] : $Bas
   // CHECK:   [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
-  // CHECK:   [[SWIFT_FN:%[0-9]+]] = function_ref @_T013objc_bridging3BasC11arrayResultSays9AnyObject_pGyF : $@convention(method) (@guaranteed Bas) -> @owned Array<AnyObject>
+  // CHECK:   [[SWIFT_FN:%[0-9]+]] = function_ref @_T013objc_bridging3BasC11arrayResultSayyXlGyF : $@convention(method) (@guaranteed Bas) -> @owned Array<AnyObject>
   // CHECK:   [[ARRAY:%[0-9]+]] = apply [[SWIFT_FN]]([[BORROWED_SELF_COPY]]) : $@convention(method) (@guaranteed Bas) -> @owned Array<AnyObject>
   // CHECK:   end_borrow [[BORROWED_SELF_COPY]] from [[SELF_COPY]]
   // CHECK:   destroy_value [[SELF_COPY]]
@@ -533,7 +533,7 @@
 
 // CHECK-LABEL: sil hidden @_T013objc_bridging15bridgeCFunction{{.*}}F
 func bridgeCFunction() -> (String!) -> (String!) {
-  // CHECK: [[THUNK:%.*]] = function_ref @_T0So18NSStringFromStringSQySSGABFTO : $@convention(thin) (@owned Optional<String>) -> @owned Optional<String>
+  // CHECK: [[THUNK:%.*]] = function_ref @_T0SC18NSStringFromStringSQySSGABFTO : $@convention(thin) (@owned Optional<String>) -> @owned Optional<String>
   // CHECK: [[THICK:%.*]] = thin_to_thick_function [[THUNK]]
   // CHECK: return [[THICK]]
   return NSStringFromString
@@ -548,9 +548,9 @@
 // arguments lifetime-extends the bridged pointer for the right duration.
 // <rdar://problem/16738050>
 
-// CHECK-LABEL: sil shared [serializable] @_T0So7NSArrayCABSQySPys9AnyObject_pSgGG7objects_s5Int32V5counttcfC
+// CHECK-LABEL: sil shared [serializable] @_T0So7NSArrayCABSQySPyyXlSgGG7objects_s5Int32V5counttcfC
 // CHECK:         [[SELF:%.*]] = alloc_ref_dynamic
-// CHECK:         [[METHOD:%.*]] = function_ref @_T0So7NSArrayCABSQySPys9AnyObject_pSgGG7objects_s5Int32V5counttcfcTO
+// CHECK:         [[METHOD:%.*]] = function_ref @_T0So7NSArrayCABSQySPyyXlSgGG7objects_s5Int32V5counttcfcTO
 // CHECK:         [[RESULT:%.*]] = apply [[METHOD]]
 // CHECK:         return [[RESULT]]
 
diff --git a/test/SILGen/objc_bridging_any.swift b/test/SILGen/objc_bridging_any.swift
index 63fe671..f8488bb 100644
--- a/test/SILGen/objc_bridging_any.swift
+++ b/test/SILGen/objc_bridging_any.swift
@@ -139,7 +139,7 @@
   // CHECK:   [[ERROR_BOX:%[0-9]+]] = open_existential_box [[ERROR_COPY]] : $Error to $*@opened([[ERROR_ARCHETYPE:"[^"]*"]]) Error
   // CHECK:   [[ERROR_STACK:%[0-9]+]] = alloc_stack $@opened([[ERROR_ARCHETYPE]]) Error
   // CHECK:   copy_addr [[ERROR_BOX]] to [initialization] [[ERROR_STACK]] : $*@opened([[ERROR_ARCHETYPE]]) Error
-  // CHECK:   [[BRIDGE_FUNCTION:%[0-9]+]] = function_ref @_T0s27_bridgeAnythingToObjectiveCs9AnyObject_pxlF
+  // CHECK:   [[BRIDGE_FUNCTION:%[0-9]+]] = function_ref @_T0s27_bridgeAnythingToObjectiveCyXlxlF
   // CHECK:   [[BRIDGED_ERROR:%[0-9]+]] = apply [[BRIDGE_FUNCTION]]<@opened([[ERROR_ARCHETYPE]]) Error>([[ERROR_STACK]])
   // CHECK:   dealloc_stack [[ERROR_STACK]] : $*@opened([[ERROR_ARCHETYPE]]) Error
   // CHECK:   destroy_value [[ERROR_COPY]] : $Error
@@ -182,7 +182,7 @@
   // CHECK:   [[METHOD:%.*]] = class_method [volatile] [[BORROWED_SELF]] : $NSIdLover,
   // CHECK:   [[BORROWED_OPT_STRING:%.*]] = begin_borrow [[OPT_STRING]]
   // CHECK:   [[OPT_STRING_COPY:%.*]] = copy_value [[BORROWED_OPT_STRING]]
-  // CHECK:   [[BRIDGE_OPTIONAL:%.*]] = function_ref @_T0Sq19_bridgeToObjectiveCs9AnyObject_pyF
+  // CHECK:   [[BRIDGE_OPTIONAL:%.*]] = function_ref @_T0Sq19_bridgeToObjectiveCyXlyF
   // CHECK:   [[TMP:%.*]] = alloc_stack $Optional<String>
   // CHECK:   store [[OPT_STRING_COPY]] to [init] [[TMP]]
   // CHECK:   [[ANYOBJECT:%.*]] = apply [[BRIDGE_OPTIONAL]]<String>([[TMP]])
@@ -195,7 +195,7 @@
   // CHECK:   [[METHOD:%.*]] = class_method [volatile] [[BORROWED_SELF]] : $NSIdLover,
   // CHECK:   [[BORROWED_OPT_NSSTRING:%.*]] = begin_borrow [[OPT_NSSTRING]]
   // CHECK:   [[OPT_NSSTRING_COPY:%.*]] = copy_value [[BORROWED_OPT_NSSTRING]]
-  // CHECK:   [[BRIDGE_OPTIONAL:%.*]] = function_ref @_T0Sq19_bridgeToObjectiveCs9AnyObject_pyF
+  // CHECK:   [[BRIDGE_OPTIONAL:%.*]] = function_ref @_T0Sq19_bridgeToObjectiveCyXlyF
   // CHECK:   [[TMP:%.*]] = alloc_stack $Optional<NSString>
   // CHECK:   store [[OPT_NSSTRING_COPY]] to [init] [[TMP]]
   // CHECK:   [[ANYOBJECT:%.*]] = apply [[BRIDGE_OPTIONAL]]<NSString>([[TMP]])
@@ -208,7 +208,7 @@
   // CHECK:   [[METHOD:%.*]] = class_method [volatile] [[BORROWED_SELF]] : $NSIdLover,
   // CHECK:   [[TMP:%.*]] = alloc_stack $Optional<Any>
   // CHECK:   copy_addr [[OPT_ANY]] to [initialization] [[TMP]]
-  // CHECK:   [[BRIDGE_OPTIONAL:%.*]] = function_ref @_T0Sq19_bridgeToObjectiveCs9AnyObject_pyF
+  // CHECK:   [[BRIDGE_OPTIONAL:%.*]] = function_ref @_T0Sq19_bridgeToObjectiveCyXlyF
   // CHECK:   [[ANYOBJECT:%.*]] = apply [[BRIDGE_OPTIONAL]]<Any>([[TMP]])
   // CHECK:   apply [[METHOD]]([[ANYOBJECT]], [[BORROWED_SELF]])
   // CHECK:   end_borrow [[BORROWED_SELF]] from [[SELF]]
@@ -383,7 +383,7 @@
   // CHECK-NEXT: [[ERROR_BOX:%[0-9]+]] = open_existential_box [[ERROR_COPY]] : $Error to $*@opened([[ERROR_ARCHETYPE:"[^"]*"]]) Error
   // CHECK-NEXT: [[ERROR_STACK:%[0-9]+]] = alloc_stack $@opened([[ERROR_ARCHETYPE]]) Error
   // CHECK-NEXT: copy_addr [[ERROR_BOX]] to [initialization] [[ERROR_STACK]] : $*@opened([[ERROR_ARCHETYPE]]) Error
-  // CHECK: [[BRIDGE_FUNCTION:%[0-9]+]] = function_ref @_T0s27_bridgeAnythingToObjectiveCs9AnyObject_pxlF
+  // CHECK: [[BRIDGE_FUNCTION:%[0-9]+]] = function_ref @_T0s27_bridgeAnythingToObjectiveCyXlxlF
   // CHECK-NEXT: [[BRIDGED_ERROR:%[0-9]+]] = apply [[BRIDGE_FUNCTION]]<@opened([[ERROR_ARCHETYPE]]) Error>([[ERROR_STACK]])
   // CHECK-NEXT: [[BRIDGED_ERROR_OPT:%[0-9]+]] = enum $Optional<AnyObject>, #Optional.some!enumelt.1, [[BRIDGED_ERROR]] : $AnyObject
   // CHECK-NEXT: dealloc_stack [[ERROR_STACK]] : $*@opened([[ERROR_ARCHETYPE]]) Error
@@ -545,7 +545,7 @@
   // CHECK:    bb0([[BLOCK:%.*]] : $@convention(block) (AnyObject) -> (), [[SELF:%.*]] : $SwiftIdLover):
   // CHECK-NEXT:  [[BLOCK_COPY:%.*]] = copy_block [[BLOCK]]
   // CHECK-NEXT:  [[SELF_COPY:%.*]] = copy_value [[SELF]]
-  // CHECK:       [[THUNK_FN:%.*]] = function_ref @_T0s9AnyObject_pIyBy_ypIxi_TR
+  // CHECK:       [[THUNK_FN:%.*]] = function_ref @_T0yXlIyBy_ypIxi_TR
   // CHECK-NEXT:  [[THUNK:%.*]] = partial_apply [[THUNK_FN]]([[BLOCK_COPY]])
   // CHECK:       [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
   // CHECK-NEXT:  // function_ref
@@ -555,7 +555,7 @@
   // CHECK-NEXT:  destroy_value [[SELF_COPY]]
   // CHECK-NEXT:  return [[RESULT]]
 
-  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @_T0s9AnyObject_pIyBy_ypIxi_TR
+  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @_T0yXlIyBy_ypIxi_TR
   // CHECK:     bb0([[ANY:%.*]] : $*Any, [[BLOCK:%.*]] : $@convention(block) (AnyObject) -> ()):
   // CHECK-NEXT:  [[OPENED_ANY:%.*]] = open_existential_addr immutable_access [[ANY]] : $*Any to $*[[OPENED_TYPE:@opened.*Any]],
 	// CHECK:   [[TMP:%.*]] = alloc_stack
@@ -587,14 +587,14 @@
   // CHECK-NEXT:  [[BLOCK_STORAGE:%.*]] = alloc_stack $@block_storage @callee_owned (@in Any) -> ()
   // CHECK-NEXT:  [[BLOCK_STORAGE_ADDR:%.*]] = project_block_storage [[BLOCK_STORAGE]]
   // CHECK-NEXT:  store [[RESULT:%.*]] to [init] [[BLOCK_STORAGE_ADDR]]
-  // CHECK:       [[THUNK_FN:%.*]] = function_ref @_T0ypIxi_s9AnyObject_pIyBy_TR
+  // CHECK:       [[THUNK_FN:%.*]] = function_ref @_T0ypIxi_yXlIyBy_TR
   // CHECK-NEXT:  [[BLOCK_HEADER:%.*]] = init_block_storage_header [[BLOCK_STORAGE]] : $*@block_storage @callee_owned (@in Any) -> (), invoke [[THUNK_FN]]
   // CHECK-NEXT:  [[BLOCK:%.*]] = copy_block [[BLOCK_HEADER]]
   // CHECK-NEXT:  dealloc_stack [[BLOCK_STORAGE]]
   // CHECK-NEXT:  destroy_value [[RESULT]]
   // CHECK-NEXT:  return [[BLOCK]]
 
-  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @_T0ypIxi_s9AnyObject_pIyBy_TR : $@convention(c) (@inout_aliasable @block_storage @callee_owned (@in Any) -> (), AnyObject) -> ()
+  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @_T0ypIxi_yXlIyBy_TR : $@convention(c) (@inout_aliasable @block_storage @callee_owned (@in Any) -> (), AnyObject) -> ()
   // CHECK:     bb0([[BLOCK_STORAGE:%.*]] : $*@block_storage @callee_owned (@in Any) -> (), [[ANY:%.*]] : $AnyObject):
   // CHECK-NEXT:  [[BLOCK_STORAGE_ADDR:%.*]] = project_block_storage [[BLOCK_STORAGE]]
   // CHECK-NEXT:  [[FUNCTION:%.*]] = load [copy] [[BLOCK_STORAGE_ADDR]]
@@ -620,7 +620,7 @@
   // CHECK-NEXT:  [[BLOCK_COPY:%.*]] = copy_block [[BLOCK]]
   // CHECK-NEXT:  [[ANY_COPY:%.*]] = copy_value [[ANY]]
   // CHECK-NEXT:  // function_ref
-  // CHECK-NEXT:  [[THUNK_FN:%.*]] = function_ref @_T0s9AnyObject_pIyBa_ypIxr_TR
+  // CHECK-NEXT:  [[THUNK_FN:%.*]] = function_ref @_T0yXlIyBa_ypIxr_TR
   // CHECK-NEXT:  [[THUNK:%.*]] = partial_apply [[THUNK_FN]]([[BLOCK_COPY]])
   // CHECK-NEXT:  [[BORROWED_ANY_COPY:%.*]] = begin_borrow [[ANY_COPY]]
   // CHECK-NEXT:  // function_ref
@@ -630,7 +630,7 @@
   // CHECK-NEXT:  destroy_value [[ANY_COPY]]
   // CHECK-NEXT:  return [[RESULT]]
 
-  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @_T0s9AnyObject_pIyBa_ypIxr_TR : $@convention(thin) (@owned @convention(block) () -> @autoreleased AnyObject) -> @out Any
+  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @_T0yXlIyBa_ypIxr_TR : $@convention(thin) (@owned @convention(block) () -> @autoreleased AnyObject) -> @out Any
   // CHECK:     bb0([[ANY_ADDR:%.*]] : $*Any, [[BLOCK:%.*]] : $@convention(block) () -> @autoreleased AnyObject):
   // CHECK-NEXT:  [[BRIDGED:%.*]] = apply [[BLOCK]]()
   // CHECK-NEXT:  [[OPTIONAL:%.*]] = unchecked_ref_cast [[BRIDGED]]
@@ -665,14 +665,14 @@
   // CHECK-NEXT:  [[BLOCK_STORAGE_ADDR:%.*]] = project_block_storage [[BLOCK_STORAGE]]
   // CHECK-NEXT:  store [[FUNCTION]] to [init] [[BLOCK_STORAGE_ADDR]]
   // CHECK-NEXT:  // function_ref
-  // CHECK-NEXT:  [[THUNK_FN:%.*]] = function_ref @_T0ypIxr_s9AnyObject_pIyBa_TR
+  // CHECK-NEXT:  [[THUNK_FN:%.*]] = function_ref @_T0ypIxr_yXlIyBa_TR
   // CHECK-NEXT:  [[BLOCK_HEADER:%.*]] = init_block_storage_header [[BLOCK_STORAGE]] : $*@block_storage @callee_owned () -> @out Any, invoke [[THUNK_FN]]
   // CHECK-NEXT:  [[BLOCK:%.*]] = copy_block [[BLOCK_HEADER]]
   // CHECK-NEXT:  dealloc_stack [[BLOCK_STORAGE]]
   // CHECK-NEXT:  destroy_value [[FUNCTION]]
   // CHECK-NEXT:  return [[BLOCK]]
 
-  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @_T0ypIxr_s9AnyObject_pIyBa_TR : $@convention(c) (@inout_aliasable @block_storage @callee_owned () -> @out Any) -> @autoreleased AnyObject
+  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @_T0ypIxr_yXlIyBa_TR : $@convention(c) (@inout_aliasable @block_storage @callee_owned () -> @out Any) -> @autoreleased AnyObject
   // CHECK:     bb0(%0 : $*@block_storage @callee_owned () -> @out Any):
   // CHECK-NEXT:  [[BLOCK_STORAGE_ADDR:%.*]] = project_block_storage %0
   // CHECK-NEXT:  [[FUNCTION:%.*]] = load [copy] [[BLOCK_STORAGE_ADDR]]
@@ -694,7 +694,7 @@
   @objc func methodReturningBlockReturningAny() -> (() -> Any) {}
 
   @objc func methodReturningBlockReturningOptionalAny() -> (() -> Any?) {}
-  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @_T0ypSgIxr_s9AnyObject_pSgIyBa_TR
+  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @_T0ypSgIxr_yXlSgIyBa_TR
   // CHECK: function_ref @_T0s27_bridgeAnythingToObjectiveC{{.*}}F
 
   override init() { super.init() }
@@ -743,5 +743,5 @@
 
 // CHECK-LABEL: sil_witness_table shared [serialized] GenericOption: Hashable module objc_generics {
 // CHECK-NEXT: base_protocol Equatable: GenericOption: Equatable module objc_generics
-// CHECK-NEXT: method #Hashable.hashValue!getter.1: {{.*}} : @_T0So13GenericOptionVs8Hashable13objc_genericssACP9hashValueSifgTW
+// CHECK-NEXT: method #Hashable.hashValue!getter.1: {{.*}} : @_T0SC13GenericOptionVs8Hashable13objc_genericssACP9hashValueSifgTW
 // CHECK-NEXT: }
diff --git a/test/SILGen/objc_currying.swift b/test/SILGen/objc_currying.swift
index 7ff5963..89e3332 100644
--- a/test/SILGen/objc_currying.swift
+++ b/test/SILGen/objc_currying.swift
@@ -126,7 +126,7 @@
 // CHECK:   return [[RES]]
 // CHECK: } // end sil function '[[THUNK_RETURNSINNERPOINTER_2]]'
 
-// CHECK-LABEL: sil hidden @_T013objc_currying19curry_pod_AnyObjectS2ics0eF0_pF : $@convention(thin) (@owned AnyObject) -> @owned @callee_owned (Int) -> Int
+// CHECK-LABEL: sil hidden @_T013objc_currying19curry_pod_AnyObjectS2icyXlF : $@convention(thin) (@owned AnyObject) -> @owned @callee_owned (Int) -> Int
 // CHECK: bb0([[ANY:%.*]] : $AnyObject):
 // CHECK:   [[BORROWED_ANY:%.*]] = begin_borrow [[ANY]]
 // CHECK:   [[OPENED_ANY:%.*]] = open_existential_ref [[BORROWED_ANY]]
@@ -135,13 +135,13 @@
 // CHECK:   [[HAS_METHOD]]([[METHOD:%.*]] : $@convention(objc_method) (Int, @opened({{.*}}) AnyObject) -> Int):
 // CHECK:   [[OPENED_ANY_COPY_2:%.*]] = copy_value [[OPENED_ANY_COPY]]
 // CHECK:   partial_apply [[METHOD]]([[OPENED_ANY_COPY_2]])
-// CHECK: } // end sil function '_T013objc_currying19curry_pod_AnyObjectS2ics0eF0_pF'
+// CHECK: } // end sil function '_T013objc_currying19curry_pod_AnyObjectS2icyXlF'
 func curry_pod_AnyObject(_ x: AnyObject) -> (Int) -> Int {
   return x.pod!
 }
 
 // normalOwnership requires a thunk to bring the method to Swift conventions
-// CHECK-LABEL: sil hidden @_T013objc_currying31curry_normalOwnership_AnyObjectSQySo9CurryTestCGAEcs0fG0_pF : $@convention(thin) (@owned AnyObject) -> @owned @callee_owned (@owned Optional<CurryTest>) -> @owned Optional<CurryTest> {
+// CHECK-LABEL: sil hidden @_T013objc_currying31curry_normalOwnership_AnyObjectSQySo9CurryTestCGAEcyXlF : $@convention(thin) (@owned AnyObject) -> @owned @callee_owned (@owned Optional<CurryTest>) -> @owned Optional<CurryTest> {
 // CHECK: bb0([[ANY:%.*]] : $AnyObject):
 // CHECK:   [[BORROWED_ANY:%.*]] = begin_borrow [[ANY]]
 // CHECK:   [[OPENED_ANY:%.*]] = open_existential_ref [[BORROWED_ANY]]
@@ -152,14 +152,14 @@
 // CHECK:   [[PA:%.*]] = partial_apply [[METHOD]]([[OPENED_ANY_COPY_2]])
 // CHECK:   [[THUNK:%.*]] = function_ref @_T0So9CurryTestCSgACIxyo_A2CIxxo_TR
 // CHECK:   partial_apply [[THUNK]]([[PA]])
-// CHECK: } // end sil function '_T013objc_currying31curry_normalOwnership_AnyObjectSQySo9CurryTestCGAEcs0fG0_pF'
+// CHECK: } // end sil function '_T013objc_currying31curry_normalOwnership_AnyObjectSQySo9CurryTestCGAEcyXlF'
 func curry_normalOwnership_AnyObject(_ x: AnyObject) -> (CurryTest!) -> CurryTest! {
   return x.normalOwnership!
 }
 
 // weirdOwnership is NS_RETURNS_RETAINED and NS_CONSUMES_SELF so already
 // follows Swift conventions
-// CHECK-LABEL: sil hidden @_T013objc_currying30curry_weirdOwnership_AnyObjectSQySo9CurryTestCGAEcs0fG0_pF : $@convention(thin) (@owned AnyObject) -> @owned @callee_owned (@owned Optional<CurryTest>) -> @owned Optional<CurryTest>
+// CHECK-LABEL: sil hidden @_T013objc_currying30curry_weirdOwnership_AnyObjectSQySo9CurryTestCGAEcyXlF : $@convention(thin) (@owned AnyObject) -> @owned @callee_owned (@owned Optional<CurryTest>) -> @owned Optional<CurryTest>
 // CHECK: bb0([[ANY:%.*]] : $AnyObject):
 // CHECK:   [[BORROWED_ANY:%.*]] = begin_borrow [[ANY]]
 // CHECK:   [[OPENED_ANY:%.*]] = open_existential_ref [[BORROWED_ANY]]
@@ -168,13 +168,13 @@
 // CHECK: bb1([[METHOD:%.*]] : $@convention(objc_method) (@owned Optional<CurryTest>, @owned @opened({{.*}}) AnyObject) -> @owned Optional<CurryTest>):
 // CHECK:   [[OPENED_ANY_COPY_2:%.*]] = copy_value [[OPENED_ANY_COPY]]
 // CHECK:   partial_apply [[METHOD]]([[OPENED_ANY_COPY_2]])
-// CHECK: } // end sil function '_T013objc_currying30curry_weirdOwnership_AnyObjectSQySo9CurryTestCGAEcs0fG0_pF'
+// CHECK: } // end sil function '_T013objc_currying30curry_weirdOwnership_AnyObjectSQySo9CurryTestCGAEcyXlF'
 func curry_weirdOwnership_AnyObject(_ x: AnyObject) -> (CurryTest!) -> CurryTest! {
   return x.weirdOwnership!
 }
 
 // bridged requires a thunk to handle bridging conversions
-// CHECK-LABEL: sil hidden @_T013objc_currying23curry_bridged_AnyObjectSQySSGACcs0eF0_pF : $@convention(thin) (@owned AnyObject) -> @owned @callee_owned (@owned Optional<String>) -> @owned Optional<String>
+// CHECK-LABEL: sil hidden @_T013objc_currying23curry_bridged_AnyObjectSQySSGACcyXlF : $@convention(thin) (@owned AnyObject) -> @owned @callee_owned (@owned Optional<String>) -> @owned Optional<String>
 // CHECK: bb0([[ANY:%.*]] : $AnyObject):
 // CHECK:    [[BORROWED_ANY:%.*]] = begin_borrow [[ANY]]
 // CHECK:   [[OPENED_ANY:%.*]] = open_existential_ref [[BORROWED_ANY]]
@@ -185,14 +185,14 @@
 // CHECK:   [[PA:%.*]] = partial_apply [[METHOD]]([[OPENED_ANY_COPY_2]])
 // CHECK:   [[THUNK:%.*]] = function_ref @_T0So8NSStringCSgACIxyo_SSSgADIxxo_TR
 // CHECK:   partial_apply [[THUNK]]([[PA]])
-// CHECK: } // end sil function '_T013objc_currying23curry_bridged_AnyObjectSQySSGACcs0eF0_pF'
+// CHECK: } // end sil function '_T013objc_currying23curry_bridged_AnyObjectSQySSGACcyXlF'
 func curry_bridged_AnyObject(_ x: AnyObject) -> (String!) -> String! {
   return x.bridged!
 }
 
 // check that we substitute Self = AnyObject correctly for Self-returning
 // methods
-// CHECK-LABEL: sil hidden @_T013objc_currying27curry_returnsSelf_AnyObjectSQys0fG0_pGycsAC_pF : $@convention(thin) (@owned AnyObject) -> @owned @callee_owned () -> @owned Optional<AnyObject> {
+// CHECK-LABEL: sil hidden @_T013objc_currying27curry_returnsSelf_AnyObjectSQyyXlGycyXlF : $@convention(thin) (@owned AnyObject) -> @owned @callee_owned () -> @owned Optional<AnyObject> {
 // CHECK: bb0([[ANY:%.*]] : $AnyObject):
 // CHECK:   [[BORROWED_ANY:%.*]] = begin_borrow [[ANY]]
 // CHECK:   [[OPENED_ANY:%.*]] = open_existential_ref [[BORROWED_ANY]]
@@ -201,12 +201,12 @@
 // CHECK: [[HAS_METHOD]]([[METHOD:%.*]] : $@convention(objc_method) (@opened({{.*}}) AnyObject) -> @autoreleased Optional<AnyObject>):
 // CHECK:   [[OPENED_ANY_COPY_2:%.*]] = copy_value [[OPENED_ANY_COPY]]
 // CHECK:   [[PA:%.*]] = partial_apply [[METHOD]]([[OPENED_ANY_COPY_2]])
-// CHECK: } // end sil function '_T013objc_currying27curry_returnsSelf_AnyObjectSQys0fG0_pGycsAC_pF'
+// CHECK: } // end sil function '_T013objc_currying27curry_returnsSelf_AnyObjectSQyyXlGycyXlF'
 func curry_returnsSelf_AnyObject(_ x: AnyObject) -> () -> AnyObject! {
   return x.returnsSelf!
 }
 
-// CHECK-LABEL: sil hidden @_T013objc_currying35curry_returnsInnerPointer_AnyObjectSQySvGycs0gH0_pF : $@convention(thin) (@owned AnyObject) -> @owned @callee_owned () -> Optional<UnsafeMutableRawPointer> {
+// CHECK-LABEL: sil hidden @_T013objc_currying35curry_returnsInnerPointer_AnyObjectSQySvGycyXlF : $@convention(thin) (@owned AnyObject) -> @owned @callee_owned () -> Optional<UnsafeMutableRawPointer> {
 // CHECK: bb0([[ANY:%.*]] : $AnyObject):
 // CHECK:   [[BORROWED_ANY:%.*]] = begin_borrow [[ANY]]
 // CHECK:   [[OPENED_ANY:%.*]] = open_existential_ref [[BORROWED_ANY]]
@@ -215,7 +215,7 @@
 // CHECK: [[HAS_METHOD]]([[METHOD:%.*]] : $@convention(objc_method) (@opened({{.*}}) AnyObject) -> @unowned_inner_pointer Optional<UnsafeMutableRawPointer>):
 // CHECK:   [[OPENED_ANY_COPY_2:%.*]] = copy_value [[OPENED_ANY_COPY]]
 // CHECK:   [[PA:%.*]] = partial_apply [[METHOD]]([[OPENED_ANY_COPY_2]])
-// CHECK: } // end sil function '_T013objc_currying35curry_returnsInnerPointer_AnyObjectSQySvGycs0gH0_pF'
+// CHECK: } // end sil function '_T013objc_currying35curry_returnsInnerPointer_AnyObjectSQySvGycyXlF'
 
 func curry_returnsInnerPointer_AnyObject(_ x: AnyObject) -> () -> UnsafeMutableRawPointer! {
   return x.returnsInnerPointer!
diff --git a/test/SILGen/objc_deprecated_objc_thunks.swift b/test/SILGen/objc_deprecated_objc_thunks.swift
index 142ed4f..9cc0722 100644
--- a/test/SILGen/objc_deprecated_objc_thunks.swift
+++ b/test/SILGen/objc_deprecated_objc_thunks.swift
@@ -1,43 +1,47 @@
-// RUN: %target-swift-frontend -sdk %S/Inputs %s -I %S/Inputs -enable-source-import -emit-silgen -enable-swift3-objc-inference | %FileCheck %s
+// RUN: %target-swift-frontend -sdk %S/Inputs %s -I %S/Inputs -enable-source-import -emit-silgen -enable-swift3-objc-inference -swift-version 4 | %FileCheck -check-prefix CHECK-SWIFT4 %s
+
+// RUN: %target-swift-frontend -sdk %S/Inputs %s -I %S/Inputs -enable-source-import -emit-silgen -swift-version 3 | %FileCheck -check-prefix CHECK-SWIFT3 %s
 
 // REQUIRES: objc_interop
 
 import Foundation
 
 class ObjCSubclass : NSObject {
-  // CHECK-LABEL: sil hidden [thunk] @_T0016objc_deprecated_A7_thunks12ObjCSubclassCACyt7nothing_tcfcTo : $@convention(objc_method) (@owned ObjCSubclass) -> @owned ObjCSubclass {
-  // CHECK: bb0(%0 : $ObjCSubclass):
-  // CHECK-NEXT: builtin "swift3ImplicitObjCEntrypoint"() : $()
+  // CHECK-SWIFT4-LABEL: sil hidden [thunk] @_T0016objc_deprecated_A7_thunks12ObjCSubclassCACyt7nothing_tcfcTo : $@convention(objc_method) (@owned ObjCSubclass) -> @owned ObjCSubclass {
+  // CHECK-SWIFT4: bb0(%0 : $ObjCSubclass):
+  // CHECK-SWIFT4-NEXT: builtin "swift3ImplicitObjCEntrypoint"() : $()
   init(nothing: ()) { super.init() }
   
-  // CHECK-LABEL: sil hidden [thunk] @_T0016objc_deprecated_A7_thunks12ObjCSubclassC3fooyyFTo : $@convention(objc_method) (ObjCSubclass) -> ()
-  // CHECK: bb0(%0 : $ObjCSubclass):
-  // CHECK-NEXT: builtin "swift3ImplicitObjCEntrypoint"() : $()
+  // CHECK-SWIFT4-LABEL: sil hidden [thunk] @_T0016objc_deprecated_A7_thunks12ObjCSubclassC3fooyyFTo : $@convention(objc_method) (ObjCSubclass) -> ()
+  // CHECK-SWIFT4: bb0(%0 : $ObjCSubclass):
+  // CHECK-SWIFT4-NEXT: builtin "swift3ImplicitObjCEntrypoint"() : $()
   func foo() { }
 
-  // CHECK-LABEL: sil hidden [thunk] @_T0016objc_deprecated_A7_thunks12ObjCSubclassC3barSo8NSObjectCSgfgTo : $@convention(objc_method) (ObjCSubclass) -> @autoreleased Optional<NSObject>
-  // CHECK: bb0(%0 : $ObjCSubclass):
-  // CHECK-NEXT: builtin "swift3ImplicitObjCEntrypoint"() : $()
+  // CHECK-SWIFT4-LABEL: sil hidden [thunk] @_T0016objc_deprecated_A7_thunks12ObjCSubclassC3barSo8NSObjectCSgfgTo : $@convention(objc_method) (ObjCSubclass) -> @autoreleased Optional<NSObject>
+  // CHECK-SWIFT4: bb0(%0 : $ObjCSubclass):
+  // CHECK-SWIFT4-NEXT: builtin "swift3ImplicitObjCEntrypoint"() : $()
 
-  // CHECK-LABEL: sil hidden [thunk] @_T0016objc_deprecated_A7_thunks12ObjCSubclassC3barSo8NSObjectCSgfsTo : $@convention(objc_method) (Optional<NSObject>, ObjCSubclass) -> () {
-  // CHECK: %0 : $Optional<NSObject>, %1 : $ObjCSubclass
-  // CHECK-NEXT: builtin "swift3ImplicitObjCEntrypoint"() : $()
+  // CHECK-SWIFT4-LABEL: sil hidden [thunk] @_T0016objc_deprecated_A7_thunks12ObjCSubclassC3barSo8NSObjectCSgfsTo : $@convention(objc_method) (Optional<NSObject>, ObjCSubclass) -> () {
+  // CHECK-SWIFT4: %0 : $Optional<NSObject>, %1 : $ObjCSubclass
+  // CHECK-SWIFT4-NEXT: builtin "swift3ImplicitObjCEntrypoint"() : $()
   var bar: NSObject? = nil
 
-  // CHECK-LABEL: sil hidden [thunk] @_T0016objc_deprecated_A7_thunks12ObjCSubclassC9subscripts9AnyObject_pSicfgTo : $@convention(objc_method) (Int, ObjCSubclass) -> @autoreleased AnyObject 
-  // CHECK: bb0(%0 : $Int, %1 : $ObjCSubclass):
-  // CHECK-NEXT: builtin "swift3ImplicitObjCEntrypoint"() : $()
+  // CHECK-SWIFT4-LABEL: sil hidden [thunk] @_T0016objc_deprecated_A7_thunks12ObjCSubclassC9subscriptyXlSicfgTo : $@convention(objc_method) (Int, ObjCSubclass) -> @autoreleased AnyObject 
+  // CHECK-SWIFT4: bb0(%0 : $Int, %1 : $ObjCSubclass):
+  // CHECK-SWIFT4-NEXT: builtin "swift3ImplicitObjCEntrypoint"() : $()
 
-  // CHECK-LABEL: sil hidden [thunk] @_T0016objc_deprecated_A7_thunks12ObjCSubclassC9subscripts9AnyObject_pSicfsTo : $@convention(objc_method) (AnyObject, Int, ObjCSubclass) ->
-  // CHECK: bb0(%0 : $AnyObject, %1 : $Int, %2 : $ObjCSubclass):
-  // CHECK-NEXT: builtin "swift3ImplicitObjCEntrypoint"() : $()
+  // CHECK-SWIFT4-LABEL: sil hidden [thunk] @_T0016objc_deprecated_A7_thunks12ObjCSubclassC9subscriptyXlSicfsTo : $@convention(objc_method) (AnyObject, Int, ObjCSubclass) ->
+  // CHECK-SWIFT4: bb0(%0 : $AnyObject, %1 : $Int, %2 : $ObjCSubclass):
+  // CHECK-SWIFT4-NEXT: builtin "swift3ImplicitObjCEntrypoint"() : $()
   subscript (i: Int) -> AnyObject { get { return self } set { } } 
 }
 
 extension ObjCSubclass {
-	// CHECK-LABEL: sil hidden [thunk] @_T0016objc_deprecated_A7_thunks12ObjCSubclassC13falsePositiveyyFTo : $@convention(objc_method) (ObjCSubclass) -> ()
-  // CHECK: bb0(%0 : $ObjCSubclass):
-  // CHECK-NOT: builtin "swift3ImplicitObjCEntrypoint"() : $()
-	// CHECK: return
+	// CHECK-SWIFT4-LABEL: sil hidden [thunk] @_T0016objc_deprecated_A7_thunks12ObjCSubclassC13falsePositiveyyFTo : $@convention(objc_method) (ObjCSubclass) -> ()
+  // CHECK-SWIFT4: bb0(%0 : $ObjCSubclass):
+  // CHECK-SWIFT4-NOT: builtin "swift3ImplicitObjCEntrypoint"() : $()
+	// CHECK-SWIFT4: return
   func falsePositive() { }
 }
+
+// CHECK-SWIFT3-NOT: builtin "swift3ImplicitObjCEntrypoint"() : $()
diff --git a/test/SILGen/objc_enum.swift b/test/SILGen/objc_enum.swift
index 34a084b8..a47cf76 100644
--- a/test/SILGen/objc_enum.swift
+++ b/test/SILGen/objc_enum.swift
@@ -7,15 +7,15 @@
 import gizmo
 
 
-// CHECK-DAG: sil shared [serializable] @_T0So16NSRuncingOptionsO{{[_0-9a-zA-Z]*}}fC
-// CHECK-DAG: sil shared [serializable] @_T0So16NSRuncingOptionsO8rawValueSifg
-// CHECK-DAG: sil shared [serializable] @_T0So16NSRuncingOptionsO9hashValueSifg
+// CHECK-DAG: sil shared [serializable] @_T0SC16NSRuncingOptionsO{{[_0-9a-zA-Z]*}}fC
+// CHECK-DAG: sil shared [serializable] @_T0SC16NSRuncingOptionsO8rawValueSifg
+// CHECK-DAG: sil shared [serializable] @_T0SC16NSRuncingOptionsO9hashValueSifg
 
 // Non-payload enum ctors don't need to be instantiated at all.
-// NEGATIVE-NOT: sil shared [transparent] @_T0So16NSRuncingOptionsO5MinceAbBmF
-// NEGATIVE-NOT: sil shared [transparent] @_T0So16NSRuncingOptionsO12QuinceSlicedAbBmF
-// NEGATIVE-NOT: sil shared [transparent] @_T0So16NSRuncingOptionsO15QuinceJuliennedAbBmF
-// NEGATIVE-NOT: sil shared [transparent] @_T0So16NSRuncingOptionsO11QuinceDicedAbBmF
+// NEGATIVE-NOT: sil shared [transparent] @_T0SC16NSRuncingOptionsO5MinceAbBmF
+// NEGATIVE-NOT: sil shared [transparent] @_T0SC16NSRuncingOptionsO12QuinceSlicedAbBmF
+// NEGATIVE-NOT: sil shared [transparent] @_T0SC16NSRuncingOptionsO15QuinceJuliennedAbBmF
+// NEGATIVE-NOT: sil shared [transparent] @_T0SC16NSRuncingOptionsO11QuinceDicedAbBmF
 
 var runcing: NSRuncingOptions = .mince
 
@@ -45,7 +45,7 @@
 // CHECK-DAG: sil_witness_table shared [serialized] NSRuncingOptions: Hashable module gizmo
 // CHECK-DAG: sil_witness_table shared [serialized] NSFungingMask: RawRepresentable module gizmo
 
-// CHECK-DAG: sil shared [transparent] [serialized] [thunk] @_T0So16NSRuncingOptionsOs16RawRepresentable5gizmosACP{{[_0-9a-zA-Z]*}}fCTW
+// CHECK-DAG: sil shared [transparent] [serialized] [thunk] @_T0SC16NSRuncingOptionsOs16RawRepresentable5gizmosACP{{[_0-9a-zA-Z]*}}fCTW
 
 // Extension conformances get linkage according to the protocol's accessibility, as normal.
 // CHECK-DAG: sil_witness_table hidden NSRuncingOptions: Bub module objc_enum
diff --git a/test/SILGen/objc_imported_generic.swift b/test/SILGen/objc_imported_generic.swift
index 3b8bff2..02a0ac1 100644
--- a/test/SILGen/objc_imported_generic.swift
+++ b/test/SILGen/objc_imported_generic.swift
@@ -24,39 +24,39 @@
   return o.thing?()
 }
 
-// CHECK-LABEL: sil @_T021objc_imported_generic0C24MethodOnAnyObjectChaineds0fG0_pSgsAC_p1o_Sb1btF
+// CHECK-LABEL: sil @_T021objc_imported_generic0C24MethodOnAnyObjectChainedyXlSgyXl1o_Sb1btF
 // CHECK: bb0([[ANY:%.*]] : $AnyObject, [[BOOL:%.*]] : $Bool):
 // CHECK:   [[BORROWED_ANY:%.*]] = begin_borrow [[ANY]]
 // CHECK:   [[OPENED_ANY:%.*]] = open_existential_ref [[BORROWED_ANY]]
 // CHECK:   [[OPENED_ANY_COPY:%.*]] = copy_value [[OPENED_ANY]]
 // CHECK:   dynamic_method_br [[OPENED_ANY_COPY]] : $@opened([[TAG:.*]]) AnyObject, #GenericClass.thing!1.foreign, bb1
 // CHECK:   bb1({{%.*}} : $@convention(objc_method) @pseudogeneric (@opened([[TAG]]) AnyObject) -> @autoreleased Optional<AnyObject>):
-// CHECK: } // end sil function '_T021objc_imported_generic0C24MethodOnAnyObjectChaineds0fG0_pSgsAC_p1o_Sb1btF'
+// CHECK: } // end sil function '_T021objc_imported_generic0C24MethodOnAnyObjectChainedyXlSgyXl1o_Sb1btF'
 
 public func genericSubscriptOnAnyObject(o: AnyObject, b: Bool) -> AnyObject? {
   return o[0 as UInt16]
 }
 
-// CHECK-LABEL: sil @_T021objc_imported_generic0C20SubscriptOnAnyObjects0fG0_pSgsAC_p1o_Sb1btF
+// CHECK-LABEL: sil @_T021objc_imported_generic0C20SubscriptOnAnyObjectyXlSgyXl1o_Sb1btF
 // CHECK: bb0([[ANY:%.*]]
 // CHCEK:   [[OPENED_ANY:%.*]] = open_existential_ref [[ANY]]
 // CHECK:   [[OPENED_ANY_COPY:%.*]] = copy_value [[OPENED_ANY]]
 // CHECK:   dynamic_method_br [[OPENED_ANY_COPY]] : $@opened([[TAG:.*]]) AnyObject, #GenericClass.subscript!getter.1.foreign, bb1
 // CHECK:   bb1({{%.*}} : $@convention(objc_method) @pseudogeneric (UInt16, @opened([[TAG]]) AnyObject) -> @autoreleased AnyObject):
-// CHECK: } // end sil function '_T021objc_imported_generic0C20SubscriptOnAnyObjects0fG0_pSgsAC_p1o_Sb1btF'
+// CHECK: } // end sil function '_T021objc_imported_generic0C20SubscriptOnAnyObjectyXlSgyXl1o_Sb1btF'
 
 public func genericPropertyOnAnyObject(o: AnyObject, b: Bool) -> AnyObject?? {
   return o.propertyThing
 }
 
-// CHECK-LABEL: sil @_T021objc_imported_generic0C19PropertyOnAnyObjects0fG0_pSgSgsAC_p1o_Sb1btF
+// CHECK-LABEL: sil @_T021objc_imported_generic0C19PropertyOnAnyObjectyXlSgSgyXl1o_Sb1btF
 // CHECK: bb0([[ANY:%.*]] : $AnyObject, [[BOOL:%.*]] : $Bool):
 // CHECK:   [[BORROWED_ANY:%.*]] = begin_borrow [[ANY]]
 // CHECK:   [[OPENED_ANY:%.*]] = open_existential_ref [[BORROWED_ANY]]
 // CHECK:   [[OPENED_ANY_COPY:%.*]] = copy_value [[OPENED_ANY]]
 // CHECK:   dynamic_method_br [[OPENED_ANY_COPY]] : $@opened([[TAG:.*]]) AnyObject, #GenericClass.propertyThing!getter.1.foreign, bb1
 // CHECK:   bb1({{%.*}} : $@convention(objc_method) @pseudogeneric (@opened([[TAG]]) AnyObject) -> @autoreleased Optional<AnyObject>):
-// CHECK: } // end sil function '_T021objc_imported_generic0C19PropertyOnAnyObjects0fG0_pSgSgsAC_p1o_Sb1btF'
+// CHECK: } // end sil function '_T021objc_imported_generic0C19PropertyOnAnyObjectyXlSgSgyXl1o_Sb1btF'
 
 public protocol ThingHolder {
   associatedtype Thing
@@ -89,9 +89,9 @@
 }
 
 // CHECK-LABEL: sil @_T021objc_imported_generic0C13BlockBridging{{[_0-9a-zA-Z]*}}F
-// CHECK:         [[BLOCK_TO_FUNC:%.*]] = function_ref @_T0xxIyBya_xxIxxo_s9AnyObjectRz21objc_imported_generic7AnsibleRzlTR
+// CHECK:         [[BLOCK_TO_FUNC:%.*]] = function_ref @_T0xxIyBya_xxIxxo_RlzC21objc_imported_generic7AnsibleRzlTR
 // CHECK:         partial_apply [[BLOCK_TO_FUNC]]<T>
-// CHECK:         [[FUNC_TO_BLOCK:%.*]] = function_ref @_T0xxIxxo_xxIyBya_s9AnyObjectRz21objc_imported_generic7AnsibleRzlTR
+// CHECK:         [[FUNC_TO_BLOCK:%.*]] = function_ref @_T0xxIxxo_xxIyBya_RlzC21objc_imported_generic7AnsibleRzlTR
 // CHECK:         init_block_storage_header {{.*}} invoke [[FUNC_TO_BLOCK]]<T>
 
 // CHECK-LABEL: sil @_T021objc_imported_generic20arraysOfGenericParam{{[_0-9a-zA-Z]*}}F
@@ -106,7 +106,7 @@
   x.propertyArrayOfThings = y
 }
 
-// CHECK-LABEL: sil private @_T021objc_imported_generic0C4Funcyxms9AnyObjectRzlFyycfU_ : $@convention(thin) <V where V : AnyObject> () -> () {
+// CHECK-LABEL: sil private @_T021objc_imported_generic0C4FuncyxmRlzClFyycfU_ : $@convention(thin) <V where V : AnyObject> () -> () {
 // CHECK:  [[INIT:%.*]] = function_ref @_T0So12GenericClassCAByxGycfC : $@convention(method) <τ_0_0 where τ_0_0 : AnyObject> (@thick GenericClass<τ_0_0>.Type) -> @owned GenericClass<τ_0_0>
 // CHECK:  [[META:%.*]] = metatype $@thick GenericClass<V>.Type
 // CHECK:  apply [[INIT]]<V>([[META]])
@@ -128,7 +128,7 @@
 // foreign to native thunk for init(options:), uses GenericOption : Hashable
 // conformance
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @_T0So12GenericClassCSQyAByxGGs10DictionaryVySo0A6OptionVypGSg7options_tcfcTO : $@convention(method) <T where T : AnyObject> (@owned Optional<Dictionary<GenericOption, Any>>, @owned GenericClass<T>) -> @owned Optional<GenericClass<T>>
+// CHECK-LABEL: sil shared [serializable] [thunk] @_T0So12GenericClassCSQyAByxGGs10DictionaryVySC0A6OptionVypGSg7options_tcfcTO : $@convention(method) <T where T : AnyObject> (@owned Optional<Dictionary<GenericOption, Any>>, @owned GenericClass<T>) -> @owned Optional<GenericClass<T>>
 // CHECK: [[FN:%.*]] = function_ref @_T0s10DictionaryV10FoundationE19_bridgeToObjectiveCSo12NSDictionaryCyF : $@convention(method) <τ_0_0, τ_0_1 where τ_0_0 : Hashable> (@guaranteed Dictionary<τ_0_0, τ_0_1>) -> @owned NSDictionary
 // CHECK: apply [[FN]]<GenericOption, Any>({{.*}}) : $@convention(method) <τ_0_0, τ_0_1 where τ_0_0 : Hashable> (@guaranteed Dictionary<τ_0_0, τ_0_1>) -> @owned NSDictionary
 // CHECK: return
@@ -141,5 +141,5 @@
 // Make sure we emitted the witness table for the above conformance
 
 // CHECK-LABEL: sil_witness_table shared [serialized] GenericOption: Hashable module objc_generics {
-// CHECK: method #Hashable.hashValue!getter.1: {{.*}}: @_T0So13GenericOptionVs8Hashable13objc_genericssACP9hashValueSifgTW
+// CHECK: method #Hashable.hashValue!getter.1: {{.*}}: @_T0SC13GenericOptionVs8Hashable13objc_genericssACP9hashValueSifgTW
 // CHECK: }
diff --git a/test/SILGen/objc_properties.swift b/test/SILGen/objc_properties.swift
index e9643b9..24e72a1 100644
--- a/test/SILGen/objc_properties.swift
+++ b/test/SILGen/objc_properties.swift
@@ -155,30 +155,30 @@
 }
 
 class HasUnmanaged : NSObject {
-  // CHECK-LABEL: sil hidden [thunk] @_T015objc_properties12HasUnmanagedC3refs0D0Vys9AnyObject_pGSgfgTo
+  // CHECK-LABEL: sil hidden [thunk] @_T015objc_properties12HasUnmanagedC3refs0D0VyyXlGSgfgTo
   // CHECK: bb0([[CLS:%.*]] : $HasUnmanaged):
   // CHECK:     [[CLS_COPY:%.*]] = copy_value [[CLS]]
   // CHECK:     [[BORROWED_CLS_COPY:%.*]] = begin_borrow [[CLS_COPY]]
-  // CHECK:     [[NATIVE:%.+]] = function_ref @_T015objc_properties12HasUnmanagedC3refs0D0Vys9AnyObject_pGSgfg
+  // CHECK:     [[NATIVE:%.+]] = function_ref @_T015objc_properties12HasUnmanagedC3refs0D0VyyXlGSgfg
   // CHECK:     [[RESULT:%.+]] = apply [[NATIVE]]([[BORROWED_CLS_COPY]])
   // CHECK:     end_borrow [[BORROWED_CLS_COPY]] from [[CLS_COPY]]
   // CHECK-NOT: {{(retain|release)}}
   // CHECK:     destroy_value [[CLS_COPY]] : $HasUnmanaged
   // CHECK-NOT: {{(retain|release)}}
   // CHECK:     return [[RESULT]] : $Optional<Unmanaged<AnyObject>>
-  // CHECK: } // end sil function '_T015objc_properties12HasUnmanagedC3refs0D0Vys9AnyObject_pGSgfgTo'
+  // CHECK: } // end sil function '_T015objc_properties12HasUnmanagedC3refs0D0VyyXlGSgfgTo'
 
-  // CHECK-LABEL: sil hidden [thunk] @_T015objc_properties12HasUnmanagedC3refs0D0Vys9AnyObject_pGSgfsTo
+  // CHECK-LABEL: sil hidden [thunk] @_T015objc_properties12HasUnmanagedC3refs0D0VyyXlGSgfsTo
   // CHECK: bb0([[NEW_VALUE:%.*]] : $Optional<Unmanaged<AnyObject>>, [[SELF:%.*]] : $HasUnmanaged):
   // CHECK-NEXT: [[SELF_COPY:%.*]] = copy_value [[SELF]] : $HasUnmanaged
   // CHECK-NEXT: [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
   // CHECK-NEXT: // function_ref
-  // CHECK-NEXT: [[NATIVE:%.+]] = function_ref @_T015objc_properties12HasUnmanagedC3refs0D0Vys9AnyObject_pGSgfs
+  // CHECK-NEXT: [[NATIVE:%.+]] = function_ref @_T015objc_properties12HasUnmanagedC3refs0D0VyyXlGSgfs
   // CHECK-NEXT: [[RESULT:%.*]] = apply [[NATIVE]]([[NEW_VALUE]], [[BORROWED_SELF_COPY]])
   // CHECK-NEXT: end_borrow [[BORROWED_SELF_COPY]] from [[SELF_COPY]]
   // CHECK-NEXT: destroy_value [[SELF_COPY]] : $HasUnmanaged
   // CHECK-NEXT: return [[RESULT:%.*]]
-  // CHECK: } // end sil function '_T015objc_properties12HasUnmanagedC3refs0D0Vys9AnyObject_pGSgfsTo'
+  // CHECK: } // end sil function '_T015objc_properties12HasUnmanagedC3refs0D0VyyXlGSgfsTo'
   @objc var ref: Unmanaged<AnyObject>?
 }
 
diff --git a/test/SILGen/objc_protocol_native_thunk.swift b/test/SILGen/objc_protocol_native_thunk.swift
new file mode 100644
index 0000000..7eb2986
--- /dev/null
+++ b/test/SILGen/objc_protocol_native_thunk.swift
@@ -0,0 +1,16 @@
+// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-silgen %s | %FileCheck %s
+// REQUIRES: objc_interop
+
+import Foundation
+
+@objc protocol P {
+  func p(_: String)
+}
+@objc class C: NSObject {
+  func c(_: String) {}
+}
+
+// CHECK-LABEL: sil shared [serializable] [thunk] @_T0{{.*}}1P{{.*}}1p{{.*}} : $@convention(method) <Self where Self : P> (@owned String, @guaranteed Self) -> ()
+func foo(x: Bool, y: C & P) -> (String) -> () {
+  return x ? y.c : y.p
+}
diff --git a/test/SILGen/objc_thunks.swift b/test/SILGen/objc_thunks.swift
index 032c157..c43a24d 100644
--- a/test/SILGen/objc_thunks.swift
+++ b/test/SILGen/objc_thunks.swift
@@ -445,9 +445,9 @@
 // Calling objc methods of subclass should go through native entry points
 func useHoozit(_ h: Hoozit) {
 // sil @_T011objc_thunks9useHoozityAA0D0C1h_tF
-  // In the class decl, gets dynamically dispatched
+  // In the class decl, overrides importd method, 'dynamic' was inferred
   h.fork()
-  // CHECK: class_method {{%.*}} : {{.*}}, #Hoozit.fork!1 :
+  // CHECK: class_method [volatile] {{%.*}} : {{.*}}, #Hoozit.fork!1.foreign
 
   // In an extension, 'dynamic' was inferred.
   h.foof()
diff --git a/test/SILGen/objc_witnesses.swift b/test/SILGen/objc_witnesses.swift
index 68261db..b9b7d6f 100644
--- a/test/SILGen/objc_witnesses.swift
+++ b/test/SILGen/objc_witnesses.swift
@@ -109,7 +109,7 @@
   var valence: Int { get { return 1 } set { } }
 }
 
-// CHECK-LABEL: sil hidden @_T0So8NSObjectC14objc_witnessesE7valenceSifmytfU_ : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout NSObject, @thick NSObject.Type) -> () {
+// CHECK-LABEL: sil private @_T0So8NSObjectC14objc_witnessesE7valenceSifmytfU_ : $@convention(method) (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout NSObject, @thick NSObject.Type) -> () {
 // CHECK: class_method [volatile] %4 : $NSObject, #NSObject.valence!setter.1.foreign
 // CHECK: }
 
diff --git a/test/SILGen/opaque_values_silgen.swift b/test/SILGen/opaque_values_silgen.swift
index c09bc7b..19f1ef9 100644
--- a/test/SILGen/opaque_values_silgen.swift
+++ b/test/SILGen/opaque_values_silgen.swift
@@ -253,7 +253,7 @@
 // SILGen, prepareArchetypeCallee. Materialize a
 // non-class-constrainted self from a class-constrained archetype.
 // ---
-// CHECK-LABEL: sil hidden @_T020opaque_values_silgen21s070__materializeSelfyx1t_ts9AnyObjectRzAA3FooRzlF : $@convention(thin) <T where T : AnyObject, T : Foo> (@owned T) -> () {
+// CHECK-LABEL: sil hidden @_T020opaque_values_silgen21s070__materializeSelfyx1t_tRlzCAA3FooRzlF : $@convention(thin) <T where T : AnyObject, T : Foo> (@owned T) -> () {
 // CHECK: bb0([[ARG:%.*]] : $T):
 // CHECK: [[WITNESS_METHOD:%.*]] = witness_method $T, #Foo.foo!1 : <Self where Self : Foo> (Self) -> () -> () : $@convention(witness_method) <τ_0_0 where τ_0_0 : Foo> (@in_guaranteed τ_0_0) -> ()
 // CHECK: [[BORROWED_ARG:%.*]] = begin_borrow [[ARG]]
@@ -261,7 +261,7 @@
 // CHECK: end_borrow [[BORROWED_ARG]] from [[ARG]]
 // CHECK: destroy_value [[ARG]] : $T
 // CHECK: return %{{[0-9]+}} : $()
-// CHECK-LABEL: } // end sil function '_T020opaque_values_silgen21s070__materializeSelfyx1t_ts9AnyObjectRzAA3FooRzlF'
+// CHECK-LABEL: } // end sil function '_T020opaque_values_silgen21s070__materializeSelfyx1t_tRlzCAA3FooRzlF'
 func s070__materializeSelf<T: Foo>(t: T) where T: AnyObject {
   t.foo()
 }
@@ -1067,7 +1067,7 @@
 
 // Tests materializeForSet's createSetterCallback for opaque values
 // ---
-// CHECK-LABEL: sil [transparent] [serialized] @_T0s10DictionaryV20opaque_values_silgenE9subscriptq_Sgq_cfmytfU_ : $@convention(method) <Key, Value where Key : Hashable> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout Dictionary<Key, Value>, @thick Dictionary<Key, Value>.Type) -> () {
+// CHECK-LABEL: sil private [transparent] [serialized] @_T0s10DictionaryV20opaque_values_silgenE9subscriptq_Sgq_cfmytfU_ : $@convention(method) <Key, Value where Key : Hashable> (Builtin.RawPointer, @inout Builtin.UnsafeValueBuffer, @inout Dictionary<Key, Value>, @thick Dictionary<Key, Value>.Type) -> () {
 // CHECK: bb0([[ARG0:%.*]] : $Builtin.RawPointer, [[ARG1:%.*]] : $*Builtin.UnsafeValueBuffer, [[ARG2:%.*]] : $*Dictionary<Key, Value>, [[ARG3:%.*]] : $@thick Dictionary<Key, Value>.Type):
 // CHECK:   [[PROJ_VAL1:%.*]] = project_value_buffer $Value in [[ARG1]] : $*Builtin.UnsafeValueBuffer
 // CHECK:   [[LOAD_VAL1:%.*]] = load [take] [[PROJ_VAL1]] : $*Value
diff --git a/test/SILGen/optional-cast.swift b/test/SILGen/optional-cast.swift
index 3f016a7..b49581c 100644
--- a/test/SILGen/optional-cast.swift
+++ b/test/SILGen/optional-cast.swift
@@ -163,7 +163,7 @@
 }
 
 
-// CHECK-LABEL: sil hidden @_T04main3bazys9AnyObject_pSgF : $@convention(thin) (@owned Optional<AnyObject>) -> () {
+// CHECK-LABEL: sil hidden @_T04main3bazyyXlSgF : $@convention(thin) (@owned Optional<AnyObject>) -> () {
 // CHECK:       bb0([[ARG:%.*]] : $Optional<AnyObject>):
 // CHECK:         [[X:%.*]] = alloc_box ${ var Optional<B> }, var, name "x"
 // CHECK-NEXT:    [[PB:%.*]] = project_box [[X]]
@@ -178,7 +178,7 @@
 // CHECK:         store [[CASTED_VALUE]] to [init] [[X_VALUE]]
 // CHECK:       [[NOT_B]]([[ORIGINAL_VALUE:%.*]] : $AnyObject):
 // CHECK:         destroy_value [[ORIGINAL_VALUE]]
-// CHECK: } // end sil function '_T04main3bazys9AnyObject_pSgF'
+// CHECK: } // end sil function '_T04main3bazyyXlSgF'
 func baz(_ y : AnyObject?) {
   var x = (y as? B)
 }
diff --git a/test/SILGen/pointer_conversion.swift b/test/SILGen/pointer_conversion.swift
index 4420788..7809dd9 100644
--- a/test/SILGen/pointer_conversion.swift
+++ b/test/SILGen/pointer_conversion.swift
@@ -290,7 +290,7 @@
   // CHECK:   cond_br [[T0]], [[SOME_BB:bb[0-9]+]], [[NONE_BB:bb[0-9]+]]
   // CHECK: [[SOME_BB]]:
   // CHECK:   [[SOME_VALUE:%.*]] = unchecked_enum_data [[COPY]]
-  // CHECK:   [[CONVERT:%.*]] = function_ref @_T0s35_convertConstArrayToPointerArguments9AnyObject_pSg_q_tSayxGs01_E0R_r0_lF
+  // CHECK:   [[CONVERT:%.*]] = function_ref @_T0s35_convertConstArrayToPointerArgumentyXlSg_q_tSayxGs01_E0R_r0_lF
   // CHECK:   [[TEMP:%.*]] = alloc_stack $UnsafePointer<Int>
   // CHECK:   [[OWNER:%.*]] = apply [[CONVERT]]<Int, UnsafePointer<Int>>([[TEMP:%.*]], [[SOME_VALUE]])
   // CHECK:   [[PTR:%.*]] = load [trivial] [[TEMP]]
@@ -329,7 +329,7 @@
   // CHECK:   br [[SOME_NONE_BB2:bb[0-9]+]]
   // CHECK: [[SOME_SOME_BB]]:
   // CHECK:   [[SOME_SOME_VALUE:%.*]] = unchecked_enum_data [[SOME_VALUE]]
-  // CHECK:   [[CONVERT:%.*]] = function_ref @_T0s35_convertConstArrayToPointerArguments9AnyObject_pSg_q_tSayxGs01_E0R_r0_lF
+  // CHECK:   [[CONVERT:%.*]] = function_ref @_T0s35_convertConstArrayToPointerArgumentyXlSg_q_tSayxGs01_E0R_r0_lF
   // CHECK:   [[TEMP:%.*]] = alloc_stack $UnsafePointer<Int>
   // CHECK:   [[OWNER:%.*]] = apply [[CONVERT]]<Int, UnsafePointer<Int>>([[TEMP:%.*]], [[SOME_SOME_VALUE]])
   // CHECK:   [[PTR:%.*]] = load [trivial] [[TEMP]]
@@ -369,7 +369,7 @@
   // CHECK:   cond_br [[T0]], [[SOME_BB:bb[0-9]+]], [[NONE_BB:bb[0-9]+]]
   // CHECK: [[SOME_BB]]:
   // CHECK:   [[SOME_VALUE:%.*]] = unchecked_enum_data [[COPY]]
-  // CHECK:   [[CONVERT:%.*]] = function_ref @_T0s40_convertConstStringToUTF8PointerArguments9AnyObject_pSg_xtSSs01_F0RzlF
+  // CHECK:   [[CONVERT:%.*]] = function_ref @_T0s40_convertConstStringToUTF8PointerArgumentyXlSg_xtSSs01_F0RzlF
   // CHECK:   [[TEMP:%.*]] = alloc_stack $UnsafeRawPointer
   // CHECK:   [[OWNER:%.*]] = apply [[CONVERT]]<UnsafeRawPointer>([[TEMP:%.*]], [[SOME_VALUE]])
   // CHECK:   [[PTR:%.*]] = load [trivial] [[TEMP]]
@@ -409,7 +409,7 @@
   // CHECK:   br [[SOME_NONE_BB2:bb[0-9]+]]
   // CHECK: [[SOME_SOME_BB]]:
   // CHECK:   [[SOME_SOME_VALUE:%.*]] = unchecked_enum_data [[SOME_VALUE]]
-  // CHECK:   [[CONVERT:%.*]] = function_ref @_T0s40_convertConstStringToUTF8PointerArguments9AnyObject_pSg_xtSSs01_F0RzlF
+  // CHECK:   [[CONVERT:%.*]] = function_ref @_T0s40_convertConstStringToUTF8PointerArgumentyXlSg_xtSSs01_F0RzlF
   // CHECK:   [[TEMP:%.*]] = alloc_stack $UnsafeRawPointer
   // CHECK:   [[OWNER:%.*]] = apply [[CONVERT]]<UnsafeRawPointer>([[TEMP:%.*]], [[SOME_SOME_VALUE]])
   // CHECK:   [[PTR:%.*]] = load [trivial] [[TEMP]]
diff --git a/test/SILGen/switch.swift b/test/SILGen/switch.swift
index 03f5669..9ba35d4 100644
--- a/test/SILGen/switch.swift
+++ b/test/SILGen/switch.swift
@@ -524,7 +524,7 @@
 }
 // CHECK: } // end sil function '_T06switch16test_isa_class_1yAA1BC1x_tF'
 
-// CHECK-LABEL: sil hidden @_T06switch16test_isa_class_2s9AnyObject_pAA1BC1x_tF : $@convention(thin)
+// CHECK-LABEL: sil hidden @_T06switch16test_isa_class_2yXlAA1BC1x_tF : $@convention(thin)
 func test_isa_class_2(x: B) -> AnyObject {
   // CHECK: bb0([[X:%.*]] : $B):
   // CHECK:   [[BORROWED_X:%.*]] = begin_borrow [[X]]
@@ -639,7 +639,7 @@
   // CHECK:   destroy_value [[X]]
   // CHECK:   return [[T0]]
 }
-// CHECK: } // end sil function '_T06switch16test_isa_class_2s9AnyObject_pAA1BC1x_tF'
+// CHECK: } // end sil function '_T06switch16test_isa_class_2yXlAA1BC1x_tF'
 
 enum MaybePair {
   case Neither
diff --git a/test/SILGen/vtable_thunks_reabstraction_final.swift b/test/SILGen/vtable_thunks_reabstraction_final.swift
index d83e074..f87861d 100644
--- a/test/SILGen/vtable_thunks_reabstraction_final.swift
+++ b/test/SILGen/vtable_thunks_reabstraction_final.swift
@@ -30,7 +30,7 @@
   }
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @_T033vtable_thunks_reabstraction_final10GenericSubCyxGAA8BarrableAAs9AnyObjectRzlAaEP3foo3BarQzSgAJFTW
+// CHECK-LABEL: sil private [transparent] [thunk] @_T033vtable_thunks_reabstraction_final10GenericSubCyxGAA8BarrableAARlzClAaEP3foo3BarQzSgAIFTW
 // CHECK:         class_method {{%.*}} : $GenericSub<τ_0_0>, #GenericSub.foo!1 {{.*}}, $@convention(method) <τ_0_0 where τ_0_0 : AnyObject> (@in τ_0_0, @guaranteed GenericSub<τ_0_0>) -> @out Optional<τ_0_0>
 
 class C {}
diff --git a/test/SILGen/vtables.swift b/test/SILGen/vtables.swift
index 20e9b3e..dfc100b 100644
--- a/test/SILGen/vtables.swift
+++ b/test/SILGen/vtables.swift
@@ -88,11 +88,12 @@
 // Entries only exist for native Swift methods
 
 // CHECK: sil_vtable Hoozit {
-// CHECK:   #Hoozit.frob!1: {{.*}} : _T07vtables6HoozitC4frob{{[_0-9a-zA-Z]*}}F
-// CHECK:   #Hoozit.funge!1: {{.*}} : _T07vtables6HoozitC5funge{{[_0-9a-zA-Z]*}}F
-// CHECK:   #Hoozit.anse!1: {{.*}} : _T07vtables6HoozitC4anse{{[_0-9a-zA-Z]*}}F
-// CHECK:   #Hoozit.incorrige!1: {{.*}} : _T07vtables6HoozitC9incorrige{{[_0-9a-zA-Z]*}}F
-// CHECK: }
+// CHECK-NEXT:   #Hoozit.anse!1: {{.*}} : _T07vtables6HoozitC4anse{{[_0-9a-zA-Z]*}}F
+// CHECK-NEXT:   #Hoozit.incorrige!1: {{.*}} : _T07vtables6HoozitC9incorrige{{[_0-9a-zA-Z]*}}F
+// CHECK-NEXT:   #Hoozit.init!initializer.1: (Hoozit.Type) -> () -> Hoozit! : _T07vtables6HoozitCSQyACGycfc
+// CHECK-NEXT:   #Hoozit.init!initializer.1: (Hoozit.Type) -> (Int) -> Hoozit! : _T07vtables6HoozitCSQyACGSi7bellsOn_tcfc
+// CHECK-NEXT:   #Hoozit.deinit!deallocator: _T07vtables6HoozitCfD
+// CHECK-NEXT: }
 
 class Wotsit : Hoozit {
   override func funge() {}
@@ -100,11 +101,12 @@
 }
 
 // CHECK: sil_vtable Wotsit {
-// CHECK:   #Hoozit.frob!1: {{.*}} : _T07vtables6HoozitC4frob{{[_0-9a-zA-Z]*}}F
-// CHECK:   #Hoozit.funge!1: {{.*}} : _T07vtables6WotsitC5funge{{[_0-9a-zA-Z]*}}F
-// CHECK:   #Hoozit.anse!1: {{.*}} : _T07vtables6HoozitC4anse{{[_0-9a-zA-Z]*}}F
-// CHECK:   #Hoozit.incorrige!1: {{.*}} : _T07vtables6WotsitC9incorrige{{[_0-9a-zA-Z]*}}F
-// CHECK: }
+// CHECK-NEXT:   #Hoozit.anse!1: {{.*}} : _T07vtables6HoozitC4anse{{[_0-9a-zA-Z]*}}F
+// CHECK-NEXT:   #Hoozit.incorrige!1: {{.*}} : _T07vtables6WotsitC9incorrige{{[_0-9a-zA-Z]*}}F
+// CHECK-NEXT:   #Hoozit.init!initializer.1: (Hoozit.Type) -> () -> Hoozit! : _T07vtables6WotsitCSQyACGycfc
+// CHECK-NEXT:   #Hoozit.init!initializer.1: (Hoozit.Type) -> (Int) -> Hoozit! : _T07vtables6WotsitCSQyACGSi7bellsOn_tcfc
+// CHECK-NEXT:   #Wotsit.deinit!deallocator: _T07vtables6WotsitCfD
+// CHECK-NEXT: }
 
 // <rdar://problem/15282548>
 // CHECK: sil_vtable Base {
diff --git a/test/SILOptimizer/access_enforcement_noescape.swift b/test/SILOptimizer/access_enforcement_noescape.swift
new file mode 100644
index 0000000..3917da4
--- /dev/null
+++ b/test/SILOptimizer/access_enforcement_noescape.swift
@@ -0,0 +1,560 @@
+// RUN: %target-swift-frontend -enforce-exclusivity=checked -Onone -emit-sil -parse-as-library %s | %FileCheck %s
+// REQUIRES: asserts
+
+// This tests SILGen and AccessEnforcementSelection as a single set of tests.
+// (Some static/dynamic enforcement selection is done in SILGen, and some is
+// deferred. That may change over time but we want the outcome to be the same).
+//
+// Each FIXME line is a case that the current implementation misses.
+// The model is currently being refined, so this isn't set in stone.
+//
+// TODO: Move all static cases (search for // Error:) into
+// a set of -verify tests (noescape_static_diagnostics.swift).
+// and a set of separate SILGen-only tests to check [unknown] markers.
+//
+// TODO: Ensure that each dynamic case is covered by
+// Interpreter/enforce_exclusive_access.swift.
+
+// Helper
+func doOne(_ f: () -> ()) {
+  f()
+}
+
+// Helper
+func doTwo(_: ()->(), _: ()->()) {}
+
+// Helper
+func doOneInout(_: ()->(), _: inout Int) {}
+
+// FIXME: statically prohibit a call to a non-escaping closure
+// parameter using another non-escaping closure parameter as an argument.
+func reentrantNoescape(fn: (() -> ()) -> ()) {
+  fn { fn {} }
+}
+
+// Error: Cannot capture nonescaping closure.
+// func reentrantCapturedNoescape(fn: (() -> ()) -> ()) {
+//   let c = { fn {} }
+//   fn(c)
+// }
+
+// Helper
+struct Frob {
+  mutating func outerMut() { doOne { innerMut() } }
+  mutating func innerMut() {}
+}
+
+// Allow nested mutable access via closures.
+func nestedNoEscape(f: inout Frob) {
+  doOne { f.outerMut() }
+}
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape14nestedNoEscapeyAA4FrobVz1f_tF : $@convention(thin) (@inout Frob) -> () {
+// CHECK-NOT: begin_access
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape14nestedNoEscapeyAA4FrobVz1f_tF'
+
+// closure #1 in nestedNoEscape(f:)
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape14nestedNoEscapeyAA4FrobVz1f_tFyycfU_ : $@convention(thin) (@inout_aliasable Frob) -> () {
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [static] %0 : $*Frob
+// CHECK: [[ACCESS:%.*]] = begin_access [modify]
+// CHECK: %{{.*}} = apply %{{.*}}([[ACCESS]]) : $@convention(method) (@inout Frob) -> ()
+// CHECK: end_access [[ACCESS]] : $*Frob
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape14nestedNoEscapeyAA4FrobVz1f_tFyycfU_'
+
+// Allow aliased noescape reads.
+func readRead() {
+  var x = 3
+  // Around the call: [read] [dynamic]
+  // Inside each closure: [read] [static]
+  doTwo({ _ = x }, { _ = x })
+  x = 42
+}
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape8readReadyyF : $@convention(thin) () -> () {
+// CHECK: [[ALLOC:%.*]] = alloc_stack $Int, var, name "x"
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [read] [dynamic] [[ALLOC]] : $*Int
+// CHECK: apply
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape8readReadyyF'
+
+// closure #1 in readRead()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape8readReadyyFyycfU_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [read] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [read] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape8readReadyyFyycfU_'
+
+// closure #2 in readRead()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape8readReadyyFyycfU0_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [read] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [read] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape8readReadyyFyycfU0_'
+
+// Allow aliased noescape reads of an `inout` arg.
+func inoutReadRead(x: inout Int) {
+  // Around the call: [read] [static]
+  // Inside each closure: [read] [static]
+  doTwo({ _ = x }, { _ = x })
+}
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape09inoutReadE0ySiz1x_tF : $@convention(thin) (@inout Int) -> () {
+// CHECK: [[PA1:%.*]] = partial_apply
+// CHECK: [[PA2:%.*]] = partial_apply
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [read] [static] %0 : $*Int
+// CHECK: apply %{{.*}}([[PA1]], [[PA2]])
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape09inoutReadE0ySiz1x_tF'
+
+// closure #1 in inoutReadRead(x:)
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape09inoutReadE0ySiz1x_tFyycfU_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [read] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [read] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape09inoutReadE0ySiz1x_tFyycfU_'
+
+// closure #2 in inoutReadRead(x:)
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape09inoutReadE0ySiz1x_tFyycfU0_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [read] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [read] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape09inoutReadE0ySiz1x_tFyycfU0_'
+
+// Allow aliased noescape read + boxed read.
+func readBoxRead() {
+  var x = 3
+  let c = { _ = x }
+  // Around the call: [read] [dynamic]
+  // Inside may-escape closure `c`: [read] [dynamic]
+  // Inside never-escape closure: [read] [static]
+  doTwo(c, { _ = x })
+  x = 42
+}
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape11readBoxReadyyF : $@convention(thin) () -> () {
+// CHECK: [[PA1:%.*]] = partial_apply
+// CHECK: [[PA2:%.*]] = partial_apply
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [read] [dynamic] %0 : $*Int
+// CHECK: apply %{{.*}}([[PA1]], [[PA2]])
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape11readBoxReadyyF'
+
+// closure #1 in readBoxRead()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape11readBoxReadyyFyycfU_ : $@convention(thin) (@owned { var Int }) -> () {
+// CHECK: [[ADDR:%.*]] = project_box %0 : ${ var Int }, 0
+// CHECK: [[ACCESS:%.*]] = begin_access [read] [dynamic] [[ADDR]] : $*Int
+// CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape11readBoxReadyyFyycfU_'
+
+// closure #2 in readBoxRead()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape11readBoxReadyyFyycfU0_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [read] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [read] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape11readBoxReadyyFyycfU0_'
+
+// Error: cannout capture inout.
+//
+// func inoutReadReadBox(x: inout Int) {
+//   let c = { _ = x }
+//   doTwo({ _ = x }, c)
+// }
+
+// Allow aliased noescape read + write.
+func readWrite() {
+  var x = 3
+  // Around the call: [modify] [dynamic]
+  // Inside closure 1: [read] [static]
+  // Inside closure 2: [modify] [static]
+  doTwo({ _ = x }, { x = 42 })
+}
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape9readWriteyyF : $@convention(thin) () -> () {
+// CHECK: [[PA1:%.*]] = partial_apply
+// CHECK: [[PA2:%.*]] = partial_apply
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [dynamic] %0 : $*Int
+// CHECK: apply %{{.*}}([[PA1]], [[PA2]])
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape9readWriteyyF'
+
+// closure #1 in readWrite()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape9readWriteyyFyycfU_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [read] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [read] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape9readWriteyyFyycfU_'
+
+// closure #2 in readWrite()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape9readWriteyyFyycfU0_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [modify] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape9readWriteyyFyycfU0_'
+
+// Allow aliased noescape read + write of an `inout` arg.
+func inoutReadWrite(x: inout Int) {
+  // Around the call: [modify] [static]
+  // Inside closure 1: [read] [static]
+  // Inside closure 2: [modify] [static]
+  doTwo({ _ = x }, { x = 3 })
+}
+
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape14inoutReadWriteySiz1x_tF : $@convention(thin) (@inout Int) -> () {
+// CHECK: [[PA1:%.*]] = partial_apply
+// CHECK: [[PA2:%.*]] = partial_apply
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [static] %0 : $*Int
+// CHECK: apply %{{.*}}([[PA1]], [[PA2]])
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape14inoutReadWriteySiz1x_tF'
+
+// closure #1 in inoutReadWrite(x:)
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape14inoutReadWriteySiz1x_tFyycfU_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [read] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [read] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape14inoutReadWriteySiz1x_tFyycfU_'
+
+// closure #2 in inoutReadWrite(x:)
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape14inoutReadWriteySiz1x_tFyycfU0_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [modify] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape14inoutReadWriteySiz1x_tFyycfU0_'
+
+
+// FIXME: Trap on aliased boxed read + noescape write.
+//
+// Note: There's no actual exclusivity danger here, because `c` is
+// passed to a noescape argument and is never itself
+// captured. However, SILGen conservatively assumes that the
+// assignment `let c =` captures the closure. Later we could refine
+// the rules to recognize obviously nonescpaping closures.
+func readBoxWrite() {
+  var x = 3
+  let c = { _ = x }
+  // Around the call: [modify] [dynamic]
+  // Inside may-escape closure `c`: [read] [dynamic]
+  // Inside never-escape closure: [modify] [static]
+  doTwo(c, { x = 42 })
+}
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape12readBoxWriteyyF : $@convention(thin) () -> () {
+// CHECK: [[PA1:%.*]] = partial_apply
+// CHECK: [[PA2:%.*]] = partial_apply
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [dynamic] %0 : $*Int
+// CHECK: apply %{{.*}}([[PA1]], [[PA2]])
+// FIXME-CHECK: end_access [[ACCESS]]
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape12readBoxWriteyyF'
+
+// closure #1 in readBoxWrite()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape12readBoxWriteyyFyycfU_ : $@convention(thin) (@owned { var Int }) -> () {
+// CHECK: [[ADDR:%.*]] = project_box %0 : ${ var Int }, 0
+// CHECK: [[ACCESS:%.*]] = begin_access [read] [dynamic] [[ADDR]] : $*Int
+// CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape12readBoxWriteyyFyycfU_'
+
+// closure #2 in readBoxWrite()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape12readBoxWriteyyFyycfU0_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [modify] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape12readBoxWriteyyFyycfU0_'
+
+// Error: cannout capture inout.
+// func inoutReadBoxWrite(x: inout Int) {
+//   let c = { _ = x }
+//    doTwo({ x = 42 }, c)
+// }
+
+// FIXME: Trap on aliased noescape read + boxed write.
+//
+// See the note above.
+func readWriteBox() {
+  var x = 3
+  let c = { x = 42 }
+  // Around the call: [read] [dynamic]
+  // Inside may-escape closure `c`: [modify] [dynamic]
+  // Inside never-escape closure: [read] [static]
+  doTwo({ _ = x }, c)
+}
+
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape12readWriteBoxyyF : $@convention(thin) () -> () {
+// CHECK: [[PA1:%.*]] = partial_apply
+// CHECK: [[PA2:%.*]] = partial_apply
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [read] [dynamic] %0 : $*Int
+// CHECK: apply %{{.*}}([[PA2]], [[PA1]])
+// FIXME-CHECK: end_access [[ACCESS]]
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape12readWriteBoxyyF'
+
+// closure #1 in readWriteBox()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape12readWriteBoxyyFyycfU_ : $@convention(thin) (@owned { var Int }) -> () {
+// CHECK: [[ADDR:%.*]] = project_box %0 : ${ var Int }, 0
+// CHECK: [[ACCESS:%.*]] = begin_access [modify] [dynamic] [[ADDR]] : $*Int
+// CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape12readWriteBoxyyFyycfU_'
+
+// closure #2 in readWriteBox()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape12readWriteBoxyyFyycfU0_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [read] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [read] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape12readWriteBoxyyFyycfU0_'
+
+// Error: cannout capture inout.
+// func inoutReadWriteBox(x: inout Int) {
+//   let c = { x = 42 }
+//   doTwo({ _ = x }, c)
+// }
+
+// Error: noescape read + write inout.
+func readWriteInout() {
+  var x = 3
+  // Around the call: [read] [dynamic]
+  // Around the call: [modify] [static] // Error
+  // Inside closure: [modify] [static]
+  doOneInout({ _ = x }, &x)
+}
+
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape14readWriteInoutyyF : $@convention(thin) () -> () {
+// CHECK: [[PA1:%.*]] = partial_apply
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [read] [dynamic] %0 : $*Int
+// FIXME-CHECK: [[ACCESS2:%.*]] = begin_access [modify] [static] %0 : $*Int
+// FIXME-CHECK: apply %{{.*}}([[PA1]], [[ACCESS2]])
+// FIXME-CHECK: end_access [[ACCESS2]]
+// FIXME-CHECK: end_access [[ACCESS]]
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape14readWriteInoutyyF'
+
+// closure #1 in readWriteInout()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape14readWriteInoutyyFyycfU_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [read] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [read] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape14readWriteInoutyyFyycfU_'
+
+// Error: noescape read + write inout of an inout.
+func inoutReadWriteInout(x: inout Int) {
+  // Around the call: [read] [static]
+  // Around the call: [modify] [static] // Error
+  // Inside closure: [modify] [static]
+  doOneInout({ _ = x }, &x)
+}
+
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape19inoutReadWriteInoutySiz1x_tF : $@convention(thin) (@inout Int) -> () {
+// CHECK: [[PA1:%.*]] = partial_apply
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [read] [static] %0 : $*Int
+// FIXME-CHECK: [[ACCESS2:%.*]] = begin_access [modify] [static] %0 : $*Int
+// FIXME-CHECK: apply %{{.*}}([[PA1]], [[ACCESS2]])
+// FIXME-CHECK: end_access [[ACCESS2]]
+// FIXME-CHECK: end_access [[ACCESS]]
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape19inoutReadWriteInoutySiz1x_tF'
+
+// closure #1 in inoutReadWriteInout(x:)
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape19inoutReadWriteInoutySiz1x_tFyycfU_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [read] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [read] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape19inoutReadWriteInoutySiz1x_tFyycfU_'
+
+// Trap on boxed read + write inout.
+func readBoxWriteInout() {
+  var x = 3
+  let c = { _ = x }
+  // Around the call: [modify] [dynamic]
+  // Inside closure: [read] [dynamic]
+  doOneInout(c, &x)
+}
+
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape17readBoxWriteInoutyyF : $@convention(thin) () -> () {
+// CHECK: [[PA1:%.*]] = partial_apply
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [dynamic] %0 : $*Int
+// FIXME-CHECK: apply %{{.*}}([[PA1]], [[ACCESS]])
+// FIXME-CHECK: end_access [[ACCESS]]
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape17readBoxWriteInoutyyF'
+
+// closure #1 in readBoxWriteInout()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape17readBoxWriteInoutyyFyycfU_ : $@convention(thin) (@owned { var Int }) -> () {
+// CHECK: [[ADDR:%.*]] = project_box %0 : ${ var Int }, 0
+// CHECK: [[ACCESS:%.*]] = begin_access [read] [dynamic] [[ADDR]] : $*Int
+// CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape17readBoxWriteInoutyyFyycfU_'
+
+// Error: inout cannot be captured.
+// func inoutReadBoxWriteInout(x: inout Int) {
+//   let c = { _ = x }
+//   doOneInout(c, &x)
+// }
+
+// Allow aliased noescape write + write.
+func writeWrite() {
+  var x = 3
+  // Around the call: [modify] [dynamic]
+  // Inside closure 1: [modify] [static]
+  // Inside closure 2: [modify] [static]
+  doTwo({ x = 42 }, { x = 87 })
+  _ = x
+}
+
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape10writeWriteyyF : $@convention(thin) () -> () {
+// CHECK: [[PA1:%.*]] = partial_apply
+// CHECK: [[PA2:%.*]] = partial_apply
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [dynamic] %0 : $*Int
+// FIXME-CHECK: apply %{{.*}}([[PA1]], [[PA2]])
+// FIXME-CHECK: end_access [[ACCESS]]
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape10writeWriteyyF'
+
+// closure #1 in writeWrite()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape10writeWriteyyFyycfU_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [modify] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape10writeWriteyyFyycfU_'
+
+// closure #2 in writeWrite()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape10writeWriteyyFyycfU0_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [modify] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape10writeWriteyyFyycfU0_'
+
+  
+// Allow aliased noescape write + write of an `inout` arg.
+func inoutWriteWrite(x: inout Int) {
+  // Around the call: [modify] [static]
+  // Inside closure 1: [modify] [static]
+  // Inside closure 2: [modify] [static]
+  doTwo({ x = 42}, { x = 87 })
+}
+
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape010inoutWriteE0ySiz1x_tF : $@convention(thin) (@inout Int) -> () {
+// CHECK: [[PA1:%.*]] = partial_apply
+// CHECK: [[PA2:%.*]] = partial_apply
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [static] %0 : $*Int
+// FIXME-CHECK: apply %{{.*}}([[PA1]], [[PA2]])
+// FIXME-CHECK: end_access [[ACCESS]]
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape010inoutWriteE0ySiz1x_tF'
+
+// closure #1 in inoutWriteWrite(x:)
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape010inoutWriteE0ySiz1x_tFyycfU_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [modify] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape010inoutWriteE0ySiz1x_tFyycfU_'
+
+// closure #2 in inoutWriteWrite(x:)
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape010inoutWriteE0ySiz1x_tFyycfU0_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [modify] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape010inoutWriteE0ySiz1x_tFyycfU0_'
+
+// FIXME: Trap on aliased boxed write + noescape write.
+//
+// See the note above.
+func writeWriteBox() {
+  var x = 3
+  let c = { x = 87 }
+  // Around the call: [modify] [dynamic]
+  // Inside may-escape closure `c`: [modify] [dynamic]
+  // Inside never-escape closure: [modify] [static]
+  doTwo({ x = 42 }, c)
+  _ = x
+}
+
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape13writeWriteBoxyyF : $@convention(thin) () -> () {
+// CHECK: [[PA1:%.*]] = partial_apply
+// CHECK: [[PA2:%.*]] = partial_apply
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [dynamic] %0 : $*Int
+// FIXME-CHECK: apply %{{.*}}([[PA1]], [[PA2]])
+// FIXME-CHECK: end_access [[ACCESS]]
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape13writeWriteBoxyyF'
+
+// closure #1 in writeWriteBox()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape13writeWriteBoxyyFyycfU_ : $@convention(thin) (@owned { var Int }) -> () {
+// CHECK: [[ADDR:%.*]] = project_box %0 : ${ var Int }, 0
+// CHECK: [[ACCESS:%.*]] = begin_access [modify] [dynamic] [[ADDR]] : $*Int
+// CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape13writeWriteBoxyyFyycfU_'
+
+// closure #2 in writeWriteBox()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape13writeWriteBoxyyFyycfU0_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [modify] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape13writeWriteBoxyyFyycfU0_'
+
+// Error: inout cannot be captured.
+// func inoutWriteWriteBox(x: inout Int) {
+//   let c = { x = 87 }
+//   doTwo({ x = 42 }, c)
+// }
+
+/// Error: on noescape write + write inout.
+func writeWriteInout() {
+  var x = 3
+  // Around the call: [modify] [dynamic]
+  // Around the call: [modify] [static] // Error
+  // Inside closure: [modify] [static]
+  doOneInout({ x = 42 }, &x)
+}
+
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape15writeWriteInoutyyF : $@convention(thin) () -> () {
+// CHECK: [[PA1:%.*]] = partial_apply
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [dynamic] %0 : $*Int
+// FIXME-CHECK: [[ACCESS2:%.*]] = begin_access [modify] [static] %0 : $*Int
+// FIXME-CHECK: apply %{{.*}}([[PA1]], [[ACCESS2]])
+// FIXME-CHECK: end_access [[ACCESS]]
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape15writeWriteInoutyyF'
+
+// closure #1 in writeWriteInout()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape15writeWriteInoutyyFyycfU_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [modify] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape15writeWriteInoutyyFyycfU_'
+
+// Error: on noescape write + write inout.
+func inoutWriteWriteInout(x: inout Int) {
+  // Around the call: [modify] [static]
+  // Around the call: [modify] [static] // Error
+  // Inside closure: [modify] [static]
+  doOneInout({ x = 42 }, &x)
+}
+
+// inoutWriteWriteInout(x:)
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape010inoutWriteE5InoutySiz1x_tF : $@convention(thin) (@inout Int) -> () {
+// CHECK: [[PA1:%.*]] = partial_apply
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [static] %0 : $*Int
+// FIXME-CHECK: [[ACCESS2:%.*]] = begin_access [modify] [static] %0 : $*Int
+// FIXME-CHECK: apply %{{.*}}([[PA1]], [[ACCESS2]])
+// FIXME-CHECK: end_access [[ACCESS]]
+// CHECK-LABEL: // end sil function '_T027access_enforcement_noescape010inoutWriteE5InoutySiz1x_tF'
+
+// closure #1 in inoutWriteWriteInout(x:)
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape010inoutWriteE5InoutySiz1x_tFyycfU_ : $@convention(thin) (@inout_aliasable Int) -> () {
+// CHECK-NOT: [[ACCESS:%.*]] = begin_access [modify] [dynamic]
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [static] %0 : $*Int
+// FIXME-CHECK: end_access [[ACCESS]] 
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape010inoutWriteE5InoutySiz1x_tFyycfU_'
+
+// Trap on boxed write + write inout.
+func writeBoxWriteInout() {
+  var x = 3
+  let c = { x = 42 }
+  // Around the call: [modify] [dynamic]
+  // Inside closure: [modify] [dynamic]
+  doOneInout(c, &x)
+}
+
+// CHECK-LABEL: sil hidden @_T027access_enforcement_noescape18writeBoxWriteInoutyyF : $@convention(thin) () -> () {
+// CHECK: [[PA1:%.*]] = partial_apply
+// FIXME-CHECK: [[ACCESS:%.*]] = begin_access [modify] [dynamic] %0 : $*Int
+// FIXME-CHECK: apply %{{.*}}([[PA1]], [[ACCESS]])
+// FIXME-CHECK: end_access [[ACCESS]]
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape18writeBoxWriteInoutyyF'
+
+// closure #1 in writeBoxWriteInout()
+// CHECK-LABEL: sil private @_T027access_enforcement_noescape18writeBoxWriteInoutyyFyycfU_ : $@convention(thin) (@owned { var Int }) -> () {
+// CHECK: [[ADDR:%.*]] = project_box %0 : ${ var Int }, 0
+// CHECK: [[ACCESS:%.*]] = begin_access [modify] [dynamic] [[ADDR]] : $*Int
+// CHECK: end_access [[ACCESS]]
+// CHECK-LABEL: } // end sil function '_T027access_enforcement_noescape18writeBoxWriteInoutyyFyycfU_'
+
+// Error: Cannot capture inout
+// func inoutWriteBoxWriteInout(x: inout Int) {
+//   let c = { x = 42 }
+//   doOneInout(c, &x)
+// }
diff --git a/test/SILOptimizer/access_enforcement_selection.sil b/test/SILOptimizer/access_enforcement_selection.sil
index 6707dc2..07dec6d 100644
--- a/test/SILOptimizer/access_enforcement_selection.sil
+++ b/test/SILOptimizer/access_enforcement_selection.sil
@@ -64,6 +64,41 @@
   %99 = return %98 : $()
 }
 
+
+sil @takesInoutAndClosure : $@convention(thin) (@inout Builtin.Int64, @owned @callee_owned () -> ()) -> ()
+sil @closureCapturingByStorageAddress : $@convention(thin) (@inout_aliasable Builtin.Int64) -> ()
+
+// Test static enforcement of box addresses that escape via closure
+// partial_applys.
+// application.
+// CHECK-LABEL: sil hidden @escapeAsArgumentToPartialApply : $@convention(thin) () -> () {
+// CHECK: bb0:
+// CHECK:  [[BOX:%.*]] = alloc_box ${ var Builtin.Int64 }, var, name "x"
+// CHECK:  [[ADR:%.*]] = project_box [[BOX]] : ${ var Builtin.Int64 }, 0
+// CHECK:  [[FUNC:%.*]] = function_ref @takesInoutAndClosure : $@convention(thin) (@inout Builtin.Int64, @owned @callee_owned () -> ()) -> ()
+// CHECK:  [[CLOSURE:%.*]] = function_ref @closureCapturingByStorageAddress : $@convention(thin) (@inout_aliasable Builtin.Int64) -> ()
+// CHECK:  [[PA:%.*]] = partial_apply [[CLOSURE]]([[ADR]]) : $@convention(thin) (@inout_aliasable Builtin.Int64) -> ()
+// CHECK:  [[MODIFY:%.*]] = begin_access [modify] [static] [[ADR]] : $*Builtin.Int64
+// CHECK:  %{{.*}} = apply [[FUNC]]([[MODIFY]], [[PA]]) : $@convention(thin) (@inout Builtin.Int64, @owned @callee_owned () -> ()) -> ()
+// CHECK:  end_access [[MODIFY]] : $*Builtin.Int64
+// CHECK:  destroy_value [[BOX]] : ${ var Builtin.Int64 }
+// CHECK:  return %{{.*}} : $()
+// CHECK-LABEL:} // end sil function 'escapeAsArgumentToPartialApply'
+sil hidden @escapeAsArgumentToPartialApply : $@convention(thin) () -> () {
+  %2 = alloc_box ${ var Builtin.Int64 }, var, name "x"
+  %3 = project_box %2 : ${ var Builtin.Int64 }, 0
+  %4 = function_ref @takesInoutAndClosure : $@convention(thin) (@inout Builtin.Int64, @owned @callee_owned () -> ()) -> ()
+  %5 = function_ref @closureCapturingByStorageAddress : $@convention(thin) (@inout_aliasable Builtin.Int64) -> ()
+  %6 = partial_apply %5(%3) : $@convention(thin) (@inout_aliasable Builtin.Int64) -> ()
+  %7 = begin_access [modify] [unknown] %3 : $*Builtin.Int64
+  %8 = apply %4(%7, %6) : $@convention(thin) (@inout Builtin.Int64, @owned @callee_owned () -> ()) -> ()
+  end_access %7 : $*Builtin.Int64
+  destroy_value %2 : ${ var Builtin.Int64 }
+  %9 = tuple ()
+  %10 = return %9 : $()
+}
+
+
 // Test static enforcement of copied boxes.
 // FIXME: Oops... We make this dynamic.
 //
diff --git a/test/SILOptimizer/access_enforcement_selection.swift b/test/SILOptimizer/access_enforcement_selection.swift
index 92e9bc5..57b5195 100644
--- a/test/SILOptimizer/access_enforcement_selection.swift
+++ b/test/SILOptimizer/access_enforcement_selection.swift
@@ -12,6 +12,11 @@
 // Helper taking a basic, no-escape closure.
 func takeClosure(_: ()->Int) {}
 
+// Helper taking a basic, no-escape closure.
+func takeClosureAndInout(_: inout Int, _: ()->Int) {}
+
+// Helper taking an escaping closure.
+func takeEscapingClosure(_: @escaping ()->Int) {}
 
 // Generate an alloc_stack that escapes into a closure.
 public func captureStack() -> Int {
@@ -21,15 +26,54 @@
   return x
 }
 // CHECK-LABEL: Access Enforcement Selection in _T028access_enforcement_selection12captureStackSiyF
-// Static access for `return x`.
+// Dynamic access for `return x`. Since the closure is non-escaping, using
+// dynamic enforcement here is more conservative than it needs to be -- static
+// is sufficient here.
 // CHECK: Static Access: %{{.*}} = begin_access [read] [static] %{{.*}} : $*Int
 
-// The access inside the closure is dynamic, until we have the logic necessary to
-// prove that no other closures are passed to `takeClosure` that may write to
-// `x`.
-//
 // CHECK-LABEL: Access Enforcement Selection in _T028access_enforcement_selection12captureStackSiyFSiycfU_
+// CHECK: Static Access: %{{.*}} = begin_access [read] [static] %{{.*}} : $*Int
+
+
+// Generate an alloc_stack that does not escape into a closure.
+public func nocaptureStack() -> Int {
+  var x = 3
+  takeClosure { return 5 }
+  return x
+}
+// CHECK-LABEL: Access Enforcement Selection in _T028access_enforcement_selection14nocaptureStackSiyF
+// Static access for `return x`.
+// CHECK: Static Access: %{{.*}} = begin_access [read] [static] %{{.*}} : $*Int
+//
+// CHECK-LABEL: Access Enforcement Selection in _T028access_enforcement_selection14nocaptureStackSiyFSiycfU_
+
+// Generate an alloc_stack that escapes into a closure while an access is
+// in progress.
+public func captureStackWithInoutInProgress() -> Int {
+  // Use a `var` so `x` isn't treated as a literal.
+  var x = 3
+  takeClosureAndInout(&x) { return x }
+  return x
+}
+// CHECK-LABEL: Access Enforcement Selection in _T028access_enforcement_selection31captureStackWithInoutInProgressSiyF
+// Static access for `&x`.
+// CHECK-DAG: Static Access: %{{.*}} = begin_access [modify] [static] %{{.*}} : $*Int
+// Static access for `return x`.
+// CHECK-DAG: Static Access: %{{.*}} = begin_access [read] [static] %{{.*}} : $*Int
+//
+// CHECK-LABEL: Access Enforcement Selection in _T028access_enforcement_selection31captureStackWithInoutInProgressSiyFSiycfU_
+// CHECK: Static Access: %{{.*}} = begin_access [read] [static] %{{.*}} : $*Int
+
+// Generate an alloc_box that escapes into a closure.
+public func captureBox() -> Int {
+  var x = 3
+  takeEscapingClosure { x = 4; return x }
+  return x
+}
+// CHECK-LABEL: Access Enforcement Selection in _T028access_enforcement_selection10captureBoxSiyF
+// Dynamic access for `return x`.
 // CHECK: Dynamic Access: %{{.*}} = begin_access [read] [dynamic] %{{.*}} : $*Int
+// CHECK-LABEL: _T028access_enforcement_selection10captureBoxSiyFSiycfU_
 
 // Generate a closure in which the @inout_aliasing argument
 // escapes to an @inout function `bar`.
@@ -45,11 +89,10 @@
 
 // CHECK-LABEL: Access Enforcement Selection in _T028access_enforcement_selection14recaptureStackSiyFSiycfU_
 //
-// The first [modify] access inside the closure must be dynamic. It enforces the
+// The first [modify] access inside the closure is static. It enforces the
 // @inout argument.
-// CHECK: Dynamic Access: %{{.*}} = begin_access [modify] [dynamic] %{{.*}} : $*Int
+// CHECK: Static Access: %{{.*}} = begin_access [modify] [static] %{{.*}} : $*Int
 //
-// The second [read] access is only dynamic because the analysis isn't strong
-// enough to prove otherwise. Same as `captureStack` above.
+// The second [read] access is static. Same as `captureStack` above.
 //
-// CHECK: Dynamic Access: %{{.*}} = begin_access [read] [dynamic] %{{.*}} : $*Int
+// CHECK: Static Access: %{{.*}} = begin_access [read] [static] %{{.*}} : $*Int
diff --git a/test/SILOptimizer/access_marker_mandatory.swift b/test/SILOptimizer/access_marker_mandatory.swift
index f3a978a..ded9e41 100644
--- a/test/SILOptimizer/access_marker_mandatory.swift
+++ b/test/SILOptimizer/access_marker_mandatory.swift
@@ -5,7 +5,7 @@
   var o: AnyObject
 }
 
-// CHECK-LABEL: sil [noinline] @_T023access_marker_mandatory5initSAA1SVSi_s9AnyObject_ptF : $@convention(thin) (Int, @owned AnyObject) -> @owned S {
+// CHECK-LABEL: sil [noinline] @_T023access_marker_mandatory5initSAA1SVSi_yXltF : $@convention(thin) (Int, @owned AnyObject) -> @owned S {
 // CHECK: bb0(%0 : $Int, %1 : $AnyObject):
 // CHECK: [[STK:%.*]] = alloc_stack $S, var, name "s"
 // CHECK: cond_br %{{.*}}, bb1, bb2
@@ -24,7 +24,7 @@
 // CHECK: destroy_addr [[STK]]
 // CHECK: dealloc_stack [[STK]]
 // CHECK: return [[RET]] : $S
-// CHECK-LABEL: } // end sil function '_T023access_marker_mandatory5initSAA1SVSi_s9AnyObject_ptF'
+// CHECK-LABEL: } // end sil function '_T023access_marker_mandatory5initSAA1SVSi_yXltF'
 @inline(never)
 public func initS(_ x: Int, _ o: AnyObject) -> S {
   var s: S
@@ -39,10 +39,10 @@
 @inline(never)
 func takeS(_ s: S) {}
 
-// CHECK-LABEL: sil @_T023access_marker_mandatory14modifyAndReadSys9AnyObject_p1o_tF : $@convention(thin) (@owned AnyObject) -> () {
+// CHECK-LABEL: sil @_T023access_marker_mandatory14modifyAndReadSyyXl1o_tF : $@convention(thin) (@owned AnyObject) -> () {
 // CHECK: bb0(%0 : $AnyObject):
 // CHECK: [[STK:%.*]] = alloc_stack $S, var, name "s"
-// CHECK: [[FINIT:%.*]] = function_ref @_T023access_marker_mandatory5initSAA1SVSi_s9AnyObject_ptF : $@convention(thin) (Int, @owned AnyObject) -> @owned S
+// CHECK: [[FINIT:%.*]] = function_ref @_T023access_marker_mandatory5initSAA1SVSi_yXltF : $@convention(thin) (Int, @owned AnyObject) -> @owned S
 // CHECK: [[INITS:%.*]] = apply [[FINIT]](%{{.*}}, %0) : $@convention(thin) (Int, @owned AnyObject) -> @owned S
 // CHECK: store [[INITS]] to [[STK]] : $*S
 // CHECK: [[WRITE:%.*]] = begin_access [modify] [static] [[STK]] : $*S
@@ -53,7 +53,7 @@
 // CHECK: [[READ:%.*]] = begin_access [read] [static] [[STK]] : $*S
 // CHECK: end_access [[READ]]
 // CHECK: apply [[FTAKE]](%{{.*}}) : $@convention(thin) (@owned S) -> ()
-// CHECK-LABEL: } // end sil function '_T023access_marker_mandatory14modifyAndReadSys9AnyObject_p1o_tF'
+// CHECK-LABEL: } // end sil function '_T023access_marker_mandatory14modifyAndReadSyyXl1o_tF'
 public func modifyAndReadS(o: AnyObject) {
   var s = initS(3, o)
   s.i = 42
diff --git a/test/SILOptimizer/arcsequenceopts_rcidentityanalysis.sil b/test/SILOptimizer/arcsequenceopts_rcidentityanalysis.sil
index b583420..558bbf6 100644
--- a/test/SILOptimizer/arcsequenceopts_rcidentityanalysis.sil
+++ b/test/SILOptimizer/arcsequenceopts_rcidentityanalysis.sil
@@ -38,7 +38,7 @@
   case some(T)
 }
 
-public protocol AnyObject : class {}
+public typealias AnyObject = Builtin.AnyObject
 
 class C {
   init()
diff --git a/test/SILOptimizer/capture_promotion_ownership.sil b/test/SILOptimizer/capture_promotion_ownership.sil
index dfbcc30..7be1070 100644
--- a/test/SILOptimizer/capture_promotion_ownership.sil
+++ b/test/SILOptimizer/capture_promotion_ownership.sil
@@ -31,7 +31,7 @@
 sil @dummy_func : $@convention(thin) (Int, Int, Int) -> Int
 
 // CHECK-LABEL: sil @test_capture_promotion
-sil @test_capture_promotion : $@convention(thin) () -> @owned @callee_owned () -> Int {
+sil @test_capture_promotion : $@convention(thin) () -> @owned @callee_owned () -> (Int, Builtin.Int64) {
 bb0:
   // CHECK: [[BOX1:%.*]] = alloc_box $<τ_0_0> { var τ_0_0 } <Foo>
   // CHECK: [[MARKED_BOX1:%.*]] = mark_uninitialized [var] [[BOX1]]
@@ -88,17 +88,17 @@
 // previously used to capture and pass the variable by reference
 // CHECK-NEXT: {{.*}} = partial_apply [[CLOSURE_PROMOTE]]([[LOADFOO]], [[LOADBAZ]], [[LOADINT]])
 
-  %17 = function_ref @closure0 : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Foo>, @owned <τ_0_0> { var τ_0_0 } <Baz>, @owned <τ_0_0> { var τ_0_0 } <Int>) -> Int
+  %17 = function_ref @closure0 : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Foo>, @owned <τ_0_0> { var τ_0_0 } <Baz>, @owned <τ_0_0> { var τ_0_0 } <Int>) -> (Int, Builtin.Int64)
   %18 = copy_value %1ab : $<τ_0_0> { var τ_0_0 } <Foo>
   %19 = copy_value %6 : $<τ_0_0> { var τ_0_0 } <Baz>
   %20 = copy_value %11 : $<τ_0_0> { var τ_0_0 } <Int>
-  %21 = partial_apply %17(%18, %19, %20) : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Foo>, @owned <τ_0_0> { var τ_0_0 } <Baz>, @owned <τ_0_0> { var τ_0_0 } <Int>) -> Int
+  %21 = partial_apply %17(%18, %19, %20) : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Foo>, @owned <τ_0_0> { var τ_0_0 } <Baz>, @owned <τ_0_0> { var τ_0_0 } <Int>) -> (Int, Builtin.Int64)
 
   destroy_value %11 : $<τ_0_0> { var τ_0_0 } <Int>
   destroy_value %6 : $<τ_0_0> { var τ_0_0 } <Baz>
   destroy_value %1ab : $<τ_0_0> { var τ_0_0 } <Foo>
 
-  return %21 : $@callee_owned () -> Int
+  return %21 : $@callee_owned () -> (Int, Builtin.Int64)
 }
 
 // CHECK-LABEL: sil @test_capture_promotion_indirect
@@ -163,7 +163,7 @@
   return %21 : $@callee_owned () -> @out Int
 }
 
-// CHECK-LABEL: sil private @_T08closure0Tf2iii_n : $@convention(thin) (@owned Foo, @owned Baz, Int) -> Int {
+// CHECK-LABEL: sil private @_T08closure0Tf2iii_n : $@convention(thin) (@owned Foo, @owned Baz, Int) -> (Int, Builtin.Int64) {
 // CHECK: bb0([[ORIGINAL_ARG0:%.*]] : @owned $Foo, [[ORIGINAL_ARG1:%.*]] : @owned $Baz, [[ARG2:%.*]] : @trivial $Int):
 // CHECK:   [[ARG0:%.*]] = begin_borrow [[ORIGINAL_ARG0]]
 // CHECK:   [[ARG1:%.*]] = begin_borrow [[ORIGINAL_ARG1]]
@@ -177,6 +177,7 @@
 // CHECK:   destroy_value [[ARG0_COPY]]
 
 // CHECK: [[EXTRACT_BAZ_X:%.*]] = struct_extract [[ARG1]] : $Baz, #Baz.x
+// CHECK: [[EXTRACT_INT_VALUE:%.*]] = struct_extract [[ARG2]] : $Int, #Int.value
 // CHECK: [[RETVAL:%.*]] = apply [[DUMMY_FUNC]]([[APPLY_FOO]], [[EXTRACT_BAZ_X]], {{.*}}) : $@convention(thin) (Int, Int, Int) -> Int
 
 // The release of %4 is removed because the Int type is trivial
@@ -190,10 +191,11 @@
 // it is a reference type
 // CHECK: end_borrow [[ARG0]] from [[ORIGINAL_ARG0]]
 // CHECK: destroy_value [[ORIGINAL_ARG0]]
-// CHECK: return [[RETVAL]] : $Int
+// CHECK: [[RESULT:%.*]] = tuple ([[RETVAL]] : $Int, [[EXTRACT_INT_VALUE]] : $Builtin.Int64)
+// CHECK: return [[RESULT]] : $(Int, Builtin.Int64)
 // CHECK: } // end sil function '_T08closure0Tf2iii_n'
 
-sil private @closure0 : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Foo>, @owned <τ_0_0> { var τ_0_0 } <Baz>, @owned <τ_0_0> { var τ_0_0 } <Int>) -> Int {
+sil private @closure0 : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Foo>, @owned <τ_0_0> { var τ_0_0 } <Baz>, @owned <τ_0_0> { var τ_0_0 } <Int>) -> (Int, Builtin.Int64) {
 bb0(%0 : @owned $<τ_0_0> { var τ_0_0 } <Foo>, %2 : @owned $<τ_0_0> { var τ_0_0 } <Baz>, %4 : @owned $<τ_0_0> { var τ_0_0 } <Int>):
   %1 = project_box %0 : $<τ_0_0> { var τ_0_0 } <Foo>, 0
   %3 = project_box %2 : $<τ_0_0> { var τ_0_0 } <Baz>, 0
@@ -210,11 +212,14 @@
   %12 = struct_element_addr %3 : $*Baz, #Baz.x
   %13 = load [trivial] %12 : $*Int
   %14 = load [trivial] %5 : $*Int
-  %15 = apply %7(%11, %13, %14) : $@convention(thin) (Int, Int, Int) -> Int
+  %15 = struct_element_addr %5 : $*Int, #Int.value
+  %16 = load [trivial] %15 : $*Builtin.Int64
+  %17 = apply %7(%11, %13, %14) : $@convention(thin) (Int, Int, Int) -> Int
   destroy_value %4 : $<τ_0_0> { var τ_0_0 } <Int>
   destroy_value %2 : $<τ_0_0> { var τ_0_0 } <Baz>
   destroy_value %0 : $<τ_0_0> { var τ_0_0 } <Foo>
-  return %15 : $Int
+  %18 = tuple(%17 : $Int, %16 : $Builtin.Int64)
+  return %18 : $(Int, Builtin.Int64)
 }
 
 // The closure in this function is not promotable because it mutates its argument
@@ -303,7 +308,6 @@
 
 sil [transparent] [serialized] @_T0s1poiSiSi_SitF : $@convention(thin) (Int, Int) -> Int
 
-
 sil private @closure_indirect_result : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Foo>, @owned <τ_0_0> { var τ_0_0 } <Baz>, @owned <τ_0_0> { var τ_0_0 } <Int>) -> @out Int {
 bb0(%0: @trivial $*Int, %1 : @owned $<τ_0_0> { var τ_0_0 } <Foo>, %2 : @owned $<τ_0_0> { var τ_0_0 } <Baz>, %4 : @owned $<τ_0_0> { var τ_0_0 } <Int>):
   %17 = project_box %1 : $<τ_0_0> { var τ_0_0 } <Foo>, 0
diff --git a/test/SILOptimizer/cast_folding.swift b/test/SILOptimizer/cast_folding.swift
index 4e61be2..daa86f2 100644
--- a/test/SILOptimizer/cast_folding.swift
+++ b/test/SILOptimizer/cast_folding.swift
@@ -6,7 +6,7 @@
 // In ideal world, all those testNN functions should be simplified down to a single basic block
 // which returns either true or false, i.e. all type checks should folded statically.
 
-protocol P {}
+public protocol P {}
 
 protocol Q: P {}
 
@@ -217,6 +217,15 @@
   return t is (x: Int, y: A)
 }
 
+func cast41<T>(_ t: T, _ mt: T.Type) -> Bool {
+	let typ = type(of: t as Any)
+	return typ is AnyClass
+}
+
+func cast42(_ p: P) -> Bool {
+  return type(of: p as Any) is AnyClass
+}
+
 // CHECK-LABEL: sil hidden [noinline] @_T012cast_folding5test0SbyF : $@convention(thin) () -> Bool
 // CHECK: bb0
 // CHECK-NEXT: %0 = integer_literal $Builtin.Int1, -1
@@ -920,6 +929,27 @@
   return cast40((1, a))
 }
 
+// CHECK-LABEL: sil [noinline] @_T012cast_folding6test41SbyF
+// CHECK: bb0
+// FIXME: Would love to fold this to just "true"
+// CHECK-NOT: return:
+// CHECK: checked_cast_br
+// CHECK: //{{.*}}_T012cast_folding6test41{{.*}}F
+@inline(never)
+public func test41() -> Bool {
+    return cast41(A(), P.self)
+}
+
+// CHECK-LABEL: sil [noinline] @_T012cast_folding6test42{{.*}}F
+// CHECK: bb0
+// CHECK-NOT: return:
+// CHECK: checked_cast
+// CHECK: //{{.*}}_T012cast_folding6test42{{.*}}F
+@inline(never)
+public func test42(_ p: P) -> Bool {
+    return cast42(p)
+}
+
 print("test0=\(test0())")
 
 print("test1=\(test1())")
diff --git a/test/SILOptimizer/cast_folding_objc.swift b/test/SILOptimizer/cast_folding_objc.swift
index 742a75b..400c1d5 100644
--- a/test/SILOptimizer/cast_folding_objc.swift
+++ b/test/SILOptimizer/cast_folding_objc.swift
@@ -52,7 +52,7 @@
 // the compiler does not statically know if this object
 // is NSNumber can be converted into Int.
 
-// CHECK-LABEL: sil [noinline] @_T017cast_folding_objc35testMayBeBridgedCastFromObjCtoSwiftSis9AnyObject_pF
+// CHECK-LABEL: sil [noinline] @_T017cast_folding_objc35testMayBeBridgedCastFromObjCtoSwiftSiyXlF
 // CHECK: unconditional_checked_cast_addr
 // CHECK: return
 @inline(never)
@@ -64,7 +64,7 @@
 // the compiler does not statically know if this object
 // is NSString can be converted into String.
 
-// CHECK-LABEL: sil [noinline] @_T017cast_folding_objc41testConditionalBridgedCastFromObjCtoSwiftSSSgs9AnyObject_pF
+// CHECK-LABEL: sil [noinline] @_T017cast_folding_objc41testConditionalBridgedCastFromObjCtoSwiftSSSgyXlF
 // CHECK: unconditional_checked_cast_addr
 // CHECK: return
 @inline(never)
diff --git a/test/SILOptimizer/cast_folding_objc_no_foundation.swift b/test/SILOptimizer/cast_folding_objc_no_foundation.swift
index e8fad99..b05ed57 100644
--- a/test/SILOptimizer/cast_folding_objc_no_foundation.swift
+++ b/test/SILOptimizer/cast_folding_objc_no_foundation.swift
@@ -7,7 +7,7 @@
 
 struct PlainStruct {}
 
-// CHECK-LABEL: sil shared [noinline] @_T031cast_folding_objc_no_foundation23testAnyObjectToArrayIntSbs0gH0_pFTf4g_n
+// CHECK-LABEL: sil shared [noinline] @_T031cast_folding_objc_no_foundation23testAnyObjectToArrayIntSbyXlFTf4g_n
 // CHECK: bb0(%0 : $AnyObject):
 // CHECK: [[SOURCE:%.*]] = alloc_stack $AnyObject
 // CHECK: [[TARGET:%.*]] = alloc_stack $Array<Int>
@@ -17,7 +17,7 @@
   return a is [Int]
 }
 
-// CHECK-LABEL: sil shared [noinline] @_T031cast_folding_objc_no_foundation26testAnyObjectToArrayStringSbs0gH0_pFTf4g_n
+// CHECK-LABEL: sil shared [noinline] @_T031cast_folding_objc_no_foundation26testAnyObjectToArrayStringSbyXlFTf4g_n
 // CHECK: bb0(%0 : $AnyObject):
 // CHECK: [[SOURCE:%.*]] = alloc_stack $AnyObject
 // CHECK: [[TARGET:%.*]] = alloc_stack $Array<String>
@@ -37,7 +37,7 @@
   return a is [PlainStruct]
 }
 
-// CHECK-LABEL: sil shared [noinline] @_T031cast_folding_objc_no_foundation25testAnyObjectToDictionarySbs0gH0_pFTf4g_n
+// CHECK-LABEL: sil shared [noinline] @_T031cast_folding_objc_no_foundation25testAnyObjectToDictionarySbyXlFTf4g_n
 // CHECK: bb0(%0 : $AnyObject):
 // CHECK: [[SOURCE:%.*]] = alloc_stack $AnyObject
 // CHECK: [[TARGET:%.*]] = alloc_stack $Dictionary<Int, String>
@@ -47,7 +47,7 @@
   return a is [Int: String]
 }
 
-// CHECK-LABEL: sil shared [noinline] @_T031cast_folding_objc_no_foundation21testAnyObjectToStringSbs0gH0_pFTf4g_n
+// CHECK-LABEL: sil shared [noinline] @_T031cast_folding_objc_no_foundation21testAnyObjectToStringSbyXlFTf4g_n
 // CHECK: bb0(%0 : $AnyObject):
 // CHECK: [[SOURCE:%.*]] = alloc_stack $AnyObject
 // CHECK: [[TARGET:%.*]] = alloc_stack $String
diff --git a/test/SILOptimizer/character_literals.swift b/test/SILOptimizer/character_literals.swift
new file mode 100644
index 0000000..696626d
--- /dev/null
+++ b/test/SILOptimizer/character_literals.swift
@@ -0,0 +1,32 @@
+// RUN: %target-swift-frontend -parse-as-library -O -emit-ir  %s | %FileCheck %s
+// REQUIRES: swift_stdlib_no_asserts,optimized_stdlib,CPU=x86_64
+
+// This is an end-to-end test to ensure that the optimizer generates
+// a simple literal for character literals.
+
+// CHECK-LABEL: define {{.*}}charArray
+// CHECK-NOT: {{^}}[^ ]
+// CHECK:       store i64 9223372036854775649, i64*
+// CHECK-NOT: {{^}}[^ ]
+// CHECK:       store i64 9223372036854775650, i64*
+// CHECK-NOT: {{^}}[^ ]
+// CHECK:       store i64 9223372036854775651, i64*
+// CHECK-NOT: {{^}}[^ ]
+// CHECK:       store i64 9223372036854775652, i64*
+// CHECK-NOT: {{^}}[^ ]
+// CHECK:       ret
+public func charArray(_ i: Int) -> [Character] {
+  return [ "a", "b", "c", "d" ]
+}
+
+// CHECK-LABEL: define {{.*}}singleChar
+// CHECK: ret {{.*}} 9223372036854775649
+public func singleChar() -> Character {
+  return "a"
+}
+
+// CHECK-LABEL: define {{.*}}singleNonAsciiChar
+// CHECK: ret {{.*}} 9223372036848850918
+public func singleNonAsciiChar() -> Character {
+  return "日"
+}
diff --git a/test/SILOptimizer/devirt_jump_thread.sil b/test/SILOptimizer/devirt_jump_thread.sil
index 1e87286..1e1e852 100644
--- a/test/SILOptimizer/devirt_jump_thread.sil
+++ b/test/SILOptimizer/devirt_jump_thread.sil
@@ -442,6 +442,5 @@
 
 sil [serialized] @_TZFsoi3eeeFTGSqPs9AnyObject__GSqPS____Sb : $@convention(thin) (@owned Optional<AnyObject>, @owned Optional<AnyObject>) -> Bool
 
-sil_witness_table C: AnyObject module main
 
 
diff --git a/test/SILOptimizer/exclusivity_static_diagnostics.sil b/test/SILOptimizer/exclusivity_static_diagnostics.sil
index 4b2830a..ab6f71b 100644
--- a/test/SILOptimizer/exclusivity_static_diagnostics.sil
+++ b/test/SILOptimizer/exclusivity_static_diagnostics.sil
@@ -38,7 +38,7 @@
   %3 = project_box %2 : ${ var Int }, 0
   store %0 to [trivial] %3 : $*Int
   %4 = function_ref @takesTwoInouts : $@convention(thin) (@inout Int, @inout Int) -> ()
-  %5 = begin_access [modify] [unknown] %3 : $*Int  // expected-warning {{simultaneous accesses; modification requires exclusive access}}
+  %5 = begin_access [modify] [unknown] %3 : $*Int  // expected-error {{simultaneous accesses, but modification requires exclusive access; consider copying to a local variable}}
   %6 = begin_access [modify] [unknown] %3 : $*Int  // expected-note {{conflicting access is here}}
   %7 = apply %4(%5, %6) : $@convention(thin) (@inout Int, @inout Int) -> ()
   end_access %6 : $*Int
@@ -55,7 +55,7 @@
   %3 = project_box %2 : ${ var Int }, 0
   store %0 to [trivial] %3 : $*Int
   %4 = function_ref @takesTwoInouts : $@convention(thin) (@inout Int, @inout Int) -> ()
-  %5 = begin_access [modify] [unknown] %3 : $*Int  // expected-warning {{simultaneous accesses; modification requires exclusive access}}
+  %5 = begin_access [modify] [unknown] %3 : $*Int  // expected-error {{simultaneous accesses, but modification requires exclusive access; consider copying to a local variable}}
   %6 = begin_access [modify] [unknown] %5 : $*Int
   %7 = begin_access [modify] [unknown] %3 : $*Int  // expected-note {{conflicting access is here}}
   %8 = apply %4(%5, %6) : $@convention(thin) (@inout Int, @inout Int) -> ()
@@ -147,7 +147,7 @@
   br bb1
 bb1:
   // Make sure we don't diagnose twice.
-  %4 = begin_access [modify] [unknown] %3 : $*Int // expected-warning {{simultaneous accesses; modification requires exclusive access}}
+  %4 = begin_access [modify] [unknown] %3 : $*Int // expected-error {{simultaneous accesses, but modification requires exclusive access; consider copying to a local variable}}
   %5 = begin_access [modify] [unknown] %3 : $*Int // expected-note {{conflicting access is here}}
   end_access %5: $*Int
   end_access %4: $*Int
@@ -199,7 +199,7 @@
   %2 = project_box %1 : ${ var Int }, 0
   store %0 to [trivial] %2 : $*Int
   %4 = begin_access [read] [unknown] %2 : $*Int // expected-note {{conflicting access is here}}
-  %5 = begin_access [modify] [unknown] %2 : $*Int // expected-warning {{simultaneous accesses; modification requires exclusive access}}
+  %5 = begin_access [modify] [unknown] %2 : $*Int // expected-error {{simultaneous accesses, but modification requires exclusive access; consider copying to a local variable}}
   end_access %5 : $*Int
   end_access %4: $*Int
   destroy_value %1 : ${ var Int }
@@ -213,7 +213,7 @@
   %1 = alloc_box ${ var Int }
   %2 = project_box %1 : ${ var Int }, 0
   store %0 to [trivial] %2 : $*Int
-  %4 = begin_access [modify] [unknown] %2 : $*Int // expected-warning {{simultaneous accesses; modification requires exclusive access}}
+  %4 = begin_access [modify] [unknown] %2 : $*Int // expected-error {{simultaneous accesses, but modification requires exclusive access; consider copying to a local variable}}
   %5 = begin_access [read] [unknown] %2 : $*Int // expected-note {{conflicting access is here}}
   end_access %5 : $*Int
   end_access %4: $*Int
@@ -232,7 +232,7 @@
 bb0(%0 : $ClassWithStoredProperty):
   %1 = ref_element_addr %0 : $ClassWithStoredProperty, #ClassWithStoredProperty.f
 
-  // expected-warning@+1{{simultaneous accesses to var 'f'; modification requires exclusive access}}
+  // expected-error@+1{{simultaneous accesses to var 'f', but modification requires exclusive access; consider copying to a local variable}}
   %2 = begin_access [modify] [dynamic] %1 : $*Int
   %3 = ref_element_addr %0 : $ClassWithStoredProperty, #ClassWithStoredProperty.f
 
@@ -252,7 +252,7 @@
   %2 = begin_borrow %0 : $ClassWithStoredProperty
   %3 = ref_element_addr %1 : $ClassWithStoredProperty, #ClassWithStoredProperty.f
 
-  // expected-warning@+1{{simultaneous accesses to var 'f'; modification requires exclusive access}}
+  // expected-error@+1{{simultaneous accesses to var 'f', but modification requires exclusive access; consider copying to a local variable}}
   %4 = begin_access [modify] [dynamic] %3 : $*Int
   %5 = ref_element_addr %2 : $ClassWithStoredProperty, #ClassWithStoredProperty.f
 
@@ -279,7 +279,7 @@
   store %0 to [trivial] %3 : $*Int
   %4 = copy_value %2 : ${ var Int }
   %5 = project_box %4 : ${ var Int }, 0
-  %6 = begin_access [modify] [unknown] %3 : $*Int  // expected-warning {{simultaneous accesses; modification requires exclusive access}}
+  %6 = begin_access [modify] [unknown] %3 : $*Int  // expected-error {{simultaneous accesses, but modification requires exclusive access; consider copying to a local variable}}
   %7 = begin_access [modify] [unknown] %5 : $*Int  // expected-note {{conflicting access is here}}
   end_access %7 : $*Int
   end_access %6: $*Int
@@ -297,7 +297,7 @@
   %3 = project_box %2 : ${ var Int }, 0
   store %0 to [trivial] %3 : $*Int
   %4 = project_box %2 : ${ var Int }, 0
-  %5 = begin_access [modify] [unknown] %3 : $*Int  // expected-warning {{simultaneous accesses; modification requires exclusive access}}
+  %5 = begin_access [modify] [unknown] %3 : $*Int  // expected-error {{simultaneous accesses, but modification requires exclusive access; consider copying to a local variable}}
   %6 = begin_access [modify] [unknown] %4 : $*Int  // expected-note {{conflicting access is here}}
   end_access %6 : $*Int
   end_access %5: $*Int
@@ -315,7 +315,7 @@
 bb0(%0 : $Int):
   %1 = global_addr @global1 :$*Int
   %2 = global_addr @global1 :$*Int
-  %3 = begin_access [modify] [unknown] %1 : $*Int  // expected-warning {{simultaneous accesses; modification requires exclusive access}}
+  %3 = begin_access [modify] [unknown] %1 : $*Int  // expected-error {{simultaneous accesses, but modification requires exclusive access; consider copying to a local variable}}
   %4 = begin_access [modify] [unknown] %2 : $*Int  // expected-note {{conflicting access is here}}
   end_access %4 : $*Int
   end_access %3: $*Int
@@ -348,7 +348,7 @@
   store %0 to [trivial] %3 : $*Int
   %4 = function_ref @takesTwoInouts : $@convention(thin) (@inout Int, @inout Int) -> ()
   %5 = begin_access [read] [unknown] %3 : $*Int  // expected-note {{conflicting access is here}}
-  %6 = begin_access [modify] [unknown] %3 : $*Int  // expected-warning {{simultaneous accesses; modification requires exclusive access}}
+  %6 = begin_access [modify] [unknown] %3 : $*Int  // expected-error {{simultaneous accesses, but modification requires exclusive access; consider copying to a local variable}}
   %7 = begin_access [read] [unknown] %3 : $*Int // no-error
   %8 = apply %4(%5, %6) : $@convention(thin) (@inout Int, @inout Int) -> ()
   end_access %7 : $*Int
@@ -368,7 +368,7 @@
   %3 = project_box %2 : ${ var Int }, 0
   store %0 to [trivial] %3 : $*Int
   %4 = function_ref @takesTwoInouts : $@convention(thin) (@inout Int, @inout Int) -> ()
-  %5 = begin_access [modify] [unknown] %3 : $*Int  // expected-warning {{simultaneous accesses; modification requires exclusive access}}
+  %5 = begin_access [modify] [unknown] %3 : $*Int  // expected-error {{simultaneous accesses, but modification requires exclusive access; consider copying to a local variable}}
   %6 = begin_access [modify] [unknown] %3 : $*Int  // expected-note {{conflicting access is here}}
   %7 = begin_access [modify] [unknown] %3 : $*Int  // no-error
   %8 = apply %4(%5, %6) : $@convention(thin) (@inout Int, @inout Int) -> ()
@@ -392,7 +392,7 @@
   %4 = function_ref @takesTwoInouts : $@convention(thin) (@inout Int, @inout Int) -> ()
   %5 = begin_access [modify] [unknown] %3 : $*Int  // no-note
   end_access %5 : $*Int
-  %6 = begin_access [modify] [unknown] %3 : $*Int  // expected-warning {{simultaneous accesses; modification requires exclusive access}}
+  %6 = begin_access [modify] [unknown] %3 : $*Int  // expected-error {{simultaneous accesses, but modification requires exclusive access; consider copying to a local variable}}
   %7 = begin_access [modify] [unknown] %3 : $*Int  // expected-note {{conflicting access is here}}
   %8 = apply %4(%5, %6) : $@convention(thin) (@inout Int, @inout Int) -> ()
   end_access %7 : $*Int
diff --git a/test/SILOptimizer/exclusivity_static_diagnostics.swift b/test/SILOptimizer/exclusivity_static_diagnostics.swift
index 29bbf27..8ea7779 100644
--- a/test/SILOptimizer/exclusivity_static_diagnostics.swift
+++ b/test/SILOptimizer/exclusivity_static_diagnostics.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -enforce-exclusivity=checked -emit-sil -primary-file %s -o /dev/null -verify
+// RUN: %target-swift-frontend -enforce-exclusivity=checked -swift-version 4 -emit-sil -primary-file %s -o /dev/null -verify
 
 import Swift
 
@@ -7,9 +7,11 @@
 func simpleInoutDiagnostic() {
   var i = 7
 
+  // FIXME: This diagnostic should be removed if static enforcement is
+  // turned on by default.
   // expected-error@+4{{inout arguments are not allowed to alias each other}}
   // expected-note@+3{{previous aliasing argument}}
-  // expected-warning@+2{{simultaneous accesses to var 'i'; modification requires exclusive access}}
+  // expected-error@+2{{simultaneous accesses to var 'i', but modification requires exclusive access; consider copying to a local variable}}
   // expected-note@+1{{conflicting access is here}}
   takesTwoInouts(&i, &i)
 }
@@ -17,7 +19,7 @@
 func inoutOnInoutParameter(p: inout Int) {
   // expected-error@+4{{inout arguments are not allowed to alias each other}}
   // expected-note@+3{{previous aliasing argument}}
-  // expected-warning@+2{{simultaneous accesses to parameter 'p'; modification requires exclusive access}}
+  // expected-error@+2{{simultaneous accesses to parameter 'p', but modification requires exclusive access; consider copying to a local variable}}
   // expected-note@+1{{conflicting access is here}}
   takesTwoInouts(&p, &p)
 }
@@ -25,7 +27,7 @@
 func swapNoSuppression(_ i: Int, _ j: Int) {
   var a: [Int] = [1, 2, 3]
 
-  // expected-warning@+2{{simultaneous accesses to var 'a'; modification requires exclusive access}}
+  // expected-error@+2{{simultaneous accesses to var 'a', but modification requires exclusive access; consider copying to a local variable}}
   // expected-note@+1{{conflicting access is here}}
   swap(&a[i], &a[j]) // no-warning
 }
@@ -40,13 +42,13 @@
   mutating func callMutatingMethodThatTakesSelfInout() {
     // expected-error@+4{{inout arguments are not allowed to alias each other}}
     // expected-note@+3{{previous aliasing argument}}
-    // expected-warning@+2{{simultaneous accesses to parameter 'self'; modification requires exclusive access}}
+    // expected-error@+2{{simultaneous accesses to parameter 'self', but modification requires exclusive access; consider copying to a local variable}}
     // expected-note@+1{{conflicting access is here}}
     mutate(&self)
   }
 
   mutating func callMutatingMethodThatTakesSelfStoredPropInout() {
-    // expected-warning@+2{{simultaneous accesses to parameter 'self'; modification requires exclusive access}}
+    // expected-error@+2{{simultaneous accesses to parameter 'self', but modification requires exclusive access; consider copying to a local variable}}
     // expected-note@+1{{conflicting access is here}}
     mutate(&self.f)
   }
@@ -54,7 +56,7 @@
 
 var globalStruct1 = StructWithMutatingMethodThatTakesSelfInout()
 func callMutatingMethodThatTakesGlobalStoredPropInout() {
-  // expected-warning@+2{{simultaneous accesses to var 'globalStruct1'; modification requires exclusive access}}
+  // expected-error@+2{{simultaneous accesses to var 'globalStruct1', but modification requires exclusive access; consider copying to a local variable}}
   // expected-note@+1{{conflicting access is here}}
   globalStruct1.mutate(&globalStruct1.f)
 }
@@ -66,13 +68,13 @@
   func callMutatingMethodThatTakesClassStoredPropInout() {
     s1.mutate(&s2.f) // no-warning
 
-    // expected-warning@+2{{simultaneous accesses to var 's1'; modification requires exclusive access}}
+    // expected-error@+2{{simultaneous accesses to var 's1', but modification requires exclusive access; consider copying to a local variable}}
     // expected-note@+1{{conflicting access is here}}
     s1.mutate(&s1.f)
 
     let local1 = self
 
-    // expected-warning@+2{{simultaneous accesses to var 's1'; modification requires exclusive access}}
+    // expected-error@+2{{simultaneous accesses to var 's1', but modification requires exclusive access; consider copying to a local variable}}
     // expected-note@+1{{conflicting access is here}}
     local1.s1.mutate(&local1.s1.f)
   }
@@ -82,7 +84,7 @@
   var local = p
   // expected-error@+4{{inout arguments are not allowed to alias each other}}
   // expected-note@+3{{previous aliasing argument}}
-  // expected-warning@+2{{simultaneous accesses to var 'local'; modification requires exclusive access}}
+  // expected-error@+2{{simultaneous accesses to var 'local', but modification requires exclusive access; consider copying to a local variable}}
   // expected-note@+1{{conflicting access is here}}
   takesTwoInouts(&local, &local)
 }
diff --git a/test/SILOptimizer/exclusivity_static_diagnostics_swift3.swift b/test/SILOptimizer/exclusivity_static_diagnostics_swift3.swift
new file mode 100644
index 0000000..cf37f51
--- /dev/null
+++ b/test/SILOptimizer/exclusivity_static_diagnostics_swift3.swift
@@ -0,0 +1,30 @@
+// RUN: %target-swift-frontend -enforce-exclusivity=checked -swift-version 3 -emit-sil -primary-file %s -o /dev/null -verify
+
+import Swift
+
+// In Swift 3 compatibility mode, diagnostics for exclusive accesses are
+// warnings not errors.
+
+func takesTwoInouts<T>(_ p1: inout T, _ p2: inout T) { }
+
+func simpleInoutDiagnostic() {
+  var i = 7
+
+  // expected-error@+4{{inout arguments are not allowed to alias each other}}
+  // expected-note@+3{{previous aliasing argument}}
+  // expected-warning@+2{{simultaneous accesses to var 'i', but modification requires exclusive access; consider copying to a local variable}}
+  // expected-note@+1{{conflicting access is here}}
+  takesTwoInouts(&i, &i)
+}
+
+struct X {
+  var f = 12
+}
+
+func diagnoseOnSameField() {
+  var x = X()
+
+  // expected-warning@+2{{simultaneous accesses to var 'x', but modification requires exclusive access; consider copying to a local variable}}
+  // expected-note@+1{{conflicting access is here}}
+  takesTwoInouts(&x.f, &x.f)
+}
diff --git a/test/SILOptimizer/exclusivity_suppress_swap.swift b/test/SILOptimizer/exclusivity_suppress_swap.swift
index b6749f6..b8ed856 100644
--- a/test/SILOptimizer/exclusivity_suppress_swap.swift
+++ b/test/SILOptimizer/exclusivity_suppress_swap.swift
@@ -9,7 +9,7 @@
 
   swap(&a[i], &a[j]) // no-warning
 
-  // expected-warning@+2{{simultaneous accesses to var 'a'; modification requires exclusive access}}
+  // expected-warning@+2{{simultaneous accesses to var 'a', but modification requires exclusive access; consider copying to a local variable}}
   // expected-note@+1{{conflicting access is here}}
   takesTwoInouts(&a[i], &a[j])
 }
@@ -20,7 +20,7 @@
   // We don't suppress when swap() is used as a value
   let mySwap: (inout Int, inout Int) -> () = swap
 
-  // expected-warning@+2{{simultaneous accesses to var 'a'; modification requires exclusive access}}
+  // expected-warning@+2{{simultaneous accesses to var 'a', but modification requires exclusive access; consider copying to a local variable}}
   // expected-note@+1{{conflicting access is here}}
   mySwap(&a[i], &a[j])
 }
@@ -33,7 +33,7 @@
     return (p1, p2) = (p2, p1)
   }
 
-  // expected-warning@+2{{simultaneous accesses to var 'a'; modification requires exclusive access}}
+  // expected-warning@+2{{simultaneous accesses to var 'a', but modification requires exclusive access; consider copying to a local variable}}
   // expected-note@+1{{conflicting access is here}}
   swap(&a[i], &a[j])
 }
diff --git a/test/SILOptimizer/predictable_memopt_unreferenceable_storage.swift b/test/SILOptimizer/predictable_memopt_unreferenceable_storage.swift
index fb111da..0d6e20c 100644
--- a/test/SILOptimizer/predictable_memopt_unreferenceable_storage.swift
+++ b/test/SILOptimizer/predictable_memopt_unreferenceable_storage.swift
@@ -14,7 +14,7 @@
         self.s = s
     }
 }
-// CHECK-LABEL: sil hidden @_T042predictable_memopt_unreferenceable_storage1TVACSo19StructWithBitfieldsV1v_AA1SV1stcfC
+// CHECK-LABEL: sil hidden @_T042predictable_memopt_unreferenceable_storage1TVACSC19StructWithBitfieldsV1v_AA1SV1stcfC
 // CHECK:       bb0(%0 : $StructWithBitfields, %1 : $S, %2 : $@thin T.Type):
 // CHECK:         [[RESULT:%.*]] = struct $T (%0 : $StructWithBitfields, %1 : $S)
 // CHECK:         return [[RESULT]]
diff --git a/test/SILOptimizer/specialize.sil b/test/SILOptimizer/specialize.sil
index 43988ca..0663a5d 100644
--- a/test/SILOptimizer/specialize.sil
+++ b/test/SILOptimizer/specialize.sil
@@ -614,3 +614,31 @@
   %8 = tuple ()
   return %8 : $()
 }
+
+struct YYY<T> {
+}
+
+enum MyOptional<T> {
+  case none
+  case some(T)
+}
+
+// Check that a specialization of a self-recursive function is produced
+// and it is not crashing the compiler.
+// CHECK-LABEL: sil shared @_T025testSelfRecursiveFunction4main10MyOptionalOyAB3YYYVyypGG_Tg5 : $@convention(thin) (MyOptional<YYY<Any>>) -> ()
+sil @testSelfRecursiveFunction : $@convention(thin) <T> (@in T) -> () {
+bb0(%0 : $*T):
+  %2 = function_ref @testSelfRecursiveFunction : $@convention(thin) <τ_0_0> (@in τ_0_0) -> ()
+  %3 = alloc_stack $MyOptional<YYY<Any>>
+  inject_enum_addr %3 : $*MyOptional<YYY<Any>>, #MyOptional.none!enumelt
+  %5 = tuple ()
+  %6 = load %3 : $*MyOptional<YYY<Any>>
+  %7 = alloc_stack $MyOptional<YYY<Any>>
+  store %6 to %7 : $*MyOptional<YYY<Any>>
+  %9 = apply %2<MyOptional<YYY<Any>>>(%7) : $@convention(thin) <τ_0_0> (@in τ_0_0) -> ()
+  dealloc_stack %7 : $*MyOptional<YYY<Any>>
+  dealloc_stack %3 : $*MyOptional<YYY<Any>>
+  destroy_addr %0 : $*T
+  %13 = tuple ()
+  return %13 : $()
+} // end sil function 'testSelfRecursiveFunction'
diff --git a/test/SILOptimizer/specialize_anyobject.swift b/test/SILOptimizer/specialize_anyobject.swift
index f711c42..e7d48a2 100644
--- a/test/SILOptimizer/specialize_anyobject.swift
+++ b/test/SILOptimizer/specialize_anyobject.swift
@@ -17,6 +17,6 @@
 
 // CHECK-LABEL: sil hidden @_T020specialize_anyobject6callit{{[_0-9a-zA-Z]*}}F
 func callit(s: S<CB>) {
-  // CHECK: function_ref @_T0s3eeeoiSbs9AnyObject_pSg_ACtF : $@convention(thin) (@owned Optional<AnyObject>, @owned Optional<AnyObject>) -> Bool
+  // CHECK: function_ref @_T0s3eeeoiSbyXlSg_ABtF : $@convention(thin) (@owned Optional<AnyObject>, @owned Optional<AnyObject>) -> Bool
   s.crash()
 }
diff --git a/test/SILOptimizer/specialize_checked_cast_branch.swift b/test/SILOptimizer/specialize_checked_cast_branch.swift
index 547c3ed..bf9f9f3 100644
--- a/test/SILOptimizer/specialize_checked_cast_branch.swift
+++ b/test/SILOptimizer/specialize_checked_cast_branch.swift
@@ -325,17 +325,17 @@
   _preconditionFailure("??? Profit?")
 }
 
-// CHECK-LABEL: sil shared @_T030specialize_checked_cast_branch26ExistentialToArchetypeCastxs9AnyObject_p1o_x1ttlFAA1CC_Tg5Tf4nd_n : $@convention(thin) (@owned AnyObject) -> @owned C
+// CHECK-LABEL: sil shared @_T030specialize_checked_cast_branch26ExistentialToArchetypeCastxyXl1o_x1ttlFAA1CC_Tg5Tf4nd_n : $@convention(thin) (@owned AnyObject) -> @owned C
 // CHECK: bb0
 // CHECK:  checked_cast_br %0 : $AnyObject to $C
 // CHECK: bb1
 
-// CHECK-LABEL: sil shared @_T030specialize_checked_cast_branch26ExistentialToArchetypeCastxs9AnyObject_p1o_x1ttlFAA8NotUInt8V_Tg5Tf4gd_n : $@convention(thin) (@guaranteed AnyObject) -> NotUInt8
+// CHECK-LABEL: sil shared @_T030specialize_checked_cast_branch26ExistentialToArchetypeCastxyXl1o_x1ttlFAA8NotUInt8V_Tg5Tf4gd_n : $@convention(thin) (@guaranteed AnyObject) -> NotUInt8
 // CHECK: bb0
 // CHECK:  checked_cast_addr_br take_always AnyObject in {{%.*}} : $*AnyObject to NotUInt8 in {{%.*}} : $*NotUInt8,
 // CHECK: bb1
 
-// CHECK-LABEL: sil shared @_T030specialize_checked_cast_branch26ExistentialToArchetypeCastxs9AnyObject_p1o_x1ttlFsAC_p_Tg5Tf4nd_n : $@convention(thin) (@owned AnyObject) -> @owned AnyObject
+// CHECK-LABEL: sil shared @_T030specialize_checked_cast_branch26ExistentialToArchetypeCastxyXl1o_x1ttlFyXl_Tg5Tf4nd_n : $@convention(thin) (@owned AnyObject) -> @owned AnyObject
 // CHECK: bb0
 // CHECK-NOT: checked_cast_br %
 // CHECK: return %0 : $AnyObject
diff --git a/test/SILOptimizer/specialize_unconditional_checked_cast.swift b/test/SILOptimizer/specialize_unconditional_checked_cast.swift
index 0c0bd83..c451d13 100644
--- a/test/SILOptimizer/specialize_unconditional_checked_cast.swift
+++ b/test/SILOptimizer/specialize_unconditional_checked_cast.swift
@@ -353,7 +353,7 @@
 // CHECK: return
 
 // AnyObject -> AnyObject
-// CHECK-LABEL: sil shared [noinline] @_T037specialize_unconditional_checked_cast22ExistentialToArchetype{{[_0-9a-zA-Z]*}}AnyObject{{.*}}Tg5 : $@convention(thin) (@owned AnyObject, @owned AnyObject) -> @owned AnyObject {
+// CHECK-LABEL: sil shared [noinline] @_T037specialize_unconditional_checked_cast22ExistentialToArchetype{{[_0-9a-zA-Z]*}}yXl{{.*}}Tg5 : $@convention(thin) (@owned AnyObject, @owned AnyObject) -> @owned AnyObject {
 // CHECK: bb0(%0 : $AnyObject, %1 : $AnyObject):
 // CHECK: strong_release %1
 // CHECK: return %0
diff --git a/test/Sema/accessibility_private.swift b/test/Sema/accessibility_private.swift
index d177628..01a4072 100644
--- a/test/Sema/accessibility_private.swift
+++ b/test/Sema/accessibility_private.swift
@@ -1,4 +1,4 @@
-// RUN: %target-typecheck-verify-swift
+// RUN: %target-typecheck-verify-swift -swift-version 4
 
 class Container {
   private func foo() {} // expected-note * {{declared here}}
@@ -15,8 +15,8 @@
     _ = self.bar
     self.bar = 5
 
-    privateExtensionMethod() // expected-error {{'privateExtensionMethod' is inaccessible due to 'private' protection level}}
-    self.privateExtensionMethod() // expected-error {{'privateExtensionMethod' is inaccessible due to 'private' protection level}}
+    privateExtensionMethod()
+    self.privateExtensionMethod()
 
     _ = PrivateInner()
     _ = Container.PrivateInner()
@@ -27,14 +27,14 @@
       obj.foo()
       _ = obj.bar
       obj.bar = 5
-      obj.privateExtensionMethod() // expected-error {{'privateExtensionMethod' is inaccessible due to 'private' protection level}}
+      obj.privateExtensionMethod()
 
       _ = PrivateInner()
       _ = Container.PrivateInner()
     }
 
     var inner: PrivateInner? // expected-error {{property must be declared private because its type uses a private type}}
-    var innerQualified: Container.PrivateInner? // expected-error {{property must be declared private because its type uses a private type}}
+    var innerQualified: Container.PrivateInner? // expected-error {{property must be declared private because its type uses a private type}} expected-note {{declared here}}
   }
 
   var inner: PrivateInner? // expected-error {{property must be declared private because its type uses a private type}}
@@ -54,42 +54,42 @@
   private func privateExtensionMethod() {} // expected-note * {{declared here}}
 
   func extensionTest() {
-    foo() // expected-error {{'foo' is inaccessible due to 'private' protection level}}
-    self.foo() // expected-error {{'foo' is inaccessible due to 'private' protection level}}
+    foo()
+    self.foo()
 
-    _ = bar // expected-error {{'bar' is inaccessible due to 'private' protection level}}
-    bar = 5 // expected-error {{'bar' is inaccessible due to 'private' protection level}}
-    _ = self.bar // expected-error {{'bar' is inaccessible due to 'private' protection level}}
-    self.bar = 5 // expected-error {{'bar' is inaccessible due to 'private' protection level}}
+    _ = bar
+    bar = 5
+    _ = self.bar
+    self.bar = 5
 
     privateExtensionMethod()
     self.privateExtensionMethod()
 
-    _ = PrivateInner() // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
-    _ = Container.PrivateInner() // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
+    _ = PrivateInner()
+    _ = Container.PrivateInner()
   }
 
   // FIXME: Why do these errors happen twice?
-  var extensionInner: PrivateInner? { return nil } // expected-error 2 {{'PrivateInner' is inaccessible due to 'private' protection level}}
-  var extensionInnerQualified: Container.PrivateInner? { return nil } // expected-error 2 {{'PrivateInner' is inaccessible due to 'private' protection level}}
+  var extensionInner: PrivateInner? { return nil } // expected-error {{property must be declared private because its type uses a private type}}
+  var extensionInnerQualified: Container.PrivateInner? { return nil } // expected-error {{property must be declared private because its type uses a private type}}
 }
 
 extension Container.Inner {
   func extensionTest(obj: Container) {
-    obj.foo() // expected-error {{'foo' is inaccessible due to 'private' protection level}}
-    _ = obj.bar // expected-error {{'bar' is inaccessible due to 'private' protection level}}
-    obj.bar = 5 // expected-error {{'bar' is inaccessible due to 'private' protection level}}
-    obj.privateExtensionMethod() // expected-error {{'privateExtensionMethod' is inaccessible due to 'private' protection level}}
+    obj.foo()
+    _ = obj.bar
+    obj.bar = 5
+    obj.privateExtensionMethod()
 
     // FIXME: Unqualified lookup won't look into Container from here.
     _ = PrivateInner() // expected-error {{use of unresolved identifier 'PrivateInner'}}
-    _ = Container.PrivateInner() // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
+    _ = Container.PrivateInner()
   }
 
   // FIXME: Why do these errors happen twice?
   // FIXME: Unqualified lookup won't look into Container from here.
   var inner: PrivateInner? { return nil } // expected-error 2 {{use of undeclared type 'PrivateInner'}}
-  var innerQualified: Container.PrivateInner? { return nil } // expected-error 2 {{'PrivateInner' is inaccessible due to 'private' protection level}}
+  var innerQualified: Container.PrivateInner? { return nil } // expected-error {{invalid redeclaration of 'innerQualified'}} expected-error {{property must be declared private because its type uses a private type}}
 }
 
 class Sub : Container {
@@ -149,17 +149,17 @@
 }
 
 extension Container {
-  private typealias ExtensionConflictingType = Int // expected-note * {{declared here}}
+  private typealias ExtensionConflictingType = Int // expected-note {{found candidate with type}} expected-note {{previously declared here}}
 }
 extension Container {
-  private typealias ExtensionConflictingType = Double // expected-note * {{declared here}}
+  private typealias ExtensionConflictingType = Double  // expected-error {{invalid redeclaration of 'ExtensionConflictingType'}} expected-note {{found candidate with type}}
 }
 extension Container {
   func test() {
-    let a: ExtensionConflictingType? = nil // expected-error {{'ExtensionConflictingType' is inaccessible due to 'private' protection level}}
-    let b: Container.ExtensionConflictingType? = nil // expected-error {{'ExtensionConflictingType' is inaccessible due to 'private' protection level}}
-    _ = ExtensionConflictingType() // expected-error {{'ExtensionConflictingType' is inaccessible due to 'private' protection level}}
-    _ = Container.ExtensionConflictingType() // expected-error {{'ExtensionConflictingType' is inaccessible due to 'private' protection level}}
+    let a: ExtensionConflictingType? = nil
+    let b: Container.ExtensionConflictingType? = nil // expected-error {{ambiguous type name 'ExtensionConflictingType' in 'Container'}}
+    _ = ExtensionConflictingType()
+    _ = Container.ExtensionConflictingType()
   }
 }
 
diff --git a/test/Sema/accessibility_shared_private.swift b/test/Sema/accessibility_shared_private.swift
new file mode 100644
index 0000000..7fae278
--- /dev/null
+++ b/test/Sema/accessibility_shared_private.swift
@@ -0,0 +1,76 @@
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: %utils/split_file.py -o %t %s
+// RUN: %target-swift-frontend -swift-version 4 -typecheck %t/declarations.swift %t/other_file_extensions.swift -verify
+
+// BEGIN declarations.swift
+struct PrivateMembers  {
+  private var privateCounter: Int = 0 // expected-note 2 {{declared here}}
+  private func privateMethod() {} // expected-note 2 {{declared here}}
+  private struct PrivateInner { // expected-note 3 {{declared here}}
+    private struct Invisible {} // expected-note {{declared here}}
+  }
+}
+extension PrivateMembers {
+  private func usePrivate() { // expected-note 2 {{declared here}}
+    print(privateCounter)
+    privateMethod()
+    _ = PrivateInner()
+    _ = PrivateInner.Invisible() // expected-error {{'Invisible' is inaccessible due to 'private' protection level}}
+  }
+}
+func using(_ obj: PrivateMembers) {
+  print(obj.privateCounter) // expected-error {{'privateCounter' is inaccessible due to 'private' protection level}}
+  obj.privateMethod() // expected-error {{'privateMethod' is inaccessible due to 'private' protection level}}
+  obj.usePrivate() // expected-error {{'usePrivate' is inaccessible due to 'private' protection level}}
+  _ = PrivateMembers.PrivateInner() // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
+  _ = PrivateMembers.PrivateInner.Invisible() // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
+}
+
+struct Outer {
+  private static func privateDeclaration() {}
+  struct Middle {
+    private static func privateDeclaration() {}
+    struct Inner {
+      private static func privateDeclaration() {}
+    }
+  }
+}
+
+extension Outer.Middle.Inner {
+  func useParentDeclarationPrivate() {
+    Outer.privateDeclaration()
+    Outer.Middle.privateDeclaration()
+    Outer.Middle.Inner.privateDeclaration()
+  }
+}
+
+// BEGIN other_file_extensions.swift
+extension PrivateMembers {
+  private func useDeclarationPrivate() {
+    print(privateCounter) // expected-error {{'privateCounter' is inaccessible due to 'private' protection level}}
+    privateMethod() // expected-error {{'privateMethod' is inaccessible due to 'private' protection level}}
+    usePrivate() // expected-error {{'usePrivate' is inaccessible due to 'private' protection level}}
+    _ = PrivateInner() // expected-error {{'PrivateInner' is inaccessible due to 'private' protection level}}
+  }
+}
+
+extension PrivateMembers {
+  private func useExtensionPrivate() {
+    useDeclarationPrivate()
+  }
+}
+
+extension Outer {
+  private struct MiddleExtension {
+    private static func privateDeclaration() {} // expected-note {{declared here}}
+  }
+  private static func outerExtension() {}
+}
+
+extension Outer.Middle.Inner {
+  func useParentExtensionPrivate() {
+    Outer.outerExtension()
+    _ = Outer.MiddleExtension()
+    Outer.MiddleExtension.privateDeclaration() // expected-error {{'privateDeclaration' is inaccessible due to 'private' protection level}}
+  }
+}
diff --git a/test/Sema/exhaustive_switch.swift b/test/Sema/exhaustive_switch.swift
index 87e1bfa..944db82 100644
--- a/test/Sema/exhaustive_switch.swift
+++ b/test/Sema/exhaustive_switch.swift
@@ -1,4 +1,5 @@
 // RUN: %target-typecheck-verify-swift
+
 func foo(a: Int?, b: Int?) -> Int {
   switch (a, b) {
   case (.none, _): return 1
@@ -79,8 +80,8 @@
 }
 
 func test3(x: Threepeat, y: Threepeat) {
-  switch (x, y) { // expected-error {{switch must be exhaustive, consider adding missing cases:}}
-  // expected-note@-1 {{missing case: '(.a, .c)'}}
+  switch (x, y) { // expected-error {{switch must be exhaustive}}
+  // expected-note@-1 {{add missing case: '(.a, .c)'}}
   case (.a, .a):
     ()
   case (.b, _):
@@ -286,3 +287,25 @@
     return 13
   }
 }
+
+enum PatternCasts {
+  case one(Any)
+  case two
+}
+
+func checkPatternCasts() {
+  // Pattern casts with this structure shouldn't warn about duplicate cases.
+  let x: PatternCasts = .one("One")
+  switch x {
+  case .one(let s as String): print(s)
+  case .one: break
+  case .two: break
+  }
+
+  // But should warn here.
+  switch x {
+  case .one(_): print(s)
+  case .one: break // expected-warning {{case is already handled by previous patterns; consider removing it}}
+  case .two: break
+  }
+}
diff --git a/test/Sema/exhaustive_switch_objc.swift b/test/Sema/exhaustive_switch_objc.swift
new file mode 100644
index 0000000..85c6ef1
--- /dev/null
+++ b/test/Sema/exhaustive_switch_objc.swift
@@ -0,0 +1,23 @@
+// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s
+// REQUIRES: objc_interop
+
+import Foundation
+
+// Treat irrefutable casts as irrefutable patterns.
+enum Castbah {
+  case shareef(NSInteger)
+  case dont(NSString)
+  case like(Int)
+  case it(Error)
+}
+
+func rock(the c : Castbah) {
+  switch (c, c, c) {
+  case (.shareef(let rock as NSObject), .dont(let the as String), .like(let castbah as Any)):
+    print(rock, the, castbah)
+  case (.it(let e as NSError), _, _):
+    print(e)
+  case let obj as Any:
+    print(obj)
+  }
+}
diff --git a/test/Sema/immutability.swift b/test/Sema/immutability.swift
index d502957..be0e092 100644
--- a/test/Sema/immutability.swift
+++ b/test/Sema/immutability.swift
@@ -573,3 +573,38 @@
   a.baz = 1 // expected-error {{cannot assign to property: 'baz' is a method}}
   b.f = 42     // expected-error {{cannot assign to property: 'f' is a method}}
 }
+
+// SR-2354: Reject subscript declarations with mutable parameters.
+class MutableSubscripts {
+  var x : Int = 0
+
+  subscript(x: inout Int) -> () { x += 1 } // expected-error {{'inout' may not be used on subscript parameters}}
+  subscript<T>(x: inout T) -> () { // expected-error {{'inout' may not be used on subscript parameters}}
+    fatalError()
+  }
+
+  static func initialize(from state: inout MutableSubscripts) -> MutableSubscripts {
+    return state
+  }
+}
+
+
+// SR-4214: Misleading location-less diagnostic when closure parameter type
+// is inferred to be inout.
+func sr4214() {
+  func sequence<T>(_ x : T, _ f : (T) -> T) -> T {
+    return f(x)
+  }
+
+  // expected-error@+1 {{expression type '(inout MutableSubscripts) -> ()' is ambiguous without more context}}
+  let closure = { val in val.x = 7 } as (inout MutableSubscripts) -> ()
+  var v = MutableSubscripts()
+  closure(&v)
+  // FIXME: This diagnostic isn't really all that much better
+  // expected-error@+1 {{cannot convert value of type '(inout MutableSubscripts) -> ()' to expected argument type '(_) -> _'}}
+  sequence(v) { (state : inout MutableSubscripts) -> () in
+    _ = MutableSubscripts.initialize(from: &state)
+    return ()
+  }
+}
+
diff --git a/test/Sema/string_to_substring_conversion.swift b/test/Sema/string_to_substring_conversion.swift
new file mode 100644
index 0000000..e0e66ef
--- /dev/null
+++ b/test/Sema/string_to_substring_conversion.swift
@@ -0,0 +1,80 @@
+// RUN: %target-swift-frontend -typecheck -verify -fix-string-substring-conversion -swift-version 4 %s
+
+let s = "Hello"
+let ss = s[s.startIndex..<s.endIndex]
+
+// CTP_Initialization
+do {
+  let s1: Substring = { return s }() // expected-error {{cannot convert value of type 'String' to specified type 'Substring'}} {{37-37=[]}}
+  _ = s1
+}
+
+// CTP_ReturnStmt
+do {
+  func returnsASubstring() -> Substring {
+    return s // expected-error {{cannot convert return expression of type 'String' to return type 'Substring'}} {{13-13=[]}}
+  }
+}
+
+// CTP_ThrowStmt
+// Doesn't really make sense for this fix-it - see case in diagnoseContextualConversionError:
+// The conversion destination of throw is always ErrorType (at the moment)
+// if this ever expands, this should be a specific form like () is for
+// return.
+
+// CTP_EnumCaseRawValue
+// Substrings can't be raw values because they aren't literals.
+
+// CTP_DefaultParameter
+do {
+  func foo(x: Substring = s) {} // expected-error {{default argument value of type 'String' cannot be converted to type 'Substring'}} {{28-28=[]}}
+}
+
+// CTP_CalleeResult
+do {
+  func getString() -> String { return s }
+  let gottenSubstring: Substring = getString() // expected-error {{cannot convert value of type 'String' to specified type 'Substring'}} {{47-47=[]}}
+  _ = gottenSubstring
+}
+
+// CTP_CallArgument
+do {
+  func takesASubstring(_ ss: Substring) {}
+  takesASubstring(s) // expected-error {{cannot convert value of type 'String' to expected argument type 'Substring'}} {{20-20=[]}}
+}
+
+// CTP_ClosureResult
+do {
+  [s].map { (x: String) -> Substring in x } // expected-error {{cannot convert value of type 'String' to closure result type 'Substring'}} {{42-42=[]}}
+}
+
+// CTP_ArrayElement
+do {
+  let a: [Substring] = [ s ] // expected-error {{cannot convert value of type 'String' to expected element type 'Substring'}} {{27-27=[]}}
+  _ = a
+}
+
+// CTP_DictionaryKey
+do {
+  let d: [ Substring : Substring ] = [ s : ss ] // expected-error {{cannot convert value of type 'String' to expected dictionary key type 'Substring'}} {{41-41=[]}}
+  _ = d
+}
+
+// CTP_DictionaryValue
+do {
+  let d: [ Substring : Substring ] = [ ss : s ] // expected-error {{cannot convert value of type 'String' to expected dictionary value type 'Substring'}} {{46-46=[]}}
+  _ = d
+}
+
+// CTP_CoerceOperand
+do {
+  let s1: Substring = s as Substring // expected-error {{cannot convert value of type 'String' to type 'Substring' in coercion}} {{24-24=[]}}
+  _ = s1
+}
+
+// CTP_AssignSource
+do {
+  let s1: Substring = s // expected-error {{cannot convert value of type 'String' to specified type 'Substring'}} {{24-24=[]}}
+  _ = s1
+}
+
diff --git a/test/Sema/substring_to_string_conversion.swift b/test/Sema/substring_to_string_conversion.swift
new file mode 100644
index 0000000..7011a3f
--- /dev/null
+++ b/test/Sema/substring_to_string_conversion.swift
@@ -0,0 +1,80 @@
+// RUN: %target-swift-frontend -typecheck -verify -swift-version 4 %s
+
+let s = "Hello"
+let ss = s[s.startIndex..<s.endIndex]
+
+// CTP_Initialization
+do {
+  let s1: String = { return ss }() // expected-error {{cannot convert value of type 'Substring' to specified type 'String'}} {{20-20=String(}} {{35-35=)}}
+  _ = s1
+}
+
+// CTP_ReturnStmt
+do {
+  func returnsAString() -> String {
+    return ss // expected-error {{cannot convert return expression of type 'Substring' to return type 'String'}} {{12-12=String(}} {{14-14=)}}
+  }
+}
+
+// CTP_ThrowStmt
+// Doesn't really make sense for this fix-it - see case in diagnoseContextualConversionError:
+// The conversion destination of throw is always ErrorType (at the moment)
+// if this ever expands, this should be a specific form like () is for
+// return.
+
+// CTP_EnumCaseRawValue
+// Substrings can't be raw values because they aren't literals.
+
+// CTP_DefaultParameter
+do {
+  func foo(x: String = ss) {} // expected-error {{default argument value of type 'Substring' cannot be converted to type 'String'}} {{24-24=String(}} {{26-26=)}}
+}
+
+// CTP_CalleeResult
+do {
+  func getSubstring() -> Substring { return ss }
+  let gottenString : String = getSubstring() // expected-error {{cannot convert value of type 'Substring' to specified type 'String'}} {{31-31=String(}} {{45-45=)}}
+  _ = gottenString
+}
+
+// CTP_CallArgument
+do {
+  func takesAString(_ s: String) {}
+  takesAString(ss) // expected-error {{cannot convert value of type 'Substring' to expected argument type 'String'}} {{16-16=String(}} {{18-18=)}}
+}
+
+// CTP_ClosureResult
+do {
+  [ss].map { (x: Substring) -> String in x } // expected-error {{cannot convert value of type 'Substring' to closure result type 'String'}} {{42-42=String(}} {{43-43=)}}
+}
+
+// CTP_ArrayElement
+do {
+  let a: [String] = [ ss ] // expected-error {{cannot convert value of type 'Substring' to expected element type 'String'}} {{23-23=String(}} {{25-25=)}}
+  _ = a
+}
+
+// CTP_DictionaryKey
+do {
+  let d: [ String : String ] = [ ss : s ] // expected-error {{cannot convert value of type 'Substring' to expected dictionary key type 'String'}} {{34-34=String(}} {{36-36=)}}
+  _ = d
+}
+
+// CTP_DictionaryValue
+do {
+  let d: [ String : String ] = [ s : ss ] // expected-error {{cannot convert value of type 'Substring' to expected dictionary value type 'String'}} {{38-38=String(}} {{40-40=)}}
+  _ = d
+}
+
+// CTP_CoerceOperand
+do {
+  let s1: String = ss as String // expected-error {{cannot convert value of type 'Substring' to type 'String' in coercion}} {{20-20=String(}} {{22-22=)}}
+  _ = s1
+}
+
+// CTP_AssignSource
+do {
+  let s1: String = ss // expected-error {{cannot convert value of type 'Substring' to specified type 'String'}} {{20-20=String(}} {{22-22=)}}
+  _ = s1
+}
+
diff --git a/test/Serialization/Recovery/Inputs/custom-modules/Types.apinotes b/test/Serialization/Recovery/Inputs/custom-modules/Types.apinotes
index d3862a5..4bd3646 100644
--- a/test/Serialization/Recovery/Inputs/custom-modules/Types.apinotes
+++ b/test/Serialization/Recovery/Inputs/custom-modules/Types.apinotes
@@ -25,6 +25,8 @@
   Typedefs:
   - Name: RenamedTypedef
     SwiftName: Swift3RenamedTypedef
+  - Name: NewlyWrappedTypedef
+    SwiftWrapper: none
   Tags:
   - Name: RenamedStruct
     SwiftName: Swift3RenamedStruct
diff --git a/test/Serialization/Recovery/Inputs/custom-modules/Types.h b/test/Serialization/Recovery/Inputs/custom-modules/Types.h
index 849fb69..b58a683 100644
--- a/test/Serialization/Recovery/Inputs/custom-modules/Types.h
+++ b/test/Serialization/Recovery/Inputs/custom-modules/Types.h
@@ -9,6 +9,7 @@
 @end
 
 typedef int RenamedTypedef;
+typedef int NewlyWrappedTypedef __attribute__((swift_wrapper(struct)));
 
 struct RenamedStruct {
   int value;
diff --git a/test/Serialization/Recovery/crash-recovery.swift b/test/Serialization/Recovery/crash-recovery.swift
index f4e2478..7974a3c 100644
--- a/test/Serialization/Recovery/crash-recovery.swift
+++ b/test/Serialization/Recovery/crash-recovery.swift
@@ -1,8 +1,8 @@
 // RUN: rm -rf %t && mkdir -p %t
 // RUN: %target-swift-frontend -emit-module -o %t -module-name Lib -I %S/Inputs/custom-modules -swift-version 3 %s
 
-// RUN: not --crash %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules -swift-version 3 -Xcc -DBAD 2>&1 | %FileCheck -check-prefix CHECK-CRASH -check-prefix CHECK-CRASH-3 %s
-// RUN: not --crash %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules -swift-version 4 -Xcc -DBAD 2>&1 | %FileCheck -check-prefix CHECK-CRASH -check-prefix CHECK-CRASH-4 %s
+// RUN: echo 'import Lib; _ = Sub.disappearingMethod' | not --crash %target-swift-frontend -typecheck -I %t -I %S/Inputs/custom-modules -swift-version 3 -disable-deserialization-recovery -Xcc -DBAD - 2>&1 | %FileCheck -check-prefix CHECK-CRASH -check-prefix CHECK-CRASH-3 %s
+// RUN: echo 'import Lib; _ = Sub.disappearingMethod' | not --crash %target-swift-frontend -typecheck -I %t -I %S/Inputs/custom-modules -swift-version 4 -disable-deserialization-recovery -Xcc -DBAD - 2>&1 | %FileCheck -check-prefix CHECK-CRASH -check-prefix CHECK-CRASH-4 %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/Serialization/Recovery/overrides.swift b/test/Serialization/Recovery/overrides.swift
index 2292099..2a57489 100644
--- a/test/Serialization/Recovery/overrides.swift
+++ b/test/Serialization/Recovery/overrides.swift
@@ -3,9 +3,9 @@
 
 // RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules | %FileCheck %s
 
-// RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -enable-experimental-deserialization-recovery | %FileCheck -check-prefix CHECK-RECOVERY %s
+// RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules -Xcc -DBAD | %FileCheck -check-prefix CHECK-RECOVERY %s
 
-// RUN: %target-swift-frontend -typecheck %s -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -enable-experimental-deserialization-recovery -D TEST -verify
+// RUN: %target-swift-frontend -typecheck %s -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -D TEST -verify
 
 // REQUIRES: objc_interop
 
@@ -191,6 +191,7 @@
 
 // CHECK-RECOVERY-LABEL: class D1_DesignatedInitDisappears : DesignatedInitDisappearsBase {
 // CHECK-RECOVERY-NEXT: init()
+// CHECK-RECOVERY-NEXT: /* placeholder for init(value:) */
 // CHECK-RECOVERY-NEXT: {{^}$}}
 
 
@@ -203,6 +204,7 @@
 // CHECK-NEXT: {{^}$}}
 
 // CHECK-RECOVERY-LABEL: class D2_OnlyDesignatedInitDisappears : OnlyDesignatedInitDisappearsBase {
+// CHECK-RECOVERY-NEXT: /* placeholder for init(value:) */
 // CHECK-RECOVERY-NEXT: {{^}$}}
 
 
@@ -231,6 +233,7 @@
 
 // CHECK-RECOVERY-LABEL: class D4_UnknownInitDisappears : UnknownInitDisappearsBase {
 // CHECK-RECOVERY-NEXT: init()
+// CHECK-RECOVERY-NEXT: /* placeholder for init(value:) */
 // CHECK-RECOVERY-NEXT: {{^}$}}
 
 
@@ -244,7 +247,68 @@
 // CHECK-NEXT: {{^}$}}
 
 // CHECK-RECOVERY-LABEL: class D5_OnlyUnknownInitDisappears : OnlyUnknownInitDisappearsBase {
+// CHECK-RECOVERY-NEXT: /* placeholder for init(value:) */
 // CHECK-RECOVERY-NEXT: init()
 // CHECK-RECOVERY-NEXT: {{^}$}}
 
+open class D6_UnknownInitDisappearsGrandchild : D4_UnknownInitDisappears {
+  public override init() { fatalError() }
+  public override init(value: Int) { fatalError() }
+}
+
+// CHECK-LABEL: class D6_UnknownInitDisappearsGrandchild : D4_UnknownInitDisappears {
+// CHECK-NEXT: init()
+// CHECK-NEXT: init(value: Int)
+// CHECK-NEXT: {{^}$}}
+
+// CHECK-RECOVERY-LABEL: class D6_UnknownInitDisappearsGrandchild : D4_UnknownInitDisappears {
+// CHECK-RECOVERY-NEXT: init()
+// CHECK-RECOVERY-NEXT: /* placeholder for init(value:) */
+// CHECK-RECOVERY-NEXT: {{^}$}}
+
+open class D7_UnknownInitDisappearsGrandchildRequired : D4_UnknownInitDisappears {
+  public override init() { fatalError() }
+  public required override init(value: Int) { fatalError() }
+}
+
+// CHECK-LABEL: class D7_UnknownInitDisappearsGrandchildRequired : D4_UnknownInitDisappears {
+// CHECK-NEXT: init()
+// CHECK-NEXT: init(value: Int)
+// CHECK-NEXT: {{^}$}}
+
+// CHECK-RECOVERY-LABEL: class D7_UnknownInitDisappearsGrandchildRequired : D4_UnknownInitDisappears {
+// CHECK-RECOVERY-NEXT: init()
+// CHECK-RECOVERY-NEXT: /* placeholder for init(value:) */
+// CHECK-RECOVERY-NEXT: {{^}$}}
+
+open class D8_UnknownInitDisappearsRequired : UnknownInitDisappearsBase {
+  public override init() { fatalError() }
+  public required override init(value: Int) { fatalError() }
+}
+
+// CHECK-LABEL: class D8_UnknownInitDisappearsRequired : UnknownInitDisappearsBase {
+// CHECK-NEXT: init()
+// CHECK-NEXT: init(value: Int)
+// CHECK-NEXT: {{^}$}}
+
+// CHECK-RECOVERY-LABEL: class D8_UnknownInitDisappearsRequired : UnknownInitDisappearsBase {
+// CHECK-RECOVERY-NEXT: init()
+// CHECK-RECOVERY-NEXT: /* placeholder for init(value:) */
+// CHECK-RECOVERY-NEXT: {{^}$}}
+
+open class D9_UnknownInitDisappearsRequiredGrandchild : D8_UnknownInitDisappearsRequired {
+  public override init() { fatalError() }
+  public required init(value: Int) { fatalError() }
+}
+
+// CHECK-LABEL: class D9_UnknownInitDisappearsRequiredGrandchild : D8_UnknownInitDisappearsRequired {
+// CHECK-NEXT: init()
+// CHECK-NEXT: init(value: Int)
+// CHECK-NEXT: {{^}$}}
+
+// CHECK-RECOVERY-LABEL: class D9_UnknownInitDisappearsRequiredGrandchild : D8_UnknownInitDisappearsRequired {
+// CHECK-RECOVERY-NEXT: init()
+// CHECK-RECOVERY-NEXT: /* placeholder for init(value:) */
+// CHECK-RECOVERY-NEXT: {{^}$}}
+
 #endif // TEST
diff --git a/test/Serialization/Recovery/type-removal-objc.swift b/test/Serialization/Recovery/type-removal-objc.swift
index 3ce5ef8..55944eb 100644
--- a/test/Serialization/Recovery/type-removal-objc.swift
+++ b/test/Serialization/Recovery/type-removal-objc.swift
@@ -3,7 +3,7 @@
 
 // RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules | %FileCheck %s
 
-// RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -enable-experimental-deserialization-recovery > %t.txt
+// RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules -Xcc -DBAD > %t.txt
 // RUN: %FileCheck -check-prefix CHECK-RECOVERY %s < %t.txt
 // RUN: %FileCheck -check-prefix CHECK-RECOVERY-NEGATIVE %s < %t.txt
 
diff --git a/test/Serialization/Recovery/typedefs-in-protocols.swift b/test/Serialization/Recovery/typedefs-in-protocols.swift
new file mode 100644
index 0000000..fdb37c5
--- /dev/null
+++ b/test/Serialization/Recovery/typedefs-in-protocols.swift
@@ -0,0 +1,132 @@
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: %target-swift-frontend -emit-sil -o - -emit-module-path %t/Lib.swiftmodule -module-name Lib -I %S/Inputs/custom-modules -disable-objc-attr-requires-foundation-module %s | %FileCheck -check-prefix CHECK-WITNESS-TABLE %s
+
+// RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules | %FileCheck %s
+
+// RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules -Xcc -DBAD | %FileCheck -check-prefix CHECK-RECOVERY %s
+
+// RUN: %target-swift-frontend -typecheck -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -DTEST -DVERIFY %s -verify
+
+// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/custom-modules -DTEST %s | %FileCheck -check-prefix CHECK-IR %s
+// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -DTEST %s | %FileCheck -check-prefix CHECK-IR %s
+
+#if TEST
+
+import Typedefs
+import Lib
+
+// CHECK-IR-LABEL: define{{.*}} void @_T04main19testWitnessDispatch
+public func testWitnessDispatch(user: Proto) {
+  // The important thing in this CHECK line is the "i32 11", which is the offset
+  // for the witness table slot for 'lastMethod()'. If the layout here
+  // changes, please check that offset 11 is still correct.
+  // CHECK-IR-NOT: ret
+  // CHECK-IR: [[SLOT:%.+]] = getelementptr inbounds i8*, i8** {{%.+}}, i32 11
+  // CHECK-IR-NOT: ret
+  // CHECK-IR: [[RAW_METHOD:%.+]] = load i8*, i8** [[SLOT]]
+  // CHECK-IR-NOT: ret
+  // CHECK-IR: [[METHOD:%.+]] = bitcast i8* [[RAW_METHOD]] to void (%swift.opaque*, %swift.type*, i8**)*
+  // CHECK-IR-NOT: ret
+  // CHECK-IR: call swiftcc void [[METHOD]](
+  _ = user.lastMethod()
+} // CHECK-IR: ret void
+
+// CHECK-IR-LABEL: define{{.*}} void @_T04main19testGenericDispatch
+public func testGenericDispatch<T: Proto>(user: T) {
+  // The important thing in this CHECK line is the "i32 11", which is the offset
+  // for the witness table slot for 'lastMethod()'. If the layout here
+  // changes, please check that offset 11 is still correct.
+  // CHECK-IR-NOT: ret
+  // CHECK-IR: [[SLOT:%.+]] = getelementptr inbounds i8*, i8** %T.Proto, i32 11
+  // CHECK-IR-NOT: ret
+  // CHECK-IR: [[RAW_METHOD:%.+]] = load i8*, i8** [[SLOT]]
+  // CHECK-IR-NOT: ret
+  // CHECK-IR: [[METHOD:%.+]] = bitcast i8* [[RAW_METHOD]] to void (%swift.opaque*, %swift.type*, i8**)*
+  // CHECK-IR-NOT: ret
+  // CHECK-IR: call swiftcc void [[METHOD]](
+  _ = user.lastMethod()
+} // CHECK-IR: ret void
+
+#if VERIFY
+
+public class TestImpl : Proto {} // expected-error {{type 'TestImpl' cannot conform to protocol 'Proto' because it has requirements that cannot be satisfied}}
+
+#endif // VERIFY
+
+#else // TEST
+
+import Typedefs
+
+// CHECK-LABEL: protocol Proto {
+// CHECK-RECOVERY-LABEL: protocol Proto {
+public protocol Proto {
+  // CHECK: var unwrappedProp: UnwrappedInt? { get set }
+  // CHECK-RECOVERY: var unwrappedProp: Int32?
+  var unwrappedProp: UnwrappedInt? { get set }
+  // CHECK: var wrappedProp: WrappedInt? { get set }
+  // CHECK-RECOVERY: /* placeholder for _ */
+  // CHECK-RECOVERY: /* placeholder for _ */
+  // CHECK-RECOVERY: /* placeholder for _ */
+  var wrappedProp: WrappedInt? { get set }
+
+  // CHECK: func returnsUnwrappedMethod() -> UnwrappedInt
+  // CHECK-RECOVERY: func returnsUnwrappedMethod() -> Int32
+  func returnsUnwrappedMethod() -> UnwrappedInt
+  // CHECK: func returnsWrappedMethod() -> WrappedInt
+  // CHECK-RECOVERY: /* placeholder for returnsWrappedMethod() */
+  func returnsWrappedMethod() -> WrappedInt
+
+  // CHECK: subscript(_: WrappedInt) -> () { get }
+  // CHECK-RECOVERY: /* placeholder for _ */
+  subscript(_: WrappedInt) -> () { get }
+
+  // CHECK: init()
+  // CHECK-RECOVERY: init()
+  init()
+
+  // CHECK: init(wrapped: WrappedInt)
+  // CHECK-RECOVERY: /* placeholder for init(wrapped:) */
+  init(wrapped: WrappedInt)
+
+  func lastMethod()
+}
+// CHECK: {{^}$}}
+// CHECK-RECOVERY: {{^}$}}
+
+// CHECK-LABEL: struct ProtoLibImpl : Proto {
+// CHECK-RECOVERY-LABEL: struct ProtoLibImpl : Proto {
+public struct ProtoLibImpl : Proto {
+  public var unwrappedProp: UnwrappedInt?
+  public var wrappedProp: WrappedInt?
+
+  public func returnsUnwrappedMethod() -> UnwrappedInt { fatalError() }
+  public func returnsWrappedMethod() -> WrappedInt { fatalError() }
+
+  public subscript(_: WrappedInt) -> () { return () }
+
+  public init() {}
+  public init(wrapped: WrappedInt) {}
+
+  public func lastMethod() {}
+}
+// CHECK: {{^}$}}
+// CHECK-RECOVERY: {{^}$}}
+
+// This is mostly to check when changes are necessary for the CHECK-IR lines
+// above.
+// CHECK-WITNESS-TABLE-LABEL: sil_witness_table{{.*}} ProtoLibImpl: Proto module Lib {
+// 0 CHECK-WITNESS-TABLE-NEXT: #Proto.unwrappedProp!getter.1:
+// 1 CHECK-WITNESS-TABLE-NEXT: #Proto.unwrappedProp!setter.1:
+// 2 CHECK-WITNESS-TABLE-NEXT: #Proto.unwrappedProp!materializeForSet.1:
+// 3 CHECK-WITNESS-TABLE-NEXT: #Proto.wrappedProp!getter.1:
+// 4 CHECK-WITNESS-TABLE-NEXT: #Proto.wrappedProp!setter.1:
+// 5 CHECK-WITNESS-TABLE-NEXT: #Proto.wrappedProp!materializeForSet.1:
+// 6 CHECK-WITNESS-TABLE-NEXT: #Proto.returnsUnwrappedMethod!1:
+// 7 CHECK-WITNESS-TABLE-NEXT: #Proto.returnsWrappedMethod!1:
+// 8 CHECK-WITNESS-TABLE-NEXT: #Proto.subscript!getter.1:
+// 9 CHECK-WITNESS-TABLE-NEXT: #Proto.init!allocator.1:
+// 10 CHECK-WITNESS-TABLE-NEXT: #Proto.init!allocator.1:
+// 11 CHECK-WITNESS-TABLE-NEXT: #Proto.lastMethod!1:
+// CHECK-WITNESS-TABLE: }
+
+#endif // TEST
diff --git a/test/Serialization/Recovery/typedefs.swift b/test/Serialization/Recovery/typedefs.swift
index 723399a..baf8d80 100644
--- a/test/Serialization/Recovery/typedefs.swift
+++ b/test/Serialization/Recovery/typedefs.swift
@@ -1,14 +1,17 @@
 // RUN: rm -rf %t && mkdir -p %t
-// RUN: %target-swift-frontend -emit-module -o %t -module-name Lib -I %S/Inputs/custom-modules %s
+// RUN: %target-swift-frontend -emit-sil -o - -emit-module-path %t/Lib.swiftmodule -module-name Lib -I %S/Inputs/custom-modules -disable-objc-attr-requires-foundation-module %s | %FileCheck -check-prefix CHECK-VTABLE %s
 
 // RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules | %FileCheck %s
 
-// RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -enable-experimental-deserialization-recovery > %t.txt
+// RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules -Xcc -DBAD > %t.txt
 // RUN: %FileCheck -check-prefix CHECK-RECOVERY %s < %t.txt
 // RUN: %FileCheck -check-prefix CHECK-RECOVERY-NEGATIVE %s < %t.txt
 
-// RUN: %target-swift-frontend -typecheck -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -DTEST -enable-experimental-deserialization-recovery -DVERIFY %s -verify
-// RUN: %target-swift-frontend -emit-silgen -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -DTEST -enable-experimental-deserialization-recovery %s | %FileCheck -check-prefix CHECK-SIL %s
+// RUN: %target-swift-frontend -typecheck -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -DTEST -DVERIFY %s -verify
+// RUN: %target-swift-frontend -emit-silgen -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -DTEST %s | %FileCheck -check-prefix CHECK-SIL %s
+
+// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/custom-modules -DTEST %s | %FileCheck -check-prefix CHECK-IR %s
+// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -DTEST %s | %FileCheck -check-prefix CHECK-IR %s
 
 #if TEST
 
@@ -24,6 +27,16 @@
   _ = Lib.usesAssoc
 } // CHECK-SIL: end sil function '_T08typedefs11testSymbolsyyF'
 
+// CHECK-IR-LABEL: define{{.*}} void @_T08typedefs18testVTableBuildingy3Lib4UserC4user_tF
+public func testVTableBuilding(user: User) {
+  // The important thing in this CHECK line is the "i64 24", which is the offset
+  // for the vtable slot for 'lastMethod()'. If the layout here
+  // changes, please check that offset 24 is still correct.
+  // CHECK-IR-NOT: ret
+  // CHECK-IR: getelementptr inbounds void (%T3Lib4UserC*)*, void (%T3Lib4UserC*)** %{{[0-9]+}}, {{i64 24|i32 27}}
+  _ = user.lastMethod()
+} // CHECK-IR: ret void
+
 #if VERIFY
 let _: String = useAssoc(ImportedType.self) // expected-error {{cannot convert call result type '_.Assoc?' to expected type 'String'}}
 let _: Bool? = useAssoc(ImportedType.self) // expected-error {{cannot convert value of type 'Int32?' to specified type 'Bool?'}}
@@ -39,17 +52,19 @@
 _ = usesWrapped(nil) // expected-error {{use of unresolved identifier 'usesWrapped'}}
 _ = usesUnwrapped(nil) // expected-error {{nil is not compatible with expected argument type 'Int32'}}
 
-public class UserSub: User {
+public class UserDynamicSub: UserDynamic {
   override init() {}
 }
 // FIXME: Bad error message; really it's that the convenience init hasn't been
 // inherited.
-_ = UserSub(conveniently: 0) // expected-error {{argument passed to call that takes no arguments}}
+_ = UserDynamicSub(conveniently: 0) // expected-error {{argument passed to call that takes no arguments}}
 
-public class UserConvenienceSub: UserConvenience {
+public class UserDynamicConvenienceSub: UserDynamicConvenience {
   override init() {}
 }
-_ = UserConvenienceSub(conveniently: 0)
+_ = UserDynamicConvenienceSub(conveniently: 0)
+
+public class UserSub : User {} // expected-error {{cannot inherit from class 'User' because it has overridable members that could not be loaded}}
 
 #endif // VERIFY
 
@@ -64,18 +79,20 @@
   // CHECK-RECOVERY: var unwrappedProp: Int32?
   public var unwrappedProp: UnwrappedInt?
   // CHECK: var wrappedProp: WrappedInt?
-  // CHECK-RECOVERY-NEGATIVE-NOT: var wrappedProp:
+  // CHECK-RECOVERY: /* placeholder for _ */
+  // CHECK-RECOVERY: /* placeholder for _ */
+  // CHECK-RECOVERY: /* placeholder for _ */
   public var wrappedProp: WrappedInt?
 
   // CHECK: func returnsUnwrappedMethod() -> UnwrappedInt
   // CHECK-RECOVERY: func returnsUnwrappedMethod() -> Int32
   public func returnsUnwrappedMethod() -> UnwrappedInt { fatalError() }
   // CHECK: func returnsWrappedMethod() -> WrappedInt
-  // CHECK-RECOVERY-NEGATIVE-NOT: func returnsWrappedMethod(
+  // CHECK-RECOVERY: /* placeholder for returnsWrappedMethod() */
   public func returnsWrappedMethod() -> WrappedInt { fatalError() }
 
   // CHECK: subscript(_: WrappedInt) -> () { get }
-  // CHECK-RECOVERY-NEGATIVE-NOT: subscript(
+  // CHECK-RECOVERY: /* placeholder for _ */
   public subscript(_: WrappedInt) -> () { return () }
 
   // CHECK: init()
@@ -83,16 +100,44 @@
   public init() {}
 
   // CHECK: init(wrapped: WrappedInt)
-  // CHECK-RECOVERY-NEGATIVE-NOT: init(wrapped:
+  // CHECK-RECOVERY: /* placeholder for init(wrapped:) */
   public init(wrapped: WrappedInt) {}
 
   // CHECK: convenience init(conveniently: Int)
   // CHECK-RECOVERY: convenience init(conveniently: Int)
   public convenience init(conveniently: Int) { self.init() }
+
+  // CHECK: required init(wrappedRequired: WrappedInt)
+  // CHECK-RECOVERY: /* placeholder for init(wrappedRequired:) */
+  public required init(wrappedRequired: WrappedInt) {}
+
+  public func lastMethod() {}
 }
 // CHECK: {{^}$}}
 // CHECK-RECOVERY: {{^}$}}
 
+// This is mostly to check when changes are necessary for the CHECK-IR lines
+// above.
+// CHECK-VTABLE-LABEL: sil_vtable User {
+// (10 words of normal class metadata on 64-bit platforms, 13 on 32-bit)
+// 10 CHECK-VTABLE-NEXT: #User.unwrappedProp!getter.1:
+// 11 CHECK-VTABLE-NEXT: #User.unwrappedProp!setter.1:
+// 12 CHECK-VTABLE-NEXT: #User.unwrappedProp!materializeForSet.1:
+// 13 CHECK-VTABLE-NEXT: #User.wrappedProp!getter.1:
+// 14 CHECK-VTABLE-NEXT: #User.wrappedProp!setter.1:
+// 15 CHECK-VTABLE-NEXT: #User.wrappedProp!materializeForSet.1:
+// 16 CHECK-VTABLE-NEXT: #User.returnsUnwrappedMethod!1:
+// 17 CHECK-VTABLE-NEXT: #User.returnsWrappedMethod!1:
+// 18 CHECK-VTABLE-NEXT: #User.subscript!getter.1:
+// 19 CHECK-VTABLE-NEXT: #User.init!initializer.1:
+// 20 CHECK-VTABLE-NEXT: #User.init!initializer.1:
+// 21 CHECK-VTABLE-NEXT: #User.init!initializer.1:
+// 22 CHECK-VTABLE-NEXT: #User.init!allocator.1:
+// 23 CHECK-VTABLE-NEXT: #User.init!initializer.1:
+// 24 CHECK-VTABLE-NEXT: #User.lastMethod!1:
+// CHECK-VTABLE: }
+
+
 // CHECK-LABEL: class UserConvenience
 // CHECK-RECOVERY-LABEL: class UserConvenience
 open class UserConvenience {
@@ -101,7 +146,7 @@
   public init() {}
 
   // CHECK: convenience init(wrapped: WrappedInt)
-  // CHECK-RECOVERY-NEGATIVE-NOT: init(wrapped:
+  // CHECK-RECOVERY: /* placeholder for init(wrapped:) */
   public convenience init(wrapped: WrappedInt) { self.init() }
 
   // CHECK: convenience init(conveniently: Int)
@@ -111,6 +156,58 @@
 // CHECK: {{^}$}}
 // CHECK-RECOVERY: {{^}$}}
 
+// CHECK-LABEL: class UserDynamic
+// CHECK-RECOVERY-LABEL: class UserDynamic
+open class UserDynamic {
+  // CHECK: init()
+  // CHECK-RECOVERY: init()
+  @objc public dynamic init() {}
+
+  // CHECK: init(wrapped: WrappedInt)
+  // CHECK-RECOVERY: /* placeholder for init(wrapped:) */
+  @objc public dynamic init(wrapped: WrappedInt) {}
+
+  // CHECK: convenience init(conveniently: Int)
+  // CHECK-RECOVERY: convenience init(conveniently: Int)
+  @objc public dynamic convenience init(conveniently: Int) { self.init() }
+}
+// CHECK: {{^}$}}
+// CHECK-RECOVERY: {{^}$}}
+
+// CHECK-LABEL: class UserDynamicConvenience
+// CHECK-RECOVERY-LABEL: class UserDynamicConvenience
+open class UserDynamicConvenience {
+  // CHECK: init()
+  // CHECK-RECOVERY: init()
+  @objc public dynamic init() {}
+
+  // CHECK: convenience init(wrapped: WrappedInt)
+  // CHECK-RECOVERY: /* placeholder for init(wrapped:) */
+  @objc public dynamic convenience init(wrapped: WrappedInt) { self.init() }
+
+  // CHECK: convenience init(conveniently: Int)
+  // CHECK-RECOVERY: convenience init(conveniently: Int)
+  @objc public dynamic convenience init(conveniently: Int) { self.init() }
+}
+// CHECK: {{^}$}}
+// CHECK-RECOVERY: {{^}$}}
+
+
+// CHECK-LABEL: class UserSub
+// CHECK-RECOVERY-LABEL: class UserSub
+open class UserSub : User {
+  // CHECK: init(wrapped: WrappedInt?)
+  // CHECK-RECOVERY: /* placeholder for init(wrapped:) */
+  public override init(wrapped: WrappedInt?) { super.init() }
+
+  // CHECK: required init(wrappedRequired: WrappedInt?)
+  // CHECK-RECOVERY: /* placeholder for init(wrappedRequired:) */
+  public required init(wrappedRequired: WrappedInt?) { super.init() }
+}
+// CHECK: {{^}$}}
+// CHECK-RECOVERY: {{^}$}}
+
+
 // CHECK-DAG: let x: MysteryTypedef
 // CHECK-RECOVERY-DAG: let x: Int32
 public let x: MysteryTypedef = 0
diff --git a/test/Serialization/Recovery/types-3-to-4.swift b/test/Serialization/Recovery/types-3-to-4.swift
index e83e355..9e4114b 100644
--- a/test/Serialization/Recovery/types-3-to-4.swift
+++ b/test/Serialization/Recovery/types-3-to-4.swift
@@ -3,9 +3,9 @@
 
 // RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules -swift-version 3 | %FileCheck -check-prefix=CHECK-3 %s
 
-// RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules -enable-experimental-deserialization-recovery -swift-version 4 | %FileCheck -check-prefix=CHECK-4 %s
+// RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules -swift-version 4 | %FileCheck -check-prefix=CHECK-4 %s
 
-// RUN: %target-swift-frontend -typecheck %s -I %t -I %S/Inputs/custom-modules  -swift-version 4 -enable-experimental-deserialization-recovery -D TEST -verify
+// RUN: %target-swift-frontend -typecheck %s -I %t -I %S/Inputs/custom-modules  -swift-version 4 -D TEST -verify
 
 // REQUIRES: objc_interop
 
@@ -16,6 +16,8 @@
 func requiresConformance(_: B_RequiresConformance<B_ConformsToProto>) {}
 func requiresConformance(_: B_RequiresConformance<C_RelyOnConformanceImpl.Assoc>) {}
 
+class Sub: Base {} // okay
+class Impl: Proto {} // expected-error {{type 'Impl' does not conform to protocol 'Proto'}}
 
 #else // TEST
 
@@ -86,4 +88,11 @@
   public typealias Assoc = Swift3RenamedClass
 }
 
+open class Base {
+  public init(wrapped: NewlyWrappedTypedef) {}
+}
+public protocol Proto {
+  func useWrapped(_ wrapped: NewlyWrappedTypedef)
+}
+
 #endif
diff --git a/test/Serialization/Recovery/types-4-to-3.swift b/test/Serialization/Recovery/types-4-to-3.swift
index 8f5fed2..fdebb83 100644
--- a/test/Serialization/Recovery/types-4-to-3.swift
+++ b/test/Serialization/Recovery/types-4-to-3.swift
@@ -3,9 +3,9 @@
 
 // RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules -swift-version 4 | %FileCheck %s
 
-// RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules -enable-experimental-deserialization-recovery -swift-version 3 | %FileCheck %s
+// RUN: %target-swift-ide-test -source-filename=x -print-module -module-to-print Lib -I %t -I %S/Inputs/custom-modules -swift-version 3 | %FileCheck %s
 
-// RUN: %target-swift-frontend -typecheck %s -I %t -I %S/Inputs/custom-modules  -swift-version 3 -enable-experimental-deserialization-recovery -D TEST -verify
+// RUN: %target-swift-frontend -typecheck %s -I %t -I %S/Inputs/custom-modules  -swift-version 3 -D TEST -verify
 
 // REQUIRES: objc_interop
 
@@ -16,6 +16,8 @@
 func requiresConformance(_: B_RequiresConformance<B_ConformsToProto>) {}
 func requiresConformance(_: B_RequiresConformance<C_RelyOnConformanceImpl.Assoc>) {}
 
+class Sub: Base {} // expected-error {{cannot inherit from class 'Base' (compiled with Swift 4.0) because it has overridable members that could not be loaded in Swift 3.2}}
+class Impl: Proto {} // expected-error {{type 'Impl' cannot conform to protocol 'Proto' (compiled with Swift 4.0) because it has requirements that could not be loaded in Swift 3.2}}
 
 #else // TEST
 
@@ -62,4 +64,11 @@
   public typealias Assoc = RenamedClass
 }
 
+open class Base {
+  public init(wrapped: NewlyWrappedTypedef) {}
+}
+public protocol Proto {
+  func useWrapped(_ wrapped: NewlyWrappedTypedef)
+}
+
 #endif
diff --git a/test/Serialization/sil-imported-enums.swift b/test/Serialization/sil-imported-enums.swift
index ba8d4b3..38e1f47 100644
--- a/test/Serialization/sil-imported-enums.swift
+++ b/test/Serialization/sil-imported-enums.swift
@@ -14,7 +14,7 @@
 import Foundation
 import UsesImportedEnums
 
-// CHECK-LABEL: sil hidden @_T04main4testSbSo13NSRuncingModeO1e_tF
+// CHECK-LABEL: sil hidden @_T04main4testSbSC13NSRuncingModeO1e_tF
 func test(e: NSRuncingMode) -> Bool {
   // CHECK-NOT: return
   // CHECK: _T0s2eeoiSbx_xts16RawRepresentableRzs9Equatable0B5ValueRpzlF
diff --git a/test/SourceKit/CursorInfo/cursor_label.swift b/test/SourceKit/CursorInfo/cursor_label.swift
index a15772a..c35230c 100644
--- a/test/SourceKit/CursorInfo/cursor_label.swift
+++ b/test/SourceKit/CursorInfo/cursor_label.swift
@@ -2,14 +2,65 @@
   init(cc: Int) {}
   func foo(aa : Int) {}
   subscript(aa : Int, bb: Int)-> Int { get { return 0 } set {}}
+  func foo(_ aa : Int) {}
+  init(_ cc: Int) {}
+  subscript(_ aa : Int)-> Int { get { return 0 } set {}}
+  func foo(label aa : Int, bb: Int) {
+    _ = aa
+    _ = bb
+  }
 }
 let c = C1(cc: 1)
 c.foo(aa : 1)
 
+class C2 {
+  init(cc cc: Int) {}
+  func foo(aa aa : Int) {}
+  subscript(aa aa : Int, bb bb: Int)-> Int { get { return 0 } set {}}
+}
+
 // RUN: %sourcekitd-test -req=cursor -pos=2:9 %s -- %s | %FileCheck %s -check-prefix=CHECK1
 // RUN: %sourcekitd-test -req=cursor -pos=3:13 %s -- %s | %FileCheck %s -check-prefix=CHECK2
 // RUN: %sourcekitd-test -req=cursor -pos=4:24 %s -- %s | %FileCheck %s -check-prefix=CHECK3
+// RUN: %sourcekitd-test -req=cursor -pos=5:15 %s -- %s | %FileCheck %s -check-prefix=CHECK-NO-PARENT-PARAM
+// RUN: %sourcekitd-test -req=cursor -pos=6:11 %s -- %s | %FileCheck %s -check-prefix=CHECK-NO-PARENT-PARAM
+// RUN: %sourcekitd-test -req=cursor -pos=7:16 %s -- %s | %FileCheck %s -check-prefix=CHECK-NO-PARENT-PARAM
+// RUN: %sourcekitd-test -req=cursor -pos=8:18 %s -- %s | %FileCheck %s -check-prefix=CHECK-NO-PARENT-PARAM
+// RUN: %sourcekitd-test -req=cursor -pos=8:28 %s -- %s | %FileCheck %s -check-prefix=CHECK4
+// RUN: %sourcekitd-test -req=cursor -pos=9:9 %s -- %s | %FileCheck %s -check-prefix=CHECK-NO-PARENT-VAR
+// RUN: %sourcekitd-test -req=cursor -pos=10:9 %s -- %s | %FileCheck %s -check-prefix=CHECK5
 
+// CHECK1: source.lang.swift.decl.var.parameter
 // CHECK1: PARENT OFFSET: 13
+
+// CHECK2: source.lang.swift.decl.var.parameter
 // CHECK2: PARENT OFFSET: 37
+
+// CHECK3: source.lang.swift.decl.var.parameter
 // CHECK3: PARENT OFFSET: 56
+
+// CHECK4: source.lang.swift.decl.var.parameter
+// CHECK4: PARENT OFFSET: 229
+
+// CHECK5: source.lang.swift.ref.var.local
+// CHECK5: PARENT OFFSET: 229
+
+// CHECK-NO-PARENT-PARAM: source.lang.swift.decl.var.parameter
+// CHECK-NO-PARENT-PARAM-NOT: PARENT OFFSET:
+
+// CHECK-NO-PARENT-VAR: source.lang.swift.ref.var.local
+// CHECK-NO-PARENT-VAR-NOT: PARENT OFFSET:
+
+// RUN: %sourcekitd-test -req=cursor -pos=17:9 %s -- %s | %FileCheck %s -check-prefix=CHECK-CONSTRUCTOR
+// RUN: %sourcekitd-test -req=cursor -pos=18:13 %s -- %s | %FileCheck %s -check-prefix=CHECK-FUNC
+// RUN: %sourcekitd-test -req=cursor -pos=19:14 %s -- %s | %FileCheck %s -check-prefix=CHECK-SUBS
+// RUN: %sourcekitd-test -req=cursor -pos=19:27 %s -- %s | %FileCheck %s -check-prefix=CHECK-SUBS
+
+// CHECK-CONSTRUCTOR: source.lang.swift.decl.function.constructor
+// CHECK-CONSTRUCTOR-NOT: PARENT OFFSET:
+
+// CHECK-FUNC: source.lang.swift.decl.function.method.instance
+// CHECK-FUNC-NOT: PARENT OFFSET:
+
+// CHECK-SUBS: source.lang.swift.decl.function.subscript
+// CHECK-SUBS-NOT: PARENT OFFSET:
diff --git a/test/SourceKit/CursorInfo/cursor_no_cancel.swift b/test/SourceKit/CursorInfo/cursor_no_cancel.swift
new file mode 100644
index 0000000..19a86fb
--- /dev/null
+++ b/test/SourceKit/CursorInfo/cursor_no_cancel.swift
@@ -0,0 +1,46 @@
+func myFunc() {
+  _ = 1
+}
+
+// Perform 8 concurrent cursor infos, which is often enough to cause
+// contention.  We disable printing the requests to minimize delay.
+
+// RUN: %sourcekitd-test \
+// RUN:      -async -dont-print-request -cancel-on-subsequent-request=0 -req=cursor -pos=1:6 %s -- %s \
+// RUN:   == -async -dont-print-request -cancel-on-subsequent-request=0 -req=cursor -pos=1:6 %s -- %s \
+// RUN:   == -async -dont-print-request -cancel-on-subsequent-request=0 -req=cursor -pos=1:6 %s -- %s \
+// RUN:   == -async -dont-print-request -cancel-on-subsequent-request=0 -req=cursor -pos=1:6 %s -- %s \
+// RUN:   == -async -dont-print-request -cancel-on-subsequent-request=0 -req=cursor -pos=1:6 %s -- %s \
+// RUN:   == -async -dont-print-request -cancel-on-subsequent-request=0 -req=cursor -pos=1:6 %s -- %s \
+// RUN:   == -async -dont-print-request -cancel-on-subsequent-request=0 -req=cursor -pos=1:6 %s -- %s \
+// RUN:   == -async -dont-print-request -cancel-on-subsequent-request=0 -req=cursor -pos=1:6 %s -- %s 2>&1 \
+// RUN:   | %FileCheck %s -implicit-check-not='Request Cancel'
+
+// CHECK: source.lang.swift.decl.function.free
+// CHECK: source.lang.swift.decl.function.free
+// CHECK: source.lang.swift.decl.function.free
+// CHECK: source.lang.swift.decl.function.free
+// CHECK: source.lang.swift.decl.function.free
+// CHECK: source.lang.swift.decl.function.free
+// CHECK: source.lang.swift.decl.function.free
+// CHECK: source.lang.swift.decl.function.free
+
+// RUN: %sourcekitd-test \
+// RUN:      -async -dont-print-request -cancel-on-subsequent-request=0 -req=range -pos=2:3 -length=5 %s -- %s \
+// RUN:   == -async -dont-print-request -cancel-on-subsequent-request=0 -req=range -pos=2:3 -length=5 %s -- %s \
+// RUN:   == -async -dont-print-request -cancel-on-subsequent-request=0 -req=range -pos=2:3 -length=5 %s -- %s \
+// RUN:   == -async -dont-print-request -cancel-on-subsequent-request=0 -req=range -pos=2:3 -length=5 %s -- %s \
+// RUN:   == -async -dont-print-request -cancel-on-subsequent-request=0 -req=range -pos=2:3 -length=5 %s -- %s \
+// RUN:   == -async -dont-print-request -cancel-on-subsequent-request=0 -req=range -pos=2:3 -length=5 %s -- %s \
+// RUN:   == -async -dont-print-request -cancel-on-subsequent-request=0 -req=range -pos=2:3 -length=5 %s -- %s \
+// RUN:   == -async -dont-print-request -cancel-on-subsequent-request=0 -req=range -pos=2:3 -length=5 %s -- %s 2>&1 \
+// RUN:   | %FileCheck %s -check-prefix=RANGE -implicit-check-not='Request Cancel'
+
+// RANGE: source.lang.swift.range.singleexpression
+// RANGE: source.lang.swift.range.singleexpression
+// RANGE: source.lang.swift.range.singleexpression
+// RANGE: source.lang.swift.range.singleexpression
+// RANGE: source.lang.swift.range.singleexpression
+// RANGE: source.lang.swift.range.singleexpression
+// RANGE: source.lang.swift.range.singleexpression
+// RANGE: source.lang.swift.range.singleexpression
diff --git a/test/SourceKit/DocSupport/doc_clang_module.swift.response b/test/SourceKit/DocSupport/doc_clang_module.swift.response
index bb9fcdc..99dc1f8 100644
--- a/test/SourceKit/DocSupport/doc_clang_module.swift.response
+++ b/test/SourceKit/DocSupport/doc_clang_module.swift.response
@@ -2155,7 +2155,7 @@
   {
     key.kind: source.lang.swift.ref.typealias,
     key.name: "Element",
-    key.usr: "s:So17FooRuncingOptionsV7Elementa",
+    key.usr: "s:SC17FooRuncingOptionsV7Elementa",
     key.offset: 2859,
     key.length: 7
   },
@@ -4465,9 +4465,7 @@
     key.length: 10
   },
   {
-    key.kind: source.lang.swift.ref.protocol,
-    key.name: "AnyObject",
-    key.usr: "s:s9AnyObjectP",
+    key.kind: source.lang.swift.syntaxtype.typeidentifier,
     key.offset: 6668,
     key.length: 9
   },
@@ -4487,9 +4485,7 @@
     key.length: 16
   },
   {
-    key.kind: source.lang.swift.ref.protocol,
-    key.name: "AnyObject",
-    key.usr: "s:s9AnyObjectP",
+    key.kind: source.lang.swift.syntaxtype.typeidentifier,
     key.offset: 6722,
     key.length: 9
   },
@@ -4554,9 +4550,7 @@
     key.length: 7
   },
   {
-    key.kind: source.lang.swift.ref.protocol,
-    key.name: "AnyObject",
-    key.usr: "s:s9AnyObjectP",
+    key.kind: source.lang.swift.syntaxtype.typeidentifier,
     key.offset: 6831,
     key.length: 9
   },
@@ -5237,7 +5231,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init(_:)",
-        key.usr: "s:So8FooEnum1VABs6UInt32Vcfc",
+        key.usr: "s:SC8FooEnum1VABs6UInt32Vcfc",
         key.offset: 89,
         key.length: 24,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>_</decl.var.parameter.argument_label> <decl.var.parameter.name>rawValue</decl.var.parameter.name>: <decl.var.parameter.type><ref.struct usr=\"s:s6UInt32V\">UInt32</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
@@ -5254,7 +5248,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init(rawValue:)",
-        key.usr: "s:So8FooEnum1VABs6UInt32V8rawValue_tcfc",
+        key.usr: "s:SC8FooEnum1VABs6UInt32V8rawValue_tcfc",
         key.offset: 119,
         key.length: 31,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>rawValue</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:s6UInt32V\">UInt32</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
@@ -5283,7 +5277,7 @@
       {
         key.kind: source.lang.swift.decl.var.instance,
         key.name: "rawValue",
-        key.usr: "s:So8FooEnum1V8rawValues6UInt32Vv",
+        key.usr: "s:SC8FooEnum1V8rawValues6UInt32Vv",
         key.offset: 156,
         key.length: 20,
         key.fully_annotated_decl: "<decl.var.instance><syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>rawValue</decl.name>: <decl.var.type><ref.struct usr=\"s:s6UInt32V\">UInt32</ref.struct></decl.var.type></decl.var.instance>",
@@ -5360,7 +5354,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init(_:)",
-        key.usr: "s:So8FooEnum2VABs6UInt32Vcfc",
+        key.usr: "s:SC8FooEnum2VABs6UInt32Vcfc",
         key.offset: 326,
         key.length: 24,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>_</decl.var.parameter.argument_label> <decl.var.parameter.name>rawValue</decl.var.parameter.name>: <decl.var.parameter.type><ref.struct usr=\"s:s6UInt32V\">UInt32</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
@@ -5377,7 +5371,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init(rawValue:)",
-        key.usr: "s:So8FooEnum2VABs6UInt32V8rawValue_tcfc",
+        key.usr: "s:SC8FooEnum2VABs6UInt32V8rawValue_tcfc",
         key.offset: 356,
         key.length: 31,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>rawValue</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:s6UInt32V\">UInt32</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
@@ -5406,7 +5400,7 @@
       {
         key.kind: source.lang.swift.decl.var.instance,
         key.name: "rawValue",
-        key.usr: "s:So8FooEnum2V8rawValues6UInt32Vv",
+        key.usr: "s:SC8FooEnum2V8rawValues6UInt32Vv",
         key.offset: 393,
         key.length: 20,
         key.fully_annotated_decl: "<decl.var.instance><syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>rawValue</decl.name>: <decl.var.type><ref.struct usr=\"s:s6UInt32V\">UInt32</ref.struct></decl.var.type></decl.var.instance>",
@@ -5490,7 +5484,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init(_:)",
-        key.usr: "s:So8FooEnum3VABs6UInt32Vcfc",
+        key.usr: "s:SC8FooEnum3VABs6UInt32Vcfc",
         key.offset: 595,
         key.length: 24,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>_</decl.var.parameter.argument_label> <decl.var.parameter.name>rawValue</decl.var.parameter.name>: <decl.var.parameter.type><ref.struct usr=\"s:s6UInt32V\">UInt32</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
@@ -5507,7 +5501,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init(rawValue:)",
-        key.usr: "s:So8FooEnum3VABs6UInt32V8rawValue_tcfc",
+        key.usr: "s:SC8FooEnum3VABs6UInt32V8rawValue_tcfc",
         key.offset: 625,
         key.length: 31,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>rawValue</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:s6UInt32V\">UInt32</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
@@ -5536,7 +5530,7 @@
       {
         key.kind: source.lang.swift.decl.var.instance,
         key.name: "rawValue",
-        key.usr: "s:So8FooEnum3V8rawValues6UInt32Vv",
+        key.usr: "s:SC8FooEnum3V8rawValues6UInt32Vv",
         key.offset: 662,
         key.length: 20,
         key.fully_annotated_decl: "<decl.var.instance><syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>rawValue</decl.name>: <decl.var.type><ref.struct usr=\"s:s6UInt32V\">UInt32</ref.struct></decl.var.type></decl.var.instance>",
@@ -5658,7 +5652,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init(rawValue:)",
-        key.usr: "s:So17FooRuncingOptionsVABSi8rawValue_tcfc",
+        key.usr: "s:SC17FooRuncingOptionsVABSi8rawValue_tcfc",
         key.offset: 967,
         key.length: 28,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>rawValue</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:Si\">Int</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
@@ -6289,7 +6283,7 @@
         key.doc.full_as_xml: "<Function><Name>init(_:)</Name><USR>s:s10SetAlgebraPsExqd__cs8SequenceRd__8Iterator_7ElementQYd__AERtzlufc</USR><Declaration>convenience init&lt;S&gt;(_ sequence: S) where S : Sequence, Self.Element == S.Iterator.Element</Declaration><CommentParts><Abstract><Para>Creates a new set from a finite sequence of items.</Para></Abstract><Parameters><Parameter><Name>sequence</Name><Direction isExplicit=\"0\">in</Direction><Discussion><Para>The elements to use as members of the new set.</Para></Discussion></Parameter></Parameters><Discussion><Para>Use this initializer to create a new set from an existing sequence, like an array or a range:</Para><CodeListing language=\"swift\"><zCodeLineNumbered><![CDATA[let validIndices = Set(0..<7).subtracting([2, 4, 5])]]></zCodeLineNumbered><zCodeLineNumbered><![CDATA[print(validIndices)]]></zCodeLineNumbered><zCodeLineNumbered><![CDATA[// Prints \"[6, 0, 1, 3]\"]]></zCodeLineNumbered><zCodeLineNumbered></zCodeLineNumbered></CodeListing></Discussion></CommentParts></Function>",
         key.offset: 2786,
         key.length: 102,
-        key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>convenience</syntaxtype.keyword> <syntaxtype.keyword>init</syntaxtype.keyword>&lt;S&gt;(<decl.var.parameter><decl.var.parameter.argument_label>_</decl.var.parameter.argument_label> <decl.var.parameter.name>sequence</decl.var.parameter.name>: <decl.var.parameter.type>S</decl.var.parameter.type></decl.var.parameter>) <syntaxtype.keyword>where</syntaxtype.keyword> <decl.generic_type_requirement>S : <ref.protocol usr=\"s:s8SequenceP\">Sequence</ref.protocol></decl.generic_type_requirement>, <decl.generic_type_requirement><ref.struct usr=\"c:@E@FooRuncingOptions\">FooRuncingOptions</ref.struct>.<ref.typealias usr=\"s:So17FooRuncingOptionsV7Elementa\">Element</ref.typealias> == S.Iterator.Element</decl.generic_type_requirement></decl.function.constructor>",
+        key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>convenience</syntaxtype.keyword> <syntaxtype.keyword>init</syntaxtype.keyword>&lt;S&gt;(<decl.var.parameter><decl.var.parameter.argument_label>_</decl.var.parameter.argument_label> <decl.var.parameter.name>sequence</decl.var.parameter.name>: <decl.var.parameter.type>S</decl.var.parameter.type></decl.var.parameter>) <syntaxtype.keyword>where</syntaxtype.keyword> <decl.generic_type_requirement>S : <ref.protocol usr=\"s:s8SequenceP\">Sequence</ref.protocol></decl.generic_type_requirement>, <decl.generic_type_requirement><ref.struct usr=\"c:@E@FooRuncingOptions\">FooRuncingOptions</ref.struct>.<ref.typealias usr=\"s:SC17FooRuncingOptionsV7Elementa\">Element</ref.typealias> == S.Iterator.Element</decl.generic_type_requirement></decl.function.constructor>",
         key.entities: [
           {
             key.kind: source.lang.swift.decl.var.local,
@@ -6491,7 +6485,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init()",
-        key.usr: "s:So10FooStruct1VABycfc",
+        key.usr: "s:SC10FooStruct1VABycfc",
         key.offset: 3482,
         key.length: 6,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>()</decl.function.constructor>"
@@ -6499,7 +6493,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init(x:y:)",
-        key.usr: "s:So10FooStruct1VABs5Int32V1x_Sd1ytcfc",
+        key.usr: "s:SC10FooStruct1VABs5Int32V1x_Sd1ytcfc",
         key.offset: 3494,
         key.length: 29,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>x</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:s5Int32V\">Int32</ref.struct></decl.var.parameter.type></decl.var.parameter>, <decl.var.parameter><decl.var.parameter.argument_label>y</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:Sd\">Double</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
@@ -6574,7 +6568,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init()",
-        key.usr: "s:So10FooStruct2VABycfc",
+        key.usr: "s:SC10FooStruct2VABycfc",
         key.offset: 3651,
         key.length: 6,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>()</decl.function.constructor>"
@@ -6582,7 +6576,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init(x:y:)",
-        key.usr: "s:So10FooStruct2VABs5Int32V1x_Sd1ytcfc",
+        key.usr: "s:SC10FooStruct2VABs5Int32V1x_Sd1ytcfc",
         key.offset: 3663,
         key.length: 29,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>x</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:s5Int32V\">Int32</ref.struct></decl.var.parameter.type></decl.var.parameter>, <decl.var.parameter><decl.var.parameter.argument_label>y</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:Sd\">Double</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
@@ -6640,7 +6634,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init()",
-        key.usr: "s:So17FooStructTypedef2VABycfc",
+        key.usr: "s:SC17FooStructTypedef2VABycfc",
         key.offset: 3805,
         key.length: 6,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>()</decl.function.constructor>"
@@ -6648,7 +6642,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init(x:y:)",
-        key.usr: "s:So17FooStructTypedef2VABs5Int32V1x_Sd1ytcfc",
+        key.usr: "s:SC17FooStructTypedef2VABs5Int32V1x_Sd1ytcfc",
         key.offset: 3817,
         key.length: 29,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>x</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:s5Int32V\">Int32</ref.struct></decl.var.parameter.type></decl.var.parameter>, <decl.var.parameter><decl.var.parameter.argument_label>y</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:Sd\">Double</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
@@ -7405,7 +7399,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init()",
-        key.usr: "s:So15_InternalStructVABycfc",
+        key.usr: "s:SC15_InternalStructVABycfc",
         key.offset: 6254,
         key.length: 6,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>()</decl.function.constructor>"
@@ -7413,7 +7407,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init(x:)",
-        key.usr: "s:So15_InternalStructVABs5Int32V1x_tcfc",
+        key.usr: "s:SC15_InternalStructVABs5Int32V1x_tcfc",
         key.offset: 6266,
         key.length: 16,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>x</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:s5Int32V\">Int32</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
@@ -7541,7 +7535,7 @@
         key.usr: "c:objc(cs)FooClassPropertyOwnership(py)assignable",
         key.offset: 6636,
         key.length: 42,
-        key.fully_annotated_decl: "<decl.var.instance><syntaxtype.keyword>unowned(unsafe)</syntaxtype.keyword> <syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>assignable</decl.name>: <decl.var.type><ref.protocol usr=\"s:s9AnyObjectP\">AnyObject</ref.protocol>!</decl.var.type> { <syntaxtype.keyword>get</syntaxtype.keyword> <syntaxtype.keyword>set</syntaxtype.keyword> }</decl.var.instance>"
+        key.fully_annotated_decl: "<decl.var.instance><syntaxtype.keyword>unowned(unsafe)</syntaxtype.keyword> <syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>assignable</decl.name>: <decl.var.type>AnyObject!</decl.var.type> { <syntaxtype.keyword>get</syntaxtype.keyword> <syntaxtype.keyword>set</syntaxtype.keyword> }</decl.var.instance>"
       },
       {
         key.kind: source.lang.swift.decl.var.instance,
@@ -7549,7 +7543,7 @@
         key.usr: "c:objc(cs)FooClassPropertyOwnership(py)unsafeAssignable",
         key.offset: 6684,
         key.length: 48,
-        key.fully_annotated_decl: "<decl.var.instance><syntaxtype.keyword>unowned(unsafe)</syntaxtype.keyword> <syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>unsafeAssignable</decl.name>: <decl.var.type><ref.protocol usr=\"s:s9AnyObjectP\">AnyObject</ref.protocol>!</decl.var.type> { <syntaxtype.keyword>get</syntaxtype.keyword> <syntaxtype.keyword>set</syntaxtype.keyword> }</decl.var.instance>"
+        key.fully_annotated_decl: "<decl.var.instance><syntaxtype.keyword>unowned(unsafe)</syntaxtype.keyword> <syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>unsafeAssignable</decl.name>: <decl.var.type>AnyObject!</decl.var.type> { <syntaxtype.keyword>get</syntaxtype.keyword> <syntaxtype.keyword>set</syntaxtype.keyword> }</decl.var.instance>"
       },
       {
         key.kind: source.lang.swift.decl.var.instance,
@@ -7581,7 +7575,7 @@
         key.usr: "c:objc(cs)FooClassPropertyOwnership(py)weakRef",
         key.offset: 6813,
         key.length: 28,
-        key.fully_annotated_decl: "<decl.var.instance><syntaxtype.keyword>weak</syntaxtype.keyword> <syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>weakRef</decl.name>: <decl.var.type><ref.protocol usr=\"s:s9AnyObjectP\">AnyObject</ref.protocol>!</decl.var.type> { <syntaxtype.keyword>get</syntaxtype.keyword> <syntaxtype.keyword>set</syntaxtype.keyword> }</decl.var.instance>"
+        key.fully_annotated_decl: "<decl.var.instance><syntaxtype.keyword>weak</syntaxtype.keyword> <syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>weakRef</decl.name>: <decl.var.type>AnyObject!</decl.var.type> { <syntaxtype.keyword>get</syntaxtype.keyword> <syntaxtype.keyword>set</syntaxtype.keyword> }</decl.var.instance>"
       },
       {
         key.kind: source.lang.swift.decl.var.instance,
@@ -8025,7 +8019,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init(_:)",
-        key.usr: "s:So11FooSubEnum1VABs6UInt32Vcfc",
+        key.usr: "s:SC11FooSubEnum1VABs6UInt32Vcfc",
         key.offset: 7852,
         key.length: 24,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>_</decl.var.parameter.argument_label> <decl.var.parameter.name>rawValue</decl.var.parameter.name>: <decl.var.parameter.type><ref.struct usr=\"s:s6UInt32V\">UInt32</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
@@ -8042,7 +8036,7 @@
       {
         key.kind: source.lang.swift.decl.function.constructor,
         key.name: "init(rawValue:)",
-        key.usr: "s:So11FooSubEnum1VABs6UInt32V8rawValue_tcfc",
+        key.usr: "s:SC11FooSubEnum1VABs6UInt32V8rawValue_tcfc",
         key.offset: 7882,
         key.length: 31,
         key.fully_annotated_decl: "<decl.function.constructor><syntaxtype.keyword>init</syntaxtype.keyword>(<decl.var.parameter><decl.var.parameter.argument_label>rawValue</decl.var.parameter.argument_label>: <decl.var.parameter.type><ref.struct usr=\"s:s6UInt32V\">UInt32</ref.struct></decl.var.parameter.type></decl.var.parameter>)</decl.function.constructor>",
@@ -8071,7 +8065,7 @@
       {
         key.kind: source.lang.swift.decl.var.instance,
         key.name: "rawValue",
-        key.usr: "s:So11FooSubEnum1V8rawValues6UInt32Vv",
+        key.usr: "s:SC11FooSubEnum1V8rawValues6UInt32Vv",
         key.offset: 7919,
         key.length: 20,
         key.fully_annotated_decl: "<decl.var.instance><syntaxtype.keyword>var</syntaxtype.keyword> <decl.name>rawValue</decl.name>: <decl.var.type><ref.struct usr=\"s:s6UInt32V\">UInt32</ref.struct></decl.var.type></decl.var.instance>",
diff --git a/test/SourceKit/InterfaceGen/Inputs/header2.h b/test/SourceKit/InterfaceGen/Inputs/header2.h
index be8b4d5..db2758c 100644
--- a/test/SourceKit/InterfaceGen/Inputs/header2.h
+++ b/test/SourceKit/InterfaceGen/Inputs/header2.h
@@ -3,3 +3,7 @@
   long width;
   long height;
 } NUPixelSize;
+
+#if __swift__ >= 40000
+void show_only_for_swift_4(void);
+#endif
diff --git a/test/SourceKit/InterfaceGen/gen_clang_module.swift.response b/test/SourceKit/InterfaceGen/gen_clang_module.swift.response
index d9d886e..a9b465f 100644
--- a/test/SourceKit/InterfaceGen/gen_clang_module.swift.response
+++ b/test/SourceKit/InterfaceGen/gen_clang_module.swift.response
@@ -4072,24 +4072,6 @@
     key.length: 12
   },
   {
-    key.kind: source.lang.swift.ref.protocol,
-    key.offset: 5904,
-    key.length: 9,
-    key.is_system: 1
-  },
-  {
-    key.kind: source.lang.swift.ref.protocol,
-    key.offset: 5963,
-    key.length: 9,
-    key.is_system: 1
-  },
-  {
-    key.kind: source.lang.swift.ref.protocol,
-    key.offset: 6092,
-    key.length: 9,
-    key.is_system: 1
-  },
-  {
     key.kind: source.lang.swift.ref.struct,
     key.offset: 6125,
     key.length: 5,
diff --git a/test/SourceKit/InterfaceGen/gen_header.swift b/test/SourceKit/InterfaceGen/gen_header.swift
index 57a026d..df66be2 100644
--- a/test/SourceKit/InterfaceGen/gen_header.swift
+++ b/test/SourceKit/InterfaceGen/gen_header.swift
@@ -5,5 +5,10 @@
 // RUN: rm %t.m
 
 // RUN: echo '#include "header2.h"' > %t.m
-// RUN: %sourcekitd-test -req=interface-gen -header %S/Inputs/header2.h -- -fsyntax-only %t.m -I %S/Inputs > %t.header2.response
+// RUN: %sourcekitd-test -req=interface-gen -header %S/Inputs/header2.h -swift-version=3 -- -fsyntax-only %t.m -I %S/Inputs > %t.header2.response
 // RUN: diff -u %s.header2.response %t.header2.response
+
+// RUN: echo '#include "header2.h"' > %t.m
+// RUN: %sourcekitd-test -req=interface-gen -header %S/Inputs/header2.h -swift-version=4 -- -fsyntax-only %t.m -I %S/Inputs > %t.header2.swift4.response
+// RUN: %FileCheck -input-file %t.header2.swift4.response %s -check-prefix=SWIFT4
+// SWIFT4: public func show_only_for_swift_4()
diff --git a/test/api-digester/source-stability.swift.expected b/test/api-digester/source-stability.swift.expected
index 49d9338..3d113b5 100644
--- a/test/api-digester/source-stability.swift.expected
+++ b/test/api-digester/source-stability.swift.expected
@@ -148,8 +148,18 @@
 Func FloatingPoint.adding(_:) has been renamed to Func FloatingPoint.addingProduct(_:_:)
 Var BidirectionalCollection.indices has declared type change from DefaultBidirectionalIndices<Self> to Self.Indices
 Var Dictionary.endIndex has declared type change from DictionaryIndex<Key, Value> to Dictionary<Key, Value>.Index
+
+/* Added new type */
+Var Dictionary.keys has declared type change from LazyMapCollection<Dictionary<Key, Value>, Key> to Dictionary<Key, Value>.Keys
+
+/* FIXME: Bogus */
 Var Dictionary.startIndex has declared type change from DictionaryIndex<Key, Value> to Dictionary<Key, Value>.Index
 Var RandomAccessCollection.indices has declared type change from DefaultRandomAccessIndices<Self> to Self.Indices
+
+/* Added new type */
+Var Dictionary.values has declared type change from LazyMapCollection<Dictionary<Key, Value>, Value> to Dictionary<Key, Value>.Values
+
+/* FIXME: Bogus */
 Var Set.endIndex has declared type change from SetIndex<Element> to Set<Element>.Index
 Var Set.first has declared type change from Element? to (Element)?
 Var Set.startIndex has declared type change from SetIndex<Element> to Set<Element>.Index
diff --git a/test/decl/ext/protocol.swift b/test/decl/ext/protocol.swift
index 51cfd6d..32b8c69 100644
--- a/test/decl/ext/protocol.swift
+++ b/test/decl/ext/protocol.swift
@@ -928,7 +928,7 @@
 typealias RawRepresentableAlias = RawRepresentable
 extension RawRepresentableAlias { } // okay
 
-extension AnyObject { } // expected-error{{'AnyObject' protocol cannot be extended}}
+extension AnyObject { } // expected-error{{non-nominal type 'AnyObject' cannot be extended}}
 
 // Members of protocol extensions cannot be overridden.
 // rdar://problem/21075287
diff --git a/test/decl/func/functions.swift b/test/decl/func/functions.swift
index 1d88e91..3281b4f 100644
--- a/test/decl/func/functions.swift
+++ b/test/decl/func/functions.swift
@@ -104,7 +104,7 @@
 // parameter labels, and they are thus not in scope in the body of the function.
 // expected-error@+1{{unnamed parameters must be written}} {{27-27=_: }}
 func destructureArgument( (result: Int, error: Bool) ) -> Int {
-  return result  // expected-error {{use of unresolved identifier 'result'}}
+  return result
 }
 
 // The former is the same as this:
diff --git a/test/decl/func/operator.swift b/test/decl/func/operator.swift
index 326b8bb..e8d16b5 100644
--- a/test/decl/func/operator.swift
+++ b/test/decl/func/operator.swift
@@ -228,7 +228,7 @@
 }
 
 class C1 {
-  final func %%%(lhs: C1, rhs: C1) -> C1 { return lhs }
+  final func %%%(lhs: C1, rhs: C1) -> C1 { return lhs } // expected-error{{operator '%%%' declared in type 'C1' must be 'static'}}{{3-3=static }}
 }
 
 final class C2 {
diff --git a/test/decl/nested/protocol.swift b/test/decl/nested/protocol.swift
index ddd20aa..e10d600 100644
--- a/test/decl/nested/protocol.swift
+++ b/test/decl/nested/protocol.swift
@@ -7,7 +7,7 @@
   protocol InnerProtocol { // expected-error{{protocol 'InnerProtocol' cannot be nested inside another declaration}}
     associatedtype Rooster
     func flip(_ r: Rooster)
-    func flop(_ t: D)
+    func flop(_ t: D) // expected-error{{use of undeclared type 'D'}}
   }
 }
 
@@ -15,7 +15,7 @@
   protocol InnerProtocol { // expected-error{{protocol 'InnerProtocol' cannot be nested inside another declaration}}
     associatedtype Rooster
     func flip(_ r: Rooster)
-    func flop(_ t: T)
+    func flop(_ t: T) // expected-error{{use of undeclared type 'T'}}
   }
 }
 
@@ -25,7 +25,7 @@
   // expected-note@-1 {{did you mean 'InnerProtocol'?}}
     associatedtype Rooster
     func flip(_ r: Rooster)
-    func flop(_ h: Hen)
+    func flop(_ h: Hen) // expected-error{{use of undeclared type 'Hen'}}
   }
 }
 
@@ -71,8 +71,6 @@
 }
 
 class OtherGenericClass<T> {
-  // FIXME: The diagnostic is misleading -- OuterClass is in fact a class type
   protocol InnerProtocol : OtherGenericClass { }
-  // expected-error@-1{{inheritance from non-protocol, non-class type 'OtherGenericClass<T>'}}
-  // expected-error@-2{{protocol 'InnerProtocol' cannot be nested inside another declaration}}
+  // expected-error@-1{{protocol 'InnerProtocol' cannot be nested inside another declaration}}
 }
diff --git a/test/decl/nested/type_in_function.swift b/test/decl/nested/type_in_function.swift
index ab6faa3..563afaa 100644
--- a/test/decl/nested/type_in_function.swift
+++ b/test/decl/nested/type_in_function.swift
@@ -3,6 +3,23 @@
 // Generic class locally defined in non-generic function (rdar://problem/20116710)
 func f3() {
   class B<T> {}
+
+  class C : B<Int> {}
+
+  _ = B<Int>()
+  _ = C()
+}
+
+// Type defined inside a closure (rdar://problem/31803589)
+func hasAClosure() {
+  _ = {
+    enum E<T> { case a(T) }
+
+    let _ = E.a("hi")
+    let _ = E<String>.a("hi")
+    let _: E = .a("hi")
+    let _: E<String> = .a("hi")
+  }
 }
 
 protocol Racoon {
diff --git a/test/decl/protocol/conforms/Inputs/placement_2.swift b/test/decl/protocol/conforms/Inputs/placement_2.swift
index 0e02c9e..df05d60 100644
--- a/test/decl/protocol/conforms/Inputs/placement_2.swift
+++ b/test/decl/protocol/conforms/Inputs/placement_2.swift
@@ -27,13 +27,11 @@
 // ---------------------------------------------------------------------------
 // Suppression of synthesized conformances
 // ---------------------------------------------------------------------------
-extension MFSynthesizedClass1 : AnyObject { }
-
 class MFSynthesizedClass2 { }
 
 class MFSynthesizedClass3 : AnyObjectRefinement { }
 
-class MFSynthesizedSubClass2 : MFSynthesizedClass2 { } // expected-note{{'MFSynthesizedSubClass2' inherits conformance to protocol 'AnyObject' from superclass here}}
+class MFSynthesizedSubClass2 : MFSynthesizedClass2 { }
 
 class MFSynthesizedSubClass3 : MFSynthesizedClass1 { }
 
diff --git a/test/decl/protocol/conforms/failure.swift b/test/decl/protocol/conforms/failure.swift
index e50db49..da58c1e 100644
--- a/test/decl/protocol/conforms/failure.swift
+++ b/test/decl/protocol/conforms/failure.swift
@@ -75,9 +75,9 @@
 
 
 protocol P6Base {
-  associatedtype Foo // expected-note {{protocol requires nested type 'Foo'; do you want to add it?}}
+  associatedtype Foo
   func foo()
-  func bar() -> Foo
+  func bar() -> Foo // expected-note{{protocol requires function 'bar()' with type '() -> P6Conformer.Bar?'; do you want to add a stub?}}
 }
 extension P6Base {
 }
@@ -85,7 +85,7 @@
   associatedtype Bar // expected-note {{protocol requires nested type 'Bar'}}
 }
 extension P6 {
-  func bar() -> Bar? { return nil }
+  func bar() -> Bar? { return nil } // expected-note{{candidate has non-matching type '<Self> () -> Self.Bar?' [with Foo = P6Conformer.Bar?]}}
 }
 
 struct P6Conformer : P6 { // expected-error 2 {{does not conform}}
diff --git a/test/decl/protocol/conforms/fixit_stub_editor_implied.swift b/test/decl/protocol/conforms/fixit_stub_editor_implied.swift
new file mode 100644
index 0000000..3538821
--- /dev/null
+++ b/test/decl/protocol/conforms/fixit_stub_editor_implied.swift
@@ -0,0 +1,13 @@
+// RUN: %target-typecheck-verify-swift -serialize-diagnostics-path %t.diag
+
+protocol P1 {
+  func foo1()
+  func foo2()
+}
+
+protocol P2 {
+  func bar1()
+  func bar2()
+}
+
+class C1 : P1, P2 {} // expected-error{{type 'C1' does not conform to protocol 'P1'}} expected-error{{type 'C1' does not conform to protocol 'P2'}} expected-note{{do you want to add protocol stubs?}}{{20-20=\n    func foo1() {\n        <#code#>\n    \}\n\n    func foo2() {\n        <#code#>\n    \}\n\n    func bar1() {\n        <#code#>\n    \}\n\n    func bar2() {\n        <#code#>\n    \}\n}}
diff --git a/test/decl/protocol/conforms/nscoding.swift b/test/decl/protocol/conforms/nscoding.swift
new file mode 100644
index 0000000..7b53650
--- /dev/null
+++ b/test/decl/protocol/conforms/nscoding.swift
@@ -0,0 +1,151 @@
+// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -swift-version 4 %s -verify
+
+// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -swift-version 4 %s -dump-ast 2> %t.ast
+// RUN: %FileCheck %s < %t.ast
+
+// REQUIRES: objc_interop
+
+import Foundation
+
+// Top-level classes
+class CodingA : NSObject, NSCoding {
+  required init(coder: NSCoder) { }
+  func encode(coder: NSCoder) { }
+  
+}   // okay
+
+// Nested classes
+extension CodingA {
+  class NestedA : NSObject, NSCoding { // expected-error{{nested class 'CodingA.NestedA' has an unstable name when archiving via 'NSCoding'}}
+    // expected-note@-1{{for new classes, add '@objc' to specify a unique, prefixed Objective-C runtime name}}{{3-3=@objc(<#Objective-C class name#>)}}
+    // expected-note@-2{{for compatibility with existing archives, use '@NSKeyedArchiveLegacy' to record the Swift 3 mangled name}}{{3-3=@NSKeyedArchiveLegacy("_TtCC8nscoding7CodingA7NestedA")}}
+    required init(coder: NSCoder) { }
+    func encode(coder: NSCoder) { }
+  }
+
+  class NestedB : NSObject {
+    // expected-note@-1{{for new classes, add '@objc' to specify a unique, prefixed Objective-C runtime name}}{{3-3=@objc(<#Objective-C class name#>)}}
+    // expected-note@-2{{for compatibility with existing archives, use '@NSKeyedArchiveLegacy' to record the Swift 3 mangled name}}{{3-3=@NSKeyedArchiveLegacy("_TtCC8nscoding7CodingA7NestedB")}}
+    required init(coder: NSCoder) { }
+    func encode(coder: NSCoder) { }
+  }
+
+  @objc(CodingA_NestedC)
+  class NestedC : NSObject, NSCoding {
+    required init(coder: NSCoder) { }
+    func encode(coder: NSCoder) { }
+  }
+
+  @objc(CodingA_NestedD)
+  class NestedD : NSObject {
+    required init(coder: NSCoder) { }
+    func encode(coder: NSCoder) { }
+  }
+}
+
+extension CodingA.NestedB: NSCoding { // expected-error{{nested class 'CodingA.NestedB' has an unstable name when archiving via 'NSCoding'}}
+}
+
+extension CodingA.NestedD: NSCoding { // okay
+}
+
+// Generic classes
+class CodingB<T> : NSObject, NSCoding {   // expected-error{{generic class 'CodingB<T>' has an unstable name when archiving via 'NSCoding'}}
+  // expected-note@-1{{generic class 'CodingB<T>' should not be archived directly}}{{1-1=@NSKeyedArchiveSubclassesOnly}}
+  required init(coder: NSCoder) { }
+  func encode(coder: NSCoder) { }
+}
+
+extension CodingB {
+  class NestedA : NSObject, NSCoding { // expected-error{{generic class 'CodingB<T>.NestedA' has an unstable name when archiving via 'NSCoding'}}
+    // expected-note@-1{{generic class 'CodingB<T>.NestedA' should not be archived directly}}{{3-3=@NSKeyedArchiveSubclassesOnly}}
+    required init(coder: NSCoder) { }
+    func encode(coder: NSCoder) { }
+  }
+}
+
+// Fileprivate classes.
+fileprivate class CodingC : NSObject, NSCoding {    // expected-error{{fileprivate class 'CodingC' has an unstable name when archiving via 'NSCoding'}}
+  // expected-note@-1{{for new classes, add '@objc' to specify a unique, prefixed Objective-C runtime name}}{{1-1=@objc(<#Objective-C class name#>)}}
+  // expected-note@-2{{for compatibility with existing archives, use '@NSKeyedArchiveLegacy' to record the Swift 3 mangled name}}{{1-1=@NSKeyedArchiveLegacy("_TtC8nscodingP33_0B4E7641C0BD1F170280EEDD0D0C1F6C7CodingC")}}
+  required init(coder: NSCoder) { }
+  func encode(coder: NSCoder) { }
+}
+
+// Private classes
+private class CodingD : NSObject, NSCoding {       // expected-error{{private class 'CodingD' has an unstable name when archiving via 'NSCoding'}}
+  // expected-note@-1{{for new classes, add '@objc' to specify a unique, prefixed Objective-C runtime name}}{{1-1=@objc(<#Objective-C class name#>)}}
+  // expected-note@-2{{for compatibility with existing archives, use '@NSKeyedArchiveLegacy' to record the Swift 3 mangled name}}{{1-1=@NSKeyedArchiveLegacy("_TtC8nscodingP33_0B4E7641C0BD1F170280EEDD0D0C1F6C7CodingD")}}
+  required init(coder: NSCoder) { }
+  func encode(coder: NSCoder) { }
+}
+
+// Local classes.
+func someFunction() {
+  class LocalCoding : NSObject, NSCoding {       // expected-error{{local class 'LocalCoding' has an unstable name when archiving via 'NSCoding'}}
+  // expected-note@-1{{for new classes, add '@objc' to specify a unique, prefixed Objective-C runtime name}}{{3-3=@objc(<#Objective-C class name#>)}}
+  // expected-note@-2{{for compatibility with existing archives, use '@NSKeyedArchiveLegacy' to record the Swift 3 mangled name}}{{3-3=@NSKeyedArchiveLegacy("_TtCF8nscoding12someFunctionFT_T_L_11LocalCoding")}}
+  required init(coder: NSCoder) { }
+  func encode(coder: NSCoder) { }
+}
+}
+
+// Inherited conformances.
+class CodingE<T> : CodingB<T> {   // expected-error{{generic class 'CodingE<T>' has an unstable name when archiving via 'NSCoding'}}
+    // expected-note@-1{{generic class 'CodingE<T>' should not be archived directly}}{{1-1=@NSKeyedArchiveSubclassesOnly}}
+  required init(coder: NSCoder) { super.init(coder: coder) }
+  override func encode(coder: NSCoder) { }
+}
+
+// @NSKeyedArchiveLegacy suppressions
+extension CodingA {
+  @NSKeyedArchiveLegacy("TheNestedE")
+  class NestedE : NSObject, NSCoding {
+    required init(coder: NSCoder) { }
+    func encode(coder: NSCoder) { }
+  }
+}
+
+@NSKeyedArchiveSubclassesOnly
+class CodingGeneric<T> : NSObject, NSCoding {
+  required init(coder: NSCoder) { }
+  func encode(coder: NSCoder) { }
+}
+
+@NSKeyedArchiveLegacy("TheCodingF")
+fileprivate class CodingF : NSObject, NSCoding {
+  required init(coder: NSCoder) { }
+  func encode(coder: NSCoder) { }
+}
+
+@NSKeyedArchiveLegacy("TheCodingG")
+private class CodingG : NSObject, NSCoding {
+  required init(coder: NSCoder) { }
+  func encode(coder: NSCoder) { }
+}
+
+// Errors with @NSKeyedArchiveLegacy.
+@NSKeyedArchiveLegacy("TheCodingG") // expected-error{{@NSKeyedArchiveLegacy may only be used on 'class' declarations}}
+struct Foo { }
+
+@NSKeyedArchiveLegacy("TheCodingG") // expected-error{{'@NSKeyedArchiveLegacy' cannot be applied to generic class 'Bar<T>'}}
+class Bar<T> : NSObject { }
+
+extension CodingB {
+  @NSKeyedArchiveLegacy("GenericViaParent") // expected-error{{'@NSKeyedArchiveLegacy' cannot be applied to generic class 'CodingB<T>.GenericViaParent'}}
+  class GenericViaParent : NSObject { }
+}
+
+// Inference of @_staticInitializeObjCMetadata.
+class SubclassOfCodingE : CodingE<Int> { }
+
+// But don't allow one to write @_staticInitializeObjCMetadata!
+@_staticInitializeObjCMetadata // expected-error{{unknown attribute '_staticInitializeObjCMetadata'}}
+class DontAllowStaticInits { }
+
+// CHECK-NOT: class_decl "CodingA"{{.*}}@_staticInitializeObjCMetadata
+// CHECK: class_decl "NestedA"{{.*}}@_staticInitializeObjCMetadata
+// CHECK: class_decl "NestedC"{{.*}}@_staticInitializeObjCMetadata
+// CHECK-NOT: class_decl "NestedE"{{.*}}@_staticInitializeObjCMetadata
+// CHECK-NOT: class_decl "CodingGeneric"{{.*}}@_staticInitializeObjCMetadata
+// CHECK: class_decl "SubclassOfCodingE"{{.*}}@_staticInitializeObjCMetadata
\ No newline at end of file
diff --git a/test/decl/protocol/conforms/placement.swift b/test/decl/protocol/conforms/placement.swift
index acdb60e..ccade58 100644
--- a/test/decl/protocol/conforms/placement.swift
+++ b/test/decl/protocol/conforms/placement.swift
@@ -106,21 +106,20 @@
 // ---------------------------------------------------------------------------
 // Suppression of synthesized conformances
 // ---------------------------------------------------------------------------
-class SynthesizedClass1 : AnyObject { }
+class SynthesizedClass1 : AnyObject { } // expected-warning{{conformance of class 'SynthesizedClass1' to 'AnyObject' is redundant}}
 
 class SynthesizedClass2 { }
-extension SynthesizedClass2 : AnyObject { }
+extension SynthesizedClass2 : AnyObject { } // expected-error{{inheritance from non-protocol type 'AnyObject'}}
 
 class SynthesizedClass3 : AnyObjectRefinement { }
 
 class SynthesizedClass4 { }
 extension SynthesizedClass4 : AnyObjectRefinement { }
 
-class SynthesizedSubClass1 : SynthesizedClass1, AnyObject { } // expected-error{{redundant conformance of 'SynthesizedSubClass1' to protocol 'AnyObject'}}
-// expected-note@-1{{'SynthesizedSubClass1' inherits conformance to protocol 'AnyObject' from superclass here}}
+class SynthesizedSubClass1 : SynthesizedClass1, AnyObject { } // expected-warning{{conformance of class 'SynthesizedSubClass1' to 'AnyObject' is redundant}}
 
-class SynthesizedSubClass2 : SynthesizedClass2 { } // expected-note{{'SynthesizedSubClass2' inherits conformance to protocol 'AnyObject' from superclass here}}
-extension SynthesizedSubClass2 : AnyObject { } // expected-error{{redundant conformance of 'SynthesizedSubClass2' to protocol 'AnyObject'}}
+class SynthesizedSubClass2 : SynthesizedClass2 { }
+extension SynthesizedSubClass2 : AnyObject { } // expected-error{{inheritance from non-protocol type 'AnyObject'}}
 
 class SynthesizedSubClass3 : SynthesizedClass1, AnyObjectRefinement { }
 
@@ -171,12 +170,12 @@
 // ---------------------------------------------------------------------------
 class MFSynthesizedClass1 { }
 
-extension MFSynthesizedClass2 : AnyObject { }
+extension MFSynthesizedClass2 : AnyObject { } // expected-error{{inheritance from non-protocol type 'AnyObject'}}
 
 class MFSynthesizedClass4 { }
 extension MFSynthesizedClass4 : AnyObjectRefinement { }
 
-extension MFSynthesizedSubClass2 : AnyObject { } // expected-error{{redundant conformance of 'MFSynthesizedSubClass2' to protocol 'AnyObject'}}
+extension MFSynthesizedSubClass2 : AnyObject { } // expected-error{{inheritance from non-protocol type 'AnyObject'}}
 
 extension MFSynthesizedSubClass3 : AnyObjectRefinement { }
 
@@ -200,7 +199,7 @@
 extension MMSuper1 : MMP2a { } // expected-warning{{conformance of 'MMSuper1' to protocol 'MMP2a' was already stated in the type's module 'placement_module_A'}}
 extension MMSuper1 : MMP3b { } // okay
 
-extension MMSub1 : AnyObject { } // expected-warning{{conformance of 'MMSub1' to protocol 'AnyObject' was already stated in the type's module 'placement_module_A'}}
+extension MMSub1 : AnyObject { } // expected-error{{inheritance from non-protocol type 'AnyObject'}}
 
 extension MMSub2 : MMP1 { } // expected-warning{{conformance of 'MMSub2' to protocol 'MMP1' was already stated in the type's module 'placement_module_A'}}
 extension MMSub2 : MMP2a { } // expected-warning{{conformance of 'MMSub2' to protocol 'MMP2a' was already stated in the type's module 'placement_module_A'}}
@@ -211,7 +210,7 @@
 extension MMSub3 : MMP1 { } // expected-warning{{conformance of 'MMSub3' to protocol 'MMP1' was already stated in the type's module 'placement_module_A'}}
 extension MMSub3 : MMP2a { } // expected-warning{{conformance of 'MMSub3' to protocol 'MMP2a' was already stated in the type's module 'placement_module_A'}}
 extension MMSub3 : MMP3b { } // okay
-extension MMSub3 : AnyObject { } // expected-warning{{conformance of 'MMSub3' to protocol 'AnyObject' was already stated in the type's module 'placement_module_A'}}
+extension MMSub3 : AnyObject { } // expected-error{{inheritance from non-protocol type 'AnyObject'}}
 
 extension MMSub4 : MMP1 { } // expected-warning{{conformance of 'MMSub4' to protocol 'MMP1' was already stated in the type's module 'placement_module_B'}}
 extension MMSub4 : MMP2a { } // expected-warning{{conformance of 'MMSub4' to protocol 'MMP2a' was already stated in the type's module 'placement_module_B'}}
diff --git a/test/decl/protocol/protocols.swift b/test/decl/protocol/protocols.swift
index e92e064..cc7d5d2 100644
--- a/test/decl/protocol/protocols.swift
+++ b/test/decl/protocol/protocols.swift
@@ -38,7 +38,9 @@
   v1.creator = "Me"                   // expected-error {{cannot assign to property: 'creator' is a get-only property}}
 }
 
-protocol Bogus : Int {} // expected-error{{inheritance from non-protocol, non-class type 'Int'}}
+protocol Bogus : Int {}
+// expected-error@-1{{inheritance from non-protocol type 'Int'}}
+// expected-error@-2{{type 'Self' constrained to non-protocol type 'Int'}}
 
 // Explicit conformance checks (successful).
 
@@ -75,6 +77,25 @@
   func print(format: TestFormat) {} // expected-note{{candidate has non-matching type '(TestFormat) -> ()'}}
 }
 
+// Protocol compositions in inheritance clauses
+protocol Left {
+  func l() // expected-note {{protocol requires function 'l()' with type '() -> ()'; do you want to add a stub?}}
+}
+protocol Right {
+  func r() // expected-note {{protocol requires function 'r()' with type '() -> ()'; do you want to add a stub?}}
+}
+typealias Both = Left & Right
+
+protocol Up : Both {
+  func u()
+}
+
+struct DoesNotConform : Up {
+  // expected-error@-1 {{type 'DoesNotConform' does not conform to protocol 'Left'}}
+  // expected-error@-2 {{type 'DoesNotConform' does not conform to protocol 'Right'}}
+  func u() {}
+}
+
 // Circular protocols
 
 protocol CircleMiddle : CircleStart { func circle_middle() } // expected-error 2 {{circular protocol inheritance CircleMiddle}}
diff --git a/test/expr/unary/keypath/keypath.swift b/test/expr/unary/keypath/keypath.swift
index 4d9f2c2..d5a4ac8 100644
--- a/test/expr/unary/keypath/keypath.swift
+++ b/test/expr/unary/keypath/keypath.swift
@@ -17,6 +17,7 @@
 
   var property: Prop
   var optProperty: Prop?
+  let optLetProperty: Prop?
 
   subscript(sub: Sub) -> A { get { return self } set { } }
 
@@ -39,97 +40,95 @@
 func expect<T>(_ x: inout T, toHaveType _: Exactly<T>.Type) {}
 
 func testKeyPath(sub: Sub, optSub: OptSub, x: Int) {
-  var a = #keyPath2(A, .property)
+  var a = \A.property
   expect(&a, toHaveType: Exactly<WritableKeyPath<A, Prop>>.self)
 
-  var b = #keyPath2(A, [sub])
+  var b = \A.[sub]
   expect(&b, toHaveType: Exactly<WritableKeyPath<A, A>>.self)
 
-  var c = #keyPath2(A, [sub].property)
+  var c = \A.[sub].property
   expect(&c, toHaveType: Exactly<WritableKeyPath<A, Prop>>.self)
 
-  var d = #keyPath2(A, .optProperty?)
+  var d = \A.optProperty?
   expect(&d, toHaveType: Exactly<KeyPath<A, Prop?>>.self)
 
-  var e = #keyPath2(A, .optProperty?[sub])
+  var e = \A.optProperty?[sub]
   expect(&e, toHaveType: Exactly<KeyPath<A, A?>>.self)
 
-  var f = #keyPath2(A, .optProperty!)
+  var f = \A.optProperty!
   expect(&f, toHaveType: Exactly<WritableKeyPath<A, Prop>>.self)
 
-  var g = #keyPath2(A, .property[optSub]?.optProperty![sub])
+  var g = \A.property[optSub]?.optProperty![sub]
   expect(&g, toHaveType: Exactly<KeyPath<A, A?>>.self)
 
-  var h = #keyPath2([A], .property)
+  var h = \[A].property
   expect(&h, toHaveType: Exactly<KeyPath<[A], Prop>>.self)
 
-  var i = #keyPath2([A], .property.nonMutatingProperty)
+  var i = \[A].property.nonMutatingProperty
   expect(&i, toHaveType: Exactly<ReferenceWritableKeyPath<[A], B>>.self)
 
-  var j = #keyPath2([A], [x])
+  var j = \[A].[x]
   expect(&j, toHaveType: Exactly<WritableKeyPath<[A], A>>.self)
 
-  var k = #keyPath2([A: B], [A()])
+  var k = \[A: B].[A()]
   expect(&k, toHaveType: Exactly<WritableKeyPath<[A: B], B?>>.self)
 
-  var l = #keyPath2(C<A>, .value)
+  var l = \C<A>.value
   expect(&l, toHaveType: Exactly<WritableKeyPath<C<A>, A>>.self)
 
   // expected-error@+1{{generic parameter 'T' could not be inferred}}
-  _ = #keyPath2(C, .value)
+  _ = \C.value
 
   // expected-error@+1{{}}
-  _ = #keyPath2(() -> (), .noMember)
+  _ = \(() -> ()).noMember
 
-  // FIXME crash let _: PartialKeyPath<A> = #keyPath2(.property)
-  let _: KeyPath<A, Prop> = #keyPath2(.property)
-  let _: WritableKeyPath<A, Prop> = #keyPath2(.property)
+  // FIXME crash let _: PartialKeyPath<A> = \.property
+  let _: KeyPath<A, Prop> = \.property
+  let _: WritableKeyPath<A, Prop> = \.property
   // expected-error@+1{{ambiguous}} (need to improve diagnostic)
-  let _: ReferenceWritableKeyPath<A, Prop> = #keyPath2(.property)
+  let _: ReferenceWritableKeyPath<A, Prop> = \.property
 
-  // FIXME crash let _: PartialKeyPath<A> = #keyPath2([sub])
-  // FIXME should resolve: expected-error@+1{{}}
-  let _: KeyPath<A, A> = #keyPath2([sub])
-  // FIXME should resolve: expected-error@+1{{}}
-  let _: WritableKeyPath<A, A> = #keyPath2([sub])
+  // FIXME crash let _: PartialKeyPath<A> = \[sub]
+  let _: KeyPath<A, A> = \.[sub]
+  let _: WritableKeyPath<A, A> = \.[sub]
   // expected-error@+1{{ambiguous}} (need to improve diagnostic)
-  let _: ReferenceWritableKeyPath<A, A> = #keyPath2([sub])
+  let _: ReferenceWritableKeyPath<A, A> = \.[sub]
 
-  // FIXME crash let _: PartialKeyPath<A> = #keyPath2(.optProperty?)
-  let _: KeyPath<A, Prop?> = #keyPath2(.optProperty?)
+  // FIXME crash let _: PartialKeyPath<A> = \.optProperty?
+  let _: KeyPath<A, Prop?> = \.optProperty?
   // expected-error@+1{{cannot convert}}
-  let _: WritableKeyPath<A, Prop?> = #keyPath2(.optProperty?)
+  let _: WritableKeyPath<A, Prop?> = \.optProperty?
   // expected-error@+1{{cannot convert}}
-  let _: ReferenceWritableKeyPath<A, Prop?> = #keyPath2(.optProperty?)
+  let _: ReferenceWritableKeyPath<A, Prop?> = \.optProperty?
 
-  // FIXME crash let _: PartialKeyPath<A> = #keyPath2(.optProperty?[sub])
-  let _: KeyPath<A, A?> = #keyPath2(.optProperty?[sub])
+  // FIXME crash let _: PartialKeyPath<A> = \.optProperty?[sub]
+  let _: KeyPath<A, A?> = \.optProperty?[sub]
   // expected-error@+1{{cannot convert}}
-  let _: WritableKeyPath<A, A?> = #keyPath2(.optProperty?[sub])
+  let _: WritableKeyPath<A, A?> = \.optProperty?[sub]
   // expected-error@+1{{cannot convert}}
-  let _: ReferenceWritableKeyPath<A, A?> = #keyPath2(.optProperty?[sub])
+  let _: ReferenceWritableKeyPath<A, A?> = \.optProperty?[sub]
 
-  // FIXME should resolve: expected-error@+1{{}}
-  let _: KeyPath<A, Prop> = #keyPath2(.optProperty!)
-  // FIXME should resolve: expected-error@+1{{}}
-  let _: KeyPath<A, Prop?> = #keyPath2(.property[optSub]?.optProperty![sub])
+  let _: KeyPath<A, Prop> = \.optProperty!
+  let _: KeyPath<A, Prop> = \.optLetProperty!
+  let _: KeyPath<A, Prop?> = \.property[optSub]?.optProperty!
+  let _: KeyPath<A, A?> = \.property[optSub]?.optProperty![sub]
 
-  // FIXME crash let _: PartialKeyPath<C<A>> = #keyPath2(.value)
-  let _: KeyPath<C<A>, A> = #keyPath2(.value)
-  let _: WritableKeyPath<C<A>, A> = #keyPath2(.value)
+  // FIXME crash let _: PartialKeyPath<C<A>> = \.value
+  let _: KeyPath<C<A>, A> = \.value
+  let _: WritableKeyPath<C<A>, A> = \.value
   // expected-error@+1{{ambiguous}} (need to improve diagnostic)
-  let _: ReferenceWritableKeyPath<C<A>, A> = #keyPath2(.value)
+  let _: ReferenceWritableKeyPath<C<A>, A> = \.value
 
-  // FIXME crash let _: PartialKeyPath<C<A>> = #keyPath2(C, .value)
-  let _: KeyPath<C<A>, A> = #keyPath2(C, .value)
-  let _: WritableKeyPath<C<A>, A> = #keyPath2(C, .value)
+  // FIXME crash let _: PartialKeyPath<C<A>> = \C, .value
+  let _: KeyPath<C<A>, A> = \C.value
+  let _: WritableKeyPath<C<A>, A> = \C.value
   // expected-error@+1{{cannot convert}}
-  let _: ReferenceWritableKeyPath<C<A>, A> = #keyPath2(C, .value)
+  let _: ReferenceWritableKeyPath<C<A>, A> = \C.value
 
-  // FIXME crash let _: PartialKeyPath<Prop> = #keyPath2(.nonMutatingProperty)
-  let _: KeyPath<Prop, B> = #keyPath2(.nonMutatingProperty)
-  let _: WritableKeyPath<Prop, B> = #keyPath2(.nonMutatingProperty)
-  let _: ReferenceWritableKeyPath<Prop, B> = #keyPath2(.nonMutatingProperty)
+  // FIXME crash let _: PartialKeyPath<Prop> = \.nonMutatingProperty
+  let _: KeyPath<Prop, B> = \.nonMutatingProperty
+  let _: WritableKeyPath<Prop, B> = \.nonMutatingProperty
+  let _: ReferenceWritableKeyPath<Prop, B> = \.nonMutatingProperty
 }
 
 struct Z { }
@@ -196,35 +195,35 @@
 
 func testSyntaxErrors() { // expected-note{{}}
   // TODO: recovery
-  _ = #keyPath2(.  ; // expected-error{{expected property or type name}}
-  _ = #keyPath2(.a ;
-  _ = #keyPath2([a ;
-  _ = #keyPath2([a];
-  _ = #keyPath2(?  ;
-  _ = #keyPath2(!  ;
-  _ = #keyPath2(.  ;
-  _ = #keyPath2(.a ;
-  _ = #keyPath2([a ;
-  _ = #keyPath2([a,;
-  _ = #keyPath2([a:;
-  _ = #keyPath2([a];
-  _ = #keyPath2(.a?;
-  _ = #keyPath2(.a!;
-  _ = #keyPath2(A     ;
-  _ = #keyPath2(A,    ;
-  _ = #keyPath2(A<    ;
-  _ = #keyPath2(A, .  ;
-  _ = #keyPath2(A, .a ;
-  _ = #keyPath2(A, [a ;
-  _ = #keyPath2(A, [a];
-  _ = #keyPath2(A, ?  ;
-  _ = #keyPath2(A, !  ;
-  _ = #keyPath2(A, .  ;
-  _ = #keyPath2(A, .a ;
-  _ = #keyPath2(A, [a ;
-  _ = #keyPath2(A, [a,;
-  _ = #keyPath2(A, [a:;
-  _ = #keyPath2(A, [a];
-  _ = #keyPath2(A, .a?;
-  _ = #keyPath2(A, .a!;
+  _ = \.  ; // expected-error{{expected member name following '.'}}
+  _ = \.a ;
+  _ = \[a ;
+  _ = \[a];
+  _ = \?  ;
+  _ = \!  ;
+  _ = \.  ; // expected-error{{expected member name following '.'}}
+  _ = \.a ;
+  _ = \[a ;
+  _ = \[a,;
+  _ = \[a:;
+  _ = \[a];
+  _ = \.a?;
+  _ = \.a!;
+  _ = \A     ;
+  _ = \A,    ;
+  _ = \A<    ;
+  _ = \A.  ; // expected-error{{expected member name following '.'}}
+  _ = \A.a ;
+  _ = \A[a ;
+  _ = \A[a];
+  _ = \A?  ;
+  _ = \A!  ;
+  _ = \A.  ; // expected-error{{expected member name following '.'}}
+  _ = \A.a ;
+  _ = \A[a ;
+  _ = \A[a,;
+  _ = \A[a:;
+  _ = \A[a];
+  _ = \A.a?;
+  _ = \A.a!;
 } // expected-error@+1{{}}
diff --git a/test/expr/unary/selector/selector.swift b/test/expr/unary/selector/selector.swift
index ee65fcf..a4d9ea2 100644
--- a/test/expr/unary/selector/selector.swift
+++ b/test/expr/unary/selector/selector.swift
@@ -116,7 +116,9 @@
 
 func testParseErrors4() {
   // Subscripts
-  _ = #selector(C1.subscript) // expected-error{{type 'C1.Type' has no subscript members}}
+  // TODO: rdar://problem/31724211 -- improve diagnostic regression from
+  // global keypath subscripts
+  _ = #selector(C1.subscript) // expected-error{{}}
 }
 
 // SR-1827
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index fb351a1..b775b9c 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -83,6 +83,11 @@
 
 config.available_features.add("CMAKE_GENERATOR=@CMAKE_GENERATOR@")
 
+if "@SWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING@" == "TRUE":
+    config.available_features.add('runtime-dladdr-backtraces')
+if "@SWIFT_RUNTIME_DLADDR_ALLOWED@" == "TRUE":
+    config.available_features.add('runtime-dladdr')
+
 if "@SWIFT_ENABLE_SOURCEKIT_TESTS@" == "TRUE":
     config.available_features.add('sourcekit')
 
diff --git a/test/reproducible-builds/swiftc-emit-module.swift b/test/reproducible-builds/swiftc-emit-module.swift
new file mode 100644
index 0000000..c365189
--- /dev/null
+++ b/test/reproducible-builds/swiftc-emit-module.swift
@@ -0,0 +1,6 @@
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: %target-build-swift -O -g -module-name foo -emit-module %s -o %t/run-1.module
+// RUN: %target-build-swift -O -g -module-name foo -emit-module %s -o %t/run-2.module
+// RUN: cmp %t/run-1.module %t/run-2.module
+// RUN: cmp %t/run-1.swiftdoc %t/run-2.swiftdoc
+print("foo")
diff --git a/test/reproducible-builds/swiftc-emit-sib.swift b/test/reproducible-builds/swiftc-emit-sib.swift
new file mode 100644
index 0000000..f580715
--- /dev/null
+++ b/test/reproducible-builds/swiftc-emit-sib.swift
@@ -0,0 +1,5 @@
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: %target-build-swift -O -g -module-name foo -emit-sib %s -o %t/run-1.sib
+// RUN: %target-build-swift -O -g -module-name foo -emit-sib %s -o %t/run-2.sib
+// RUN: cmp %t/run-1.sib %t/run-2.sib
+print("foo")
diff --git a/test/reproducible-builds/swiftc-emit-sibgen.swift b/test/reproducible-builds/swiftc-emit-sibgen.swift
new file mode 100644
index 0000000..105965b
--- /dev/null
+++ b/test/reproducible-builds/swiftc-emit-sibgen.swift
@@ -0,0 +1,5 @@
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: %target-build-swift -O -g -module-name foo -emit-sibgen %s -o %t/run-1.sibgen
+// RUN: %target-build-swift -O -g -module-name foo -emit-sibgen %s -o %t/run-2.sibgen
+// RUN: cmp %t/run-1.sibgen %t/run-2.sibgen
+print("foo")
diff --git a/test/reproducible-builds/swiftc-emit-tbd.swift b/test/reproducible-builds/swiftc-emit-tbd.swift
new file mode 100644
index 0000000..9081f4e
--- /dev/null
+++ b/test/reproducible-builds/swiftc-emit-tbd.swift
@@ -0,0 +1,5 @@
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: %target-build-swift -O -g -module-name foo -emit-tbd %s -o %t/run-1.tbd
+// RUN: %target-build-swift -O -g -module-name foo -emit-tbd %s -o %t/run-2.tbd
+// RUN: diff -u %t/run-1.tbd %t/run-2.tbd
+print("foo")
diff --git a/test/stdlib/FlatMapDiagnostics.swift.gyb b/test/stdlib/FlatMapDiagnostics.swift.gyb
deleted file mode 100644
index 0183eda..0000000
--- a/test/stdlib/FlatMapDiagnostics.swift.gyb
+++ /dev/null
@@ -1,39 +0,0 @@
-//===--- FlatMapDiagnostics.swift -----------------------------*- swift -*-===//
-//
-// This source file is part of the Swift.org open source project
-//
-// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
-// Licensed under Apache License v2.0 with Runtime Library Exception
-//
-// See https://swift.org/LICENSE.txt for license information
-// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
-//
-//===----------------------------------------------------------------------===//
-// RUN: rm -rf %t && mkdir -p %t
-// RUN: %gyb %s -o %t/FlatMapDiagnostics.swift
-// RUN: %target-swift-frontend -typecheck -verify %t/FlatMapDiagnostics.swift
-
-
-% for Type in [
-%   'Sequence',
-%   'Collection',
-%   'LazySequenceProtocol',
-%   'LazyCollectionProtocol']:
-
-func testGeneric${Type}<T : ${Type}>(xs: T) {
-  _ = xs.flatMap { $0 } // expected-warning {{Please use map instead.}}
-}
-
-% end
-
-func testArray(xs: [Int]) {
- _ = xs.flatMap { $0 } // expected-warning {{Please use map instead.}}
- _ = xs.lazy.flatMap { $0 } // expected-warning {{Please use map instead.}}
-}
-
-func testGenericLazyBidirectionalCollection<
-  T : LazyCollectionProtocol & BidirectionalCollection
->(xs: T) where T.Elements : BidirectionalCollection {
-  _ = xs.flatMap { $0 } // expected-warning {{Please use map instead.}}
-}
-
diff --git a/test/stdlib/Integers.swift.gyb b/test/stdlib/Integers.swift.gyb
index 7096b17..cdfc63d 100644
--- a/test/stdlib/Integers.swift.gyb
+++ b/test/stdlib/Integers.swift.gyb
@@ -583,5 +583,36 @@
   _ = f(Int.min)
 }
 
+tests.test("signum/generic") {
+  func check<T : BinaryInteger>(_ expected: T, _ x: T) {
+    expectEqual(expected, x.signum())
+  }
+% for suffix in ['8', '16', '32', '64', '']:
+  check(-1, Int${suffix}.min)
+  check(-1, (-42) as Int${suffix})
+  check(-1, (-1) as Int${suffix})
+%   for u in ['U', '']:
+  check(0, 0 as ${u}Int${suffix})
+  check(1, 1 as ${u}Int${suffix})
+  check(1, 42 as ${u}Int${suffix})
+  check(1, ${u}Int${suffix}.max)
+%   end
+% end
+}
+
+tests.test("signum/concrete") {
+% for suffix in ['8', '16', '32', '64', '']:
+  expectEqual(-1 as Int${suffix}, Int${suffix}.min.signum())
+  expectEqual(-1 as Int${suffix}, (-42 as Int${suffix}).signum())
+  expectEqual(-1 as Int${suffix}, (-1 as Int${suffix}).signum())
+%   for u in ['U', '']:
+  expectEqual(0 as ${u}Int${suffix}, (0 as ${u}Int${suffix}).signum())
+  expectEqual(1 as ${u}Int${suffix}, (1 as ${u}Int${suffix}).signum())
+  expectEqual(1 as ${u}Int${suffix}, (42 as ${u}Int${suffix}).signum())
+  expectEqual(1 as ${u}Int${suffix}, ${u}Int${suffix}.max.signum())
+%   end
+% end
+}
+
 
 runAllTests()
diff --git a/test/stdlib/KeyPath.swift b/test/stdlib/KeyPath.swift
index 0784fdd..6778fc3 100644
--- a/test/stdlib/KeyPath.swift
+++ b/test/stdlib/KeyPath.swift
@@ -2,10 +2,6 @@
 // RUN: %target-build-swift %s -Xfrontend -enable-experimental-keypaths -o %t/a.out
 // RUN: %target-run %t/a.out
 // REQUIRES: executable_test
-// REQUIRES: PTRSIZE=64
-
-// Disabled for now
-// REQUIRES: rdar31776015
 
 import StdlibUnittest
 
@@ -78,24 +74,24 @@
 
 keyPath.test("key path in-place instantiation") {
   for _ in 1...2 {
-    let s_x = (#keyPath2(S<Int>, .x) as AnyKeyPath) as! WritableKeyPath<S<Int>, Int>
-    let s_y = (#keyPath2(S<Int>, .y) as AnyKeyPath) as! WritableKeyPath<S<Int>, LifetimeTracked?>
-    let s_z = (#keyPath2(S<Int>, .z) as AnyKeyPath) as! WritableKeyPath<S<Int>, Int>
-    let s_p = (#keyPath2(S<Int>, .p) as AnyKeyPath) as! WritableKeyPath<S<Int>, Point>
-    let s_p_x = (#keyPath2(S<Int>, .p.x) as AnyKeyPath) as! WritableKeyPath<S<Int>, Double>
-    let s_p_y = (#keyPath2(S<Int>, .p.y) as AnyKeyPath) as! WritableKeyPath<S<Int>, Double>
-    let s_c = (#keyPath2(S<Int>, .c) as AnyKeyPath) as! WritableKeyPath<S<Int>, C<Int>>
-    let s_c_x = (#keyPath2(S<Int>, .c.x) as AnyKeyPath) as! ReferenceWritableKeyPath<S<Int>, Int>
+    let s_x = (\S<Int>.x as AnyKeyPath) as! WritableKeyPath<S<Int>, Int>
+    let s_y = (\S<Int>.y as AnyKeyPath) as! WritableKeyPath<S<Int>, LifetimeTracked?>
+    let s_z = (\S<Int>.z as AnyKeyPath) as! WritableKeyPath<S<Int>, Int>
+    let s_p = (\S<Int>.p as AnyKeyPath) as! WritableKeyPath<S<Int>, Point>
+    let s_p_x = (\S<Int>.p.x as AnyKeyPath) as! WritableKeyPath<S<Int>, Double>
+    let s_p_y = (\S<Int>.p.y as AnyKeyPath) as! WritableKeyPath<S<Int>, Double>
+    let s_c = (\S<Int>.c as AnyKeyPath) as! WritableKeyPath<S<Int>, C<Int>>
+    let s_c_x = (\S<Int>.c.x as AnyKeyPath) as! ReferenceWritableKeyPath<S<Int>, Int>
 
-    let c_x = (#keyPath2(C<Int>, .x) as AnyKeyPath) as! ReferenceWritableKeyPath<C<Int>, Int>
+    let c_x = (\C<Int>.x as AnyKeyPath) as! ReferenceWritableKeyPath<C<Int>, Int>
     let s_c_x_2 = s_c.appending(path: c_x)
 
     expectEqual(s_c_x, s_c_x_2)
     expectEqual(s_c_x_2, s_c_x)
     expectEqual(s_c_x.hashValue, s_c_x_2.hashValue)
 
-    let point_x = (#keyPath2(Point, .x) as AnyKeyPath) as! WritableKeyPath<Point, Double>
-    let point_y = (#keyPath2(Point, .y) as AnyKeyPath) as! WritableKeyPath<Point, Double>
+    let point_x = (\Point.x as AnyKeyPath) as! WritableKeyPath<Point, Double>
+    let point_y = (\Point.y as AnyKeyPath) as! WritableKeyPath<Point, Double>
 
     let s_p_x_2 = s_p.appending(path: point_x)
     let s_p_y_2 = s_p.appending(path: point_y)
@@ -107,19 +103,19 @@
     expectEqual(s_p_y_2, s_p_y)
     expectEqual(s_p_y_2.hashValue, s_p_y.hashValue)
 
-    let ca_readOnly = (#keyPath2(ComputedA, .readOnly) as AnyKeyPath) as! KeyPath<ComputedA, ComputedB>
-    let ca_nonmutating = (#keyPath2(ComputedA, .nonmutating) as AnyKeyPath) as! ReferenceWritableKeyPath<ComputedA, ComputedB>
-    let ca_reabstracted = (#keyPath2(ComputedA, .reabstracted) as AnyKeyPath) as! ReferenceWritableKeyPath<ComputedA, () -> ()>
+    let ca_readOnly = (\ComputedA.readOnly as AnyKeyPath) as! KeyPath<ComputedA, ComputedB>
+    let ca_nonmutating = (\ComputedA.nonmutating as AnyKeyPath) as! ReferenceWritableKeyPath<ComputedA, ComputedB>
+    let ca_reabstracted = (\ComputedA.reabstracted as AnyKeyPath) as! ReferenceWritableKeyPath<ComputedA, () -> ()>
 
-    let cb_readOnly = (#keyPath2(ComputedB, .readOnly) as AnyKeyPath) as! KeyPath<ComputedB, ComputedA>
-    let cb_mutating = (#keyPath2(ComputedB, .mutating) as AnyKeyPath) as! WritableKeyPath<ComputedB, ComputedA>
-    let cb_nonmutating = (#keyPath2(ComputedB, .nonmutating) as AnyKeyPath) as! ReferenceWritableKeyPath<ComputedB, ComputedA>
-    let cb_reabstracted = (#keyPath2(ComputedB, .reabstracted) as AnyKeyPath) as! WritableKeyPath<ComputedB, () -> ()>
+    let cb_readOnly = (\ComputedB.readOnly as AnyKeyPath) as! KeyPath<ComputedB, ComputedA>
+    let cb_mutating = (\ComputedB.mutating as AnyKeyPath) as! WritableKeyPath<ComputedB, ComputedA>
+    let cb_nonmutating = (\ComputedB.nonmutating as AnyKeyPath) as! ReferenceWritableKeyPath<ComputedB, ComputedA>
+    let cb_reabstracted = (\ComputedB.reabstracted as AnyKeyPath) as! WritableKeyPath<ComputedB, () -> ()>
   
-    let ca_readOnly_mutating = (#keyPath2(ComputedA, .readOnly.mutating) as AnyKeyPath) as! KeyPath<ComputedA, ComputedA>
-    let cb_mutating_readOnly = (#keyPath2(ComputedB, .mutating.readOnly) as AnyKeyPath) as! KeyPath<ComputedB, ComputedB>
-    let ca_readOnly_nonmutating = (#keyPath2(ComputedA, .readOnly.nonmutating) as AnyKeyPath) as! ReferenceWritableKeyPath<ComputedA, ComputedA>
-    let cb_readOnly_reabstracted = (#keyPath2(ComputedB, .readOnly.reabstracted) as AnyKeyPath) as! ReferenceWritableKeyPath<ComputedB, () -> ()>
+    let ca_readOnly_mutating = (\ComputedA.readOnly.mutating as AnyKeyPath) as! KeyPath<ComputedA, ComputedA>
+    let cb_mutating_readOnly = (\ComputedB.mutating.readOnly as AnyKeyPath) as! KeyPath<ComputedB, ComputedB>
+    let ca_readOnly_nonmutating = (\ComputedA.readOnly.nonmutating as AnyKeyPath) as! ReferenceWritableKeyPath<ComputedA, ComputedA>
+    let cb_readOnly_reabstracted = (\ComputedB.readOnly.reabstracted as AnyKeyPath) as! ReferenceWritableKeyPath<ComputedB, () -> ()>
 
     let ca_readOnly_mutating2 = ca_readOnly.appending(path: cb_mutating)
     expectEqual(ca_readOnly_mutating, ca_readOnly_mutating2)
@@ -150,24 +146,24 @@
 keyPath.test("key path generic instantiation") {
   func testWithGenericParam<T: Equatable>(_: T.Type) -> ReferenceWritableKeyPath<S<T>, Int> {
     for i in 1...2 {
-      let s_x = (#keyPath2(S<T>, .x) as AnyKeyPath) as! WritableKeyPath<S<T>, Int>
-      let s_y = (#keyPath2(S<T>, .y) as AnyKeyPath) as! WritableKeyPath<S<T>, LifetimeTracked?>
-      let s_z = (#keyPath2(S<T>, .z) as AnyKeyPath) as! WritableKeyPath<S<T>, T>
-      let s_p = (#keyPath2(S<T>, .p) as AnyKeyPath) as! WritableKeyPath<S<T>, Point>
-      let s_p_x = (#keyPath2(S<T>, .p.x) as AnyKeyPath) as! WritableKeyPath<S<T>, Double>
-      let s_p_y = (#keyPath2(S<T>, .p.y) as AnyKeyPath) as! WritableKeyPath<S<T>, Double>
-      let s_c = (#keyPath2(S<T>, .c) as AnyKeyPath) as! WritableKeyPath<S<T>, C<T>>
-      let s_c_x = (#keyPath2(S<T>, .c.x) as AnyKeyPath) as! ReferenceWritableKeyPath<S<T>, Int>
+      let s_x = (\S<T>.x as AnyKeyPath) as! WritableKeyPath<S<T>, Int>
+      let s_y = (\S<T>.y as AnyKeyPath) as! WritableKeyPath<S<T>, LifetimeTracked?>
+      let s_z = (\S<T>.z as AnyKeyPath) as! WritableKeyPath<S<T>, T>
+      let s_p = (\S<T>.p as AnyKeyPath) as! WritableKeyPath<S<T>, Point>
+      let s_p_x = (\S<T>.p.x as AnyKeyPath) as! WritableKeyPath<S<T>, Double>
+      let s_p_y = (\S<T>.p.y as AnyKeyPath) as! WritableKeyPath<S<T>, Double>
+      let s_c = (\S<T>.c as AnyKeyPath) as! WritableKeyPath<S<T>, C<T>>
+      let s_c_x = (\S<T>.c.x as AnyKeyPath) as! ReferenceWritableKeyPath<S<T>, Int>
 
-      let c_x = (#keyPath2(C<T>, .x) as AnyKeyPath) as! ReferenceWritableKeyPath<C<T>, Int>
+      let c_x = (\C<T>.x as AnyKeyPath) as! ReferenceWritableKeyPath<C<T>, Int>
       let s_c_x_2 = s_c.appending(path: c_x)
 
       expectEqual(s_c_x, s_c_x_2)
       expectEqual(s_c_x_2, s_c_x)
       expectEqual(s_c_x.hashValue, s_c_x_2.hashValue)
 
-      let point_x = (#keyPath2(Point, .x) as AnyKeyPath) as! WritableKeyPath<Point, Double>
-      let point_y = (#keyPath2(Point, .y) as AnyKeyPath) as! WritableKeyPath<Point, Double>
+      let point_x = (\Point.x as AnyKeyPath) as! WritableKeyPath<Point, Double>
+      let point_y = (\Point.y as AnyKeyPath) as! WritableKeyPath<Point, Double>
 
       let s_p_x_2 = s_p.appending(path: point_x)
       let s_p_y_2 = s_p.appending(path: point_y)
@@ -184,15 +180,15 @@
     fatalError()
   }
   let s_c_x_int = testWithGenericParam(Int.self)
-  let s_c_x_int2 = #keyPath2(S<Int>, .c.x)
+  let s_c_x_int2 = \S<Int>.c.x
   expectEqual(s_c_x_int, s_c_x_int2)
 
   let s_c_x_string = testWithGenericParam(String.self)
-  let s_c_x_string2 = #keyPath2(S<String>, .c.x)
+  let s_c_x_string2 = \S<String>.c.x
   expectEqual(s_c_x_string, s_c_x_string2)
 
   let s_c_x_lt = testWithGenericParam(LifetimeTracked.self)
-  let s_c_x_lt2 = #keyPath2(S<LifetimeTracked>, .c.x)
+  let s_c_x_lt2 = \S<LifetimeTracked>.c.x
   expectEqual(s_c_x_lt, s_c_x_lt2)
 }
 
diff --git a/test/stdlib/KeyPathAppending.swift b/test/stdlib/KeyPathAppending.swift
index b29b898..cf2daaa 100644
--- a/test/stdlib/KeyPathAppending.swift
+++ b/test/stdlib/KeyPathAppending.swift
@@ -49,34 +49,32 @@
                                 readOnlyRight: KeyPath<U, V>,
                                 writableRight: WritableKeyPath<U, V>,
                                 referenceRight: ReferenceWritableKeyPath<U, V>){
-  /* TODO: These crash the compiler
-  // e/xpected-error@+1{{}}
+  // expected-error@+1{{}}
   _ = readOnlyRight.appending(path: readOnlyLeft)
 
-  // e/xpected-error@+1{{}}
+  // expected-error@+1{{}}
   _ = readOnlyRight.appending(path: writableLeft)
 
-  // e/xpected-error@+1{{}}
+  // expected-error@+1{{}}
   _ = readOnlyRight.appending(path: referenceLeft)
 
-  // e/xpected-error@+1{{}}
+  // expected-error@+1{{}}
   _ = writableRight.appending(path: readOnlyLeft)
 
-  // e/xpected-error@+1{{}}
+  // expected-error@+1{{}}
   _ = writableRight.appending(path: writableLeft)
 
-  // e/xpected-error@+1{{}}
+  // expected-error@+1{{}}
   _ = writableRight.appending(path: referenceLeft)
 
-  // e/xpected-error@+1{{}}
+  // expected-error@+1{{}}
   _ = referenceRight.appending(path: readOnlyLeft)
 
-  // e/xpected-error@+1{{}}
+  // expected-error@+1{{}}
   _ = referenceRight.appending(path: writableLeft)
 
-  // e/xpected-error@+1{{}}
+  // expected-error@+1{{}}
   _ = referenceRight.appending(path: referenceLeft)
-  */
 }
 
 func partialAppends<T, U, V>(partial: PartialKeyPath<T>,
diff --git a/test/stdlib/KeyPathImplementation.swift b/test/stdlib/KeyPathImplementation.swift
index bbd6b9b..a1d44a9 100644
--- a/test/stdlib/KeyPathImplementation.swift
+++ b/test/stdlib/KeyPathImplementation.swift
@@ -1,17 +1,20 @@
 // RUN: rm -rf %t && mkdir -p %t
-// RUN: %target-build-swift %s -Xfrontend -enable-experimental-keypaths -o %t/a.out
+// RUN: %target-build-swift %s -g -Xfrontend -enable-experimental-keypaths -o %t/a.out
 // RUN: %target-run %t/a.out
 // REQUIRES: executable_test
-// REQUIRES: PTRSIZE=64
-
-// Disabled for now
-// REQUIRES: rdar31776015
-
 
 import StdlibUnittest
 
 var keyPathImpl = TestSuite("key path implementation")
 
+func align<T>(_ offset: Int, to: T.Type) -> Int {
+  let alignMask = MemoryLayout<T>.alignment - 1
+  return (offset + alignMask) & ~alignMask
+}
+
+// FIXME: Object header size will eventually be MemoryLayout<Int>.size * 2
+let classHeaderSize = MemoryLayout<Int>.size + 8
+
 class C<T> {
   var x: Int
   var y: LifetimeTracked?
@@ -22,6 +25,12 @@
     self.y = y
     self.z = z
   }
+
+  static var x_offset: Int { return classHeaderSize }
+  static var y_offset: Int { return x_offset + MemoryLayout<Int>.size }
+  static var z_offset: Int {
+    return align(y_offset + MemoryLayout<LifetimeTracked?>.size, to: T.self)
+  }
 }
 
 struct Point: Equatable {
@@ -37,8 +46,16 @@
   static func ==(a: Point, b: Point) -> Bool {
     return a.x == b.x && a.y == b.y
   }
+
+  static var x_offset: Int {
+    return 0
+  }
+  static var y_offset: Int {
+    return MemoryLayout<Double>.size
+  }
 }
 
+
 struct S<T: Equatable>: Equatable {
   var x: Int
   var y: LifetimeTracked?
@@ -53,6 +70,19 @@
       && a.p == b.p
       && a.c === b.c
   }
+
+  static var x_offset: Int { return 0 }
+  static var y_offset: Int { return MemoryLayout<Int>.size }
+  static var z_offset: Int {
+    return align(y_offset + MemoryLayout<LifetimeTracked?>.size,
+                 to: T.self)
+  }
+  static var p_offset: Int {
+    return align(z_offset + MemoryLayout<T>.size, to: Point.self)
+  }
+  static var c_offset: Int {
+    return p_offset + MemoryLayout<Point>.size
+  }
 }
 
 class Oroborous {
@@ -64,11 +94,16 @@
 struct CratePair<T, U> {
   var left: Crate<T>
   var right: Crate<U>
+
+  static var left_offset: Int { return 0 }
+  static var right_offset: Int { return MemoryLayout<Crate<T>>.size }
 }
 class Crate<T> {
   var value: T
   
   init(value: T) { self.value = value }
+
+  static var value_offset: Int { return align(classHeaderSize, to: T.self) }
 }
 
 // Helper to build keypaths with specific layouts
@@ -175,11 +210,9 @@
   }
 }
 
-// FIXME: Should return Self, but the closure specializer doesn't like that.
-// rdar://problem/31725007
 extension AnyKeyPath {
   static func build(capacityInBytes: Int,
-                withBuilder: (inout TestKeyPathBuilder) -> Void) -> AnyKeyPath {
+                withBuilder: (inout TestKeyPathBuilder) -> Void) -> Self {
     return _create(capacityInBytes: capacityInBytes) {
       var builder = TestKeyPathBuilder(buffer: $0)
       withBuilder(&builder)
@@ -189,48 +222,46 @@
 }
 
 keyPathImpl.test("struct components") {
-  let intSize = MemoryLayout<Int>.size
-  let stringSize = MemoryLayout<String>.size
   let s_x = WritableKeyPath<S<String>, Int>
     .build(capacityInBytes: 8) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addStructComponent(offset: 0)
-    } as! WritableKeyPath<S<String>, Int>
+      $0.addStructComponent(offset: S<String>.x_offset)
+    }
 
   let s_y = WritableKeyPath<S<String>, LifetimeTracked?>
     .build(capacityInBytes: 8) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addStructComponent(offset: intSize)
-    } as! WritableKeyPath<S<String>, LifetimeTracked?>
+      $0.addStructComponent(offset: S<String>.y_offset)
+    }
 
   let s_z = WritableKeyPath<S<String>, String>
     .build(capacityInBytes: 8) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addStructComponent(offset: intSize*2)
-    } as! WritableKeyPath<S<String>, String>
+      $0.addStructComponent(offset: S<String>.z_offset)
+    }
 
   let s_p = WritableKeyPath<S<String>, Point>
     .build(capacityInBytes: 8) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addStructComponent(offset: intSize*2 + stringSize)
-    } as! WritableKeyPath<S<String>, Point>
+      $0.addStructComponent(offset: S<String>.p_offset)
+    }
 
-  let twoComponentSize = 12 + intSize
+  let twoComponentSize = 12 + MemoryLayout<Int>.size
   let s_p_x = WritableKeyPath<S<String>, Double>
     .build(capacityInBytes: twoComponentSize) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addStructComponent(offset: intSize*2 + stringSize)
+      $0.addStructComponent(offset: S<String>.p_offset)
       $0.addType(Point.self)
-      $0.addStructComponent(offset: 0)
-    } as! WritableKeyPath<S<String>, Double>
+      $0.addStructComponent(offset: Point.x_offset)
+    }
 
   let s_p_y = WritableKeyPath<S<String>, Double>
     .build(capacityInBytes: twoComponentSize) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addStructComponent(offset: intSize*2 + stringSize)
+      $0.addStructComponent(offset: S<String>.p_offset)
       $0.addType(Point.self)
-      $0.addStructComponent(offset: MemoryLayout<Double>.size)
-    } as! WritableKeyPath<S<String>, Double>
+      $0.addStructComponent(offset: Point.y_offset)
+    }
 
 
   // \("") forces the string to be computed at runtime (and therefore allocated)
@@ -299,26 +330,23 @@
 }
 
 keyPathImpl.test("class components") {
-  let intSize = MemoryLayout<Int>.size
-  let classHeaderSize = intSize * 2
-  
   let c_x = ReferenceWritableKeyPath<C<String>, Int>
     .build(capacityInBytes: 8) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addClassComponent(offset: classHeaderSize)
-    } as! ReferenceWritableKeyPath<C<String>, Int>
+      $0.addClassComponent(offset: C<String>.x_offset)
+    }
 
   let c_y = ReferenceWritableKeyPath<C<String>, LifetimeTracked?>
     .build(capacityInBytes: 8) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addClassComponent(offset: classHeaderSize + intSize)
-    } as! ReferenceWritableKeyPath<C<String>, LifetimeTracked?>
+      $0.addClassComponent(offset: C<String>.y_offset)
+    }
 
   let c_z = ReferenceWritableKeyPath<C<String>, String>
     .build(capacityInBytes: 8) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addClassComponent(offset: classHeaderSize + 2*intSize)
-    } as! ReferenceWritableKeyPath<C<String>, String>
+      $0.addClassComponent(offset: C<String>.z_offset)
+    }
 
   let c = C(x: 679, y: nil, z: "buffalo\("")")
   let value = c
@@ -365,37 +393,32 @@
 }
 
 keyPathImpl.test("reference prefix") {
-  let intSize = MemoryLayout<Int>.size
-  let stringSize = MemoryLayout<String>.size
-  let pointSize = MemoryLayout<Point>.size
-  let classHeaderSize = intSize * 2
-
   let s_c_x = ReferenceWritableKeyPath<S<String>, Int>
-    .build(capacityInBytes: 12 + intSize) {
+    .build(capacityInBytes: 12 + MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: true)
-      $0.addStructComponent(offset: intSize*2 + stringSize + pointSize,
+      $0.addStructComponent(offset: S<String>.c_offset,
                             endsReferencePrefix: true)
       $0.addType(C<String>.self)
-      $0.addClassComponent(offset: classHeaderSize)
-    } as! ReferenceWritableKeyPath<S<String>, Int>
+      $0.addClassComponent(offset: C<String>.x_offset)
+    }
 
   let s_c_y = ReferenceWritableKeyPath<S<String>, LifetimeTracked?>
-    .build(capacityInBytes: 12 + intSize) {
+    .build(capacityInBytes: 12 + MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: true)
-      $0.addStructComponent(offset: intSize*2 + stringSize + pointSize,
+      $0.addStructComponent(offset: S<String>.c_offset,
                             endsReferencePrefix: true)
       $0.addType(C<String>.self)
-      $0.addClassComponent(offset: classHeaderSize + intSize)
-    } as! ReferenceWritableKeyPath<S<String>, LifetimeTracked?>
+      $0.addClassComponent(offset: C<String>.y_offset)
+    }
 
   let s_c_z = ReferenceWritableKeyPath<S<String>, String>
-    .build(capacityInBytes: 12 + intSize) {
+    .build(capacityInBytes: 12 + MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: true)
-      $0.addStructComponent(offset: intSize*2 + stringSize + pointSize,
+      $0.addStructComponent(offset: S<String>.c_offset,
                             endsReferencePrefix: true)
       $0.addType(C<String>.self)
-      $0.addClassComponent(offset: classHeaderSize + 2*intSize)
-    } as! ReferenceWritableKeyPath<S<String>, String>
+      $0.addClassComponent(offset: C<String>.z_offset)
+    }
   
   let c = C(x: 679, y: nil, z: "buffalo\("")")
   let value = S(x: 1738, y: nil, z: "bottles of beer\("")",
@@ -460,23 +483,19 @@
 }
 
 keyPathImpl.test("overflowed offsets") {
-  let intSize = MemoryLayout<Int>.size
-  let stringSize = MemoryLayout<String>.size
-  let classHeaderSize = intSize * 2
-
   let s_p = WritableKeyPath<S<String>, Point>
     .build(capacityInBytes: 12) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addStructComponent(offset: intSize*2 + stringSize,
+      $0.addStructComponent(offset: S<String>.p_offset,
                             forceOverflow: true)
-    } as! WritableKeyPath<S<String>, Point>
+    }
 
   let c_z = ReferenceWritableKeyPath<C<String>, String>
     .build(capacityInBytes: 12) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addClassComponent(offset: classHeaderSize + 2*intSize,
+      $0.addClassComponent(offset: C<String>.z_offset,
                            forceOverflow: true)
-    } as! ReferenceWritableKeyPath<C<String>, String>
+    }
   
   let c = C(x: 679, y: LifetimeTracked(42), z: "buffalo\("")")
   var sValue = S(x: 1738, y: LifetimeTracked(43),
@@ -496,49 +515,43 @@
 }
 
 keyPathImpl.test("equality") {
-  let intSize = MemoryLayout<Int>.size
-  let stringSize = MemoryLayout<String>.size
-  let ssSize = MemoryLayout<S<S<String>>>.size
-  let pointSize = MemoryLayout<Point>.size
-  let classHeaderSize = intSize * 2
-
   let s_c_z_p_x = ReferenceWritableKeyPath<S<S<String>>, Double>
-    .build(capacityInBytes: 20 + 3 * intSize) {
+    .build(capacityInBytes: 20 + 3 * MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: true)
       // S<S<String>>.c
-      $0.addStructComponent(offset: intSize*2 + ssSize + pointSize,
+      $0.addStructComponent(offset: S<S<String>>.c_offset,
                             endsReferencePrefix: true)
       $0.addType(C<S<String>>.self)
       // C<S<String>>.z
-      $0.addClassComponent(offset: classHeaderSize + intSize*2)
+      $0.addClassComponent(offset: C<S<String>>.z_offset)
       $0.addType(S<String>.self)
       // S<String>.p
-      $0.addStructComponent(offset: intSize*2 + stringSize)
+      $0.addStructComponent(offset: S<String>.p_offset)
       $0.addType(Point.self)
       // Point.x
-      $0.addStructComponent(offset: 0)
-    } as! ReferenceWritableKeyPath<S<S<String>>, Double>
+      $0.addStructComponent(offset: Point.x_offset)
+    }
 
   expectEqual(s_c_z_p_x, s_c_z_p_x)
   expectEqual(s_c_z_p_x.hashValue, s_c_z_p_x.hashValue)
 
   // Structurally equivalent to s_c_z_p_x
   let s_c_z_p_x_2 = ReferenceWritableKeyPath<S<S<String>>, Double>
-    .build(capacityInBytes: 20 + 3 * intSize) {
+    .build(capacityInBytes: 20 + 3 * MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: true)
       // S<S<String>>.c
-      $0.addStructComponent(offset: intSize*2 + ssSize + pointSize,
+      $0.addStructComponent(offset: S<S<String>>.c_offset,
                             endsReferencePrefix: true)
       $0.addType(C<S<String>>.self)
       // C<S<String>>.z
-      $0.addClassComponent(offset: classHeaderSize + intSize*2)
+      $0.addClassComponent(offset: C<S<String>>.z_offset)
       $0.addType(S<String>.self)
       // S<String>.p
-      $0.addStructComponent(offset: intSize*2 + stringSize)
+      $0.addStructComponent(offset: S<String>.p_offset)
       $0.addType(Point.self)
       // Point.x
-      $0.addStructComponent(offset: 0)
-    } as! ReferenceWritableKeyPath<S<S<String>>, Double>
+      $0.addStructComponent(offset: Point.x_offset)
+    }
 
   expectEqual(s_c_z_p_x, s_c_z_p_x_2)
   expectEqual(s_c_z_p_x.hashValue, s_c_z_p_x_2.hashValue)
@@ -548,25 +561,25 @@
 
   // Structurally equivalent, force-overflowed offset components
   let s_c_z_p_x_3 = ReferenceWritableKeyPath<S<S<String>>, Double>
-    .build(capacityInBytes: 36 + 3 * intSize) {
+    .build(capacityInBytes: 36 + 3 * MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: true)
       // S<S<String>>.c
-      $0.addStructComponent(offset: intSize*2 + ssSize + pointSize,
+      $0.addStructComponent(offset: S<S<String>>.c_offset,
                             forceOverflow: true,
                             endsReferencePrefix: true)
       $0.addType(C<S<String>>.self)
       // C<S<String>>.z
-      $0.addClassComponent(offset: classHeaderSize + intSize*2,
+      $0.addClassComponent(offset: C<S<String>>.z_offset,
                            forceOverflow: true)
       $0.addType(S<String>.self)
       // S<String>.p
-      $0.addStructComponent(offset: intSize*2 + stringSize,
+      $0.addStructComponent(offset: S<String>.p_offset,
                             forceOverflow: true)
       $0.addType(Point.self)
       // Point.x
-      $0.addStructComponent(offset: 0,
+      $0.addStructComponent(offset: Point.x_offset,
                             forceOverflow: true)
-    } as! ReferenceWritableKeyPath<S<S<String>>, Double>
+    }
 
   expectEqual(s_c_z_p_x, s_c_z_p_x_3)
   expectEqual(s_c_z_p_x.hashValue, s_c_z_p_x_3.hashValue)
@@ -576,79 +589,79 @@
 
   // Same path type, different suffixes
   let s_c_z_p_y = ReferenceWritableKeyPath<S<S<String>>, Double>
-    .build(capacityInBytes: 20 + 3 * intSize) {
+    .build(capacityInBytes: 20 + 3 * MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: true)
       // S<S<String>>.c
-      $0.addStructComponent(offset: intSize*2 + ssSize + pointSize,
+      $0.addStructComponent(offset: S<S<String>>.c_offset,
                             endsReferencePrefix: true)
       $0.addType(C<S<String>>.self)
       // C<S<String>>.z
-      $0.addClassComponent(offset: classHeaderSize + intSize*2)
+      $0.addClassComponent(offset: C<S<String>>.z_offset)
       $0.addType(S<String>.self)
       // S<String>.p
-      $0.addStructComponent(offset: intSize*2 + stringSize)
+      $0.addStructComponent(offset: S<String>.p_offset)
       $0.addType(Point.self)
       // Point.y
-      $0.addStructComponent(offset: 8)
-    } as! ReferenceWritableKeyPath<S<S<String>>, Double>
+      $0.addStructComponent(offset: Point.y_offset)
+    }
 
   expectNotEqual(s_c_z_p_x, s_c_z_p_y)
   expectNotEqual(s_c_z_p_y, s_c_z_p_x)
 
   // Different path type
   let s_c_z_p = ReferenceWritableKeyPath<S<S<String>>, Point>
-    .build(capacityInBytes: 16 + 2 * intSize) {
+    .build(capacityInBytes: 16 + 2 * MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: true)
       // S<S<String>>.c
-      $0.addStructComponent(offset: intSize*2 + ssSize + pointSize,
+      $0.addStructComponent(offset: S<S<String>>.c_offset,
                             endsReferencePrefix: true)
       $0.addType(C<S<String>>.self)
       // C<S<String>>.z
-      $0.addClassComponent(offset: classHeaderSize + intSize*2)
+      $0.addClassComponent(offset: C<S<String>>.z_offset)
       $0.addType(S<String>.self)
       // S<String>.p
-      $0.addStructComponent(offset: intSize*2 + stringSize)
-    } as! ReferenceWritableKeyPath<S<S<String>>, Point>
+      $0.addStructComponent(offset: S<String>.p_offset)
+    }
 
   expectNotEqual(s_c_z_p_x, s_c_z_p)
   expectNotEqual(s_c_z_p, s_c_z_p_x)
 
   // Same path, no reference prefix
   let s_c_z_p_x_readonly = KeyPath<S<S<String>>, Double>
-    .build(capacityInBytes: 20 + 3 * intSize) {
+    .build(capacityInBytes: 20 + 3 * MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
       // S<S<String>>.c
-      $0.addStructComponent(offset: intSize*2 + ssSize + pointSize)
+      $0.addStructComponent(offset: S<S<String>>.c_offset)
       $0.addType(C<S<String>>.self)
       // C<S<String>>.z
-      $0.addClassComponent(offset: classHeaderSize + intSize*2)
+      $0.addClassComponent(offset: C<S<String>>.z_offset)
       $0.addType(S<String>.self)
       // S<String>.p
-      $0.addStructComponent(offset: intSize*2 + stringSize)
+      $0.addStructComponent(offset: S<String>.p_offset)
       $0.addType(Point.self)
       // Point.x
-      $0.addStructComponent(offset: 0)
-    } as! KeyPath<S<S<String>>, Double>
+      $0.addStructComponent(offset: Point.x_offset)
+    }
 
   expectNotEqual(s_c_z_p_x, s_c_z_p_x_readonly)
   expectNotEqual(s_c_z_p_x_readonly, s_c_z_p_x)
 
   // Same path type, different paths
   let s_p_y_readonly = KeyPath<S<S<String>>, Double>
-    .build(capacityInBytes: 12 + intSize) {
+    .build(capacityInBytes: 12 + MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
       // S<S<String>>.p
-      $0.addStructComponent(offset: intSize*2 + ssSize)
+      $0.addStructComponent(offset: S<S<String>>.p_offset)
       $0.addType(Point.self)
       // Point.y
-      $0.addStructComponent(offset: 8)
-    } as! KeyPath<S<S<String>>, Double>
+      $0.addStructComponent(offset: Point.y_offset)
+    }
 
   expectNotEqual(s_p_y_readonly, s_c_z_p_x_readonly)
   expectNotEqual(s_c_z_p_x_readonly, s_p_y_readonly)
 
   let o_o_o_o = ReferenceWritableKeyPath<Oroborous, Oroborous>
-    .build(capacityInBytes: 16 + 2*intSize) {
+    .build(capacityInBytes: 16 + 2*MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
       // O.o
       $0.addClassComponent(offset: classHeaderSize)
@@ -658,11 +671,11 @@
       $0.addType(Oroborous.self)
       // O.o
       $0.addClassComponent(offset: classHeaderSize)
-    } as! ReferenceWritableKeyPath<Oroborous, Oroborous>
+    }
 
   // Different reference prefix length
   let o_o_o_o_rp1 = ReferenceWritableKeyPath<Oroborous, Oroborous>
-    .build(capacityInBytes: 16 + 2*intSize) {
+    .build(capacityInBytes: 16 + 2*MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: true)
       // O.o
       $0.addClassComponent(offset: classHeaderSize,
@@ -673,9 +686,9 @@
       $0.addType(Oroborous.self)
       // O.o
       $0.addClassComponent(offset: classHeaderSize)
-    } as! ReferenceWritableKeyPath<Oroborous, Oroborous>
+    }
   let o_o_o_o_rp2 = ReferenceWritableKeyPath<Oroborous, Oroborous>
-    .build(capacityInBytes: 16 + 2*intSize) {
+    .build(capacityInBytes: 16 + 2*MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: true)
       // O.o
       $0.addClassComponent(offset: classHeaderSize)
@@ -686,9 +699,9 @@
       $0.addType(Oroborous.self)
       // O.o
       $0.addClassComponent(offset: classHeaderSize)
-    } as! ReferenceWritableKeyPath<Oroborous, Oroborous>
+    }
   let o_o_o_o_rp2_2 = ReferenceWritableKeyPath<Oroborous, Oroborous>
-    .build(capacityInBytes: 16 + 2*intSize) {
+    .build(capacityInBytes: 16 + 2*MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: true)
       // O.o
       $0.addClassComponent(offset: classHeaderSize)
@@ -699,7 +712,7 @@
       $0.addType(Oroborous.self)
       // O.o
       $0.addClassComponent(offset: classHeaderSize)
-    } as! ReferenceWritableKeyPath<Oroborous, Oroborous>
+    }
 
   expectNotEqual(o_o_o_o, o_o_o_o_rp1)
   expectNotEqual(o_o_o_o_rp1, o_o_o_o)
@@ -716,36 +729,30 @@
 
   // Same type, different length of components with same prefix
   let o_o_o = ReferenceWritableKeyPath<Oroborous, Oroborous>
-    .build(capacityInBytes: 12 + intSize) {
+    .build(capacityInBytes: 12 + MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
       // O.o
       $0.addClassComponent(offset: classHeaderSize)
       $0.addType(Oroborous.self)
       // O.o
       $0.addClassComponent(offset: classHeaderSize)
-    } as! ReferenceWritableKeyPath<Oroborous, Oroborous>
+    }
 
   expectNotEqual(o_o_o, o_o_o_o)
   expectNotEqual(o_o_o_o, o_o_o)
 }
 
 keyPathImpl.test("appending") {
-  let intSize = MemoryLayout<Int>.size
-  let stringSize = MemoryLayout<String>.size
-  let pointSize = MemoryLayout<Point>.size
-  let ssSize = MemoryLayout<S<String>>.size
-  let classHeaderSize = intSize * 2
-
   let s_p = WritableKeyPath<S<String>, Point>
     .build(capacityInBytes: 8) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addStructComponent(offset: intSize*2 + stringSize)
-    } as! WritableKeyPath<S<String>, Point>
+      $0.addStructComponent(offset: S<String>.p_offset)
+    }
   let p_y = WritableKeyPath<Point, Double>
     .build(capacityInBytes: 8) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addStructComponent(offset: 8)
-    } as! WritableKeyPath<Point, Double>
+      $0.addStructComponent(offset: Point.y_offset)
+    }
   
   let s_p_y = s_p.appending(path: p_y)
 
@@ -765,12 +772,12 @@
   expectEqual(s_p_y.hashValue, s_p_y2.hashValue)
   
   let s_p_y_manual = WritableKeyPath<S<String>, Double>
-    .build(capacityInBytes: 12 + intSize) {
+    .build(capacityInBytes: 12 + MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addStructComponent(offset: intSize*2 + stringSize)
+      $0.addStructComponent(offset: S<String>.p_offset)
       $0.addType(Point.self)
-      $0.addStructComponent(offset: 8)
-    } as! WritableKeyPath<S<String>, Double>
+      $0.addStructComponent(offset: Point.y_offset)
+    }
   expectEqual(s_p_y, s_p_y_manual)
   expectEqual(s_p_y_manual, s_p_y)
   expectEqual(s_p_y.hashValue, s_p_y_manual.hashValue)
@@ -778,8 +785,8 @@
   let c_z = ReferenceWritableKeyPath<C<S<String>>, S<String>>
     .build(capacityInBytes: 8) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addClassComponent(offset: classHeaderSize + 2*intSize)
-    } as! ReferenceWritableKeyPath<C<S<String>>, S<String>>
+      $0.addClassComponent(offset: C<S<String>>.z_offset)
+    }
   
   let value2 = C(x: 17, y: LifetimeTracked(38), z: value)
   
@@ -792,14 +799,14 @@
   expectEqual(value2.z.p.x, 0.5)
   
   let c_z_p_y_manual = ReferenceWritableKeyPath<C<S<String>>, Double>
-    .build(capacityInBytes: 16 + intSize * 2) {
+    .build(capacityInBytes: 16 + MemoryLayout<Int>.size * 2) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addClassComponent(offset: classHeaderSize + 2*intSize)
+      $0.addClassComponent(offset: C<S<String>>.z_offset)
       $0.addType(S<String>.self)
-      $0.addStructComponent(offset: intSize*2 + stringSize)
+      $0.addStructComponent(offset: S<String>.p_offset)
       $0.addType(Point.self)
-      $0.addStructComponent(offset: 8)
-    } as! ReferenceWritableKeyPath<C<S<String>>, Double>
+      $0.addStructComponent(offset: Point.y_offset)
+    }
   
   expectEqual(c_z_p_y, c_z_p_y_manual)
   expectEqual(c_z_p_y_manual, c_z_p_y)
@@ -808,8 +815,8 @@
   let s_c = WritableKeyPath<S<S<String>>, C<S<String>>>
     .build(capacityInBytes: 8) {
       $0.addHeader(trivial: true, hasReferencePrefix: false)
-      $0.addStructComponent(offset: intSize*2 + ssSize + pointSize)
-    } as! WritableKeyPath<S<S<String>>, C<S<String>>>
+      $0.addStructComponent(offset: S<S<String>>.c_offset)
+    }
   
   let s_c_z_p_y = s_c.appending(path: c_z_p_y)
   
@@ -821,17 +828,17 @@
   expectEqual(value2[keyPath: c_z_p_y], 11.0)
   
   let s_c_z_p_y_manual = ReferenceWritableKeyPath<S<S<String>>, Double>
-    .build(capacityInBytes: 20 + intSize * 3) {
+    .build(capacityInBytes: 20 + MemoryLayout<Int>.size * 3) {
       $0.addHeader(trivial: true, hasReferencePrefix: true)
-      $0.addStructComponent(offset: intSize*2 + ssSize + pointSize,
+      $0.addStructComponent(offset: S<S<String>>.c_offset,
                             endsReferencePrefix: true)
       $0.addType(C<S<String>>.self)
-      $0.addClassComponent(offset: classHeaderSize + 2*intSize)
+      $0.addClassComponent(offset: C<S<String>>.z_offset)
       $0.addType(S<String>.self)
-      $0.addStructComponent(offset: intSize*2 + stringSize)
+      $0.addStructComponent(offset: S<String>.p_offset)
       $0.addType(Point.self)
-      $0.addStructComponent(offset: 8)
-    } as! ReferenceWritableKeyPath<S<S<String>>, Double>
+      $0.addStructComponent(offset: Point.y_offset)
+    }
   
   expectEqual(s_c_z_p_y, s_c_z_p_y_manual)
   expectEqual(s_c_z_p_y_manual, s_c_z_p_y)
@@ -839,13 +846,13 @@
   
   typealias CP = CratePair<S<S<String>>, Int>
   let cratePair_left_value = ReferenceWritableKeyPath<CP, S<S<String>>>
-    .build(capacityInBytes: 12 + intSize) {
+    .build(capacityInBytes: 12 + MemoryLayout<Int>.size) {
       $0.addHeader(trivial: true, hasReferencePrefix: true)
-      $0.addStructComponent(offset: 0,
+      $0.addStructComponent(offset: CratePair<S<S<String>>, Int>.left_offset,
                             endsReferencePrefix: true)
       $0.addType(Crate<S<S<String>>>.self)
-      $0.addClassComponent(offset: classHeaderSize)
-    } as! ReferenceWritableKeyPath<CP, S<S<String>>>
+      $0.addClassComponent(offset: Crate<S<S<String>>>.value_offset)
+    }
   
   let cratePair_left_value_c_z_p_y
     = cratePair_left_value.appending(path: s_c_z_p_y)
@@ -861,21 +868,21 @@
 
   let cratePair_left_value_c_z_p_y_manual
     = ReferenceWritableKeyPath<CP, Double>
-      .build(capacityInBytes: 28 + 5*intSize) {
+      .build(capacityInBytes: 28 + 5*MemoryLayout<Int>.size) {
         $0.addHeader(trivial: true, hasReferencePrefix: true)
-        $0.addStructComponent(offset: 0)
+        $0.addStructComponent(offset: CP.left_offset)
         $0.addType(Crate<S<S<String>>>.self)
-        $0.addClassComponent(offset: classHeaderSize)
+        $0.addClassComponent(offset: Crate<S<S<String>>>.value_offset)
         $0.addType(S<S<String>>.self)
-        $0.addStructComponent(offset: intSize*2 + ssSize + pointSize,
+        $0.addStructComponent(offset: S<S<String>>.c_offset,
                               endsReferencePrefix: true)
         $0.addType(C<S<String>>.self)
-        $0.addClassComponent(offset: classHeaderSize + 2*intSize)
+        $0.addClassComponent(offset: C<S<String>>.z_offset)
         $0.addType(S<String>.self)
-        $0.addStructComponent(offset: intSize*2 + stringSize)
+        $0.addStructComponent(offset: S<String>.p_offset)
         $0.addType(Point.self)
-        $0.addStructComponent(offset: 8)
-      } as! ReferenceWritableKeyPath<CP, Double>
+        $0.addStructComponent(offset: Point.y_offset)
+      }
   expectEqual(cratePair_left_value_c_z_p_y,
               cratePair_left_value_c_z_p_y_manual)
   expectEqual(cratePair_left_value_c_z_p_y_manual,
diff --git a/test/stdlib/KeyPathObjC.swift b/test/stdlib/KeyPathObjC.swift
index 8eaeeca..e90e1d0 100644
--- a/test/stdlib/KeyPathObjC.swift
+++ b/test/stdlib/KeyPathObjC.swift
@@ -2,12 +2,8 @@
 // RUN: %target-build-swift %s -Xfrontend -enable-experimental-keypaths -o %t/a.out
 // RUN: %target-run %t/a.out
 // REQUIRES: executable_test
-// REQUIRES: PTRSIZE=64
 // REQUIRES: objc_interop
 
-// Disabled for now
-// REQUIRES: rdar31776015
-
 import StdlibUnittest
 import Foundation
 
@@ -33,22 +29,22 @@
 var testKVCStrings = TestSuite("KVC strings")
 
 testKVCStrings.test("KVC strings") {
-  expectEqual((#keyPath2(NonObjC, .x))._kvcKeyPathString, nil)
-  expectEqual((#keyPath2(NonObjC, .y))._kvcKeyPathString, nil)
-  expectEqual((#keyPath2(Foo, .int))._kvcKeyPathString, "int")
-  expectEqual((#keyPath2(Foo, .bar))._kvcKeyPathString, "bar")
-  expectEqual((#keyPath2(Foo, .bar.foo))._kvcKeyPathString, "bar.foo")
-  expectEqual((#keyPath2(Foo, .bar.foo.bar))._kvcKeyPathString, "bar.foo.bar")
-  expectEqual((#keyPath2(Foo, .nonobjc))._kvcKeyPathString, nil)
-  expectEqual((#keyPath2(Foo, .bar.foo.nonobjc.y))._kvcKeyPathString, nil)
-  expectEqual((#keyPath2(Foo, .differentName))._kvcKeyPathString, "thisIsADifferentName")
-  expectEqual((#keyPath2(Bar, .foo))._kvcKeyPathString, "foo")
+  expectEqual((\NonObjC.x)._kvcKeyPathString, nil)
+  expectEqual((\NonObjC.y)._kvcKeyPathString, nil)
+  expectEqual((\Foo.int)._kvcKeyPathString, "int")
+  expectEqual((\Foo.bar)._kvcKeyPathString, "bar")
+  expectEqual((\Foo.bar.foo)._kvcKeyPathString, "bar.foo")
+  expectEqual((\Foo.bar.foo.bar)._kvcKeyPathString, "bar.foo.bar")
+  expectEqual((\Foo.nonobjc)._kvcKeyPathString, nil)
+  expectEqual((\Foo.bar.foo.nonobjc.y)._kvcKeyPathString, nil)
+  expectEqual((\Foo.differentName)._kvcKeyPathString, "thisIsADifferentName")
+  expectEqual((\Bar.foo)._kvcKeyPathString, "foo")
 
-  let foo_bar = #keyPath2(Foo, .bar)
-  let foo_nonobjc = #keyPath2(Foo, .nonobjc)
-  let bar_foo = #keyPath2(Bar, .foo)
+  let foo_bar = \Foo.bar
+  let foo_nonobjc = \Foo.nonobjc
+  let bar_foo = \Bar.foo
 
-  let nonobjc_y = #keyPath2(NonObjC, .y)
+  let nonobjc_y = \NonObjC.y
 
   do {
     let foo_bar_foo = foo_bar.appending(path: bar_foo)
diff --git a/test/stdlib/MixedTypeArithmeticsDiagnostics3.swift b/test/stdlib/MixedTypeArithmeticsDiagnostics3.swift
index 65112e5..6f17761 100644
--- a/test/stdlib/MixedTypeArithmeticsDiagnostics3.swift
+++ b/test/stdlib/MixedTypeArithmeticsDiagnostics3.swift
@@ -33,3 +33,9 @@
     x += (42 as Int)
   }
 }
+
+func radar31909031() {
+  let x = UInt64()
+  let y = UInt64()
+  _ = (x - y) < UInt64(42) // should not produce a mixed-type warning
+}
diff --git a/test/stdlib/MixedTypeArithmeticsDiagnostics4.swift b/test/stdlib/MixedTypeArithmeticsDiagnostics4.swift
index 793dfd5..9024ac2 100644
--- a/test/stdlib/MixedTypeArithmeticsDiagnostics4.swift
+++ b/test/stdlib/MixedTypeArithmeticsDiagnostics4.swift
@@ -33,3 +33,9 @@
     x += (42 as Int)
   }
 }
+
+func radar31909031() {
+  let x = UInt64()
+  let y = UInt64()
+  _ = (x - y) < UInt64(42) // should not produce a mixed-type warning
+}
diff --git a/test/stdlib/NSNumberBridging.swift.gyb b/test/stdlib/NSNumberBridging.swift.gyb
deleted file mode 100644
index 1a6e3e1..0000000
--- a/test/stdlib/NSNumberBridging.swift.gyb
+++ /dev/null
@@ -1,162 +0,0 @@
-//===--- NSNumberBridging.swift - Test bridging through NSNumber ----------===//
-//
-// This source file is part of the Swift.org open source project
-//
-// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
-// Licensed under Apache License v2.0 with Runtime Library Exception
-//
-// See https://swift.org/LICENSE.txt for license information
-// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
-//
-//===----------------------------------------------------------------------===//
-// RUN: rm -rf %t  &&  mkdir -p %t
-// RUN: %gyb %s -o %t/NSValueBridging.swift
-// RUN: %target-build-swift -g -module-name a %t/NSValueBridging.swift -o %t.out
-// RUN: %target-run %t.out
-// REQUIRES: executable_test
-// REQUIRES: objc_interop
-
-
-import StdlibUnittest
-import Foundation
-import CoreGraphics
-
-var nsNumberBridging = TestSuite("NSNumberBridging")
-
-func expectBridgeToNSNumber<T>(_ value: T,
-                               nsNumberInitializer: (T) -> NSNumber,
-                               nsNumberGetter: (NSNumber) -> T,
-                               equal: (T, T) -> Bool) {
-  let object = value as AnyObject
-  let nsNumber = object as! NSNumber
-
-  expectEqual(nsNumberInitializer(value), nsNumber)
-  expectTrue(equal(value, nsNumberGetter(nsNumber)))
-  expectTrue(equal(value, nsNumberGetter(nsNumberInitializer(value))))
-
-  expectTrue(equal(value, object as! T))
-}
-
-%{
-bridgedFixedPointTypes = [
-  #Type     accessor   signed
-  ("Int",    "int",    True),
-  ("Int64",  "int64",  True),
-  ("Int32",  "int32",  True),
-  ("Int16",  "int16",  True),
-  ("Int8",   "int8",   True),
-  ("UInt",   "uint",   False),
-  ("UInt64", "uint64", False),
-  ("UInt32", "uint32", False),
-  ("UInt16", "uint16", False),
-  ("UInt8",  "uint8",  False),
-]
-}%
-
-extension Int64 {
-  init(truncatingBitPattern: UInt64) {
-    self = Int64(bitPattern: truncatingBitPattern)
-  }
-}
-extension UInt64 {
-  init(truncatingBitPattern: UInt64) {
-    self = truncatingBitPattern
-  }
-}
-
-% for Type, accessor, isSigned in bridgedFixedPointTypes:
-
-nsNumberBridging.test("${Type}") {
-  for value in [
-    0, 1, ${Type}.min, ${Type}.max,
-    ${Type}(truncatingBitPattern: 0x1122_3344_5566_7788 as UInt64),
-% if isSigned:
-    -1,
-    -${Type}(truncatingBitPattern: 0x1122_3344_5566_7788 as UInt64),
-% end
-  ] {
-    expectBridgeToNSNumber(value,
-                           nsNumberInitializer: { NSNumber(value: $0) },
-                           nsNumberGetter: { $0.${accessor}Value },
-                           equal: (==))
-  }
-}
-
-% end
-
-func floatsAreEquivalent(_ x: Float, _ y: Float) -> Bool {
-  return x.bitPattern == y.bitPattern
-}
-func floatsAreEquivalent(_ x: Double, _ y: Double) -> Bool {
-  return x.bitPattern == y.bitPattern
-}
-
-%{
-bridgedFloatTypes = [
-  #Type       accessor
-  ("Float",   "float"),
-  ("Double",  "double"),
-]
-}%
-
-% for Type, accessor in bridgedFloatTypes:
-
-nsNumberBridging.test("${Type}") {
-  for value in [
-    0, -0, 1, -1,
-    ${Type}.leastNonzeroMagnitude,
-    ${Type}.leastNormalMagnitude,
-    ${Type}.greatestFiniteMagnitude,
-    ${Type}.infinity,
-    -${Type}.leastNonzeroMagnitude,
-    -${Type}.leastNormalMagnitude,
-    -${Type}.greatestFiniteMagnitude,
-    -${Type}.infinity,
-    ${Type}.nan,
-  ] {
-    expectBridgeToNSNumber(value,
-                           nsNumberInitializer: { NSNumber(value: $0) },
-                           nsNumberGetter: { $0.${accessor}Value },
-                           equal: floatsAreEquivalent)
-  }
-}
-
-% end
-
-%{
-allBridgedTypes = [type_name for type_name, _, _ in bridgedFixedPointTypes] + \
-                  [type_name for type_name, _ in bridgedFloatTypes]
-}%
-
-% for AType in allBridgedTypes:
-
-nsNumberBridging.test("${AType} bridged casting") {
-  let original: ${AType} = 17
-  let originalAny = original as Any
-  let bridgedAny = original as AnyObject as Any
-  expectEqual(original,        bridgedAny as! ${AType})
-  expectEqual(.some(original), bridgedAny as? ${AType})
-  expectEqual(original,        originalAny as! ${AType})
-  expectEqual(.some(original), originalAny as? ${AType})
-
-  let nsNumber = NSNumber(value: original)
-  expectEqual(nsNumber,        bridgedAny as! NSNumber)
-  expectEqual(.some(nsNumber), bridgedAny as? NSNumber)
-  expectEqual(nsNumber,        originalAny as! NSNumber)
-  expectEqual(.some(nsNumber), originalAny as? NSNumber)
-}
-
-%   for BType in allBridgedTypes:
-%     if AType != BType:
-nsNumberBridging.test("${AType} to ${BType} casting fails") {
-  let original: ${AType} = 0
-  let bridged = original as AnyObject as Any
-  expectEqual(.none, bridged as? ${BType})
-  expectCrashLater()
-  _ = bridged as! ${BType}
-}
-%     end
-%   end
-% end
-
-runAllTests()
diff --git a/test/stdlib/RuntimeObjC.swift b/test/stdlib/RuntimeObjC.swift
index 055b937..40fc1a9 100644
--- a/test/stdlib/RuntimeObjC.swift
+++ b/test/stdlib/RuntimeObjC.swift
@@ -334,47 +334,54 @@
 protocol ProtocolB {}
 
 Runtime.test("Generic class ObjC runtime names") {
-  expectEqual("_T01a12GenericClassCySiGD",
+  expectEqual("_TtGC1a12GenericClassSi_",
               NSStringFromClass(GenericClass<Int>.self))
-  expectEqual("_T01a12GenericClassCyAA11PlainStructVGD",
+  expectEqual("_TtGC1a12GenericClassVS_11PlainStruct_",
               NSStringFromClass(GenericClass<PlainStruct>.self))
-  expectEqual("_T01a12GenericClassCyAA9PlainEnumOGD",
+  expectEqual("_TtGC1a12GenericClassOS_9PlainEnum_",
               NSStringFromClass(GenericClass<PlainEnum>.self))
-  expectEqual("_T01a12GenericClassCyAA11PlainStructV_AA0C4EnumOAEtGD",
+  expectEqual("_TtGC1a12GenericClassTVS_11PlainStructOS_9PlainEnumS1___",
               NSStringFromClass(GenericClass<(PlainStruct, PlainEnum, PlainStruct)>.self))
-  expectEqual("_T01a12GenericClassCyAA11PlainStructVmGD",
+  expectEqual("_TtGC1a12GenericClassMVS_11PlainStruct_",
               NSStringFromClass(GenericClass<PlainStruct.Type>.self))
-  expectEqual("_T01a12GenericClassCyAA11PlainStructVAEmcGD",
+  expectEqual("_TtGC1a12GenericClassFMVS_11PlainStructS1__",
               NSStringFromClass(GenericClass<(PlainStruct.Type) -> PlainStruct>.self))
 
-  expectEqual("_T01a12GenericClassCyAA11PlainStructVAEmKcGD",
+  expectEqual("_TtGC1a12GenericClassFzMVS_11PlainStructS1__",
               NSStringFromClass(GenericClass<(PlainStruct.Type) throws -> PlainStruct>.self))
-  expectEqual("_T01a12GenericClassCySiAA11PlainStructV_AA0C4EnumOztcGD",
+  expectEqual("_TtGC1a12GenericClassFTVS_11PlainStructROS_9PlainEnum_Si_",
               NSStringFromClass(GenericClass<(PlainStruct, inout PlainEnum) -> Int>.self))
 
-  expectEqual("_T01a12GenericClassCyAA9ProtocolA_pGD",
+  expectEqual("_TtGC1a12GenericClassPS_9ProtocolA__",
               NSStringFromClass(GenericClass<ProtocolA>.self))
-  expectEqual("_T01a12GenericClassCyAA9ProtocolA_AA0C1BpGD",
+  expectEqual("_TtGC1a12GenericClassPS_9ProtocolAS_9ProtocolB__",
               NSStringFromClass(GenericClass<ProtocolA & ProtocolB>.self))
-  expectEqual("_T01a12GenericClassCyAA9ProtocolA_AA0C1BpXpGD",
+  expectEqual("_TtGC1a12GenericClassPMPS_9ProtocolAS_9ProtocolB__",
               NSStringFromClass(GenericClass<(ProtocolA & ProtocolB).Type>.self))
-  expectEqual("_T01a12GenericClassCyAA9ProtocolA_AA0C1BpmGD",
+  expectEqual("_TtGC1a12GenericClassMPS_9ProtocolAS_9ProtocolB__",
               NSStringFromClass(GenericClass<(ProtocolB & ProtocolA).Protocol>.self))
 
-  expectEqual("_T01a12GenericClassCySo7CFArrayCGD",
+  expectEqual("_TtGC1a12GenericClassCSo7CFArray_",
               NSStringFromClass(GenericClass<CFArray>.self))
-  expectEqual("_T01a12GenericClassCySo7DecimalVGD",
+  expectEqual("_TtGC1a12GenericClassVSC7Decimal_",
               NSStringFromClass(GenericClass<Decimal>.self))
-  expectEqual("_T01a12GenericClassCySo8NSObjectCGD",
+  expectEqual("_TtGC1a12GenericClassCSo8NSObject_",
               NSStringFromClass(GenericClass<NSObject>.self))
-  expectEqual("_T01a12GenericClassCySo8NSObjectCGD",
+  expectEqual("_TtGC1a12GenericClassCSo8NSObject_",
               NSStringFromClass(GenericClass<NSObject>.self))
-  expectEqual("_T01a12GenericClassCySo9NSCopying_pGD",
+  expectEqual("_TtGC1a12GenericClassPSo9NSCopying__",
               NSStringFromClass(GenericClass<NSCopying>.self))
-  expectEqual("_T01a12GenericClassCySo9NSCopying_AA9ProtocolAAA0D1BpGD",
+  expectEqual("_TtGC1a12GenericClassPSo9NSCopyingS_9ProtocolAS_9ProtocolB__",
               NSStringFromClass(GenericClass<ProtocolB & NSCopying & ProtocolA>.self))
 
-  expectEqual("_T01a17MultiGenericClassCyAA0B6StructVySiGAA0B4EnumOyAHySiGGGD",
+  expectEqual("_TtGC1a12GenericClassXcCS_9SomeClassS_9ProtocolA__",
+              NSStringFromClass(GenericClass<ProtocolA & SomeClass>.self))
+  expectEqual("_TtGC1a12GenericClassPS_9ProtocolAs9AnyObject__",
+              NSStringFromClass(GenericClass<ProtocolA & AnyObject>.self))
+  expectEqual("_TtGC1a12GenericClassPs9AnyObject__",
+              NSStringFromClass(GenericClass<AnyObject>.self))
+
+  expectEqual("_TtGC1a17MultiGenericClassGVS_13GenericStructSi_GOS_11GenericEnumGS2_Si___",
               NSStringFromClass(MultiGenericClass<GenericStruct<Int>,
                                                   GenericEnum<GenericEnum<Int>>>.self))
 }
@@ -751,8 +758,8 @@
   dump(optionalURL, to: &output)
 
   let expected =
-    "▿ Optional(Swift.Unmanaged<__C.CFURL>(_value: http://llvm.org/))\n" +
-    "  ▿ some: Swift.Unmanaged<__C.CFURL>\n" +
+    "▿ Optional(Swift.Unmanaged<__ObjC.CFURL>(_value: http://llvm.org/))\n" +
+    "  ▿ some: Swift.Unmanaged<__ObjC.CFURL>\n" +
     "    - _value: http://llvm.org/ #0\n" +
     "      - super: NSObject\n"
 
diff --git a/test/stdlib/StringAPI.swift b/test/stdlib/StringAPI.swift
index 0624019..9811c07 100644
--- a/test/stdlib/StringAPI.swift
+++ b/test/stdlib/StringAPI.swift
@@ -362,9 +362,12 @@
 }
 
 StringTests.test("String.init(_:String)") {
-  let _: String = String("" as String) // should compile without ambiguities
+  var s = String("")
+  expectType(String.self, &s)
+  var _ = String("") as String? // should also compile, but not be the default
 }
 
+
 StringTests.test("[String].joined() -> String") {
   let s = ["hello", "world"].joined()
   _ = s == "" // should compile without error
diff --git a/test/stdlib/StringFlatMap.swift b/test/stdlib/StringFlatMap.swift
new file mode 100644
index 0000000..82d8cd0
--- /dev/null
+++ b/test/stdlib/StringFlatMap.swift
@@ -0,0 +1,42 @@
+// RUN: rm -rf %t ; mkdir -p %t
+// RUN: %target-build-swift %s -o %t/a.out3 -swift-version 3 && %target-run %t/a.out3
+// RUN: %target-build-swift %s -o %t/a.out4 -swift-version 4 && %target-run %t/a.out4
+
+import StdlibUnittest
+
+#if swift(>=4)
+
+public typealias ExpectedResultType = [Character]
+
+#else
+
+public typealias ExpectedResultType = [String]
+
+#endif
+
+var Tests = TestSuite("StringFlatMap")
+
+Tests.test("DefaultReturnType") {
+  var result = ["hello", "world"].flatMap { $0 }
+  expectType(ExpectedResultType.self, &result)
+}
+
+Tests.test("ExplicitTypeContext") {
+  expectEqualSequence(["hello", "world"],
+    ["hello", "world"].flatMap { $0 } as [String])
+  expectEqualSequence("helloworld".characters,
+    ["hello", "world"].flatMap { $0 } as [Character])
+}
+
+Tests.test("inference") {
+  let result = [1, 2].flatMap { x in
+    if String(x) == "foo" {
+      return "bar"
+    } else {
+      return nil
+    }
+  }
+  expectEqualSequence([], result)
+}
+
+runAllTests()
diff --git a/test/stdlib/TestAffineTransform.swift b/test/stdlib/TestAffineTransform.swift
index 041a532..bd94f3c 100644
--- a/test/stdlib/TestAffineTransform.swift
+++ b/test/stdlib/TestAffineTransform.swift
@@ -364,6 +364,10 @@
         expectNotEqual(anyHashables[0], anyHashables[1])
         expectEqual(anyHashables[1], anyHashables[2])
     }
+
+    func test_unconditionallyBridgeFromObjectiveC() {
+        expectEqual(AffineTransform(), AffineTransform._unconditionallyBridgeFromObjectiveC(nil))
+    }
 }
 
 #if !FOUNDATION_XCTEST
@@ -386,6 +390,7 @@
 AffineTransformTests.test("test_hashing_values") { TestAffineTransform().test_hashing_values() }
 AffineTransformTests.test("test_AnyHashableContainingAffineTransform") { TestAffineTransform().test_AnyHashableContainingAffineTransform() }
 AffineTransformTests.test("test_AnyHashableCreatedFromNSAffineTransform") { TestAffineTransform().test_AnyHashableCreatedFromNSAffineTransform() }
+AffineTransformTests.test("test_unconditionallyBridgeFromObjectiveC") { TestAffineTransform().test_unconditionallyBridgeFromObjectiveC() }
 runAllTests()
 #endif
     
diff --git a/test/stdlib/TestCharacterSet.swift b/test/stdlib/TestCharacterSet.swift
index 23ce196..6cc0248 100644
--- a/test/stdlib/TestCharacterSet.swift
+++ b/test/stdlib/TestCharacterSet.swift
@@ -301,6 +301,10 @@
         #endif
         */
     }
+
+    func test_unconditionallyBridgeFromObjectiveC() {
+        expectEqual(CharacterSet(), CharacterSet._unconditionallyBridgeFromObjectiveC(nil))
+    }
 }
 
 #if !FOUNDATION_XCTEST
@@ -325,6 +329,7 @@
 CharacterSetTests.test("test_bitmap") { TestCharacterSet().test_bitmap() }
 CharacterSetTests.test("test_setOperationsOfEmptySet") { TestCharacterSet().test_setOperationsOfEmptySet() }
 CharacterSetTests.test("test_moreSetOperations") { TestCharacterSet().test_moreSetOperations() }
+CharacterSetTests.test("test_unconditionallyBridgeFromObjectiveC") { TestCharacterSet().test_unconditionallyBridgeFromObjectiveC() }
 runAllTests()
 #endif
 
diff --git a/test/stdlib/TestData.swift b/test/stdlib/TestData.swift
index 178e23e..c29bdc6 100644
--- a/test/stdlib/TestData.swift
+++ b/test/stdlib/TestData.swift
@@ -1004,6 +1004,10 @@
         expectEqual(found[0], 2)
         expectEqual(found[1], 3)
     }
+  
+    func test_unconditionallyBridgeFromObjectiveC() {
+        expectEqual(Data(), Data._unconditionallyBridgeFromObjectiveC(nil))
+    }
 }
 
 #if !FOUNDATION_XCTEST
@@ -1054,6 +1058,7 @@
 DataTests.test("test_replaceSubrange") { TestData().test_replaceSubrange() }
 DataTests.test("test_sliceWithUnsafeBytes") { TestData().test_sliceWithUnsafeBytes() }
 DataTests.test("test_sliceIteration") { TestData().test_sliceIteration() }
+DataTests.test("test_unconditionallyBridgeFromObjectiveC") { TestData().test_unconditionallyBridgeFromObjectiveC() }
 
 // XCTest does not have a crash detection, whereas lit does
 DataTests.test("bounding failure subdata") {
diff --git a/test/stdlib/TestDate.swift b/test/stdlib/TestDate.swift
index 66a0ac8..6cc426c 100644
--- a/test/stdlib/TestDate.swift
+++ b/test/stdlib/TestDate.swift
@@ -190,6 +190,10 @@
         expectNotEqual(anyHashables[0], anyHashables[1])
         expectEqual(anyHashables[1], anyHashables[2])
     }
+
+    func test_dateComponents_unconditionallyBridgeFromObjectiveC() {
+        expectEqual(DateComponents(), DateComponents._unconditionallyBridgeFromObjectiveC(nil))
+    }
 }
 
 #if !FOUNDATION_XCTEST
@@ -206,5 +210,6 @@
 DateTests.test("test_AnyHashableCreatedFromNSDate") { TestDate().test_AnyHashableCreatedFromNSDate() }
 DateTests.test("test_AnyHashableContainingDateComponents") { TestDate().test_AnyHashableContainingDateComponents() }
 DateTests.test("test_AnyHashableCreatedFromNSDateComponents") { TestDate().test_AnyHashableCreatedFromNSDateComponents() }
+DateTests.test("test_dateComponents_unconditionallyBridgeFromObjectiveC") { TestDate().test_dateComponents_unconditionallyBridgeFromObjectiveC() }
 runAllTests()
 #endif
diff --git a/test/stdlib/TestDecimal.swift b/test/stdlib/TestDecimal.swift
new file mode 100644
index 0000000..591f46c
--- /dev/null
+++ b/test/stdlib/TestDecimal.swift
@@ -0,0 +1,609 @@
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+//
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+//
+// RUN: %target-clang %S/Inputs/FoundationBridge/FoundationBridge.m -c -o %t/FoundationBridgeObjC.o -g
+// RUN: %target-build-swift %s -I %S/Inputs/FoundationBridge/ -Xlinker %t/FoundationBridgeObjC.o -o %t/TestDecimal
+
+// RUN: %target-run %t/TestDecimal > %t.txt
+// REQUIRES: executable_test
+// REQUIRES: objc_interop
+
+import Foundation
+import FoundationBridgeObjC
+
+#if FOUNDATION_XCTEST
+    import XCTest
+    class TestDecimalSuper : XCTestCase { }
+#else
+    import StdlibUnittest
+    class TestDecimalSuper { }
+#endif
+
+class TestDecimal : TestDecimalSuper {
+    func test_AdditionWithNormalization() {
+        
+        let biggie = Decimal(65536)
+        let smallee = Decimal(65536)
+        let answer = biggie/smallee
+        expectEqual(Decimal(1),answer)
+        
+        var one = Decimal(1)
+        var addend = Decimal(1)
+        var expected = Decimal()
+        var result = Decimal()
+        
+        expected._isNegative = 0;
+        expected._isCompact = 0;
+        
+        // 2 digits -- certain to work
+        addend._exponent = -1;
+        expectEqual(.noError, NSDecimalAdd(&result, &one, &addend, .plain), "1 + 0.1")
+        expected._exponent = -1;
+        expected._length = 1;
+        expected._mantissa.0 = 11;
+        expectEqual(.orderedSame, NSDecimalCompare(&expected, &result), "1.1 == 1 + 0.1")
+        
+        // 38 digits -- guaranteed by NSDecimal to work
+        addend._exponent = -37;
+        expectEqual(.noError, NSDecimalAdd(&result, &one, &addend, .plain), "1 + 1e-37")
+        expected._exponent = -37;
+        expected._length = 8;
+        expected._mantissa.0 = 0x0001;
+        expected._mantissa.1 = 0x0000;
+        expected._mantissa.2 = 0x36a0;
+        expected._mantissa.3 = 0x00f4;
+        expected._mantissa.4 = 0x46d9;
+        expected._mantissa.5 = 0xd5da;
+        expected._mantissa.6 = 0xee10;
+        expected._mantissa.7 = 0x0785;
+        expectEqual(.orderedSame, NSDecimalCompare(&expected, &result), "1 + 1e-37")
+        
+        // 39 digits -- not guaranteed to work but it happens to, so we make the test work either way
+        addend._exponent = -38;
+        let error = NSDecimalAdd(&result, &one, &addend, .plain)
+        expectTrue(error == .noError || error == .lossOfPrecision, "1 + 1e-38")
+        if error == .noError {
+            expected._exponent = -38;
+            expected._length = 8;
+            expected._mantissa.0 = 0x0001;
+            expected._mantissa.1 = 0x0000;
+            expected._mantissa.2 = 0x2240;
+            expected._mantissa.3 = 0x098a;
+            expected._mantissa.4 = 0xc47a;
+            expected._mantissa.5 = 0x5a86;
+            expected._mantissa.6 = 0x4ca8;
+            expected._mantissa.7 = 0x4b3b;
+            expectEqual(.orderedSame, NSDecimalCompare(&expected, &result), "1 + 1e-38")
+        } else {
+            expectEqual(.orderedSame, NSDecimalCompare(&one, &result), "1 + 1e-38")
+        }
+        
+        // 40 digits -- doesn't work; need to make sure it's rounding for us
+        addend._exponent = -39;
+        expectEqual(.lossOfPrecision, NSDecimalAdd(&result, &one, &addend, .plain), "1 + 1e-39")
+        expectEqual("1", result.description)
+        expectEqual(.orderedSame, NSDecimalCompare(&one, &result), "1 + 1e-39")
+    }
+
+    func test_BasicConstruction() {
+        let zero = Decimal()
+        expectEqual(20, MemoryLayout<Decimal>.size)
+        expectEqual(0, zero._exponent)
+        expectEqual(0, zero._length)
+        expectEqual(0, zero._isNegative)
+        expectEqual(0, zero._isCompact)
+        expectEqual(0, zero._reserved)
+        let (m0, m1, m2, m3, m4, m5, m6, m7) = zero._mantissa
+        expectEqual(0, m0)
+        expectEqual(0, m1)
+        expectEqual(0, m2)
+        expectEqual(0, m3)
+        expectEqual(0, m4)
+        expectEqual(0, m5)
+        expectEqual(0, m6)
+        expectEqual(0, m7)
+        expectEqual(8, NSDecimalMaxSize)
+        expectEqual(32767, NSDecimalNoScale)
+        expectFalse(zero.isNormal)
+        expectTrue(zero.isFinite)
+        expectTrue(zero.isZero)
+        expectFalse(zero.isSubnormal)
+        expectFalse(zero.isInfinite)
+        expectFalse(zero.isNaN)
+        expectFalse(zero.isSignaling)
+    }
+    func test_Constants() {
+        expectEqual(8, NSDecimalMaxSize)
+        expectEqual(32767, NSDecimalNoScale)
+        let smallest = Decimal(_exponent: 127, _length: 8, _isNegative: 1, _isCompact: 1, _reserved: 0, _mantissa: (UInt16.max, UInt16.max, UInt16.max, UInt16.max, UInt16.max, UInt16.max, UInt16.max, UInt16.max))
+        expectEqual(smallest, Decimal.leastFiniteMagnitude)
+        let biggest = Decimal(_exponent: 127, _length: 8, _isNegative: 0, _isCompact: 1, _reserved: 0, _mantissa: (UInt16.max, UInt16.max, UInt16.max, UInt16.max, UInt16.max, UInt16.max, UInt16.max, UInt16.max))
+        expectEqual(biggest, Decimal.greatestFiniteMagnitude)
+        let leastNormal = Decimal(_exponent: -127, _length: 1, _isNegative: 0, _isCompact: 1, _reserved: 0, _mantissa: (1, 0, 0, 0, 0, 0, 0, 0))
+        expectEqual(leastNormal, Decimal.leastNormalMagnitude)
+        let leastNonzero = Decimal(_exponent: -127, _length: 1, _isNegative: 0, _isCompact: 1, _reserved: 0, _mantissa: (1, 0, 0, 0, 0, 0, 0, 0))
+        expectEqual(leastNonzero, Decimal.leastNonzeroMagnitude)
+        let pi = Decimal(_exponent: -38, _length: 8, _isNegative: 0, _isCompact: 1, _reserved: 0, _mantissa: (0x6623, 0x7d57, 0x16e7, 0xad0d, 0xaf52, 0x4641, 0xdfa7, 0xec58))
+        expectEqual(pi, Decimal.pi)
+        expectEqual(10, Decimal.radix)
+        expectTrue(Decimal().isCanonical)
+        expectFalse(Decimal().isSignalingNaN)
+        expectFalse(Decimal.nan.isSignalingNaN)
+        expectTrue(Decimal.nan.isNaN)
+        expectEqual(.quietNaN, Decimal.nan.floatingPointClass)
+        expectEqual(.positiveZero, Decimal().floatingPointClass)
+        expectEqual(.negativeNormal, smallest.floatingPointClass)
+        expectEqual(.positiveNormal, biggest.floatingPointClass)
+        expectFalse(Double.nan.isFinite)
+        expectFalse(Double.nan.isInfinite)
+    }
+
+    func test_Description() {
+        expectEqual("0", Decimal().description)
+        expectEqual("0", Decimal(0).description)
+        expectEqual("10", Decimal(_exponent: 1, _length: 1, _isNegative: 0, _isCompact: 1, _reserved: 0, _mantissa: (1, 0, 0, 0, 0, 0, 0, 0)).description)
+        expectEqual("10", Decimal(10).description)
+        expectEqual("123.458", Decimal(_exponent: -3, _length: 2, _isNegative: 0, _isCompact:1, _reserved: 0, _mantissa: (57922, 1, 0, 0, 0, 0, 0, 0)).description)
+        expectEqual("123.458", Decimal(123.458).description)
+        expectEqual("123", Decimal(UInt8(123)).description)
+        expectEqual("45", Decimal(Int8(45)).description)
+        expectEqual("3.14159265358979323846264338327950288419", Decimal.pi.description)
+        expectEqual("-30000000000", Decimal(sign: .minus, exponent: 10, significand: Decimal(3)).description)
+        expectEqual("300000", Decimal(sign: .plus, exponent: 5, significand: Decimal(3)).description)
+        expectEqual("5", Decimal(signOf: Decimal(3), magnitudeOf: Decimal(5)).description)
+        expectEqual("-5", Decimal(signOf: Decimal(-3), magnitudeOf: Decimal(5)).description)
+        expectEqual("5", Decimal(signOf: Decimal(3), magnitudeOf: Decimal(-5)).description)
+        expectEqual("-5", Decimal(signOf: Decimal(-3), magnitudeOf: Decimal(-5)).description)
+    }
+
+    func test_ExplicitConstruction() {
+        var explicit = Decimal(
+            _exponent: 0x17f,
+            _length: 0xff,
+            _isNegative: 3,
+            _isCompact: 4,
+            _reserved: UInt32(1<<18 + 1<<17 + 1),
+            _mantissa: (6, 7, 8, 9, 10, 11, 12, 13)
+        )
+        expectEqual(0x7f, explicit._exponent)
+        expectEqual(0x7f, explicit.exponent)
+        expectEqual(0x0f, explicit._length)
+        expectEqual(1, explicit._isNegative)
+        expectEqual(FloatingPointSign.minus, explicit.sign)
+        expectTrue(explicit.isSignMinus)
+        expectEqual(0, explicit._isCompact)
+        expectEqual(UInt32(1<<17 + 1), explicit._reserved)
+        let (m0, m1, m2, m3, m4, m5, m6, m7) = explicit._mantissa
+        expectEqual(6, m0)
+        expectEqual(7, m1)
+        expectEqual(8, m2)
+        expectEqual(9, m3)
+        expectEqual(10, m4)
+        expectEqual(11, m5)
+        expectEqual(12, m6)
+        expectEqual(13, m7)
+        explicit._isCompact = 5
+        explicit._isNegative = 6
+        expectEqual(0, explicit._isNegative)
+        expectEqual(1, explicit._isCompact)
+        expectEqual(FloatingPointSign.plus, explicit.sign)
+        expectFalse(explicit.isSignMinus)
+        expectTrue(explicit.isNormal)
+        
+        let significand = explicit.significand
+        expectEqual(0, significand._exponent)
+        expectEqual(0, significand.exponent)
+        expectEqual(0x0f, significand._length)
+        expectEqual(0, significand._isNegative)
+        expectEqual(1, significand._isCompact)
+        expectEqual(0, significand._reserved)
+        let (sm0, sm1, sm2, sm3, sm4, sm5, sm6, sm7) = significand._mantissa
+        expectEqual(6, sm0)
+        expectEqual(7, sm1)
+        expectEqual(8, sm2)
+        expectEqual(9, sm3)
+        expectEqual(10, sm4)
+        expectEqual(11, sm5)
+        expectEqual(12, sm6)
+        expectEqual(13, sm7)
+        
+        let ulp = explicit.ulp
+        expectEqual(0x7f, ulp.exponent)
+        expectEqual(8, ulp._length)
+        expectEqual(0, ulp._isNegative)
+        expectEqual(1, ulp._isCompact)
+        expectEqual(0, ulp._reserved)
+        expectEqual(1, ulp._mantissa.0)
+        expectEqual(0, ulp._mantissa.1)
+        expectEqual(0, ulp._mantissa.2)
+        expectEqual(0, ulp._mantissa.3)
+        expectEqual(0, ulp._mantissa.4)
+        expectEqual(0, ulp._mantissa.5)
+        expectEqual(0, ulp._mantissa.6)
+        expectEqual(0, ulp._mantissa.7)
+    }
+
+    func test_Maths() {
+        for i in -2...10 {
+            for j in 0...5 {
+                expectEqual(Decimal(i*j), Decimal(i) * Decimal(j), "\(Decimal(i*j)) == \(i) * \(j)")
+                expectEqual(Decimal(i+j), Decimal(i) + Decimal(j), "\(Decimal(i+j)) == \(i)+\(j)")
+                expectEqual(Decimal(i-j), Decimal(i) - Decimal(j), "\(Decimal(i-j)) == \(i)-\(j)")
+                if j != 0 {
+                    let approximation = Decimal(Double(i)/Double(j))
+                    let answer = Decimal(i) / Decimal(j)
+                    let answerDescription = answer.description
+                    let approximationDescription = approximation.description
+                    var failed: Bool = false
+                    var count = 0
+                    let SIG_FIG = 14
+                    for (a, b) in zip(answerDescription.characters, approximationDescription.characters) {
+                        if a != b {
+                            failed = true
+                            break
+                        }
+                        if count == 0 && (a == "-" || a == "0" || a == ".") {
+                            continue // don't count these as significant figures
+                        }
+                        if count >= SIG_FIG {
+                            break
+                        }
+                        count += 1
+                    }
+                    expectFalse(failed, "\(Decimal(i/j)) == \(i)/\(j)")
+                }
+            }
+        }
+    }
+
+    func test_Misc() {
+        expectEqual(.minus, Decimal(-5.2).sign)
+        expectEqual(.plus, Decimal(5.2).sign)
+        var d = Decimal(5.2)
+        expectEqual(.plus, d.sign)
+        d.negate()
+        expectEqual(.minus, d.sign)
+        d.negate()
+        expectEqual(.plus, d.sign)
+        expectTrue(Decimal(3.5).isEqual(to: Decimal(3.5)))
+        expectTrue(Decimal.nan.isEqual(to: Decimal.nan))
+        expectTrue(Decimal(1.28).isLess(than: Decimal(2.24)))
+        expectFalse(Decimal(2.28).isLess(than: Decimal(2.24)))
+        expectTrue(Decimal(1.28).isTotallyOrdered(belowOrEqualTo: Decimal(2.24)))
+        expectFalse(Decimal(2.28).isTotallyOrdered(belowOrEqualTo: Decimal(2.24)))
+        expectTrue(Decimal(1.2).isTotallyOrdered(belowOrEqualTo: Decimal(1.2)))
+        expectTrue(Decimal.nan.isEqual(to: Decimal.nan))
+        expectTrue(Decimal.nan.isLess(than: Decimal(0)))
+        expectFalse(Decimal.nan.isLess(than: Decimal.nan))
+        expectTrue(Decimal.nan.isLessThanOrEqualTo(Decimal(0)))
+        expectTrue(Decimal.nan.isLessThanOrEqualTo(Decimal.nan))
+        expectFalse(Decimal.nan.isTotallyOrdered(belowOrEqualTo: Decimal.nan))
+        expectFalse(Decimal.nan.isTotallyOrdered(belowOrEqualTo: Decimal(2.3)))
+        expectTrue(Decimal(2) < Decimal(3))
+        expectTrue(Decimal(3) > Decimal(2))
+        expectEqual(Decimal(-9), Decimal(1) - Decimal(10))
+        expectEqual(Decimal(3), Decimal(2).nextUp)
+        expectEqual(Decimal(2), Decimal(3).nextDown)
+        expectEqual(Decimal(-476), Decimal(1024).distance(to: Decimal(1500)))
+        expectEqual(Decimal(68040), Decimal(386).advanced(by: Decimal(67654)))
+        expectEqual(Decimal(1.234), abs(Decimal(1.234)))
+        expectEqual(Decimal(1.234), abs(Decimal(-1.234)))
+        var a = Decimal(1234)
+        expectEqual(.noError, NSDecimalMultiplyByPowerOf10(&a, &a, 1, .plain))
+        expectEqual(Decimal(12340), a)
+        a = Decimal(1234)
+        expectEqual(.noError, NSDecimalMultiplyByPowerOf10(&a, &a, 2, .plain))
+        expectEqual(Decimal(123400), a)
+        expectEqual(.overflow, NSDecimalMultiplyByPowerOf10(&a, &a, 128, .plain))
+        expectTrue(a.isNaN)
+        a = Decimal(1234)
+        expectEqual(.noError, NSDecimalMultiplyByPowerOf10(&a, &a, -2, .plain))
+        expectEqual(Decimal(12.34), a)
+        expectEqual(.underflow, NSDecimalMultiplyByPowerOf10(&a, &a, -128, .plain))
+        expectTrue(a.isNaN)
+        a = Decimal(1234)
+        expectEqual(.noError, NSDecimalPower(&a, &a, 0, .plain))
+        expectEqual(Decimal(1), a)
+        a = Decimal(8)
+        expectEqual(.noError, NSDecimalPower(&a, &a, 2, .plain))
+        expectEqual(Decimal(64), a)
+        a = Decimal(-2)
+        expectEqual(.noError, NSDecimalPower(&a, &a, 3, .plain))
+        expectEqual(Decimal(-8), a)
+        for i in -2...10 {
+            for j in 0...5 {
+                var actual = Decimal(i)
+                expectEqual(.noError, NSDecimalPower(&actual, &actual, j, .plain))
+                let expected = Decimal(pow(Double(i), Double(j)))
+                expectEqual(expected, actual, "\(actual) == \(i)^\(j)")
+            }
+        }
+    }
+
+    func test_MultiplicationOverflow() {
+        var multiplicand = Decimal(_exponent: 0, _length: 8, _isNegative: 0, _isCompact: 0, _reserved: 0, _mantissa: ( 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff ))
+        
+        var result = Decimal()
+        var multiplier = Decimal(1)
+        
+        multiplier._mantissa.0 = 2
+        
+        expectEqual(.noError, NSDecimalMultiply(&result, &multiplicand, &multiplier, .plain), "2 * max mantissa")
+        expectEqual(.noError, NSDecimalMultiply(&result, &multiplier, &multiplicand, .plain), "max mantissa * 2")
+        
+        multiplier._exponent = 0x7f
+        expectEqual(.overflow, NSDecimalMultiply(&result, &multiplicand, &multiplier, .plain), "2e127 * max mantissa")
+        expectEqual(.overflow, NSDecimalMultiply(&result, &multiplier, &multiplicand, .plain), "max mantissa * 2e127")
+    }
+
+    func test_NaNInput() {
+        var NaN = Decimal.nan
+        var one = Decimal(1)
+        var result = Decimal()
+        
+        expectNotEqual(.noError, NSDecimalAdd(&result, &NaN, &one, .plain))
+        expectTrue(NSDecimalIsNotANumber(&result), "NaN + 1")
+        expectNotEqual(.noError, NSDecimalAdd(&result, &one, &NaN, .plain))
+        expectTrue(NSDecimalIsNotANumber(&result), "1 + NaN")
+        
+        expectNotEqual(.noError, NSDecimalSubtract(&result, &NaN, &one, .plain))
+        expectTrue(NSDecimalIsNotANumber(&result), "NaN - 1")
+        expectNotEqual(.noError, NSDecimalSubtract(&result, &one, &NaN, .plain))
+        expectTrue(NSDecimalIsNotANumber(&result), "1 - NaN")
+        
+        expectNotEqual(.noError, NSDecimalMultiply(&result, &NaN, &one, .plain))
+        expectTrue(NSDecimalIsNotANumber(&result), "NaN * 1")
+        expectNotEqual(.noError, NSDecimalMultiply(&result, &one, &NaN, .plain))
+        expectTrue(NSDecimalIsNotANumber(&result), "1 * NaN")
+        
+        expectNotEqual(.noError, NSDecimalDivide(&result, &NaN, &one, .plain))
+        expectTrue(NSDecimalIsNotANumber(&result), "NaN / 1")
+        expectNotEqual(.noError, NSDecimalDivide(&result, &one, &NaN, .plain))
+        expectTrue(NSDecimalIsNotANumber(&result), "1 / NaN")
+        
+        expectNotEqual(.noError, NSDecimalPower(&result, &NaN, 0, .plain))
+        expectTrue(NSDecimalIsNotANumber(&result), "NaN ^ 0")
+        expectNotEqual(.noError, NSDecimalPower(&result, &NaN, 4, .plain))
+        expectTrue(NSDecimalIsNotANumber(&result), "NaN ^ 4")
+        expectNotEqual(.noError, NSDecimalPower(&result, &NaN, 5, .plain))
+        expectTrue(NSDecimalIsNotANumber(&result), "NaN ^ 5")
+        
+        expectNotEqual(.noError, NSDecimalMultiplyByPowerOf10(&result, &NaN, 0, .plain))
+        expectTrue(NSDecimalIsNotANumber(&result), "NaN e0")
+        expectNotEqual(.noError, NSDecimalMultiplyByPowerOf10(&result, &NaN, 4, .plain))
+        expectTrue(NSDecimalIsNotANumber(&result), "NaN e4")
+        expectNotEqual(.noError, NSDecimalMultiplyByPowerOf10(&result, &NaN, 5, .plain))
+        expectTrue(NSDecimalIsNotANumber(&result), "NaN e5")
+    }
+
+    func test_NegativeAndZeroMultiplication() {
+        var one = Decimal(1)
+        var zero = Decimal(0)
+        var negativeOne = Decimal(-1)
+        
+        var result = Decimal()
+        
+        expectEqual(.noError, NSDecimalMultiply(&result, &one, &one, .plain), "1 * 1")
+        expectEqual(.orderedSame, NSDecimalCompare(&one, &result), "1 * 1")
+        
+        expectEqual(.noError, NSDecimalMultiply(&result, &one, &negativeOne, .plain), "1 * -1")
+        expectEqual(.orderedSame, NSDecimalCompare(&negativeOne, &result), "1 * -1")
+        
+        expectEqual(.noError, NSDecimalMultiply(&result, &negativeOne, &one, .plain), "-1 * 1")
+        expectEqual(.orderedSame, NSDecimalCompare(&negativeOne, &result), "-1 * 1")
+        
+        expectEqual(.noError, NSDecimalMultiply(&result, &negativeOne, &negativeOne, .plain), "-1 * -1")
+        expectEqual(.orderedSame, NSDecimalCompare(&one, &result), "-1 * -1")
+        
+        expectEqual(.noError, NSDecimalMultiply(&result, &one, &zero, .plain), "1 * 0")
+        expectEqual(.orderedSame, NSDecimalCompare(&zero, &result), "1 * 0")
+        expectEqual(0, result._isNegative, "1 * 0")
+        
+        expectEqual(.noError, NSDecimalMultiply(&result, &zero, &one, .plain), "0 * 1")
+        expectEqual(.orderedSame, NSDecimalCompare(&zero, &result), "0 * 1")
+        expectEqual(0, result._isNegative, "0 * 1")
+        
+        expectEqual(.noError, NSDecimalMultiply(&result, &negativeOne, &zero, .plain), "-1 * 0")
+        expectEqual(.orderedSame, NSDecimalCompare(&zero, &result), "-1 * 0")
+        expectEqual(0, result._isNegative, "-1 * 0")
+        
+        expectEqual(.noError, NSDecimalMultiply(&result, &zero, &negativeOne, .plain), "0 * -1")
+        expectEqual(.orderedSame, NSDecimalCompare(&zero, &result), "0 * -1")
+        expectEqual(0, result._isNegative, "0 * -1")
+    }
+
+    func test_Normalize() {
+        var one = Decimal(1)
+        var ten = Decimal(-10)
+        expectEqual(.noError, NSDecimalNormalize(&one, &ten, .plain))
+        expectEqual(Decimal(1), one)
+        expectEqual(Decimal(-10), ten)
+        expectEqual(1, one._length)
+        expectEqual(1, ten._length)
+        one = Decimal(1)
+        ten = Decimal(10)
+        expectEqual(.noError, NSDecimalNormalize(&one, &ten, .plain))
+        expectEqual(Decimal(1), one)
+        expectEqual(Decimal(10), ten)
+        expectEqual(1, one._length)
+        expectEqual(1, ten._length)
+    }
+
+    func test_NSDecimal() {
+        var nan = Decimal.nan
+        expectTrue(NSDecimalIsNotANumber(&nan))
+        var zero = Decimal()
+        expectFalse(NSDecimalIsNotANumber(&zero))
+        var three = Decimal(3)
+        var guess = Decimal()
+        NSDecimalCopy(&guess, &three)
+        expectEqual(three, guess)
+        
+        var f = Decimal(_exponent: 0, _length: 2, _isNegative: 0, _isCompact: 0, _reserved: 0, _mantissa: (0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000))
+        let before = f.description
+        expectEqual(0, f._isCompact)
+        NSDecimalCompact(&f)
+        expectEqual(1, f._isCompact)
+        let after = f.description
+        expectEqual(before, after)
+    }
+
+    func test_RepeatingDivision()  {
+        let repeatingNumerator = Decimal(16)
+        let repeatingDenominator = Decimal(9)
+        let repeating = repeatingNumerator / repeatingDenominator
+        
+        let numerator = Decimal(1010)
+        var result = numerator / repeating
+        
+        var expected = Decimal()
+        expected._exponent = -35;
+        expected._length = 8;
+        expected._isNegative = 0;
+        expected._isCompact = 1;
+        expected._reserved = 0;
+        expected._mantissa.0 = 51946;
+        expected._mantissa.1 = 3;
+        expected._mantissa.2 = 15549;
+        expected._mantissa.3 = 55864;
+        expected._mantissa.4 = 57984;
+        expected._mantissa.5 = 55436;
+        expected._mantissa.6 = 45186;
+        expected._mantissa.7 = 10941;
+        
+        expectEqual(.orderedSame, NSDecimalCompare(&expected, &result), "568.12500000000000000000000000000248554: \(expected.description) != \(result.description)");
+    }
+
+    func test_Round() {
+        let testCases = [
+            // expected, start, scale, round
+            ( 0, 0.5, 0, Decimal.RoundingMode.down ),
+            ( 1, 0.5, 0, Decimal.RoundingMode.up ),
+            ( 2, 2.5, 0, Decimal.RoundingMode.bankers ),
+            ( 4, 3.5, 0, Decimal.RoundingMode.bankers ),
+            ( 5, 5.2, 0, Decimal.RoundingMode.plain ),
+            ( 4.5, 4.5, 1, Decimal.RoundingMode.down ),
+            ( 5.5, 5.5, 1, Decimal.RoundingMode.up ),
+            ( 6.5, 6.5, 1, Decimal.RoundingMode.plain ),
+            ( 7.5, 7.5, 1, Decimal.RoundingMode.bankers ),
+            
+            ( -1, -0.5, 0, Decimal.RoundingMode.down ),
+            ( -2, -2.5, 0, Decimal.RoundingMode.up ),
+            ( -3, -2.5, 0, Decimal.RoundingMode.bankers ),
+            ( -4, -3.5, 0, Decimal.RoundingMode.bankers ),
+            ( -5, -5.2, 0, Decimal.RoundingMode.plain ),
+            ( -4.5, -4.5, 1, Decimal.RoundingMode.down ),
+            ( -5.5, -5.5, 1, Decimal.RoundingMode.up ),
+            ( -6.5, -6.5, 1, Decimal.RoundingMode.plain ),
+            ( -7.5, -7.5, 1, Decimal.RoundingMode.bankers ),
+            ]
+        for testCase in testCases {
+            let (expected, start, scale, mode) = testCase
+            var num = Decimal(start)
+            NSDecimalRound(&num, &num, scale, mode)
+            expectEqual(Decimal(expected), num)
+            let numnum = NSDecimalNumber(decimal:Decimal(start))
+            let behavior = NSDecimalNumberHandler(roundingMode: mode, scale: Int16(scale), raiseOnExactness: false, raiseOnOverflow: true, raiseOnUnderflow: true, raiseOnDivideByZero: true)
+            let result = numnum.rounding(accordingToBehavior:behavior)
+            expectEqual(Double(expected), result.doubleValue)
+        }
+    }
+
+    func test_ScanDecimal() {
+        let testCases = [
+            // expected, value
+            ( 123.456e78, "123.456e78" ),
+            ( -123.456e78, "-123.456e78" ),
+            ( 123.456, " 123.456 " ),
+            ( 3.14159, " 3.14159e0" ),
+            ( 3.14159, " 3.14159e-0" ),
+            ( 0.314159, " 3.14159e-1" ),
+            ( 3.14159, " 3.14159e+0" ),
+            ( 31.4159, " 3.14159e+1" ),
+            ( 12.34, " 01234e-02"),
+            ]
+        for testCase in testCases {
+            let (expected, string) = testCase
+            let decimal = Decimal(string:string)!
+            let aboutOne = Decimal(expected) / decimal
+            let approximatelyRight = aboutOne >= Decimal(0.99999) && aboutOne <= Decimal(1.00001)
+            expectTrue(approximatelyRight, "\(expected) ~= \(decimal) : \(aboutOne) \(aboutOne >= Decimal(0.99999)) \(aboutOne <= Decimal(1.00001))" )
+        }
+        guard let ones = Decimal(string:"111111111111111111111111111111111111111") else {
+            expectUnreachable("Unable to parse Decimal(string:'111111111111111111111111111111111111111')")
+            return
+        }
+        let num = ones / Decimal(9)
+        guard let answer = Decimal(string:"12345679012345679012345679012345679012.3") else {
+            expectUnreachable("Unable to parse Decimal(string:'12345679012345679012345679012345679012.3')")
+            return
+        }
+        expectEqual(answer,num,"\(ones) / 9 = \(answer) \(num)")
+    }
+
+    func test_SimpleMultiplication() {
+        var multiplicand = Decimal()
+        multiplicand._isNegative = 0
+        multiplicand._isCompact = 0
+        multiplicand._length = 1
+        multiplicand._exponent = 1
+        
+        var multiplier = multiplicand
+        multiplier._exponent = 2
+        
+        var expected = multiplicand
+        expected._isNegative = 0
+        expected._isCompact = 0
+        expected._exponent = 3
+        expected._length = 1
+        
+        var result = Decimal()
+        
+        for i in 1..<UInt8.max {
+            multiplicand._mantissa.0 = UInt16(i)
+            
+            for j in 1..<UInt8.max {
+                multiplier._mantissa.0 = UInt16(j)
+                expected._mantissa.0 = UInt16(i) * UInt16(j)
+                
+                expectEqual(.noError, NSDecimalMultiply(&result, &multiplicand, &multiplier, .plain), "\(i) * \(j)")
+                expectEqual(.orderedSame, NSDecimalCompare(&expected, &result), "\(expected._mantissa.0) == \(i) * \(j)");
+            }
+        }
+    }
+
+    func test_unconditionallyBridgeFromObjectiveC() {
+        expectEqual(Decimal(), Decimal._unconditionallyBridgeFromObjectiveC(nil))
+    }
+}
+
+
+#if !FOUNDATION_XCTEST
+var DecimalTests = TestSuite("TestDecimal")
+DecimalTests.test("test_AdditionWithNormalization") { TestDecimal().test_AdditionWithNormalization() }
+DecimalTests.test("test_BasicConstruction") { TestDecimal().test_BasicConstruction() }
+DecimalTests.test("test_Constants") { TestDecimal().test_Constants() }
+DecimalTests.test("test_Description") { TestDecimal().test_Description() }
+DecimalTests.test("test_ExplicitConstruction") { TestDecimal().test_ExplicitConstruction() }
+DecimalTests.test("test_Maths") { TestDecimal().test_Maths() }
+DecimalTests.test("test_Misc") { TestDecimal().test_Misc() }
+DecimalTests.test("test_MultiplicationOverflow") { TestDecimal().test_MultiplicationOverflow() }
+DecimalTests.test("test_NaNInput") { TestDecimal().test_NaNInput() }
+DecimalTests.test("test_NegativeAndZeroMultiplication") { TestDecimal().test_NegativeAndZeroMultiplication() }
+DecimalTests.test("test_Normalize") { TestDecimal().test_Normalize() }
+DecimalTests.test("test_NSDecimal") { TestDecimal().test_NSDecimal() }
+DecimalTests.test("test_RepeatingDivision") { TestDecimal().test_RepeatingDivision() }
+DecimalTests.test("test_Round") { TestDecimal().test_Round() }
+DecimalTests.test("test_ScanDecimal") { TestDecimal().test_ScanDecimal() }
+DecimalTests.test("test_SimpleMultiplication") { TestDecimal().test_SimpleMultiplication() }
+DecimalTests.test("test_unconditionallyBridgeFromObjectiveC") { TestDecimal().test_unconditionallyBridgeFromObjectiveC() }
+runAllTests()
+#endif
diff --git a/test/stdlib/TestIndexPath.swift b/test/stdlib/TestIndexPath.swift
index 1e47047..b2c4647 100644
--- a/test/stdlib/TestIndexPath.swift
+++ b/test/stdlib/TestIndexPath.swift
@@ -226,9 +226,8 @@
         let ip2: IndexPath = [1, 1, 1]
         
         expectNotEqual(ip1.hashValue, ip2.hashValue)
-        
-        let nsip1 = ip1._bridgeToObjectiveC()
-        expectEqual(nsip1.hash, ip1.hashValue)
+
+        IndexPath(indexes: [Int.max >> 8, 2, Int.max >> 36]).hashValue // this should not cause an overflow crash
     }
     
     func testEquality() {
@@ -708,6 +707,10 @@
         expectNotEqual(anyHashables[0], anyHashables[1])
         expectEqual(anyHashables[1], anyHashables[2])
     }
+
+    func test_unconditionallyBridgeFromObjectiveC() {
+        expectEqual(IndexPath(), IndexPath._unconditionallyBridgeFromObjectiveC(nil))
+    }
 }
 
 #if !FOUNDATION_XCTEST
@@ -758,5 +761,6 @@
 IndexPathTests.test("testObjcBridgeType") { TestIndexPath().testObjcBridgeType() }
 IndexPathTests.test("test_AnyHashableContainingIndexPath") { TestIndexPath().test_AnyHashableContainingIndexPath() }
 IndexPathTests.test("test_AnyHashableCreatedFromNSIndexPath") { TestIndexPath().test_AnyHashableCreatedFromNSIndexPath() }
+IndexPathTests.test("test_unconditionallyBridgeFromObjectiveC") { TestIndexPath().test_unconditionallyBridgeFromObjectiveC() }
 runAllTests()
 #endif
diff --git a/test/stdlib/TestIndexSet.swift b/test/stdlib/TestIndexSet.swift
index f9d4362..545770b 100644
--- a/test/stdlib/TestIndexSet.swift
+++ b/test/stdlib/TestIndexSet.swift
@@ -819,6 +819,10 @@
         expectNotEqual(anyHashables[0], anyHashables[1])
         expectEqual(anyHashables[1], anyHashables[2])
     }
+
+    func test_unconditionallyBridgeFromObjectiveC() {
+        expectEqual(IndexSet(), IndexSet._unconditionallyBridgeFromObjectiveC(nil))
+    }
 }
 
 #if !FOUNDATION_XCTEST
@@ -844,6 +848,7 @@
 // IndexSetTests.test("testIndexingPerformance") { TestIndexSet().testIndexingPerformance() }
 IndexSetTests.test("test_AnyHashableContainingIndexSet") { TestIndexSet().test_AnyHashableContainingIndexSet() }
 IndexSetTests.test("test_AnyHashableCreatedFromNSIndexSet") { TestIndexSet().test_AnyHashableCreatedFromNSIndexSet() }
+IndexSetTests.test("test_unconditionallyBridgeFromObjectiveC") { TestIndexSet().test_unconditionallyBridgeFromObjectiveC() }
 runAllTests()
 #endif
 
diff --git a/test/stdlib/TestNSNumberBridging.swift b/test/stdlib/TestNSNumberBridging.swift
new file mode 100644
index 0000000..5bb04d3
--- /dev/null
+++ b/test/stdlib/TestNSNumberBridging.swift
@@ -0,0 +1,838 @@
+//===--- NSNumberBridging.swift - Test bridging through NSNumber ----------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+// RUN: %target-run-simple-swift
+// REQUIRES: executable_test
+// REQUIRES: objc_interop
+
+
+import StdlibUnittest
+import Foundation
+import CoreGraphics
+
+var nsNumberBridging = TestSuite("NSNumberBridging")
+
+func testFloat(_ lhs: Float?, _ rhs: Float?, file: String = #file, line: UInt = #line) {
+    let message = "\(String(describing: lhs)) != \(String(describing: rhs)) Float"
+    if let lhsValue = lhs {
+        if let rhsValue = rhs {
+            if lhsValue.isNaN != rhsValue.isNaN {
+                expectUnreachable(message, file: file, line: line)
+            } else if lhsValue != rhsValue && !lhsValue.isNaN {
+                expectUnreachable(message, file: file, line: line)
+            }
+        } else {
+            expectUnreachable(message, file: file, line: line)
+        }
+    } else {
+        if rhs != nil {
+            expectUnreachable(message, file: file, line: line)
+        }
+    }
+}
+
+func testDouble(_ lhs: Double?, _ rhs: Double?, file: String = #file, line: UInt = #line) {
+    let message = "\(String(describing: lhs)) != \(String(describing: rhs)) Double"
+    if let lhsValue = lhs {
+        if let rhsValue = rhs {
+            if lhsValue.isNaN != rhsValue.isNaN {
+                expectUnreachable(message, file: file, line: line)
+            } else if lhsValue != rhsValue && !lhsValue.isNaN {
+                expectUnreachable(message, file: file, line: line)
+            }
+        } else {
+            expectUnreachable(message, file: file, line: line)
+        }
+    } else {
+        if rhs != nil {
+            expectUnreachable(message, file: file, line: line)
+        }
+    }
+}
+
+
+extension Int8 {
+    static var _interestingValues: [Int8] {
+        return [
+            Int8.min,
+            Int8.min + 1,
+            Int8.max,
+            Int8.max - 1,
+            0,
+            -1, 1,
+            -42, 42,
+        ]
+    }
+}
+
+extension UInt8 {
+    static var _interestingValues: [UInt8] {
+        return [
+            UInt8.min,
+            UInt8.min + 1,
+            UInt8.max,
+            UInt8.max - 1,
+            42,
+        ]
+    }
+}
+
+extension Int16 {
+    static var _interestingValues: [Int16] {
+        return [
+            Int16.min,
+            Int16.min + 1,
+            Int16.max,
+            Int16.max - 1,
+            0,
+            -1, 1,
+            -42, 42,
+        ]
+    }
+}
+
+extension UInt16 {
+    static var _interestingValues: [UInt16] {
+        return [
+            UInt16.min,
+            UInt16.min + 1,
+            UInt16.max,
+            UInt16.max - 1,
+            42,
+        ]
+    }
+}
+
+extension Int32 {
+    static var _interestingValues: [Int32] {
+        return [
+            Int32.min,
+            Int32.min + 1,
+            Int32.max,
+            Int32.max - 1,
+            0,
+            -1, 1,
+            -42, 42,
+        ]
+    }
+}
+
+extension UInt32 {
+    static var _interestingValues: [UInt32] {
+        return [
+            UInt32.min,
+            UInt32.min + 1,
+            UInt32.max,
+            UInt32.max - 1,
+            42,
+        ]
+    }
+}
+
+extension Int64 {
+    static var _interestingValues: [Int64] {
+        return [
+            Int64.min,
+            Int64.min + 1,
+            Int64.max,
+            Int64.max - 1,
+            0,
+            -1, 1,
+            -42, 42,
+        ]
+    }
+}
+
+extension UInt64 {
+    static var _interestingValues: [UInt64] {
+        return [
+            UInt64.min,
+            UInt64.min + 1,
+            UInt64.max,
+            UInt64.max - 1,
+            42,
+        ]
+    }
+}
+
+extension Int {
+    static var _interestingValues: [Int] {
+        return [
+            Int.min,
+            Int.min + 1,
+            Int.max,
+            Int.max - 1,
+            0,
+            -1, 1,
+            -42, 42,
+        ]
+    }
+}
+
+extension UInt {
+    static var _interestingValues: [UInt] {
+        return [
+            UInt.min,
+            UInt.min + 1,
+            UInt.max,
+            UInt.max - 1,
+            42,
+        ]
+    }
+}
+
+extension Float {
+    static var _interestingValues: [Float] {
+        return [
+            -Float.infinity,
+            -Float.greatestFiniteMagnitude,
+            -1.0,
+            -Float.ulpOfOne,
+            -Float.leastNormalMagnitude,
+            -0.0,
+            0.0,
+            Float.leastNormalMagnitude,
+            Float.ulpOfOne,
+            1.0,
+            Float.greatestFiniteMagnitude,
+            Float.infinity,
+            Float.nan,
+        ]
+    }
+}
+
+extension Double {
+    static var _interestingValues: [Double] {
+        return [
+            -Double.infinity,
+            -Double.greatestFiniteMagnitude,
+            -1.0,
+            -Double.ulpOfOne,
+            -Double.leastNormalMagnitude,
+            -0.0,
+            0.0,
+            Double.leastNormalMagnitude,
+            Double.ulpOfOne,
+            1.0,
+            Double.greatestFiniteMagnitude,
+            Double.infinity,
+            Double.nan,
+        ]
+    }
+}
+
+extension CGFloat {
+    static var _interestingValues: [CGFloat] {
+        return [
+            -CGFloat.infinity,
+            -CGFloat.greatestFiniteMagnitude,
+            -1.0,
+            -CGFloat.ulpOfOne,
+            -CGFloat.leastNormalMagnitude,
+            -0.0,
+            0.0,
+            CGFloat.leastNormalMagnitude,
+            CGFloat.ulpOfOne,
+            1.0,
+            CGFloat.greatestFiniteMagnitude,
+            CGFloat.infinity,
+            CGFloat.nan,
+        ]
+    }
+}
+
+extension Bool {
+    static var _interestingValues: [Bool] {
+        return [false, true]
+    }
+}
+
+func testNSNumberBridgeFromInt8() {
+    for interestingValue in Int8._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+            let float = (number!) as? Float
+            expectEqual(Float(interestingValue), float)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromUInt8() {
+    for interestingValue in UInt8._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+            let float = (number!) as? Float
+            expectEqual(Float(interestingValue), float)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromInt16() {
+    for interestingValue in Int16._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+            let float = (number!) as? Float
+            expectEqual(Float(interestingValue), float)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromUInt16() {
+    for interestingValue in UInt8._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+            let float = (number!) as? Float
+            expectEqual(Float(interestingValue), float)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromInt32() {
+    for interestingValue in Int32._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+            
+            let float = (number!) as? Float
+            let expectedFloat = Float(exactly: int32!)
+            // these are disabled because of https://bugs.swift.org/browse/SR-4634
+            if (int32! != Int32.min && int32! != Int32.max &&
+                int32! != Int32.min + 1 && int32! != Int32.max - 1) {
+                testFloat(expectedFloat, float)
+            }
+            
+            
+            let double = (number!) as? Double
+            let expectedDouble = Double(int32!)
+            testDouble(expectedDouble, double)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromUInt32() {
+    for interestingValue in UInt32._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+            
+            let float = (number!) as? Float
+            let expectedFloat = Float(uint32!)
+            // these are disabled because of https://bugs.swift.org/browse/SR-4634
+            if (uint32! != UInt32.max && uint32! != UInt32.max - 1) {
+                testFloat(expectedFloat, float)
+            }
+            
+            let double = (number!) as? Double
+            let expectedDouble = Double(uint32!)
+            testDouble(expectedDouble, double)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromInt64() {
+    for interestingValue in Int64._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromUInt64() {
+    for interestingValue in UInt64._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromInt() {
+    for interestingValue in Int._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromUInt() {
+    for interestingValue in UInt._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+
+            // these are disabled because of https://bugs.swift.org/browse/SR-4634
+            if uint! != UInt(UInt32.max) && uint! != UInt(UInt32.max - 1) {
+                let float = (number!) as? Float
+                let expectedFloat = Float(uint!)
+                testFloat(expectedFloat, float)
+            }
+            
+            
+            let double = (number!) as? Double
+            let expectedDouble = Double(uint!)
+            testDouble(expectedDouble, double)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromFloat() {
+    for interestingValue in Float._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+
+            let float = (number!) as? Float
+            let expectedFloat = Float(exactly: interestingValue)
+            testFloat(expectedFloat, float)
+            
+            let double = (number!) as? Double
+            let expectedDouble = Double(interestingValue)
+            testDouble(expectedDouble, double)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromDouble() {
+    for interestingValue in Double._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+
+            let float = (number!) as? Float
+            let expectedFloat = Float(exactly: interestingValue)
+            testFloat(expectedFloat, float)
+            
+            let double = (number!) as? Double
+            let expectedDouble = interestingValue
+            testDouble(expectedDouble, double)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromCGFloat() {
+    for interestingValue in CGFloat._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue.native), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue.native), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue.native), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue.native), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue.native), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue.native), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue.native), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue.native), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue.native), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue.native), uint)
+            
+            let float = (number!) as? Float
+            let expectedFloat = Float(exactly: interestingValue.native)
+            testFloat(expectedFloat, float)
+            
+            let double = (number!) as? Double
+            let expectedDouble = Double(interestingValue)
+            testDouble(expectedDouble, double)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue.native)
+        testNumber(created)
+    }
+}
+
+func test_numericBitPatterns_to_floatingPointTypes() {
+    let signed_numbers: [NSNumber] = [
+        NSNumber(value: Int64(6)),
+        NSNumber(value: Int64(bitPattern: 1 << 56)),
+        NSNumber(value: Int64(bitPattern: 1 << 53)),
+        NSNumber(value: Int64(bitPattern: 1 << 52)),
+        NSNumber(value: Int64(bitPattern: 1 << 25)),
+        NSNumber(value: Int64(bitPattern: 1 << 24)),
+        NSNumber(value: Int64(bitPattern: 1 << 23)),
+        NSNumber(value: -Int64(bitPattern: 1 << 53)),
+        NSNumber(value: -Int64(bitPattern: 1 << 52)),
+        NSNumber(value: -Int64(6)),
+        NSNumber(value: -Int64(bitPattern: 1 << 56)),
+        NSNumber(value: -Int64(bitPattern: 1 << 25)),
+        NSNumber(value: -Int64(bitPattern: 1 << 24)),
+        NSNumber(value: -Int64(bitPattern: 1 << 23)),
+    ]
+
+    let signed_values: [Int64] = [
+        Int64(6),
+        Int64(bitPattern: 1 << 56),
+        Int64(bitPattern: 1 << 53),
+        Int64(bitPattern: 1 << 52),
+        Int64(bitPattern: 1 << 25),
+        Int64(bitPattern: 1 << 24),
+        Int64(bitPattern: 1 << 23),
+        -Int64(bitPattern: 1 << 53),
+        -Int64(bitPattern: 1 << 52),
+        -Int64(6),
+        -Int64(bitPattern: 1 << 56),
+        -Int64(bitPattern: 1 << 25),
+        -Int64(bitPattern: 1 << 24),
+        -Int64(bitPattern: 1 << 23),
+    ]
+
+    let unsigned_numbers: [NSNumber] = [
+        NSNumber(value: UInt64(bitPattern: 6)),
+        NSNumber(value: UInt64(bitPattern: 1 << 56)),
+        NSNumber(value: UInt64(bitPattern: 1 << 63)),
+        NSNumber(value: UInt64(bitPattern: 1 << 53)),
+        NSNumber(value: UInt64(bitPattern: 1 << 52)),
+        NSNumber(value: UInt64(bitPattern: 1 << 25)),
+        NSNumber(value: UInt64(bitPattern: 1 << 24)),
+        NSNumber(value: UInt64(bitPattern: 1 << 23)),
+    ]
+
+    let unsigned_values: [UInt64] = [
+        UInt64(bitPattern: 6),
+        UInt64(bitPattern: 1 << 56),
+        UInt64(bitPattern: 1 << 63),
+        UInt64(bitPattern: 1 << 53),
+        UInt64(bitPattern: 1 << 52),
+        UInt64(bitPattern: 1 << 25),
+        UInt64(bitPattern: 1 << 24),
+        UInt64(bitPattern: 1 << 23)
+    ]
+
+    for (number, value) in zip(signed_numbers, signed_values) {
+        let numberCast = Double(exactly: number)
+        let valueCast = Double(exactly: value)
+        expectEqual(numberCast, valueCast)
+    }
+
+    for (number, value) in zip(unsigned_numbers, unsigned_values) {
+        let numberCast = Double(exactly: number)
+        let valueCast = Double(exactly: value)
+        expectEqual(numberCast, valueCast)
+    }
+
+    for (number, value) in zip(signed_numbers, signed_values) {
+        let numberCast = Float(exactly: number)
+        let valueCast = Float(exactly: value)
+        expectEqual(numberCast, valueCast)
+    }
+
+    for (number, value) in zip(unsigned_numbers, unsigned_values) {
+        let numberCast = Float(exactly: number)
+        let valueCast = Float(exactly: value)
+        expectEqual(numberCast, valueCast)
+    }
+}
+
+nsNumberBridging.test("Bridge Int8") { testNSNumberBridgeFromInt8() }
+nsNumberBridging.test("Bridge UInt8") { testNSNumberBridgeFromUInt8() }
+nsNumberBridging.test("Bridge Int16") { testNSNumberBridgeFromInt16() }
+nsNumberBridging.test("Bridge UInt16") { testNSNumberBridgeFromUInt16() }
+nsNumberBridging.test("Bridge Int32") { testNSNumberBridgeFromInt32() }
+nsNumberBridging.test("Bridge UInt32") { testNSNumberBridgeFromUInt32() }
+nsNumberBridging.test("Bridge Int64") { testNSNumberBridgeFromInt64() }
+nsNumberBridging.test("Bridge UInt64") { testNSNumberBridgeFromUInt64() }
+nsNumberBridging.test("Bridge Int") { testNSNumberBridgeFromInt() }
+nsNumberBridging.test("Bridge UInt") { testNSNumberBridgeFromUInt() }
+nsNumberBridging.test("Bridge Float") { testNSNumberBridgeFromFloat() }
+nsNumberBridging.test("Bridge Double") { testNSNumberBridgeFromDouble() }
+nsNumberBridging.test("Bridge CGFloat") { testNSNumberBridgeFromCGFloat() }
+nsNumberBridging.test("bitPattern to exactly") { test_numericBitPatterns_to_floatingPointTypes() }
+runAllTests()
diff --git a/test/stdlib/TestNotification.swift b/test/stdlib/TestNotification.swift
new file mode 100644
index 0000000..ee7b51f
--- /dev/null
+++ b/test/stdlib/TestNotification.swift
@@ -0,0 +1,42 @@
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+//
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+//
+// RUN: %target-clang %S/Inputs/FoundationBridge/FoundationBridge.m -c -o %t/FoundationBridgeObjC.o -g
+// RUN: %target-build-swift %s -I %S/Inputs/FoundationBridge/ -Xlinker %t/FoundationBridgeObjC.o -o %t/TestNotification
+
+// RUN: %target-run %t/TestNotification > %t.txt
+// REQUIRES: executable_test
+// REQUIRES: objc_interop
+
+
+import Foundation
+import FoundationBridgeObjC
+
+#if FOUNDATION_XCTEST
+    import XCTest
+    class TestNotificationSuper : XCTestCase { }
+#else
+    import StdlibUnittest
+    class TestNotificationSuper { }
+#endif
+
+class TestNotification : TestNotificationSuper {
+    func test_unconditionallyBridgeFromObjectiveC() {
+        expectEqual(Notification(name: Notification.Name("")), Notification._unconditionallyBridgeFromObjectiveC(nil))
+    }
+}
+
+
+#if !FOUNDATION_XCTEST
+var NotificationTests = TestSuite("TestNotification")
+NotificationTests.test("test_unconditionallyBridgeFromObjectiveC") { TestNotification().test_unconditionallyBridgeFromObjectiveC() }
+runAllTests()
+#endif
diff --git a/test/stmt/statements.swift b/test/stmt/statements.swift
index 006fe64..db46e81 100644
--- a/test/stmt/statements.swift
+++ b/test/stmt/statements.swift
@@ -267,7 +267,7 @@
 Outer:
   for _ in 0...1000 {
 
-  Switch: // expected-error {{switch must be exhaustive, consider adding a default clause:}}
+  Switch: // expected-error {{switch must be exhaustive}} expected-note{{do you want to add a default clause?}}
   switch x {
     case 42: break Outer
     case 97: continue Outer
@@ -299,7 +299,7 @@
   let x : Int? = 42
   
   // <rdar://problem/16879701> Should be able to pattern match 'nil' against optionals
-  switch x { // expected-error {{switch must be exhaustive, consider adding missing cases:}}
+  switch x { // expected-error {{switch must be exhaustive}}
   // expected-note@-1 {{missing case: '.some(_)'}}
   case .some(42): break
   case nil: break
@@ -384,7 +384,8 @@
   switch 4 {
   case is Int: break        // expected-warning {{'is' test is always true}}
   case _ as Int: break  // expected-warning {{'as' test is always true}}
-  case _: break
+  // expected-warning@-1 {{case is already handled by previous patterns; consider removing it}}
+  case _: break // expected-warning {{case is already handled by previous patterns; consider removing it}}
   }
 }
 
@@ -452,7 +453,7 @@
   case Bar
 }
 func r25178926(_ a : Type) {
-  switch a { // expected-error {{switch must be exhaustive, consider adding missing cases:}}
+  switch a { // expected-error {{switch must be exhaustive}}
   // expected-note@-1 {{missing case: '.Bar'}}
   case .Foo, .Bar where 1 != 100:
     // expected-warning @-1 {{'where' only applies to the second pattern match in this case}}
@@ -461,20 +462,20 @@
     break
   }
 
-  switch a { // expected-error {{switch must be exhaustive, consider adding missing cases:}}
+  switch a { // expected-error {{switch must be exhaustive}}
   // expected-note@-1 {{missing case: '.Bar'}}
   case .Foo: break
   case .Bar where 1 != 100: break
   }
 
-  switch a { // expected-error {{switch must be exhaustive, consider adding missing cases:}}
+  switch a { // expected-error {{switch must be exhaustive}}
   // expected-note@-1 {{missing case: '.Bar'}}
   case .Foo,  // no warn
        .Bar where 1 != 100:
     break
   }
 
-  switch a { // expected-error {{switch must be exhaustive, consider adding missing cases:}}
+  switch a { // expected-error {{switch must be exhaustive}}
   // expected-note@-1 {{missing case: '.Foo'}}
   // expected-note@-2 {{missing case: '.Bar'}}
   case .Foo where 1 != 100, .Bar where 1 != 100:
diff --git a/test/stmt/switch_stmt1.swift b/test/stmt/switch_stmt1.swift
index 158c76e..3bc7568 100644
--- a/test/stmt/switch_stmt1.swift
+++ b/test/stmt/switch_stmt1.swift
@@ -6,7 +6,7 @@
 }
 
 func foo1(e : E, i : Int) {
-  switch e {} // expected-error{{switch must be exhaustive, consider adding missing cases:}}
+  switch e {} // expected-error{{switch must be exhaustive}}
   // expected-note@-1 {{missing case: '.e1'}}
   // expected-note@-2 {{missing case: '.e2'}}
   switch i {} // expected-error{{'switch' statement body must have at least one 'case' or 'default' block; do you want to add a default case?}}{{13-13=default: <#code#>\n}}
diff --git a/test/stmt/switch_stmt2.swift b/test/stmt/switch_stmt2.swift
index a39b7ff..4bfa01a 100644
--- a/test/stmt/switch_stmt2.swift
+++ b/test/stmt/switch_stmt2.swift
@@ -6,14 +6,15 @@
 }
 
 func foo1(e : E) {
-  switch e { // expected-error{{switch must be exhaustive, consider adding missing cases:}}
-  // expected-note@-1 {{missing case: '.e2'}}
+  switch e { // expected-error{{switch must be exhaustive}}
+  // expected-note@-1 {{add missing case: '.e2'}}
   case .e1: return
   }
 }
 
 func foo2(i : Int) {
-  switch i { // expected-error{{switch must be exhaustive, consider adding a default clause}}{{3-3=default: <#code#>\n}}
+  switch i { // expected-error{{switch must be exhaustive}}
+  // expected-note@-1{{do you want to add a default clause?}}{{3-3=default: <#code#>\n}}
   case 1: return
   }
 }
@@ -75,7 +76,7 @@
   }
 
   switch b { // expected-error{{switch must be exhaustive}}
-  // expected-note@-1 {{missing case: '.some(false)'}}
+  // expected-note@-1 {{add missing case: '.some(false)'}}
   case .some(true):
     x += 1
   case .none:
@@ -97,15 +98,15 @@
   }
 
   switch Cond { // expected-error{{switch must be exhaustive}}
-  // expected-note@-1 {{missing case: '(false, _)'}}
-  // expected-note@-2 {{missing case: '(_, false)'}}
+  // expected-note@-1 {{add missing case: '(false, _)'}}
+  // expected-note@-2 {{add missing case: '(_, false)'}}
   case (true, true):
     x += 1
   }
 
   switch Cond { // expected-error{{switch must be exhaustive}}
-  // expected-note@-1 {{missing case: '(true, _)'}}
-  // expected-note@-2 {{missing case: '(_, false)'}}
+  // expected-note@-1 {{add missing case: '(true, _)'}}
+  // expected-note@-2 {{add missing case: '(_, false)'}}
   case (false, true):
     x += 1
   }
@@ -126,7 +127,8 @@
 
 func non_fully_covered_switch(x: Int) -> Int {
   var x = x
-  switch x { // expected-error{{switch must be exhaustive, consider adding a default clause:}}
+  switch x { // expected-error{{switch must be exhaustive}}
+  // expected-note@-1{{do you want to add a default clause?}}
   case 0:
     x += 1
   case 3:
diff --git a/test/stmt/switch_stmt_editor1.swift b/test/stmt/switch_stmt_editor1.swift
index b6fbf1e..bc73141 100644
--- a/test/stmt/switch_stmt_editor1.swift
+++ b/test/stmt/switch_stmt_editor1.swift
@@ -6,6 +6,7 @@
 }
 
 func foo1(e : E, i : Int) {
-  switch e {} // expected-error{{do you want to add missing cases?}}{{13-13=case .e1: <#code#>\ncase .e2: <#code#>\n}}
-  switch i {} // expected-error{{do you want to add a default case?}}{{13-13=default: <#code#>\n}}
+  switch e {} // expected-error{{switch must be exhaustive}}
+  // expected-note@-1{{do you want to add missing cases?}}{{13-13=case .e1: <#code#>\ncase .e2: <#code#>\n}}
+  switch i {} // expected-error{{'switch' statement body must have at least one 'case' or 'default' block; do you want to add a default case?}}{{13-13=default: <#code#>\n}}
 }
diff --git a/test/stmt/switch_stmt_editor2.swift b/test/stmt/switch_stmt_editor2.swift
index 7ac2991..5fb39b4 100644
--- a/test/stmt/switch_stmt_editor2.swift
+++ b/test/stmt/switch_stmt_editor2.swift
@@ -6,13 +6,15 @@
 }
 
 func foo1(e : E) {
-  switch e { // expected-error{{do you want to add missing cases?}}{{3-3=case .e2: <#code#>\n}}
+  switch e { // expected-error{{switch must be exhaustive}}
+  // expected-note@-1{{do you want to add missing cases?}}{{3-3=case .e2: <#code#>\n}}
   case .e1: return
   }
 }
 
 func foo2(i : Int) {
-  switch i { // expected-error{{do you want to add a default clause?}}{{3-3=default: <#code#>\n}}
+  switch i { // expected-error{{switch must be exhaustive}}
+  // expected-note@-1{{do you want to add a default clause?}}{{3-3=default: <#code#>\n}}
   case 1: return
   }
 }
diff --git a/test/type/protocol_types.swift b/test/type/protocol_types.swift
index eae554f..fed6850 100644
--- a/test/type/protocol_types.swift
+++ b/test/type/protocol_types.swift
@@ -23,27 +23,32 @@
 typealias Compo = HasSelfRequirements & Bar
 
 struct CompoAssocType {
-  typealias Compo = HasSelfRequirements & Bar // expected-error{{protocol 'HasSelfRequirements' can only be used as a generic constraint}}
+  typealias Compo = HasSelfRequirements & Bar
 }
 
 func useAsRequirement<T: HasSelfRequirements>(_ x: T) { }
 func useCompoAsRequirement<T: HasSelfRequirements & Bar>(_ x: T) { }
 func useCompoAliasAsRequirement<T: Compo>(_ x: T) { }
+func useNestedCompoAliasAsRequirement<T: CompoAssocType.Compo>(_ x: T) { }
 
 func useAsWhereRequirement<T>(_ x: T) where T: HasSelfRequirements {}
 func useCompoAsWhereRequirement<T>(_ x: T) where T: HasSelfRequirements & Bar {}
 func useCompoAliasAsWhereRequirement<T>(_ x: T) where T: Compo {}
+func useNestedCompoAliasAsWhereRequirement<T>(_ x: T) where T: CompoAssocType.Compo {}
 
 func useAsType(_ x: HasSelfRequirements) { } // expected-error{{protocol 'HasSelfRequirements' can only be used as a generic constraint}}
 func useCompoAsType(_ x: HasSelfRequirements & Bar) { } // expected-error{{protocol 'HasSelfRequirements' can only be used as a generic constraint}}
 func useCompoAliasAsType(_ x: Compo) { } // expected-error{{protocol 'HasSelfRequirements' can only be used as a generic constraint}}
+func useNestedCompoAliasAsType(_ x: CompoAssocType.Compo) { } // expected-error{{protocol 'HasSelfRequirements' can only be used as a generic constraint}}
 
 struct TypeRequirement<T: HasSelfRequirements> {}
 struct CompoTypeRequirement<T: HasSelfRequirements & Bar> {}
 struct CompoAliasTypeRequirement<T: Compo> {}
+struct NestedCompoAliasTypeRequirement<T: CompoAssocType.Compo> {}
 
 struct CompoTypeWhereRequirement<T> where T: HasSelfRequirements & Bar {}
 struct CompoAliasTypeWhereRequirement<T> where T: Compo {}
+struct NestedCompoAliasTypeWhereRequirement<T> where T: CompoAssocType.Compo {}
 
 struct Struct1<T> { }
 struct Struct2<T : Pub & Bar> { }
diff --git a/test/type/subclass_composition.swift b/test/type/subclass_composition.swift
index d01fc3b..d61c8bc 100644
--- a/test/type/subclass_composition.swift
+++ b/test/type/subclass_composition.swift
@@ -51,10 +51,10 @@
 // FIXME: Not implemented yet.
 //
 
-func alreadyConforms<T>(_: Base<T>) {}
-func alreadyConforms<T>(_: Base<T> & P1) {}
-func alreadyConforms<T>(_: Base<T> & AnyObject) {}
-func alreadyConforms<T>(_: Base<T> & P1 & AnyObject) {}
+func alreadyConforms<T>(_: Base<T>) {} // expected-note {{'alreadyConforms' previously declared here}}
+func alreadyConforms<T>(_: Base<T> & P1) {} // expected-note {{'alreadyConforms' previously declared here}}
+func alreadyConforms<T>(_: Base<T> & AnyObject) {} // expected-error {{invalid redeclaration of 'alreadyConforms'}}
+func alreadyConforms<T>(_: Base<T> & P1 & AnyObject) {} // expected-error {{invalid redeclaration of 'alreadyConforms'}}
 
 func alreadyConforms(_: P3) {}
 func alreadyConforms(_: P3 & AnyObject) {}
@@ -450,7 +450,7 @@
 protocol ProtoConstraintsSelfToClass where Self : Base<Int> {}
 
 protocol ProtoRefinesClass : Base<Int> {} // FIXME expected-error {{}}
-protocol ProtoRefinesClassAndProtocolAlias : BaseIntAndP2 {} // FIXME expected-error {{}}
+protocol ProtoRefinesClassAndProtocolAlias : BaseIntAndP2 {}
 protocol ProtoRefinesClassAndProtocolDirect : Base<Int> & P2 {} // FIXME expected-error 2 {{}}
 protocol ProtoRefinesClassAndProtocolExpanded : Base<Int>, P2 {} // FIXME expected-error {{}}
 
@@ -459,11 +459,13 @@
 // expected-note@-2 {{requirement specified as 'Self' : 'Base<Int>' [with Self = ClassConformsToClassProtocolBad1]}}
 class ClassConformsToClassProtocolGood1 : Derived, ProtoConstraintsSelfToClass {}
 
-class ClassConformsToClassProtocolBad2 : ProtoRefinesClass {} // FIXME
+class ClassConformsToClassProtocolBad2 : ProtoRefinesClass {}
+// expected-error@-1 {{'ProtoRefinesClass' requires that 'ClassConformsToClassProtocolBad2' inherit from 'Base<Int>'}}
+// expected-note@-2 {{requirement specified as 'Self' : 'Base<Int>' [with Self = ClassConformsToClassProtocolBad2]}}
 class ClassConformsToClassProtocolGood2 : Derived, ProtoRefinesClass {}
 
 // Subclass existentials inside inheritance clauses
-class CompositionInClassInheritanceClauseAlias : BaseIntAndP2 {
+class CompositionInClassInheritanceClauseAlias : BaseIntAndP2 { // FIXME: expected-error {{}}
   required init(classInit: ()) {
     super.init(classInit: ()) // FIXME: expected-error {{}}
   }
@@ -494,7 +496,6 @@
 
 protocol CompositionInAssociatedTypeInheritanceClause {
   associatedtype A : BaseIntAndP2
-  // FIXME expected-error@-1 {{}}
 }
 
 // Members of metatypes and existential metatypes
diff --git a/tools/SourceKit/docs/Protocol.md b/tools/SourceKit/docs/Protocol.md
index 40b9afa..c494560 100644
--- a/tools/SourceKit/docs/Protocol.md
+++ b/tools/SourceKit/docs/Protocol.md
@@ -635,6 +635,10 @@
     [opt] <key.compilerargs>: [string*] // Array of zero or more strings for the compiler arguments,
                                         // e.g ["-sdk", "/path/to/sdk"]. If key.sourcefile is provided,
                                         // these must include the path to that file.
+    [opt] <key.cancel_on_subsequent_request>: (int64) // Whether this request should be canceled if a
+                                        // new cursor-info request is made that uses the same AST.
+                                        // This behavior is a workaround for not having first-class
+                                        // cancelation. For backwards compatibility, the default is 1.
 }
 ```
 
diff --git a/tools/SourceKit/include/SourceKit/Core/LangSupport.h b/tools/SourceKit/include/SourceKit/Core/LangSupport.h
index 9d1b6df..995ee60 100644
--- a/tools/SourceKit/include/SourceKit/Core/LangSupport.h
+++ b/tools/SourceKit/include/SourceKit/Core/LangSupport.h
@@ -443,7 +443,8 @@
                                          StringRef Name,
                                          StringRef HeaderName,
                                          ArrayRef<const char *> Args,
-                                         bool SynthesizedExtensions) = 0;
+                                         bool SynthesizedExtensions,
+                                         Optional<unsigned> swiftVersion) = 0;
 
   virtual void editorOpenSwiftSourceInterface(StringRef Name,
                                               StringRef SourceName,
@@ -474,6 +475,7 @@
 
   virtual void getCursorInfo(StringRef Filename, unsigned Offset,
                              unsigned Length, bool Actionables,
+                             bool CancelOnSubsequentRequest,
                              ArrayRef<const char *> Args,
                           std::function<void(const CursorInfo &)> Receiver) = 0;
 
@@ -484,16 +486,19 @@
                 std::function<void(const NameTranslatingInfo &)> Receiver) = 0;
 
   virtual void getRangeInfo(StringRef Filename, unsigned Offset, unsigned Length,
+                            bool CancelOnSubsequentRequest,
                             ArrayRef<const char *> Args,
                             std::function<void(const RangeInfo&)> Receiver) = 0;
 
   virtual void
   getCursorInfoFromUSR(StringRef Filename, StringRef USR,
+                       bool CancelOnSubsequentRequest,
                        ArrayRef<const char *> Args,
                        std::function<void(const CursorInfo &)> Receiver) = 0;
 
   virtual void findRelatedIdentifiersInFile(StringRef Filename,
                                             unsigned Offset,
+                                            bool CancelOnSubsequentRequest,
                                             ArrayRef<const char *> Args,
                    std::function<void(const RelatedIdentsInfo &)> Receiver) = 0;
 
diff --git a/tools/SourceKit/lib/SwiftLang/CodeCompletionOrganizer.cpp b/tools/SourceKit/lib/SwiftLang/CodeCompletionOrganizer.cpp
index 5a32d26..c54b3f4 100644
--- a/tools/SourceKit/lib/SwiftLang/CodeCompletionOrganizer.cpp
+++ b/tools/SourceKit/lib/SwiftLang/CodeCompletionOrganizer.cpp
@@ -952,7 +952,7 @@
   auto &contents = group->contents;
   double best = -1.0;
   for (auto &item : contents) {
-    if (Group *g = dyn_cast<Group>(item.get())) {
+    if (auto *g = dyn_cast<Group>(item.get())) {
       sortRecursive(options, g, hasExpectedTypes);
     } else {
       Result *r = cast<Result>(item.get());
@@ -1047,7 +1047,7 @@
 
   auto start = worklist.begin();
   while (start != worklist.end()) {
-    if (Group *g = dyn_cast<Group>(start->get())) {
+    if (auto *g = dyn_cast<Group>(start->get())) {
       groupStemsRecursive(g, recurseIntoNewGroups, getStem);
       newContents.push_back(std::move(*start));
       ++start;
diff --git a/tools/SourceKit/lib/SwiftLang/SwiftDocSupport.cpp b/tools/SourceKit/lib/SwiftLang/SwiftDocSupport.cpp
index ca4a951..26c681f 100644
--- a/tools/SourceKit/lib/SwiftLang/SwiftDocSupport.cpp
+++ b/tools/SourceKit/lib/SwiftLang/SwiftDocSupport.cpp
@@ -108,12 +108,12 @@
   DefaultImplementMap *DefaultMapToUse = nullptr;
 
   void initDefaultMapToUse(const Decl *D) {
-    const ExtensionDecl *ED = dyn_cast<ExtensionDecl>(D);
+    const auto *ED = dyn_cast<ExtensionDecl>(D);
     if (!ED)
       return;
     if (ED->getExtendedType()) {
       if (auto NTD = ED->getExtendedType()->getAnyNominal()) {
-        if (ProtocolDecl *PD = dyn_cast<ProtocolDecl>(NTD)) {
+        if (auto *PD = dyn_cast<ProtocolDecl>(NTD)) {
           auto Pair = AllDefaultMaps.insert({PD, DefaultImplementMap()});
           DefaultMapToUse = &Pair.first->getSecond();
           if (Pair.second) {
@@ -134,7 +134,7 @@
   ValueDecl *getDefaultImplementation(const Decl *D) {
     if (!DefaultMapToUse)
       return nullptr;
-    ValueDecl *VD = const_cast<ValueDecl*>(dyn_cast<ValueDecl>(D));
+    auto *VD = const_cast<ValueDecl*>(dyn_cast<ValueDecl>(D));
     auto Found = DefaultMapToUse->find(VD);
     if (Found != DefaultMapToUse->end()) {
       return Found->second;
@@ -324,7 +324,7 @@
 
   if (Info.Kind.isInvalid())
     return true;
-  if (const ValueDecl *VD = dyn_cast<ValueDecl>(D)) {
+  if (const auto *VD = dyn_cast<ValueDecl>(D)) {
     llvm::raw_svector_ostream NameOS(Info.Name);
     SwiftLangSupport::printDisplayName(VD, NameOS);
     {
@@ -409,7 +409,7 @@
     // We report sub-module information only for top-level decls.
     case DeclContextKind::Module:
     case DeclContextKind::FileUnit: {
-      if (auto* CD = D->getClangDecl()) {
+      if (auto *CD = D->getClangDecl()) {
         if (auto *M = CD->getImportedOwningModule()) {
           const clang::Module *Root = M->getTopLevelModule();
 
@@ -517,7 +517,7 @@
                           DocInfoConsumer &Consumer) {
   if (!D || isa<ParamDecl>(D))
     return;
-  if (const ExtensionDecl *ED = dyn_cast<ExtensionDecl>(D)) {
+  if (const auto *ED = dyn_cast<ExtensionDecl>(D)) {
     if (SynthesizedTarget) {
       passExtends((ValueDecl*)SynthesizedTarget, Consumer);
     } else if (Type T = ED->getExtendedType()) {
@@ -543,7 +543,7 @@
 
     // Otherwise, report the inheritance of the type alias itself.
     passInheritsAndConformancesForValueDecl(TAD, Consumer);
-  } else if (const TypeDecl *TD = dyn_cast<TypeDecl>(D)) {
+  } else if (const auto *TD = dyn_cast<TypeDecl>(D)) {
     passInherits(TD->getInherited(), Consumer);
     passConforms(TD->getSatisfiedProtocolRequirements(/*Sorted=*/true),
                  Consumer);
diff --git a/tools/SourceKit/lib/SwiftLang/SwiftEditorInterfaceGen.cpp b/tools/SourceKit/lib/SwiftLang/SwiftEditorInterfaceGen.cpp
index 35bf33d..4e640b2 100644
--- a/tools/SourceKit/lib/SwiftLang/SwiftEditorInterfaceGen.cpp
+++ b/tools/SourceKit/lib/SwiftLang/SwiftEditorInterfaceGen.cpp
@@ -16,6 +16,7 @@
 
 #include "swift/AST/ASTPrinter.h"
 #include "swift/AST/ASTWalker.h"
+#include "swift/Basic/Version.h"
 #include "swift/Frontend/Frontend.h"
 #include "swift/Frontend/PrintingDiagnosticConsumer.h"
 #include "swift/IDE/ModuleInterfacePrinting.h"
@@ -800,7 +801,8 @@
                                                  StringRef Name,
                                                  StringRef HeaderName,
                                                  ArrayRef<const char *> Args,
-                                                 bool SynthesizedExtensions) {
+                                                 bool SynthesizedExtensions,
+                                              Optional<unsigned> swiftVersion) {
   CompilerInstance CI;
   // Display diagnostics to stderr.
   PrintingDiagnosticConsumer PrintDiags;
@@ -831,6 +833,10 @@
   }
 
   Invocation.getClangImporterOptions().ImportForwardDeclarations = true;
+  if (swiftVersion.hasValue()) {
+    auto swiftVer = version::Version({swiftVersion.getValue()});
+    Invocation.getLangOptions().EffectiveLanguageVersion = swiftVer;
+  }
   auto IFaceGenRef = SwiftInterfaceGenContext::create(Name,
                                                       /*IsModule=*/false,
                                                       HeaderName,
diff --git a/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.h b/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.h
index f64435b..e1b1176 100644
--- a/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.h
+++ b/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.h
@@ -358,7 +358,8 @@
                                  StringRef Name,
                                  StringRef HeaderName,
                                  ArrayRef<const char *> Args,
-                                 bool SynthesizedExtensions) override;
+                                 bool SynthesizedExtensions,
+                                 Optional<unsigned> swiftVersion) override;
 
   void editorOpenSwiftSourceInterface(StringRef Name,
                                       StringRef SourceName,
@@ -388,6 +389,7 @@
 
   void getCursorInfo(StringRef Filename, unsigned Offset,
                      unsigned Length, bool Actionables,
+                     bool CancelOnSubsequentRequest,
                      ArrayRef<const char *> Args,
                      std::function<void(const CursorInfo &)> Receiver) override;
 
@@ -397,14 +399,16 @@
                    std::function<void(const NameTranslatingInfo &)> Receiver) override;
 
   void getRangeInfo(StringRef Filename, unsigned Offset, unsigned Length,
-                    ArrayRef<const char *> Args,
+                    bool CancelOnSubsequentRequest, ArrayRef<const char *> Args,
                     std::function<void(const RangeInfo&)> Receiver) override;
 
   void getCursorInfoFromUSR(
-      StringRef Filename, StringRef USR, ArrayRef<const char *> Args,
+      StringRef Filename, StringRef USR, bool CancelOnSubsequentRequest,
+      ArrayRef<const char *> Args,
       std::function<void(const CursorInfo &)> Receiver) override;
 
   void findRelatedIdentifiersInFile(StringRef Filename, unsigned Offset,
+                                    bool CancelOnSubsequentRequest,
                                     ArrayRef<const char *> Args,
               std::function<void(const RelatedIdentsInfo &)> Receiver) override;
 
diff --git a/tools/SourceKit/lib/SwiftLang/SwiftSourceDocInfo.cpp b/tools/SourceKit/lib/SwiftLang/SwiftSourceDocInfo.cpp
index 40d6ab7..2bd5289 100644
--- a/tools/SourceKit/lib/SwiftLang/SwiftSourceDocInfo.cpp
+++ b/tools/SourceKit/lib/SwiftLang/SwiftSourceDocInfo.cpp
@@ -613,9 +613,16 @@
   return false;
 }
 
-static Optional<unsigned> getParamParentNameOffset(const ValueDecl *VD) {
+static Optional<unsigned>
+getParamParentNameOffset(const ValueDecl *VD, SourceLoc Cursor) {
+  if (Cursor.isInvalid())
+    return None;
   SourceLoc Loc;
   if (auto PD = dyn_cast<ParamDecl>(VD)) {
+
+    // Avoid returning parent loc for internal-only names.
+    if (PD->getArgumentNameLoc().isValid() && PD->getArgumentNameLoc() != Cursor)
+      return None;
     auto *DC = PD->getDeclContext();
     switch (DC->getContextKind()) {
       case DeclContextKind::SubscriptDecl:
@@ -642,6 +649,7 @@
                                   const Type ContainerTy,
                                   bool IsRef,
                                   Optional<unsigned> OrigBufferID,
+                                  SourceLoc CursorLoc,
                                   SwiftLangSupport &Lang,
                                   const CompilerInvocation &Invok,
                             ArrayRef<ImmutableTextSnapshotRef> PreviousASTSnaps,
@@ -875,7 +883,7 @@
   Info.LocalizationKey = LocalizationKey;
   Info.IsSystem = IsSystem;
   Info.TypeInterface = StringRef();
-  Info.ParentNameOffset = getParamParentNameOffset(VD);
+  Info.ParentNameOffset = getParamParentNameOffset(VD, CursorLoc);
   Receiver(Info);
   return false;
 }
@@ -1023,6 +1031,8 @@
   SmallVector<ImmutableTextSnapshotRef, 4> PreviousASTSnaps;
 
 protected:
+  bool CancelOnSubsequentRequest;
+protected:
   ArrayRef<ImmutableTextSnapshotRef> getPreviousASTSnaps() {
     return llvm::makeArrayRef(PreviousASTSnaps);
   }
@@ -1030,9 +1040,10 @@
 public:
   CursorRangeInfoConsumer(StringRef InputFile, unsigned Offset, unsigned Length,
                           SwiftLangSupport &Lang, SwiftInvocationRef ASTInvok,
-                          bool TryExistingAST)
+                          bool TryExistingAST, bool CancelOnSubsequentRequest)
     : Lang(Lang), ASTInvok(ASTInvok),InputFile(InputFile), Offset(Offset),
-      Length(Length), TryExistingAST(TryExistingAST) { }
+      Length(Length), TryExistingAST(TryExistingAST),
+      CancelOnSubsequentRequest(CancelOnSubsequentRequest) {}
 
   bool canUseASTWithSnapshots(ArrayRef<ImmutableTextSnapshotRef> Snapshots) override {
     if (!TryExistingAST) {
@@ -1093,6 +1104,7 @@
                           unsigned Length, bool Actionables,
                           SwiftInvocationRef Invok,
                           bool TryExistingAST,
+                          bool CancelOnSubsequentRequest,
                           std::function<void(const CursorInfo &)> Receiver) {
   assert(Invok);
 
@@ -1106,9 +1118,11 @@
                        SwiftLangSupport &Lang,
                        SwiftInvocationRef ASTInvok,
                        bool TryExistingAST,
+                       bool CancelOnSubsequentRequest,
                        std::function<void(const CursorInfo &)> Receiver)
     : CursorRangeInfoConsumer(InputFile, Offset, Length, Lang, ASTInvok,
-                              TryExistingAST), Actionables(Actionables),
+                              TryExistingAST, CancelOnSubsequentRequest),
+      Actionables(Actionables),
       Receiver(std::move(Receiver)){ }
 
     void handlePrimaryAST(ASTUnitRef AstUnit) override {
@@ -1152,14 +1166,15 @@
         bool Failed = passCursorInfoForDecl(VD, MainModule,
                                             SemaTok.ContainerType,
                                             SemaTok.ContainerType,
-                                            SemaTok.IsRef, BufferID, Lang,
+                                            SemaTok.IsRef, BufferID, Loc, Lang,
                                             CompInvok, getPreviousASTSnaps(),
                                             Receiver);
         if (Failed) {
           if (!getPreviousASTSnaps().empty()) {
             // Attempt again using the up-to-date AST.
             resolveCursor(Lang, InputFile, Offset, Length, Actionables, ASTInvok,
-                          /*TryExistingAST=*/false, Receiver);
+                          /*TryExistingAST=*/false, CancelOnSubsequentRequest,
+                          Receiver);
           } else {
             Receiver({});
           }
@@ -1190,11 +1205,16 @@
 
   auto Consumer = std::make_shared<CursorInfoConsumer>(
     InputFile, Offset, Length, Actionables, Lang, Invok, TryExistingAST,
-    Receiver);
+    CancelOnSubsequentRequest, Receiver);
+
   /// FIXME: When request cancellation is implemented and Xcode adopts it,
   /// don't use 'OncePerASTToken'.
   static const char OncePerASTToken = 0;
-  Lang.getASTManager().processASTAsync(Invok, std::move(Consumer), &OncePerASTToken);
+  static const char OncePerASTTokenWithActionables = 0;
+  const void *Once = nullptr;
+  if (CancelOnSubsequentRequest)
+    Once = Actionables ? &OncePerASTTokenWithActionables : &OncePerASTToken;
+  Lang.getASTManager().processASTAsync(Invok, std::move(Consumer), Once);
 }
 
 static void resolveName(SwiftLangSupport &Lang, StringRef InputFile,
@@ -1214,8 +1234,9 @@
                      bool TryExistingAST, NameTranslatingInfo Input,
                      std::function<void(const NameTranslatingInfo &)> Receiver)
     : CursorRangeInfoConsumer(InputFile, Offset, 0, Lang, ASTInvok,
-                              TryExistingAST), Input(std::move(Input)),
-      Receiver(std::move(Receiver)){ }
+                              TryExistingAST,
+                              /*CancelOnSubsequentRequest=*/false),
+      Input(std::move(Input)), Receiver(std::move(Receiver)){ }
 
     void handlePrimaryAST(ASTUnitRef AstUnit) override {
       auto &CompIns = AstUnit->getCompilerInstance();
@@ -1288,17 +1309,13 @@
   auto Consumer = std::make_shared<NameInfoConsumer>(
     InputFile, Offset, Lang, Invok, TryExistingAST, Input, Receiver);
 
-  /// FIXME: When request cancellation is implemented and Xcode adopts it,
-  /// don't use 'OncePerASTToken'.
-  static const char OncePerASTToken = 0;
-  Lang.getASTManager().processASTAsync(Invok, std::move(Consumer),
-                                       &OncePerASTToken);
+  Lang.getASTManager().processASTAsync(Invok, std::move(Consumer), nullptr);
 }
 
 static void resolveRange(SwiftLangSupport &Lang,
                           StringRef InputFile, unsigned Offset, unsigned Length,
                           SwiftInvocationRef Invok,
-                          bool TryExistingAST,
+                          bool TryExistingAST, bool CancelOnSubsequentRequest,
                           std::function<void(const RangeInfo&)> Receiver) {
   assert(Invok);
 
@@ -1308,10 +1325,11 @@
   public:
     RangeInfoConsumer(StringRef InputFile, unsigned Offset, unsigned Length,
                        SwiftLangSupport &Lang, SwiftInvocationRef ASTInvok,
-                       bool TryExistingAST,
+                       bool TryExistingAST, bool CancelOnSubsequentRequest,
                        std::function<void(const RangeInfo&)> Receiver)
     : CursorRangeInfoConsumer(InputFile, Offset, Length, Lang, ASTInvok,
-                              TryExistingAST), Receiver(std::move(Receiver)){ }
+                              TryExistingAST, CancelOnSubsequentRequest),
+      Receiver(std::move(Receiver)){ }
 
     void handlePrimaryAST(ASTUnitRef AstUnit) override {
       if (trace::enabled()) {
@@ -1329,7 +1347,7 @@
       case RangeKind::SingleExpression: {
         SmallString<64> SS;
         llvm::raw_svector_ostream OS(SS);
-        Info.Ty.print(OS);
+        Info.ExitInfo.getPointer()->print(OS);
         Result.ExprType = OS.str();
         Receiver(Result);
         return;
@@ -1344,7 +1362,8 @@
         if (!getPreviousASTSnaps().empty()) {
           // Attempt again using the up-to-date AST.
           resolveRange(Lang, InputFile, Offset, Length, ASTInvok,
-                      /*TryExistingAST=*/false, Receiver);
+                      /*TryExistingAST=*/false, CancelOnSubsequentRequest,
+                      Receiver);
         } else {
           Receiver(Result);
         }
@@ -1365,17 +1384,18 @@
   };
 
   auto Consumer = std::make_shared<RangeInfoConsumer>(
-    InputFile, Offset, Length, Lang, Invok, TryExistingAST, Receiver);
+    InputFile, Offset, Length, Lang, Invok, TryExistingAST,
+    CancelOnSubsequentRequest, Receiver);
   /// FIXME: When request cancellation is implemented and Xcode adopts it,
   /// don't use 'OncePerASTToken'.
   static const char OncePerASTToken = 0;
-  Lang.getASTManager().processASTAsync(Invok, std::move(Consumer),
-                                       &OncePerASTToken);
+  const void *Once = CancelOnSubsequentRequest ? &OncePerASTToken : nullptr;
+  Lang.getASTManager().processASTAsync(Invok, std::move(Consumer), Once);
 }
 
 void SwiftLangSupport::getCursorInfo(
     StringRef InputFile, unsigned Offset, unsigned Length, bool Actionables,
-    ArrayRef<const char *> Args,
+    bool CancelOnSubsequentRequest, ArrayRef<const char *> Args,
     std::function<void(const CursorInfo &)> Receiver) {
 
   if (auto IFaceGenRef = IFaceGenContexts.get(InputFile)) {
@@ -1406,7 +1426,7 @@
           // it's not necessary.
           passCursorInfoForDecl(
               Entity.Dcl, /*MainModule*/ nullptr, Type(), Type(), Entity.IsRef,
-              /*OrigBufferID=*/None, *this, Invok, {}, Receiver);
+              /*OrigBufferID=*/None, SourceLoc(), *this, Invok, {}, Receiver);
         }
       } else {
         Receiver({});
@@ -1425,12 +1445,12 @@
   }
 
   resolveCursor(*this, InputFile, Offset, Length, Actionables, Invok,
-                /*TryExistingAST=*/true, Receiver);
+                /*TryExistingAST=*/true, CancelOnSubsequentRequest, Receiver);
 }
 
 void SwiftLangSupport::
 getRangeInfo(StringRef InputFile, unsigned Offset, unsigned Length,
-             ArrayRef<const char *> Args,
+             bool CancelOnSubsequentRequest, ArrayRef<const char *> Args,
              std::function<void(const RangeInfo&)> Receiver) {
   if (IFaceGenContexts.get(InputFile)) {
     // FIXME: return range info for generated interfaces.
@@ -1450,7 +1470,7 @@
     return;
   }
   resolveRange(*this, InputFile, Offset, Length, Invok, /*TryExistingAST=*/true,
-                Receiver);
+               CancelOnSubsequentRequest, Receiver);
 }
 
 void SwiftLangSupport::
@@ -1509,6 +1529,7 @@
 static void
 resolveCursorFromUSR(SwiftLangSupport &Lang, StringRef InputFile, StringRef USR,
                      SwiftInvocationRef Invok, bool TryExistingAST,
+                     bool CancelOnSubsequentRequest,
                      std::function<void(const CursorInfo &)> Receiver) {
   assert(Invok);
 
@@ -1518,16 +1539,18 @@
     SwiftLangSupport &Lang;
     SwiftInvocationRef ASTInvok;
     const bool TryExistingAST;
+    bool CancelOnSubsequentRequest;
     std::function<void(const CursorInfo &)> Receiver;
     SmallVector<ImmutableTextSnapshotRef, 4> PreviousASTSnaps;
 
   public:
     CursorInfoConsumer(StringRef InputFile, StringRef USR,
                        SwiftLangSupport &Lang, SwiftInvocationRef ASTInvok,
-                       bool TryExistingAST,
+                       bool TryExistingAST, bool CancelOnSubsequentRequest,
                        std::function<void(const CursorInfo &)> Receiver)
         : InputFile(InputFile), USR(USR), Lang(Lang),
           ASTInvok(std::move(ASTInvok)), TryExistingAST(TryExistingAST),
+          CancelOnSubsequentRequest(CancelOnSubsequentRequest),
           Receiver(std::move(Receiver)) {}
 
     bool canUseASTWithSnapshots(
@@ -1593,13 +1616,14 @@
         }
         bool Failed =
             passCursorInfoForDecl(VD, MainModule, selfTy, Type(),
-                                  /*IsRef=*/false, BufferID, Lang, CompInvok,
-                                  PreviousASTSnaps, Receiver);
+                                  /*IsRef=*/false, BufferID, SourceLoc(), Lang,
+                                  CompInvok, PreviousASTSnaps, Receiver);
         if (Failed) {
           if (!PreviousASTSnaps.empty()) {
             // Attempt again using the up-to-date AST.
             resolveCursorFromUSR(Lang, InputFile, USR, ASTInvok,
-                                 /*TryExistingAST=*/false, Receiver);
+                                 /*TryExistingAST=*/false,
+                                 CancelOnSubsequentRequest, Receiver);
           } else {
             Receiver({});
           }
@@ -1620,16 +1644,18 @@
   };
 
   auto Consumer = std::make_shared<CursorInfoConsumer>(
-      InputFile, USR, Lang, Invok, TryExistingAST, Receiver);
+      InputFile, USR, Lang, Invok, TryExistingAST, CancelOnSubsequentRequest,
+      Receiver);
   /// FIXME: When request cancellation is implemented and Xcode adopts it,
   /// don't use 'OncePerASTToken'.
   static const char OncePerASTToken = 0;
-  Lang.getASTManager().processASTAsync(Invok, std::move(Consumer),
-                                       &OncePerASTToken);
+  const void *Once = CancelOnSubsequentRequest ? &OncePerASTToken : nullptr;
+  Lang.getASTManager().processASTAsync(Invok, std::move(Consumer), Once);
 }
 
 void SwiftLangSupport::getCursorInfoFromUSR(
-    StringRef filename, StringRef USR, ArrayRef<const char *> args,
+    StringRef filename, StringRef USR, bool CancelOnSubsequentRequest,
+    ArrayRef<const char *> args,
     std::function<void(const CursorInfo &)> receiver) {
   if (auto IFaceGenRef = IFaceGenContexts.get(filename)) {
     LOG_WARN_FUNC("info from usr for generated interface not implemented yet");
@@ -1647,7 +1673,7 @@
   }
 
   resolveCursorFromUSR(*this, filename, USR, invok, /*TryExistingAST=*/true,
-                       receiver);
+                       CancelOnSubsequentRequest, receiver);
 }
 
 //===----------------------------------------------------------------------===//
@@ -1716,6 +1742,7 @@
 
 void SwiftLangSupport::findRelatedIdentifiersInFile(
     StringRef InputFile, unsigned Offset,
+    bool CancelOnSubsequentRequest,
     ArrayRef<const char *> Args,
     std::function<void(const RelatedIdentsInfo &)> Receiver) {
 
@@ -1812,5 +1839,6 @@
   /// FIXME: When request cancellation is implemented and Xcode adopts it,
   /// don't use 'OncePerASTToken'.
   static const char OncePerASTToken = 0;
-  ASTMgr->processASTAsync(Invok, std::move(Consumer), &OncePerASTToken);
+  const void *Once = CancelOnSubsequentRequest ? &OncePerASTToken : nullptr;
+  ASTMgr->processASTAsync(Invok, std::move(Consumer), Once);
 }
diff --git a/tools/SourceKit/tools/sourcekitd-test/Options.td b/tools/SourceKit/tools/sourcekitd-test/Options.td
index 19206de..c241581 100644
--- a/tools/SourceKit/tools/sourcekitd-test/Options.td
+++ b/tools/SourceKit/tools/sourcekitd-test/Options.td
@@ -94,6 +94,9 @@
 def end_pos : Separate<["-"], "end-pos">, HelpText<"line:col">;
 def end_pos_EQ : Joined<["-"], "end-pos=">, Alias<end_pos>;
 
+def swift_version : Separate<["-"], "swift-version">, HelpText<"the swift version to use">;
+def swift_version_EQ : Joined<["-"], "swift-version=">, Alias<swift_version>;
+
 def swift_name : Separate<["-"], "swift-name">,
   HelpText<"Swift name to translate from">;
 
@@ -103,6 +106,11 @@
 def objc_selector : Separate<["-"], "objc-selector">,
   HelpText<"Objective-C selector name to translate from">;
 
+def cancel_on_subsequent_request : Separate<["-"], "cancel-on-subsequent-request">,
+  HelpText<"Whether to cancel if there is a subsequent request using the same AST">;
+def cancel_on_subsequent_request_EQ : Joined<["-"], "cancel-on-subsequent-request=">,
+  Alias<cancel_on_subsequent_request>;
+
 def help : Flag<["-", "--"], "help">,
   HelpText<"Display available options">;
 
diff --git a/tools/SourceKit/tools/sourcekitd-test/TestOptions.cpp b/tools/SourceKit/tools/sourcekitd-test/TestOptions.cpp
index d31bb04..2cd97dd 100644
--- a/tools/SourceKit/tools/sourcekitd-test/TestOptions.cpp
+++ b/tools/SourceKit/tools/sourcekitd-test/TestOptions.cpp
@@ -179,6 +179,16 @@
       break;
     }
 
+      case OPT_swift_version: {
+        unsigned ver;
+        if (StringRef(InputArg->getValue()).getAsInteger(10, ver)) {
+          llvm::errs() << "error: expected integer for 'swift-version'\n";
+          return true;
+        }
+        SwiftVersion = ver;
+        break;
+      }
+
     case OPT_line:
       if (StringRef(InputArg->getValue()).getAsInteger(10, Line)) {
         llvm::errs() << "error: expected integer for 'line'\n";
@@ -282,6 +292,15 @@
       ObjCSelector = InputArg->getValue();
       break;
 
+    case OPT_cancel_on_subsequent_request:
+      unsigned Cancel;
+      if (StringRef(InputArg->getValue()).getAsInteger(10, Cancel)) {
+        llvm::errs() << "error: expected integer for 'cancel-on-subsequent-request'\n";
+        return true;
+      }
+      CancelOnSubsequentRequest = Cancel;
+      break;
+
     case OPT_UNKNOWN:
       llvm::errs() << "error: unknown argument: "
                    << InputArg->getAsString(ParsedArgs) << '\n'
diff --git a/tools/SourceKit/tools/sourcekitd-test/TestOptions.h b/tools/SourceKit/tools/sourcekitd-test/TestOptions.h
index 1b59ac3..fb06c47 100644
--- a/tools/SourceKit/tools/sourcekitd-test/TestOptions.h
+++ b/tools/SourceKit/tools/sourcekitd-test/TestOptions.h
@@ -69,6 +69,7 @@
   unsigned EndCol = 0;
   unsigned Offset = 0;
   unsigned Length = 0;
+  llvm::Optional<unsigned> SwiftVersion;
   llvm::Optional<std::string> ReplaceText;
   std::string ModuleName;
   std::string HeaderPath;
@@ -89,6 +90,7 @@
   bool SynthesizedExtensions = false;
   bool CollectActionables = false;
   bool isAsyncRequest = false;
+  llvm::Optional<bool> CancelOnSubsequentRequest;
   bool parseArgs(llvm::ArrayRef<const char *> Args);
   void printHelp(bool ShowHidden) const;
 };
diff --git a/tools/SourceKit/tools/sourcekitd-test/sourcekitd-test.cpp b/tools/SourceKit/tools/sourcekitd-test/sourcekitd-test.cpp
index a8eb9ab..bc5aa9d 100644
--- a/tools/SourceKit/tools/sourcekitd-test/sourcekitd-test.cpp
+++ b/tools/SourceKit/tools/sourcekitd-test/sourcekitd-test.cpp
@@ -140,6 +140,8 @@
 static sourcekitd_uid_t KeyArgNames;
 static sourcekitd_uid_t KeySelectorPieces;
 static sourcekitd_uid_t KeyNameKind;
+static sourcekitd_uid_t KeySwiftVersion;
+static sourcekitd_uid_t KeyCancelOnSubsequentRequest;
 
 static sourcekitd_uid_t RequestProtocolVersion;
 static sourcekitd_uid_t RequestDemangle;
@@ -271,6 +273,9 @@
   KeySelectorPieces = sourcekitd_uid_get_from_cstr("key.selectorpieces");
   KeyNameKind = sourcekitd_uid_get_from_cstr("key.namekind");
 
+  KeySwiftVersion = sourcekitd_uid_get_from_cstr("key.swift_version");
+  KeyCancelOnSubsequentRequest = sourcekitd_uid_get_from_cstr("key.cancel_on_subsequent_request");
+
   SemaDiagnosticStage = sourcekitd_uid_get_from_cstr("source.diagnostic.stage.swift.sema");
 
   NoteDocUpdate = sourcekitd_uid_get_from_cstr("source.notification.editor.documentupdate");
@@ -825,6 +830,15 @@
     sourcekitd_request_dictionary_set_string(Req, KeyFilePath,
                                              Opts.HeaderPath.c_str());
   }
+  if (Opts.CancelOnSubsequentRequest.hasValue()) {
+    sourcekitd_request_dictionary_set_int64(Req, KeyCancelOnSubsequentRequest,
+                                            *Opts.CancelOnSubsequentRequest);
+  }
+
+  if (Opts.SwiftVersion.hasValue()) {
+    sourcekitd_request_dictionary_set_int64(Req, KeySwiftVersion,
+                                             Opts.SwiftVersion.getValue());
+  }
 
   if (Opts.PrintRequest)
     sourcekitd_request_description_dump(Req);
diff --git a/tools/SourceKit/tools/sourcekitd/include/sourcekitd/Internal.h b/tools/SourceKit/tools/sourcekitd/include/sourcekitd/Internal.h
index 3532c0f..3db99fe 100644
--- a/tools/SourceKit/tools/sourcekitd/include/sourcekitd/Internal.h
+++ b/tools/SourceKit/tools/sourcekitd/include/sourcekitd/Internal.h
@@ -142,6 +142,7 @@
                             llvm::function_ref<bool(RequestDict)> applier);
 
   bool getInt64(SourceKit::UIdent Key, int64_t &Val, bool isOptional);
+  Optional<int64_t> getOptionalInt64(SourceKit::UIdent Key);
 };
 
 void initialize();
diff --git a/tools/SourceKit/tools/sourcekitd/lib/API/DictionaryKeys.h b/tools/SourceKit/tools/sourcekitd/lib/API/DictionaryKeys.h
index 098c8cf..7baf984 100644
--- a/tools/SourceKit/tools/sourcekitd/lib/API/DictionaryKeys.h
+++ b/tools/SourceKit/tools/sourcekitd/lib/API/DictionaryKeys.h
@@ -125,6 +125,7 @@
 extern SourceKit::UIdent KeyModuleGroups;
 
 extern SourceKit::UIdent KeyRangeContent;
+extern SourceKit::UIdent KeyCancelOnSubsequentRequest;
 
 extern SourceKit::UIdent KeyBaseName;
 extern SourceKit::UIdent KeyArgNames;
@@ -132,6 +133,8 @@
 extern SourceKit::UIdent KeyNameKind;
 extern SourceKit::UIdent KeyLocalizationKey;
 
+extern SourceKit::UIdent KeySwiftVersion;
+
 /// \brief Used for determining the printing order of dictionary keys.
 bool compareDictKeys(SourceKit::UIdent LHS, SourceKit::UIdent RHS);
 
diff --git a/tools/SourceKit/tools/sourcekitd/lib/API/Requests.cpp b/tools/SourceKit/tools/sourcekitd/lib/API/Requests.cpp
index eb5abb6..a5571c4 100644
--- a/tools/SourceKit/tools/sourcekitd/lib/API/Requests.cpp
+++ b/tools/SourceKit/tools/sourcekitd/lib/API/Requests.cpp
@@ -192,6 +192,7 @@
 
 static void findRelatedIdents(StringRef Filename,
                               int64_t Offset,
+                              bool CancelOnSubsequentRequest,
                               ArrayRef<const char *> Args,
                               ResponseReceiver Rec);
 
@@ -225,7 +226,8 @@
 static sourcekitd_response_t
 editorOpenHeaderInterface(StringRef Name, StringRef HeaderName,
                           ArrayRef<const char *> Args,
-                          bool SynthesizedExtensions);
+                          bool SynthesizedExtensions,
+                          Optional<unsigned> swiftVersion);
 
 static void
 editorOpenSwiftSourceInterface(StringRef Name, StringRef SourceName,
@@ -524,8 +526,12 @@
     int64_t SynthesizedExtension = false;
     Req.getInt64(KeySynthesizedExtension, SynthesizedExtension,
                  /*isOptional=*/true);
+    Optional<int64_t> swiftVerVal = Req.getOptionalInt64(KeySwiftVersion);
+    Optional<unsigned> swiftVer;
+    if (swiftVerVal.hasValue())
+      swiftVer = *swiftVerVal;
     return Rec(editorOpenHeaderInterface(*Name, *HeaderName, Args,
-                                         SynthesizedExtension));
+                                         SynthesizedExtension, swiftVer));
   }
 
   if (ReqUID == RequestEditorOpenSwiftSourceInterface) {
@@ -753,6 +759,11 @@
   if (ReqUID == RequestCursorInfo) {
     LangSupport &Lang = getGlobalContext().getSwiftLangSupport();
 
+    // For backwards compatibility, the default is 1.
+    int64_t CancelOnSubsequentRequest = 1;
+    Req.getInt64(KeyCancelOnSubsequentRequest, CancelOnSubsequentRequest,
+                 /*isOptional=*/true);
+
     int64_t Offset;
     if (!Req.getInt64(KeyOffset, Offset, /*isOptional=*/false)) {
       int64_t Length = 0;
@@ -760,12 +771,12 @@
       int64_t Actionables = false;
       Req.getInt64(KeyActionable, Actionables, /*isOptional=*/true);
       return Lang.getCursorInfo(
-          *SourceFile, Offset, Length, Actionables, Args,
-          [Rec](const CursorInfo &Info) { reportCursorInfo(Info, Rec); });
+          *SourceFile, Offset, Length, Actionables, CancelOnSubsequentRequest,
+          Args, [Rec](const CursorInfo &Info) { reportCursorInfo(Info, Rec); });
     }
     if (auto USR = Req.getString(KeyUSR)) {
       return Lang.getCursorInfoFromUSR(
-          *SourceFile, *USR, Args,
+          *SourceFile, *USR, CancelOnSubsequentRequest, Args,
           [Rec](const CursorInfo &Info) { reportCursorInfo(Info, Rec); });
     }
 
@@ -777,9 +788,14 @@
     LangSupport &Lang = getGlobalContext().getSwiftLangSupport();
     int64_t Offset;
     int64_t Length;
+    // For backwards compatibility, the default is 1.
+    int64_t CancelOnSubsequentRequest = 1;
+    Req.getInt64(KeyCancelOnSubsequentRequest, CancelOnSubsequentRequest,
+                 /*isOptional=*/true);
     if (!Req.getInt64(KeyOffset, Offset, /*isOptional=*/false)) {
       if (!Req.getInt64(KeyLength, Length, /*isOptional=*/false)) {
-        return Lang.getRangeInfo(*SourceFile, Offset, Length, Args,
+        return Lang.getRangeInfo(*SourceFile, Offset, Length,
+                                 CancelOnSubsequentRequest, Args,
           [Rec](const RangeInfo &Info) { reportRangeInfo(Info, Rec); });
       }
     }
@@ -830,7 +846,14 @@
     int64_t Offset;
     if (Req.getInt64(KeyOffset, Offset, /*isOptional=*/false))
       return Rec(createErrorRequestInvalid("missing 'key.offset'"));
-    return findRelatedIdents(*SourceFile, Offset, Args, Rec);
+
+    // For backwards compatibility, the default is 1.
+    int64_t CancelOnSubsequentRequest = 1;
+    Req.getInt64(KeyCancelOnSubsequentRequest, CancelOnSubsequentRequest,
+                 /*isOptional=*/true);
+
+    return findRelatedIdents(*SourceFile, Offset, CancelOnSubsequentRequest,
+                             Args, Rec);
   }
 
   {
@@ -1509,11 +1532,12 @@
 
 static void findRelatedIdents(StringRef Filename,
                               int64_t Offset,
+                              bool CancelOnSubsequentRequest,
                               ArrayRef<const char *> Args,
                               ResponseReceiver Rec) {
   LangSupport &Lang = getGlobalContext().getSwiftLangSupport();
-  Lang.findRelatedIdentifiersInFile(Filename, Offset, Args,
-                                    [Rec](const RelatedIdentsInfo &Info) {
+  Lang.findRelatedIdentifiersInFile(Filename, Offset, CancelOnSubsequentRequest,
+                                    Args, [Rec](const RelatedIdentsInfo &Info) {
     if (Info.IsCancelled)
       return Rec(createErrorRequestCancelled());
 
@@ -2016,14 +2040,15 @@
 static sourcekitd_response_t
 editorOpenHeaderInterface(StringRef Name, StringRef HeaderName,
                           ArrayRef<const char *> Args,
-                          bool SynthesizedExtensions) {
+                          bool SynthesizedExtensions,
+                          Optional<unsigned> swiftVersion) {
   SKEditorConsumer EditC(/*EnableSyntaxMap=*/true,
                          /*EnableStructure=*/true,
                          /*EnableDiagnostics=*/false,
                          /*SyntacticOnly=*/false);
   LangSupport &Lang = getGlobalContext().getSwiftLangSupport();
   Lang.editorOpenHeaderInterface(EditC, Name, HeaderName, Args,
-                                 SynthesizedExtensions);
+                                 SynthesizedExtensions, swiftVersion);
   return EditC.createResponse();
 }
 
diff --git a/tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-Common.cpp b/tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-Common.cpp
index 48dbbd0..b5d25e1 100644
--- a/tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-Common.cpp
+++ b/tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-Common.cpp
@@ -124,6 +124,7 @@
 UIdent sourcekitd::KeyHide("key.hide");
 UIdent sourcekitd::KeySimplified("key.simplified");
 UIdent sourcekitd::KeyRangeContent("key.rangecontent");
+UIdent sourcekitd::KeyCancelOnSubsequentRequest("key.cancel_on_subsequent_request");
 
 UIdent sourcekitd::KeyIsDeprecated("key.is_deprecated");
 UIdent sourcekitd::KeyIsUnavailable("key.is_unavailable");
@@ -145,6 +146,8 @@
 UIdent sourcekitd::KeyNameKind("key.namekind");
 UIdent sourcekitd::KeyLocalizationKey("key.localization_key");
 
+UIdent sourcekitd::KeySwiftVersion("key.swift_version");
+
 /// \brief Order for the keys to use when emitting the debug description of
 /// dictionaries.
 static UIdent *OrderedKeys[] = {
@@ -243,7 +246,9 @@
   &KeyArgNames,
   &KeySelectorPieces,
   &KeyNameKind,
+  &KeyLocalizationKey,
 
+  &KeySwiftVersion,
 };
 
 static unsigned findPrintOrderForDictKey(UIdent Key) {
diff --git a/tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-InProc.cpp b/tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-InProc.cpp
index f5af64f..60717b4 100644
--- a/tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-InProc.cpp
+++ b/tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-InProc.cpp
@@ -760,6 +760,13 @@
   return false;
 }
 
+Optional<int64_t> RequestDict::getOptionalInt64(SourceKit::UIdent Key) {
+  auto Object = static_cast<SKDObject *>(Dict)->get(SKDUIDFromUIdent(Key));
+  if (!Object)
+    return None;
+  return Object->getInt64().getValueOr(0);
+}
+
 sourcekitd_response_t
 sourcekitd::createErrorRequestInvalid(const char *Description) {
   return retained(new SKDError(SOURCEKITD_ERROR_REQUEST_INVALID, 
diff --git a/tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-XPC.cpp b/tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-XPC.cpp
index 8ae9adb..4dedc75 100644
--- a/tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-XPC.cpp
+++ b/tools/SourceKit/tools/sourcekitd/lib/API/sourcekitdAPI-XPC.cpp
@@ -351,6 +351,13 @@
   return false;
 }
 
+Optional<int64_t> RequestDict::getOptionalInt64(SourceKit::UIdent Key) {
+  xpc_object_t xobj = xpc_dictionary_get_value(Dict, Key.c_str());
+  if (!xobj)
+    return None;
+  return xpc_int64_get_value(xobj);
+}
+
 sourcekitd_response_t
 sourcekitd::createErrorRequestInvalid(const char *Description) {
   return CustomXPCData::createErrorRequestInvalid(Description).getXObj();
diff --git a/tools/driver/swift_format_main.cpp b/tools/driver/swift_format_main.cpp
index 2873b29..aaa2046 100644
--- a/tools/driver/swift_format_main.cpp
+++ b/tools/driver/swift_format_main.cpp
@@ -162,11 +162,6 @@
       InputFilenames.push_back(A->getValue());
     }
 
-    if (InputFilenames.empty()) {
-      Diags.diagnose(SourceLoc(), diag::error_mode_requires_an_input_file);
-      return 1;
-    }
-
     if (const Arg *A = ParsedArgs.getLastArg(OPT_o)) {
       OutputFilename = A->getValue();
     }
@@ -254,7 +249,7 @@
 
   DiagnosticEngine &Diags = Instance.getDiags();
   if (Invocation.parseArgs(Args, Diags) != 0)
-    return 1;
+    return EXIT_FAILURE;
 
   std::vector<std::string> InputFiles = Invocation.getInputFilenames();
   unsigned NumInputFiles = InputFiles.size();
@@ -268,10 +263,11 @@
       // We don't support formatting file ranges for multiple files.
       Instance.getDiags().diagnose(SourceLoc(),
                                    diag::error_formatting_multiple_file_ranges);
-      return 1;
+      return EXIT_FAILURE;
     }
     for (unsigned i = 0; i < NumInputFiles; ++i)
       Invocation.format(InputFiles[i], Diags);
   }
-  return 0;
+
+  return EXIT_SUCCESS;
 }
diff --git a/tools/swift-api-digester/swift-api-digester.cpp b/tools/swift-api-digester/swift-api-digester.cpp
index c5c2019..1afbebe 100644
--- a/tools/swift-api-digester/swift-api-digester.cpp
+++ b/tools/swift-api-digester/swift-api-digester.cpp
@@ -954,7 +954,7 @@
   if (Ty->isVoid()) {
     return Ctx.buffer("Void");
   }
-  if (NameAliasType *NAT = dyn_cast<NameAliasType>(Ty.getPointer())) {
+  if (auto *NAT = dyn_cast<NameAliasType>(Ty.getPointer())) {
     return NAT->getDecl()->getNameStr();
   }
   if (Ty->getAnyNominal()) {
@@ -2471,7 +2471,7 @@
   }
 
   void visit(NodePtr Node) override {
-    SDKNodeDecl *Parent = dyn_cast<SDKNodeDecl>(Node);
+    auto *Parent = dyn_cast<SDKNodeDecl>(Node);
     if (!Parent) {
       if (auto TN = dyn_cast<SDKNodeType>(Node)) {
         Parent = TN->getClosestParentDecl();
diff --git a/tools/swift-ide-test/swift-ide-test.cpp b/tools/swift-ide-test/swift-ide-test.cpp
index 9a3c22b..0f424d0 100644
--- a/tools/swift-ide-test/swift-ide-test.cpp
+++ b/tools/swift-ide-test/swift-ide-test.cpp
@@ -353,13 +353,6 @@
     llvm::cl::init(false));
 
 static llvm::cl::opt<bool>
-EnableDeserializationRecovery(
-    "enable-experimental-deserialization-recovery",
-    llvm::cl::desc("Attempt to recover from missing xrefs (etc) in swiftmodules"),
-    llvm::cl::cat(Category),
-    llvm::cl::init(false));
-
-static llvm::cl::opt<bool>
 DisableObjCAttrRequiresFoundationModule(
     "disable-objc-attr-requires-foundation-module",
     llvm::cl::desc("Allow @objc to be used freely"),
@@ -1240,7 +1233,7 @@
   bool walkToDeclPre(Decl *D, CharSourceRange Range) override {
     if (Range.getByteLength() == 0)
       return true;
-    if (ValueDecl *VD = dyn_cast<ValueDecl>(D))
+    if (auto *VD = dyn_cast<ValueDecl>(D))
       annotateSourceEntity({ Range, VD, nullptr, /*IsRef=*/false});
     return true;
   }
@@ -1626,7 +1619,7 @@
     if (isa<ProtocolDecl>(D)) {
       InProtocol = true;
       DefaultImplementationMap.clear();
-      ProtocolDecl *PD = const_cast<ProtocolDecl*>(dyn_cast<ProtocolDecl>(D));
+      auto *PD = const_cast<ProtocolDecl*>(dyn_cast<ProtocolDecl>(D));
       collectDefaultImplementationForProtocolMembers(PD,
                                                      DefaultImplementationMap);
     }
@@ -2497,7 +2490,7 @@
 
 private:
   bool walkToDeclPre(Decl *D, CharSourceRange Range) override {
-    if (ValueDecl *VD = dyn_cast<ValueDecl>(D))
+    if (auto *VD = dyn_cast<ValueDecl>(D))
       printUSR(VD, Range.getStart());
     return true;
   }
@@ -3017,8 +3010,6 @@
   InitInvok.getLangOptions().EnableSwift3ObjCInference =
     options::EnableSwift3ObjCInference ||
     InitInvok.getLangOptions().isSwiftVersion3();
-  InitInvok.getLangOptions().EnableDeserializationRecovery |=
-    options::EnableDeserializationRecovery;
   InitInvok.getClangImporterOptions().ImportForwardDeclarations |=
     options::ObjCForwardDeclarations;
   InitInvok.getClangImporterOptions().InferImportAsMember |=
diff --git a/unittests/AST/CMakeLists.txt b/unittests/AST/CMakeLists.txt
index 63cbb73..69b238b 100644
--- a/unittests/AST/CMakeLists.txt
+++ b/unittests/AST/CMakeLists.txt
@@ -1,7 +1,7 @@
 add_swift_unittest(SwiftASTTests
-  OverrideTests.cpp
   SourceLocTests.cpp
   TestContext.cpp
+  TypeMatchTests.cpp
   VersionRangeLattice.cpp
 )
 
diff --git a/unittests/AST/OverrideTests.cpp b/unittests/AST/OverrideTests.cpp
deleted file mode 100644
index 249b1de..0000000
--- a/unittests/AST/OverrideTests.cpp
+++ /dev/null
@@ -1,342 +0,0 @@
-//===--- OverrideTests.cpp - Tests for overriding logic -------------------===//
-//
-// This source file is part of the Swift.org open source project
-//
-// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
-// Licensed under Apache License v2.0 with Runtime Library Exception
-//
-// See https://swift.org/LICENSE.txt for license information
-// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
-//
-//===----------------------------------------------------------------------===//
-
-#include "TestContext.h"
-#include "swift/AST/ASTContext.h"
-#include "swift/AST/DiagnosticEngine.h"
-#include "swift/AST/Module.h"
-#include "swift/AST/SearchPathOptions.h"
-#include "swift/AST/Types.h"
-#include "swift/Basic/LangOptions.h"
-#include "swift/Basic/SourceManager.h"
-#include "swift/Strings.h"
-#include "swift/Subsystems.h"
-#include "llvm/ADT/Triple.h"
-#include "llvm/Support/Host.h"
-#include "gtest/gtest.h"
-
-using namespace swift;
-using namespace swift::unittest;
-
-TEST(Override, IdenticalTypes) {
-  TestContext C;
-
-  auto check = [&C](Type ty) {
-    return ty->canOverride(ty, OverrideMatchMode::Strict, /*resolver*/nullptr);
-  };
-
-  EXPECT_TRUE(check(C.Ctx.TheEmptyTupleType));
-  EXPECT_TRUE(check(C.Ctx.TheRawPointerType));
-
-  Type voidToVoidFn = FunctionType::get(C.Ctx.TheEmptyTupleType,
-                                        C.Ctx.TheEmptyTupleType);
-  EXPECT_TRUE(check(voidToVoidFn));
-
-  Type ptrToPtrFn = FunctionType::get(C.Ctx.TheRawPointerType,
-                                      C.Ctx.TheRawPointerType);
-  EXPECT_TRUE(check(ptrToPtrFn));
-
-  auto *someStruct = C.makeNominal<StructDecl>("MyStruct");
-  Type structTy = someStruct->getDeclaredInterfaceType();
-  EXPECT_TRUE(check(structTy));
-
-  Type structToStructFn = FunctionType::get(structTy, structTy);
-  EXPECT_TRUE(check(structToStructFn));
-}
-
-TEST(Override, UnrelatedTypes) {
-  TestContext C;
-
-  auto check = [&C](Type base, Type derived) {
-    return derived->canOverride(base, OverrideMatchMode::Strict,
-                                /*resolver*/nullptr);
-  };
-
-  EXPECT_FALSE(check(C.Ctx.TheEmptyTupleType, C.Ctx.TheRawPointerType));
-  EXPECT_FALSE(check(C.Ctx.TheRawPointerType, C.Ctx.TheEmptyTupleType));
-
-  Type voidToVoidFn = FunctionType::get(C.Ctx.TheEmptyTupleType,
-                                        C.Ctx.TheEmptyTupleType);
-  EXPECT_FALSE(check(voidToVoidFn, C.Ctx.TheEmptyTupleType));
-  EXPECT_FALSE(check(C.Ctx.TheEmptyTupleType, voidToVoidFn));
-
-  Type ptrToPtrFn = FunctionType::get(C.Ctx.TheRawPointerType,
-                                      C.Ctx.TheRawPointerType);
-  EXPECT_FALSE(check(ptrToPtrFn, voidToVoidFn));
-  EXPECT_FALSE(check(voidToVoidFn, ptrToPtrFn));
-
-  auto *someStruct = C.makeNominal<StructDecl>("MyStruct");
-  Type structTy = someStruct->getDeclaredInterfaceType();
-  EXPECT_FALSE(check(structTy, C.Ctx.TheEmptyTupleType));
-  EXPECT_FALSE(check(C.Ctx.TheEmptyTupleType, structTy));
-  EXPECT_FALSE(check(structTy, voidToVoidFn));
-  EXPECT_FALSE(check(voidToVoidFn, structTy));
-
-  Type structToStructFn = FunctionType::get(structTy, structTy);
-  EXPECT_FALSE(check(structToStructFn, structTy));
-  EXPECT_FALSE(check(structTy, structToStructFn));
-  EXPECT_FALSE(check(structToStructFn, voidToVoidFn));
-  EXPECT_FALSE(check(voidToVoidFn, structToStructFn));
-
-  auto *anotherStruct = C.makeNominal<StructDecl>("AnotherStruct");
-  Type anotherStructTy = anotherStruct->getDeclaredInterfaceType();
-  EXPECT_FALSE(check(structTy, anotherStructTy));
-  EXPECT_FALSE(check(anotherStructTy, structTy));
-
-  Type anotherStructToAnotherStructFn = FunctionType::get(anotherStructTy,
-                                                          anotherStructTy);
-  EXPECT_FALSE(check(anotherStructToAnotherStructFn, structToStructFn));
-  EXPECT_FALSE(check(structToStructFn, anotherStructToAnotherStructFn));
-
-  Type S2ASFn = FunctionType::get(structTy, anotherStructTy);
-  EXPECT_FALSE(check(S2ASFn, structToStructFn));
-  EXPECT_FALSE(check(structToStructFn, S2ASFn));
-  EXPECT_FALSE(check(S2ASFn, anotherStructToAnotherStructFn));
-  EXPECT_FALSE(check(anotherStructToAnotherStructFn, S2ASFn));
-}
-
-TEST(Override, Classes) {
-  TestContext C;
-
-  auto check = [&C](Type base, Type derived) {
-    return derived->canOverride(base, OverrideMatchMode::Strict,
-                                /*resolver*/nullptr);
-  };
-
-  auto *baseClass = C.makeNominal<ClassDecl>("Base");
-  Type baseTy = baseClass->getDeclaredInterfaceType();
-
-  auto *subClass = C.makeNominal<ClassDecl>("Sub");
-  subClass->setSuperclass(baseTy);
-  Type subTy = subClass->getDeclaredInterfaceType();
-
-  EXPECT_TRUE(check(baseTy, subTy));
-  EXPECT_FALSE(check(subTy, baseTy));
-
-  auto *otherClass = C.makeNominal<ClassDecl>("Other");
-  Type otherTy = otherClass->getDeclaredInterfaceType();
-  EXPECT_FALSE(check(otherTy, baseTy));
-  EXPECT_FALSE(check(baseTy, otherTy));
-  EXPECT_FALSE(check(otherTy, subTy));
-  EXPECT_FALSE(check(subTy, otherTy));
-
-  Type baseToVoid = FunctionType::get(baseTy, C.Ctx.TheEmptyTupleType);
-  Type subToVoid = FunctionType::get(subTy, C.Ctx.TheEmptyTupleType);
-  EXPECT_FALSE(check(baseToVoid, subToVoid));
-  EXPECT_TRUE(check(subToVoid, baseToVoid));
-
-  Type voidToBase = FunctionType::get(C.Ctx.TheEmptyTupleType, baseTy);
-  Type voidToSub = FunctionType::get(C.Ctx.TheEmptyTupleType, subTy);
-  EXPECT_FALSE(check(voidToSub, voidToBase));
-  EXPECT_TRUE(check(voidToBase, voidToSub));
-
-  Type baseToBase = FunctionType::get(baseTy, baseTy);
-  Type subToSub = FunctionType::get(subTy, subTy);
-  EXPECT_FALSE(check(baseToBase, subToSub));
-  EXPECT_FALSE(check(subToSub, baseToBase));
-}
-
-TEST(Override, Optionals) {
-  TestContext C{DeclareOptionalTypes};
-
-  auto check = [&C](Type base, Type derived) {
-    return derived->canOverride(base, OverrideMatchMode::Strict,
-                                /*resolver*/nullptr);
-  };
-
-  auto *baseClass = C.makeNominal<ClassDecl>("Base");
-  Type baseTy = baseClass->getDeclaredInterfaceType();
-  Type optTy = OptionalType::get(baseTy);
-
-  EXPECT_FALSE(check(baseTy, optTy));
-  EXPECT_TRUE(check(optTy, baseTy));
-
-  Type baseToVoid = FunctionType::get(baseTy, C.Ctx.TheEmptyTupleType);
-  Type optToVoid = FunctionType::get(optTy, C.Ctx.TheEmptyTupleType);
-  EXPECT_TRUE(check(baseToVoid, optToVoid));
-  EXPECT_FALSE(check(optToVoid, baseToVoid));
-
-  Type voidToBase = FunctionType::get(C.Ctx.TheEmptyTupleType, baseTy);
-  Type voidToOpt = FunctionType::get(C.Ctx.TheEmptyTupleType, optTy);
-  EXPECT_FALSE(check(voidToBase, voidToOpt));
-  EXPECT_TRUE(check(voidToOpt, voidToBase));
-
-  Type baseToBase = FunctionType::get(baseTy, baseTy);
-  Type optToOpt = FunctionType::get(optTy, optTy);
-  EXPECT_FALSE(check(baseToBase, optToOpt));
-  EXPECT_FALSE(check(optToOpt, baseToBase));
-}
-
-TEST(Override, IUONearMatch) {
-  TestContext C{DeclareOptionalTypes};
-
-  auto check = [&C](Type base, Type derived) {
-    return derived->canOverride(base, OverrideMatchMode::Strict,
-                                /*resolver*/nullptr);
-  };
-  auto checkIUO = [&C](Type base, Type derived) {
-    return derived->canOverride(base,
-                                OverrideMatchMode::AllowNonOptionalForIUOParam,
-                                /*resolver*/nullptr);
-  };
-
-  auto *baseClass = C.makeNominal<ClassDecl>("Base");
-  Type baseTy = baseClass->getDeclaredInterfaceType();
-  Type optTy = ImplicitlyUnwrappedOptionalType::get(baseTy);
-
-  Type baseToVoid = FunctionType::get(baseTy, C.Ctx.TheEmptyTupleType);
-  Type optToVoid = FunctionType::get(optTy, C.Ctx.TheEmptyTupleType);
-  EXPECT_TRUE(check(baseToVoid, optToVoid));
-  EXPECT_TRUE(checkIUO(baseToVoid, optToVoid));
-  EXPECT_FALSE(check(optToVoid, baseToVoid));
-  EXPECT_TRUE(checkIUO(optToVoid, baseToVoid));
-
-  Type voidToBase = FunctionType::get(C.Ctx.TheEmptyTupleType, baseTy);
-  Type voidToOpt = FunctionType::get(C.Ctx.TheEmptyTupleType, optTy);
-  EXPECT_FALSE(check(voidToBase, voidToOpt));
-  EXPECT_FALSE(checkIUO(voidToBase, voidToOpt));
-  EXPECT_TRUE(check(voidToOpt, voidToBase));
-  EXPECT_TRUE(checkIUO(voidToOpt, voidToBase));
-
-  Type baseToBase = FunctionType::get(baseTy, baseTy);
-  Type optToOpt = FunctionType::get(optTy, optTy);
-  EXPECT_FALSE(check(baseToBase, optToOpt));
-  EXPECT_FALSE(checkIUO(baseToBase, optToOpt));
-  EXPECT_FALSE(check(optToOpt, baseToBase));
-  EXPECT_TRUE(checkIUO(optToOpt, baseToBase));
-}
-
-TEST(Override, OptionalMismatch) {
-  TestContext C{DeclareOptionalTypes};
-
-  auto check = [&C](Type base, Type derived) {
-    return derived->canOverride(base, OverrideMatchMode::Strict,
-                                /*resolver*/nullptr);
-  };
-  auto checkOpt = [&C](Type base, Type derived) {
-    return derived->canOverride(
-        base,
-        OverrideMatchMode::AllowTopLevelOptionalMismatch,
-        /*resolver*/nullptr);
-  };
-
-  auto *baseClass = C.makeNominal<ClassDecl>("Base");
-  Type baseTy = baseClass->getDeclaredInterfaceType();
-  Type optTy = OptionalType::get(baseTy);
-
-  Type baseToVoid = FunctionType::get(baseTy, C.Ctx.TheEmptyTupleType);
-  Type optToVoid = FunctionType::get(optTy, C.Ctx.TheEmptyTupleType);
-  EXPECT_TRUE(check(baseToVoid, optToVoid));
-  EXPECT_TRUE(checkOpt(baseToVoid, optToVoid));
-  EXPECT_FALSE(check(optToVoid, baseToVoid));
-  EXPECT_TRUE(checkOpt(optToVoid, baseToVoid));
-
-  Type voidToBase = FunctionType::get(C.Ctx.TheEmptyTupleType, baseTy);
-  Type voidToOpt = FunctionType::get(C.Ctx.TheEmptyTupleType, optTy);
-  EXPECT_FALSE(check(voidToBase, voidToOpt));
-  EXPECT_TRUE(checkOpt(voidToBase, voidToOpt));
-  EXPECT_TRUE(check(voidToOpt, voidToBase));
-  EXPECT_TRUE(checkOpt(voidToOpt, voidToBase));
-
-  Type baseToBase = FunctionType::get(baseTy, baseTy);
-  Type optToOpt = FunctionType::get(optTy, optTy);
-  EXPECT_FALSE(check(baseToBase, optToOpt));
-  EXPECT_TRUE(checkOpt(baseToBase, optToOpt));
-  EXPECT_FALSE(check(optToOpt, baseToBase));
-  EXPECT_TRUE(checkOpt(optToOpt, baseToBase));
-}
-
-TEST(Override, OptionalMismatchTuples) {
-  TestContext C{DeclareOptionalTypes};
-
-  auto check = [&C](Type base, Type derived) {
-    return derived->canOverride(base, OverrideMatchMode::Strict,
-                                /*resolver*/nullptr);
-  };
-
-  auto *baseClass = C.makeNominal<ClassDecl>("Base");
-  Type baseTy = baseClass->getDeclaredInterfaceType();
-  Type optTy = OptionalType::get(baseTy);
-
-  Type baseBaseTuple = TupleType::get({baseTy, baseTy}, C.Ctx);
-  Type optOptTuple = TupleType::get({optTy, optTy}, C.Ctx);
-  Type baseOptTuple = TupleType::get({baseTy, optTy}, C.Ctx);
-  Type optBaseTuple = TupleType::get({optTy, baseTy}, C.Ctx);
-
-  EXPECT_FALSE(check(baseBaseTuple, optOptTuple));
-  EXPECT_FALSE(check(baseBaseTuple, baseOptTuple));
-  EXPECT_FALSE(check(baseBaseTuple, optBaseTuple));
-
-  EXPECT_TRUE(check(optOptTuple, baseBaseTuple));
-  EXPECT_TRUE(check(optOptTuple, baseOptTuple));
-  EXPECT_TRUE(check(optOptTuple, optBaseTuple));
-
-  EXPECT_TRUE(check(baseOptTuple, baseBaseTuple));
-  EXPECT_FALSE(check(baseOptTuple, optOptTuple));
-  EXPECT_FALSE(check(baseOptTuple, optBaseTuple));
-
-  EXPECT_TRUE(check(optBaseTuple, baseBaseTuple));
-  EXPECT_FALSE(check(optBaseTuple, optOptTuple));
-  EXPECT_FALSE(check(optBaseTuple, baseOptTuple));
-
-  auto checkOpt = [&C](Type base, Type derived) {
-    return derived->canOverride(
-        base,
-        OverrideMatchMode::AllowTopLevelOptionalMismatch,
-        /*resolver*/nullptr);
-  };
-
-  EXPECT_TRUE(checkOpt(baseBaseTuple, optOptTuple));
-  EXPECT_TRUE(checkOpt(baseBaseTuple, baseOptTuple));
-  EXPECT_TRUE(checkOpt(baseBaseTuple, optBaseTuple));
-
-  EXPECT_TRUE(checkOpt(optOptTuple, baseBaseTuple));
-  EXPECT_TRUE(checkOpt(optOptTuple, baseOptTuple));
-  EXPECT_TRUE(checkOpt(optOptTuple, optBaseTuple));
-
-  EXPECT_TRUE(checkOpt(baseOptTuple, baseBaseTuple));
-  EXPECT_TRUE(checkOpt(baseOptTuple, optOptTuple));
-  EXPECT_TRUE(checkOpt(baseOptTuple, optBaseTuple));
-
-  EXPECT_TRUE(checkOpt(optBaseTuple, baseBaseTuple));
-  EXPECT_TRUE(checkOpt(optBaseTuple, optOptTuple));
-  EXPECT_TRUE(checkOpt(optBaseTuple, baseOptTuple));
-
-  Type optOfTuple = OptionalType::get(baseBaseTuple);
-  EXPECT_TRUE(check(optOfTuple, baseBaseTuple));
-  EXPECT_FALSE(check(baseBaseTuple, optOfTuple));
-  EXPECT_TRUE(checkOpt(optOfTuple, baseBaseTuple));
-  EXPECT_TRUE(checkOpt(baseBaseTuple, optOfTuple));
-}
-
-TEST(Override, OptionalMismatchFunctions) {
-  TestContext C{DeclareOptionalTypes};
-
-  auto check = [&C](Type base, Type derived) {
-    return derived->canOverride(base, OverrideMatchMode::Strict,
-                                /*resolver*/nullptr);
-  };
-  auto checkOpt = [&C](Type base, Type derived) {
-    return derived->canOverride(
-        base,
-        OverrideMatchMode::AllowTopLevelOptionalMismatch,
-        /*resolver*/nullptr);
-  };
-
-  Type voidToVoid = FunctionType::get(C.Ctx.TheEmptyTupleType,
-                                      C.Ctx.TheEmptyTupleType);
-  Type optVoidToVoid = OptionalType::get(voidToVoid);
-  EXPECT_TRUE(check(optVoidToVoid, voidToVoid));
-  EXPECT_TRUE(checkOpt(optVoidToVoid, voidToVoid));
-  EXPECT_FALSE(check(voidToVoid, optVoidToVoid));
-  EXPECT_TRUE(checkOpt(voidToVoid, optVoidToVoid));
-}
diff --git a/unittests/AST/TestContext.h b/unittests/AST/TestContext.h
index 75c8df3..1618002 100644
--- a/unittests/AST/TestContext.h
+++ b/unittests/AST/TestContext.h
@@ -13,6 +13,7 @@
 #include "swift/AST/ASTContext.h"
 #include "swift/AST/ASTScope.h"
 #include "swift/AST/DiagnosticEngine.h"
+#include "swift/AST/Module.h"
 #include "swift/Basic/LangOptions.h"
 #include "swift/Basic/SourceManager.h"
 
diff --git a/unittests/AST/TypeMatchTests.cpp b/unittests/AST/TypeMatchTests.cpp
new file mode 100644
index 0000000..0e5c3b4
--- /dev/null
+++ b/unittests/AST/TypeMatchTests.cpp
@@ -0,0 +1,409 @@
+//===--- TypeMatchTests.cpp - Tests for TypeBase::matches -----------------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+
+#include "TestContext.h"
+#include "swift/AST/ASTContext.h"
+#include "swift/AST/Decl.h"
+#include "swift/AST/Types.h"
+#include "gtest/gtest.h"
+
+using namespace swift;
+using namespace swift::unittest;
+
+TEST(TypeMatch, IdenticalTypes) {
+  TestContext C;
+
+  auto check = [&C](Type ty) {
+    return ty->matches(ty, TypeMatchOptions(), /*resolver*/nullptr) &&
+        ty->matches(ty, TypeMatchFlags::AllowOverride, /*resolver*/nullptr);
+  };
+
+  EXPECT_TRUE(check(C.Ctx.TheEmptyTupleType));
+  EXPECT_TRUE(check(C.Ctx.TheRawPointerType));
+
+  Type voidToVoidFn = FunctionType::get(C.Ctx.TheEmptyTupleType,
+                                        C.Ctx.TheEmptyTupleType);
+  EXPECT_TRUE(check(voidToVoidFn));
+
+  Type ptrToPtrFn = FunctionType::get(C.Ctx.TheRawPointerType,
+                                      C.Ctx.TheRawPointerType);
+  EXPECT_TRUE(check(ptrToPtrFn));
+
+  auto *someStruct = C.makeNominal<StructDecl>("MyStruct");
+  Type structTy = someStruct->getDeclaredInterfaceType();
+  EXPECT_TRUE(check(structTy));
+
+  Type structToStructFn = FunctionType::get(structTy, structTy);
+  EXPECT_TRUE(check(structToStructFn));
+}
+
+TEST(TypeMatch, UnrelatedTypes) {
+  TestContext C;
+
+  auto check = [&C](Type base, Type derived) {
+    return derived->matches(base, TypeMatchOptions(), /*resolver*/nullptr) &&
+        derived->matches(base, TypeMatchFlags::AllowOverride,
+                         /*resolver*/nullptr);
+  };
+
+  EXPECT_FALSE(check(C.Ctx.TheEmptyTupleType, C.Ctx.TheRawPointerType));
+  EXPECT_FALSE(check(C.Ctx.TheRawPointerType, C.Ctx.TheEmptyTupleType));
+
+  Type voidToVoidFn = FunctionType::get(C.Ctx.TheEmptyTupleType,
+                                        C.Ctx.TheEmptyTupleType);
+  EXPECT_FALSE(check(voidToVoidFn, C.Ctx.TheEmptyTupleType));
+  EXPECT_FALSE(check(C.Ctx.TheEmptyTupleType, voidToVoidFn));
+
+  Type ptrToPtrFn = FunctionType::get(C.Ctx.TheRawPointerType,
+                                      C.Ctx.TheRawPointerType);
+  EXPECT_FALSE(check(ptrToPtrFn, voidToVoidFn));
+  EXPECT_FALSE(check(voidToVoidFn, ptrToPtrFn));
+
+  auto *someStruct = C.makeNominal<StructDecl>("MyStruct");
+  Type structTy = someStruct->getDeclaredInterfaceType();
+  EXPECT_FALSE(check(structTy, C.Ctx.TheEmptyTupleType));
+  EXPECT_FALSE(check(C.Ctx.TheEmptyTupleType, structTy));
+  EXPECT_FALSE(check(structTy, voidToVoidFn));
+  EXPECT_FALSE(check(voidToVoidFn, structTy));
+
+  Type structToStructFn = FunctionType::get(structTy, structTy);
+  EXPECT_FALSE(check(structToStructFn, structTy));
+  EXPECT_FALSE(check(structTy, structToStructFn));
+  EXPECT_FALSE(check(structToStructFn, voidToVoidFn));
+  EXPECT_FALSE(check(voidToVoidFn, structToStructFn));
+
+  auto *anotherStruct = C.makeNominal<StructDecl>("AnotherStruct");
+  Type anotherStructTy = anotherStruct->getDeclaredInterfaceType();
+  EXPECT_FALSE(check(structTy, anotherStructTy));
+  EXPECT_FALSE(check(anotherStructTy, structTy));
+
+  Type anotherStructToAnotherStructFn = FunctionType::get(anotherStructTy,
+                                                          anotherStructTy);
+  EXPECT_FALSE(check(anotherStructToAnotherStructFn, structToStructFn));
+  EXPECT_FALSE(check(structToStructFn, anotherStructToAnotherStructFn));
+
+  Type S2ASFn = FunctionType::get(structTy, anotherStructTy);
+  EXPECT_FALSE(check(S2ASFn, structToStructFn));
+  EXPECT_FALSE(check(structToStructFn, S2ASFn));
+  EXPECT_FALSE(check(S2ASFn, anotherStructToAnotherStructFn));
+  EXPECT_FALSE(check(anotherStructToAnotherStructFn, S2ASFn));
+}
+
+TEST(TypeMatch, Classes) {
+  TestContext C;
+
+  auto check = [&C](Type base, Type derived) {
+    return derived->matches(base, TypeMatchFlags::AllowOverride,
+                            /*resolver*/nullptr) &&
+        !derived->matches(base, TypeMatchOptions(), /*resolver*/nullptr);
+  };
+
+  auto *baseClass = C.makeNominal<ClassDecl>("Base");
+  Type baseTy = baseClass->getDeclaredInterfaceType();
+
+  auto *subClass = C.makeNominal<ClassDecl>("Sub");
+  subClass->setSuperclass(baseTy);
+  Type subTy = subClass->getDeclaredInterfaceType();
+
+  EXPECT_TRUE(check(baseTy, subTy));
+  EXPECT_FALSE(check(subTy, baseTy));
+
+  auto *otherClass = C.makeNominal<ClassDecl>("Other");
+  Type otherTy = otherClass->getDeclaredInterfaceType();
+  EXPECT_FALSE(check(otherTy, baseTy));
+  EXPECT_FALSE(check(baseTy, otherTy));
+  EXPECT_FALSE(check(otherTy, subTy));
+  EXPECT_FALSE(check(subTy, otherTy));
+
+  Type baseToVoid = FunctionType::get(baseTy, C.Ctx.TheEmptyTupleType);
+  Type subToVoid = FunctionType::get(subTy, C.Ctx.TheEmptyTupleType);
+  EXPECT_FALSE(check(baseToVoid, subToVoid));
+  EXPECT_TRUE(check(subToVoid, baseToVoid));
+
+  Type voidToBase = FunctionType::get(C.Ctx.TheEmptyTupleType, baseTy);
+  Type voidToSub = FunctionType::get(C.Ctx.TheEmptyTupleType, subTy);
+  EXPECT_FALSE(check(voidToSub, voidToBase));
+  EXPECT_TRUE(check(voidToBase, voidToSub));
+
+  Type baseToBase = FunctionType::get(baseTy, baseTy);
+  Type subToSub = FunctionType::get(subTy, subTy);
+  EXPECT_FALSE(check(baseToBase, subToSub));
+  EXPECT_FALSE(check(subToSub, baseToBase));
+}
+
+TEST(TypeMatch, Optionals) {
+  TestContext C{DeclareOptionalTypes};
+
+  auto check = [&C](Type base, Type derived) {
+    return derived->matches(base, TypeMatchFlags::AllowOverride,
+                            /*resolver*/nullptr) &&
+        !derived->matches(base, TypeMatchOptions(), /*resolver*/nullptr);
+  };
+
+  auto *baseClass = C.makeNominal<ClassDecl>("Base");
+  Type baseTy = baseClass->getDeclaredInterfaceType();
+  Type optTy = OptionalType::get(baseTy);
+
+  EXPECT_FALSE(check(baseTy, optTy));
+  EXPECT_TRUE(check(optTy, baseTy));
+
+  Type baseToVoid = FunctionType::get(baseTy, C.Ctx.TheEmptyTupleType);
+  Type optToVoid = FunctionType::get(optTy, C.Ctx.TheEmptyTupleType);
+  EXPECT_TRUE(check(baseToVoid, optToVoid));
+  EXPECT_FALSE(check(optToVoid, baseToVoid));
+
+  Type voidToBase = FunctionType::get(C.Ctx.TheEmptyTupleType, baseTy);
+  Type voidToOpt = FunctionType::get(C.Ctx.TheEmptyTupleType, optTy);
+  EXPECT_FALSE(check(voidToBase, voidToOpt));
+  EXPECT_TRUE(check(voidToOpt, voidToBase));
+
+  Type baseToBase = FunctionType::get(baseTy, baseTy);
+  Type optToOpt = FunctionType::get(optTy, optTy);
+  EXPECT_FALSE(check(baseToBase, optToOpt));
+  EXPECT_FALSE(check(optToOpt, baseToBase));
+}
+
+TEST(TypeMatch, IUONearMatch) {
+  TestContext C{DeclareOptionalTypes};
+
+  auto check = [&C](Type base, Type derived) {
+    return derived->matches(base, TypeMatchFlags::AllowOverride,
+                            /*resolver*/nullptr) &&
+        !derived->matches(base, TypeMatchOptions(), /*resolver*/nullptr);
+  };
+  auto checkIUO = [&C](Type base, Type derived) {
+    return derived->matches(base, TypeMatchFlags::AllowNonOptionalForIUOParam,
+                            /*resolver*/nullptr);
+  };
+  auto checkIUOOverride = [&C](Type base, Type derived) {
+    TypeMatchOptions matchMode = TypeMatchFlags::AllowOverride;
+    matchMode |= TypeMatchFlags::AllowNonOptionalForIUOParam;
+    return derived->matches(base, matchMode, /*resolver*/nullptr);
+  };
+
+  auto *baseClass = C.makeNominal<ClassDecl>("Base");
+  Type baseTy = baseClass->getDeclaredInterfaceType();
+  Type optTy = ImplicitlyUnwrappedOptionalType::get(baseTy);
+
+  Type baseToVoid = FunctionType::get(baseTy, C.Ctx.TheEmptyTupleType);
+  Type optToVoid = FunctionType::get(optTy, C.Ctx.TheEmptyTupleType);
+  EXPECT_TRUE(check(baseToVoid, optToVoid));
+  EXPECT_FALSE(checkIUO(baseToVoid, optToVoid));
+  EXPECT_TRUE(checkIUOOverride(baseToVoid, optToVoid));
+  EXPECT_FALSE(check(optToVoid, baseToVoid));
+  EXPECT_TRUE(checkIUO(optToVoid, baseToVoid));
+  EXPECT_TRUE(checkIUOOverride(optToVoid, baseToVoid));
+
+  Type voidToBase = FunctionType::get(C.Ctx.TheEmptyTupleType, baseTy);
+  Type voidToOpt = FunctionType::get(C.Ctx.TheEmptyTupleType, optTy);
+  EXPECT_FALSE(check(voidToBase, voidToOpt));
+  EXPECT_FALSE(checkIUO(voidToBase, voidToOpt));
+  EXPECT_FALSE(checkIUOOverride(voidToBase, voidToOpt));
+  EXPECT_TRUE(check(voidToOpt, voidToBase));
+  EXPECT_FALSE(checkIUO(voidToOpt, voidToBase));
+  EXPECT_TRUE(checkIUOOverride(voidToOpt, voidToBase));
+
+  Type baseToBase = FunctionType::get(baseTy, baseTy);
+  Type optToOpt = FunctionType::get(optTy, optTy);
+  EXPECT_FALSE(check(baseToBase, optToOpt));
+  EXPECT_FALSE(checkIUO(baseToBase, optToOpt));
+  EXPECT_FALSE(checkIUOOverride(baseToBase, optToOpt));
+  EXPECT_FALSE(check(optToOpt, baseToBase));
+  EXPECT_FALSE(checkIUO(optToOpt, baseToBase));
+  EXPECT_TRUE(checkIUOOverride(optToOpt, baseToBase));
+
+  Type tupleOfBase = TupleType::get({baseTy, baseTy}, C.Ctx);
+  Type tupleOfOpt = TupleType::get({optTy, optTy}, C.Ctx);
+
+  Type baseTupleToVoid = FunctionType::get(tupleOfBase,C.Ctx.TheEmptyTupleType);
+  Type optTupleToVoid = FunctionType::get(tupleOfOpt, C.Ctx.TheEmptyTupleType);
+  EXPECT_TRUE(check(baseTupleToVoid, optTupleToVoid));
+  EXPECT_FALSE(checkIUO(baseTupleToVoid, optTupleToVoid));
+  EXPECT_TRUE(checkIUOOverride(baseTupleToVoid, optTupleToVoid));
+  EXPECT_FALSE(check(optTupleToVoid, baseTupleToVoid));
+  EXPECT_TRUE(checkIUO(optTupleToVoid, baseTupleToVoid));
+  EXPECT_TRUE(checkIUOOverride(optTupleToVoid, baseTupleToVoid));
+
+  Type nestedBaseTuple = TupleType::get({C.Ctx.TheEmptyTupleType, tupleOfBase},
+                                        C.Ctx);
+  Type nestedOptTuple = TupleType::get({C.Ctx.TheEmptyTupleType, tupleOfOpt},
+                                        C.Ctx);
+  Type nestedBaseTupleToVoid = FunctionType::get(nestedBaseTuple,
+                                                 C.Ctx.TheEmptyTupleType);
+  Type nestedOptTupleToVoid = FunctionType::get(nestedOptTuple,
+                                                C.Ctx.TheEmptyTupleType);
+  EXPECT_TRUE(check(nestedBaseTupleToVoid, nestedOptTupleToVoid));
+  EXPECT_FALSE(checkIUO(nestedBaseTupleToVoid, nestedOptTupleToVoid));
+  EXPECT_TRUE(checkIUOOverride(nestedBaseTupleToVoid, nestedOptTupleToVoid));
+  EXPECT_FALSE(check(nestedOptTupleToVoid, nestedBaseTupleToVoid));
+  EXPECT_FALSE(checkIUO(nestedOptTupleToVoid, nestedBaseTupleToVoid));
+  EXPECT_FALSE(checkIUOOverride(nestedOptTupleToVoid, nestedBaseTupleToVoid));
+}
+
+TEST(TypeMatch, OptionalMismatch) {
+  TestContext C{DeclareOptionalTypes};
+
+  auto check = [&C](Type base, Type derived) {
+    return derived->matches(base, TypeMatchFlags::AllowOverride,
+                            /*resolver*/nullptr) &&
+        !derived->matches(base, TypeMatchOptions(), /*resolver*/nullptr);
+  };
+  auto checkOpt = [&C](Type base, Type derived) {
+    return derived->matches(base, TypeMatchFlags::AllowTopLevelOptionalMismatch,
+                            /*resolver*/nullptr);
+  };
+  auto checkOptOverride = [&C](Type base, Type derived) {
+    TypeMatchOptions matchMode = TypeMatchFlags::AllowOverride;
+    matchMode |= TypeMatchFlags::AllowTopLevelOptionalMismatch;
+    return derived->matches(base, matchMode, /*resolver*/nullptr);
+  };
+
+  auto *baseClass = C.makeNominal<ClassDecl>("Base");
+  Type baseTy = baseClass->getDeclaredInterfaceType();
+  Type optTy = OptionalType::get(baseTy);
+
+  Type baseToVoid = FunctionType::get(baseTy, C.Ctx.TheEmptyTupleType);
+  Type optToVoid = FunctionType::get(optTy, C.Ctx.TheEmptyTupleType);
+  EXPECT_TRUE(check(baseToVoid, optToVoid));
+  EXPECT_TRUE(checkOpt(baseToVoid, optToVoid));
+  EXPECT_TRUE(checkOptOverride(baseToVoid, optToVoid));
+  EXPECT_FALSE(check(optToVoid, baseToVoid));
+  EXPECT_TRUE(checkOpt(optToVoid, baseToVoid));
+  EXPECT_TRUE(checkOptOverride(optToVoid, baseToVoid));
+
+  Type voidToBase = FunctionType::get(C.Ctx.TheEmptyTupleType, baseTy);
+  Type voidToOpt = FunctionType::get(C.Ctx.TheEmptyTupleType, optTy);
+  EXPECT_FALSE(check(voidToBase, voidToOpt));
+  EXPECT_TRUE(checkOpt(voidToBase, voidToOpt));
+  EXPECT_TRUE(checkOptOverride(voidToBase, voidToOpt));
+  EXPECT_TRUE(check(voidToOpt, voidToBase));
+  EXPECT_TRUE(checkOpt(voidToOpt, voidToBase));
+  EXPECT_TRUE(checkOptOverride(voidToOpt, voidToBase));
+
+  Type baseToBase = FunctionType::get(baseTy, baseTy);
+  Type optToOpt = FunctionType::get(optTy, optTy);
+  EXPECT_FALSE(check(baseToBase, optToOpt));
+  EXPECT_TRUE(checkOpt(baseToBase, optToOpt));
+  EXPECT_TRUE(checkOptOverride(baseToBase, optToOpt));
+  EXPECT_FALSE(check(optToOpt, baseToBase));
+  EXPECT_TRUE(checkOpt(optToOpt, baseToBase));
+  EXPECT_TRUE(checkOptOverride(optToOpt, baseToBase));
+
+  auto *subClass = C.makeNominal<ClassDecl>("Sub");
+  subClass->setSuperclass(baseTy);
+  Type subTy = subClass->getDeclaredInterfaceType();
+  Type optSubTy = OptionalType::get(subTy);
+
+  EXPECT_FALSE(check(baseTy, optSubTy));
+  EXPECT_FALSE(checkOpt(baseTy, optSubTy));
+  EXPECT_TRUE(checkOptOverride(baseTy, optSubTy));
+  EXPECT_TRUE(check(optTy, subTy));
+  EXPECT_FALSE(checkOpt(optTy, subTy));
+  EXPECT_TRUE(checkOptOverride(optTy, subTy));
+  EXPECT_TRUE(check(optTy, optSubTy));
+  EXPECT_FALSE(checkOpt(optTy, optSubTy));
+  EXPECT_TRUE(checkOptOverride(optTy, optSubTy));
+
+  EXPECT_FALSE(check(optSubTy, baseTy));
+  EXPECT_FALSE(checkOpt(optSubTy, baseTy));
+  EXPECT_FALSE(checkOptOverride(optSubTy, baseTy));
+  EXPECT_FALSE(check(subTy, optTy));
+  EXPECT_FALSE(checkOpt(subTy, optTy));
+  EXPECT_FALSE(checkOptOverride(subTy, optTy));
+  EXPECT_FALSE(check(optSubTy, optTy));
+  EXPECT_FALSE(checkOpt(optSubTy, optTy));
+  EXPECT_FALSE(checkOptOverride(optSubTy, optTy));
+}
+
+TEST(TypeMatch, OptionalMismatchTuples) {
+  TestContext C{DeclareOptionalTypes};
+
+  auto checkOverride = [&C](Type base, Type derived) {
+    return derived->matches(base, TypeMatchFlags::AllowOverride,
+                            /*resolver*/nullptr) &&
+        !derived->matches(base, TypeMatchOptions(), /*resolver*/nullptr);
+  };
+
+  auto *baseClass = C.makeNominal<ClassDecl>("Base");
+  Type baseTy = baseClass->getDeclaredInterfaceType();
+  Type optTy = OptionalType::get(baseTy);
+
+  Type baseBaseTuple = TupleType::get({baseTy, baseTy}, C.Ctx);
+  Type optOptTuple = TupleType::get({optTy, optTy}, C.Ctx);
+  Type baseOptTuple = TupleType::get({baseTy, optTy}, C.Ctx);
+  Type optBaseTuple = TupleType::get({optTy, baseTy}, C.Ctx);
+
+  EXPECT_FALSE(checkOverride(baseBaseTuple, optOptTuple));
+  EXPECT_FALSE(checkOverride(baseBaseTuple, baseOptTuple));
+  EXPECT_FALSE(checkOverride(baseBaseTuple, optBaseTuple));
+
+  EXPECT_TRUE(checkOverride(optOptTuple, baseBaseTuple));
+  EXPECT_TRUE(checkOverride(optOptTuple, baseOptTuple));
+  EXPECT_TRUE(checkOverride(optOptTuple, optBaseTuple));
+
+  EXPECT_TRUE(checkOverride(baseOptTuple, baseBaseTuple));
+  EXPECT_FALSE(checkOverride(baseOptTuple, optOptTuple));
+  EXPECT_FALSE(checkOverride(baseOptTuple, optBaseTuple));
+
+  EXPECT_TRUE(checkOverride(optBaseTuple, baseBaseTuple));
+  EXPECT_FALSE(checkOverride(optBaseTuple, optOptTuple));
+  EXPECT_FALSE(checkOverride(optBaseTuple, baseOptTuple));
+
+  auto checkOpt = [&C](Type base, Type derived) {
+    return derived->matches(base, TypeMatchFlags::AllowTopLevelOptionalMismatch,
+                            /*resolver*/nullptr);
+  };
+
+  EXPECT_TRUE(checkOpt(baseBaseTuple, optOptTuple));
+  EXPECT_TRUE(checkOpt(baseBaseTuple, baseOptTuple));
+  EXPECT_TRUE(checkOpt(baseBaseTuple, optBaseTuple));
+
+  EXPECT_TRUE(checkOpt(optOptTuple, baseBaseTuple));
+  EXPECT_TRUE(checkOpt(optOptTuple, baseOptTuple));
+  EXPECT_TRUE(checkOpt(optOptTuple, optBaseTuple));
+
+  EXPECT_TRUE(checkOpt(baseOptTuple, baseBaseTuple));
+  EXPECT_TRUE(checkOpt(baseOptTuple, optOptTuple));
+  EXPECT_TRUE(checkOpt(baseOptTuple, optBaseTuple));
+
+  EXPECT_TRUE(checkOpt(optBaseTuple, baseBaseTuple));
+  EXPECT_TRUE(checkOpt(optBaseTuple, optOptTuple));
+  EXPECT_TRUE(checkOpt(optBaseTuple, baseOptTuple));
+
+  Type optOfTuple = OptionalType::get(baseBaseTuple);
+  EXPECT_TRUE(checkOverride(optOfTuple, baseBaseTuple));
+  EXPECT_FALSE(checkOverride(baseBaseTuple, optOfTuple));
+  EXPECT_TRUE(checkOpt(optOfTuple, baseBaseTuple));
+  EXPECT_TRUE(checkOpt(baseBaseTuple, optOfTuple));
+}
+
+TEST(TypeMatch, OptionalMismatchFunctions) {
+  TestContext C{DeclareOptionalTypes};
+
+  auto checkOverride = [&C](Type base, Type derived) {
+    return derived->matches(base, TypeMatchFlags::AllowOverride,
+                            /*resolver*/nullptr) &&
+        !derived->matches(base, TypeMatchOptions(), /*resolver*/nullptr);
+  };
+  auto checkOpt = [&C](Type base, Type derived) {
+    return derived->matches(base, TypeMatchFlags::AllowTopLevelOptionalMismatch,
+                            /*resolver*/nullptr);
+  };
+
+  Type voidToVoid = FunctionType::get(C.Ctx.TheEmptyTupleType,
+                                      C.Ctx.TheEmptyTupleType);
+  Type optVoidToVoid = OptionalType::get(voidToVoid);
+  EXPECT_TRUE(checkOverride(optVoidToVoid, voidToVoid));
+  EXPECT_TRUE(checkOpt(optVoidToVoid, voidToVoid));
+  EXPECT_FALSE(checkOverride(voidToVoid, optVoidToVoid));
+  EXPECT_TRUE(checkOpt(voidToVoid, optVoidToVoid));
+}
diff --git a/unittests/Reflection/TypeRef.cpp b/unittests/Reflection/TypeRef.cpp
index e1cb856..421a365 100644
--- a/unittests/Reflection/TypeRef.cpp
+++ b/unittests/Reflection/TypeRef.cpp
@@ -156,20 +156,20 @@
 TEST(TypeRefTest, UniqueProtocolTypeRef) {
   TypeRefBuilder Builder;
 
-  auto P1 = Builder.createProtocolType(ABC, Module, Protocol);
-  auto P2 = Builder.createProtocolType(ABC, Module, Protocol);
-  auto P3 = Builder.createProtocolType(ABCD, Module, Shmrotocol);
-  auto P4 = Builder.createProtocolType(XYZ, Shmodule, Protocol);
+  auto P1 = Builder.createProtocolType(ABC, Module, "", Protocol);
+  auto P2 = Builder.createProtocolType(ABC, Module, "", Protocol);
+  auto P3 = Builder.createProtocolType(ABCD, Module, "", Shmrotocol);
+  auto P4 = Builder.createProtocolType(XYZ, Shmodule, "", Protocol);
 
   EXPECT_EQ(P1, P2);
   EXPECT_NE(P2, P3);
   EXPECT_NE(P2, P3);
   EXPECT_NE(P3, P4);
 
-  auto PC1 = Builder.createProtocolCompositionType({P1, P2});
-  auto PC2 = Builder.createProtocolCompositionType({P1, P2});
-  auto PC3 = Builder.createProtocolCompositionType({P1, P2, P2});
-  auto Any = Builder.createProtocolCompositionType({});
+  auto PC1 = Builder.createProtocolCompositionType({P1, P2}, false);
+  auto PC2 = Builder.createProtocolCompositionType({P1, P2}, false);
+  auto PC3 = Builder.createProtocolCompositionType({P1, P2, P2}, false);
+  auto Any = Builder.createProtocolCompositionType({}, false);
 
   EXPECT_EQ(PC1, PC2);
   EXPECT_NE(PC2, PC3);
@@ -220,8 +220,8 @@
 
   auto N1 = Builder.createNominalType(ABC, nullptr);
   auto N2 = Builder.createNominalType(XYZ, nullptr);
-  auto P1 = Builder.createProtocolType(ABC, Module, Protocol);
-  auto P2 = Builder.createProtocolType(ABCD, Shmodule, Protocol);
+  auto P1 = Builder.createProtocolType(ABC, Module, "", Protocol);
+  auto P2 = Builder.createProtocolType(ABCD, Shmodule, "", Protocol);
 
   auto DM1 = Builder.createDependentMemberType("Index", N1, P1);
   auto DM2 = Builder.createDependentMemberType("Index", N1, P1);
diff --git a/unittests/SourceKit/SwiftLang/CMakeLists.txt b/unittests/SourceKit/SwiftLang/CMakeLists.txt
index 5690502..27dd36f 100644
--- a/unittests/SourceKit/SwiftLang/CMakeLists.txt
+++ b/unittests/SourceKit/SwiftLang/CMakeLists.txt
@@ -1,11 +1,14 @@
+if(NOT SWIFT_HOST_VARIANT MATCHES "${SWIFT_DARWIN_EMBEDDED_VARIANTS}")
 
-add_swift_unittest(SourceKitSwiftLangTests
-  CursorInfoTest.cpp
-  )
+  add_swift_unittest(SourceKitSwiftLangTests
+    CursorInfoTest.cpp
+    )
 
-target_link_libraries(SourceKitSwiftLangTests
-  SourceKitSwiftLang
-  )
+  target_link_libraries(SourceKitSwiftLangTests
+    SourceKitSwiftLang
+    )
 
-set_property(TARGET SourceKitSwiftLangTests APPEND_STRING PROPERTY COMPILE_FLAGS
-  " '-DSWIFTLIB_DIR=\"${SWIFTLIB_DIR}\"'")
+  set_property(TARGET SourceKitSwiftLangTests APPEND_STRING PROPERTY COMPILE_FLAGS
+    " '-DSWIFTLIB_DIR=\"${SWIFTLIB_DIR}\"'")
+
+endif()
diff --git a/unittests/SourceKit/SwiftLang/CursorInfoTest.cpp b/unittests/SourceKit/SwiftLang/CursorInfoTest.cpp
index ea1af88..b76e7a8 100644
--- a/unittests/SourceKit/SwiftLang/CursorInfoTest.cpp
+++ b/unittests/SourceKit/SwiftLang/CursorInfoTest.cpp
@@ -134,7 +134,7 @@
     Semaphore sema(0);
 
     TestCursorInfo TestInfo;
-    getLang().getCursorInfo(DocName, Offset, 0, false, Args,
+    getLang().getCursorInfo(DocName, Offset, 0, false, false, Args,
       [&](const CursorInfo &Info) {
         TestInfo.Name = Info.Name;
         TestInfo.Typename = Info.TypeName;
diff --git a/unittests/runtime/CMakeLists.txt b/unittests/runtime/CMakeLists.txt
index 347746e..4437024 100644
--- a/unittests/runtime/CMakeLists.txt
+++ b/unittests/runtime/CMakeLists.txt
@@ -1,9 +1,9 @@
 if(("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "${SWIFT_PRIMARY_VARIANT_SDK}") AND
    ("${SWIFT_HOST_VARIANT_ARCH}" STREQUAL "${SWIFT_PRIMARY_VARIANT_ARCH}"))
 
+  set(swift_runtime_test_extra_libraries)
   if(SWIFT_BUILD_STATIC_STDLIB AND "${SWIFT_HOST_VARIANT_SDK}" STREQUAL "LINUX")
-    set(swift_runtime_test_extra_sources
-      "${CMAKE_CURRENT_SOURCE_DIR}/../../stdlib/public/runtime/ImageInspectionELF.cpp")
+    list(APPEND swift_runtime_test_extra_libraries swiftImageInspectionShared)
   endif()
 
   add_subdirectory(LongTests)
@@ -43,13 +43,13 @@
     # from the swiftCore dylib, so we need to link to both the runtime archive
     # and the stdlib.
     $<TARGET_OBJECTS:swiftRuntime${SWIFT_PRIMARY_VARIANT_SUFFIX}>
-    ${swift_runtime_test_extra_sources}
     )
 
   # FIXME: cross-compile for all variants.
   target_link_libraries(SwiftRuntimeTests
     swiftCore${SWIFT_PRIMARY_VARIANT_SUFFIX}
     ${PLATFORM_TARGET_LINK_LIBRARIES}
+    ${swift_runtime_test_extra_libraries}
     )
 endif()
 
diff --git a/unittests/runtime/LongTests/CMakeLists.txt b/unittests/runtime/LongTests/CMakeLists.txt
index 5c28a79..ed074a0 100644
--- a/unittests/runtime/LongTests/CMakeLists.txt
+++ b/unittests/runtime/LongTests/CMakeLists.txt
@@ -36,13 +36,13 @@
     # from the swiftCore dylib, so we need to link to both the runtime archive
     # and the stdlib.
     $<TARGET_OBJECTS:swiftRuntime${SWIFT_PRIMARY_VARIANT_SUFFIX}>
-    ${swift_runtime_test_extra_sources}
     )
 
   # FIXME: cross-compile for all variants.
   target_link_libraries(SwiftRuntimeLongTests
     swiftCore${SWIFT_PRIMARY_VARIANT_SUFFIX}
     ${PLATFORM_TARGET_LINK_LIBRARIES}
+    ${swift_runtime_test_extra_libraries}
     )
 endif()
 
diff --git a/unittests/runtime/Metadata.cpp b/unittests/runtime/Metadata.cpp
index 5b779b2..50ebf05 100644
--- a/unittests/runtime/Metadata.cpp
+++ b/unittests/runtime/Metadata.cpp
@@ -10,8 +10,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "swift/Runtime/Metadata.h"
 #include "swift/Runtime/Concurrent.h"
+#include "swift/Runtime/HeapObject.h"
+#include "swift/Runtime/Metadata.h"
 #include "gtest/gtest.h"
 #include <iterator>
 #include <functional>
@@ -448,41 +449,6 @@
       return b;
     });
 
-  // protocol compositions are order-invariant
-  RaceTest_ExpectEqual<const ExistentialTypeMetadata *>(
-    [&]() -> const ExistentialTypeMetadata * {
-
-      const ProtocolDescriptor *protoList4[] = {
-        &ProtocolA,
-        &ProtocolB
-      };
-
-      const ProtocolDescriptor *protoList5[] = {
-        &ProtocolB,
-        &ProtocolA
-      };
-
-      auto ab = swift_getExistentialTypeMetadata(ProtocolClassConstraint::Any,
-                                                /*superclass=*/nullptr,
-                                                2, protoList4);
-      auto ba = swift_getExistentialTypeMetadata(ProtocolClassConstraint::Any,
-                                                /*superclass=*/nullptr,
-                                                2, protoList5);
-      EXPECT_EQ(ab, ba);
-      EXPECT_EQ(MetadataKind::Existential, ab->getKind());
-      EXPECT_EQ(2U, ab->Flags.getNumWitnessTables());
-      EXPECT_EQ(ProtocolClassConstraint::Any, ab->Flags.getClassConstraint());
-      EXPECT_EQ(2U, ab->Protocols.NumProtocols);
-      EXPECT_TRUE(
-           (ab->Protocols[0]==&ProtocolA && ab->Protocols[1]==&ProtocolB)
-        || (ab->Protocols[0]==&ProtocolB && ab->Protocols[1]==&ProtocolA));
-      EXPECT_EQ(SpecialProtocol::None,
-                ab->Flags.getSpecialProtocol());
-      EXPECT_EQ(nullptr,
-                ab->getSuperclassConstraint());
-      return ab;
-    });
-
   const ProtocolDescriptor *protoList6[] = {
     &ProtocolClassConstrained,
   };
@@ -864,10 +830,8 @@
       EXPECT_EQ(ProtocolClassConstraint::Class,
                 ex2->Flags.getClassConstraint());
       EXPECT_EQ(2U, ex2->Protocols.NumProtocols);
-      EXPECT_TRUE((ex2->Protocols[0] == &OpaqueProto1 &&
-                   ex2->Protocols[1] == &ClassProto1) ||
-                  (ex2->Protocols[0] == &ClassProto1 &&
-                   ex2->Protocols[1] == &OpaqueProto1));
+      EXPECT_TRUE(ex2->Protocols[0] == &OpaqueProto1 &&
+                  ex2->Protocols[1] == &ClassProto1);
       EXPECT_EQ(&MetadataTest2, ex2->getSuperclassConstraint());
       return ex2;
     });
@@ -1119,3 +1083,439 @@
       });
   }
 }
+
+static void initialize_pod_witness_table(ValueWitnessTable &testTable) {
+  testTable.size = sizeof(ValueBuffer);
+  testTable.flags = ValueWitnessFlags()
+    .withAlignment(alignof(ValueBuffer))
+    .withPOD(true)
+    .withBitwiseTakable(true)
+    .withInlineStorage(true);
+  testTable.stride = sizeof(ValueBuffer);
+  installCommonValueWitnesses(&testTable);
+}
+
+TEST(TestOpaqueExistentialBox, test_assignWithCopy_pod) {
+  auto any =
+      swift_getExistentialTypeMetadata(ProtocolClassConstraint::Any,
+                                       /*superclass=*/nullptr, 0, nullptr);
+  auto anyVWT = any->getValueWitnesses();
+
+  ValueWitnessTable testTable;
+  initialize_pod_witness_table(testTable);
+  FullOpaqueMetadata testMetadata = {{&testTable}, {{MetadataKind::Opaque}}};
+  Metadata *metadata = &testMetadata.base;
+
+  ValueWitnessTable testTable2;
+  initialize_pod_witness_table(testTable2);
+  FullOpaqueMetadata testMetadata2 = {{&testTable2}, {{MetadataKind::Opaque}}};
+  Metadata *metadata2 = &testMetadata2.base;
+
+  void *zeroPtr = nullptr;
+  void *otherPtr = &zeroPtr;
+  struct {
+    ValueBuffer buffer;
+    Metadata *type;
+    uintptr_t canary;
+  } existBox{{{zeroPtr, zeroPtr, zeroPtr}}, metadata, 0x5A5A5A5AU},
+    existBox2{{{otherPtr, otherPtr, zeroPtr}}, metadata2, 0xB5A5A5A5U};
+
+  anyVWT->assignWithCopy(reinterpret_cast<OpaqueValue *>(&existBox),
+                         reinterpret_cast<OpaqueValue *>(&existBox2), any);
+  EXPECT_EQ(existBox.type, metadata2);
+  EXPECT_EQ(existBox.canary, 0x5A5A5A5AU);
+  EXPECT_EQ(existBox.buffer.PrivateData[0], otherPtr);
+  EXPECT_EQ(existBox.buffer.PrivateData[1], otherPtr);
+  EXPECT_EQ(existBox.buffer.PrivateData[2], zeroPtr);
+}
+
+TEST(TestOpaqueExistentialBox, test_assignWithTake_pod) {
+  auto any =
+      swift_getExistentialTypeMetadata(ProtocolClassConstraint::Any,
+                                       /*superclass=*/nullptr, 0, nullptr);
+  auto anyVWT = any->getValueWitnesses();
+
+  ValueWitnessTable testTable;
+  initialize_pod_witness_table(testTable);
+  FullOpaqueMetadata testMetadata = {{&testTable}, {{MetadataKind::Opaque}}};
+  Metadata *metadata = &testMetadata.base;
+
+  ValueWitnessTable testTable2;
+  initialize_pod_witness_table(testTable2);
+  FullOpaqueMetadata testMetadata2 = {{&testTable2}, {{MetadataKind::Opaque}}};
+  Metadata *metadata2 = &testMetadata2.base;
+
+  void *zeroPtr = nullptr;
+  void *otherPtr = &zeroPtr;
+  struct {
+    ValueBuffer buffer;
+    Metadata *type;
+    uintptr_t canary;
+  } existBox{{{zeroPtr, zeroPtr, zeroPtr}}, metadata, 0x5A5A5A5AU},
+    existBox2{{{otherPtr, otherPtr, zeroPtr}}, metadata2, 0xB5A5A5A5U};
+
+  anyVWT->assignWithTake(reinterpret_cast<OpaqueValue *>(&existBox),
+                         reinterpret_cast<OpaqueValue *>(&existBox2), any);
+  EXPECT_EQ(existBox.type, metadata2);
+  EXPECT_EQ(existBox.canary, 0x5A5A5A5AU);
+  EXPECT_EQ(existBox.buffer.PrivateData[0], otherPtr);
+  EXPECT_EQ(existBox.buffer.PrivateData[1], otherPtr);
+  EXPECT_EQ(existBox.buffer.PrivateData[2], zeroPtr);
+}
+
+static void initialize_indirect_witness_table(ValueWitnessTable &testTable) {
+  testTable.size = sizeof(ValueBuffer) + 1;
+  testTable.flags = ValueWitnessFlags()
+    .withAlignment(alignof(ValueBuffer))
+    .withPOD(true)
+    .withBitwiseTakable(true)
+    .withInlineStorage(false);
+  testTable.stride = sizeof(ValueBuffer) + 1;
+  installCommonValueWitnesses(&testTable);
+}
+
+TEST(TestOpaqueExistentialBox, test_assignWithCopy_indirect_indirect) {
+  auto any =
+      swift_getExistentialTypeMetadata(ProtocolClassConstraint::Any,
+                                       /*superclass=*/nullptr, 0, nullptr);
+  auto anyVWT = any->getValueWitnesses();
+
+  ValueWitnessTable testTable;
+  initialize_indirect_witness_table(testTable);
+  FullOpaqueMetadata testMetadata = {{&testTable}, {{MetadataKind::Opaque}}};
+  Metadata *metadata = &testMetadata.base;
+
+  ValueWitnessTable testTable2;
+  initialize_indirect_witness_table(testTable2);
+  FullOpaqueMetadata testMetadata2 = {{&testTable2}, {{MetadataKind::Opaque}}};
+  Metadata *metadata2 = &testMetadata2.base;
+
+  auto refAndObjectAddr = BoxPair(swift_allocBox(metadata));
+  swift_retain(refAndObjectAddr.first);
+  auto refAndObjectAddr2 = BoxPair(swift_allocBox(metadata2));
+  struct {
+    ValueBuffer buffer;
+    Metadata *type;
+    uintptr_t canary;
+  } existBox{{{refAndObjectAddr.first, nullptr, nullptr}}, metadata, 0x5A5A5A5AU},
+    existBox2{{{refAndObjectAddr2.first, nullptr, nullptr}}, metadata2, 0xB5A5A5A5U};
+
+  anyVWT->assignWithCopy(reinterpret_cast<OpaqueValue *>(&existBox),
+                         reinterpret_cast<OpaqueValue *>(&existBox2), any);
+
+  EXPECT_EQ(existBox.type, metadata2);
+  EXPECT_EQ(existBox.canary, 0x5A5A5A5AU);
+  EXPECT_EQ(existBox.buffer.PrivateData[0], refAndObjectAddr2.first);
+  EXPECT_EQ(swift_retainCount(refAndObjectAddr.first), 1);
+  EXPECT_EQ(swift_retainCount(refAndObjectAddr2.first), 2);
+}
+
+TEST(TestOpaqueExistentialBox, test_assignWithTake_indirect_indirect) {
+  auto any =
+      swift_getExistentialTypeMetadata(ProtocolClassConstraint::Any,
+                                       /*superclass=*/nullptr, 0, nullptr);
+  auto anyVWT = any->getValueWitnesses();
+
+  ValueWitnessTable testTable;
+  initialize_indirect_witness_table(testTable);
+  FullOpaqueMetadata testMetadata = {{&testTable}, {{MetadataKind::Opaque}}};
+  Metadata *metadata = &testMetadata.base;
+
+  ValueWitnessTable testTable2;
+  initialize_indirect_witness_table(testTable2);
+  FullOpaqueMetadata testMetadata2 = {{&testTable2}, {{MetadataKind::Opaque}}};
+  Metadata *metadata2 = &testMetadata2.base;
+
+  auto refAndObjectAddr = BoxPair(swift_allocBox(metadata));
+  swift_retain(refAndObjectAddr.first);
+  auto refAndObjectAddr2 = BoxPair(swift_allocBox(metadata2));
+  struct {
+    ValueBuffer buffer;
+    Metadata *type;
+    uintptr_t canary;
+  } existBox{{{refAndObjectAddr.first, nullptr, nullptr}}, metadata, 0x5A5A5A5AU},
+    existBox2{{{refAndObjectAddr2.first, nullptr, nullptr}}, metadata2, 0xB5A5A5A5U};
+
+  anyVWT->assignWithTake(reinterpret_cast<OpaqueValue *>(&existBox),
+                         reinterpret_cast<OpaqueValue *>(&existBox2), any);
+
+  EXPECT_EQ(existBox.type, metadata2);
+  EXPECT_EQ(existBox.canary, 0x5A5A5A5AU);
+  EXPECT_EQ(existBox.buffer.PrivateData[0], refAndObjectAddr2.first);
+  EXPECT_EQ(swift_retainCount(refAndObjectAddr.first), 1);
+  EXPECT_EQ(swift_retainCount(refAndObjectAddr2.first), 1);
+}
+
+TEST(TestOpaqueExistentialBox, test_assignWithCopy_pod_indirect) {
+  auto any =
+      swift_getExistentialTypeMetadata(ProtocolClassConstraint::Any,
+                                       /*superclass=*/nullptr, 0, nullptr);
+  auto anyVWT = any->getValueWitnesses();
+
+  ValueWitnessTable testTable;
+  initialize_pod_witness_table(testTable);
+  FullOpaqueMetadata testMetadata = {{&testTable}, {{MetadataKind::Opaque}}};
+  Metadata *metadata = &testMetadata.base;
+
+  ValueWitnessTable testTable2;
+  initialize_indirect_witness_table(testTable2);
+  FullOpaqueMetadata testMetadata2 = {{&testTable2}, {{MetadataKind::Opaque}}};
+  Metadata *metadata2 = &testMetadata2.base;
+
+  auto refAndObjectAddr2 = BoxPair(swift_allocBox(metadata2));
+  struct {
+    ValueBuffer buffer;
+    Metadata *type;
+    uintptr_t canary;
+  } existBox{{{nullptr, nullptr, nullptr}}, metadata, 0x5A5A5A5AU},
+    existBox2{{{refAndObjectAddr2.first, nullptr, nullptr}}, metadata2, 0xB5A5A5A5U};
+
+  anyVWT->assignWithCopy(reinterpret_cast<OpaqueValue *>(&existBox),
+                         reinterpret_cast<OpaqueValue *>(&existBox2), any);
+
+  EXPECT_EQ(existBox.type, metadata2);
+  EXPECT_EQ(existBox.canary, 0x5A5A5A5AU);
+  EXPECT_EQ(existBox.buffer.PrivateData[0], refAndObjectAddr2.first);
+  EXPECT_EQ(swift_retainCount(refAndObjectAddr2.first), 2);
+}
+
+TEST(TestOpaqueExistentialBox, test_assignWithTake_pod_indirect) {
+  auto any =
+      swift_getExistentialTypeMetadata(ProtocolClassConstraint::Any,
+                                       /*superclass=*/nullptr, 0, nullptr);
+  auto anyVWT = any->getValueWitnesses();
+
+  ValueWitnessTable testTable;
+  initialize_pod_witness_table(testTable);
+  FullOpaqueMetadata testMetadata = {{&testTable}, {{MetadataKind::Opaque}}};
+  Metadata *metadata = &testMetadata.base;
+
+  ValueWitnessTable testTable2;
+  initialize_indirect_witness_table(testTable2);
+  FullOpaqueMetadata testMetadata2 = {{&testTable2}, {{MetadataKind::Opaque}}};
+  Metadata *metadata2 = &testMetadata2.base;
+
+  auto refAndObjectAddr2 = BoxPair(swift_allocBox(metadata2));
+  struct {
+    ValueBuffer buffer;
+    Metadata *type;
+    uintptr_t canary;
+  } existBox{{{nullptr, nullptr, nullptr}}, metadata, 0x5A5A5A5AU},
+    existBox2{{{refAndObjectAddr2.first, nullptr, nullptr}}, metadata2, 0xB5A5A5A5U};
+
+  anyVWT->assignWithTake(reinterpret_cast<OpaqueValue *>(&existBox),
+                         reinterpret_cast<OpaqueValue *>(&existBox2), any);
+
+  EXPECT_EQ(existBox.type, metadata2);
+  EXPECT_EQ(existBox.canary, 0x5A5A5A5AU);
+  EXPECT_EQ(existBox.buffer.PrivateData[0], refAndObjectAddr2.first);
+  EXPECT_EQ(swift_retainCount(refAndObjectAddr2.first), 1);
+}
+
+TEST(TestOpaqueExistentialBox, test_assignWithCopy_indirect_pod) {
+  auto any =
+      swift_getExistentialTypeMetadata(ProtocolClassConstraint::Any,
+                                       /*superclass=*/nullptr, 0, nullptr);
+  auto anyVWT = any->getValueWitnesses();
+
+  ValueWitnessTable testTable;
+  initialize_pod_witness_table(testTable);
+  FullOpaqueMetadata testMetadata = {{&testTable}, {{MetadataKind::Opaque}}};
+  Metadata *metadata = &testMetadata.base;
+
+  ValueWitnessTable testTable2;
+  initialize_indirect_witness_table(testTable2);
+  FullOpaqueMetadata testMetadata2 = {{&testTable2}, {{MetadataKind::Opaque}}};
+  Metadata *metadata2 = &testMetadata2.base;
+
+  auto refAndObjectAddr2 = BoxPair(swift_allocBox(metadata2));
+  void *someAddr = &anyVWT;
+  swift_retain(refAndObjectAddr2.first);
+  struct {
+    ValueBuffer buffer;
+    Metadata *type;
+    uintptr_t canary;
+  } existBox2{{{someAddr, nullptr, someAddr}}, metadata, 0x5A5A5A5AU},
+    existBox{{{refAndObjectAddr2.first, nullptr, nullptr}}, metadata2, 0xB5A5A5A5U};
+
+  anyVWT->assignWithCopy(reinterpret_cast<OpaqueValue *>(&existBox),
+                         reinterpret_cast<OpaqueValue *>(&existBox2), any);
+
+  EXPECT_EQ(existBox.type, metadata);
+  EXPECT_EQ(existBox.canary, 0xB5A5A5A5U);
+  EXPECT_EQ(existBox.buffer.PrivateData[0], someAddr);
+  EXPECT_EQ(existBox.buffer.PrivateData[1], nullptr);
+  EXPECT_EQ(existBox.buffer.PrivateData[2], someAddr);
+  EXPECT_EQ(swift_retainCount(refAndObjectAddr2.first), 1);
+}
+
+TEST(TestOpaqueExistentialBox, test_assignWithTake_indirect_pod) {
+  auto any =
+      swift_getExistentialTypeMetadata(ProtocolClassConstraint::Any,
+                                       /*superclass=*/nullptr, 0, nullptr);
+  auto anyVWT = any->getValueWitnesses();
+
+  ValueWitnessTable testTable;
+  initialize_pod_witness_table(testTable);
+  FullOpaqueMetadata testMetadata = {{&testTable}, {{MetadataKind::Opaque}}};
+  Metadata *metadata = &testMetadata.base;
+
+  ValueWitnessTable testTable2;
+  initialize_indirect_witness_table(testTable2);
+  FullOpaqueMetadata testMetadata2 = {{&testTable2}, {{MetadataKind::Opaque}}};
+  Metadata *metadata2 = &testMetadata2.base;
+
+  auto refAndObjectAddr2 = BoxPair(swift_allocBox(metadata2));
+  void *someAddr = &anyVWT;
+  swift_retain(refAndObjectAddr2.first);
+  struct {
+    ValueBuffer buffer;
+    Metadata *type;
+    uintptr_t canary;
+  } existBox2{{{someAddr, nullptr, someAddr}}, metadata, 0x5A5A5A5AU},
+    existBox{{{refAndObjectAddr2.first, nullptr, nullptr}}, metadata2, 0xB5A5A5A5U};
+
+  anyVWT->assignWithTake(reinterpret_cast<OpaqueValue *>(&existBox),
+                         reinterpret_cast<OpaqueValue *>(&existBox2), any);
+
+  EXPECT_EQ(existBox.type, metadata);
+  EXPECT_EQ(existBox.canary, 0xB5A5A5A5U);
+  EXPECT_EQ(existBox.buffer.PrivateData[0], someAddr);
+  EXPECT_EQ(existBox.buffer.PrivateData[1], nullptr);
+  EXPECT_EQ(existBox.buffer.PrivateData[2], someAddr);
+  EXPECT_EQ(swift_retainCount(refAndObjectAddr2.first), 1);
+}
+
+TEST(TestOpaqueExistentialBox, test_initWithCopy_pod) {
+  auto any =
+      swift_getExistentialTypeMetadata(ProtocolClassConstraint::Any,
+                                       /*superclass=*/nullptr, 0, nullptr);
+  auto anyVWT = any->getValueWitnesses();
+
+  ValueWitnessTable testTable;
+  initialize_pod_witness_table(testTable);
+  FullOpaqueMetadata testMetadata = {{&testTable}, {{MetadataKind::Opaque}}};
+  Metadata *metadata = &testMetadata.base;
+
+  ValueWitnessTable testTable2;
+  initialize_pod_witness_table(testTable2);
+  FullOpaqueMetadata testMetadata2 = {{&testTable2}, {{MetadataKind::Opaque}}};
+  Metadata *metadata2 = &testMetadata2.base;
+
+  void *zeroPtr = nullptr;
+  void *otherPtr = &zeroPtr;
+  struct {
+    ValueBuffer buffer;
+    Metadata *type;
+    uintptr_t canary;
+  } existBox{{{zeroPtr, zeroPtr, zeroPtr}}, metadata, 0x5A5A5A5AU},
+    existBox2{{{otherPtr, otherPtr, zeroPtr}}, metadata2, 0xB5A5A5A5U};
+
+  anyVWT->initializeWithCopy(reinterpret_cast<OpaqueValue *>(&existBox),
+                       reinterpret_cast<OpaqueValue *>(&existBox2), any);
+  EXPECT_EQ(existBox.type, metadata2);
+  EXPECT_EQ(existBox.canary, 0x5A5A5A5AU);
+  EXPECT_EQ(existBox.buffer.PrivateData[0], otherPtr);
+  EXPECT_EQ(existBox.buffer.PrivateData[1], otherPtr);
+  EXPECT_EQ(existBox.buffer.PrivateData[2], zeroPtr);
+}
+
+TEST(TestOpaqueExistentialBox, test_initWithTake_pod) {
+  auto any =
+      swift_getExistentialTypeMetadata(ProtocolClassConstraint::Any,
+                                       /*superclass=*/nullptr, 0, nullptr);
+  auto anyVWT = any->getValueWitnesses();
+
+  ValueWitnessTable testTable;
+  initialize_pod_witness_table(testTable);
+  FullOpaqueMetadata testMetadata = {{&testTable}, {{MetadataKind::Opaque}}};
+  Metadata *metadata = &testMetadata.base;
+
+  ValueWitnessTable testTable2;
+  initialize_pod_witness_table(testTable2);
+  FullOpaqueMetadata testMetadata2 = {{&testTable2}, {{MetadataKind::Opaque}}};
+  Metadata *metadata2 = &testMetadata2.base;
+
+  void *zeroPtr = nullptr;
+  void *otherPtr = &zeroPtr;
+  struct {
+    ValueBuffer buffer;
+    Metadata *type;
+    uintptr_t canary;
+  } existBox{{{zeroPtr, zeroPtr, zeroPtr}}, metadata, 0x5A5A5A5AU},
+    existBox2{{{otherPtr, otherPtr, zeroPtr}}, metadata2, 0xB5A5A5A5U};
+
+  anyVWT->initializeWithTake(reinterpret_cast<OpaqueValue *>(&existBox),
+                       reinterpret_cast<OpaqueValue *>(&existBox2), any);
+  EXPECT_EQ(existBox.type, metadata2);
+  EXPECT_EQ(existBox.canary, 0x5A5A5A5AU);
+  EXPECT_EQ(existBox.buffer.PrivateData[0], otherPtr);
+  EXPECT_EQ(existBox.buffer.PrivateData[1], otherPtr);
+  EXPECT_EQ(existBox.buffer.PrivateData[2], zeroPtr);
+}
+
+TEST(TestOpaqueExistentialBox, test_initWithCopy_indirect) {
+  auto any =
+      swift_getExistentialTypeMetadata(ProtocolClassConstraint::Any,
+                                       /*superclass=*/nullptr, 0, nullptr);
+  auto anyVWT = any->getValueWitnesses();
+
+  ValueWitnessTable testTable;
+  initialize_pod_witness_table(testTable);
+  FullOpaqueMetadata testMetadata = {{&testTable}, {{MetadataKind::Opaque}}};
+  Metadata *metadata = &testMetadata.base;
+
+  ValueWitnessTable testTable2;
+  initialize_indirect_witness_table(testTable2);
+  FullOpaqueMetadata testMetadata2 = {{&testTable2}, {{MetadataKind::Opaque}}};
+  Metadata *metadata2 = &testMetadata2.base;
+
+  auto refAndObjectAddr2 = BoxPair(swift_allocBox(metadata2));
+  struct {
+    ValueBuffer buffer;
+    Metadata *type;
+    uintptr_t canary;
+  } existBox{{{nullptr, nullptr, nullptr}}, metadata, 0x5A5A5A5AU},
+    existBox2{{{refAndObjectAddr2.first, nullptr, nullptr}}, metadata2, 0xB5A5A5A5U};
+
+  anyVWT->initializeWithCopy(reinterpret_cast<OpaqueValue *>(&existBox),
+                             reinterpret_cast<OpaqueValue *>(&existBox2), any);
+
+  EXPECT_EQ(existBox.type, metadata2);
+  EXPECT_EQ(existBox.canary, 0x5A5A5A5AU);
+  EXPECT_EQ(existBox.buffer.PrivateData[0], refAndObjectAddr2.first);
+  EXPECT_EQ(swift_retainCount(refAndObjectAddr2.first), 2);
+}
+
+TEST(TestOpaqueExistentialBox, test_initWithTake_indirect) {
+  auto any =
+      swift_getExistentialTypeMetadata(ProtocolClassConstraint::Any,
+                                       /*superclass=*/nullptr, 0, nullptr);
+  auto anyVWT = any->getValueWitnesses();
+
+  ValueWitnessTable testTable;
+  initialize_pod_witness_table(testTable);
+  FullOpaqueMetadata testMetadata = {{&testTable}, {{MetadataKind::Opaque}}};
+  Metadata *metadata = &testMetadata.base;
+
+  ValueWitnessTable testTable2;
+  initialize_indirect_witness_table(testTable2);
+  FullOpaqueMetadata testMetadata2 = {{&testTable2}, {{MetadataKind::Opaque}}};
+  Metadata *metadata2 = &testMetadata2.base;
+
+  auto refAndObjectAddr2 = BoxPair(swift_allocBox(metadata2));
+  struct {
+    ValueBuffer buffer;
+    Metadata *type;
+    uintptr_t canary;
+  } existBox{{{nullptr, nullptr, nullptr}}, metadata, 0x5A5A5A5AU},
+    existBox2{{{refAndObjectAddr2.first, nullptr, nullptr}}, metadata2, 0xB5A5A5A5U};
+
+  anyVWT->initializeWithTake(reinterpret_cast<OpaqueValue *>(&existBox),
+                             reinterpret_cast<OpaqueValue *>(&existBox2), any);
+
+  EXPECT_EQ(existBox.type, metadata2);
+  EXPECT_EQ(existBox.canary, 0x5A5A5A5AU);
+  EXPECT_EQ(existBox.buffer.PrivateData[0], refAndObjectAddr2.first);
+  EXPECT_EQ(swift_retainCount(refAndObjectAddr2.first), 1);
+}
diff --git a/utils/UnicodeData/confusables.txt b/utils/UnicodeData/confusables.txt
new file mode 100644
index 0000000..4fac5db
--- /dev/null
+++ b/utils/UnicodeData/confusables.txt
@@ -0,0 +1,9411 @@
+# confusables.txt
+# Date: 2016-06-16, 13:41:30 GMT
+# © 2016 Unicode®, Inc.
+# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
+# For terms of use, see http://www.unicode.org/terms_of_use.html
+#
+# Unicode Security Mechanisms for UTR #39
+# Version: 9.0.0
+#
+# For documentation and usage, see http://www.unicode.org/reports/tr39
+#
+05AD ;	0596 ;	MA	# ( ֭ → ֖ ) HEBREW ACCENT DEHI → HEBREW ACCENT TIPEHA	# 
+
+05AE ;	0598 ;	MA	# ( ֮ → ֘ ) HEBREW ACCENT ZINOR → HEBREW ACCENT ZARQA	# 
+
+05A8 ;	0599 ;	MA	# ( ֨ → ֙ ) HEBREW ACCENT QADMA → HEBREW ACCENT PASHTA	# 
+
+05A4 ;	059A ;	MA	# ( ֤ → ֚ ) HEBREW ACCENT MAHAPAKH → HEBREW ACCENT YETIV	# 
+
+1AB4 ;	06DB ;	MA	# ( ᪴ → ۛ ) COMBINING TRIPLE DOT → ARABIC SMALL HIGH THREE DOTS	# 
+20DB ;	06DB ;	MA	# ( ⃛ → ۛ ) COMBINING THREE DOTS ABOVE → ARABIC SMALL HIGH THREE DOTS	# →᪴→
+
+0619 ;	0313 ;	MA	# ( ؙ → ̓ ) ARABIC SMALL DAMMA → COMBINING COMMA ABOVE	# →ُ→
+08F3 ;	0313 ;	MA	# ( ࣳ → ̓ ) ARABIC SMALL HIGH WAW → COMBINING COMMA ABOVE	# →ُ→
+0343 ;	0313 ;	MA	# ( ̓ → ̓ ) COMBINING GREEK KORONIS → COMBINING COMMA ABOVE	# 
+0315 ;	0313 ;	MA	# ( ̕ → ̓ ) COMBINING COMMA ABOVE RIGHT → COMBINING COMMA ABOVE	# 
+064F ;	0313 ;	MA	# ( ُ → ̓ ) ARABIC DAMMA → COMBINING COMMA ABOVE	# 
+
+065D ;	0314 ;	MA	# ( ٝ → ̔ ) ARABIC REVERSED DAMMA → COMBINING REVERSED COMMA ABOVE	# 
+
+059C ;	0301 ;	MA	# ( ֜ → ́ ) HEBREW ACCENT GERESH → COMBINING ACUTE ACCENT	# 
+059D ;	0301 ;	MA	# ( ֝ → ́ ) HEBREW ACCENT GERESH MUQDAM → COMBINING ACUTE ACCENT	# →֜→
+0618 ;	0301 ;	MA	# ( ؘ → ́ ) ARABIC SMALL FATHA → COMBINING ACUTE ACCENT	# →َ→
+0747 ;	0301 ;	MA	# ( ݇ → ́ ) SYRIAC OBLIQUE LINE ABOVE → COMBINING ACUTE ACCENT	# 
+0341 ;	0301 ;	MA	# ( ́ → ́ ) COMBINING ACUTE TONE MARK → COMBINING ACUTE ACCENT	# 
+0954 ;	0301 ;	MA	# ( ॔ → ́ ) DEVANAGARI ACUTE ACCENT → COMBINING ACUTE ACCENT	# 
+064E ;	0301 ;	MA	# ( َ → ́ ) ARABIC FATHA → COMBINING ACUTE ACCENT	# 
+
+0340 ;	0300 ;	MA	# ( ̀ → ̀ ) COMBINING GRAVE TONE MARK → COMBINING GRAVE ACCENT	# 
+0953 ;	0300 ;	MA	# ( ॓ → ̀ ) DEVANAGARI GRAVE ACCENT → COMBINING GRAVE ACCENT	# 
+
+030C ;	0306 ;	MA	# ( ̌ → ̆ ) COMBINING CARON → COMBINING BREVE	# 
+A67C ;	0306 ;	MA	# ( ꙼ → ̆ ) COMBINING CYRILLIC KAVYKA → COMBINING BREVE	# 
+0658 ;	0306 ;	MA	# ( ٘ → ̆ ) ARABIC MARK NOON GHUNNA → COMBINING BREVE	# 
+065A ;	0306 ;	MA	# ( ٚ → ̆ ) ARABIC VOWEL SIGN SMALL V ABOVE → COMBINING BREVE	# →̌→
+036E ;	0306 ;	MA	# ( ͮ → ̆ ) COMBINING LATIN SMALL LETTER V → COMBINING BREVE	# →̌→
+
+06E8 ;	0306 0307 ;	MA	# ( ۨ → ̆̇ ) ARABIC SMALL HIGH NOON → COMBINING BREVE, COMBINING DOT ABOVE	# →̐→
+0310 ;	0306 0307 ;	MA	# ( ̐ → ̆̇ ) COMBINING CANDRABINDU → COMBINING BREVE, COMBINING DOT ABOVE	# 
+0901 ;	0306 0307 ;	MA	# ( ँ → ̆̇ ) DEVANAGARI SIGN CANDRABINDU → COMBINING BREVE, COMBINING DOT ABOVE	# →̐→
+0981 ;	0306 0307 ;	MA	# ( ঁ → ̆̇ ) BENGALI SIGN CANDRABINDU → COMBINING BREVE, COMBINING DOT ABOVE	# →̐→
+0A81 ;	0306 0307 ;	MA	# ( ઁ → ̆̇ ) GUJARATI SIGN CANDRABINDU → COMBINING BREVE, COMBINING DOT ABOVE	# →̐→
+0B01 ;	0306 0307 ;	MA	# ( ଁ → ̆̇ ) ORIYA SIGN CANDRABINDU → COMBINING BREVE, COMBINING DOT ABOVE	# →̐→
+0C00 ;	0306 0307 ;	MA	# ( ఀ → ̆̇ ) TELUGU SIGN COMBINING CANDRABINDU ABOVE → COMBINING BREVE, COMBINING DOT ABOVE	# →ँ→→̐→
+0C81 ;	0306 0307 ;	MA	# ( ಁ → ̆̇ ) KANNADA SIGN CANDRABINDU → COMBINING BREVE, COMBINING DOT ABOVE	# →ँ→→̐→
+0D01 ;	0306 0307 ;	MA	# ( ഁ → ̆̇ ) MALAYALAM SIGN CANDRABINDU → COMBINING BREVE, COMBINING DOT ABOVE	# →ँ→→̐→
+114BF ;	0306 0307 ;	MA	# ( 𑒿 → ̆̇ ) TIRHUTA SIGN CANDRABINDU → COMBINING BREVE, COMBINING DOT ABOVE	# →ঁ→→̐→
+
+1CD0 ;	0302 ;	MA	# ( ᳐ → ̂ ) VEDIC TONE KARSHANA → COMBINING CIRCUMFLEX ACCENT	# 
+0311 ;	0302 ;	MA	# ( ̑ → ̂ ) COMBINING INVERTED BREVE → COMBINING CIRCUMFLEX ACCENT	# 
+065B ;	0302 ;	MA	# ( ٛ → ̂ ) ARABIC VOWEL SIGN INVERTED SMALL V ABOVE → COMBINING CIRCUMFLEX ACCENT	# 
+07EE ;	0302 ;	MA	# ( ߮ → ̂ ) NKO COMBINING LONG DESCENDING TONE → COMBINING CIRCUMFLEX ACCENT	# 
+A6F0 ;	0302 ;	MA	# ( ꛰ → ̂ ) BAMUM COMBINING MARK KOQNDON → COMBINING CIRCUMFLEX ACCENT	# 
+
+05AF ;	030A ;	MA	# ( ֯ → ̊ ) HEBREW MARK MASORA CIRCLE → COMBINING RING ABOVE	# 
+06DF ;	030A ;	MA	# ( ۟ → ̊ ) ARABIC SMALL HIGH ROUNDED ZERO → COMBINING RING ABOVE	# →ْ→
+17D3 ;	030A ;	MA	# ( ៓ → ̊ ) KHMER SIGN BATHAMASAT → COMBINING RING ABOVE	# 
+309A ;	030A ;	MA	# ( ゚ → ̊ ) COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK → COMBINING RING ABOVE	# 
+0652 ;	030A ;	MA	# ( ْ → ̊ ) ARABIC SUKUN → COMBINING RING ABOVE	# 
+0B82 ;	030A ;	MA	# ( ஂ → ̊ ) TAMIL SIGN ANUSVARA → COMBINING RING ABOVE	# 
+1036 ;	030A ;	MA	# ( ံ → ̊ ) MYANMAR SIGN ANUSVARA → COMBINING RING ABOVE	# 
+17C6 ;	030A ;	MA	# ( ំ → ̊ ) KHMER SIGN NIKAHIT → COMBINING RING ABOVE	# 
+11300 ;	030A ;	MA	# ( 𑌀 → ̊ ) GRANTHA SIGN COMBINING ANUSVARA ABOVE → COMBINING RING ABOVE	# →ஂ→
+0E4D ;	030A ;	MA	# ( ํ → ̊ ) THAI CHARACTER NIKHAHIT → COMBINING RING ABOVE	# 
+0ECD ;	030A ;	MA	# ( ໍ → ̊ ) LAO NIGGAHITA → COMBINING RING ABOVE	# 
+0366 ;	030A ;	MA	# ( ͦ → ̊ ) COMBINING LATIN SMALL LETTER O → COMBINING RING ABOVE	# 
+
+08EB ;	0308 ;	MA	# ( ࣫ → ̈ ) ARABIC TONE TWO DOTS ABOVE → COMBINING DIAERESIS	# 
+07F3 ;	0308 ;	MA	# ( ߳ → ̈ ) NKO COMBINING DOUBLE DOT ABOVE → COMBINING DIAERESIS	# 
+
+064B ;	030B ;	MA	# ( ً → ̋ ) ARABIC FATHATAN → COMBINING DOUBLE ACUTE ACCENT	# 
+08F0 ;	030B ;	MA	# ( ࣰ → ̋ ) ARABIC OPEN FATHATAN → COMBINING DOUBLE ACUTE ACCENT	# →ً→
+
+0342 ;	0303 ;	MA	# ( ͂ → ̃ ) COMBINING GREEK PERISPOMENI → COMBINING TILDE	# 
+0653 ;	0303 ;	MA	# ( ٓ → ̃ ) ARABIC MADDAH ABOVE → COMBINING TILDE	# 
+
+05C4 ;	0307 ;	MA	# ( ׄ → ̇ ) HEBREW MARK UPPER DOT → COMBINING DOT ABOVE	# 
+06EC ;	0307 ;	MA	# ( ۬ → ̇ ) ARABIC ROUNDED HIGH STOP WITH FILLED CENTRE → COMBINING DOT ABOVE	# 
+0740 ;	0307 ;	MA	# ( ݀ → ̇ ) SYRIAC FEMININE DOT → COMBINING DOT ABOVE	# →݁→
+08EA ;	0307 ;	MA	# ( ࣪ → ̇ ) ARABIC TONE ONE DOT ABOVE → COMBINING DOT ABOVE	# 
+0741 ;	0307 ;	MA	# ( ݁ → ̇ ) SYRIAC QUSHSHAYA → COMBINING DOT ABOVE	# 
+0358 ;	0307 ;	MA	# ( ͘ → ̇ ) COMBINING DOT ABOVE RIGHT → COMBINING DOT ABOVE	# 
+05B9 ;	0307 ;	MA	# ( ֹ → ̇ ) HEBREW POINT HOLAM → COMBINING DOT ABOVE	# 
+05BA ;	0307 ;	MA	# ( ֺ → ̇ ) HEBREW POINT HOLAM HASER FOR VAV → COMBINING DOT ABOVE	# →ׁ→
+05C2 ;	0307 ;	MA	# ( ׂ → ̇ ) HEBREW POINT SIN DOT → COMBINING DOT ABOVE	# 
+05C1 ;	0307 ;	MA	# ( ׁ → ̇ ) HEBREW POINT SHIN DOT → COMBINING DOT ABOVE	# 
+07ED ;	0307 ;	MA	# ( ߭ → ̇ ) NKO COMBINING SHORT RISING TONE → COMBINING DOT ABOVE	# 
+0902 ;	0307 ;	MA	# ( ं → ̇ ) DEVANAGARI SIGN ANUSVARA → COMBINING DOT ABOVE	# 
+0A02 ;	0307 ;	MA	# ( ਂ → ̇ ) GURMUKHI SIGN BINDI → COMBINING DOT ABOVE	# 
+0A82 ;	0307 ;	MA	# ( ં → ̇ ) GUJARATI SIGN ANUSVARA → COMBINING DOT ABOVE	# 
+0BCD ;	0307 ;	MA	# ( ் → ̇ ) TAMIL SIGN VIRAMA → COMBINING DOT ABOVE	# 
+
+0337 ;	0338 ;	MA	# ( ̷ → ̸ ) COMBINING SHORT SOLIDUS OVERLAY → COMBINING LONG SOLIDUS OVERLAY	# 
+
+1AB7 ;	0328 ;	MA	# ( ᪷ → ̨ ) COMBINING OPEN MARK BELOW → COMBINING OGONEK	# 
+0322 ;	0328 ;	MA	# ( ̢ → ̨ ) COMBINING RETROFLEX HOOK BELOW → COMBINING OGONEK	# 
+0345 ;	0328 ;	MA	# ( ͅ → ̨ ) COMBINING GREEK YPOGEGRAMMENI → COMBINING OGONEK	# 
+
+1CD2 ;	0304 ;	MA	# ( ᳒ → ̄ ) VEDIC TONE PRENKHA → COMBINING MACRON	# 
+0305 ;	0304 ;	MA	# ( ̅ → ̄ ) COMBINING OVERLINE → COMBINING MACRON	# 
+0659 ;	0304 ;	MA	# ( ٙ → ̄ ) ARABIC ZWARAKAY → COMBINING MACRON	# 
+07EB ;	0304 ;	MA	# ( ߫ → ̄ ) NKO COMBINING SHORT HIGH TONE → COMBINING MACRON	# 
+A6F1 ;	0304 ;	MA	# ( ꛱ → ̄ ) BAMUM COMBINING MARK TUKWENTIS → COMBINING MACRON	# 
+
+1CDA ;	030E ;	MA	# ( ᳚ → ̎ ) VEDIC TONE DOUBLE SVARITA → COMBINING DOUBLE VERTICAL LINE ABOVE	# 
+
+0657 ;	0312 ;	MA	# ( ٗ → ̒ ) ARABIC INVERTED DAMMA → COMBINING TURNED COMMA ABOVE	# 
+
+0357 ;	0350 ;	MA	# ( ͗ → ͐ ) COMBINING RIGHT HALF RING ABOVE → COMBINING RIGHT ARROWHEAD ABOVE	# →ࣿ→→ࣸ→
+08FF ;	0350 ;	MA	# ( ࣿ → ͐ ) ARABIC MARK SIDEWAYS NOON GHUNNA → COMBINING RIGHT ARROWHEAD ABOVE	# →ࣸ→
+08F8 ;	0350 ;	MA	# ( ࣸ → ͐ ) ARABIC RIGHT ARROWHEAD ABOVE → COMBINING RIGHT ARROWHEAD ABOVE	# 
+
+0900 ;	0352 ;	MA	# ( ऀ → ͒ ) DEVANAGARI SIGN INVERTED CANDRABINDU → COMBINING FERMATA	# 
+
+1CED ;	0316 ;	MA	# ( ᳭ → ̖ ) VEDIC SIGN TIRYAK → COMBINING GRAVE ACCENT BELOW	# 
+
+1CDC ;	0329 ;	MA	# ( ᳜ → ̩ ) VEDIC TONE KATHAKA ANUDATTA → COMBINING VERTICAL LINE BELOW	# 
+0656 ;	0329 ;	MA	# ( ٖ → ̩ ) ARABIC SUBSCRIPT ALEF → COMBINING VERTICAL LINE BELOW	# 
+
+1CD5 ;	032B ;	MA	# ( ᳕ → ̫ ) VEDIC TONE YAJURVEDIC AGGRAVATED INDEPENDENT SVARITA → COMBINING INVERTED DOUBLE ARCH BELOW	# 
+
+0347 ;	0333 ;	MA	# ( ͇ → ̳ ) COMBINING EQUALS SIGN BELOW → COMBINING DOUBLE LOW LINE	# 
+
+08F9 ;	0354 ;	MA	# ( ࣹ → ͔ ) ARABIC LEFT ARROWHEAD BELOW → COMBINING LEFT ARROWHEAD BELOW	# 
+
+08FA ;	0355 ;	MA	# ( ࣺ → ͕ ) ARABIC RIGHT ARROWHEAD BELOW → COMBINING RIGHT ARROWHEAD BELOW	# 
+
+309B ;	FF9E ;	MA	#* ( ゛ → ゙ ) KATAKANA-HIRAGANA VOICED SOUND MARK → HALFWIDTH KATAKANA VOICED SOUND MARK	# 
+
+309C ;	FF9F ;	MA	#* ( ゜ → ゚ ) KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK → HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK	# 
+
+0336 ;	0335 ;	MA	# ( ̶ → ̵ ) COMBINING LONG STROKE OVERLAY → COMBINING SHORT STROKE OVERLAY	# 
+
+302C ;	0309 ;	MA	# ( 〬 → ̉ ) IDEOGRAPHIC DEPARTING TONE MARK → COMBINING HOOK ABOVE	# 
+
+05C5 ;	0323 ;	MA	# ( ׅ → ̣ ) HEBREW MARK LOWER DOT → COMBINING DOT BELOW	# 
+08ED ;	0323 ;	MA	# ( ࣭ → ̣ ) ARABIC TONE ONE DOT BELOW → COMBINING DOT BELOW	# 
+1CDD ;	0323 ;	MA	# ( ᳝ → ̣ ) VEDIC TONE DOT BELOW → COMBINING DOT BELOW	# 
+05B4 ;	0323 ;	MA	# ( ִ → ̣ ) HEBREW POINT HIRIQ → COMBINING DOT BELOW	# 
+065C ;	0323 ;	MA	# ( ٜ → ̣ ) ARABIC VOWEL SIGN DOT BELOW → COMBINING DOT BELOW	# 
+093C ;	0323 ;	MA	# ( ़ → ̣ ) DEVANAGARI SIGN NUKTA → COMBINING DOT BELOW	# 
+09BC ;	0323 ;	MA	# ( ় → ̣ ) BENGALI SIGN NUKTA → COMBINING DOT BELOW	# 
+0A3C ;	0323 ;	MA	# ( ਼ → ̣ ) GURMUKHI SIGN NUKTA → COMBINING DOT BELOW	# 
+0ABC ;	0323 ;	MA	# ( ઼ → ̣ ) GUJARATI SIGN NUKTA → COMBINING DOT BELOW	# 
+0B3C ;	0323 ;	MA	# ( ଼ → ̣ ) ORIYA SIGN NUKTA → COMBINING DOT BELOW	# 
+111CA ;	0323 ;	MA	# ( 𑇊 → ̣ ) SHARADA SIGN NUKTA → COMBINING DOT BELOW	# →़→
+114C3 ;	0323 ;	MA	# ( 𑓃 → ̣ ) TIRHUTA SIGN NUKTA → COMBINING DOT BELOW	# →়→
+10A3A ;	0323 ;	MA	# ( 𐨺 → ̣ ) KHAROSHTHI SIGN DOT BELOW → COMBINING DOT BELOW	# 
+
+08EE ;	0324 ;	MA	# ( ࣮ → ̤ ) ARABIC TONE TWO DOTS BELOW → COMBINING DIAERESIS BELOW	# 
+1CDE ;	0324 ;	MA	# ( ᳞ → ̤ ) VEDIC TONE TWO DOTS BELOW → COMBINING DIAERESIS BELOW	# 
+
+302D ;	0325 ;	MA	# ( 〭 → ̥ ) IDEOGRAPHIC ENTERING TONE MARK → COMBINING RING BELOW	# 
+
+0327 ;	0326 ;	MA	# ( ̧ → ̦ ) COMBINING CEDILLA → COMBINING COMMA BELOW	# →̡→
+0321 ;	0326 ;	MA	# ( ̡ → ̦ ) COMBINING PALATALIZED HOOK BELOW → COMBINING COMMA BELOW	# 
+0339 ;	0326 ;	MA	# ( ̹ → ̦ ) COMBINING RIGHT HALF RING BELOW → COMBINING COMMA BELOW	# →̧→→̡→
+
+1CD9 ;	032D ;	MA	# ( ᳙ → ̭ ) VEDIC TONE YAJURVEDIC KATHAKA INDEPENDENT SVARITA SCHROEDER → COMBINING CIRCUMFLEX ACCENT BELOW	# 
+
+1CD8 ;	032E ;	MA	# ( ᳘ → ̮ ) VEDIC TONE CANDRA BELOW → COMBINING BREVE BELOW	# 
+
+0952 ;	0331 ;	MA	# ( ॒ → ̱ ) DEVANAGARI STRESS SIGN ANUDATTA → COMBINING MACRON BELOW	# 
+0320 ;	0331 ;	MA	# ( ̠ → ̱ ) COMBINING MINUS SIGN BELOW → COMBINING MACRON BELOW	# 
+
+08F1 ;	064C ;	MA	# ( ࣱ → ٌ ) ARABIC OPEN DAMMATAN → ARABIC DAMMATAN	# 
+08E8 ;	064C ;	MA	# ( ࣨ → ٌ ) ARABIC CURLY DAMMATAN → ARABIC DAMMATAN	# 
+08E5 ;	064C ;	MA	# ( ࣥ → ٌ ) ARABIC CURLY DAMMA → ARABIC DAMMATAN	# 
+
+FC5E ;	FE72 0651 ;	MA	#* ( ‎ﱞ‎ → ‎ﹲّ‎ ) ARABIC LIGATURE SHADDA WITH DAMMATAN ISOLATED FORM → ARABIC DAMMATAN ISOLATED FORM, ARABIC SHADDA	# 
+
+08F2 ;	064D ;	MA	# ( ࣲ → ٍ ) ARABIC OPEN KASRATAN → ARABIC KASRATAN	# 
+
+FC5F ;	FE74 0651 ;	MA	#* ( ‎ﱟ‎ → ‎ﹴّ‎ ) ARABIC LIGATURE SHADDA WITH KASRATAN ISOLATED FORM → ARABIC KASRATAN ISOLATED FORM, ARABIC SHADDA	# 
+
+FCF2 ;	FE77 0651 ;	MA	# ( ‎ﳲ‎ → ‎ﹷّ‎ ) ARABIC LIGATURE SHADDA WITH FATHA MEDIAL FORM → ARABIC FATHA MEDIAL FORM, ARABIC SHADDA	# 
+
+FC60 ;	FE76 0651 ;	MA	#* ( ‎ﱠ‎ → ‎ﹶّ‎ ) ARABIC LIGATURE SHADDA WITH FATHA ISOLATED FORM → ARABIC FATHA ISOLATED FORM, ARABIC SHADDA	# 
+
+FCF3 ;	FE79 0651 ;	MA	# ( ‎ﳳ‎ → ‎ﹹّ‎ ) ARABIC LIGATURE SHADDA WITH DAMMA MEDIAL FORM → ARABIC DAMMA MEDIAL FORM, ARABIC SHADDA	# 
+
+FC61 ;	FE78 0651 ;	MA	#* ( ‎ﱡ‎ → ‎ﹸّ‎ ) ARABIC LIGATURE SHADDA WITH DAMMA ISOLATED FORM → ARABIC DAMMA ISOLATED FORM, ARABIC SHADDA	# 
+
+061A ;	0650 ;	MA	# ( ؚ → ِ ) ARABIC SMALL KASRA → ARABIC KASRA	# 
+0317 ;	0650 ;	MA	# ( ̗ → ِ ) COMBINING ACUTE ACCENT BELOW → ARABIC KASRA	# 
+
+FCF4 ;	FE7B 0651 ;	MA	# ( ‎ﳴ‎ → ‎ﹻّ‎ ) ARABIC LIGATURE SHADDA WITH KASRA MEDIAL FORM → ARABIC KASRA MEDIAL FORM, ARABIC SHADDA	# 
+
+FC62 ;	FE7A 0651 ;	MA	#* ( ‎ﱢ‎ → ‎ﹺّ‎ ) ARABIC LIGATURE SHADDA WITH KASRA ISOLATED FORM → ARABIC KASRA ISOLATED FORM, ARABIC SHADDA	# 
+
+FC63 ;	FE7C 0670 ;	MA	#* ( ‎ﱣ‎ → ‎ﹼٰ‎ ) ARABIC LIGATURE SHADDA WITH SUPERSCRIPT ALEF ISOLATED FORM → ARABIC SHADDA ISOLATED FORM, ARABIC LETTER SUPERSCRIPT ALEF	# 
+
+065F ;	0655 ;	MA	# ( ٟ → ٕ ) ARABIC WAVY HAMZA BELOW → ARABIC HAMZA BELOW	# 
+
+030D ;	0670 ;	MA	# ( ̍ → ٰ ) COMBINING VERTICAL LINE ABOVE → ARABIC LETTER SUPERSCRIPT ALEF	# 
+
+0742 ;	073C ;	MA	# ( ݂ → ܼ ) SYRIAC RUKKAKHA → SYRIAC HBASA-ESASA DOTTED	# 
+
+0A03 ;	0983 ;	MA	# ( ਃ → ঃ ) GURMUKHI SIGN VISARGA → BENGALI SIGN VISARGA	# 
+0C03 ;	0983 ;	MA	# ( ః → ঃ ) TELUGU SIGN VISARGA → BENGALI SIGN VISARGA	# →ਃ→
+0C83 ;	0983 ;	MA	# ( ಃ → ঃ ) KANNADA SIGN VISARGA → BENGALI SIGN VISARGA	# →ః→→ਃ→
+0D03 ;	0983 ;	MA	# ( ഃ → ঃ ) MALAYALAM SIGN VISARGA → BENGALI SIGN VISARGA	# →ಃ→→ః→→ਃ→
+0D83 ;	0983 ;	MA	# ( ඃ → ঃ ) SINHALA SIGN VISARGAYA → BENGALI SIGN VISARGA	# →ഃ→→ಃ→→ః→→ਃ→
+1038 ;	0983 ;	MA	# ( း → ঃ ) MYANMAR SIGN VISARGA → BENGALI SIGN VISARGA	# →ඃ→→ഃ→→ಃ→→ః→→ਃ→
+114C1 ;	0983 ;	MA	# ( 𑓁 → ঃ ) TIRHUTA SIGN VISARGA → BENGALI SIGN VISARGA	# 
+
+17CB ;	0E48 ;	MA	# ( ់ → ่ ) KHMER SIGN BANTOC → THAI CHARACTER MAI EK	# 
+0EC8 ;	0E48 ;	MA	# ( ່ → ่ ) LAO TONE MAI EK → THAI CHARACTER MAI EK	# 
+
+0EC9 ;	0E49 ;	MA	# ( ້ → ้ ) LAO TONE MAI THO → THAI CHARACTER MAI THO	# 
+
+0ECA ;	0E4A ;	MA	# ( ໊ → ๊ ) LAO TONE MAI TI → THAI CHARACTER MAI TRI	# 
+
+0ECB ;	0E4B ;	MA	# ( ໋ → ๋ ) LAO TONE MAI CATAWA → THAI CHARACTER MAI CHATTAWA	# 
+
+A66F ;	20E9 ;	MA	# ( ꙯ → ⃩ ) COMBINING CYRILLIC VZMET → COMBINING WIDE BRIDGE ABOVE	# 
+
+2028 ;	0020 ;	MA	#* (  →   ) LINE SEPARATOR → SPACE	# 
+2029 ;	0020 ;	MA	#* (  →   ) PARAGRAPH SEPARATOR → SPACE	# 
+1680 ;	0020 ;	MA	#* (   →   ) OGHAM SPACE MARK → SPACE	# 
+2000 ;	0020 ;	MA	#* (   →   ) EN QUAD → SPACE	# 
+2001 ;	0020 ;	MA	#* (   →   ) EM QUAD → SPACE	# 
+2002 ;	0020 ;	MA	#* (   →   ) EN SPACE → SPACE	# 
+2003 ;	0020 ;	MA	#* (   →   ) EM SPACE → SPACE	# 
+2004 ;	0020 ;	MA	#* (   →   ) THREE-PER-EM SPACE → SPACE	# 
+2005 ;	0020 ;	MA	#* (   →   ) FOUR-PER-EM SPACE → SPACE	# 
+2006 ;	0020 ;	MA	#* (   →   ) SIX-PER-EM SPACE → SPACE	# 
+2008 ;	0020 ;	MA	#* (   →   ) PUNCTUATION SPACE → SPACE	# 
+2009 ;	0020 ;	MA	#* (   →   ) THIN SPACE → SPACE	# 
+200A ;	0020 ;	MA	#* (   →   ) HAIR SPACE → SPACE	# 
+205F ;	0020 ;	MA	#* (   →   ) MEDIUM MATHEMATICAL SPACE → SPACE	# 
+00A0 ;	0020 ;	MA	#* (   →   ) NO-BREAK SPACE → SPACE	# 
+2007 ;	0020 ;	MA	#* (   →   ) FIGURE SPACE → SPACE	# 
+202F ;	0020 ;	MA	#* (   →   ) NARROW NO-BREAK SPACE → SPACE	# 
+
+07FA ;	005F ;	MA	# ( ‎ߺ‎ → _ ) NKO LAJANYALAN → LOW LINE	# 
+FE4D ;	005F ;	MA	# ( ﹍ → _ ) DASHED LOW LINE → LOW LINE	# 
+FE4E ;	005F ;	MA	# ( ﹎ → _ ) CENTRELINE LOW LINE → LOW LINE	# 
+FE4F ;	005F ;	MA	# ( ﹏ → _ ) WAVY LOW LINE → LOW LINE	# 
+
+2010 ;	002D ;	MA	#* ( ‐ → - ) HYPHEN → HYPHEN-MINUS	# 
+2011 ;	002D ;	MA	#* ( ‑ → - ) NON-BREAKING HYPHEN → HYPHEN-MINUS	# 
+2012 ;	002D ;	MA	#* ( ‒ → - ) FIGURE DASH → HYPHEN-MINUS	# 
+2013 ;	002D ;	MA	#* ( – → - ) EN DASH → HYPHEN-MINUS	# 
+FE58 ;	002D ;	MA	#* ( ﹘ → - ) SMALL EM DASH → HYPHEN-MINUS	# 
+06D4 ;	002D ;	MA	#* ( ‎۔‎ → - ) ARABIC FULL STOP → HYPHEN-MINUS	# →‐→
+2043 ;	002D ;	MA	#* ( ⁃ → - ) HYPHEN BULLET → HYPHEN-MINUS	# →‐→
+02D7 ;	002D ;	MA	#* ( ˗ → - ) MODIFIER LETTER MINUS SIGN → HYPHEN-MINUS	# 
+2212 ;	002D ;	MA	#* ( − → - ) MINUS SIGN → HYPHEN-MINUS	# 
+2796 ;	002D ;	MA	#* ( ➖ → - ) HEAVY MINUS SIGN → HYPHEN-MINUS	# →−→
+2CBA ;	002D ;	MA	# ( Ⲻ → - ) COPTIC CAPITAL LETTER DIALECT-P NI → HYPHEN-MINUS	# →‒→
+
+2A29 ;	002D 0313 ;	MA	#* ( ⨩ → -̓ ) MINUS SIGN WITH COMMA ABOVE → HYPHEN-MINUS, COMBINING COMMA ABOVE	# →−̓→
+
+2E1A ;	002D 0308 ;	MA	#* ( ⸚ → -̈ ) HYPHEN WITH DIAERESIS → HYPHEN-MINUS, COMBINING DIAERESIS	# 
+
+FB29 ;	002D 0307 ;	MA	#* ( ﬩ → -̇ ) HEBREW LETTER ALTERNATIVE PLUS SIGN → HYPHEN-MINUS, COMBINING DOT ABOVE	# →∸→→−̇→
+2238 ;	002D 0307 ;	MA	#* ( ∸ → -̇ ) DOT MINUS → HYPHEN-MINUS, COMBINING DOT ABOVE	# →−̇→
+
+2A2A ;	002D 0323 ;	MA	#* ( ⨪ → -̣ ) MINUS SIGN WITH DOT BELOW → HYPHEN-MINUS, COMBINING DOT BELOW	# →−̣→
+
+A4FE ;	002D 002E ;	MA	#* ( ꓾ → -. ) LISU PUNCTUATION COMMA → HYPHEN-MINUS, FULL STOP	# 
+
+FF5E ;	301C ;	MA	#* ( ~ → 〜 ) FULLWIDTH TILDE → WAVE DASH	# 
+
+060D ;	002C ;	MA	#* ( ‎؍‎ → , ) ARABIC DATE SEPARATOR → COMMA	# →‎٫‎→
+066B ;	002C ;	MA	#* ( ‎٫‎ → , ) ARABIC DECIMAL SEPARATOR → COMMA	# 
+201A ;	002C ;	MA	#* ( ‚ → , ) SINGLE LOW-9 QUOTATION MARK → COMMA	# 
+00B8 ;	002C ;	MA	#* ( ¸ → , ) CEDILLA → COMMA	# 
+A4F9 ;	002C ;	MA	# ( ꓹ → , ) LISU LETTER TONE NA PO → COMMA	# 
+
+2E32 ;	060C ;	MA	#* ( ⸲ → ، ) TURNED COMMA → ARABIC COMMA	# 
+066C ;	060C ;	MA	#* ( ‎٬‎ → ، ) ARABIC THOUSANDS SEPARATOR → ARABIC COMMA	# 
+
+037E ;	003B ;	MA	#* ( ; → ; ) GREEK QUESTION MARK → SEMICOLON	# 
+
+2E35 ;	061B ;	MA	#* ( ⸵ → ‎؛‎ ) TURNED SEMICOLON → ARABIC SEMICOLON	# 
+
+0903 ;	003A ;	MA	# ( ः → : ) DEVANAGARI SIGN VISARGA → COLON	# 
+0A83 ;	003A ;	MA	# ( ઃ → : ) GUJARATI SIGN VISARGA → COLON	# 
+FF1A ;	003A ;	MA	#* ( : → : ) FULLWIDTH COLON → COLON	# →︰→
+0589 ;	003A ;	MA	#* ( ։ → : ) ARMENIAN FULL STOP → COLON	# 
+0703 ;	003A ;	MA	#* ( ‎܃‎ → : ) SYRIAC SUPRALINEAR COLON → COLON	# 
+0704 ;	003A ;	MA	#* ( ‎܄‎ → : ) SYRIAC SUBLINEAR COLON → COLON	# 
+16EC ;	003A ;	MA	#* ( ᛬ → : ) RUNIC MULTIPLE PUNCTUATION → COLON	# 
+FE30 ;	003A ;	MA	#* ( ︰ → : ) PRESENTATION FORM FOR VERTICAL TWO DOT LEADER → COLON	# 
+1803 ;	003A ;	MA	#* ( ᠃ → : ) MONGOLIAN FULL STOP → COLON	# 
+1809 ;	003A ;	MA	#* ( ᠉ → : ) MONGOLIAN MANCHU FULL STOP → COLON	# 
+205A ;	003A ;	MA	#* ( ⁚ → : ) TWO DOT PUNCTUATION → COLON	# 
+05C3 ;	003A ;	MA	#* ( ‎׃‎ → : ) HEBREW PUNCTUATION SOF PASUQ → COLON	# 
+02F8 ;	003A ;	MA	#* ( ˸ → : ) MODIFIER LETTER RAISED COLON → COLON	# 
+A789 ;	003A ;	MA	#* ( ꞉ → : ) MODIFIER LETTER COLON → COLON	# 
+2236 ;	003A ;	MA	#* ( ∶ → : ) RATIO → COLON	# 
+02D0 ;	003A ;	MA	# ( ː → : ) MODIFIER LETTER TRIANGULAR COLON → COLON	# 
+A4FD ;	003A ;	MA	# ( ꓽ → : ) LISU LETTER TONE MYA JEU → COLON	# 
+
+2A74 ;	003A 003A 003D ;	MA	#* ( ⩴ → ::= ) DOUBLE COLON EQUAL → COLON, COLON, EQUALS SIGN	# 
+
+29F4 ;	003A 2192 ;	MA	#* ( ⧴ → :→ ) RULE-DELAYED → COLON, RIGHTWARDS ARROW	# 
+
+FF01 ;	0021 ;	MA	#* ( ! → ! ) FULLWIDTH EXCLAMATION MARK → EXCLAMATION MARK	# →ǃ→
+01C3 ;	0021 ;	MA	# ( ǃ → ! ) LATIN LETTER RETROFLEX CLICK → EXCLAMATION MARK	# 
+2D51 ;	0021 ;	MA	# ( ⵑ → ! ) TIFINAGH LETTER TUAREG YANG → EXCLAMATION MARK	# 
+
+203C ;	0021 0021 ;	MA	#* ( ‼ → !! ) DOUBLE EXCLAMATION MARK → EXCLAMATION MARK, EXCLAMATION MARK	# 
+
+2049 ;	0021 003F ;	MA	#* ( ⁉ → !? ) EXCLAMATION QUESTION MARK → EXCLAMATION MARK, QUESTION MARK	# 
+
+0294 ;	003F ;	MA	# ( ʔ → ? ) LATIN LETTER GLOTTAL STOP → QUESTION MARK	# 
+0241 ;	003F ;	MA	# ( Ɂ → ? ) LATIN CAPITAL LETTER GLOTTAL STOP → QUESTION MARK	# →ʔ→
+097D ;	003F ;	MA	# ( ॽ → ? ) DEVANAGARI LETTER GLOTTAL STOP → QUESTION MARK	# 
+13AE ;	003F ;	MA	# ( Ꭾ → ? ) CHEROKEE LETTER HE → QUESTION MARK	# →Ɂ→→ʔ→
+A6EB ;	003F ;	MA	# ( ꛫ → ? ) BAMUM LETTER NTUU → QUESTION MARK	# →ʔ→
+
+2048 ;	003F 0021 ;	MA	#* ( ⁈ → ?! ) QUESTION EXCLAMATION MARK → QUESTION MARK, EXCLAMATION MARK	# 
+
+2047 ;	003F 003F ;	MA	#* ( ⁇ → ?? ) DOUBLE QUESTION MARK → QUESTION MARK, QUESTION MARK	# 
+
+2E2E ;	061F ;	MA	#* ( ⸮ → ‎؟‎ ) REVERSED QUESTION MARK → ARABIC QUESTION MARK	# 
+
+1D16D ;	002E ;	MA	# ( 𝅭 → . ) MUSICAL SYMBOL COMBINING AUGMENTATION DOT → FULL STOP	# 
+2024 ;	002E ;	MA	#* ( ․ → . ) ONE DOT LEADER → FULL STOP	# 
+0701 ;	002E ;	MA	#* ( ‎܁‎ → . ) SYRIAC SUPRALINEAR FULL STOP → FULL STOP	# 
+0702 ;	002E ;	MA	#* ( ‎܂‎ → . ) SYRIAC SUBLINEAR FULL STOP → FULL STOP	# 
+A60E ;	002E ;	MA	#* ( ꘎ → . ) VAI FULL STOP → FULL STOP	# 
+10A50 ;	002E ;	MA	#* ( ‎𐩐‎ → . ) KHAROSHTHI PUNCTUATION DOT → FULL STOP	# 
+0660 ;	002E ;	MA	# ( ‎٠‎ → . ) ARABIC-INDIC DIGIT ZERO → FULL STOP	# 
+06F0 ;	002E ;	MA	# ( ۰ → . ) EXTENDED ARABIC-INDIC DIGIT ZERO → FULL STOP	# →‎٠‎→
+A4F8 ;	002E ;	MA	# ( ꓸ → . ) LISU LETTER TONE MYA TI → FULL STOP	# 
+
+A4FB ;	002E 002C ;	MA	# ( ꓻ → ., ) LISU LETTER TONE MYA BO → FULL STOP, COMMA	# 
+
+2025 ;	002E 002E ;	MA	#* ( ‥ → .. ) TWO DOT LEADER → FULL STOP, FULL STOP	# 
+A4FA ;	002E 002E ;	MA	# ( ꓺ → .. ) LISU LETTER TONE MYA CYA → FULL STOP, FULL STOP	# 
+
+2026 ;	002E 002E 002E ;	MA	#* ( … → ... ) HORIZONTAL ELLIPSIS → FULL STOP, FULL STOP, FULL STOP	# 
+
+A6F4 ;	A6F3 A6F3 ;	MA	#* ( ꛴ → ꛳꛳ ) BAMUM COLON → BAMUM FULL STOP, BAMUM FULL STOP	# 
+
+30FB ;	00B7 ;	MA	#* ( ・ → · ) KATAKANA MIDDLE DOT → MIDDLE DOT	# →•→
+FF65 ;	00B7 ;	MA	#* ( ・ → · ) HALFWIDTH KATAKANA MIDDLE DOT → MIDDLE DOT	# →•→
+16EB ;	00B7 ;	MA	#* ( ᛫ → · ) RUNIC SINGLE PUNCTUATION → MIDDLE DOT	# 
+0387 ;	00B7 ;	MA	# ( · → · ) GREEK ANO TELEIA → MIDDLE DOT	# 
+2E31 ;	00B7 ;	MA	#* ( ⸱ → · ) WORD SEPARATOR MIDDLE DOT → MIDDLE DOT	# 
+10101 ;	00B7 ;	MA	#* ( 𐄁 → · ) AEGEAN WORD SEPARATOR DOT → MIDDLE DOT	# 
+2022 ;	00B7 ;	MA	#* ( • → · ) BULLET → MIDDLE DOT	# 
+2027 ;	00B7 ;	MA	#* ( ‧ → · ) HYPHENATION POINT → MIDDLE DOT	# 
+2219 ;	00B7 ;	MA	#* ( ∙ → · ) BULLET OPERATOR → MIDDLE DOT	# 
+22C5 ;	00B7 ;	MA	#* ( ⋅ → · ) DOT OPERATOR → MIDDLE DOT	# 
+A78F ;	00B7 ;	MA	# ( ꞏ → · ) LATIN LETTER SINOLOGICAL DOT → MIDDLE DOT	# 
+1427 ;	00B7 ;	MA	# ( ᐧ → · ) CANADIAN SYLLABICS FINAL MIDDLE DOT → MIDDLE DOT	# 
+
+22EF ;	00B7 00B7 00B7 ;	MA	#* ( ⋯ → ··· ) MIDLINE HORIZONTAL ELLIPSIS → MIDDLE DOT, MIDDLE DOT, MIDDLE DOT	# 
+2D48 ;	00B7 00B7 00B7 ;	MA	# ( ⵈ → ··· ) TIFINAGH LETTER TUAREG YAQ → MIDDLE DOT, MIDDLE DOT, MIDDLE DOT	# →⋯→
+
+1444 ;	00B7 003C ;	MA	# ( ᑄ → ·< ) CANADIAN SYLLABICS PWA → MIDDLE DOT, LESS-THAN SIGN	# →ᐧᐸ→
+
+22D7 ;	00B7 003E ;	MA	#* ( ⋗ → ·> ) GREATER-THAN WITH DOT → MIDDLE DOT, GREATER-THAN SIGN	# →ᑀ→→ᐧᐳ→
+1437 ;	00B7 003E ;	MA	# ( ᐷ → ·> ) CANADIAN SYLLABICS CARRIER HI → MIDDLE DOT, GREATER-THAN SIGN	# →ᑀ→→ᐧᐳ→
+1440 ;	00B7 003E ;	MA	# ( ᑀ → ·> ) CANADIAN SYLLABICS PWO → MIDDLE DOT, GREATER-THAN SIGN	# →ᐧᐳ→
+
+152F ;	00B7 0034 ;	MA	# ( ᔯ → ·4 ) CANADIAN SYLLABICS YWE → MIDDLE DOT, DIGIT FOUR	# →ᐧ4→
+
+147A ;	00B7 0064 ;	MA	# ( ᑺ → ·d ) CANADIAN SYLLABICS KWO → MIDDLE DOT, LATIN SMALL LETTER D	# →ᐧᑯ→
+
+1498 ;	00B7 004A ;	MA	# ( ᒘ → ·J ) CANADIAN SYLLABICS CWO → MIDDLE DOT, LATIN CAPITAL LETTER J	# →ᐧᒍ→
+
+14B6 ;	00B7 004C ;	MA	# ( ᒶ → ·L ) CANADIAN SYLLABICS MWA → MIDDLE DOT, LATIN CAPITAL LETTER L	# →ᐧL→
+
+1476 ;	00B7 0050 ;	MA	# ( ᑶ → ·P ) CANADIAN SYLLABICS KWI → MIDDLE DOT, LATIN CAPITAL LETTER P	# →ᐧᑭ→
+
+1457 ;	00B7 0055 ;	MA	# ( ᑗ → ·U ) CANADIAN SYLLABICS TWE → MIDDLE DOT, LATIN CAPITAL LETTER U	# →ᐧᑌ→→·ᑌ→
+
+143A ;	00B7 0056 ;	MA	# ( ᐺ → ·V ) CANADIAN SYLLABICS PWE → MIDDLE DOT, LATIN CAPITAL LETTER V	# →ᐧᐯ→
+
+143C ;	00B7 0245 ;	MA	# ( ᐼ → ·Ʌ ) CANADIAN SYLLABICS PWI → MIDDLE DOT, LATIN CAPITAL LETTER TURNED V	# →ᐧᐱ→→·ᐱ→
+
+14AE ;	00B7 0393 ;	MA	# ( ᒮ → ·Γ ) CANADIAN SYLLABICS MWI → MIDDLE DOT, GREEK CAPITAL LETTER GAMMA	# →ᐧᒥ→→·ᒥ→
+
+140E ;	00B7 0394 ;	MA	# ( ᐎ → ·Δ ) CANADIAN SYLLABICS WI → MIDDLE DOT, GREEK CAPITAL LETTER DELTA	# →ᐧᐃ→
+
+1459 ;	00B7 0548 ;	MA	# ( ᑙ → ·Ո ) CANADIAN SYLLABICS TWI → MIDDLE DOT, ARMENIAN CAPITAL LETTER VO	# →ᐧᑎ→→·ᑎ→
+
+140C ;	00B7 1401 ;	MA	# ( ᐌ → ·ᐁ ) CANADIAN SYLLABICS WE → MIDDLE DOT, CANADIAN SYLLABICS E	# →ᐧᐁ→
+
+1410 ;	00B7 1404 ;	MA	# ( ᐐ → ·ᐄ ) CANADIAN SYLLABICS WII → MIDDLE DOT, CANADIAN SYLLABICS II	# →ᐧᐄ→
+
+1412 ;	00B7 1405 ;	MA	# ( ᐒ → ·ᐅ ) CANADIAN SYLLABICS WO → MIDDLE DOT, CANADIAN SYLLABICS O	# →ᐧᐅ→
+
+1414 ;	00B7 1406 ;	MA	# ( ᐔ → ·ᐆ ) CANADIAN SYLLABICS WOO → MIDDLE DOT, CANADIAN SYLLABICS OO	# →ᐧᐆ→
+
+1417 ;	00B7 140A ;	MA	# ( ᐗ → ·ᐊ ) CANADIAN SYLLABICS WA → MIDDLE DOT, CANADIAN SYLLABICS A	# →ᐧᐊ→
+
+1419 ;	00B7 140B ;	MA	# ( ᐙ → ·ᐋ ) CANADIAN SYLLABICS WAA → MIDDLE DOT, CANADIAN SYLLABICS AA	# →ᐧᐋ→
+
+143E ;	00B7 1432 ;	MA	# ( ᐾ → ·ᐲ ) CANADIAN SYLLABICS PWII → MIDDLE DOT, CANADIAN SYLLABICS PII	# →ᐧᐲ→
+
+1442 ;	00B7 1434 ;	MA	# ( ᑂ → ·ᐴ ) CANADIAN SYLLABICS PWOO → MIDDLE DOT, CANADIAN SYLLABICS POO	# →ᐧᐴ→
+
+1446 ;	00B7 1439 ;	MA	# ( ᑆ → ·ᐹ ) CANADIAN SYLLABICS PWAA → MIDDLE DOT, CANADIAN SYLLABICS PAA	# →ᐧᐹ→
+
+145B ;	00B7 144F ;	MA	# ( ᑛ → ·ᑏ ) CANADIAN SYLLABICS TWII → MIDDLE DOT, CANADIAN SYLLABICS TII	# →ᐧᑏ→
+
+1454 ;	00B7 1450 ;	MA	# ( ᑔ → ·ᑐ ) CANADIAN SYLLABICS CARRIER DI → MIDDLE DOT, CANADIAN SYLLABICS TO	# →ᑝ→→ᐧᑐ→
+145D ;	00B7 1450 ;	MA	# ( ᑝ → ·ᑐ ) CANADIAN SYLLABICS TWO → MIDDLE DOT, CANADIAN SYLLABICS TO	# →ᐧᑐ→
+
+145F ;	00B7 1451 ;	MA	# ( ᑟ → ·ᑑ ) CANADIAN SYLLABICS TWOO → MIDDLE DOT, CANADIAN SYLLABICS TOO	# →ᐧᑑ→
+
+1461 ;	00B7 1455 ;	MA	# ( ᑡ → ·ᑕ ) CANADIAN SYLLABICS TWA → MIDDLE DOT, CANADIAN SYLLABICS TA	# →ᐧᑕ→
+
+1463 ;	00B7 1456 ;	MA	# ( ᑣ → ·ᑖ ) CANADIAN SYLLABICS TWAA → MIDDLE DOT, CANADIAN SYLLABICS TAA	# →ᐧᑖ→
+
+1474 ;	00B7 146B ;	MA	# ( ᑴ → ·ᑫ ) CANADIAN SYLLABICS KWE → MIDDLE DOT, CANADIAN SYLLABICS KE	# →ᐧᑫ→
+
+1478 ;	00B7 146E ;	MA	# ( ᑸ → ·ᑮ ) CANADIAN SYLLABICS KWII → MIDDLE DOT, CANADIAN SYLLABICS KII	# →ᐧᑮ→
+
+147C ;	00B7 1470 ;	MA	# ( ᑼ → ·ᑰ ) CANADIAN SYLLABICS KWOO → MIDDLE DOT, CANADIAN SYLLABICS KOO	# →ᐧᑰ→
+
+147E ;	00B7 1472 ;	MA	# ( ᑾ → ·ᑲ ) CANADIAN SYLLABICS KWA → MIDDLE DOT, CANADIAN SYLLABICS KA	# →ᐧᑲ→
+
+1480 ;	00B7 1473 ;	MA	# ( ᒀ → ·ᑳ ) CANADIAN SYLLABICS KWAA → MIDDLE DOT, CANADIAN SYLLABICS KAA	# →ᐧᑳ→
+
+1492 ;	00B7 1489 ;	MA	# ( ᒒ → ·ᒉ ) CANADIAN SYLLABICS CWE → MIDDLE DOT, CANADIAN SYLLABICS CE	# →ᐧᒉ→
+
+1494 ;	00B7 148B ;	MA	# ( ᒔ → ·ᒋ ) CANADIAN SYLLABICS CWI → MIDDLE DOT, CANADIAN SYLLABICS CI	# →ᐧᒋ→
+
+1496 ;	00B7 148C ;	MA	# ( ᒖ → ·ᒌ ) CANADIAN SYLLABICS CWII → MIDDLE DOT, CANADIAN SYLLABICS CII	# →ᐧᒌ→
+
+149A ;	00B7 148E ;	MA	# ( ᒚ → ·ᒎ ) CANADIAN SYLLABICS CWOO → MIDDLE DOT, CANADIAN SYLLABICS COO	# →ᐧᒎ→
+
+149C ;	00B7 1490 ;	MA	# ( ᒜ → ·ᒐ ) CANADIAN SYLLABICS CWA → MIDDLE DOT, CANADIAN SYLLABICS CA	# →ᐧᒐ→
+
+149E ;	00B7 1491 ;	MA	# ( ᒞ → ·ᒑ ) CANADIAN SYLLABICS CWAA → MIDDLE DOT, CANADIAN SYLLABICS CAA	# →ᐧᒑ→
+
+14AC ;	00B7 14A3 ;	MA	# ( ᒬ → ·ᒣ ) CANADIAN SYLLABICS MWE → MIDDLE DOT, CANADIAN SYLLABICS ME	# →ᐧᒣ→
+
+14B0 ;	00B7 14A6 ;	MA	# ( ᒰ → ·ᒦ ) CANADIAN SYLLABICS MWII → MIDDLE DOT, CANADIAN SYLLABICS MII	# →ᐧᒦ→
+
+14B2 ;	00B7 14A7 ;	MA	# ( ᒲ → ·ᒧ ) CANADIAN SYLLABICS MWO → MIDDLE DOT, CANADIAN SYLLABICS MO	# →ᐧᒧ→
+
+14B4 ;	00B7 14A8 ;	MA	# ( ᒴ → ·ᒨ ) CANADIAN SYLLABICS MWOO → MIDDLE DOT, CANADIAN SYLLABICS MOO	# →ᐧᒨ→
+
+14B8 ;	00B7 14AB ;	MA	# ( ᒸ → ·ᒫ ) CANADIAN SYLLABICS MWAA → MIDDLE DOT, CANADIAN SYLLABICS MAA	# →ᐧᒫ→
+
+14C9 ;	00B7 14C0 ;	MA	# ( ᓉ → ·ᓀ ) CANADIAN SYLLABICS NWE → MIDDLE DOT, CANADIAN SYLLABICS NE	# →ᐧᓀ→
+
+14CB ;	00B7 14C7 ;	MA	# ( ᓋ → ·ᓇ ) CANADIAN SYLLABICS NWA → MIDDLE DOT, CANADIAN SYLLABICS NA	# →ᐧᓇ→
+
+14CD ;	00B7 14C8 ;	MA	# ( ᓍ → ·ᓈ ) CANADIAN SYLLABICS NWAA → MIDDLE DOT, CANADIAN SYLLABICS NAA	# →ᐧᓈ→
+
+14DC ;	00B7 14D3 ;	MA	# ( ᓜ → ·ᓓ ) CANADIAN SYLLABICS LWE → MIDDLE DOT, CANADIAN SYLLABICS LE	# →ᐧᓓ→
+
+14DE ;	00B7 14D5 ;	MA	# ( ᓞ → ·ᓕ ) CANADIAN SYLLABICS LWI → MIDDLE DOT, CANADIAN SYLLABICS LI	# →ᐧᓕ→
+
+14E0 ;	00B7 14D6 ;	MA	# ( ᓠ → ·ᓖ ) CANADIAN SYLLABICS LWII → MIDDLE DOT, CANADIAN SYLLABICS LII	# →ᐧᓖ→
+
+14E2 ;	00B7 14D7 ;	MA	# ( ᓢ → ·ᓗ ) CANADIAN SYLLABICS LWO → MIDDLE DOT, CANADIAN SYLLABICS LO	# →ᐧᓗ→
+
+14E4 ;	00B7 14D8 ;	MA	# ( ᓤ → ·ᓘ ) CANADIAN SYLLABICS LWOO → MIDDLE DOT, CANADIAN SYLLABICS LOO	# →ᐧᓘ→
+
+14E6 ;	00B7 14DA ;	MA	# ( ᓦ → ·ᓚ ) CANADIAN SYLLABICS LWA → MIDDLE DOT, CANADIAN SYLLABICS LA	# →ᐧᓚ→
+
+14E8 ;	00B7 14DB ;	MA	# ( ᓨ → ·ᓛ ) CANADIAN SYLLABICS LWAA → MIDDLE DOT, CANADIAN SYLLABICS LAA	# →ᐧᓛ→
+
+14F6 ;	00B7 14ED ;	MA	# ( ᓶ → ·ᓭ ) CANADIAN SYLLABICS SWE → MIDDLE DOT, CANADIAN SYLLABICS SE	# →ᐧᓭ→
+
+14F8 ;	00B7 14EF ;	MA	# ( ᓸ → ·ᓯ ) CANADIAN SYLLABICS SWI → MIDDLE DOT, CANADIAN SYLLABICS SI	# →ᐧᓯ→
+
+14FA ;	00B7 14F0 ;	MA	# ( ᓺ → ·ᓰ ) CANADIAN SYLLABICS SWII → MIDDLE DOT, CANADIAN SYLLABICS SII	# →ᐧᓰ→
+
+14FC ;	00B7 14F1 ;	MA	# ( ᓼ → ·ᓱ ) CANADIAN SYLLABICS SWO → MIDDLE DOT, CANADIAN SYLLABICS SO	# →ᐧᓱ→
+
+14FE ;	00B7 14F2 ;	MA	# ( ᓾ → ·ᓲ ) CANADIAN SYLLABICS SWOO → MIDDLE DOT, CANADIAN SYLLABICS SOO	# →ᐧᓲ→
+
+1500 ;	00B7 14F4 ;	MA	# ( ᔀ → ·ᓴ ) CANADIAN SYLLABICS SWA → MIDDLE DOT, CANADIAN SYLLABICS SA	# →ᐧᓴ→
+
+1502 ;	00B7 14F5 ;	MA	# ( ᔂ → ·ᓵ ) CANADIAN SYLLABICS SWAA → MIDDLE DOT, CANADIAN SYLLABICS SAA	# →ᐧᓵ→
+
+1517 ;	00B7 1510 ;	MA	# ( ᔗ → ·ᔐ ) CANADIAN SYLLABICS SHWE → MIDDLE DOT, CANADIAN SYLLABICS SHE	# →ᐧᔐ→
+
+1519 ;	00B7 1511 ;	MA	# ( ᔙ → ·ᔑ ) CANADIAN SYLLABICS SHWI → MIDDLE DOT, CANADIAN SYLLABICS SHI	# →ᐧᔑ→
+
+151B ;	00B7 1512 ;	MA	# ( ᔛ → ·ᔒ ) CANADIAN SYLLABICS SHWII → MIDDLE DOT, CANADIAN SYLLABICS SHII	# →ᐧᔒ→
+
+151D ;	00B7 1513 ;	MA	# ( ᔝ → ·ᔓ ) CANADIAN SYLLABICS SHWO → MIDDLE DOT, CANADIAN SYLLABICS SHO	# →ᐧᔓ→
+
+151F ;	00B7 1514 ;	MA	# ( ᔟ → ·ᔔ ) CANADIAN SYLLABICS SHWOO → MIDDLE DOT, CANADIAN SYLLABICS SHOO	# →ᐧᔔ→
+
+1521 ;	00B7 1515 ;	MA	# ( ᔡ → ·ᔕ ) CANADIAN SYLLABICS SHWA → MIDDLE DOT, CANADIAN SYLLABICS SHA	# →ᐧᔕ→
+
+1523 ;	00B7 1516 ;	MA	# ( ᔣ → ·ᔖ ) CANADIAN SYLLABICS SHWAA → MIDDLE DOT, CANADIAN SYLLABICS SHAA	# →ᐧᔖ→
+
+1531 ;	00B7 1528 ;	MA	# ( ᔱ → ·ᔨ ) CANADIAN SYLLABICS YWI → MIDDLE DOT, CANADIAN SYLLABICS YI	# →ᐧᔨ→
+
+1533 ;	00B7 1529 ;	MA	# ( ᔳ → ·ᔩ ) CANADIAN SYLLABICS YWII → MIDDLE DOT, CANADIAN SYLLABICS YII	# →ᐧᔩ→
+
+1535 ;	00B7 152A ;	MA	# ( ᔵ → ·ᔪ ) CANADIAN SYLLABICS YWO → MIDDLE DOT, CANADIAN SYLLABICS YO	# →ᐧᔪ→
+
+1537 ;	00B7 152B ;	MA	# ( ᔷ → ·ᔫ ) CANADIAN SYLLABICS YWOO → MIDDLE DOT, CANADIAN SYLLABICS YOO	# →ᐧᔫ→
+
+1539 ;	00B7 152D ;	MA	# ( ᔹ → ·ᔭ ) CANADIAN SYLLABICS YWA → MIDDLE DOT, CANADIAN SYLLABICS YA	# →ᐧᔭ→
+
+153B ;	00B7 152E ;	MA	# ( ᔻ → ·ᔮ ) CANADIAN SYLLABICS YWAA → MIDDLE DOT, CANADIAN SYLLABICS YAA	# →ᐧᔮ→
+
+154E ;	00B7 154C ;	MA	# ( ᕎ → ·ᕌ ) CANADIAN SYLLABICS RWAA → MIDDLE DOT, CANADIAN SYLLABICS RAA	# →ᐧᕌ→
+
+155B ;	00B7 155A ;	MA	# ( ᕛ → ·ᕚ ) CANADIAN SYLLABICS FWAA → MIDDLE DOT, CANADIAN SYLLABICS FAA	# →ᐧᕚ→
+
+1568 ;	00B7 1567 ;	MA	# ( ᕨ → ·ᕧ ) CANADIAN SYLLABICS THWAA → MIDDLE DOT, CANADIAN SYLLABICS THAA	# →ᐧᕧ→
+
+18B3 ;	00B7 18B1 ;	MA	# ( ᢳ → ·ᢱ ) CANADIAN SYLLABICS WAY → MIDDLE DOT, CANADIAN SYLLABICS AY	# →ᐧᢱ→
+
+18B6 ;	00B7 18B4 ;	MA	# ( ᢶ → ·ᢴ ) CANADIAN SYLLABICS PWOY → MIDDLE DOT, CANADIAN SYLLABICS POY	# →ᐧᢴ→
+
+18B9 ;	00B7 18B8 ;	MA	# ( ᢹ → ·ᢸ ) CANADIAN SYLLABICS KWAY → MIDDLE DOT, CANADIAN SYLLABICS KAY	# →ᐧᢸ→
+
+18C2 ;	00B7 18C0 ;	MA	# ( ᣂ → ·ᣀ ) CANADIAN SYLLABICS SHWOY → MIDDLE DOT, CANADIAN SYLLABICS SHOY	# →ᐧᣀ→
+
+A830 ;	0964 ;	MA	#* ( ꠰ → । ) NORTH INDIC FRACTION ONE QUARTER → DEVANAGARI DANDA	# 
+
+0965 ;	0964 0964 ;	MA	#* ( ॥ → ।। ) DEVANAGARI DOUBLE DANDA → DEVANAGARI DANDA, DEVANAGARI DANDA	# 
+
+1C3C ;	1C3B 1C3B ;	MA	#* ( ᰼ → ᰻᰻ ) LEPCHA PUNCTUATION NYET THYOOM TA-ROL → LEPCHA PUNCTUATION TA-ROL, LEPCHA PUNCTUATION TA-ROL	# 
+
+104B ;	104A 104A ;	MA	#* ( ။ → ၊၊ ) MYANMAR SIGN SECTION → MYANMAR SIGN LITTLE SECTION, MYANMAR SIGN LITTLE SECTION	# 
+
+1AA9 ;	1AA8 1AA8 ;	MA	#* ( ᪩ → ᪨᪨ ) TAI THAM SIGN KAANKUU → TAI THAM SIGN KAAN, TAI THAM SIGN KAAN	# 
+
+1AAB ;	1AAA 1AA8 ;	MA	#* ( ᪫ → ᪪᪨ ) TAI THAM SIGN SATKAANKUU → TAI THAM SIGN SATKAAN, TAI THAM SIGN KAAN	# 
+
+1B5F ;	1B5E 1B5E ;	MA	#* ( ᭟ → ᭞᭞ ) BALINESE CARIK PAREREN → BALINESE CARIK SIKI, BALINESE CARIK SIKI	# 
+
+10A57 ;	10A56 10A56 ;	MA	#* ( ‎𐩗‎ → ‎𐩖𐩖‎ ) KHAROSHTHI PUNCTUATION DOUBLE DANDA → KHAROSHTHI PUNCTUATION DANDA, KHAROSHTHI PUNCTUATION DANDA	# 
+
+1C7F ;	1C7E 1C7E ;	MA	#* ( ᱿ → ᱾᱾ ) OL CHIKI PUNCTUATION DOUBLE MUCAAD → OL CHIKI PUNCTUATION MUCAAD, OL CHIKI PUNCTUATION MUCAAD	# 
+
+055D ;	0027 ;	MA	#* ( ՝ → ' ) ARMENIAN COMMA → APOSTROPHE	# →ˋ→→`→→‘→
+FF07 ;	0027 ;	MA	#* ( ' → ' ) FULLWIDTH APOSTROPHE → APOSTROPHE	# →’→
+2018 ;	0027 ;	MA	#* ( ‘ → ' ) LEFT SINGLE QUOTATION MARK → APOSTROPHE	# 
+2019 ;	0027 ;	MA	#* ( ’ → ' ) RIGHT SINGLE QUOTATION MARK → APOSTROPHE	# 
+201B ;	0027 ;	MA	#* ( ‛ → ' ) SINGLE HIGH-REVERSED-9 QUOTATION MARK → APOSTROPHE	# →′→
+2032 ;	0027 ;	MA	#* ( ′ → ' ) PRIME → APOSTROPHE	# 
+2035 ;	0027 ;	MA	#* ( ‵ → ' ) REVERSED PRIME → APOSTROPHE	# →ʽ→→‘→
+055A ;	0027 ;	MA	#* ( ՚ → ' ) ARMENIAN APOSTROPHE → APOSTROPHE	# →’→
+05F3 ;	0027 ;	MA	#* ( ‎׳‎ → ' ) HEBREW PUNCTUATION GERESH → APOSTROPHE	# 
+0060 ;	0027 ;	MA	#* ( ` → ' ) GRAVE ACCENT → APOSTROPHE	# →ˋ→→`→→‘→
+1FEF ;	0027 ;	MA	#* ( ` → ' ) GREEK VARIA → APOSTROPHE	# →ˋ→→`→→‘→
+FF40 ;	0027 ;	MA	#* ( ` → ' ) FULLWIDTH GRAVE ACCENT → APOSTROPHE	# →‘→
+00B4 ;	0027 ;	MA	#* ( ´ → ' ) ACUTE ACCENT → APOSTROPHE	# →΄→→ʹ→
+0384 ;	0027 ;	MA	#* ( ΄ → ' ) GREEK TONOS → APOSTROPHE	# →ʹ→
+1FFD ;	0027 ;	MA	#* ( ´ → ' ) GREEK OXIA → APOSTROPHE	# →´→→΄→→ʹ→
+1FBD ;	0027 ;	MA	#* ( ᾽ → ' ) GREEK KORONIS → APOSTROPHE	# →’→
+1FBF ;	0027 ;	MA	#* ( ᾿ → ' ) GREEK PSILI → APOSTROPHE	# →’→
+1FFE ;	0027 ;	MA	#* ( ῾ → ' ) GREEK DASIA → APOSTROPHE	# →‛→→′→
+02B9 ;	0027 ;	MA	# ( ʹ → ' ) MODIFIER LETTER PRIME → APOSTROPHE	# 
+0374 ;	0027 ;	MA	# ( ʹ → ' ) GREEK NUMERAL SIGN → APOSTROPHE	# →′→
+02C8 ;	0027 ;	MA	# ( ˈ → ' ) MODIFIER LETTER VERTICAL LINE → APOSTROPHE	# 
+02CA ;	0027 ;	MA	# ( ˊ → ' ) MODIFIER LETTER ACUTE ACCENT → APOSTROPHE	# →ʹ→→′→
+02CB ;	0027 ;	MA	# ( ˋ → ' ) MODIFIER LETTER GRAVE ACCENT → APOSTROPHE	# →`→→‘→
+02F4 ;	0027 ;	MA	#* ( ˴ → ' ) MODIFIER LETTER MIDDLE GRAVE ACCENT → APOSTROPHE	# →ˋ→→`→→‘→
+02BB ;	0027 ;	MA	# ( ʻ → ' ) MODIFIER LETTER TURNED COMMA → APOSTROPHE	# →‘→
+02BD ;	0027 ;	MA	# ( ʽ → ' ) MODIFIER LETTER REVERSED COMMA → APOSTROPHE	# →‘→
+02BC ;	0027 ;	MA	# ( ʼ → ' ) MODIFIER LETTER APOSTROPHE → APOSTROPHE	# →′→
+02BE ;	0027 ;	MA	# ( ʾ → ' ) MODIFIER LETTER RIGHT HALF RING → APOSTROPHE	# →ʼ→→′→
+A78C ;	0027 ;	MA	# ( ꞌ → ' ) LATIN SMALL LETTER SALTILLO → APOSTROPHE	# 
+05D9 ;	0027 ;	MA	# ( ‎י‎ → ' ) HEBREW LETTER YOD → APOSTROPHE	# 
+07F4 ;	0027 ;	MA	# ( ‎ߴ‎ → ' ) NKO HIGH TONE APOSTROPHE → APOSTROPHE	# →’→
+07F5 ;	0027 ;	MA	# ( ‎ߵ‎ → ' ) NKO LOW TONE APOSTROPHE → APOSTROPHE	# →‘→
+144A ;	0027 ;	MA	# ( ᑊ → ' ) CANADIAN SYLLABICS WEST-CREE P → APOSTROPHE	# →ˈ→
+16CC ;	0027 ;	MA	# ( ᛌ → ' ) RUNIC LETTER SHORT-TWIG-SOL S → APOSTROPHE	# 
+
+1CD3 ;	0027 0027 ;	MA	#* ( ᳓ → '' ) VEDIC SIGN NIHSHVASA → APOSTROPHE, APOSTROPHE	# →″→→"→
+0022 ;	0027 0027 ;	MA	#* ( " → '' ) QUOTATION MARK → APOSTROPHE, APOSTROPHE	# 
+FF02 ;	0027 0027 ;	MA	#* ( " → '' ) FULLWIDTH QUOTATION MARK → APOSTROPHE, APOSTROPHE	# →”→→"→
+201C ;	0027 0027 ;	MA	#* ( “ → '' ) LEFT DOUBLE QUOTATION MARK → APOSTROPHE, APOSTROPHE	# →"→
+201D ;	0027 0027 ;	MA	#* ( ” → '' ) RIGHT DOUBLE QUOTATION MARK → APOSTROPHE, APOSTROPHE	# →"→
+201F ;	0027 0027 ;	MA	#* ( ‟ → '' ) DOUBLE HIGH-REVERSED-9 QUOTATION MARK → APOSTROPHE, APOSTROPHE	# →“→→"→
+2033 ;	0027 0027 ;	MA	#* ( ″ → '' ) DOUBLE PRIME → APOSTROPHE, APOSTROPHE	# →"→
+2036 ;	0027 0027 ;	MA	#* ( ‶ → '' ) REVERSED DOUBLE PRIME → APOSTROPHE, APOSTROPHE	# →‵‵→
+3003 ;	0027 0027 ;	MA	#* ( 〃 → '' ) DITTO MARK → APOSTROPHE, APOSTROPHE	# →″→→"→
+05F4 ;	0027 0027 ;	MA	#* ( ‎״‎ → '' ) HEBREW PUNCTUATION GERSHAYIM → APOSTROPHE, APOSTROPHE	# →"→
+02DD ;	0027 0027 ;	MA	#* ( ˝ → '' ) DOUBLE ACUTE ACCENT → APOSTROPHE, APOSTROPHE	# →"→
+02BA ;	0027 0027 ;	MA	# ( ʺ → '' ) MODIFIER LETTER DOUBLE PRIME → APOSTROPHE, APOSTROPHE	# →"→
+02F6 ;	0027 0027 ;	MA	#* ( ˶ → '' ) MODIFIER LETTER MIDDLE DOUBLE ACUTE ACCENT → APOSTROPHE, APOSTROPHE	# →˝→→"→
+02EE ;	0027 0027 ;	MA	# ( ˮ → '' ) MODIFIER LETTER DOUBLE APOSTROPHE → APOSTROPHE, APOSTROPHE	# →″→→"→
+05F2 ;	0027 0027 ;	MA	# ( ‎ײ‎ → '' ) HEBREW LIGATURE YIDDISH DOUBLE YOD → APOSTROPHE, APOSTROPHE	# →‎יי‎→
+
+2034 ;	0027 0027 0027 ;	MA	#* ( ‴ → ''' ) TRIPLE PRIME → APOSTROPHE, APOSTROPHE, APOSTROPHE	# →′′′→
+2037 ;	0027 0027 0027 ;	MA	#* ( ‷ → ''' ) REVERSED TRIPLE PRIME → APOSTROPHE, APOSTROPHE, APOSTROPHE	# →‵‵‵→
+
+2057 ;	0027 0027 0027 0027 ;	MA	#* ( ⁗ → '''' ) QUADRUPLE PRIME → APOSTROPHE, APOSTROPHE, APOSTROPHE, APOSTROPHE	# →′′′′→
+
+0181 ;	0027 0042 ;	MA	# ( Ɓ → 'B ) LATIN CAPITAL LETTER B WITH HOOK → APOSTROPHE, LATIN CAPITAL LETTER B	# →ʽB→
+
+018A ;	0027 0044 ;	MA	# ( Ɗ → 'D ) LATIN CAPITAL LETTER D WITH HOOK → APOSTROPHE, LATIN CAPITAL LETTER D	# →ʽD→
+
+0149 ;	0027 006E ;	MA	# ( ʼn → 'n ) LATIN SMALL LETTER N PRECEDED BY APOSTROPHE → APOSTROPHE, LATIN SMALL LETTER N	# →ʼn→
+
+01A4 ;	0027 0050 ;	MA	# ( Ƥ → 'P ) LATIN CAPITAL LETTER P WITH HOOK → APOSTROPHE, LATIN CAPITAL LETTER P	# →ʽP→
+
+01AC ;	0027 0054 ;	MA	# ( Ƭ → 'T ) LATIN CAPITAL LETTER T WITH HOOK → APOSTROPHE, LATIN CAPITAL LETTER T	# →ʽT→
+
+01B3 ;	0027 0059 ;	MA	# ( Ƴ → 'Y ) LATIN CAPITAL LETTER Y WITH HOOK → APOSTROPHE, LATIN CAPITAL LETTER Y	# →ʽY→
+
+FF3B ;	0028 ;	MA	#* ( [ → ( ) FULLWIDTH LEFT SQUARE BRACKET → LEFT PARENTHESIS	# →〔→
+2768 ;	0028 ;	MA	#* ( ❨ → ( ) MEDIUM LEFT PARENTHESIS ORNAMENT → LEFT PARENTHESIS	# 
+2772 ;	0028 ;	MA	#* ( ❲ → ( ) LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT → LEFT PARENTHESIS	# →〔→
+3014 ;	0028 ;	MA	#* ( 〔 → ( ) LEFT TORTOISE SHELL BRACKET → LEFT PARENTHESIS	# 
+FD3E ;	0028 ;	MA	#* ( ﴾ → ( ) ORNATE LEFT PARENTHESIS → LEFT PARENTHESIS	# 
+
+2E28 ;	0028 0028 ;	MA	#* ( ⸨ → (( ) LEFT DOUBLE PARENTHESIS → LEFT PARENTHESIS, LEFT PARENTHESIS	# 
+
+3220 ;	0028 30FC 0029 ;	MA	#* ( ㈠ → (ー) ) PARENTHESIZED IDEOGRAPH ONE → LEFT PARENTHESIS, KATAKANA-HIRAGANA PROLONGED SOUND MARK, RIGHT PARENTHESIS	# →(一)→→(⼀)→
+
+2475 ;	0028 0032 0029 ;	MA	#* ( ⑵ → (2) ) PARENTHESIZED DIGIT TWO → LEFT PARENTHESIS, DIGIT TWO, RIGHT PARENTHESIS	# 
+
+2487 ;	0028 0032 004F 0029 ;	MA	#* ( ⒇ → (2O) ) PARENTHESIZED NUMBER TWENTY → LEFT PARENTHESIS, DIGIT TWO, LATIN CAPITAL LETTER O, RIGHT PARENTHESIS	# →(20)→
+
+2476 ;	0028 0033 0029 ;	MA	#* ( ⑶ → (3) ) PARENTHESIZED DIGIT THREE → LEFT PARENTHESIS, DIGIT THREE, RIGHT PARENTHESIS	# 
+
+2477 ;	0028 0034 0029 ;	MA	#* ( ⑷ → (4) ) PARENTHESIZED DIGIT FOUR → LEFT PARENTHESIS, DIGIT FOUR, RIGHT PARENTHESIS	# 
+
+2478 ;	0028 0035 0029 ;	MA	#* ( ⑸ → (5) ) PARENTHESIZED DIGIT FIVE → LEFT PARENTHESIS, DIGIT FIVE, RIGHT PARENTHESIS	# 
+
+2479 ;	0028 0036 0029 ;	MA	#* ( ⑹ → (6) ) PARENTHESIZED DIGIT SIX → LEFT PARENTHESIS, DIGIT SIX, RIGHT PARENTHESIS	# 
+
+247A ;	0028 0037 0029 ;	MA	#* ( ⑺ → (7) ) PARENTHESIZED DIGIT SEVEN → LEFT PARENTHESIS, DIGIT SEVEN, RIGHT PARENTHESIS	# 
+
+247B ;	0028 0038 0029 ;	MA	#* ( ⑻ → (8) ) PARENTHESIZED DIGIT EIGHT → LEFT PARENTHESIS, DIGIT EIGHT, RIGHT PARENTHESIS	# 
+
+247C ;	0028 0039 0029 ;	MA	#* ( ⑼ → (9) ) PARENTHESIZED DIGIT NINE → LEFT PARENTHESIS, DIGIT NINE, RIGHT PARENTHESIS	# 
+
+249C ;	0028 0061 0029 ;	MA	#* ( ⒜ → (a) ) PARENTHESIZED LATIN SMALL LETTER A → LEFT PARENTHESIS, LATIN SMALL LETTER A, RIGHT PARENTHESIS	# 
+
+1F110 ;	0028 0041 0029 ;	MA	#* ( 🄐 → (A) ) PARENTHESIZED LATIN CAPITAL LETTER A → LEFT PARENTHESIS, LATIN CAPITAL LETTER A, RIGHT PARENTHESIS	# 
+
+249D ;	0028 0062 0029 ;	MA	#* ( ⒝ → (b) ) PARENTHESIZED LATIN SMALL LETTER B → LEFT PARENTHESIS, LATIN SMALL LETTER B, RIGHT PARENTHESIS	# 
+
+1F111 ;	0028 0042 0029 ;	MA	#* ( 🄑 → (B) ) PARENTHESIZED LATIN CAPITAL LETTER B → LEFT PARENTHESIS, LATIN CAPITAL LETTER B, RIGHT PARENTHESIS	# 
+
+249E ;	0028 0063 0029 ;	MA	#* ( ⒞ → (c) ) PARENTHESIZED LATIN SMALL LETTER C → LEFT PARENTHESIS, LATIN SMALL LETTER C, RIGHT PARENTHESIS	# 
+
+1F112 ;	0028 0043 0029 ;	MA	#* ( 🄒 → (C) ) PARENTHESIZED LATIN CAPITAL LETTER C → LEFT PARENTHESIS, LATIN CAPITAL LETTER C, RIGHT PARENTHESIS	# 
+
+249F ;	0028 0064 0029 ;	MA	#* ( ⒟ → (d) ) PARENTHESIZED LATIN SMALL LETTER D → LEFT PARENTHESIS, LATIN SMALL LETTER D, RIGHT PARENTHESIS	# 
+
+1F113 ;	0028 0044 0029 ;	MA	#* ( 🄓 → (D) ) PARENTHESIZED LATIN CAPITAL LETTER D → LEFT PARENTHESIS, LATIN CAPITAL LETTER D, RIGHT PARENTHESIS	# 
+
+24A0 ;	0028 0065 0029 ;	MA	#* ( ⒠ → (e) ) PARENTHESIZED LATIN SMALL LETTER E → LEFT PARENTHESIS, LATIN SMALL LETTER E, RIGHT PARENTHESIS	# 
+
+1F114 ;	0028 0045 0029 ;	MA	#* ( 🄔 → (E) ) PARENTHESIZED LATIN CAPITAL LETTER E → LEFT PARENTHESIS, LATIN CAPITAL LETTER E, RIGHT PARENTHESIS	# 
+
+24A1 ;	0028 0066 0029 ;	MA	#* ( ⒡ → (f) ) PARENTHESIZED LATIN SMALL LETTER F → LEFT PARENTHESIS, LATIN SMALL LETTER F, RIGHT PARENTHESIS	# 
+
+1F115 ;	0028 0046 0029 ;	MA	#* ( 🄕 → (F) ) PARENTHESIZED LATIN CAPITAL LETTER F → LEFT PARENTHESIS, LATIN CAPITAL LETTER F, RIGHT PARENTHESIS	# 
+
+24A2 ;	0028 0067 0029 ;	MA	#* ( ⒢ → (g) ) PARENTHESIZED LATIN SMALL LETTER G → LEFT PARENTHESIS, LATIN SMALL LETTER G, RIGHT PARENTHESIS	# 
+
+1F116 ;	0028 0047 0029 ;	MA	#* ( 🄖 → (G) ) PARENTHESIZED LATIN CAPITAL LETTER G → LEFT PARENTHESIS, LATIN CAPITAL LETTER G, RIGHT PARENTHESIS	# 
+
+24A3 ;	0028 0068 0029 ;	MA	#* ( ⒣ → (h) ) PARENTHESIZED LATIN SMALL LETTER H → LEFT PARENTHESIS, LATIN SMALL LETTER H, RIGHT PARENTHESIS	# 
+
+1F117 ;	0028 0048 0029 ;	MA	#* ( 🄗 → (H) ) PARENTHESIZED LATIN CAPITAL LETTER H → LEFT PARENTHESIS, LATIN CAPITAL LETTER H, RIGHT PARENTHESIS	# 
+
+24A4 ;	0028 0069 0029 ;	MA	#* ( ⒤ → (i) ) PARENTHESIZED LATIN SMALL LETTER I → LEFT PARENTHESIS, LATIN SMALL LETTER I, RIGHT PARENTHESIS	# 
+
+24A5 ;	0028 006A 0029 ;	MA	#* ( ⒥ → (j) ) PARENTHESIZED LATIN SMALL LETTER J → LEFT PARENTHESIS, LATIN SMALL LETTER J, RIGHT PARENTHESIS	# 
+
+1F119 ;	0028 004A 0029 ;	MA	#* ( 🄙 → (J) ) PARENTHESIZED LATIN CAPITAL LETTER J → LEFT PARENTHESIS, LATIN CAPITAL LETTER J, RIGHT PARENTHESIS	# 
+
+24A6 ;	0028 006B 0029 ;	MA	#* ( ⒦ → (k) ) PARENTHESIZED LATIN SMALL LETTER K → LEFT PARENTHESIS, LATIN SMALL LETTER K, RIGHT PARENTHESIS	# 
+
+1F11A ;	0028 004B 0029 ;	MA	#* ( 🄚 → (K) ) PARENTHESIZED LATIN CAPITAL LETTER K → LEFT PARENTHESIS, LATIN CAPITAL LETTER K, RIGHT PARENTHESIS	# 
+
+2474 ;	0028 006C 0029 ;	MA	#* ( ⑴ → (l) ) PARENTHESIZED DIGIT ONE → LEFT PARENTHESIS, LATIN SMALL LETTER L, RIGHT PARENTHESIS	# →(1)→
+1F118 ;	0028 006C 0029 ;	MA	#* ( 🄘 → (l) ) PARENTHESIZED LATIN CAPITAL LETTER I → LEFT PARENTHESIS, LATIN SMALL LETTER L, RIGHT PARENTHESIS	# →(I)→
+24A7 ;	0028 006C 0029 ;	MA	#* ( ⒧ → (l) ) PARENTHESIZED LATIN SMALL LETTER L → LEFT PARENTHESIS, LATIN SMALL LETTER L, RIGHT PARENTHESIS	# 
+
+1F11B ;	0028 004C 0029 ;	MA	#* ( 🄛 → (L) ) PARENTHESIZED LATIN CAPITAL LETTER L → LEFT PARENTHESIS, LATIN CAPITAL LETTER L, RIGHT PARENTHESIS	# 
+
+247F ;	0028 006C 0032 0029 ;	MA	#* ( ⑿ → (l2) ) PARENTHESIZED NUMBER TWELVE → LEFT PARENTHESIS, LATIN SMALL LETTER L, DIGIT TWO, RIGHT PARENTHESIS	# →(12)→
+
+2480 ;	0028 006C 0033 0029 ;	MA	#* ( ⒀ → (l3) ) PARENTHESIZED NUMBER THIRTEEN → LEFT PARENTHESIS, LATIN SMALL LETTER L, DIGIT THREE, RIGHT PARENTHESIS	# →(13)→
+
+2481 ;	0028 006C 0034 0029 ;	MA	#* ( ⒁ → (l4) ) PARENTHESIZED NUMBER FOURTEEN → LEFT PARENTHESIS, LATIN SMALL LETTER L, DIGIT FOUR, RIGHT PARENTHESIS	# →(14)→
+
+2482 ;	0028 006C 0035 0029 ;	MA	#* ( ⒂ → (l5) ) PARENTHESIZED NUMBER FIFTEEN → LEFT PARENTHESIS, LATIN SMALL LETTER L, DIGIT FIVE, RIGHT PARENTHESIS	# →(15)→
+
+2483 ;	0028 006C 0036 0029 ;	MA	#* ( ⒃ → (l6) ) PARENTHESIZED NUMBER SIXTEEN → LEFT PARENTHESIS, LATIN SMALL LETTER L, DIGIT SIX, RIGHT PARENTHESIS	# →(16)→
+
+2484 ;	0028 006C 0037 0029 ;	MA	#* ( ⒄ → (l7) ) PARENTHESIZED NUMBER SEVENTEEN → LEFT PARENTHESIS, LATIN SMALL LETTER L, DIGIT SEVEN, RIGHT PARENTHESIS	# →(17)→
+
+2485 ;	0028 006C 0038 0029 ;	MA	#* ( ⒅ → (l8) ) PARENTHESIZED NUMBER EIGHTEEN → LEFT PARENTHESIS, LATIN SMALL LETTER L, DIGIT EIGHT, RIGHT PARENTHESIS	# →(18)→
+
+2486 ;	0028 006C 0039 0029 ;	MA	#* ( ⒆ → (l9) ) PARENTHESIZED NUMBER NINETEEN → LEFT PARENTHESIS, LATIN SMALL LETTER L, DIGIT NINE, RIGHT PARENTHESIS	# →(19)→
+
+247E ;	0028 006C 006C 0029 ;	MA	#* ( ⑾ → (ll) ) PARENTHESIZED NUMBER ELEVEN → LEFT PARENTHESIS, LATIN SMALL LETTER L, LATIN SMALL LETTER L, RIGHT PARENTHESIS	# →(11)→
+
+247D ;	0028 006C 004F 0029 ;	MA	#* ( ⑽ → (lO) ) PARENTHESIZED NUMBER TEN → LEFT PARENTHESIS, LATIN SMALL LETTER L, LATIN CAPITAL LETTER O, RIGHT PARENTHESIS	# →(10)→
+
+1F11C ;	0028 004D 0029 ;	MA	#* ( 🄜 → (M) ) PARENTHESIZED LATIN CAPITAL LETTER M → LEFT PARENTHESIS, LATIN CAPITAL LETTER M, RIGHT PARENTHESIS	# 
+
+24A9 ;	0028 006E 0029 ;	MA	#* ( ⒩ → (n) ) PARENTHESIZED LATIN SMALL LETTER N → LEFT PARENTHESIS, LATIN SMALL LETTER N, RIGHT PARENTHESIS	# 
+
+1F11D ;	0028 004E 0029 ;	MA	#* ( 🄝 → (N) ) PARENTHESIZED LATIN CAPITAL LETTER N → LEFT PARENTHESIS, LATIN CAPITAL LETTER N, RIGHT PARENTHESIS	# 
+
+24AA ;	0028 006F 0029 ;	MA	#* ( ⒪ → (o) ) PARENTHESIZED LATIN SMALL LETTER O → LEFT PARENTHESIS, LATIN SMALL LETTER O, RIGHT PARENTHESIS	# 
+
+1F11E ;	0028 004F 0029 ;	MA	#* ( 🄞 → (O) ) PARENTHESIZED LATIN CAPITAL LETTER O → LEFT PARENTHESIS, LATIN CAPITAL LETTER O, RIGHT PARENTHESIS	# 
+
+24AB ;	0028 0070 0029 ;	MA	#* ( ⒫ → (p) ) PARENTHESIZED LATIN SMALL LETTER P → LEFT PARENTHESIS, LATIN SMALL LETTER P, RIGHT PARENTHESIS	# 
+
+1F11F ;	0028 0050 0029 ;	MA	#* ( 🄟 → (P) ) PARENTHESIZED LATIN CAPITAL LETTER P → LEFT PARENTHESIS, LATIN CAPITAL LETTER P, RIGHT PARENTHESIS	# 
+
+24AC ;	0028 0071 0029 ;	MA	#* ( ⒬ → (q) ) PARENTHESIZED LATIN SMALL LETTER Q → LEFT PARENTHESIS, LATIN SMALL LETTER Q, RIGHT PARENTHESIS	# 
+
+1F120 ;	0028 0051 0029 ;	MA	#* ( 🄠 → (Q) ) PARENTHESIZED LATIN CAPITAL LETTER Q → LEFT PARENTHESIS, LATIN CAPITAL LETTER Q, RIGHT PARENTHESIS	# 
+
+24AD ;	0028 0072 0029 ;	MA	#* ( ⒭ → (r) ) PARENTHESIZED LATIN SMALL LETTER R → LEFT PARENTHESIS, LATIN SMALL LETTER R, RIGHT PARENTHESIS	# 
+
+1F121 ;	0028 0052 0029 ;	MA	#* ( 🄡 → (R) ) PARENTHESIZED LATIN CAPITAL LETTER R → LEFT PARENTHESIS, LATIN CAPITAL LETTER R, RIGHT PARENTHESIS	# 
+
+24A8 ;	0028 0072 006E 0029 ;	MA	#* ( ⒨ → (rn) ) PARENTHESIZED LATIN SMALL LETTER M → LEFT PARENTHESIS, LATIN SMALL LETTER R, LATIN SMALL LETTER N, RIGHT PARENTHESIS	# →(m)→
+
+24AE ;	0028 0073 0029 ;	MA	#* ( ⒮ → (s) ) PARENTHESIZED LATIN SMALL LETTER S → LEFT PARENTHESIS, LATIN SMALL LETTER S, RIGHT PARENTHESIS	# 
+
+1F122 ;	0028 0053 0029 ;	MA	#* ( 🄢 → (S) ) PARENTHESIZED LATIN CAPITAL LETTER S → LEFT PARENTHESIS, LATIN CAPITAL LETTER S, RIGHT PARENTHESIS	# 
+1F12A ;	0028 0053 0029 ;	MA	#* ( 🄪 → (S) ) TORTOISE SHELL BRACKETED LATIN CAPITAL LETTER S → LEFT PARENTHESIS, LATIN CAPITAL LETTER S, RIGHT PARENTHESIS	# →〔S〕→
+
+24AF ;	0028 0074 0029 ;	MA	#* ( ⒯ → (t) ) PARENTHESIZED LATIN SMALL LETTER T → LEFT PARENTHESIS, LATIN SMALL LETTER T, RIGHT PARENTHESIS	# 
+
+1F123 ;	0028 0054 0029 ;	MA	#* ( 🄣 → (T) ) PARENTHESIZED LATIN CAPITAL LETTER T → LEFT PARENTHESIS, LATIN CAPITAL LETTER T, RIGHT PARENTHESIS	# 
+
+24B0 ;	0028 0075 0029 ;	MA	#* ( ⒰ → (u) ) PARENTHESIZED LATIN SMALL LETTER U → LEFT PARENTHESIS, LATIN SMALL LETTER U, RIGHT PARENTHESIS	# 
+
+1F124 ;	0028 0055 0029 ;	MA	#* ( 🄤 → (U) ) PARENTHESIZED LATIN CAPITAL LETTER U → LEFT PARENTHESIS, LATIN CAPITAL LETTER U, RIGHT PARENTHESIS	# 
+
+24B1 ;	0028 0076 0029 ;	MA	#* ( ⒱ → (v) ) PARENTHESIZED LATIN SMALL LETTER V → LEFT PARENTHESIS, LATIN SMALL LETTER V, RIGHT PARENTHESIS	# 
+
+1F125 ;	0028 0056 0029 ;	MA	#* ( 🄥 → (V) ) PARENTHESIZED LATIN CAPITAL LETTER V → LEFT PARENTHESIS, LATIN CAPITAL LETTER V, RIGHT PARENTHESIS	# 
+
+24B2 ;	0028 0076 0076 0029 ;	MA	#* ( ⒲ → (vv) ) PARENTHESIZED LATIN SMALL LETTER W → LEFT PARENTHESIS, LATIN SMALL LETTER V, LATIN SMALL LETTER V, RIGHT PARENTHESIS	# →(w)→
+
+1F126 ;	0028 0057 0029 ;	MA	#* ( 🄦 → (W) ) PARENTHESIZED LATIN CAPITAL LETTER W → LEFT PARENTHESIS, LATIN CAPITAL LETTER W, RIGHT PARENTHESIS	# 
+
+24B3 ;	0028 0078 0029 ;	MA	#* ( ⒳ → (x) ) PARENTHESIZED LATIN SMALL LETTER X → LEFT PARENTHESIS, LATIN SMALL LETTER X, RIGHT PARENTHESIS	# 
+
+1F127 ;	0028 0058 0029 ;	MA	#* ( 🄧 → (X) ) PARENTHESIZED LATIN CAPITAL LETTER X → LEFT PARENTHESIS, LATIN CAPITAL LETTER X, RIGHT PARENTHESIS	# 
+
+24B4 ;	0028 0079 0029 ;	MA	#* ( ⒴ → (y) ) PARENTHESIZED LATIN SMALL LETTER Y → LEFT PARENTHESIS, LATIN SMALL LETTER Y, RIGHT PARENTHESIS	# 
+
+1F128 ;	0028 0059 0029 ;	MA	#* ( 🄨 → (Y) ) PARENTHESIZED LATIN CAPITAL LETTER Y → LEFT PARENTHESIS, LATIN CAPITAL LETTER Y, RIGHT PARENTHESIS	# 
+
+24B5 ;	0028 007A 0029 ;	MA	#* ( ⒵ → (z) ) PARENTHESIZED LATIN SMALL LETTER Z → LEFT PARENTHESIS, LATIN SMALL LETTER Z, RIGHT PARENTHESIS	# 
+
+1F129 ;	0028 005A 0029 ;	MA	#* ( 🄩 → (Z) ) PARENTHESIZED LATIN CAPITAL LETTER Z → LEFT PARENTHESIS, LATIN CAPITAL LETTER Z, RIGHT PARENTHESIS	# 
+
+3200 ;	0028 1100 0029 ;	MA	#* ( ㈀ → (ᄀ) ) PARENTHESIZED HANGUL KIYEOK → LEFT PARENTHESIS, HANGUL CHOSEONG KIYEOK, RIGHT PARENTHESIS	# 
+
+320E ;	0028 AC00 0029 ;	MA	#* ( ㈎ → (가) ) PARENTHESIZED HANGUL KIYEOK A → LEFT PARENTHESIS, HANGUL SYLLABLE GA, RIGHT PARENTHESIS	# 
+
+3201 ;	0028 1102 0029 ;	MA	#* ( ㈁ → (ᄂ) ) PARENTHESIZED HANGUL NIEUN → LEFT PARENTHESIS, HANGUL CHOSEONG NIEUN, RIGHT PARENTHESIS	# 
+
+320F ;	0028 B098 0029 ;	MA	#* ( ㈏ → (나) ) PARENTHESIZED HANGUL NIEUN A → LEFT PARENTHESIS, HANGUL SYLLABLE NA, RIGHT PARENTHESIS	# 
+
+3202 ;	0028 1103 0029 ;	MA	#* ( ㈂ → (ᄃ) ) PARENTHESIZED HANGUL TIKEUT → LEFT PARENTHESIS, HANGUL CHOSEONG TIKEUT, RIGHT PARENTHESIS	# 
+
+3210 ;	0028 B2E4 0029 ;	MA	#* ( ㈐ → (다) ) PARENTHESIZED HANGUL TIKEUT A → LEFT PARENTHESIS, HANGUL SYLLABLE DA, RIGHT PARENTHESIS	# 
+
+3203 ;	0028 1105 0029 ;	MA	#* ( ㈃ → (ᄅ) ) PARENTHESIZED HANGUL RIEUL → LEFT PARENTHESIS, HANGUL CHOSEONG RIEUL, RIGHT PARENTHESIS	# 
+
+3211 ;	0028 B77C 0029 ;	MA	#* ( ㈑ → (라) ) PARENTHESIZED HANGUL RIEUL A → LEFT PARENTHESIS, HANGUL SYLLABLE RA, RIGHT PARENTHESIS	# 
+
+3204 ;	0028 1106 0029 ;	MA	#* ( ㈄ → (ᄆ) ) PARENTHESIZED HANGUL MIEUM → LEFT PARENTHESIS, HANGUL CHOSEONG MIEUM, RIGHT PARENTHESIS	# 
+
+3212 ;	0028 B9C8 0029 ;	MA	#* ( ㈒ → (마) ) PARENTHESIZED HANGUL MIEUM A → LEFT PARENTHESIS, HANGUL SYLLABLE MA, RIGHT PARENTHESIS	# 
+
+3205 ;	0028 1107 0029 ;	MA	#* ( ㈅ → (ᄇ) ) PARENTHESIZED HANGUL PIEUP → LEFT PARENTHESIS, HANGUL CHOSEONG PIEUP, RIGHT PARENTHESIS	# 
+
+3213 ;	0028 BC14 0029 ;	MA	#* ( ㈓ → (바) ) PARENTHESIZED HANGUL PIEUP A → LEFT PARENTHESIS, HANGUL SYLLABLE BA, RIGHT PARENTHESIS	# 
+
+3206 ;	0028 1109 0029 ;	MA	#* ( ㈆ → (ᄉ) ) PARENTHESIZED HANGUL SIOS → LEFT PARENTHESIS, HANGUL CHOSEONG SIOS, RIGHT PARENTHESIS	# 
+
+3214 ;	0028 C0AC 0029 ;	MA	#* ( ㈔ → (사) ) PARENTHESIZED HANGUL SIOS A → LEFT PARENTHESIS, HANGUL SYLLABLE SA, RIGHT PARENTHESIS	# 
+
+3207 ;	0028 110B 0029 ;	MA	#* ( ㈇ → (ᄋ) ) PARENTHESIZED HANGUL IEUNG → LEFT PARENTHESIS, HANGUL CHOSEONG IEUNG, RIGHT PARENTHESIS	# 
+
+3215 ;	0028 C544 0029 ;	MA	#* ( ㈕ → (아) ) PARENTHESIZED HANGUL IEUNG A → LEFT PARENTHESIS, HANGUL SYLLABLE A, RIGHT PARENTHESIS	# 
+
+321D ;	0028 C624 C804 0029 ;	MA	#* ( ㈝ → (오전) ) PARENTHESIZED KOREAN CHARACTER OJEON → LEFT PARENTHESIS, HANGUL SYLLABLE O, HANGUL SYLLABLE JEON, RIGHT PARENTHESIS	# 
+
+321E ;	0028 C624 D6C4 0029 ;	MA	#* ( ㈞ → (오후) ) PARENTHESIZED KOREAN CHARACTER O HU → LEFT PARENTHESIS, HANGUL SYLLABLE O, HANGUL SYLLABLE HU, RIGHT PARENTHESIS	# 
+
+3208 ;	0028 110C 0029 ;	MA	#* ( ㈈ → (ᄌ) ) PARENTHESIZED HANGUL CIEUC → LEFT PARENTHESIS, HANGUL CHOSEONG CIEUC, RIGHT PARENTHESIS	# 
+
+3216 ;	0028 C790 0029 ;	MA	#* ( ㈖ → (자) ) PARENTHESIZED HANGUL CIEUC A → LEFT PARENTHESIS, HANGUL SYLLABLE JA, RIGHT PARENTHESIS	# 
+
+321C ;	0028 C8FC 0029 ;	MA	#* ( ㈜ → (주) ) PARENTHESIZED HANGUL CIEUC U → LEFT PARENTHESIS, HANGUL SYLLABLE JU, RIGHT PARENTHESIS	# 
+
+3209 ;	0028 110E 0029 ;	MA	#* ( ㈉ → (ᄎ) ) PARENTHESIZED HANGUL CHIEUCH → LEFT PARENTHESIS, HANGUL CHOSEONG CHIEUCH, RIGHT PARENTHESIS	# 
+
+3217 ;	0028 CC28 0029 ;	MA	#* ( ㈗ → (차) ) PARENTHESIZED HANGUL CHIEUCH A → LEFT PARENTHESIS, HANGUL SYLLABLE CA, RIGHT PARENTHESIS	# 
+
+320A ;	0028 110F 0029 ;	MA	#* ( ㈊ → (ᄏ) ) PARENTHESIZED HANGUL KHIEUKH → LEFT PARENTHESIS, HANGUL CHOSEONG KHIEUKH, RIGHT PARENTHESIS	# 
+
+3218 ;	0028 CE74 0029 ;	MA	#* ( ㈘ → (카) ) PARENTHESIZED HANGUL KHIEUKH A → LEFT PARENTHESIS, HANGUL SYLLABLE KA, RIGHT PARENTHESIS	# 
+
+320B ;	0028 1110 0029 ;	MA	#* ( ㈋ → (ᄐ) ) PARENTHESIZED HANGUL THIEUTH → LEFT PARENTHESIS, HANGUL CHOSEONG THIEUTH, RIGHT PARENTHESIS	# 
+
+3219 ;	0028 D0C0 0029 ;	MA	#* ( ㈙ → (타) ) PARENTHESIZED HANGUL THIEUTH A → LEFT PARENTHESIS, HANGUL SYLLABLE TA, RIGHT PARENTHESIS	# 
+
+320C ;	0028 1111 0029 ;	MA	#* ( ㈌ → (ᄑ) ) PARENTHESIZED HANGUL PHIEUPH → LEFT PARENTHESIS, HANGUL CHOSEONG PHIEUPH, RIGHT PARENTHESIS	# 
+
+321A ;	0028 D30C 0029 ;	MA	#* ( ㈚ → (파) ) PARENTHESIZED HANGUL PHIEUPH A → LEFT PARENTHESIS, HANGUL SYLLABLE PA, RIGHT PARENTHESIS	# 
+
+320D ;	0028 1112 0029 ;	MA	#* ( ㈍ → (ᄒ) ) PARENTHESIZED HANGUL HIEUH → LEFT PARENTHESIS, HANGUL CHOSEONG HIEUH, RIGHT PARENTHESIS	# 
+
+321B ;	0028 D558 0029 ;	MA	#* ( ㈛ → (하) ) PARENTHESIZED HANGUL HIEUH A → LEFT PARENTHESIS, HANGUL SYLLABLE HA, RIGHT PARENTHESIS	# 
+
+3226 ;	0028 4E03 0029 ;	MA	#* ( ㈦ → (七) ) PARENTHESIZED IDEOGRAPH SEVEN → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-4E03, RIGHT PARENTHESIS	# 
+
+3222 ;	0028 4E09 0029 ;	MA	#* ( ㈢ → (三) ) PARENTHESIZED IDEOGRAPH THREE → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-4E09, RIGHT PARENTHESIS	# 
+1F241 ;	0028 4E09 0029 ;	MA	#* ( 🉁 → (三) ) TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-4E09 → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-4E09, RIGHT PARENTHESIS	# →〔三〕→
+
+3228 ;	0028 4E5D 0029 ;	MA	#* ( ㈨ → (九) ) PARENTHESIZED IDEOGRAPH NINE → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-4E5D, RIGHT PARENTHESIS	# 
+
+3221 ;	0028 4E8C 0029 ;	MA	#* ( ㈡ → (二) ) PARENTHESIZED IDEOGRAPH TWO → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-4E8C, RIGHT PARENTHESIS	# 
+1F242 ;	0028 4E8C 0029 ;	MA	#* ( 🉂 → (二) ) TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-4E8C → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-4E8C, RIGHT PARENTHESIS	# →〔二〕→
+
+3224 ;	0028 4E94 0029 ;	MA	#* ( ㈤ → (五) ) PARENTHESIZED IDEOGRAPH FIVE → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-4E94, RIGHT PARENTHESIS	# 
+
+3239 ;	0028 4EE3 0029 ;	MA	#* ( ㈹ → (代) ) PARENTHESIZED IDEOGRAPH REPRESENT → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-4EE3, RIGHT PARENTHESIS	# 
+
+323D ;	0028 4F01 0029 ;	MA	#* ( ㈽ → (企) ) PARENTHESIZED IDEOGRAPH ENTERPRISE → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-4F01, RIGHT PARENTHESIS	# 
+
+3241 ;	0028 4F11 0029 ;	MA	#* ( ㉁ → (休) ) PARENTHESIZED IDEOGRAPH REST → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-4F11, RIGHT PARENTHESIS	# 
+
+3227 ;	0028 516B 0029 ;	MA	#* ( ㈧ → (八) ) PARENTHESIZED IDEOGRAPH EIGHT → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-516B, RIGHT PARENTHESIS	# 
+
+3225 ;	0028 516D 0029 ;	MA	#* ( ㈥ → (六) ) PARENTHESIZED IDEOGRAPH SIX → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-516D, RIGHT PARENTHESIS	# 
+
+3238 ;	0028 52B4 0029 ;	MA	#* ( ㈸ → (労) ) PARENTHESIZED IDEOGRAPH LABOR → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-52B4, RIGHT PARENTHESIS	# 
+
+1F247 ;	0028 52DD 0029 ;	MA	#* ( 🉇 → (勝) ) TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-52DD → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-52DD, RIGHT PARENTHESIS	# →〔勝〕→
+
+3229 ;	0028 5341 0029 ;	MA	#* ( ㈩ → (十) ) PARENTHESIZED IDEOGRAPH TEN → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-5341, RIGHT PARENTHESIS	# 
+
+323F ;	0028 5354 0029 ;	MA	#* ( ㈿ → (協) ) PARENTHESIZED IDEOGRAPH ALLIANCE → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-5354, RIGHT PARENTHESIS	# 
+
+3234 ;	0028 540D 0029 ;	MA	#* ( ㈴ → (名) ) PARENTHESIZED IDEOGRAPH NAME → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-540D, RIGHT PARENTHESIS	# 
+
+323A ;	0028 547C 0029 ;	MA	#* ( ㈺ → (呼) ) PARENTHESIZED IDEOGRAPH CALL → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-547C, RIGHT PARENTHESIS	# 
+
+3223 ;	0028 56DB 0029 ;	MA	#* ( ㈣ → (四) ) PARENTHESIZED IDEOGRAPH FOUR → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-56DB, RIGHT PARENTHESIS	# 
+
+322F ;	0028 571F 0029 ;	MA	#* ( ㈯ → (土) ) PARENTHESIZED IDEOGRAPH EARTH → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-571F, RIGHT PARENTHESIS	# 
+
+323B ;	0028 5B66 0029 ;	MA	#* ( ㈻ → (学) ) PARENTHESIZED IDEOGRAPH STUDY → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-5B66, RIGHT PARENTHESIS	# 
+
+1F243 ;	0028 5B89 0029 ;	MA	#* ( 🉃 → (安) ) TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-5B89 → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-5B89, RIGHT PARENTHESIS	# →〔安〕→
+
+1F245 ;	0028 6253 0029 ;	MA	#* ( 🉅 → (打) ) TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-6253 → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-6253, RIGHT PARENTHESIS	# →〔打〕→
+
+1F248 ;	0028 6557 0029 ;	MA	#* ( 🉈 → (敗) ) TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-6557 → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-6557, RIGHT PARENTHESIS	# →〔敗〕→
+
+3230 ;	0028 65E5 0029 ;	MA	#* ( ㈰ → (日) ) PARENTHESIZED IDEOGRAPH SUN → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-65E5, RIGHT PARENTHESIS	# 
+
+322A ;	0028 6708 0029 ;	MA	#* ( ㈪ → (月) ) PARENTHESIZED IDEOGRAPH MOON → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-6708, RIGHT PARENTHESIS	# 
+
+3232 ;	0028 6709 0029 ;	MA	#* ( ㈲ → (有) ) PARENTHESIZED IDEOGRAPH HAVE → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-6709, RIGHT PARENTHESIS	# 
+
+322D ;	0028 6728 0029 ;	MA	#* ( ㈭ → (木) ) PARENTHESIZED IDEOGRAPH WOOD → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-6728, RIGHT PARENTHESIS	# 
+
+1F240 ;	0028 672C 0029 ;	MA	#* ( 🉀 → (本) ) TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-672C → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-672C, RIGHT PARENTHESIS	# →〔本〕→
+
+3231 ;	0028 682A 0029 ;	MA	#* ( ㈱ → (株) ) PARENTHESIZED IDEOGRAPH STOCK → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-682A, RIGHT PARENTHESIS	# 
+
+322C ;	0028 6C34 0029 ;	MA	#* ( ㈬ → (水) ) PARENTHESIZED IDEOGRAPH WATER → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-6C34, RIGHT PARENTHESIS	# 
+
+322B ;	0028 706B 0029 ;	MA	#* ( ㈫ → (火) ) PARENTHESIZED IDEOGRAPH FIRE → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-706B, RIGHT PARENTHESIS	# 
+
+1F244 ;	0028 70B9 0029 ;	MA	#* ( 🉄 → (点) ) TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-70B9 → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-70B9, RIGHT PARENTHESIS	# →〔点〕→
+
+3235 ;	0028 7279 0029 ;	MA	#* ( ㈵ → (特) ) PARENTHESIZED IDEOGRAPH SPECIAL → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-7279, RIGHT PARENTHESIS	# 
+
+1F246 ;	0028 76D7 0029 ;	MA	#* ( 🉆 → (盗) ) TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-76D7 → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-76D7, RIGHT PARENTHESIS	# →〔盗〕→
+
+323C ;	0028 76E3 0029 ;	MA	#* ( ㈼ → (監) ) PARENTHESIZED IDEOGRAPH SUPERVISE → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-76E3, RIGHT PARENTHESIS	# 
+
+3233 ;	0028 793E 0029 ;	MA	#* ( ㈳ → (社) ) PARENTHESIZED IDEOGRAPH SOCIETY → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-793E, RIGHT PARENTHESIS	# 
+
+3237 ;	0028 795D 0029 ;	MA	#* ( ㈷ → (祝) ) PARENTHESIZED IDEOGRAPH CONGRATULATION → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-795D, RIGHT PARENTHESIS	# 
+
+3240 ;	0028 796D 0029 ;	MA	#* ( ㉀ → (祭) ) PARENTHESIZED IDEOGRAPH FESTIVAL → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-796D, RIGHT PARENTHESIS	# 
+
+3242 ;	0028 81EA 0029 ;	MA	#* ( ㉂ → (自) ) PARENTHESIZED IDEOGRAPH SELF → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-81EA, RIGHT PARENTHESIS	# 
+
+3243 ;	0028 81F3 0029 ;	MA	#* ( ㉃ → (至) ) PARENTHESIZED IDEOGRAPH REACH → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-81F3, RIGHT PARENTHESIS	# 
+
+3236 ;	0028 8CA1 0029 ;	MA	#* ( ㈶ → (財) ) PARENTHESIZED IDEOGRAPH FINANCIAL → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-8CA1, RIGHT PARENTHESIS	# 
+
+323E ;	0028 8CC7 0029 ;	MA	#* ( ㈾ → (資) ) PARENTHESIZED IDEOGRAPH RESOURCE → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-8CC7, RIGHT PARENTHESIS	# 
+
+322E ;	0028 91D1 0029 ;	MA	#* ( ㈮ → (金) ) PARENTHESIZED IDEOGRAPH METAL → LEFT PARENTHESIS, CJK UNIFIED IDEOGRAPH-91D1, RIGHT PARENTHESIS	# 
+
+FF3D ;	0029 ;	MA	#* ( ] → ) ) FULLWIDTH RIGHT SQUARE BRACKET → RIGHT PARENTHESIS	# →〕→
+2769 ;	0029 ;	MA	#* ( ❩ → ) ) MEDIUM RIGHT PARENTHESIS ORNAMENT → RIGHT PARENTHESIS	# 
+2773 ;	0029 ;	MA	#* ( ❳ → ) ) LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT → RIGHT PARENTHESIS	# →〕→
+3015 ;	0029 ;	MA	#* ( 〕 → ) ) RIGHT TORTOISE SHELL BRACKET → RIGHT PARENTHESIS	# 
+FD3F ;	0029 ;	MA	#* ( ﴿ → ) ) ORNATE RIGHT PARENTHESIS → RIGHT PARENTHESIS	# 
+
+2E29 ;	0029 0029 ;	MA	#* ( ⸩ → )) ) RIGHT DOUBLE PARENTHESIS → RIGHT PARENTHESIS, RIGHT PARENTHESIS	# 
+
+2774 ;	007B ;	MA	#* ( ❴ → { ) MEDIUM LEFT CURLY BRACKET ORNAMENT → LEFT CURLY BRACKET	# 
+1D114 ;	007B ;	MA	#* ( 𝄔 → { ) MUSICAL SYMBOL BRACE → LEFT CURLY BRACKET	# 
+
+2775 ;	007D ;	MA	#* ( ❵ → } ) MEDIUM RIGHT CURLY BRACKET ORNAMENT → RIGHT CURLY BRACKET	# 
+
+301A ;	27E6 ;	MA	#* ( 〚 → ⟦ ) LEFT WHITE SQUARE BRACKET → MATHEMATICAL LEFT WHITE SQUARE BRACKET	# 
+
+301B ;	27E7 ;	MA	#* ( 〛 → ⟧ ) RIGHT WHITE SQUARE BRACKET → MATHEMATICAL RIGHT WHITE SQUARE BRACKET	# 
+
+27E8 ;	276C ;	MA	#* ( ⟨ → ❬ ) MATHEMATICAL LEFT ANGLE BRACKET → MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT	# →〈→
+2329 ;	276C ;	MA	#* ( ⟨ → ❬ ) LEFT-POINTING ANGLE BRACKET → MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT	# →〈→
+3008 ;	276C ;	MA	#* ( 〈 → ❬ ) LEFT ANGLE BRACKET → MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT	# 
+31DB ;	276C ;	MA	#* ( ㇛ → ❬ ) CJK STROKE PD → MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT	# →⟨→→〈→
+304F ;	276C ;	MA	# ( く → ❬ ) HIRAGANA LETTER KU → MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT	# →㇛→→⟨→→〈→
+21FE8 ;	276C ;	MA	# ( 𡿨 → ❬ ) CJK UNIFIED IDEOGRAPH-21FE8 → MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT	# →㇛→→⟨→→〈→
+
+27E9 ;	276D ;	MA	#* ( ⟩ → ❭ ) MATHEMATICAL RIGHT ANGLE BRACKET → MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT	# →〉→
+232A ;	276D ;	MA	#* ( ⟩ → ❭ ) RIGHT-POINTING ANGLE BRACKET → MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT	# →〉→
+3009 ;	276D ;	MA	#* ( 〉 → ❭ ) RIGHT ANGLE BRACKET → MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT	# 
+
+FF3E ;	FE3F ;	MA	#* ( ^ → ︿ ) FULLWIDTH CIRCUMFLEX ACCENT → PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET	# 
+
+2E3F ;	00B6 ;	MA	#* ( ⸿ → ¶ ) CAPITULUM → PILCROW SIGN	# 
+
+204E ;	002A ;	MA	#* ( ⁎ → * ) LOW ASTERISK → ASTERISK	# 
+066D ;	002A ;	MA	#* ( ‎٭‎ → * ) ARABIC FIVE POINTED STAR → ASTERISK	# 
+2217 ;	002A ;	MA	#* ( ∗ → * ) ASTERISK OPERATOR → ASTERISK	# 
+1031F ;	002A ;	MA	# ( 𐌟 → * ) OLD ITALIC LETTER ESS → ASTERISK	# 
+
+1735 ;	002F ;	MA	#* ( ᜵ → / ) PHILIPPINE SINGLE PUNCTUATION → SOLIDUS	# 
+2041 ;	002F ;	MA	#* ( ⁁ → / ) CARET INSERTION POINT → SOLIDUS	# 
+2215 ;	002F ;	MA	#* ( ∕ → / ) DIVISION SLASH → SOLIDUS	# 
+2044 ;	002F ;	MA	#* ( ⁄ → / ) FRACTION SLASH → SOLIDUS	# 
+2571 ;	002F ;	MA	#* ( ╱ → / ) BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT → SOLIDUS	# 
+27CB ;	002F ;	MA	#* ( ⟋ → / ) MATHEMATICAL RISING DIAGONAL → SOLIDUS	# 
+29F8 ;	002F ;	MA	#* ( ⧸ → / ) BIG SOLIDUS → SOLIDUS	# 
+1D23A ;	002F ;	MA	#* ( 𝈺 → / ) GREEK INSTRUMENTAL NOTATION SYMBOL-47 → SOLIDUS	# 
+31D3 ;	002F ;	MA	#* ( ㇓ → / ) CJK STROKE SP → SOLIDUS	# →⼃→
+3033 ;	002F ;	MA	# ( 〳 → / ) VERTICAL KANA REPEAT MARK UPPER HALF → SOLIDUS	# 
+2CC6 ;	002F ;	MA	# ( Ⳇ → / ) COPTIC CAPITAL LETTER OLD COPTIC ESH → SOLIDUS	# 
+30CE ;	002F ;	MA	# ( ノ → / ) KATAKANA LETTER NO → SOLIDUS	# →⼃→
+4E3F ;	002F ;	MA	# ( 丿 → / ) CJK UNIFIED IDEOGRAPH-4E3F → SOLIDUS	# →⼃→
+2F03 ;	002F ;	MA	#* ( ⼃ → / ) KANGXI RADICAL SLASH → SOLIDUS	# 
+
+29F6 ;	002F 0304 ;	MA	#* ( ⧶ → /̄ ) SOLIDUS WITH OVERBAR → SOLIDUS, COMBINING MACRON	# 
+
+2AFD ;	002F 002F ;	MA	#* ( ⫽ → // ) DOUBLE SOLIDUS OPERATOR → SOLIDUS, SOLIDUS	# 
+
+2AFB ;	002F 002F 002F ;	MA	#* ( ⫻ → /// ) TRIPLE SOLIDUS BINARY RELATION → SOLIDUS, SOLIDUS, SOLIDUS	# 
+
+FF3C ;	005C ;	MA	#* ( \ → \ ) FULLWIDTH REVERSE SOLIDUS → REVERSE SOLIDUS	# →∖→
+FE68 ;	005C ;	MA	#* ( ﹨ → \ ) SMALL REVERSE SOLIDUS → REVERSE SOLIDUS	# →∖→
+2216 ;	005C ;	MA	#* ( ∖ → \ ) SET MINUS → REVERSE SOLIDUS	# 
+27CD ;	005C ;	MA	#* ( ⟍ → \ ) MATHEMATICAL FALLING DIAGONAL → REVERSE SOLIDUS	# 
+29F5 ;	005C ;	MA	#* ( ⧵ → \ ) REVERSE SOLIDUS OPERATOR → REVERSE SOLIDUS	# 
+29F9 ;	005C ;	MA	#* ( ⧹ → \ ) BIG REVERSE SOLIDUS → REVERSE SOLIDUS	# 
+1D20F ;	005C ;	MA	#* ( 𝈏 → \ ) GREEK VOCAL NOTATION SYMBOL-16 → REVERSE SOLIDUS	# 
+1D23B ;	005C ;	MA	#* ( 𝈻 → \ ) GREEK INSTRUMENTAL NOTATION SYMBOL-48 → REVERSE SOLIDUS	# →𝈏→
+31D4 ;	005C ;	MA	#* ( ㇔ → \ ) CJK STROKE D → REVERSE SOLIDUS	# →⼂→
+4E36 ;	005C ;	MA	# ( 丶 → \ ) CJK UNIFIED IDEOGRAPH-4E36 → REVERSE SOLIDUS	# →⼂→
+2F02 ;	005C ;	MA	#* ( ⼂ → \ ) KANGXI RADICAL DOT → REVERSE SOLIDUS	# 
+
+2CF9 ;	005C 005C ;	MA	#* ( ⳹ → \\ ) COPTIC OLD NUBIAN FULL STOP → REVERSE SOLIDUS, REVERSE SOLIDUS	# 
+244A ;	005C 005C ;	MA	#* ( ⑊ → \\ ) OCR DOUBLE BACKSLASH → REVERSE SOLIDUS, REVERSE SOLIDUS	# 
+
+27C8 ;	005C 1455 ;	MA	#* ( ⟈ → \ᑕ ) REVERSE SOLIDUS PRECEDING SUBSET → REVERSE SOLIDUS, CANADIAN SYLLABICS TA	# →\⊂→
+
+A778 ;	0026 ;	MA	# ( ꝸ → & ) LATIN SMALL LETTER UM → AMPERSAND	# 
+
+0AF0 ;	0970 ;	MA	#* ( ૰ → ॰ ) GUJARATI ABBREVIATION SIGN → DEVANAGARI ABBREVIATION SIGN	# 
+110BB ;	0970 ;	MA	#* ( 𑂻 → ॰ ) KAITHI ABBREVIATION SIGN → DEVANAGARI ABBREVIATION SIGN	# 
+111C7 ;	0970 ;	MA	#* ( 𑇇 → ॰ ) SHARADA ABBREVIATION SIGN → DEVANAGARI ABBREVIATION SIGN	# 
+26AC ;	0970 ;	MA	#* ( ⚬ → ॰ ) MEDIUM SMALL WHITE CIRCLE → DEVANAGARI ABBREVIATION SIGN	# 
+
+111DB ;	A8FC ;	MA	#* ( 𑇛 → ꣼ ) SHARADA SIGN SIDDHAM → DEVANAGARI SIGN SIDDHAM	# 
+
+17D9 ;	0E4F ;	MA	#* ( ៙ → ๏ ) KHMER SIGN PHNAEK MUAN → THAI CHARACTER FONGMAN	# 
+
+17D5 ;	0E5A ;	MA	#* ( ៕ → ๚ ) KHMER SIGN BARIYOOSAN → THAI CHARACTER ANGKHANKHU	# 
+
+17DA ;	0E5B ;	MA	#* ( ៚ → ๛ ) KHMER SIGN KOOMUUT → THAI CHARACTER KHOMUT	# 
+
+0F0C ;	0F0B ;	MA	#* ( ༌ → ་ ) TIBETAN MARK DELIMITER TSHEG BSTAR → TIBETAN MARK INTERSYLLABIC TSHEG	# 
+
+0F0E ;	0F0D 0F0D ;	MA	#* ( ༎ → །། ) TIBETAN MARK NYIS SHAD → TIBETAN MARK SHAD, TIBETAN MARK SHAD	# 
+
+02C4 ;	005E ;	MA	#* ( ˄ → ^ ) MODIFIER LETTER UP ARROWHEAD → CIRCUMFLEX ACCENT	# 
+02C6 ;	005E ;	MA	# ( ˆ → ^ ) MODIFIER LETTER CIRCUMFLEX ACCENT → CIRCUMFLEX ACCENT	# 
+
+A67E ;	02C7 ;	MA	#* ( ꙾ → ˇ ) CYRILLIC KAVYKA → CARON	# →˘→
+02D8 ;	02C7 ;	MA	#* ( ˘ → ˇ ) BREVE → CARON	# 
+
+203E ;	02C9 ;	MA	#* ( ‾ → ˉ ) OVERLINE → MODIFIER LETTER MACRON	# 
+FE49 ;	02C9 ;	MA	#* ( ﹉ → ˉ ) DASHED OVERLINE → MODIFIER LETTER MACRON	# →‾→
+FE4A ;	02C9 ;	MA	#* ( ﹊ → ˉ ) CENTRELINE OVERLINE → MODIFIER LETTER MACRON	# →‾→
+FE4B ;	02C9 ;	MA	#* ( ﹋ → ˉ ) WAVY OVERLINE → MODIFIER LETTER MACRON	# →‾→
+FE4C ;	02C9 ;	MA	#* ( ﹌ → ˉ ) DOUBLE WAVY OVERLINE → MODIFIER LETTER MACRON	# →‾→
+00AF ;	02C9 ;	MA	#* ( ¯ → ˉ ) MACRON → MODIFIER LETTER MACRON	# 
+FFE3 ;	02C9 ;	MA	#* (  ̄ → ˉ ) FULLWIDTH MACRON → MODIFIER LETTER MACRON	# →‾→
+2594 ;	02C9 ;	MA	#* ( ▔ → ˉ ) UPPER ONE EIGHTH BLOCK → MODIFIER LETTER MACRON	# →¯→
+
+044A ;	02C9 0062 ;	MA	# ( ъ → ˉb ) CYRILLIC SMALL LETTER HARD SIGN → MODIFIER LETTER MACRON, LATIN SMALL LETTER B	# →¯b→
+
+A651 ;	02C9 0062 0069 ;	MA	# ( ꙑ → ˉbi ) CYRILLIC SMALL LETTER YERU WITH BACK YER → MODIFIER LETTER MACRON, LATIN SMALL LETTER B, LATIN SMALL LETTER I	# →ъı→
+
+0375 ;	02CF ;	MA	#* ( ͵ → ˏ ) GREEK LOWER NUMERAL SIGN → MODIFIER LETTER LOW ACUTE ACCENT	# 
+
+02FB ;	02EA ;	MA	#* ( ˻ → ˪ ) MODIFIER LETTER BEGIN LOW TONE → MODIFIER LETTER YIN DEPARTING TONE MARK	# 
+A716 ;	02EA ;	MA	#* ( ꜖ → ˪ ) MODIFIER LETTER EXTRA-LOW LEFT-STEM TONE BAR → MODIFIER LETTER YIN DEPARTING TONE MARK	# 
+
+A714 ;	02EB ;	MA	#* ( ꜔ → ˫ ) MODIFIER LETTER MID LEFT-STEM TONE BAR → MODIFIER LETTER YANG DEPARTING TONE MARK	# 
+
+3002 ;	02F3 ;	MA	#* ( 。 → ˳ ) IDEOGRAPHIC FULL STOP → MODIFIER LETTER LOW RING	# 
+
+2E30 ;	00B0 ;	MA	#* ( ⸰ → ° ) RING POINT → DEGREE SIGN	# →∘→
+02DA ;	00B0 ;	MA	#* ( ˚ → ° ) RING ABOVE → DEGREE SIGN	# 
+2218 ;	00B0 ;	MA	#* ( ∘ → ° ) RING OPERATOR → DEGREE SIGN	# 
+25CB ;	00B0 ;	MA	#* ( ○ → ° ) WHITE CIRCLE → DEGREE SIGN	# →◦→→∘→
+25E6 ;	00B0 ;	MA	#* ( ◦ → ° ) WHITE BULLET → DEGREE SIGN	# →∘→
+
+235C ;	00B0 0332 ;	MA	#* ( ⍜ → °̲ ) APL FUNCTIONAL SYMBOL CIRCLE UNDERBAR → DEGREE SIGN, COMBINING LOW LINE	# →○̲→
+
+2364 ;	00B0 0308 ;	MA	#* ( ⍤ → °̈ ) APL FUNCTIONAL SYMBOL JOT DIAERESIS → DEGREE SIGN, COMBINING DIAERESIS	# →◦̈→
+
+2103 ;	00B0 0043 ;	MA	#* ( ℃ → °C ) DEGREE CELSIUS → DEGREE SIGN, LATIN CAPITAL LETTER C	# 
+
+2109 ;	00B0 0046 ;	MA	#* ( ℉ → °F ) DEGREE FAHRENHEIT → DEGREE SIGN, LATIN CAPITAL LETTER F	# 
+
+0BF5 ;	0BF3 ;	MA	#* ( ௵ → ௳ ) TAMIL YEAR SIGN → TAMIL DAY SIGN	# 
+
+0F1B ;	0F1A 0F1A ;	MA	#* ( ༛ → ༚༚ ) TIBETAN SIGN RDEL DKAR GNYIS → TIBETAN SIGN RDEL DKAR GCIG, TIBETAN SIGN RDEL DKAR GCIG	# 
+
+0F1F ;	0F1A 0F1D ;	MA	#* ( ༟ → ༚༝ ) TIBETAN SIGN RDEL DKAR RDEL NAG → TIBETAN SIGN RDEL DKAR GCIG, TIBETAN SIGN RDEL NAG GCIG	# 
+
+0FCE ;	0F1D 0F1A ;	MA	#* ( ࿎ → ༝༚ ) TIBETAN SIGN RDEL NAG RDEL DKAR → TIBETAN SIGN RDEL NAG GCIG, TIBETAN SIGN RDEL DKAR GCIG	# 
+
+0F1E ;	0F1D 0F1D ;	MA	#* ( ༞ → ༝༝ ) TIBETAN SIGN RDEL NAG GNYIS → TIBETAN SIGN RDEL NAG GCIG, TIBETAN SIGN RDEL NAG GCIG	# 
+
+24B8 ;	00A9 ;	MA	#* ( Ⓒ → © ) CIRCLED LATIN CAPITAL LETTER C → COPYRIGHT SIGN	# 
+
+24C7 ;	00AE ;	MA	#* ( Ⓡ → ® ) CIRCLED LATIN CAPITAL LETTER R → REGISTERED SIGN	# 
+
+24C5 ;	2117 ;	MA	#* ( Ⓟ → ℗ ) CIRCLED LATIN CAPITAL LETTER P → SOUND RECORDING COPYRIGHT	# 
+
+1D21B ;	2144 ;	MA	#* ( 𝈛 → ⅄ ) GREEK VOCAL NOTATION SYMBOL-53 → TURNED SANS-SERIF CAPITAL Y	# 
+
+2BEC ;	219E ;	MA	#* ( ⯬ → ↞ ) LEFTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS → LEFTWARDS TWO HEADED ARROW	# 
+
+2BED ;	219F ;	MA	#* ( ⯭ → ↟ ) UPWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS → UPWARDS TWO HEADED ARROW	# 
+
+2BEE ;	21A0 ;	MA	#* ( ⯮ → ↠ ) RIGHTWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS → RIGHTWARDS TWO HEADED ARROW	# 
+
+2BEF ;	21A1 ;	MA	#* ( ⯯ → ↡ ) DOWNWARDS TWO-HEADED ARROW WITH TRIANGLE ARROWHEADS → DOWNWARDS TWO HEADED ARROW	# 
+
+21B5 ;	21B2 ;	MA	#* ( ↵ → ↲ ) DOWNWARDS ARROW WITH CORNER LEFTWARDS → DOWNWARDS ARROW WITH TIP LEFTWARDS	# 
+
+2965 ;	21C3 21C2 ;	MA	#* ( ⥥ → ⇃⇂ ) DOWNWARDS HARPOON WITH BARB LEFT BESIDE DOWNWARDS HARPOON WITH BARB RIGHT → DOWNWARDS HARPOON WITH BARB LEFTWARDS, DOWNWARDS HARPOON WITH BARB RIGHTWARDS	# 
+
+296F ;	21C3 16DA ;	MA	#* ( ⥯ → ⇃ᛚ ) DOWNWARDS HARPOON WITH BARB LEFT BESIDE UPWARDS HARPOON WITH BARB RIGHT → DOWNWARDS HARPOON WITH BARB LEFTWARDS, RUNIC LETTER LAUKAZ LAGU LOGR L	# →⇃↾→
+
+1D6DB ;	2202 ;	MA	#* ( 𝛛 → ∂ ) MATHEMATICAL BOLD PARTIAL DIFFERENTIAL → PARTIAL DIFFERENTIAL	# 
+1D715 ;	2202 ;	MA	#* ( 𝜕 → ∂ ) MATHEMATICAL ITALIC PARTIAL DIFFERENTIAL → PARTIAL DIFFERENTIAL	# 
+1D74F ;	2202 ;	MA	#* ( 𝝏 → ∂ ) MATHEMATICAL BOLD ITALIC PARTIAL DIFFERENTIAL → PARTIAL DIFFERENTIAL	# 
+1D789 ;	2202 ;	MA	#* ( 𝞉 → ∂ ) MATHEMATICAL SANS-SERIF BOLD PARTIAL DIFFERENTIAL → PARTIAL DIFFERENTIAL	# 
+1D7C3 ;	2202 ;	MA	#* ( 𝟃 → ∂ ) MATHEMATICAL SANS-SERIF BOLD ITALIC PARTIAL DIFFERENTIAL → PARTIAL DIFFERENTIAL	# 
+1E8CC ;	2202 ;	MA	#* ( ‎𞣌‎ → ∂ ) MENDE KIKAKUI DIGIT SIX → PARTIAL DIFFERENTIAL	# 
+
+1E8CD ;	2202 0335 ;	MA	#* ( ‎𞣍‎ → ∂̵ ) MENDE KIKAKUI DIGIT SEVEN → PARTIAL DIFFERENTIAL, COMBINING SHORT STROKE OVERLAY	# →ð→
+00F0 ;	2202 0335 ;	MA	# ( ð → ∂̵ ) LATIN SMALL LETTER ETH → PARTIAL DIFFERENTIAL, COMBINING SHORT STROKE OVERLAY	# 
+
+2300 ;	2205 ;	MA	#* ( ⌀ → ∅ ) DIAMETER SIGN → EMPTY SET	# 
+
+1D6C1 ;	2207 ;	MA	#* ( 𝛁 → ∇ ) MATHEMATICAL BOLD NABLA → NABLA	# 
+1D6FB ;	2207 ;	MA	#* ( 𝛻 → ∇ ) MATHEMATICAL ITALIC NABLA → NABLA	# 
+1D735 ;	2207 ;	MA	#* ( 𝜵 → ∇ ) MATHEMATICAL BOLD ITALIC NABLA → NABLA	# 
+1D76F ;	2207 ;	MA	#* ( 𝝯 → ∇ ) MATHEMATICAL SANS-SERIF BOLD NABLA → NABLA	# 
+1D7A9 ;	2207 ;	MA	#* ( 𝞩 → ∇ ) MATHEMATICAL SANS-SERIF BOLD ITALIC NABLA → NABLA	# 
+118A8 ;	2207 ;	MA	# ( 𑢨 → ∇ ) WARANG CITI CAPITAL LETTER E → NABLA	# 
+
+2362 ;	2207 0308 ;	MA	#* ( ⍢ → ∇̈ ) APL FUNCTIONAL SYMBOL DEL DIAERESIS → NABLA, COMBINING DIAERESIS	# 
+
+236B ;	2207 0334 ;	MA	#* ( ⍫ → ∇̴ ) APL FUNCTIONAL SYMBOL DEL TILDE → NABLA, COMBINING TILDE OVERLAY	# 
+
+2588 ;	220E ;	MA	#* ( █ → ∎ ) FULL BLOCK → END OF PROOF	# →■→
+25A0 ;	220E ;	MA	#* ( ■ → ∎ ) BLACK SQUARE → END OF PROOF	# 
+
+2A3F ;	2210 ;	MA	#* ( ⨿ → ∐ ) AMALGAMATION OR COPRODUCT → N-ARY COPRODUCT	# 
+
+16ED ;	002B ;	MA	#* ( ᛭ → + ) RUNIC CROSS PUNCTUATION → PLUS SIGN	# 
+2795 ;	002B ;	MA	#* ( ➕ → + ) HEAVY PLUS SIGN → PLUS SIGN	# 
+1029B ;	002B ;	MA	# ( 𐊛 → + ) LYCIAN LETTER H → PLUS SIGN	# 
+
+2A23 ;	002B 0302 ;	MA	#* ( ⨣ → +̂ ) PLUS SIGN WITH CIRCUMFLEX ACCENT ABOVE → PLUS SIGN, COMBINING CIRCUMFLEX ACCENT	# 
+
+2A22 ;	002B 030A ;	MA	#* ( ⨢ → +̊ ) PLUS SIGN WITH SMALL CIRCLE ABOVE → PLUS SIGN, COMBINING RING ABOVE	# 
+
+2A24 ;	002B 0303 ;	MA	#* ( ⨤ → +̃ ) PLUS SIGN WITH TILDE ABOVE → PLUS SIGN, COMBINING TILDE	# 
+
+2214 ;	002B 0307 ;	MA	#* ( ∔ → +̇ ) DOT PLUS → PLUS SIGN, COMBINING DOT ABOVE	# 
+
+2A25 ;	002B 0323 ;	MA	#* ( ⨥ → +̣ ) PLUS SIGN WITH DOT BELOW → PLUS SIGN, COMBINING DOT BELOW	# 
+
+2A26 ;	002B 0330 ;	MA	#* ( ⨦ → +̰ ) PLUS SIGN WITH TILDE BELOW → PLUS SIGN, COMBINING TILDE BELOW	# 
+
+2A27 ;	002B 2082 ;	MA	#* ( ⨧ → +₂ ) PLUS SIGN WITH SUBSCRIPT TWO → PLUS SIGN, SUBSCRIPT TWO	# 
+
+2797 ;	00F7 ;	MA	#* ( ➗ → ÷ ) HEAVY DIVISION SIGN → DIVISION SIGN	# 
+
+2039 ;	003C ;	MA	#* ( ‹ → < ) SINGLE LEFT-POINTING ANGLE QUOTATION MARK → LESS-THAN SIGN	# 
+276E ;	003C ;	MA	#* ( ❮ → < ) HEAVY LEFT-POINTING ANGLE QUOTATION MARK ORNAMENT → LESS-THAN SIGN	# →‹→
+02C2 ;	003C ;	MA	#* ( ˂ → < ) MODIFIER LETTER LEFT ARROWHEAD → LESS-THAN SIGN	# 
+1D236 ;	003C ;	MA	#* ( 𝈶 → < ) GREEK INSTRUMENTAL NOTATION SYMBOL-40 → LESS-THAN SIGN	# 
+1438 ;	003C ;	MA	# ( ᐸ → < ) CANADIAN SYLLABICS PA → LESS-THAN SIGN	# 
+16B2 ;	003C ;	MA	# ( ᚲ → < ) RUNIC LETTER KAUNA → LESS-THAN SIGN	# 
+
+22D6 ;	003C 00B7 ;	MA	#* ( ⋖ → <· ) LESS-THAN WITH DOT → LESS-THAN SIGN, MIDDLE DOT	# →ᑅ→→ᐸᐧ→
+2CB4 ;	003C 00B7 ;	MA	# ( Ⲵ → <· ) COPTIC CAPITAL LETTER OLD COPTIC AIN → LESS-THAN SIGN, MIDDLE DOT	# →ᑅ→→ᐸᐧ→
+1445 ;	003C 00B7 ;	MA	# ( ᑅ → <· ) CANADIAN SYLLABICS WEST-CREE PWA → LESS-THAN SIGN, MIDDLE DOT	# →ᐸᐧ→
+
+226A ;	003C 003C ;	MA	#* ( ≪ → << ) MUCH LESS-THAN → LESS-THAN SIGN, LESS-THAN SIGN	# 
+
+22D8 ;	003C 003C 003C ;	MA	#* ( ⋘ → <<< ) VERY MUCH LESS-THAN → LESS-THAN SIGN, LESS-THAN SIGN, LESS-THAN SIGN	# 
+
+1400 ;	003D ;	MA	#* ( ᐀ → = ) CANADIAN SYLLABICS HYPHEN → EQUALS SIGN	# 
+2E40 ;	003D ;	MA	#* ( ⹀ → = ) DOUBLE HYPHEN → EQUALS SIGN	# 
+30A0 ;	003D ;	MA	#* ( ゠ → = ) KATAKANA-HIRAGANA DOUBLE HYPHEN → EQUALS SIGN	# 
+A4FF ;	003D ;	MA	#* ( ꓿ → = ) LISU PUNCTUATION FULL STOP → EQUALS SIGN	# 
+
+225A ;	003D 0306 ;	MA	#* ( ≚ → =̆ ) EQUIANGULAR TO → EQUALS SIGN, COMBINING BREVE	# →=̌→
+
+2259 ;	003D 0302 ;	MA	#* ( ≙ → =̂ ) ESTIMATES → EQUALS SIGN, COMBINING CIRCUMFLEX ACCENT	# 
+
+2257 ;	003D 030A ;	MA	#* ( ≗ → =̊ ) RING EQUAL TO → EQUALS SIGN, COMBINING RING ABOVE	# 
+
+2250 ;	003D 0307 ;	MA	#* ( ≐ → =̇ ) APPROACHES THE LIMIT → EQUALS SIGN, COMBINING DOT ABOVE	# 
+
+2251 ;	003D 0307 0323 ;	MA	#* ( ≑ → =̣̇ ) GEOMETRICALLY EQUAL TO → EQUALS SIGN, COMBINING DOT ABOVE, COMBINING DOT BELOW	# →≐̣→
+
+2A6E ;	003D 20F0 ;	MA	#* ( ⩮ → =⃰ ) EQUALS WITH ASTERISK → EQUALS SIGN, COMBINING ASTERISK ABOVE	# 
+
+2A75 ;	003D 003D ;	MA	#* ( ⩵ → == ) TWO CONSECUTIVE EQUALS SIGNS → EQUALS SIGN, EQUALS SIGN	# 
+
+2A76 ;	003D 003D 003D ;	MA	#* ( ⩶ → === ) THREE CONSECUTIVE EQUALS SIGNS → EQUALS SIGN, EQUALS SIGN, EQUALS SIGN	# 
+
+225E ;	003D 036B ;	MA	#* ( ≞ → =ͫ ) MEASURED BY → EQUALS SIGN, COMBINING LATIN SMALL LETTER M	# 
+
+203A ;	003E ;	MA	#* ( › → > ) SINGLE RIGHT-POINTING ANGLE QUOTATION MARK → GREATER-THAN SIGN	# 
+276F ;	003E ;	MA	#* ( ❯ → > ) HEAVY RIGHT-POINTING ANGLE QUOTATION MARK ORNAMENT → GREATER-THAN SIGN	# →›→
+02C3 ;	003E ;	MA	#* ( ˃ → > ) MODIFIER LETTER RIGHT ARROWHEAD → GREATER-THAN SIGN	# 
+1D237 ;	003E ;	MA	#* ( 𝈷 → > ) GREEK INSTRUMENTAL NOTATION SYMBOL-42 → GREATER-THAN SIGN	# 
+1433 ;	003E ;	MA	# ( ᐳ → > ) CANADIAN SYLLABICS PO → GREATER-THAN SIGN	# 
+
+1441 ;	003E 00B7 ;	MA	# ( ᑁ → >· ) CANADIAN SYLLABICS WEST-CREE PWO → GREATER-THAN SIGN, MIDDLE DOT	# →ᐳᐧ→
+
+2AA5 ;	003E 003C ;	MA	#* ( ⪥ → >< ) GREATER-THAN BESIDE LESS-THAN → GREATER-THAN SIGN, LESS-THAN SIGN	# 
+
+226B ;	003E 003E ;	MA	#* ( ≫ → >> ) MUCH GREATER-THAN → GREATER-THAN SIGN, GREATER-THAN SIGN	# 
+2A20 ;	003E 003E ;	MA	#* ( ⨠ → >> ) Z NOTATION SCHEMA PIPING → GREATER-THAN SIGN, GREATER-THAN SIGN	# →≫→
+
+22D9 ;	003E 003E 003E ;	MA	#* ( ⋙ → >>> ) VERY MUCH GREATER-THAN → GREATER-THAN SIGN, GREATER-THAN SIGN, GREATER-THAN SIGN	# 
+
+2053 ;	007E ;	MA	#* ( ⁓ → ~ ) SWUNG DASH → TILDE	# 
+02DC ;	007E ;	MA	#* ( ˜ → ~ ) SMALL TILDE → TILDE	# 
+1FC0 ;	007E ;	MA	#* ( ῀ → ~ ) GREEK PERISPOMENI → TILDE	# →˜→
+223C ;	007E ;	MA	#* ( ∼ → ~ ) TILDE OPERATOR → TILDE	# 
+
+2368 ;	007E 0308 ;	MA	#* ( ⍨ → ~̈ ) APL FUNCTIONAL SYMBOL TILDE DIAERESIS → TILDE, COMBINING DIAERESIS	# 
+
+2E1E ;	007E 0307 ;	MA	#* ( ⸞ → ~̇ ) TILDE WITH DOT ABOVE → TILDE, COMBINING DOT ABOVE	# →⩪→→∼̇→
+2A6A ;	007E 0307 ;	MA	#* ( ⩪ → ~̇ ) TILDE OPERATOR WITH DOT ABOVE → TILDE, COMBINING DOT ABOVE	# →∼̇→
+
+2E1F ;	007E 0323 ;	MA	#* ( ⸟ → ~̣ ) TILDE WITH DOT BELOW → TILDE, COMBINING DOT BELOW	# 
+
+1E8C8 ;	2220 ;	MA	#* ( ‎𞣈‎ → ∠ ) MENDE KIKAKUI DIGIT TWO → ANGLE	# 
+
+22C0 ;	2227 ;	MA	#* ( ⋀ → ∧ ) N-ARY LOGICAL AND → LOGICAL AND	# 
+
+222F ;	222E 222E ;	MA	#* ( ∯ → ∮∮ ) SURFACE INTEGRAL → CONTOUR INTEGRAL, CONTOUR INTEGRAL	# 
+
+2230 ;	222E 222E 222E ;	MA	#* ( ∰ → ∮∮∮ ) VOLUME INTEGRAL → CONTOUR INTEGRAL, CONTOUR INTEGRAL, CONTOUR INTEGRAL	# 
+
+2E2B ;	2234 ;	MA	#* ( ⸫ → ∴ ) ONE DOT OVER TWO DOTS PUNCTUATION → THEREFORE	# 
+
+2E2A ;	2235 ;	MA	#* ( ⸪ → ∵ ) TWO DOTS OVER ONE DOT PUNCTUATION → BECAUSE	# 
+
+2E2C ;	2237 ;	MA	#* ( ⸬ → ∷ ) SQUARED FOUR DOT PUNCTUATION → PROPORTION	# 
+
+111DE ;	2248 ;	MA	#* ( 𑇞 → ≈ ) SHARADA SECTION MARK-1 → ALMOST EQUAL TO	# 
+
+264E ;	224F ;	MA	#* ( ♎ → ≏ ) LIBRA → DIFFERENCE BETWEEN	# 
+1F75E ;	224F ;	MA	#* ( 🝞 → ≏ ) ALCHEMICAL SYMBOL FOR SUBLIMATION → DIFFERENCE BETWEEN	# →♎→
+
+2263 ;	2261 ;	MA	#* ( ≣ → ≡ ) STRICTLY EQUIVALENT TO → IDENTICAL TO	# 
+
+2A03 ;	228D ;	MA	#* ( ⨃ → ⊍ ) N-ARY UNION OPERATOR WITH DOT → MULTISET MULTIPLICATION	# 
+
+2A04 ;	228E ;	MA	#* ( ⨄ → ⊎ ) N-ARY UNION OPERATOR WITH PLUS → MULTISET UNION	# 
+
+1D238 ;	228F ;	MA	#* ( 𝈸 → ⊏ ) GREEK INSTRUMENTAL NOTATION SYMBOL-43 → SQUARE IMAGE OF	# 
+
+1D239 ;	2290 ;	MA	#* ( 𝈹 → ⊐ ) GREEK INSTRUMENTAL NOTATION SYMBOL-45 → SQUARE ORIGINAL OF	# 
+
+2A05 ;	2293 ;	MA	#* ( ⨅ → ⊓ ) N-ARY SQUARE INTERSECTION OPERATOR → SQUARE CAP	# 
+
+2A06 ;	2294 ;	MA	#* ( ⨆ → ⊔ ) N-ARY SQUARE UNION OPERATOR → SQUARE CUP	# 
+
+2A02 ;	2297 ;	MA	#* ( ⨂ → ⊗ ) N-ARY CIRCLED TIMES OPERATOR → CIRCLED TIMES	# 
+
+235F ;	229B ;	MA	#* ( ⍟ → ⊛ ) APL FUNCTIONAL SYMBOL CIRCLE STAR → CIRCLED ASTERISK OPERATOR	# 
+
+1F771 ;	22A0 ;	MA	#* ( 🝱 → ⊠ ) ALCHEMICAL SYMBOL FOR MONTH → SQUARED TIMES	# 
+
+1F755 ;	22A1 ;	MA	#* ( 🝕 → ⊡ ) ALCHEMICAL SYMBOL FOR URINE → SQUARED DOT OPERATOR	# 
+
+25C1 ;	22B2 ;	MA	#* ( ◁ → ⊲ ) WHITE LEFT-POINTING TRIANGLE → NORMAL SUBGROUP OF	# 
+
+25B7 ;	22B3 ;	MA	#* ( ▷ → ⊳ ) WHITE RIGHT-POINTING TRIANGLE → CONTAINS AS NORMAL SUBGROUP	# 
+
+2363 ;	22C6 0308 ;	MA	#* ( ⍣ → ⋆̈ ) APL FUNCTIONAL SYMBOL STAR DIAERESIS → STAR OPERATOR, COMBINING DIAERESIS	# 
+
+FE34 ;	2307 ;	MA	# ( ︴ → ⌇ ) PRESENTATION FORM FOR VERTICAL WAVY LOW LINE → WAVY LINE	# 
+
+25E0 ;	2312 ;	MA	#* ( ◠ → ⌒ ) UPPER HALF CIRCLE → ARC	# 
+
+2A3D ;	2319 ;	MA	#* ( ⨽ → ⌙ ) RIGHTHAND INTERIOR PRODUCT → TURNED NOT SIGN	# 
+
+2325 ;	2324 ;	MA	#* ( ⌥ → ⌤ ) OPTION KEY → UP ARROWHEAD BETWEEN TWO HORIZONTAL BARS	# 
+
+29C7 ;	233B ;	MA	#* ( ⧇ → ⌻ ) SQUARED SMALL CIRCLE → APL FUNCTIONAL SYMBOL QUAD JOT	# 
+
+25CE ;	233E ;	MA	#* ( ◎ → ⌾ ) BULLSEYE → APL FUNCTIONAL SYMBOL CIRCLE JOT	# →⦾→
+29BE ;	233E ;	MA	#* ( ⦾ → ⌾ ) CIRCLED WHITE BULLET → APL FUNCTIONAL SYMBOL CIRCLE JOT	# 
+
+29C5 ;	2342 ;	MA	#* ( ⧅ → ⍂ ) SQUARED FALLING DIAGONAL SLASH → APL FUNCTIONAL SYMBOL QUAD BACKSLASH	# 
+
+29B0 ;	2349 ;	MA	#* ( ⦰ → ⍉ ) REVERSED EMPTY SET → APL FUNCTIONAL SYMBOL CIRCLE BACKSLASH	# 
+
+23C3 ;	234B ;	MA	#* ( ⏃ → ⍋ ) DENTISTRY SYMBOL LIGHT VERTICAL WITH TRIANGLE → APL FUNCTIONAL SYMBOL DELTA STILE	# 
+
+23C2 ;	234E ;	MA	#* ( ⏂ → ⍎ ) DENTISTRY SYMBOL LIGHT UP AND HORIZONTAL WITH CIRCLE → APL FUNCTIONAL SYMBOL DOWN TACK JOT	# 
+
+23C1 ;	2355 ;	MA	#* ( ⏁ → ⍕ ) DENTISTRY SYMBOL LIGHT DOWN AND HORIZONTAL WITH CIRCLE → APL FUNCTIONAL SYMBOL UP TACK JOT	# 
+
+00D6 ;	2365 ;	MA	# ( Ö → ⍥ ) LATIN CAPITAL LETTER O WITH DIAERESIS → APL FUNCTIONAL SYMBOL CIRCLE DIAERESIS	# 
+0150 ;	2365 ;	MA	# ( Ő → ⍥ ) LATIN CAPITAL LETTER O WITH DOUBLE ACUTE → APL FUNCTIONAL SYMBOL CIRCLE DIAERESIS	# →Ö→
+
+23C6 ;	236D ;	MA	#* ( ⏆ → ⍭ ) DENTISTRY SYMBOL LIGHT VERTICAL AND WAVE → APL FUNCTIONAL SYMBOL STILE TILDE	# 
+
+2638 ;	2388 ;	MA	#* ( ☸ → ⎈ ) WHEEL OF DHARMA → HELM SYMBOL	# 
+
+FE35 ;	23DC ;	MA	#* ( ︵ → ⏜ ) PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS → TOP PARENTHESIS	# 
+
+FE36 ;	23DD ;	MA	#* ( ︶ → ⏝ ) PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS → BOTTOM PARENTHESIS	# 
+
+FE37 ;	23DE ;	MA	#* ( ︷ → ⏞ ) PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET → TOP CURLY BRACKET	# 
+
+FE38 ;	23DF ;	MA	#* ( ︸ → ⏟ ) PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET → BOTTOM CURLY BRACKET	# 
+
+FE39 ;	23E0 ;	MA	#* ( ︹ → ⏠ ) PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET → TOP TORTOISE SHELL BRACKET	# 
+
+FE3A ;	23E1 ;	MA	#* ( ︺ → ⏡ ) PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET → BOTTOM TORTOISE SHELL BRACKET	# 
+
+25B1 ;	23E5 ;	MA	#* ( ▱ → ⏥ ) WHITE PARALLELOGRAM → FLATNESS	# 
+
+FE31 ;	2502 ;	MA	#* ( ︱ → │ ) PRESENTATION FORM FOR VERTICAL EM DASH → BOX DRAWINGS LIGHT VERTICAL	# →|→
+FF5C ;	2502 ;	MA	#* ( | → │ ) FULLWIDTH VERTICAL LINE → BOX DRAWINGS LIGHT VERTICAL	# 
+2503 ;	2502 ;	MA	#* ( ┃ → │ ) BOX DRAWINGS HEAVY VERTICAL → BOX DRAWINGS LIGHT VERTICAL	# 
+
+250F ;	250C ;	MA	#* ( ┏ → ┌ ) BOX DRAWINGS HEAVY DOWN AND RIGHT → BOX DRAWINGS LIGHT DOWN AND RIGHT	# 
+
+2523 ;	251C ;	MA	#* ( ┣ → ├ ) BOX DRAWINGS HEAVY VERTICAL AND RIGHT → BOX DRAWINGS LIGHT VERTICAL AND RIGHT	# 
+
+2590 ;	258C ;	MA	#* ( ▐ → ▌ ) RIGHT HALF BLOCK → LEFT HALF BLOCK	# 
+
+2597 ;	2596 ;	MA	#* ( ▗ → ▖ ) QUADRANT LOWER RIGHT → QUADRANT LOWER LEFT	# 
+
+259D ;	2598 ;	MA	#* ( ▝ → ▘ ) QUADRANT UPPER RIGHT → QUADRANT UPPER LEFT	# 
+
+2610 ;	25A1 ;	MA	#* ( ☐ → □ ) BALLOT BOX → WHITE SQUARE	# 
+
+FFED ;	25AA ;	MA	#* ( ■ → ▪ ) HALFWIDTH BLACK SQUARE → BLACK SMALL SQUARE	# 
+
+25B8 ;	25B6 ;	MA	#* ( ▸ → ▶ ) BLACK RIGHT-POINTING SMALL TRIANGLE → BLACK RIGHT-POINTING TRIANGLE	# →►→
+25BA ;	25B6 ;	MA	#* ( ► → ▶ ) BLACK RIGHT-POINTING POINTER → BLACK RIGHT-POINTING TRIANGLE	# 
+
+2CE9 ;	2627 ;	MA	#* ( ⳩ → ☧ ) COPTIC SYMBOL KHI RO → CHI RHO	# 
+
+1F70A ;	2629 ;	MA	#* ( 🜊 → ☩ ) ALCHEMICAL SYMBOL FOR VINEGAR → CROSS OF JERUSALEM	# 
+
+1F312 ;	263D ;	MA	#* ( 🌒 → ☽ ) WAXING CRESCENT MOON SYMBOL → FIRST QUARTER MOON	# 
+1F319 ;	263D ;	MA	#* ( 🌙 → ☽ ) CRESCENT MOON → FIRST QUARTER MOON	# 
+
+1F318 ;	263E ;	MA	#* ( 🌘 → ☾ ) WANING CRESCENT MOON SYMBOL → LAST QUARTER MOON	# 
+23FE ;	263E ;	MA	#* ( ⏾ → ☾ ) POWER SLEEP SYMBOL → LAST QUARTER MOON	# 
+
+29D9 ;	299A ;	MA	#* ( ⧙ → ⦚ ) RIGHT WIGGLY FENCE → VERTICAL ZIGZAG LINE	# 
+
+1F73A ;	29DF ;	MA	#* ( 🜺 → ⧟ ) ALCHEMICAL SYMBOL FOR ARSENIC → DOUBLE-ENDED MULTIMAP	# 
+
+2A3E ;	2A1F ;	MA	#* ( ⨾ → ⨟ ) Z NOTATION RELATIONAL COMPOSITION → Z NOTATION SCHEMA COMPOSITION	# 
+
+2669 ;	1D158 1D165 ;	MA	#* ( ♩ → 𝅘𝅥 ) QUARTER NOTE → MUSICAL SYMBOL NOTEHEAD BLACK, MUSICAL SYMBOL COMBINING STEM	# 
+
+266A ;	1D158 1D165 1D16E ;	MA	#* ( ♪ → 𝅘𝅥𝅮 ) EIGHTH NOTE → MUSICAL SYMBOL NOTEHEAD BLACK, MUSICAL SYMBOL COMBINING STEM, MUSICAL SYMBOL COMBINING FLAG-1	# 
+
+02D9 ;	0971 ;	MA	#* ( ˙ → ॱ ) DOT ABOVE → DEVANAGARI SIGN HIGH SPACING DOT	# 
+0D4E ;	0971 ;	MA	# ( ൎ → ॱ ) MALAYALAM LETTER DOT REPH → DEVANAGARI SIGN HIGH SPACING DOT	# →˙→
+
+FF0D ;	30FC ;	MA	#* ( - → ー ) FULLWIDTH HYPHEN-MINUS → KATAKANA-HIRAGANA PROLONGED SOUND MARK	# 
+2014 ;	30FC ;	MA	#* ( — → ー ) EM DASH → KATAKANA-HIRAGANA PROLONGED SOUND MARK	# →一→
+2015 ;	30FC ;	MA	#* ( ― → ー ) HORIZONTAL BAR → KATAKANA-HIRAGANA PROLONGED SOUND MARK	# →—→→一→
+2500 ;	30FC ;	MA	#* ( ─ → ー ) BOX DRAWINGS LIGHT HORIZONTAL → KATAKANA-HIRAGANA PROLONGED SOUND MARK	# →━→→—→→一→
+2501 ;	30FC ;	MA	#* ( ━ → ー ) BOX DRAWINGS HEAVY HORIZONTAL → KATAKANA-HIRAGANA PROLONGED SOUND MARK	# →—→→一→
+31D0 ;	30FC ;	MA	#* ( ㇐ → ー ) CJK STROKE H → KATAKANA-HIRAGANA PROLONGED SOUND MARK	# →一→
+A7F7 ;	30FC ;	MA	# ( ꟷ → ー ) LATIN EPIGRAPHIC LETTER SIDEWAYS I → KATAKANA-HIRAGANA PROLONGED SOUND MARK	# →—→→一→
+1173 ;	30FC ;	MA	# ( ᅳ → ー ) HANGUL JUNGSEONG EU → KATAKANA-HIRAGANA PROLONGED SOUND MARK	# →ㅡ→→—→→一→
+3161 ;	30FC ;	MA	# ( ㅡ → ー ) HANGUL LETTER EU → KATAKANA-HIRAGANA PROLONGED SOUND MARK	# →—→→一→
+4E00 ;	30FC ;	MA	# ( 一 → ー ) CJK UNIFIED IDEOGRAPH-4E00 → KATAKANA-HIRAGANA PROLONGED SOUND MARK	# 
+2F00 ;	30FC ;	MA	#* ( ⼀ → ー ) KANGXI RADICAL ONE → KATAKANA-HIRAGANA PROLONGED SOUND MARK	# →一→
+
+1196 ;	30FC 30FC ;	MA	# ( ᆖ → ーー ) HANGUL JUNGSEONG EU-EU → KATAKANA-HIRAGANA PROLONGED SOUND MARK, KATAKANA-HIRAGANA PROLONGED SOUND MARK	# →ᅳᅳ→
+
+D7B9 ;	30FC 1161 ;	MA	# ( ힹ → ーᅡ ) HANGUL JUNGSEONG EU-A → KATAKANA-HIRAGANA PROLONGED SOUND MARK, HANGUL JUNGSEONG A	# →ᅳᅡ→
+
+D7BA ;	30FC 1165 ;	MA	# ( ힺ → ーᅥ ) HANGUL JUNGSEONG EU-EO → KATAKANA-HIRAGANA PROLONGED SOUND MARK, HANGUL JUNGSEONG EO	# →ᅳᅥ→
+
+D7BB ;	30FC 1165 4E28 ;	MA	# ( ힻ → ーᅥ丨 ) HANGUL JUNGSEONG EU-E → KATAKANA-HIRAGANA PROLONGED SOUND MARK, HANGUL JUNGSEONG EO, CJK UNIFIED IDEOGRAPH-4E28	# →ᅳᅥᅵ→
+
+D7BC ;	30FC 1169 ;	MA	# ( ힼ → ーᅩ ) HANGUL JUNGSEONG EU-O → KATAKANA-HIRAGANA PROLONGED SOUND MARK, HANGUL JUNGSEONG O	# →ᅳᅩ→
+
+1195 ;	30FC 116E ;	MA	# ( ᆕ → ーᅮ ) HANGUL JUNGSEONG EU-U → KATAKANA-HIRAGANA PROLONGED SOUND MARK, HANGUL JUNGSEONG U	# →ᅳᅮ→
+
+1174 ;	30FC 4E28 ;	MA	# ( ᅴ → ー丨 ) HANGUL JUNGSEONG YI → KATAKANA-HIRAGANA PROLONGED SOUND MARK, CJK UNIFIED IDEOGRAPH-4E28	# →ᅳᅵ→
+3162 ;	30FC 4E28 ;	MA	# ( ㅢ → ー丨 ) HANGUL LETTER YI → KATAKANA-HIRAGANA PROLONGED SOUND MARK, CJK UNIFIED IDEOGRAPH-4E28	# →ᅴ→→ᅳᅵ→
+
+1197 ;	30FC 4E28 116E ;	MA	# ( ᆗ → ー丨ᅮ ) HANGUL JUNGSEONG YI-U → KATAKANA-HIRAGANA PROLONGED SOUND MARK, CJK UNIFIED IDEOGRAPH-4E28, HANGUL JUNGSEONG U	# →ᅳᅵᅮ→
+
+20A4 ;	00A3 ;	MA	#* ( ₤ → £ ) LIRA SIGN → POUND SIGN	# 
+
+3012 ;	20B8 ;	MA	#* ( 〒 → ₸ ) POSTAL MARK → TENGE SIGN	# 
+3036 ;	20B8 ;	MA	#* ( 〶 → ₸ ) CIRCLED POSTAL MARK → TENGE SIGN	# →〒→
+
+1B5C ;	1B50 ;	MA	#* ( ᭜ → ᭐ ) BALINESE WINDU → BALINESE DIGIT ZERO	# 
+
+A9C6 ;	A9D0 ;	MA	#* ( ꧆ → ꧐ ) JAVANESE PADA WINDU → JAVANESE DIGIT ZERO	# 
+
+114D1 ;	09E7 ;	MA	# ( 𑓑 → ১ ) TIRHUTA DIGIT ONE → BENGALI DIGIT ONE	# 
+
+0CE7 ;	0C67 ;	MA	# ( ೧ → ౧ ) KANNADA DIGIT ONE → TELUGU DIGIT ONE	# 
+
+1065 ;	1041 ;	MA	# ( ၥ → ၁ ) MYANMAR LETTER WESTERN PWO KAREN THA → MYANMAR DIGIT ONE	# 
+
+2460 ;	2780 ;	MA	#* ( ① → ➀ ) CIRCLED DIGIT ONE → DINGBAT CIRCLED SANS-SERIF DIGIT ONE	# 
+
+2469 ;	2789 ;	MA	#* ( ⑩ → ➉ ) CIRCLED NUMBER TEN → DINGBAT CIRCLED SANS-SERIF NUMBER TEN	# 
+
+23E8 ;	2081 2080 ;	MA	#* ( ⏨ → ₁₀ ) DECIMAL EXPONENT SYMBOL → SUBSCRIPT ONE, SUBSCRIPT ZERO	# 
+
+1D7D0 ;	0032 ;	MA	# ( 𝟐 → 2 ) MATHEMATICAL BOLD DIGIT TWO → DIGIT TWO	# 
+1D7DA ;	0032 ;	MA	# ( 𝟚 → 2 ) MATHEMATICAL DOUBLE-STRUCK DIGIT TWO → DIGIT TWO	# 
+1D7E4 ;	0032 ;	MA	# ( 𝟤 → 2 ) MATHEMATICAL SANS-SERIF DIGIT TWO → DIGIT TWO	# 
+1D7EE ;	0032 ;	MA	# ( 𝟮 → 2 ) MATHEMATICAL SANS-SERIF BOLD DIGIT TWO → DIGIT TWO	# 
+1D7F8 ;	0032 ;	MA	# ( 𝟸 → 2 ) MATHEMATICAL MONOSPACE DIGIT TWO → DIGIT TWO	# 
+A75A ;	0032 ;	MA	# ( Ꝛ → 2 ) LATIN CAPITAL LETTER R ROTUNDA → DIGIT TWO	# 
+01A7 ;	0032 ;	MA	# ( Ƨ → 2 ) LATIN CAPITAL LETTER TONE TWO → DIGIT TWO	# 
+03E8 ;	0032 ;	MA	# ( Ϩ → 2 ) COPTIC CAPITAL LETTER HORI → DIGIT TWO	# →Ƨ→
+A644 ;	0032 ;	MA	# ( Ꙅ → 2 ) CYRILLIC CAPITAL LETTER REVERSED DZE → DIGIT TWO	# →Ƨ→
+14BF ;	0032 ;	MA	# ( ᒿ → 2 ) CANADIAN SYLLABICS SAYISI M → DIGIT TWO	# 
+A6EF ;	0032 ;	MA	# ( ꛯ → 2 ) BAMUM LETTER KOGHOM → DIGIT TWO	# →Ƨ→
+
+A9CF ;	0662 ;	MA	# ( ꧏ → ‎٢‎ ) JAVANESE PANGRANGKEP → ARABIC-INDIC DIGIT TWO	# 
+06F2 ;	0662 ;	MA	# ( ۲ → ‎٢‎ ) EXTENDED ARABIC-INDIC DIGIT TWO → ARABIC-INDIC DIGIT TWO	# 
+
+0AE8 ;	0968 ;	MA	# ( ૨ → २ ) GUJARATI DIGIT TWO → DEVANAGARI DIGIT TWO	# 
+
+114D2 ;	09E8 ;	MA	# ( 𑓒 → ২ ) TIRHUTA DIGIT TWO → BENGALI DIGIT TWO	# 
+
+0CE8 ;	0C68 ;	MA	# ( ೨ → ౨ ) KANNADA DIGIT TWO → TELUGU DIGIT TWO	# 
+
+2461 ;	2781 ;	MA	#* ( ② → ➁ ) CIRCLED DIGIT TWO → DINGBAT CIRCLED SANS-SERIF DIGIT TWO	# 
+
+01BB ;	0032 0335 ;	MA	# ( ƻ → 2̵ ) LATIN LETTER TWO WITH STROKE → DIGIT TWO, COMBINING SHORT STROKE OVERLAY	# 
+
+1F103 ;	0032 002C ;	MA	#* ( 🄃 → 2, ) DIGIT TWO COMMA → DIGIT TWO, COMMA	# 
+
+2489 ;	0032 002E ;	MA	#* ( ⒉ → 2. ) DIGIT TWO FULL STOP → DIGIT TWO, FULL STOP	# 
+
+33F5 ;	0032 0032 65E5 ;	MA	#* ( ㏵ → 22日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-TWO → DIGIT TWO, DIGIT TWO, CJK UNIFIED IDEOGRAPH-65E5	# 
+
+336E ;	0032 0032 70B9 ;	MA	#* ( ㍮ → 22点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-TWO → DIGIT TWO, DIGIT TWO, CJK UNIFIED IDEOGRAPH-70B9	# 
+
+33F6 ;	0032 0033 65E5 ;	MA	#* ( ㏶ → 23日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-THREE → DIGIT TWO, DIGIT THREE, CJK UNIFIED IDEOGRAPH-65E5	# 
+
+336F ;	0032 0033 70B9 ;	MA	#* ( ㍯ → 23点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-THREE → DIGIT TWO, DIGIT THREE, CJK UNIFIED IDEOGRAPH-70B9	# 
+
+33F7 ;	0032 0034 65E5 ;	MA	#* ( ㏷ → 24日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-FOUR → DIGIT TWO, DIGIT FOUR, CJK UNIFIED IDEOGRAPH-65E5	# 
+
+3370 ;	0032 0034 70B9 ;	MA	#* ( ㍰ → 24点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-FOUR → DIGIT TWO, DIGIT FOUR, CJK UNIFIED IDEOGRAPH-70B9	# 
+
+33F8 ;	0032 0035 65E5 ;	MA	#* ( ㏸ → 25日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-FIVE → DIGIT TWO, DIGIT FIVE, CJK UNIFIED IDEOGRAPH-65E5	# 
+
+33F9 ;	0032 0036 65E5 ;	MA	#* ( ㏹ → 26日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-SIX → DIGIT TWO, DIGIT SIX, CJK UNIFIED IDEOGRAPH-65E5	# 
+
+33FA ;	0032 0037 65E5 ;	MA	#* ( ㏺ → 27日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-SEVEN → DIGIT TWO, DIGIT SEVEN, CJK UNIFIED IDEOGRAPH-65E5	# 
+
+33FB ;	0032 0038 65E5 ;	MA	#* ( ㏻ → 28日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-EIGHT → DIGIT TWO, DIGIT EIGHT, CJK UNIFIED IDEOGRAPH-65E5	# 
+
+33FC ;	0032 0039 65E5 ;	MA	#* ( ㏼ → 29日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-NINE → DIGIT TWO, DIGIT NINE, CJK UNIFIED IDEOGRAPH-65E5	# 
+
+33F4 ;	0032 006C 65E5 ;	MA	#* ( ㏴ → 2l日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY-ONE → DIGIT TWO, LATIN SMALL LETTER L, CJK UNIFIED IDEOGRAPH-65E5	# →21日→
+
+336D ;	0032 006C 70B9 ;	MA	#* ( ㍭ → 2l点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY-ONE → DIGIT TWO, LATIN SMALL LETTER L, CJK UNIFIED IDEOGRAPH-70B9	# →21点→
+
+249B ;	0032 004F 002E ;	MA	#* ( ⒛ → 2O. ) NUMBER TWENTY FULL STOP → DIGIT TWO, LATIN CAPITAL LETTER O, FULL STOP	# →20.→
+
+33F3 ;	0032 004F 65E5 ;	MA	#* ( ㏳ → 2O日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWENTY → DIGIT TWO, LATIN CAPITAL LETTER O, CJK UNIFIED IDEOGRAPH-65E5	# →20日→
+
+336C ;	0032 004F 70B9 ;	MA	#* ( ㍬ → 2O点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWENTY → DIGIT TWO, LATIN CAPITAL LETTER O, CJK UNIFIED IDEOGRAPH-70B9	# →20点→
+
+0DE9 ;	0DE8 0DCF ;	MA	# ( ෩ → ෨ා ) SINHALA LITH DIGIT THREE → SINHALA LITH DIGIT TWO, SINHALA VOWEL SIGN AELA-PILLA	# 
+
+0DEF ;	0DE8 0DD3 ;	MA	# ( ෯ → ෨ී ) SINHALA LITH DIGIT NINE → SINHALA LITH DIGIT TWO, SINHALA VOWEL SIGN DIGA IS-PILLA	# 
+
+33E1 ;	0032 65E5 ;	MA	#* ( ㏡ → 2日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWO → DIGIT TWO, CJK UNIFIED IDEOGRAPH-65E5	# 
+
+32C1 ;	0032 6708 ;	MA	#* ( ㋁ → 2月 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR FEBRUARY → DIGIT TWO, CJK UNIFIED IDEOGRAPH-6708	# 
+
+335A ;	0032 70B9 ;	MA	#* ( ㍚ → 2点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWO → DIGIT TWO, CJK UNIFIED IDEOGRAPH-70B9	# 
+
+1D206 ;	0033 ;	MA	#* ( 𝈆 → 3 ) GREEK VOCAL NOTATION SYMBOL-7 → DIGIT THREE	# 
+1D7D1 ;	0033 ;	MA	# ( 𝟑 → 3 ) MATHEMATICAL BOLD DIGIT THREE → DIGIT THREE	# 
+1D7DB ;	0033 ;	MA	# ( 𝟛 → 3 ) MATHEMATICAL DOUBLE-STRUCK DIGIT THREE → DIGIT THREE	# 
+1D7E5 ;	0033 ;	MA	# ( 𝟥 → 3 ) MATHEMATICAL SANS-SERIF DIGIT THREE → DIGIT THREE	# 
+1D7EF ;	0033 ;	MA	# ( 𝟯 → 3 ) MATHEMATICAL SANS-SERIF BOLD DIGIT THREE → DIGIT THREE	# 
+1D7F9 ;	0033 ;	MA	# ( 𝟹 → 3 ) MATHEMATICAL MONOSPACE DIGIT THREE → DIGIT THREE	# 
+A7AB ;	0033 ;	MA	# ( Ɜ → 3 ) LATIN CAPITAL LETTER REVERSED OPEN E → DIGIT THREE	# 
+021C ;	0033 ;	MA	# ( Ȝ → 3 ) LATIN CAPITAL LETTER YOGH → DIGIT THREE	# →Ʒ→
+01B7 ;	0033 ;	MA	# ( Ʒ → 3 ) LATIN CAPITAL LETTER EZH → DIGIT THREE	# 
+A76A ;	0033 ;	MA	# ( Ꝫ → 3 ) LATIN CAPITAL LETTER ET → DIGIT THREE	# 
+2CCC ;	0033 ;	MA	# ( Ⳍ → 3 ) COPTIC CAPITAL LETTER OLD COPTIC HORI → DIGIT THREE	# →Ȝ→→Ʒ→
+0417 ;	0033 ;	MA	# ( З → 3 ) CYRILLIC CAPITAL LETTER ZE → DIGIT THREE	# 
+04E0 ;	0033 ;	MA	# ( Ӡ → 3 ) CYRILLIC CAPITAL LETTER ABKHASIAN DZE → DIGIT THREE	# →Ʒ→
+118CA ;	0033 ;	MA	# ( 𑣊 → 3 ) WARANG CITI SMALL LETTER ANG → DIGIT THREE	# 
+
+06F3 ;	0663 ;	MA	# ( ۳ → ‎٣‎ ) EXTENDED ARABIC-INDIC DIGIT THREE → ARABIC-INDIC DIGIT THREE	# 
+1E8C9 ;	0663 ;	MA	#* ( ‎𞣉‎ → ‎٣‎ ) MENDE KIKAKUI DIGIT THREE → ARABIC-INDIC DIGIT THREE	# 
+
+0AE9 ;	0969 ;	MA	# ( ૩ → ३ ) GUJARATI DIGIT THREE → DEVANAGARI DIGIT THREE	# 
+
+2462 ;	2782 ;	MA	#* ( ③ → ➂ ) CIRCLED DIGIT THREE → DINGBAT CIRCLED SANS-SERIF DIGIT THREE	# 
+
+0498 ;	0033 0326 ;	MA	# ( Ҙ → 3̦ ) CYRILLIC CAPITAL LETTER ZE WITH DESCENDER → DIGIT THREE, COMBINING COMMA BELOW	# →З̧→
+
+1F104 ;	0033 002C ;	MA	#* ( 🄄 → 3, ) DIGIT THREE COMMA → DIGIT THREE, COMMA	# 
+
+248A ;	0033 002E ;	MA	#* ( ⒊ → 3. ) DIGIT THREE FULL STOP → DIGIT THREE, FULL STOP	# 
+
+33FE ;	0033 006C 65E5 ;	MA	#* ( ㏾ → 3l日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THIRTY-ONE → DIGIT THREE, LATIN SMALL LETTER L, CJK UNIFIED IDEOGRAPH-65E5	# →31日→
+
+33FD ;	0033 004F 65E5 ;	MA	#* ( ㏽ → 3O日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THIRTY → DIGIT THREE, LATIN CAPITAL LETTER O, CJK UNIFIED IDEOGRAPH-65E5	# →30日→
+
+33E2 ;	0033 65E5 ;	MA	#* ( ㏢ → 3日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THREE → DIGIT THREE, CJK UNIFIED IDEOGRAPH-65E5	# 
+
+32C2 ;	0033 6708 ;	MA	#* ( ㋂ → 3月 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR MARCH → DIGIT THREE, CJK UNIFIED IDEOGRAPH-6708	# 
+
+335B ;	0033 70B9 ;	MA	#* ( ㍛ → 3点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR THREE → DIGIT THREE, CJK UNIFIED IDEOGRAPH-70B9	# 
+
+1D7D2 ;	0034 ;	MA	# ( 𝟒 → 4 ) MATHEMATICAL BOLD DIGIT FOUR → DIGIT FOUR	# 
+1D7DC ;	0034 ;	MA	# ( 𝟜 → 4 ) MATHEMATICAL DOUBLE-STRUCK DIGIT FOUR → DIGIT FOUR	# 
+1D7E6 ;	0034 ;	MA	# ( 𝟦 → 4 ) MATHEMATICAL SANS-SERIF DIGIT FOUR → DIGIT FOUR	# 
+1D7F0 ;	0034 ;	MA	# ( 𝟰 → 4 ) MATHEMATICAL SANS-SERIF BOLD DIGIT FOUR → DIGIT FOUR	# 
+1D7FA ;	0034 ;	MA	# ( 𝟺 → 4 ) MATHEMATICAL MONOSPACE DIGIT FOUR → DIGIT FOUR	# 
+13CE ;	0034 ;	MA	# ( Ꮞ → 4 ) CHEROKEE LETTER SE → DIGIT FOUR	# 
+118AF ;	0034 ;	MA	# ( 𑢯 → 4 ) WARANG CITI CAPITAL LETTER UC → DIGIT FOUR	# 
+
+06F4 ;	0664 ;	MA	# ( ۴ → ‎٤‎ ) EXTENDED ARABIC-INDIC DIGIT FOUR → ARABIC-INDIC DIGIT FOUR	# 
+
+0AEA ;	096A ;	MA	# ( ૪ → ४ ) GUJARATI DIGIT FOUR → DEVANAGARI DIGIT FOUR	# 
+
+2463 ;	2783 ;	MA	#* ( ④ → ➃ ) CIRCLED DIGIT FOUR → DINGBAT CIRCLED SANS-SERIF DIGIT FOUR	# 
+
+1F105 ;	0034 002C ;	MA	#* ( 🄅 → 4, ) DIGIT FOUR COMMA → DIGIT FOUR, COMMA	# 
+
+248B ;	0034 002E ;	MA	#* ( ⒋ → 4. ) DIGIT FOUR FULL STOP → DIGIT FOUR, FULL STOP	# 
+
+1530 ;	0034 00B7 ;	MA	# ( ᔰ → 4· ) CANADIAN SYLLABICS WEST-CREE YWE → DIGIT FOUR, MIDDLE DOT	# →4ᐧ→
+
+33E3 ;	0034 65E5 ;	MA	#* ( ㏣ → 4日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FOUR → DIGIT FOUR, CJK UNIFIED IDEOGRAPH-65E5	# 
+
+32C3 ;	0034 6708 ;	MA	#* ( ㋃ → 4月 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR APRIL → DIGIT FOUR, CJK UNIFIED IDEOGRAPH-6708	# 
+
+335C ;	0034 70B9 ;	MA	#* ( ㍜ → 4点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FOUR → DIGIT FOUR, CJK UNIFIED IDEOGRAPH-70B9	# 
+
+1D7D3 ;	0035 ;	MA	# ( 𝟓 → 5 ) MATHEMATICAL BOLD DIGIT FIVE → DIGIT FIVE	# 
+1D7DD ;	0035 ;	MA	# ( 𝟝 → 5 ) MATHEMATICAL DOUBLE-STRUCK DIGIT FIVE → DIGIT FIVE	# 
+1D7E7 ;	0035 ;	MA	# ( 𝟧 → 5 ) MATHEMATICAL SANS-SERIF DIGIT FIVE → DIGIT FIVE	# 
+1D7F1 ;	0035 ;	MA	# ( 𝟱 → 5 ) MATHEMATICAL SANS-SERIF BOLD DIGIT FIVE → DIGIT FIVE	# 
+1D7FB ;	0035 ;	MA	# ( 𝟻 → 5 ) MATHEMATICAL MONOSPACE DIGIT FIVE → DIGIT FIVE	# 
+01BC ;	0035 ;	MA	# ( Ƽ → 5 ) LATIN CAPITAL LETTER TONE FIVE → DIGIT FIVE	# 
+118BB ;	0035 ;	MA	# ( 𑢻 → 5 ) WARANG CITI CAPITAL LETTER HORR → DIGIT FIVE	# 
+
+2464 ;	2784 ;	MA	#* ( ⑤ → ➄ ) CIRCLED DIGIT FIVE → DINGBAT CIRCLED SANS-SERIF DIGIT FIVE	# 
+
+1F106 ;	0035 002C ;	MA	#* ( 🄆 → 5, ) DIGIT FIVE COMMA → DIGIT FIVE, COMMA	# 
+
+248C ;	0035 002E ;	MA	#* ( ⒌ → 5. ) DIGIT FIVE FULL STOP → DIGIT FIVE, FULL STOP	# 
+
+33E4 ;	0035 65E5 ;	MA	#* ( ㏤ → 5日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FIVE → DIGIT FIVE, CJK UNIFIED IDEOGRAPH-65E5	# 
+
+32C4 ;	0035 6708 ;	MA	#* ( ㋄ → 5月 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR MAY → DIGIT FIVE, CJK UNIFIED IDEOGRAPH-6708	# 
+
+335D ;	0035 70B9 ;	MA	#* ( ㍝ → 5点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FIVE → DIGIT FIVE, CJK UNIFIED IDEOGRAPH-70B9	# 
+
+1D7D4 ;	0036 ;	MA	# ( 𝟔 → 6 ) MATHEMATICAL BOLD DIGIT SIX → DIGIT SIX	# 
+1D7DE ;	0036 ;	MA	# ( 𝟞 → 6 ) MATHEMATICAL DOUBLE-STRUCK DIGIT SIX → DIGIT SIX	# 
+1D7E8 ;	0036 ;	MA	# ( 𝟨 → 6 ) MATHEMATICAL SANS-SERIF DIGIT SIX → DIGIT SIX	# 
+1D7F2 ;	0036 ;	MA	# ( 𝟲 → 6 ) MATHEMATICAL SANS-SERIF BOLD DIGIT SIX → DIGIT SIX	# 
+1D7FC ;	0036 ;	MA	# ( 𝟼 → 6 ) MATHEMATICAL MONOSPACE DIGIT SIX → DIGIT SIX	# 
+2CD2 ;	0036 ;	MA	# ( Ⳓ → 6 ) COPTIC CAPITAL LETTER OLD COPTIC HEI → DIGIT SIX	# 
+0431 ;	0036 ;	MA	# ( б → 6 ) CYRILLIC SMALL LETTER BE → DIGIT SIX	# 
+13EE ;	0036 ;	MA	# ( Ꮾ → 6 ) CHEROKEE LETTER WV → DIGIT SIX	# 
+118D5 ;	0036 ;	MA	# ( 𑣕 → 6 ) WARANG CITI SMALL LETTER AT → DIGIT SIX	# 
+
+06F6 ;	0666 ;	MA	# ( ۶ → ‎٦‎ ) EXTENDED ARABIC-INDIC DIGIT SIX → ARABIC-INDIC DIGIT SIX	# 
+
+114D6 ;	09EC ;	MA	# ( 𑓖 → ৬ ) TIRHUTA DIGIT SIX → BENGALI DIGIT SIX	# 
+
+2465 ;	2785 ;	MA	#* ( ⑥ → ➅ ) CIRCLED DIGIT SIX → DINGBAT CIRCLED SANS-SERIF DIGIT SIX	# 
+
+1F107 ;	0036 002C ;	MA	#* ( 🄇 → 6, ) DIGIT SIX COMMA → DIGIT SIX, COMMA	# 
+
+248D ;	0036 002E ;	MA	#* ( ⒍ → 6. ) DIGIT SIX FULL STOP → DIGIT SIX, FULL STOP	# 
+
+33E5 ;	0036 65E5 ;	MA	#* ( ㏥ → 6日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SIX → DIGIT SIX, CJK UNIFIED IDEOGRAPH-65E5	# 
+
+32C5 ;	0036 6708 ;	MA	#* ( ㋅ → 6月 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR JUNE → DIGIT SIX, CJK UNIFIED IDEOGRAPH-6708	# 
+
+335E ;	0036 70B9 ;	MA	#* ( ㍞ → 6点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SIX → DIGIT SIX, CJK UNIFIED IDEOGRAPH-70B9	# 
+
+1D212 ;	0037 ;	MA	#* ( 𝈒 → 7 ) GREEK VOCAL NOTATION SYMBOL-19 → DIGIT SEVEN	# 
+1D7D5 ;	0037 ;	MA	# ( 𝟕 → 7 ) MATHEMATICAL BOLD DIGIT SEVEN → DIGIT SEVEN	# 
+1D7DF ;	0037 ;	MA	# ( 𝟟 → 7 ) MATHEMATICAL DOUBLE-STRUCK DIGIT SEVEN → DIGIT SEVEN	# 
+1D7E9 ;	0037 ;	MA	# ( 𝟩 → 7 ) MATHEMATICAL SANS-SERIF DIGIT SEVEN → DIGIT SEVEN	# 
+1D7F3 ;	0037 ;	MA	# ( 𝟳 → 7 ) MATHEMATICAL SANS-SERIF BOLD DIGIT SEVEN → DIGIT SEVEN	# 
+1D7FD ;	0037 ;	MA	# ( 𝟽 → 7 ) MATHEMATICAL MONOSPACE DIGIT SEVEN → DIGIT SEVEN	# 
+118C6 ;	0037 ;	MA	# ( 𑣆 → 7 ) WARANG CITI SMALL LETTER II → DIGIT SEVEN	# 
+
+2466 ;	2786 ;	MA	#* ( ⑦ → ➆ ) CIRCLED DIGIT SEVEN → DINGBAT CIRCLED SANS-SERIF DIGIT SEVEN	# 
+
+1F108 ;	0037 002C ;	MA	#* ( 🄈 → 7, ) DIGIT SEVEN COMMA → DIGIT SEVEN, COMMA	# 
+
+248E ;	0037 002E ;	MA	#* ( ⒎ → 7. ) DIGIT SEVEN FULL STOP → DIGIT SEVEN, FULL STOP	# 
+
+33E6 ;	0037 65E5 ;	MA	#* ( ㏦ → 7日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SEVEN → DIGIT SEVEN, CJK UNIFIED IDEOGRAPH-65E5	# 
+
+32C6 ;	0037 6708 ;	MA	#* ( ㋆ → 7月 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR JULY → DIGIT SEVEN, CJK UNIFIED IDEOGRAPH-6708	# 
+
+335F ;	0037 70B9 ;	MA	#* ( ㍟ → 7点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SEVEN → DIGIT SEVEN, CJK UNIFIED IDEOGRAPH-70B9	# 
+
+0B03 ;	0038 ;	MA	# ( ଃ → 8 ) ORIYA SIGN VISARGA → DIGIT EIGHT	# 
+09EA ;	0038 ;	MA	# ( ৪ → 8 ) BENGALI DIGIT FOUR → DIGIT EIGHT	# 
+0A6A ;	0038 ;	MA	# ( ੪ → 8 ) GURMUKHI DIGIT FOUR → DIGIT EIGHT	# 
+1E8CB ;	0038 ;	MA	#* ( ‎𞣋‎ → 8 ) MENDE KIKAKUI DIGIT FIVE → DIGIT EIGHT	# 
+1D7D6 ;	0038 ;	MA	# ( 𝟖 → 8 ) MATHEMATICAL BOLD DIGIT EIGHT → DIGIT EIGHT	# 
+1D7E0 ;	0038 ;	MA	# ( 𝟠 → 8 ) MATHEMATICAL DOUBLE-STRUCK DIGIT EIGHT → DIGIT EIGHT	# 
+1D7EA ;	0038 ;	MA	# ( 𝟪 → 8 ) MATHEMATICAL SANS-SERIF DIGIT EIGHT → DIGIT EIGHT	# 
+1D7F4 ;	0038 ;	MA	# ( 𝟴 → 8 ) MATHEMATICAL SANS-SERIF BOLD DIGIT EIGHT → DIGIT EIGHT	# 
+1D7FE ;	0038 ;	MA	# ( 𝟾 → 8 ) MATHEMATICAL MONOSPACE DIGIT EIGHT → DIGIT EIGHT	# 
+0223 ;	0038 ;	MA	# ( ȣ → 8 ) LATIN SMALL LETTER OU → DIGIT EIGHT	# 
+0222 ;	0038 ;	MA	# ( Ȣ → 8 ) LATIN CAPITAL LETTER OU → DIGIT EIGHT	# 
+1031A ;	0038 ;	MA	# ( 𐌚 → 8 ) OLD ITALIC LETTER EF → DIGIT EIGHT	# 
+
+0AEE ;	096E ;	MA	# ( ૮ → ८ ) GUJARATI DIGIT EIGHT → DEVANAGARI DIGIT EIGHT	# 
+
+2467 ;	2787 ;	MA	#* ( ⑧ → ➇ ) CIRCLED DIGIT EIGHT → DINGBAT CIRCLED SANS-SERIF DIGIT EIGHT	# 
+
+1F109 ;	0038 002C ;	MA	#* ( 🄉 → 8, ) DIGIT EIGHT COMMA → DIGIT EIGHT, COMMA	# 
+
+248F ;	0038 002E ;	MA	#* ( ⒏ → 8. ) DIGIT EIGHT FULL STOP → DIGIT EIGHT, FULL STOP	# 
+
+33E7 ;	0038 65E5 ;	MA	#* ( ㏧ → 8日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY EIGHT → DIGIT EIGHT, CJK UNIFIED IDEOGRAPH-65E5	# 
+
+32C7 ;	0038 6708 ;	MA	#* ( ㋇ → 8月 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR AUGUST → DIGIT EIGHT, CJK UNIFIED IDEOGRAPH-6708	# 
+
+3360 ;	0038 70B9 ;	MA	#* ( ㍠ → 8点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR EIGHT → DIGIT EIGHT, CJK UNIFIED IDEOGRAPH-70B9	# 
+
+0A67 ;	0039 ;	MA	# ( ੧ → 9 ) GURMUKHI DIGIT ONE → DIGIT NINE	# 
+0B68 ;	0039 ;	MA	# ( ୨ → 9 ) ORIYA DIGIT TWO → DIGIT NINE	# 
+09ED ;	0039 ;	MA	# ( ৭ → 9 ) BENGALI DIGIT SEVEN → DIGIT NINE	# 
+0D6D ;	0039 ;	MA	# ( ൭ → 9 ) MALAYALAM DIGIT SEVEN → DIGIT NINE	# 
+1D7D7 ;	0039 ;	MA	# ( 𝟗 → 9 ) MATHEMATICAL BOLD DIGIT NINE → DIGIT NINE	# 
+1D7E1 ;	0039 ;	MA	# ( 𝟡 → 9 ) MATHEMATICAL DOUBLE-STRUCK DIGIT NINE → DIGIT NINE	# 
+1D7EB ;	0039 ;	MA	# ( 𝟫 → 9 ) MATHEMATICAL SANS-SERIF DIGIT NINE → DIGIT NINE	# 
+1D7F5 ;	0039 ;	MA	# ( 𝟵 → 9 ) MATHEMATICAL SANS-SERIF BOLD DIGIT NINE → DIGIT NINE	# 
+1D7FF ;	0039 ;	MA	# ( 𝟿 → 9 ) MATHEMATICAL MONOSPACE DIGIT NINE → DIGIT NINE	# 
+A76E ;	0039 ;	MA	# ( Ꝯ → 9 ) LATIN CAPITAL LETTER CON → DIGIT NINE	# 
+2CCA ;	0039 ;	MA	# ( Ⳋ → 9 ) COPTIC CAPITAL LETTER DIALECT-P HORI → DIGIT NINE	# 
+118CC ;	0039 ;	MA	# ( 𑣌 → 9 ) WARANG CITI SMALL LETTER KO → DIGIT NINE	# 
+118AC ;	0039 ;	MA	# ( 𑢬 → 9 ) WARANG CITI CAPITAL LETTER KO → DIGIT NINE	# 
+118D6 ;	0039 ;	MA	# ( 𑣖 → 9 ) WARANG CITI SMALL LETTER AM → DIGIT NINE	# 
+
+0967 ;	0669 ;	MA	# ( १ → ‎٩‎ ) DEVANAGARI DIGIT ONE → ARABIC-INDIC DIGIT NINE	# 
+118E4 ;	0669 ;	MA	# ( 𑣤 → ‎٩‎ ) WARANG CITI DIGIT FOUR → ARABIC-INDIC DIGIT NINE	# 
+06F9 ;	0669 ;	MA	# ( ۹ → ‎٩‎ ) EXTENDED ARABIC-INDIC DIGIT NINE → ARABIC-INDIC DIGIT NINE	# 
+
+0CEF ;	0C6F ;	MA	# ( ೯ → ౯ ) KANNADA DIGIT NINE → TELUGU DIGIT NINE	# 
+
+2468 ;	2788 ;	MA	#* ( ⑨ → ➈ ) CIRCLED DIGIT NINE → DINGBAT CIRCLED SANS-SERIF DIGIT NINE	# 
+
+1F10A ;	0039 002C ;	MA	#* ( 🄊 → 9, ) DIGIT NINE COMMA → DIGIT NINE, COMMA	# 
+
+2490 ;	0039 002E ;	MA	#* ( ⒐ → 9. ) DIGIT NINE FULL STOP → DIGIT NINE, FULL STOP	# 
+
+33E8 ;	0039 65E5 ;	MA	#* ( ㏨ → 9日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY NINE → DIGIT NINE, CJK UNIFIED IDEOGRAPH-65E5	# 
+
+32C8 ;	0039 6708 ;	MA	#* ( ㋈ → 9月 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR SEPTEMBER → DIGIT NINE, CJK UNIFIED IDEOGRAPH-6708	# 
+
+3361 ;	0039 70B9 ;	MA	#* ( ㍡ → 9点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR NINE → DIGIT NINE, CJK UNIFIED IDEOGRAPH-70B9	# 
+
+237A ;	0061 ;	MA	#* ( ⍺ → a ) APL FUNCTIONAL SYMBOL ALPHA → LATIN SMALL LETTER A	# →α→
+FF41 ;	0061 ;	MA	# ( a → a ) FULLWIDTH LATIN SMALL LETTER A → LATIN SMALL LETTER A	# →а→
+1D41A ;	0061 ;	MA	# ( 𝐚 → a ) MATHEMATICAL BOLD SMALL A → LATIN SMALL LETTER A	# 
+1D44E ;	0061 ;	MA	# ( 𝑎 → a ) MATHEMATICAL ITALIC SMALL A → LATIN SMALL LETTER A	# 
+1D482 ;	0061 ;	MA	# ( 𝒂 → a ) MATHEMATICAL BOLD ITALIC SMALL A → LATIN SMALL LETTER A	# 
+1D4B6 ;	0061 ;	MA	# ( 𝒶 → a ) MATHEMATICAL SCRIPT SMALL A → LATIN SMALL LETTER A	# 
+1D4EA ;	0061 ;	MA	# ( 𝓪 → a ) MATHEMATICAL BOLD SCRIPT SMALL A → LATIN SMALL LETTER A	# 
+1D51E ;	0061 ;	MA	# ( 𝔞 → a ) MATHEMATICAL FRAKTUR SMALL A → LATIN SMALL LETTER A	# 
+1D552 ;	0061 ;	MA	# ( 𝕒 → a ) MATHEMATICAL DOUBLE-STRUCK SMALL A → LATIN SMALL LETTER A	# 
+1D586 ;	0061 ;	MA	# ( 𝖆 → a ) MATHEMATICAL BOLD FRAKTUR SMALL A → LATIN SMALL LETTER A	# 
+1D5BA ;	0061 ;	MA	# ( 𝖺 → a ) MATHEMATICAL SANS-SERIF SMALL A → LATIN SMALL LETTER A	# 
+1D5EE ;	0061 ;	MA	# ( 𝗮 → a ) MATHEMATICAL SANS-SERIF BOLD SMALL A → LATIN SMALL LETTER A	# 
+1D622 ;	0061 ;	MA	# ( 𝘢 → a ) MATHEMATICAL SANS-SERIF ITALIC SMALL A → LATIN SMALL LETTER A	# 
+1D656 ;	0061 ;	MA	# ( 𝙖 → a ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL A → LATIN SMALL LETTER A	# 
+1D68A ;	0061 ;	MA	# ( 𝚊 → a ) MATHEMATICAL MONOSPACE SMALL A → LATIN SMALL LETTER A	# 
+0251 ;	0061 ;	MA	# ( ɑ → a ) LATIN SMALL LETTER ALPHA → LATIN SMALL LETTER A	# 
+03B1 ;	0061 ;	MA	# ( α → a ) GREEK SMALL LETTER ALPHA → LATIN SMALL LETTER A	# 
+1D6C2 ;	0061 ;	MA	# ( 𝛂 → a ) MATHEMATICAL BOLD SMALL ALPHA → LATIN SMALL LETTER A	# →α→
+1D6FC ;	0061 ;	MA	# ( 𝛼 → a ) MATHEMATICAL ITALIC SMALL ALPHA → LATIN SMALL LETTER A	# →α→
+1D736 ;	0061 ;	MA	# ( 𝜶 → a ) MATHEMATICAL BOLD ITALIC SMALL ALPHA → LATIN SMALL LETTER A	# →α→
+1D770 ;	0061 ;	MA	# ( 𝝰 → a ) MATHEMATICAL SANS-SERIF BOLD SMALL ALPHA → LATIN SMALL LETTER A	# →α→
+1D7AA ;	0061 ;	MA	# ( 𝞪 → a ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ALPHA → LATIN SMALL LETTER A	# →α→
+0430 ;	0061 ;	MA	# ( а → a ) CYRILLIC SMALL LETTER A → LATIN SMALL LETTER A	# 
+
+FF21 ;	0041 ;	MA	# ( A → A ) FULLWIDTH LATIN CAPITAL LETTER A → LATIN CAPITAL LETTER A	# →А→
+1D400 ;	0041 ;	MA	# ( 𝐀 → A ) MATHEMATICAL BOLD CAPITAL A → LATIN CAPITAL LETTER A	# 
+1D434 ;	0041 ;	MA	# ( 𝐴 → A ) MATHEMATICAL ITALIC CAPITAL A → LATIN CAPITAL LETTER A	# 
+1D468 ;	0041 ;	MA	# ( 𝑨 → A ) MATHEMATICAL BOLD ITALIC CAPITAL A → LATIN CAPITAL LETTER A	# 
+1D49C ;	0041 ;	MA	# ( 𝒜 → A ) MATHEMATICAL SCRIPT CAPITAL A → LATIN CAPITAL LETTER A	# 
+1D4D0 ;	0041 ;	MA	# ( 𝓐 → A ) MATHEMATICAL BOLD SCRIPT CAPITAL A → LATIN CAPITAL LETTER A	# 
+1D504 ;	0041 ;	MA	# ( 𝔄 → A ) MATHEMATICAL FRAKTUR CAPITAL A → LATIN CAPITAL LETTER A	# 
+1D538 ;	0041 ;	MA	# ( 𝔸 → A ) MATHEMATICAL DOUBLE-STRUCK CAPITAL A → LATIN CAPITAL LETTER A	# 
+1D56C ;	0041 ;	MA	# ( 𝕬 → A ) MATHEMATICAL BOLD FRAKTUR CAPITAL A → LATIN CAPITAL LETTER A	# 
+1D5A0 ;	0041 ;	MA	# ( 𝖠 → A ) MATHEMATICAL SANS-SERIF CAPITAL A → LATIN CAPITAL LETTER A	# 
+1D5D4 ;	0041 ;	MA	# ( 𝗔 → A ) MATHEMATICAL SANS-SERIF BOLD CAPITAL A → LATIN CAPITAL LETTER A	# 
+1D608 ;	0041 ;	MA	# ( 𝘈 → A ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL A → LATIN CAPITAL LETTER A	# 
+1D63C ;	0041 ;	MA	# ( 𝘼 → A ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL A → LATIN CAPITAL LETTER A	# 
+1D670 ;	0041 ;	MA	# ( 𝙰 → A ) MATHEMATICAL MONOSPACE CAPITAL A → LATIN CAPITAL LETTER A	# 
+1D00 ;	0041 ;	MA	# ( ᴀ → A ) LATIN LETTER SMALL CAPITAL A → LATIN CAPITAL LETTER A	# 
+0391 ;	0041 ;	MA	# ( Α → A ) GREEK CAPITAL LETTER ALPHA → LATIN CAPITAL LETTER A	# 
+1D6A8 ;	0041 ;	MA	# ( 𝚨 → A ) MATHEMATICAL BOLD CAPITAL ALPHA → LATIN CAPITAL LETTER A	# →𝐀→
+1D6E2 ;	0041 ;	MA	# ( 𝛢 → A ) MATHEMATICAL ITALIC CAPITAL ALPHA → LATIN CAPITAL LETTER A	# →Α→
+1D71C ;	0041 ;	MA	# ( 𝜜 → A ) MATHEMATICAL BOLD ITALIC CAPITAL ALPHA → LATIN CAPITAL LETTER A	# →Α→
+1D756 ;	0041 ;	MA	# ( 𝝖 → A ) MATHEMATICAL SANS-SERIF BOLD CAPITAL ALPHA → LATIN CAPITAL LETTER A	# →Α→
+1D790 ;	0041 ;	MA	# ( 𝞐 → A ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ALPHA → LATIN CAPITAL LETTER A	# →Α→
+0410 ;	0041 ;	MA	# ( А → A ) CYRILLIC CAPITAL LETTER A → LATIN CAPITAL LETTER A	# 
+13AA ;	0041 ;	MA	# ( Ꭺ → A ) CHEROKEE LETTER GO → LATIN CAPITAL LETTER A	# 
+15C5 ;	0041 ;	MA	# ( ᗅ → A ) CANADIAN SYLLABICS CARRIER GHO → LATIN CAPITAL LETTER A	# 
+A4EE ;	0041 ;	MA	# ( ꓮ → A ) LISU LETTER A → LATIN CAPITAL LETTER A	# 
+102A0 ;	0041 ;	MA	# ( 𐊠 → A ) CARIAN LETTER A → LATIN CAPITAL LETTER A	# 
+
+2376 ;	0061 0332 ;	MA	#* ( ⍶ → a̲ ) APL FUNCTIONAL SYMBOL ALPHA UNDERBAR → LATIN SMALL LETTER A, COMBINING LOW LINE	# →α̲→→ɑ̲→
+
+01CE ;	0103 ;	MA	# ( ǎ → ă ) LATIN SMALL LETTER A WITH CARON → LATIN SMALL LETTER A WITH BREVE	# 
+
+01CD ;	0102 ;	MA	# ( Ǎ → Ă ) LATIN CAPITAL LETTER A WITH CARON → LATIN CAPITAL LETTER A WITH BREVE	# 
+
+0227 ;	00E5 ;	MA	# ( ȧ → å ) LATIN SMALL LETTER A WITH DOT ABOVE → LATIN SMALL LETTER A WITH RING ABOVE	# 
+
+0226 ;	00C5 ;	MA	# ( Ȧ → Å ) LATIN CAPITAL LETTER A WITH DOT ABOVE → LATIN CAPITAL LETTER A WITH RING ABOVE	# 
+
+1E9A ;	1EA3 ;	MA	# ( ẚ → ả ) LATIN SMALL LETTER A WITH RIGHT HALF RING → LATIN SMALL LETTER A WITH HOOK ABOVE	# 
+
+2100 ;	0061 002F 0063 ;	MA	#* ( ℀ → a/c ) ACCOUNT OF → LATIN SMALL LETTER A, SOLIDUS, LATIN SMALL LETTER C	# 
+
+2101 ;	0061 002F 0073 ;	MA	#* ( ℁ → a/s ) ADDRESSED TO THE SUBJECT → LATIN SMALL LETTER A, SOLIDUS, LATIN SMALL LETTER S	# 
+
+A733 ;	0061 0061 ;	MA	# ( ꜳ → aa ) LATIN SMALL LETTER AA → LATIN SMALL LETTER A, LATIN SMALL LETTER A	# 
+
+A732 ;	0041 0041 ;	MA	# ( Ꜳ → AA ) LATIN CAPITAL LETTER AA → LATIN CAPITAL LETTER A, LATIN CAPITAL LETTER A	# 
+
+00E6 ;	0061 0065 ;	MA	# ( æ → ae ) LATIN SMALL LETTER AE → LATIN SMALL LETTER A, LATIN SMALL LETTER E	# 
+04D5 ;	0061 0065 ;	MA	# ( ӕ → ae ) CYRILLIC SMALL LIGATURE A IE → LATIN SMALL LETTER A, LATIN SMALL LETTER E	# →ае→
+
+00C6 ;	0041 0045 ;	MA	# ( Æ → AE ) LATIN CAPITAL LETTER AE → LATIN CAPITAL LETTER A, LATIN CAPITAL LETTER E	# 
+04D4 ;	0041 0045 ;	MA	# ( Ӕ → AE ) CYRILLIC CAPITAL LIGATURE A IE → LATIN CAPITAL LETTER A, LATIN CAPITAL LETTER E	# →Æ→
+
+A735 ;	0061 006F ;	MA	# ( ꜵ → ao ) LATIN SMALL LETTER AO → LATIN SMALL LETTER A, LATIN SMALL LETTER O	# 
+
+A734 ;	0041 004F ;	MA	# ( Ꜵ → AO ) LATIN CAPITAL LETTER AO → LATIN CAPITAL LETTER A, LATIN CAPITAL LETTER O	# 
+
+1F707 ;	0041 0052 ;	MA	#* ( 🜇 → AR ) ALCHEMICAL SYMBOL FOR AQUA REGIA-2 → LATIN CAPITAL LETTER A, LATIN CAPITAL LETTER R	# 
+
+A737 ;	0061 0075 ;	MA	# ( ꜷ → au ) LATIN SMALL LETTER AU → LATIN SMALL LETTER A, LATIN SMALL LETTER U	# 
+
+A736 ;	0041 0055 ;	MA	# ( Ꜷ → AU ) LATIN CAPITAL LETTER AU → LATIN CAPITAL LETTER A, LATIN CAPITAL LETTER U	# 
+
+A739 ;	0061 0076 ;	MA	# ( ꜹ → av ) LATIN SMALL LETTER AV → LATIN SMALL LETTER A, LATIN SMALL LETTER V	# 
+A73B ;	0061 0076 ;	MA	# ( ꜻ → av ) LATIN SMALL LETTER AV WITH HORIZONTAL BAR → LATIN SMALL LETTER A, LATIN SMALL LETTER V	# 
+
+A738 ;	0041 0056 ;	MA	# ( Ꜹ → AV ) LATIN CAPITAL LETTER AV → LATIN CAPITAL LETTER A, LATIN CAPITAL LETTER V	# 
+A73A ;	0041 0056 ;	MA	# ( Ꜻ → AV ) LATIN CAPITAL LETTER AV WITH HORIZONTAL BAR → LATIN CAPITAL LETTER A, LATIN CAPITAL LETTER V	# 
+
+A73D ;	0061 0079 ;	MA	# ( ꜽ → ay ) LATIN SMALL LETTER AY → LATIN SMALL LETTER A, LATIN SMALL LETTER Y	# 
+
+A73C ;	0041 0059 ;	MA	# ( Ꜽ → AY ) LATIN CAPITAL LETTER AY → LATIN CAPITAL LETTER A, LATIN CAPITAL LETTER Y	# 
+
+2200 ;	2C6F ;	MA	#* ( ∀ → Ɐ ) FOR ALL → LATIN CAPITAL LETTER TURNED A	# 
+1D217 ;	2C6F ;	MA	#* ( 𝈗 → Ɐ ) GREEK VOCAL NOTATION SYMBOL-24 → LATIN CAPITAL LETTER TURNED A	# 
+15C4 ;	2C6F ;	MA	# ( ᗄ → Ɐ ) CANADIAN SYLLABICS CARRIER GHU → LATIN CAPITAL LETTER TURNED A	# →∀→
+A4EF ;	2C6F ;	MA	# ( ꓯ → Ɐ ) LISU LETTER AE → LATIN CAPITAL LETTER TURNED A	# 
+
+1041F ;	2C70 ;	MA	# ( 𐐟 → Ɒ ) DESERET CAPITAL LETTER ESH → LATIN CAPITAL LETTER TURNED ALPHA	# 
+
+1D41B ;	0062 ;	MA	# ( 𝐛 → b ) MATHEMATICAL BOLD SMALL B → LATIN SMALL LETTER B	# 
+1D44F ;	0062 ;	MA	# ( 𝑏 → b ) MATHEMATICAL ITALIC SMALL B → LATIN SMALL LETTER B	# 
+1D483 ;	0062 ;	MA	# ( 𝒃 → b ) MATHEMATICAL BOLD ITALIC SMALL B → LATIN SMALL LETTER B	# 
+1D4B7 ;	0062 ;	MA	# ( 𝒷 → b ) MATHEMATICAL SCRIPT SMALL B → LATIN SMALL LETTER B	# 
+1D4EB ;	0062 ;	MA	# ( 𝓫 → b ) MATHEMATICAL BOLD SCRIPT SMALL B → LATIN SMALL LETTER B	# 
+1D51F ;	0062 ;	MA	# ( 𝔟 → b ) MATHEMATICAL FRAKTUR SMALL B → LATIN SMALL LETTER B	# 
+1D553 ;	0062 ;	MA	# ( 𝕓 → b ) MATHEMATICAL DOUBLE-STRUCK SMALL B → LATIN SMALL LETTER B	# 
+1D587 ;	0062 ;	MA	# ( 𝖇 → b ) MATHEMATICAL BOLD FRAKTUR SMALL B → LATIN SMALL LETTER B	# 
+1D5BB ;	0062 ;	MA	# ( 𝖻 → b ) MATHEMATICAL SANS-SERIF SMALL B → LATIN SMALL LETTER B	# 
+1D5EF ;	0062 ;	MA	# ( 𝗯 → b ) MATHEMATICAL SANS-SERIF BOLD SMALL B → LATIN SMALL LETTER B	# 
+1D623 ;	0062 ;	MA	# ( 𝘣 → b ) MATHEMATICAL SANS-SERIF ITALIC SMALL B → LATIN SMALL LETTER B	# 
+1D657 ;	0062 ;	MA	# ( 𝙗 → b ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL B → LATIN SMALL LETTER B	# 
+1D68B ;	0062 ;	MA	# ( 𝚋 → b ) MATHEMATICAL MONOSPACE SMALL B → LATIN SMALL LETTER B	# 
+0184 ;	0062 ;	MA	# ( Ƅ → b ) LATIN CAPITAL LETTER TONE SIX → LATIN SMALL LETTER B	# 
+042C ;	0062 ;	MA	# ( Ь → b ) CYRILLIC CAPITAL LETTER SOFT SIGN → LATIN SMALL LETTER B	# →Ƅ→
+13CF ;	0062 ;	MA	# ( Ꮟ → b ) CHEROKEE LETTER SI → LATIN SMALL LETTER B	# 
+15AF ;	0062 ;	MA	# ( ᖯ → b ) CANADIAN SYLLABICS AIVILIK B → LATIN SMALL LETTER B	# 
+
+FF22 ;	0042 ;	MA	# ( B → B ) FULLWIDTH LATIN CAPITAL LETTER B → LATIN CAPITAL LETTER B	# →Β→
+212C ;	0042 ;	MA	# ( ℬ → B ) SCRIPT CAPITAL B → LATIN CAPITAL LETTER B	# 
+1D401 ;	0042 ;	MA	# ( 𝐁 → B ) MATHEMATICAL BOLD CAPITAL B → LATIN CAPITAL LETTER B	# 
+1D435 ;	0042 ;	MA	# ( 𝐵 → B ) MATHEMATICAL ITALIC CAPITAL B → LATIN CAPITAL LETTER B	# 
+1D469 ;	0042 ;	MA	# ( 𝑩 → B ) MATHEMATICAL BOLD ITALIC CAPITAL B → LATIN CAPITAL LETTER B	# 
+1D4D1 ;	0042 ;	MA	# ( 𝓑 → B ) MATHEMATICAL BOLD SCRIPT CAPITAL B → LATIN CAPITAL LETTER B	# 
+1D505 ;	0042 ;	MA	# ( 𝔅 → B ) MATHEMATICAL FRAKTUR CAPITAL B → LATIN CAPITAL LETTER B	# 
+1D539 ;	0042 ;	MA	# ( 𝔹 → B ) MATHEMATICAL DOUBLE-STRUCK CAPITAL B → LATIN CAPITAL LETTER B	# 
+1D56D ;	0042 ;	MA	# ( 𝕭 → B ) MATHEMATICAL BOLD FRAKTUR CAPITAL B → LATIN CAPITAL LETTER B	# 
+1D5A1 ;	0042 ;	MA	# ( 𝖡 → B ) MATHEMATICAL SANS-SERIF CAPITAL B → LATIN CAPITAL LETTER B	# 
+1D5D5 ;	0042 ;	MA	# ( 𝗕 → B ) MATHEMATICAL SANS-SERIF BOLD CAPITAL B → LATIN CAPITAL LETTER B	# 
+1D609 ;	0042 ;	MA	# ( 𝘉 → B ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL B → LATIN CAPITAL LETTER B	# 
+1D63D ;	0042 ;	MA	# ( 𝘽 → B ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL B → LATIN CAPITAL LETTER B	# 
+1D671 ;	0042 ;	MA	# ( 𝙱 → B ) MATHEMATICAL MONOSPACE CAPITAL B → LATIN CAPITAL LETTER B	# 
+A7B4 ;	0042 ;	MA	# ( Ꞵ → B ) LATIN CAPITAL LETTER BETA → LATIN CAPITAL LETTER B	# 
+0392 ;	0042 ;	MA	# ( Β → B ) GREEK CAPITAL LETTER BETA → LATIN CAPITAL LETTER B	# 
+1D6A9 ;	0042 ;	MA	# ( 𝚩 → B ) MATHEMATICAL BOLD CAPITAL BETA → LATIN CAPITAL LETTER B	# →Β→
+1D6E3 ;	0042 ;	MA	# ( 𝛣 → B ) MATHEMATICAL ITALIC CAPITAL BETA → LATIN CAPITAL LETTER B	# →Β→
+1D71D ;	0042 ;	MA	# ( 𝜝 → B ) MATHEMATICAL BOLD ITALIC CAPITAL BETA → LATIN CAPITAL LETTER B	# →Β→
+1D757 ;	0042 ;	MA	# ( 𝝗 → B ) MATHEMATICAL SANS-SERIF BOLD CAPITAL BETA → LATIN CAPITAL LETTER B	# →Β→
+1D791 ;	0042 ;	MA	# ( 𝞑 → B ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL BETA → LATIN CAPITAL LETTER B	# →Β→
+0412 ;	0042 ;	MA	# ( В → B ) CYRILLIC CAPITAL LETTER VE → LATIN CAPITAL LETTER B	# 
+13F4 ;	0042 ;	MA	# ( Ᏼ → B ) CHEROKEE LETTER YV → LATIN CAPITAL LETTER B	# 
+15F7 ;	0042 ;	MA	# ( ᗷ → B ) CANADIAN SYLLABICS CARRIER KHE → LATIN CAPITAL LETTER B	# 
+A4D0 ;	0042 ;	MA	# ( ꓐ → B ) LISU LETTER BA → LATIN CAPITAL LETTER B	# 
+10282 ;	0042 ;	MA	# ( 𐊂 → B ) LYCIAN LETTER B → LATIN CAPITAL LETTER B	# 
+102A1 ;	0042 ;	MA	# ( 𐊡 → B ) CARIAN LETTER P2 → LATIN CAPITAL LETTER B	# 
+10301 ;	0042 ;	MA	# ( 𐌁 → B ) OLD ITALIC LETTER BE → LATIN CAPITAL LETTER B	# 
+
+0253 ;	0062 0314 ;	MA	# ( ɓ → b̔ ) LATIN SMALL LETTER B WITH HOOK → LATIN SMALL LETTER B, COMBINING REVERSED COMMA ABOVE	# 
+
+0183 ;	0062 0304 ;	MA	# ( ƃ → b̄ ) LATIN SMALL LETTER B WITH TOPBAR → LATIN SMALL LETTER B, COMBINING MACRON	# 
+0182 ;	0062 0304 ;	MA	# ( Ƃ → b̄ ) LATIN CAPITAL LETTER B WITH TOPBAR → LATIN SMALL LETTER B, COMBINING MACRON	# 
+0411 ;	0062 0304 ;	MA	# ( Б → b̄ ) CYRILLIC CAPITAL LETTER BE → LATIN SMALL LETTER B, COMBINING MACRON	# →Ƃ→
+
+0180 ;	0062 0335 ;	MA	# ( ƀ → b̵ ) LATIN SMALL LETTER B WITH STROKE → LATIN SMALL LETTER B, COMBINING SHORT STROKE OVERLAY	# 
+048D ;	0062 0335 ;	MA	# ( ҍ → b̵ ) CYRILLIC SMALL LETTER SEMISOFT SIGN → LATIN SMALL LETTER B, COMBINING SHORT STROKE OVERLAY	# →ѣ→→Ь̵→
+048C ;	0062 0335 ;	MA	# ( Ҍ → b̵ ) CYRILLIC CAPITAL LETTER SEMISOFT SIGN → LATIN SMALL LETTER B, COMBINING SHORT STROKE OVERLAY	# →Ѣ→→Ь̵→
+0463 ;	0062 0335 ;	MA	# ( ѣ → b̵ ) CYRILLIC SMALL LETTER YAT → LATIN SMALL LETTER B, COMBINING SHORT STROKE OVERLAY	# →Ь̵→
+0462 ;	0062 0335 ;	MA	# ( Ѣ → b̵ ) CYRILLIC CAPITAL LETTER YAT → LATIN SMALL LETTER B, COMBINING SHORT STROKE OVERLAY	# →Ь̵→
+
+042B ;	0062 006C ;	MA	# ( Ы → bl ) CYRILLIC CAPITAL LETTER YERU → LATIN SMALL LETTER B, LATIN SMALL LETTER L	# →ЬІ→→Ь1→
+
+0432 ;	0299 ;	MA	# ( в → ʙ ) CYRILLIC SMALL LETTER VE → LATIN LETTER SMALL CAPITAL B	# 
+
+FF43 ;	0063 ;	MA	# ( c → c ) FULLWIDTH LATIN SMALL LETTER C → LATIN SMALL LETTER C	# →с→
+217D ;	0063 ;	MA	# ( ⅽ → c ) SMALL ROMAN NUMERAL ONE HUNDRED → LATIN SMALL LETTER C	# 
+1D41C ;	0063 ;	MA	# ( 𝐜 → c ) MATHEMATICAL BOLD SMALL C → LATIN SMALL LETTER C	# 
+1D450 ;	0063 ;	MA	# ( 𝑐 → c ) MATHEMATICAL ITALIC SMALL C → LATIN SMALL LETTER C	# 
+1D484 ;	0063 ;	MA	# ( 𝒄 → c ) MATHEMATICAL BOLD ITALIC SMALL C → LATIN SMALL LETTER C	# 
+1D4B8 ;	0063 ;	MA	# ( 𝒸 → c ) MATHEMATICAL SCRIPT SMALL C → LATIN SMALL LETTER C	# 
+1D4EC ;	0063 ;	MA	# ( 𝓬 → c ) MATHEMATICAL BOLD SCRIPT SMALL C → LATIN SMALL LETTER C	# 
+1D520 ;	0063 ;	MA	# ( 𝔠 → c ) MATHEMATICAL FRAKTUR SMALL C → LATIN SMALL LETTER C	# 
+1D554 ;	0063 ;	MA	# ( 𝕔 → c ) MATHEMATICAL DOUBLE-STRUCK SMALL C → LATIN SMALL LETTER C	# 
+1D588 ;	0063 ;	MA	# ( 𝖈 → c ) MATHEMATICAL BOLD FRAKTUR SMALL C → LATIN SMALL LETTER C	# 
+1D5BC ;	0063 ;	MA	# ( 𝖼 → c ) MATHEMATICAL SANS-SERIF SMALL C → LATIN SMALL LETTER C	# 
+1D5F0 ;	0063 ;	MA	# ( 𝗰 → c ) MATHEMATICAL SANS-SERIF BOLD SMALL C → LATIN SMALL LETTER C	# 
+1D624 ;	0063 ;	MA	# ( 𝘤 → c ) MATHEMATICAL SANS-SERIF ITALIC SMALL C → LATIN SMALL LETTER C	# 
+1D658 ;	0063 ;	MA	# ( 𝙘 → c ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL C → LATIN SMALL LETTER C	# 
+1D68C ;	0063 ;	MA	# ( 𝚌 → c ) MATHEMATICAL MONOSPACE SMALL C → LATIN SMALL LETTER C	# 
+1D04 ;	0063 ;	MA	# ( ᴄ → c ) LATIN LETTER SMALL CAPITAL C → LATIN SMALL LETTER C	# 
+03F2 ;	0063 ;	MA	# ( ϲ → c ) GREEK LUNATE SIGMA SYMBOL → LATIN SMALL LETTER C	# 
+2CA5 ;	0063 ;	MA	# ( ⲥ → c ) COPTIC SMALL LETTER SIMA → LATIN SMALL LETTER C	# →ϲ→
+0441 ;	0063 ;	MA	# ( с → c ) CYRILLIC SMALL LETTER ES → LATIN SMALL LETTER C	# 
+1043D ;	0063 ;	MA	# ( 𐐽 → c ) DESERET SMALL LETTER CHEE → LATIN SMALL LETTER C	# 
+
+1F74C ;	0043 ;	MA	#* ( 🝌 → C ) ALCHEMICAL SYMBOL FOR CALX → LATIN CAPITAL LETTER C	# 
+118F2 ;	0043 ;	MA	#* ( 𑣲 → C ) WARANG CITI NUMBER NINETY → LATIN CAPITAL LETTER C	# 
+118E9 ;	0043 ;	MA	# ( 𑣩 → C ) WARANG CITI DIGIT NINE → LATIN CAPITAL LETTER C	# 
+FF23 ;	0043 ;	MA	# ( C → C ) FULLWIDTH LATIN CAPITAL LETTER C → LATIN CAPITAL LETTER C	# →С→
+216D ;	0043 ;	MA	# ( Ⅽ → C ) ROMAN NUMERAL ONE HUNDRED → LATIN CAPITAL LETTER C	# 
+2102 ;	0043 ;	MA	# ( ℂ → C ) DOUBLE-STRUCK CAPITAL C → LATIN CAPITAL LETTER C	# 
+212D ;	0043 ;	MA	# ( ℭ → C ) BLACK-LETTER CAPITAL C → LATIN CAPITAL LETTER C	# 
+1D402 ;	0043 ;	MA	# ( 𝐂 → C ) MATHEMATICAL BOLD CAPITAL C → LATIN CAPITAL LETTER C	# 
+1D436 ;	0043 ;	MA	# ( 𝐶 → C ) MATHEMATICAL ITALIC CAPITAL C → LATIN CAPITAL LETTER C	# 
+1D46A ;	0043 ;	MA	# ( 𝑪 → C ) MATHEMATICAL BOLD ITALIC CAPITAL C → LATIN CAPITAL LETTER C	# 
+1D49E ;	0043 ;	MA	# ( 𝒞 → C ) MATHEMATICAL SCRIPT CAPITAL C → LATIN CAPITAL LETTER C	# 
+1D4D2 ;	0043 ;	MA	# ( 𝓒 → C ) MATHEMATICAL BOLD SCRIPT CAPITAL C → LATIN CAPITAL LETTER C	# 
+1D56E ;	0043 ;	MA	# ( 𝕮 → C ) MATHEMATICAL BOLD FRAKTUR CAPITAL C → LATIN CAPITAL LETTER C	# 
+1D5A2 ;	0043 ;	MA	# ( 𝖢 → C ) MATHEMATICAL SANS-SERIF CAPITAL C → LATIN CAPITAL LETTER C	# 
+1D5D6 ;	0043 ;	MA	# ( 𝗖 → C ) MATHEMATICAL SANS-SERIF BOLD CAPITAL C → LATIN CAPITAL LETTER C	# 
+1D60A ;	0043 ;	MA	# ( 𝘊 → C ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL C → LATIN CAPITAL LETTER C	# 
+1D63E ;	0043 ;	MA	# ( 𝘾 → C ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL C → LATIN CAPITAL LETTER C	# 
+1D672 ;	0043 ;	MA	# ( 𝙲 → C ) MATHEMATICAL MONOSPACE CAPITAL C → LATIN CAPITAL LETTER C	# 
+03F9 ;	0043 ;	MA	# ( Ϲ → C ) GREEK CAPITAL LUNATE SIGMA SYMBOL → LATIN CAPITAL LETTER C	# 
+2CA4 ;	0043 ;	MA	# ( Ⲥ → C ) COPTIC CAPITAL LETTER SIMA → LATIN CAPITAL LETTER C	# →Ϲ→
+0421 ;	0043 ;	MA	# ( С → C ) CYRILLIC CAPITAL LETTER ES → LATIN CAPITAL LETTER C	# 
+13DF ;	0043 ;	MA	# ( Ꮯ → C ) CHEROKEE LETTER TLI → LATIN CAPITAL LETTER C	# 
+A4DA ;	0043 ;	MA	# ( ꓚ → C ) LISU LETTER CA → LATIN CAPITAL LETTER C	# 
+102A2 ;	0043 ;	MA	# ( 𐊢 → C ) CARIAN LETTER D → LATIN CAPITAL LETTER C	# 
+10302 ;	0043 ;	MA	# ( 𐌂 → C ) OLD ITALIC LETTER KE → LATIN CAPITAL LETTER C	# 
+10415 ;	0043 ;	MA	# ( 𐐕 → C ) DESERET CAPITAL LETTER CHEE → LATIN CAPITAL LETTER C	# 
+1051C ;	0043 ;	MA	# ( 𐔜 → C ) ELBASAN LETTER SHE → LATIN CAPITAL LETTER C	# 
+
+00A2 ;	0063 0338 ;	MA	#* ( ¢ → c̸ ) CENT SIGN → LATIN SMALL LETTER C, COMBINING LONG SOLIDUS OVERLAY	# 
+023C ;	0063 0338 ;	MA	# ( ȼ → c̸ ) LATIN SMALL LETTER C WITH STROKE → LATIN SMALL LETTER C, COMBINING LONG SOLIDUS OVERLAY	# →¢→
+
+20A1 ;	0043 20EB ;	MA	#* ( ₡ → C⃫ ) COLON SIGN → LATIN CAPITAL LETTER C, COMBINING LONG DOUBLE SOLIDUS OVERLAY	# 
+
+00E7 ;	0063 0326 ;	MA	# ( ç → c̦ ) LATIN SMALL LETTER C WITH CEDILLA → LATIN SMALL LETTER C, COMBINING COMMA BELOW	# →ҫ→→с̡→
+04AB ;	0063 0326 ;	MA	# ( ҫ → c̦ ) CYRILLIC SMALL LETTER ES WITH DESCENDER → LATIN SMALL LETTER C, COMBINING COMMA BELOW	# →с̡→
+
+00C7 ;	0043 0326 ;	MA	# ( Ç → C̦ ) LATIN CAPITAL LETTER C WITH CEDILLA → LATIN CAPITAL LETTER C, COMBINING COMMA BELOW	# →Ҫ→→С̡→
+04AA ;	0043 0326 ;	MA	# ( Ҫ → C̦ ) CYRILLIC CAPITAL LETTER ES WITH DESCENDER → LATIN CAPITAL LETTER C, COMBINING COMMA BELOW	# →С̡→
+
+0187 ;	0043 0027 ;	MA	# ( Ƈ → C' ) LATIN CAPITAL LETTER C WITH HOOK → LATIN CAPITAL LETTER C, APOSTROPHE	# →Cʽ→
+
+2105 ;	0063 002F 006F ;	MA	#* ( ℅ → c/o ) CARE OF → LATIN SMALL LETTER C, SOLIDUS, LATIN SMALL LETTER O	# 
+
+2106 ;	0063 002F 0075 ;	MA	#* ( ℆ → c/u ) CADA UNA → LATIN SMALL LETTER C, SOLIDUS, LATIN SMALL LETTER U	# 
+
+22F4 ;	A793 ;	MA	#* ( ⋴ → ꞓ ) SMALL ELEMENT OF WITH VERTICAL BAR AT END OF HORIZONTAL STROKE → LATIN SMALL LETTER C WITH BAR	# →ɛ→→є→
+025B ;	A793 ;	MA	# ( ɛ → ꞓ ) LATIN SMALL LETTER OPEN E → LATIN SMALL LETTER C WITH BAR	# →є→
+03B5 ;	A793 ;	MA	# ( ε → ꞓ ) GREEK SMALL LETTER EPSILON → LATIN SMALL LETTER C WITH BAR	# →є→
+03F5 ;	A793 ;	MA	# ( ϵ → ꞓ ) GREEK LUNATE EPSILON SYMBOL → LATIN SMALL LETTER C WITH BAR	# →ε→→є→
+1D6C6 ;	A793 ;	MA	# ( 𝛆 → ꞓ ) MATHEMATICAL BOLD SMALL EPSILON → LATIN SMALL LETTER C WITH BAR	# →ε→→є→
+1D6DC ;	A793 ;	MA	# ( 𝛜 → ꞓ ) MATHEMATICAL BOLD EPSILON SYMBOL → LATIN SMALL LETTER C WITH BAR	# →ε→→є→
+1D700 ;	A793 ;	MA	# ( 𝜀 → ꞓ ) MATHEMATICAL ITALIC SMALL EPSILON → LATIN SMALL LETTER C WITH BAR	# →ε→→є→
+1D716 ;	A793 ;	MA	# ( 𝜖 → ꞓ ) MATHEMATICAL ITALIC EPSILON SYMBOL → LATIN SMALL LETTER C WITH BAR	# →ε→→є→
+1D73A ;	A793 ;	MA	# ( 𝜺 → ꞓ ) MATHEMATICAL BOLD ITALIC SMALL EPSILON → LATIN SMALL LETTER C WITH BAR	# →ε→→є→
+1D750 ;	A793 ;	MA	# ( 𝝐 → ꞓ ) MATHEMATICAL BOLD ITALIC EPSILON SYMBOL → LATIN SMALL LETTER C WITH BAR	# →ε→→є→
+1D774 ;	A793 ;	MA	# ( 𝝴 → ꞓ ) MATHEMATICAL SANS-SERIF BOLD SMALL EPSILON → LATIN SMALL LETTER C WITH BAR	# →ε→→є→
+1D78A ;	A793 ;	MA	# ( 𝞊 → ꞓ ) MATHEMATICAL SANS-SERIF BOLD EPSILON SYMBOL → LATIN SMALL LETTER C WITH BAR	# →ε→→є→
+1D7AE ;	A793 ;	MA	# ( 𝞮 → ꞓ ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL EPSILON → LATIN SMALL LETTER C WITH BAR	# →ε→→є→
+1D7C4 ;	A793 ;	MA	# ( 𝟄 → ꞓ ) MATHEMATICAL SANS-SERIF BOLD ITALIC EPSILON SYMBOL → LATIN SMALL LETTER C WITH BAR	# →ε→→є→
+2C89 ;	A793 ;	MA	# ( ⲉ → ꞓ ) COPTIC SMALL LETTER EIE → LATIN SMALL LETTER C WITH BAR	# →є→
+0454 ;	A793 ;	MA	# ( є → ꞓ ) CYRILLIC SMALL LETTER UKRAINIAN IE → LATIN SMALL LETTER C WITH BAR	# 
+0511 ;	A793 ;	MA	# ( ԑ → ꞓ ) CYRILLIC SMALL LETTER REVERSED ZE → LATIN SMALL LETTER C WITH BAR	# →ε→→є→
+118CE ;	A793 ;	MA	# ( 𑣎 → ꞓ ) WARANG CITI SMALL LETTER YUJ → LATIN SMALL LETTER C WITH BAR	# →ε→→є→
+10429 ;	A793 ;	MA	# ( 𐐩 → ꞓ ) DESERET SMALL LETTER LONG E → LATIN SMALL LETTER C WITH BAR	# →ɛ→→є→
+
+20AC ;	A792 ;	MA	#* ( € → Ꞓ ) EURO SIGN → LATIN CAPITAL LETTER C WITH BAR	# →Є→
+2C88 ;	A792 ;	MA	# ( Ⲉ → Ꞓ ) COPTIC CAPITAL LETTER EIE → LATIN CAPITAL LETTER C WITH BAR	# →Є→
+0404 ;	A792 ;	MA	# ( Є → Ꞓ ) CYRILLIC CAPITAL LETTER UKRAINIAN IE → LATIN CAPITAL LETTER C WITH BAR	# 
+
+2377 ;	A793 0332 ;	MA	#* ( ⍷ → ꞓ̲ ) APL FUNCTIONAL SYMBOL EPSILON UNDERBAR → LATIN SMALL LETTER C WITH BAR, COMBINING LOW LINE	# →ε̲→
+
+037D ;	A73F ;	MA	# ( ͽ → ꜿ ) GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL → LATIN SMALL LETTER REVERSED C WITH DOT	# 
+
+03FF ;	A73E ;	MA	# ( Ͽ → Ꜿ ) GREEK CAPITAL REVERSED DOTTED LUNATE SIGMA SYMBOL → LATIN CAPITAL LETTER REVERSED C WITH DOT	# 
+
+217E ;	0064 ;	MA	# ( ⅾ → d ) SMALL ROMAN NUMERAL FIVE HUNDRED → LATIN SMALL LETTER D	# 
+2146 ;	0064 ;	MA	# ( ⅆ → d ) DOUBLE-STRUCK ITALIC SMALL D → LATIN SMALL LETTER D	# 
+1D41D ;	0064 ;	MA	# ( 𝐝 → d ) MATHEMATICAL BOLD SMALL D → LATIN SMALL LETTER D	# 
+1D451 ;	0064 ;	MA	# ( 𝑑 → d ) MATHEMATICAL ITALIC SMALL D → LATIN SMALL LETTER D	# 
+1D485 ;	0064 ;	MA	# ( 𝒅 → d ) MATHEMATICAL BOLD ITALIC SMALL D → LATIN SMALL LETTER D	# 
+1D4B9 ;	0064 ;	MA	# ( 𝒹 → d ) MATHEMATICAL SCRIPT SMALL D → LATIN SMALL LETTER D	# 
+1D4ED ;	0064 ;	MA	# ( 𝓭 → d ) MATHEMATICAL BOLD SCRIPT SMALL D → LATIN SMALL LETTER D	# 
+1D521 ;	0064 ;	MA	# ( 𝔡 → d ) MATHEMATICAL FRAKTUR SMALL D → LATIN SMALL LETTER D	# 
+1D555 ;	0064 ;	MA	# ( 𝕕 → d ) MATHEMATICAL DOUBLE-STRUCK SMALL D → LATIN SMALL LETTER D	# 
+1D589 ;	0064 ;	MA	# ( 𝖉 → d ) MATHEMATICAL BOLD FRAKTUR SMALL D → LATIN SMALL LETTER D	# 
+1D5BD ;	0064 ;	MA	# ( 𝖽 → d ) MATHEMATICAL SANS-SERIF SMALL D → LATIN SMALL LETTER D	# 
+1D5F1 ;	0064 ;	MA	# ( 𝗱 → d ) MATHEMATICAL SANS-SERIF BOLD SMALL D → LATIN SMALL LETTER D	# 
+1D625 ;	0064 ;	MA	# ( 𝘥 → d ) MATHEMATICAL SANS-SERIF ITALIC SMALL D → LATIN SMALL LETTER D	# 
+1D659 ;	0064 ;	MA	# ( 𝙙 → d ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL D → LATIN SMALL LETTER D	# 
+1D68D ;	0064 ;	MA	# ( 𝚍 → d ) MATHEMATICAL MONOSPACE SMALL D → LATIN SMALL LETTER D	# 
+0501 ;	0064 ;	MA	# ( ԁ → d ) CYRILLIC SMALL LETTER KOMI DE → LATIN SMALL LETTER D	# 
+13E7 ;	0064 ;	MA	# ( Ꮷ → d ) CHEROKEE LETTER TSU → LATIN SMALL LETTER D	# 
+146F ;	0064 ;	MA	# ( ᑯ → d ) CANADIAN SYLLABICS KO → LATIN SMALL LETTER D	# 
+A4D2 ;	0064 ;	MA	# ( ꓒ → d ) LISU LETTER PHA → LATIN SMALL LETTER D	# 
+
+216E ;	0044 ;	MA	# ( Ⅾ → D ) ROMAN NUMERAL FIVE HUNDRED → LATIN CAPITAL LETTER D	# 
+2145 ;	0044 ;	MA	# ( ⅅ → D ) DOUBLE-STRUCK ITALIC CAPITAL D → LATIN CAPITAL LETTER D	# 
+1D403 ;	0044 ;	MA	# ( 𝐃 → D ) MATHEMATICAL BOLD CAPITAL D → LATIN CAPITAL LETTER D	# 
+1D437 ;	0044 ;	MA	# ( 𝐷 → D ) MATHEMATICAL ITALIC CAPITAL D → LATIN CAPITAL LETTER D	# 
+1D46B ;	0044 ;	MA	# ( 𝑫 → D ) MATHEMATICAL BOLD ITALIC CAPITAL D → LATIN CAPITAL LETTER D	# 
+1D49F ;	0044 ;	MA	# ( 𝒟 → D ) MATHEMATICAL SCRIPT CAPITAL D → LATIN CAPITAL LETTER D	# 
+1D4D3 ;	0044 ;	MA	# ( 𝓓 → D ) MATHEMATICAL BOLD SCRIPT CAPITAL D → LATIN CAPITAL LETTER D	# 
+1D507 ;	0044 ;	MA	# ( 𝔇 → D ) MATHEMATICAL FRAKTUR CAPITAL D → LATIN CAPITAL LETTER D	# 
+1D53B ;	0044 ;	MA	# ( 𝔻 → D ) MATHEMATICAL DOUBLE-STRUCK CAPITAL D → LATIN CAPITAL LETTER D	# 
+1D56F ;	0044 ;	MA	# ( 𝕯 → D ) MATHEMATICAL BOLD FRAKTUR CAPITAL D → LATIN CAPITAL LETTER D	# 
+1D5A3 ;	0044 ;	MA	# ( 𝖣 → D ) MATHEMATICAL SANS-SERIF CAPITAL D → LATIN CAPITAL LETTER D	# 
+1D5D7 ;	0044 ;	MA	# ( 𝗗 → D ) MATHEMATICAL SANS-SERIF BOLD CAPITAL D → LATIN CAPITAL LETTER D	# 
+1D60B ;	0044 ;	MA	# ( 𝘋 → D ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL D → LATIN CAPITAL LETTER D	# 
+1D63F ;	0044 ;	MA	# ( 𝘿 → D ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL D → LATIN CAPITAL LETTER D	# 
+1D673 ;	0044 ;	MA	# ( 𝙳 → D ) MATHEMATICAL MONOSPACE CAPITAL D → LATIN CAPITAL LETTER D	# 
+13A0 ;	0044 ;	MA	# ( Ꭰ → D ) CHEROKEE LETTER A → LATIN CAPITAL LETTER D	# 
+15DE ;	0044 ;	MA	# ( ᗞ → D ) CANADIAN SYLLABICS CARRIER THE → LATIN CAPITAL LETTER D	# 
+15EA ;	0044 ;	MA	# ( ᗪ → D ) CANADIAN SYLLABICS CARRIER PE → LATIN CAPITAL LETTER D	# →ᗞ→
+A4D3 ;	0044 ;	MA	# ( ꓓ → D ) LISU LETTER DA → LATIN CAPITAL LETTER D	# 
+
+0257 ;	0064 0314 ;	MA	# ( ɗ → d̔ ) LATIN SMALL LETTER D WITH HOOK → LATIN SMALL LETTER D, COMBINING REVERSED COMMA ABOVE	# 
+
+0256 ;	0064 0328 ;	MA	# ( ɖ → d̨ ) LATIN SMALL LETTER D WITH TAIL → LATIN SMALL LETTER D, COMBINING OGONEK	# →d̢→
+
+018C ;	0064 0304 ;	MA	# ( ƌ → d̄ ) LATIN SMALL LETTER D WITH TOPBAR → LATIN SMALL LETTER D, COMBINING MACRON	# 
+
+0111 ;	0064 0335 ;	MA	# ( đ → d̵ ) LATIN SMALL LETTER D WITH STROKE → LATIN SMALL LETTER D, COMBINING SHORT STROKE OVERLAY	# 
+
+0110 ;	0044 0335 ;	MA	# ( Đ → D̵ ) LATIN CAPITAL LETTER D WITH STROKE → LATIN CAPITAL LETTER D, COMBINING SHORT STROKE OVERLAY	# 
+00D0 ;	0044 0335 ;	MA	# ( Ð → D̵ ) LATIN CAPITAL LETTER ETH → LATIN CAPITAL LETTER D, COMBINING SHORT STROKE OVERLAY	# →Đ→
+0189 ;	0044 0335 ;	MA	# ( Ɖ → D̵ ) LATIN CAPITAL LETTER AFRICAN D → LATIN CAPITAL LETTER D, COMBINING SHORT STROKE OVERLAY	# →Đ→
+
+20AB ;	0064 0335 0331 ;	MA	#* ( ₫ → ḏ̵ ) DONG SIGN → LATIN SMALL LETTER D, COMBINING SHORT STROKE OVERLAY, COMBINING MACRON BELOW	# →đ̱→
+
+A77A ;	A779 ;	MA	# ( ꝺ → Ꝺ ) LATIN SMALL LETTER INSULAR D → LATIN CAPITAL LETTER INSULAR D	# 
+
+147B ;	0064 00B7 ;	MA	# ( ᑻ → d· ) CANADIAN SYLLABICS WEST-CREE KWO → LATIN SMALL LETTER D, MIDDLE DOT	# →ᑯᐧ→
+
+1487 ;	0064 0027 ;	MA	# ( ᒇ → d' ) CANADIAN SYLLABICS SOUTH-SLAVEY KOH → LATIN SMALL LETTER D, APOSTROPHE	# →ᑯᑊ→
+
+02A4 ;	0064 021D ;	MA	# ( ʤ → dȝ ) LATIN SMALL LETTER DEZH DIGRAPH → LATIN SMALL LETTER D, LATIN SMALL LETTER YOGH	# →dʒ→
+
+01F3 ;	0064 007A ;	MA	# ( dz → dz ) LATIN SMALL LETTER DZ → LATIN SMALL LETTER D, LATIN SMALL LETTER Z	# 
+02A3 ;	0064 007A ;	MA	# ( ʣ → dz ) LATIN SMALL LETTER DZ DIGRAPH → LATIN SMALL LETTER D, LATIN SMALL LETTER Z	# 
+
+01F2 ;	0044 007A ;	MA	# ( Dz → Dz ) LATIN CAPITAL LETTER D WITH SMALL LETTER Z → LATIN CAPITAL LETTER D, LATIN SMALL LETTER Z	# 
+
+01F1 ;	0044 005A ;	MA	# ( DZ → DZ ) LATIN CAPITAL LETTER DZ → LATIN CAPITAL LETTER D, LATIN CAPITAL LETTER Z	# 
+
+01C6 ;	0064 017E ;	MA	# ( dž → dž ) LATIN SMALL LETTER DZ WITH CARON → LATIN SMALL LETTER D, LATIN SMALL LETTER Z WITH CARON	# 
+
+01C5 ;	0044 017E ;	MA	# ( Dž → Dž ) LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON → LATIN CAPITAL LETTER D, LATIN SMALL LETTER Z WITH CARON	# 
+
+01C4 ;	0044 017D ;	MA	# ( DŽ → DŽ ) LATIN CAPITAL LETTER DZ WITH CARON → LATIN CAPITAL LETTER D, LATIN CAPITAL LETTER Z WITH CARON	# 
+
+02A5 ;	0064 0291 ;	MA	# ( ʥ → dʑ ) LATIN SMALL LETTER DZ DIGRAPH WITH CURL → LATIN SMALL LETTER D, LATIN SMALL LETTER Z WITH CURL	# 
+
+2E39 ;	1E9F ;	MA	#* ( ⸹ → ẟ ) TOP HALF SECTION SIGN → LATIN SMALL LETTER DELTA	# →δ→
+03B4 ;	1E9F ;	MA	# ( δ → ẟ ) GREEK SMALL LETTER DELTA → LATIN SMALL LETTER DELTA	# 
+1D6C5 ;	1E9F ;	MA	# ( 𝛅 → ẟ ) MATHEMATICAL BOLD SMALL DELTA → LATIN SMALL LETTER DELTA	# →δ→
+1D6FF ;	1E9F ;	MA	# ( 𝛿 → ẟ ) MATHEMATICAL ITALIC SMALL DELTA → LATIN SMALL LETTER DELTA	# →δ→
+1D739 ;	1E9F ;	MA	# ( 𝜹 → ẟ ) MATHEMATICAL BOLD ITALIC SMALL DELTA → LATIN SMALL LETTER DELTA	# →δ→
+1D773 ;	1E9F ;	MA	# ( 𝝳 → ẟ ) MATHEMATICAL SANS-SERIF BOLD SMALL DELTA → LATIN SMALL LETTER DELTA	# →δ→
+1D7AD ;	1E9F ;	MA	# ( 𝞭 → ẟ ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL DELTA → LATIN SMALL LETTER DELTA	# →δ→
+056E ;	1E9F ;	MA	# ( ծ → ẟ ) ARMENIAN SMALL LETTER CA → LATIN SMALL LETTER DELTA	# →δ→
+1577 ;	1E9F ;	MA	# ( ᕷ → ẟ ) CANADIAN SYLLABICS NUNAVIK HO → LATIN SMALL LETTER DELTA	# →δ→
+
+212E ;	0065 ;	MA	# ( ℮ → e ) ESTIMATED SYMBOL → LATIN SMALL LETTER E	# 
+FF45 ;	0065 ;	MA	# ( e → e ) FULLWIDTH LATIN SMALL LETTER E → LATIN SMALL LETTER E	# →е→
+212F ;	0065 ;	MA	# ( ℯ → e ) SCRIPT SMALL E → LATIN SMALL LETTER E	# 
+2147 ;	0065 ;	MA	# ( ⅇ → e ) DOUBLE-STRUCK ITALIC SMALL E → LATIN SMALL LETTER E	# 
+1D41E ;	0065 ;	MA	# ( 𝐞 → e ) MATHEMATICAL BOLD SMALL E → LATIN SMALL LETTER E	# 
+1D452 ;	0065 ;	MA	# ( 𝑒 → e ) MATHEMATICAL ITALIC SMALL E → LATIN SMALL LETTER E	# 
+1D486 ;	0065 ;	MA	# ( 𝒆 → e ) MATHEMATICAL BOLD ITALIC SMALL E → LATIN SMALL LETTER E	# 
+1D4EE ;	0065 ;	MA	# ( 𝓮 → e ) MATHEMATICAL BOLD SCRIPT SMALL E → LATIN SMALL LETTER E	# 
+1D522 ;	0065 ;	MA	# ( 𝔢 → e ) MATHEMATICAL FRAKTUR SMALL E → LATIN SMALL LETTER E	# 
+1D556 ;	0065 ;	MA	# ( 𝕖 → e ) MATHEMATICAL DOUBLE-STRUCK SMALL E → LATIN SMALL LETTER E	# 
+1D58A ;	0065 ;	MA	# ( 𝖊 → e ) MATHEMATICAL BOLD FRAKTUR SMALL E → LATIN SMALL LETTER E	# 
+1D5BE ;	0065 ;	MA	# ( 𝖾 → e ) MATHEMATICAL SANS-SERIF SMALL E → LATIN SMALL LETTER E	# 
+1D5F2 ;	0065 ;	MA	# ( 𝗲 → e ) MATHEMATICAL SANS-SERIF BOLD SMALL E → LATIN SMALL LETTER E	# 
+1D626 ;	0065 ;	MA	# ( 𝘦 → e ) MATHEMATICAL SANS-SERIF ITALIC SMALL E → LATIN SMALL LETTER E	# 
+1D65A ;	0065 ;	MA	# ( 𝙚 → e ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL E → LATIN SMALL LETTER E	# 
+1D68E ;	0065 ;	MA	# ( 𝚎 → e ) MATHEMATICAL MONOSPACE SMALL E → LATIN SMALL LETTER E	# 
+AB32 ;	0065 ;	MA	# ( ꬲ → e ) LATIN SMALL LETTER BLACKLETTER E → LATIN SMALL LETTER E	# 
+0435 ;	0065 ;	MA	# ( е → e ) CYRILLIC SMALL LETTER IE → LATIN SMALL LETTER E	# 
+04BD ;	0065 ;	MA	# ( ҽ → e ) CYRILLIC SMALL LETTER ABKHASIAN CHE → LATIN SMALL LETTER E	# 
+
+22FF ;	0045 ;	MA	#* ( ⋿ → E ) Z NOTATION BAG MEMBERSHIP → LATIN CAPITAL LETTER E	# 
+FF25 ;	0045 ;	MA	# ( E → E ) FULLWIDTH LATIN CAPITAL LETTER E → LATIN CAPITAL LETTER E	# →Ε→
+2130 ;	0045 ;	MA	# ( ℰ → E ) SCRIPT CAPITAL E → LATIN CAPITAL LETTER E	# 
+1D404 ;	0045 ;	MA	# ( 𝐄 → E ) MATHEMATICAL BOLD CAPITAL E → LATIN CAPITAL LETTER E	# 
+1D438 ;	0045 ;	MA	# ( 𝐸 → E ) MATHEMATICAL ITALIC CAPITAL E → LATIN CAPITAL LETTER E	# 
+1D46C ;	0045 ;	MA	# ( 𝑬 → E ) MATHEMATICAL BOLD ITALIC CAPITAL E → LATIN CAPITAL LETTER E	# 
+1D4D4 ;	0045 ;	MA	# ( 𝓔 → E ) MATHEMATICAL BOLD SCRIPT CAPITAL E → LATIN CAPITAL LETTER E	# 
+1D508 ;	0045 ;	MA	# ( 𝔈 → E ) MATHEMATICAL FRAKTUR CAPITAL E → LATIN CAPITAL LETTER E	# 
+1D53C ;	0045 ;	MA	# ( 𝔼 → E ) MATHEMATICAL DOUBLE-STRUCK CAPITAL E → LATIN CAPITAL LETTER E	# 
+1D570 ;	0045 ;	MA	# ( 𝕰 → E ) MATHEMATICAL BOLD FRAKTUR CAPITAL E → LATIN CAPITAL LETTER E	# 
+1D5A4 ;	0045 ;	MA	# ( 𝖤 → E ) MATHEMATICAL SANS-SERIF CAPITAL E → LATIN CAPITAL LETTER E	# 
+1D5D8 ;	0045 ;	MA	# ( 𝗘 → E ) MATHEMATICAL SANS-SERIF BOLD CAPITAL E → LATIN CAPITAL LETTER E	# 
+1D60C ;	0045 ;	MA	# ( 𝘌 → E ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL E → LATIN CAPITAL LETTER E	# 
+1D640 ;	0045 ;	MA	# ( 𝙀 → E ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL E → LATIN CAPITAL LETTER E	# 
+1D674 ;	0045 ;	MA	# ( 𝙴 → E ) MATHEMATICAL MONOSPACE CAPITAL E → LATIN CAPITAL LETTER E	# 
+0395 ;	0045 ;	MA	# ( Ε → E ) GREEK CAPITAL LETTER EPSILON → LATIN CAPITAL LETTER E	# 
+1D6AC ;	0045 ;	MA	# ( 𝚬 → E ) MATHEMATICAL BOLD CAPITAL EPSILON → LATIN CAPITAL LETTER E	# →𝐄→
+1D6E6 ;	0045 ;	MA	# ( 𝛦 → E ) MATHEMATICAL ITALIC CAPITAL EPSILON → LATIN CAPITAL LETTER E	# →Ε→
+1D720 ;	0045 ;	MA	# ( 𝜠 → E ) MATHEMATICAL BOLD ITALIC CAPITAL EPSILON → LATIN CAPITAL LETTER E	# →Ε→
+1D75A ;	0045 ;	MA	# ( 𝝚 → E ) MATHEMATICAL SANS-SERIF BOLD CAPITAL EPSILON → LATIN CAPITAL LETTER E	# →Ε→
+1D794 ;	0045 ;	MA	# ( 𝞔 → E ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL EPSILON → LATIN CAPITAL LETTER E	# →Ε→
+0415 ;	0045 ;	MA	# ( Е → E ) CYRILLIC CAPITAL LETTER IE → LATIN CAPITAL LETTER E	# 
+2D39 ;	0045 ;	MA	# ( ⴹ → E ) TIFINAGH LETTER YADD → LATIN CAPITAL LETTER E	# 
+13AC ;	0045 ;	MA	# ( Ꭼ → E ) CHEROKEE LETTER GV → LATIN CAPITAL LETTER E	# 
+A4F0 ;	0045 ;	MA	# ( ꓰ → E ) LISU LETTER E → LATIN CAPITAL LETTER E	# 
+118A6 ;	0045 ;	MA	# ( 𑢦 → E ) WARANG CITI CAPITAL LETTER II → LATIN CAPITAL LETTER E	# 
+118AE ;	0045 ;	MA	# ( 𑢮 → E ) WARANG CITI CAPITAL LETTER YUJ → LATIN CAPITAL LETTER E	# 
+10286 ;	0045 ;	MA	# ( 𐊆 → E ) LYCIAN LETTER I → LATIN CAPITAL LETTER E	# 
+
+011B ;	0115 ;	MA	# ( ě → ĕ ) LATIN SMALL LETTER E WITH CARON → LATIN SMALL LETTER E WITH BREVE	# 
+
+011A ;	0114 ;	MA	# ( Ě → Ĕ ) LATIN CAPITAL LETTER E WITH CARON → LATIN CAPITAL LETTER E WITH BREVE	# 
+
+0247 ;	0065 0338 ;	MA	# ( ɇ → e̸ ) LATIN SMALL LETTER E WITH STROKE → LATIN SMALL LETTER E, COMBINING LONG SOLIDUS OVERLAY	# →e̷→
+
+0246 ;	0045 0338 ;	MA	# ( Ɇ → E̸ ) LATIN CAPITAL LETTER E WITH STROKE → LATIN CAPITAL LETTER E, COMBINING LONG SOLIDUS OVERLAY	# 
+
+04BF ;	0065 0328 ;	MA	# ( ҿ → ę ) CYRILLIC SMALL LETTER ABKHASIAN CHE WITH DESCENDER → LATIN SMALL LETTER E, COMBINING OGONEK	# →ҽ̢→
+
+0259 ;	01DD ;	MA	# ( ə → ǝ ) LATIN SMALL LETTER SCHWA → LATIN SMALL LETTER TURNED E	# 
+04D9 ;	01DD ;	MA	# ( ә → ǝ ) CYRILLIC SMALL LETTER SCHWA → LATIN SMALL LETTER TURNED E	# 
+
+2203 ;	018E ;	MA	#* ( ∃ → Ǝ ) THERE EXISTS → LATIN CAPITAL LETTER REVERSED E	# 
+2D3A ;	018E ;	MA	# ( ⴺ → Ǝ ) TIFINAGH LETTER YADDH → LATIN CAPITAL LETTER REVERSED E	# 
+A4F1 ;	018E ;	MA	# ( ꓱ → Ǝ ) LISU LETTER EU → LATIN CAPITAL LETTER REVERSED E	# 
+
+025A ;	01DD 02DE ;	MA	# ( ɚ → ǝ˞ ) LATIN SMALL LETTER SCHWA WITH HOOK → LATIN SMALL LETTER TURNED E, MODIFIER LETTER RHOTIC HOOK	# →ə˞→
+
+1D14 ;	01DD 006F ;	MA	# ( ᴔ → ǝo ) LATIN SMALL LETTER TURNED OE → LATIN SMALL LETTER TURNED E, LATIN SMALL LETTER O	# →əo→
+
+AB41 ;	01DD 006F 0338 ;	MA	# ( ꭁ → ǝo̸ ) LATIN SMALL LETTER TURNED OE WITH STROKE → LATIN SMALL LETTER TURNED E, LATIN SMALL LETTER O, COMBINING LONG SOLIDUS OVERLAY	# →ǝø→
+
+AB42 ;	01DD 006F 0335 ;	MA	# ( ꭂ → ǝo̵ ) LATIN SMALL LETTER TURNED OE WITH HORIZONTAL STROKE → LATIN SMALL LETTER TURNED E, LATIN SMALL LETTER O, COMBINING SHORT STROKE OVERLAY	# →ǝɵ→
+
+04D8 ;	018F ;	MA	# ( Ә → Ə ) CYRILLIC CAPITAL LETTER SCHWA → LATIN CAPITAL LETTER SCHWA	# 
+
+1D221 ;	0190 ;	MA	#* ( 𝈡 → Ɛ ) GREEK INSTRUMENTAL NOTATION SYMBOL-7 → LATIN CAPITAL LETTER OPEN E	# 
+2107 ;	0190 ;	MA	# ( ℇ → Ɛ ) EULER CONSTANT → LATIN CAPITAL LETTER OPEN E	# 
+0510 ;	0190 ;	MA	# ( Ԑ → Ɛ ) CYRILLIC CAPITAL LETTER REVERSED ZE → LATIN CAPITAL LETTER OPEN E	# 
+13CB ;	0190 ;	MA	# ( Ꮛ → Ɛ ) CHEROKEE LETTER QUV → LATIN CAPITAL LETTER OPEN E	# 
+10401 ;	0190 ;	MA	# ( 𐐁 → Ɛ ) DESERET CAPITAL LETTER LONG E → LATIN CAPITAL LETTER OPEN E	# 
+
+1D9F ;	1D4B ;	MA	# ( ᶟ → ᵋ ) MODIFIER LETTER SMALL REVERSED OPEN E → MODIFIER LETTER SMALL OPEN E	# 
+
+1D08 ;	025C ;	MA	# ( ᴈ → ɜ ) LATIN SMALL LETTER TURNED OPEN E → LATIN SMALL LETTER REVERSED OPEN E	# 
+0437 ;	025C ;	MA	# ( з → ɜ ) CYRILLIC SMALL LETTER ZE → LATIN SMALL LETTER REVERSED OPEN E	# 
+
+0499 ;	025C 0326 ;	MA	# ( ҙ → ɜ̦ ) CYRILLIC SMALL LETTER ZE WITH DESCENDER → LATIN SMALL LETTER REVERSED OPEN E, COMBINING COMMA BELOW	# →з̡→
+
+10442 ;	025E ;	MA	# ( 𐑂 → ɞ ) DESERET SMALL LETTER VEE → LATIN SMALL LETTER CLOSED REVERSED OPEN E	# 
+
+A79D ;	029A ;	MA	# ( ꞝ → ʚ ) LATIN SMALL LETTER VOLAPUK OE → LATIN SMALL LETTER CLOSED OPEN E	# 
+1042A ;	029A ;	MA	# ( 𐐪 → ʚ ) DESERET SMALL LETTER LONG A → LATIN SMALL LETTER CLOSED OPEN E	# 
+
+1D41F ;	0066 ;	MA	# ( 𝐟 → f ) MATHEMATICAL BOLD SMALL F → LATIN SMALL LETTER F	# 
+1D453 ;	0066 ;	MA	# ( 𝑓 → f ) MATHEMATICAL ITALIC SMALL F → LATIN SMALL LETTER F	# 
+1D487 ;	0066 ;	MA	# ( 𝒇 → f ) MATHEMATICAL BOLD ITALIC SMALL F → LATIN SMALL LETTER F	# 
+1D4BB ;	0066 ;	MA	# ( 𝒻 → f ) MATHEMATICAL SCRIPT SMALL F → LATIN SMALL LETTER F	# 
+1D4EF ;	0066 ;	MA	# ( 𝓯 → f ) MATHEMATICAL BOLD SCRIPT SMALL F → LATIN SMALL LETTER F	# 
+1D523 ;	0066 ;	MA	# ( 𝔣 → f ) MATHEMATICAL FRAKTUR SMALL F → LATIN SMALL LETTER F	# 
+1D557 ;	0066 ;	MA	# ( 𝕗 → f ) MATHEMATICAL DOUBLE-STRUCK SMALL F → LATIN SMALL LETTER F	# 
+1D58B ;	0066 ;	MA	# ( 𝖋 → f ) MATHEMATICAL BOLD FRAKTUR SMALL F → LATIN SMALL LETTER F	# 
+1D5BF ;	0066 ;	MA	# ( 𝖿 → f ) MATHEMATICAL SANS-SERIF SMALL F → LATIN SMALL LETTER F	# 
+1D5F3 ;	0066 ;	MA	# ( 𝗳 → f ) MATHEMATICAL SANS-SERIF BOLD SMALL F → LATIN SMALL LETTER F	# 
+1D627 ;	0066 ;	MA	# ( 𝘧 → f ) MATHEMATICAL SANS-SERIF ITALIC SMALL F → LATIN SMALL LETTER F	# 
+1D65B ;	0066 ;	MA	# ( 𝙛 → f ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL F → LATIN SMALL LETTER F	# 
+1D68F ;	0066 ;	MA	# ( 𝚏 → f ) MATHEMATICAL MONOSPACE SMALL F → LATIN SMALL LETTER F	# 
+AB35 ;	0066 ;	MA	# ( ꬵ → f ) LATIN SMALL LETTER LENIS F → LATIN SMALL LETTER F	# 
+A799 ;	0066 ;	MA	# ( ꞙ → f ) LATIN SMALL LETTER F WITH STROKE → LATIN SMALL LETTER F	# 
+017F ;	0066 ;	MA	# ( ſ → f ) LATIN SMALL LETTER LONG S → LATIN SMALL LETTER F	# 
+1E9D ;	0066 ;	MA	# ( ẝ → f ) LATIN SMALL LETTER LONG S WITH HIGH STROKE → LATIN SMALL LETTER F	# 
+0584 ;	0066 ;	MA	# ( ք → f ) ARMENIAN SMALL LETTER KEH → LATIN SMALL LETTER F	# 
+
+1D213 ;	0046 ;	MA	#* ( 𝈓 → F ) GREEK VOCAL NOTATION SYMBOL-20 → LATIN CAPITAL LETTER F	# →Ϝ→
+2131 ;	0046 ;	MA	# ( ℱ → F ) SCRIPT CAPITAL F → LATIN CAPITAL LETTER F	# 
+1D405 ;	0046 ;	MA	# ( 𝐅 → F ) MATHEMATICAL BOLD CAPITAL F → LATIN CAPITAL LETTER F	# 
+1D439 ;	0046 ;	MA	# ( 𝐹 → F ) MATHEMATICAL ITALIC CAPITAL F → LATIN CAPITAL LETTER F	# 
+1D46D ;	0046 ;	MA	# ( 𝑭 → F ) MATHEMATICAL BOLD ITALIC CAPITAL F → LATIN CAPITAL LETTER F	# 
+1D4D5 ;	0046 ;	MA	# ( 𝓕 → F ) MATHEMATICAL BOLD SCRIPT CAPITAL F → LATIN CAPITAL LETTER F	# 
+1D509 ;	0046 ;	MA	# ( 𝔉 → F ) MATHEMATICAL FRAKTUR CAPITAL F → LATIN CAPITAL LETTER F	# 
+1D53D ;	0046 ;	MA	# ( 𝔽 → F ) MATHEMATICAL DOUBLE-STRUCK CAPITAL F → LATIN CAPITAL LETTER F	# 
+1D571 ;	0046 ;	MA	# ( 𝕱 → F ) MATHEMATICAL BOLD FRAKTUR CAPITAL F → LATIN CAPITAL LETTER F	# 
+1D5A5 ;	0046 ;	MA	# ( 𝖥 → F ) MATHEMATICAL SANS-SERIF CAPITAL F → LATIN CAPITAL LETTER F	# 
+1D5D9 ;	0046 ;	MA	# ( 𝗙 → F ) MATHEMATICAL SANS-SERIF BOLD CAPITAL F → LATIN CAPITAL LETTER F	# 
+1D60D ;	0046 ;	MA	# ( 𝘍 → F ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL F → LATIN CAPITAL LETTER F	# 
+1D641 ;	0046 ;	MA	# ( 𝙁 → F ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL F → LATIN CAPITAL LETTER F	# 
+1D675 ;	0046 ;	MA	# ( 𝙵 → F ) MATHEMATICAL MONOSPACE CAPITAL F → LATIN CAPITAL LETTER F	# 
+A798 ;	0046 ;	MA	# ( Ꞙ → F ) LATIN CAPITAL LETTER F WITH STROKE → LATIN CAPITAL LETTER F	# 
+03DC ;	0046 ;	MA	# ( Ϝ → F ) GREEK LETTER DIGAMMA → LATIN CAPITAL LETTER F	# 
+1D7CA ;	0046 ;	MA	# ( 𝟊 → F ) MATHEMATICAL BOLD CAPITAL DIGAMMA → LATIN CAPITAL LETTER F	# →Ϝ→
+15B4 ;	0046 ;	MA	# ( ᖴ → F ) CANADIAN SYLLABICS BLACKFOOT WE → LATIN CAPITAL LETTER F	# 
+A4DD ;	0046 ;	MA	# ( ꓝ → F ) LISU LETTER TSA → LATIN CAPITAL LETTER F	# 
+118C2 ;	0046 ;	MA	# ( 𑣂 → F ) WARANG CITI SMALL LETTER WI → LATIN CAPITAL LETTER F	# 
+118A2 ;	0046 ;	MA	# ( 𑢢 → F ) WARANG CITI CAPITAL LETTER WI → LATIN CAPITAL LETTER F	# 
+10287 ;	0046 ;	MA	# ( 𐊇 → F ) LYCIAN LETTER W → LATIN CAPITAL LETTER F	# 
+102A5 ;	0046 ;	MA	# ( 𐊥 → F ) CARIAN LETTER R → LATIN CAPITAL LETTER F	# 
+10525 ;	0046 ;	MA	# ( 𐔥 → F ) ELBASAN LETTER GHE → LATIN CAPITAL LETTER F	# 
+
+0192 ;	0066 0326 ;	MA	# ( ƒ → f̦ ) LATIN SMALL LETTER F WITH HOOK → LATIN SMALL LETTER F, COMBINING COMMA BELOW	# →f̡→
+
+0191 ;	0046 0326 ;	MA	# ( Ƒ → F̦ ) LATIN CAPITAL LETTER F WITH HOOK → LATIN CAPITAL LETTER F, COMBINING COMMA BELOW	# →F̡→
+
+1D6E ;	0066 0334 ;	MA	# ( ᵮ → f̴ ) LATIN SMALL LETTER F WITH MIDDLE TILDE → LATIN SMALL LETTER F, COMBINING TILDE OVERLAY	# 
+
+213B ;	0046 0041 0058 ;	MA	#* ( ℻ → FAX ) FACSIMILE SIGN → LATIN CAPITAL LETTER F, LATIN CAPITAL LETTER A, LATIN CAPITAL LETTER X	# 
+
+FB00 ;	0066 0066 ;	MA	# ( ff → ff ) LATIN SMALL LIGATURE FF → LATIN SMALL LETTER F, LATIN SMALL LETTER F	# 
+
+FB03 ;	0066 0066 0069 ;	MA	# ( ffi → ffi ) LATIN SMALL LIGATURE FFI → LATIN SMALL LETTER F, LATIN SMALL LETTER F, LATIN SMALL LETTER I	# 
+
+FB04 ;	0066 0066 006C ;	MA	# ( ffl → ffl ) LATIN SMALL LIGATURE FFL → LATIN SMALL LETTER F, LATIN SMALL LETTER F, LATIN SMALL LETTER L	# 
+
+FB01 ;	0066 0069 ;	MA	# ( fi → fi ) LATIN SMALL LIGATURE FI → LATIN SMALL LETTER F, LATIN SMALL LETTER I	# 
+
+FB02 ;	0066 006C ;	MA	# ( fl → fl ) LATIN SMALL LIGATURE FL → LATIN SMALL LETTER F, LATIN SMALL LETTER L	# 
+
+02A9 ;	0066 014B ;	MA	# ( ʩ → fŋ ) LATIN SMALL LETTER FENG DIGRAPH → LATIN SMALL LETTER F, LATIN SMALL LETTER ENG	# 
+
+15B5 ;	2132 ;	MA	# ( ᖵ → Ⅎ ) CANADIAN SYLLABICS BLACKFOOT WI → TURNED CAPITAL F	# 
+A4DE ;	2132 ;	MA	# ( ꓞ → Ⅎ ) LISU LETTER TSHA → TURNED CAPITAL F	# 
+
+1D230 ;	A7FB ;	MA	#* ( 𝈰 → ꟻ ) GREEK INSTRUMENTAL NOTATION SYMBOL-30 → LATIN EPIGRAPHIC LETTER REVERSED F	# 
+15B7 ;	A7FB ;	MA	# ( ᖷ → ꟻ ) CANADIAN SYLLABICS BLACKFOOT WA → LATIN EPIGRAPHIC LETTER REVERSED F	# 
+
+FF47 ;	0067 ;	MA	# ( g → g ) FULLWIDTH LATIN SMALL LETTER G → LATIN SMALL LETTER G	# →ɡ→
+210A ;	0067 ;	MA	# ( ℊ → g ) SCRIPT SMALL G → LATIN SMALL LETTER G	# 
+1D420 ;	0067 ;	MA	# ( 𝐠 → g ) MATHEMATICAL BOLD SMALL G → LATIN SMALL LETTER G	# 
+1D454 ;	0067 ;	MA	# ( 𝑔 → g ) MATHEMATICAL ITALIC SMALL G → LATIN SMALL LETTER G	# 
+1D488 ;	0067 ;	MA	# ( 𝒈 → g ) MATHEMATICAL BOLD ITALIC SMALL G → LATIN SMALL LETTER G	# 
+1D4F0 ;	0067 ;	MA	# ( 𝓰 → g ) MATHEMATICAL BOLD SCRIPT SMALL G → LATIN SMALL LETTER G	# 
+1D524 ;	0067 ;	MA	# ( 𝔤 → g ) MATHEMATICAL FRAKTUR SMALL G → LATIN SMALL LETTER G	# 
+1D558 ;	0067 ;	MA	# ( 𝕘 → g ) MATHEMATICAL DOUBLE-STRUCK SMALL G → LATIN SMALL LETTER G	# 
+1D58C ;	0067 ;	MA	# ( 𝖌 → g ) MATHEMATICAL BOLD FRAKTUR SMALL G → LATIN SMALL LETTER G	# 
+1D5C0 ;	0067 ;	MA	# ( 𝗀 → g ) MATHEMATICAL SANS-SERIF SMALL G → LATIN SMALL LETTER G	# 
+1D5F4 ;	0067 ;	MA	# ( 𝗴 → g ) MATHEMATICAL SANS-SERIF BOLD SMALL G → LATIN SMALL LETTER G	# 
+1D628 ;	0067 ;	MA	# ( 𝘨 → g ) MATHEMATICAL SANS-SERIF ITALIC SMALL G → LATIN SMALL LETTER G	# 
+1D65C ;	0067 ;	MA	# ( 𝙜 → g ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL G → LATIN SMALL LETTER G	# 
+1D690 ;	0067 ;	MA	# ( 𝚐 → g ) MATHEMATICAL MONOSPACE SMALL G → LATIN SMALL LETTER G	# 
+0261 ;	0067 ;	MA	# ( ɡ → g ) LATIN SMALL LETTER SCRIPT G → LATIN SMALL LETTER G	# 
+1D83 ;	0067 ;	MA	# ( ᶃ → g ) LATIN SMALL LETTER G WITH PALATAL HOOK → LATIN SMALL LETTER G	# 
+018D ;	0067 ;	MA	# ( ƍ → g ) LATIN SMALL LETTER TURNED DELTA → LATIN SMALL LETTER G	# 
+0581 ;	0067 ;	MA	# ( ց → g ) ARMENIAN SMALL LETTER CO → LATIN SMALL LETTER G	# 
+
+1D406 ;	0047 ;	MA	# ( 𝐆 → G ) MATHEMATICAL BOLD CAPITAL G → LATIN CAPITAL LETTER G	# 
+1D43A ;	0047 ;	MA	# ( 𝐺 → G ) MATHEMATICAL ITALIC CAPITAL G → LATIN CAPITAL LETTER G	# 
+1D46E ;	0047 ;	MA	# ( 𝑮 → G ) MATHEMATICAL BOLD ITALIC CAPITAL G → LATIN CAPITAL LETTER G	# 
+1D4A2 ;	0047 ;	MA	# ( 𝒢 → G ) MATHEMATICAL SCRIPT CAPITAL G → LATIN CAPITAL LETTER G	# 
+1D4D6 ;	0047 ;	MA	# ( 𝓖 → G ) MATHEMATICAL BOLD SCRIPT CAPITAL G → LATIN CAPITAL LETTER G	# 
+1D50A ;	0047 ;	MA	# ( 𝔊 → G ) MATHEMATICAL FRAKTUR CAPITAL G → LATIN CAPITAL LETTER G	# 
+1D53E ;	0047 ;	MA	# ( 𝔾 → G ) MATHEMATICAL DOUBLE-STRUCK CAPITAL G → LATIN CAPITAL LETTER G	# 
+1D572 ;	0047 ;	MA	# ( 𝕲 → G ) MATHEMATICAL BOLD FRAKTUR CAPITAL G → LATIN CAPITAL LETTER G	# 
+1D5A6 ;	0047 ;	MA	# ( 𝖦 → G ) MATHEMATICAL SANS-SERIF CAPITAL G → LATIN CAPITAL LETTER G	# 
+1D5DA ;	0047 ;	MA	# ( 𝗚 → G ) MATHEMATICAL SANS-SERIF BOLD CAPITAL G → LATIN CAPITAL LETTER G	# 
+1D60E ;	0047 ;	MA	# ( 𝘎 → G ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL G → LATIN CAPITAL LETTER G	# 
+1D642 ;	0047 ;	MA	# ( 𝙂 → G ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL G → LATIN CAPITAL LETTER G	# 
+1D676 ;	0047 ;	MA	# ( 𝙶 → G ) MATHEMATICAL MONOSPACE CAPITAL G → LATIN CAPITAL LETTER G	# 
+050C ;	0047 ;	MA	# ( Ԍ → G ) CYRILLIC CAPITAL LETTER KOMI SJE → LATIN CAPITAL LETTER G	# 
+13C0 ;	0047 ;	MA	# ( Ꮐ → G ) CHEROKEE LETTER NAH → LATIN CAPITAL LETTER G	# 
+13F3 ;	0047 ;	MA	# ( Ᏻ → G ) CHEROKEE LETTER YU → LATIN CAPITAL LETTER G	# 
+A4D6 ;	0047 ;	MA	# ( ꓖ → G ) LISU LETTER GA → LATIN CAPITAL LETTER G	# 
+
+1DA2 ;	1D4D ;	MA	# ( ᶢ → ᵍ ) MODIFIER LETTER SMALL SCRIPT G → MODIFIER LETTER SMALL G	# 
+
+0260 ;	0067 0314 ;	MA	# ( ɠ → g̔ ) LATIN SMALL LETTER G WITH HOOK → LATIN SMALL LETTER G, COMBINING REVERSED COMMA ABOVE	# 
+
+01E7 ;	011F ;	MA	# ( ǧ → ğ ) LATIN SMALL LETTER G WITH CARON → LATIN SMALL LETTER G WITH BREVE	# 
+
+01E6 ;	011E ;	MA	# ( Ǧ → Ğ ) LATIN CAPITAL LETTER G WITH CARON → LATIN CAPITAL LETTER G WITH BREVE	# 
+
+01F5 ;	0123 ;	MA	# ( ǵ → ģ ) LATIN SMALL LETTER G WITH ACUTE → LATIN SMALL LETTER G WITH CEDILLA	# 
+
+01E5 ;	0067 0335 ;	MA	# ( ǥ → g̵ ) LATIN SMALL LETTER G WITH STROKE → LATIN SMALL LETTER G, COMBINING SHORT STROKE OVERLAY	# 
+
+01E4 ;	0047 0335 ;	MA	# ( Ǥ → G̵ ) LATIN CAPITAL LETTER G WITH STROKE → LATIN CAPITAL LETTER G, COMBINING SHORT STROKE OVERLAY	# 
+
+0193 ;	0047 0027 ;	MA	# ( Ɠ → G' ) LATIN CAPITAL LETTER G WITH HOOK → LATIN CAPITAL LETTER G, APOSTROPHE	# →Gʽ→
+
+050D ;	0262 ;	MA	# ( ԍ → ɢ ) CYRILLIC SMALL LETTER KOMI SJE → LATIN LETTER SMALL CAPITAL G	# 
+
+FF48 ;	0068 ;	MA	# ( h → h ) FULLWIDTH LATIN SMALL LETTER H → LATIN SMALL LETTER H	# →һ→
+210E ;	0068 ;	MA	# ( ℎ → h ) PLANCK CONSTANT → LATIN SMALL LETTER H	# 
+1D421 ;	0068 ;	MA	# ( 𝐡 → h ) MATHEMATICAL BOLD SMALL H → LATIN SMALL LETTER H	# 
+1D489 ;	0068 ;	MA	# ( 𝒉 → h ) MATHEMATICAL BOLD ITALIC SMALL H → LATIN SMALL LETTER H	# 
+1D4BD ;	0068 ;	MA	# ( 𝒽 → h ) MATHEMATICAL SCRIPT SMALL H → LATIN SMALL LETTER H	# 
+1D4F1 ;	0068 ;	MA	# ( 𝓱 → h ) MATHEMATICAL BOLD SCRIPT SMALL H → LATIN SMALL LETTER H	# 
+1D525 ;	0068 ;	MA	# ( 𝔥 → h ) MATHEMATICAL FRAKTUR SMALL H → LATIN SMALL LETTER H	# 
+1D559 ;	0068 ;	MA	# ( 𝕙 → h ) MATHEMATICAL DOUBLE-STRUCK SMALL H → LATIN SMALL LETTER H	# 
+1D58D ;	0068 ;	MA	# ( 𝖍 → h ) MATHEMATICAL BOLD FRAKTUR SMALL H → LATIN SMALL LETTER H	# 
+1D5C1 ;	0068 ;	MA	# ( 𝗁 → h ) MATHEMATICAL SANS-SERIF SMALL H → LATIN SMALL LETTER H	# 
+1D5F5 ;	0068 ;	MA	# ( 𝗵 → h ) MATHEMATICAL SANS-SERIF BOLD SMALL H → LATIN SMALL LETTER H	# 
+1D629 ;	0068 ;	MA	# ( 𝘩 → h ) MATHEMATICAL SANS-SERIF ITALIC SMALL H → LATIN SMALL LETTER H	# 
+1D65D ;	0068 ;	MA	# ( 𝙝 → h ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL H → LATIN SMALL LETTER H	# 
+1D691 ;	0068 ;	MA	# ( 𝚑 → h ) MATHEMATICAL MONOSPACE SMALL H → LATIN SMALL LETTER H	# 
+04BB ;	0068 ;	MA	# ( һ → h ) CYRILLIC SMALL LETTER SHHA → LATIN SMALL LETTER H	# 
+0570 ;	0068 ;	MA	# ( հ → h ) ARMENIAN SMALL LETTER HO → LATIN SMALL LETTER H	# 
+13C2 ;	0068 ;	MA	# ( Ꮒ → h ) CHEROKEE LETTER NI → LATIN SMALL LETTER H	# 
+
+FF28 ;	0048 ;	MA	# ( H → H ) FULLWIDTH LATIN CAPITAL LETTER H → LATIN CAPITAL LETTER H	# →Η→
+210B ;	0048 ;	MA	# ( ℋ → H ) SCRIPT CAPITAL H → LATIN CAPITAL LETTER H	# 
+210C ;	0048 ;	MA	# ( ℌ → H ) BLACK-LETTER CAPITAL H → LATIN CAPITAL LETTER H	# 
+210D ;	0048 ;	MA	# ( ℍ → H ) DOUBLE-STRUCK CAPITAL H → LATIN CAPITAL LETTER H	# 
+1D407 ;	0048 ;	MA	# ( 𝐇 → H ) MATHEMATICAL BOLD CAPITAL H → LATIN CAPITAL LETTER H	# 
+1D43B ;	0048 ;	MA	# ( 𝐻 → H ) MATHEMATICAL ITALIC CAPITAL H → LATIN CAPITAL LETTER H	# 
+1D46F ;	0048 ;	MA	# ( 𝑯 → H ) MATHEMATICAL BOLD ITALIC CAPITAL H → LATIN CAPITAL LETTER H	# 
+1D4D7 ;	0048 ;	MA	# ( 𝓗 → H ) MATHEMATICAL BOLD SCRIPT CAPITAL H → LATIN CAPITAL LETTER H	# 
+1D573 ;	0048 ;	MA	# ( 𝕳 → H ) MATHEMATICAL BOLD FRAKTUR CAPITAL H → LATIN CAPITAL LETTER H	# 
+1D5A7 ;	0048 ;	MA	# ( 𝖧 → H ) MATHEMATICAL SANS-SERIF CAPITAL H → LATIN CAPITAL LETTER H	# 
+1D5DB ;	0048 ;	MA	# ( 𝗛 → H ) MATHEMATICAL SANS-SERIF BOLD CAPITAL H → LATIN CAPITAL LETTER H	# 
+1D60F ;	0048 ;	MA	# ( 𝘏 → H ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL H → LATIN CAPITAL LETTER H	# 
+1D643 ;	0048 ;	MA	# ( 𝙃 → H ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL H → LATIN CAPITAL LETTER H	# 
+1D677 ;	0048 ;	MA	# ( 𝙷 → H ) MATHEMATICAL MONOSPACE CAPITAL H → LATIN CAPITAL LETTER H	# 
+0397 ;	0048 ;	MA	# ( Η → H ) GREEK CAPITAL LETTER ETA → LATIN CAPITAL LETTER H	# 
+1D6AE ;	0048 ;	MA	# ( 𝚮 → H ) MATHEMATICAL BOLD CAPITAL ETA → LATIN CAPITAL LETTER H	# →Η→
+1D6E8 ;	0048 ;	MA	# ( 𝛨 → H ) MATHEMATICAL ITALIC CAPITAL ETA → LATIN CAPITAL LETTER H	# →Η→
+1D722 ;	0048 ;	MA	# ( 𝜢 → H ) MATHEMATICAL BOLD ITALIC CAPITAL ETA → LATIN CAPITAL LETTER H	# →𝑯→
+1D75C ;	0048 ;	MA	# ( 𝝜 → H ) MATHEMATICAL SANS-SERIF BOLD CAPITAL ETA → LATIN CAPITAL LETTER H	# →Η→
+1D796 ;	0048 ;	MA	# ( 𝞖 → H ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ETA → LATIN CAPITAL LETTER H	# →Η→
+2C8E ;	0048 ;	MA	# ( Ⲏ → H ) COPTIC CAPITAL LETTER HATE → LATIN CAPITAL LETTER H	# →Η→
+041D ;	0048 ;	MA	# ( Н → H ) CYRILLIC CAPITAL LETTER EN → LATIN CAPITAL LETTER H	# 
+13BB ;	0048 ;	MA	# ( Ꮋ → H ) CHEROKEE LETTER MI → LATIN CAPITAL LETTER H	# 
+157C ;	0048 ;	MA	# ( ᕼ → H ) CANADIAN SYLLABICS NUNAVUT H → LATIN CAPITAL LETTER H	# 
+A4E7 ;	0048 ;	MA	# ( ꓧ → H ) LISU LETTER XA → LATIN CAPITAL LETTER H	# 
+102CF ;	0048 ;	MA	# ( 𐋏 → H ) CARIAN LETTER E2 → LATIN CAPITAL LETTER H	# 
+
+1D78 ;	1D34 ;	MA	# ( ᵸ → ᴴ ) MODIFIER LETTER CYRILLIC EN → MODIFIER LETTER CAPITAL H	# 
+
+0266 ;	0068 0314 ;	MA	# ( ɦ → h̔ ) LATIN SMALL LETTER H WITH HOOK → LATIN SMALL LETTER H, COMBINING REVERSED COMMA ABOVE	# 
+A695 ;	0068 0314 ;	MA	# ( ꚕ → h̔ ) CYRILLIC SMALL LETTER HWE → LATIN SMALL LETTER H, COMBINING REVERSED COMMA ABOVE	# →ɦ→
+13F2 ;	0068 0314 ;	MA	# ( Ᏺ → h̔ ) CHEROKEE LETTER YO → LATIN SMALL LETTER H, COMBINING REVERSED COMMA ABOVE	# 
+
+2C67 ;	0048 0329 ;	MA	# ( Ⱨ → H̩ ) LATIN CAPITAL LETTER H WITH DESCENDER → LATIN CAPITAL LETTER H, COMBINING VERTICAL LINE BELOW	# →Ң→→Н̩→
+04A2 ;	0048 0329 ;	MA	# ( Ң → H̩ ) CYRILLIC CAPITAL LETTER EN WITH DESCENDER → LATIN CAPITAL LETTER H, COMBINING VERTICAL LINE BELOW	# →Н̩→
+
+0127 ;	0068 0335 ;	MA	# ( ħ → h̵ ) LATIN SMALL LETTER H WITH STROKE → LATIN SMALL LETTER H, COMBINING SHORT STROKE OVERLAY	# 
+210F ;	0068 0335 ;	MA	# ( ℏ → h̵ ) PLANCK CONSTANT OVER TWO PI → LATIN SMALL LETTER H, COMBINING SHORT STROKE OVERLAY	# →ħ→
+045B ;	0068 0335 ;	MA	# ( ћ → h̵ ) CYRILLIC SMALL LETTER TSHE → LATIN SMALL LETTER H, COMBINING SHORT STROKE OVERLAY	# →ħ→
+
+0126 ;	0048 0335 ;	MA	# ( Ħ → H̵ ) LATIN CAPITAL LETTER H WITH STROKE → LATIN CAPITAL LETTER H, COMBINING SHORT STROKE OVERLAY	# 
+
+04C9 ;	0048 0326 ;	MA	# ( Ӊ → H̦ ) CYRILLIC CAPITAL LETTER EN WITH TAIL → LATIN CAPITAL LETTER H, COMBINING COMMA BELOW	# →Н̡→
+04C7 ;	0048 0326 ;	MA	# ( Ӈ → H̦ ) CYRILLIC CAPITAL LETTER EN WITH HOOK → LATIN CAPITAL LETTER H, COMBINING COMMA BELOW	# →Н̡→
+
+043D ;	029C ;	MA	# ( н → ʜ ) CYRILLIC SMALL LETTER EN → LATIN LETTER SMALL CAPITAL H	# 
+
+04A3 ;	029C 0329 ;	MA	# ( ң → ʜ̩ ) CYRILLIC SMALL LETTER EN WITH DESCENDER → LATIN LETTER SMALL CAPITAL H, COMBINING VERTICAL LINE BELOW	# →н̩→
+
+04CA ;	029C 0326 ;	MA	# ( ӊ → ʜ̦ ) CYRILLIC SMALL LETTER EN WITH TAIL → LATIN LETTER SMALL CAPITAL H, COMBINING COMMA BELOW	# →н̡→
+04C8 ;	029C 0326 ;	MA	# ( ӈ → ʜ̦ ) CYRILLIC SMALL LETTER EN WITH HOOK → LATIN LETTER SMALL CAPITAL H, COMBINING COMMA BELOW	# →н̡→
+
+050A ;	01F6 ;	MA	# ( Ԋ → Ƕ ) CYRILLIC CAPITAL LETTER KOMI NJE → LATIN CAPITAL LETTER HWAIR	# 
+
+0370 ;	2C75 ;	MA	# ( Ͱ → Ⱶ ) GREEK CAPITAL LETTER HETA → LATIN CAPITAL LETTER HALF H	# →Ꮀ→
+13A8 ;	2C75 ;	MA	# ( Ꭸ → Ⱶ ) CHEROKEE LETTER GE → LATIN CAPITAL LETTER HALF H	# →Ͱ→→Ꮀ→
+13B0 ;	2C75 ;	MA	# ( Ꮀ → Ⱶ ) CHEROKEE LETTER HO → LATIN CAPITAL LETTER HALF H	# 
+A6B1 ;	2C75 ;	MA	# ( ꚱ → Ⱶ ) BAMUM LETTER NDAA → LATIN CAPITAL LETTER HALF H	# →Ͱ→→Ꮀ→
+
+A795 ;	A727 ;	MA	# ( ꞕ → ꜧ ) LATIN SMALL LETTER H WITH PALATAL HOOK → LATIN SMALL LETTER HENG	# 
+
+02DB ;	0069 ;	MA	#* ( ˛ → i ) OGONEK → LATIN SMALL LETTER I	# →ͺ→→ι→→ι→
+2373 ;	0069 ;	MA	#* ( ⍳ → i ) APL FUNCTIONAL SYMBOL IOTA → LATIN SMALL LETTER I	# →ι→
+FF49 ;	0069 ;	MA	# ( i → i ) FULLWIDTH LATIN SMALL LETTER I → LATIN SMALL LETTER I	# →і→
+2170 ;	0069 ;	MA	# ( ⅰ → i ) SMALL ROMAN NUMERAL ONE → LATIN SMALL LETTER I	# 
+2139 ;	0069 ;	MA	# ( ℹ → i ) INFORMATION SOURCE → LATIN SMALL LETTER I	# 
+2148 ;	0069 ;	MA	# ( ⅈ → i ) DOUBLE-STRUCK ITALIC SMALL I → LATIN SMALL LETTER I	# 
+1D422 ;	0069 ;	MA	# ( 𝐢 → i ) MATHEMATICAL BOLD SMALL I → LATIN SMALL LETTER I	# 
+1D456 ;	0069 ;	MA	# ( 𝑖 → i ) MATHEMATICAL ITALIC SMALL I → LATIN SMALL LETTER I	# 
+1D48A ;	0069 ;	MA	# ( 𝒊 → i ) MATHEMATICAL BOLD ITALIC SMALL I → LATIN SMALL LETTER I	# 
+1D4BE ;	0069 ;	MA	# ( 𝒾 → i ) MATHEMATICAL SCRIPT SMALL I → LATIN SMALL LETTER I	# 
+1D4F2 ;	0069 ;	MA	# ( 𝓲 → i ) MATHEMATICAL BOLD SCRIPT SMALL I → LATIN SMALL LETTER I	# 
+1D526 ;	0069 ;	MA	# ( 𝔦 → i ) MATHEMATICAL FRAKTUR SMALL I → LATIN SMALL LETTER I	# 
+1D55A ;	0069 ;	MA	# ( 𝕚 → i ) MATHEMATICAL DOUBLE-STRUCK SMALL I → LATIN SMALL LETTER I	# 
+1D58E ;	0069 ;	MA	# ( 𝖎 → i ) MATHEMATICAL BOLD FRAKTUR SMALL I → LATIN SMALL LETTER I	# 
+1D5C2 ;	0069 ;	MA	# ( 𝗂 → i ) MATHEMATICAL SANS-SERIF SMALL I → LATIN SMALL LETTER I	# 
+1D5F6 ;	0069 ;	MA	# ( 𝗶 → i ) MATHEMATICAL SANS-SERIF BOLD SMALL I → LATIN SMALL LETTER I	# 
+1D62A ;	0069 ;	MA	# ( 𝘪 → i ) MATHEMATICAL SANS-SERIF ITALIC SMALL I → LATIN SMALL LETTER I	# 
+1D65E ;	0069 ;	MA	# ( 𝙞 → i ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL I → LATIN SMALL LETTER I	# 
+1D692 ;	0069 ;	MA	# ( 𝚒 → i ) MATHEMATICAL MONOSPACE SMALL I → LATIN SMALL LETTER I	# 
+0131 ;	0069 ;	MA	# ( ı → i ) LATIN SMALL LETTER DOTLESS I → LATIN SMALL LETTER I	# 
+1D6A4 ;	0069 ;	MA	# ( 𝚤 → i ) MATHEMATICAL ITALIC SMALL DOTLESS I → LATIN SMALL LETTER I	# →ı→
+026A ;	0069 ;	MA	# ( ɪ → i ) LATIN LETTER SMALL CAPITAL I → LATIN SMALL LETTER I	# →ı→
+0269 ;	0069 ;	MA	# ( ɩ → i ) LATIN SMALL LETTER IOTA → LATIN SMALL LETTER I	# 
+03B9 ;	0069 ;	MA	# ( ι → i ) GREEK SMALL LETTER IOTA → LATIN SMALL LETTER I	# 
+1FBE ;	0069 ;	MA	# ( ι → i ) GREEK PROSGEGRAMMENI → LATIN SMALL LETTER I	# →ι→
+037A ;	0069 ;	MA	#* ( ͺ → i ) GREEK YPOGEGRAMMENI → LATIN SMALL LETTER I	# →ι→→ι→
+1D6CA ;	0069 ;	MA	# ( 𝛊 → i ) MATHEMATICAL BOLD SMALL IOTA → LATIN SMALL LETTER I	# →ι→
+1D704 ;	0069 ;	MA	# ( 𝜄 → i ) MATHEMATICAL ITALIC SMALL IOTA → LATIN SMALL LETTER I	# →ι→
+1D73E ;	0069 ;	MA	# ( 𝜾 → i ) MATHEMATICAL BOLD ITALIC SMALL IOTA → LATIN SMALL LETTER I	# →ι→
+1D778 ;	0069 ;	MA	# ( 𝝸 → i ) MATHEMATICAL SANS-SERIF BOLD SMALL IOTA → LATIN SMALL LETTER I	# →ι→
+1D7B2 ;	0069 ;	MA	# ( 𝞲 → i ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL IOTA → LATIN SMALL LETTER I	# →ι→
+0456 ;	0069 ;	MA	# ( і → i ) CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I → LATIN SMALL LETTER I	# 
+A647 ;	0069 ;	MA	# ( ꙇ → i ) CYRILLIC SMALL LETTER IOTA → LATIN SMALL LETTER I	# →ι→
+04CF ;	0069 ;	MA	# ( ӏ → i ) CYRILLIC SMALL LETTER PALOCHKA → LATIN SMALL LETTER I	# →ı→
+13A5 ;	0069 ;	MA	# ( Ꭵ → i ) CHEROKEE LETTER V → LATIN SMALL LETTER I	# 
+118C3 ;	0069 ;	MA	# ( 𑣃 → i ) WARANG CITI SMALL LETTER YU → LATIN SMALL LETTER I	# →ι→
+
+24DB ;	24BE ;	MA	#* ( ⓛ → Ⓘ ) CIRCLED LATIN SMALL LETTER L → CIRCLED LATIN CAPITAL LETTER I	# 
+
+2378 ;	0069 0332 ;	MA	#* ( ⍸ → i̲ ) APL FUNCTIONAL SYMBOL IOTA UNDERBAR → LATIN SMALL LETTER I, COMBINING LOW LINE	# →ι̲→
+
+01D0 ;	012D ;	MA	# ( ǐ → ĭ ) LATIN SMALL LETTER I WITH CARON → LATIN SMALL LETTER I WITH BREVE	# 
+
+01CF ;	012C ;	MA	# ( Ǐ → Ĭ ) LATIN CAPITAL LETTER I WITH CARON → LATIN CAPITAL LETTER I WITH BREVE	# 
+
+0268 ;	0069 0335 ;	MA	# ( ɨ → i̵ ) LATIN SMALL LETTER I WITH STROKE → LATIN SMALL LETTER I, COMBINING SHORT STROKE OVERLAY	# 
+1D7B ;	0069 0335 ;	MA	# ( ᵻ → i̵ ) LATIN SMALL CAPITAL LETTER I WITH STROKE → LATIN SMALL LETTER I, COMBINING SHORT STROKE OVERLAY	# →ɪ̵→
+1D7C ;	0069 0335 ;	MA	# ( ᵼ → i̵ ) LATIN SMALL LETTER IOTA WITH STROKE → LATIN SMALL LETTER I, COMBINING SHORT STROKE OVERLAY	# →ɩ̵→
+
+2171 ;	0069 0069 ;	MA	# ( ⅱ → ii ) SMALL ROMAN NUMERAL TWO → LATIN SMALL LETTER I, LATIN SMALL LETTER I	# 
+
+2172 ;	0069 0069 0069 ;	MA	# ( ⅲ → iii ) SMALL ROMAN NUMERAL THREE → LATIN SMALL LETTER I, LATIN SMALL LETTER I, LATIN SMALL LETTER I	# 
+
+0133 ;	0069 006A ;	MA	# ( ij → ij ) LATIN SMALL LIGATURE IJ → LATIN SMALL LETTER I, LATIN SMALL LETTER J	# 
+
+2173 ;	0069 0076 ;	MA	# ( ⅳ → iv ) SMALL ROMAN NUMERAL FOUR → LATIN SMALL LETTER I, LATIN SMALL LETTER V	# 
+
+2178 ;	0069 0078 ;	MA	# ( ⅸ → ix ) SMALL ROMAN NUMERAL NINE → LATIN SMALL LETTER I, LATIN SMALL LETTER X	# 
+
+FF4A ;	006A ;	MA	# ( j → j ) FULLWIDTH LATIN SMALL LETTER J → LATIN SMALL LETTER J	# →ϳ→
+2149 ;	006A ;	MA	# ( ⅉ → j ) DOUBLE-STRUCK ITALIC SMALL J → LATIN SMALL LETTER J	# 
+1D423 ;	006A ;	MA	# ( 𝐣 → j ) MATHEMATICAL BOLD SMALL J → LATIN SMALL LETTER J	# 
+1D457 ;	006A ;	MA	# ( 𝑗 → j ) MATHEMATICAL ITALIC SMALL J → LATIN SMALL LETTER J	# 
+1D48B ;	006A ;	MA	# ( 𝒋 → j ) MATHEMATICAL BOLD ITALIC SMALL J → LATIN SMALL LETTER J	# 
+1D4BF ;	006A ;	MA	# ( 𝒿 → j ) MATHEMATICAL SCRIPT SMALL J → LATIN SMALL LETTER J	# 
+1D4F3 ;	006A ;	MA	# ( 𝓳 → j ) MATHEMATICAL BOLD SCRIPT SMALL J → LATIN SMALL LETTER J	# 
+1D527 ;	006A ;	MA	# ( 𝔧 → j ) MATHEMATICAL FRAKTUR SMALL J → LATIN SMALL LETTER J	# 
+1D55B ;	006A ;	MA	# ( 𝕛 → j ) MATHEMATICAL DOUBLE-STRUCK SMALL J → LATIN SMALL LETTER J	# 
+1D58F ;	006A ;	MA	# ( 𝖏 → j ) MATHEMATICAL BOLD FRAKTUR SMALL J → LATIN SMALL LETTER J	# 
+1D5C3 ;	006A ;	MA	# ( 𝗃 → j ) MATHEMATICAL SANS-SERIF SMALL J → LATIN SMALL LETTER J	# 
+1D5F7 ;	006A ;	MA	# ( 𝗷 → j ) MATHEMATICAL SANS-SERIF BOLD SMALL J → LATIN SMALL LETTER J	# 
+1D62B ;	006A ;	MA	# ( 𝘫 → j ) MATHEMATICAL SANS-SERIF ITALIC SMALL J → LATIN SMALL LETTER J	# 
+1D65F ;	006A ;	MA	# ( 𝙟 → j ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL J → LATIN SMALL LETTER J	# 
+1D693 ;	006A ;	MA	# ( 𝚓 → j ) MATHEMATICAL MONOSPACE SMALL J → LATIN SMALL LETTER J	# 
+03F3 ;	006A ;	MA	# ( ϳ → j ) GREEK LETTER YOT → LATIN SMALL LETTER J	# 
+0458 ;	006A ;	MA	# ( ј → j ) CYRILLIC SMALL LETTER JE → LATIN SMALL LETTER J	# 
+
+FF2A ;	004A ;	MA	# ( J → J ) FULLWIDTH LATIN CAPITAL LETTER J → LATIN CAPITAL LETTER J	# →Ј→
+1D409 ;	004A ;	MA	# ( 𝐉 → J ) MATHEMATICAL BOLD CAPITAL J → LATIN CAPITAL LETTER J	# 
+1D43D ;	004A ;	MA	# ( 𝐽 → J ) MATHEMATICAL ITALIC CAPITAL J → LATIN CAPITAL LETTER J	# 
+1D471 ;	004A ;	MA	# ( 𝑱 → J ) MATHEMATICAL BOLD ITALIC CAPITAL J → LATIN CAPITAL LETTER J	# 
+1D4A5 ;	004A ;	MA	# ( 𝒥 → J ) MATHEMATICAL SCRIPT CAPITAL J → LATIN CAPITAL LETTER J	# 
+1D4D9 ;	004A ;	MA	# ( 𝓙 → J ) MATHEMATICAL BOLD SCRIPT CAPITAL J → LATIN CAPITAL LETTER J	# 
+1D50D ;	004A ;	MA	# ( 𝔍 → J ) MATHEMATICAL FRAKTUR CAPITAL J → LATIN CAPITAL LETTER J	# 
+1D541 ;	004A ;	MA	# ( 𝕁 → J ) MATHEMATICAL DOUBLE-STRUCK CAPITAL J → LATIN CAPITAL LETTER J	# 
+1D575 ;	004A ;	MA	# ( 𝕵 → J ) MATHEMATICAL BOLD FRAKTUR CAPITAL J → LATIN CAPITAL LETTER J	# 
+1D5A9 ;	004A ;	MA	# ( 𝖩 → J ) MATHEMATICAL SANS-SERIF CAPITAL J → LATIN CAPITAL LETTER J	# 
+1D5DD ;	004A ;	MA	# ( 𝗝 → J ) MATHEMATICAL SANS-SERIF BOLD CAPITAL J → LATIN CAPITAL LETTER J	# 
+1D611 ;	004A ;	MA	# ( 𝘑 → J ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL J → LATIN CAPITAL LETTER J	# 
+1D645 ;	004A ;	MA	# ( 𝙅 → J ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL J → LATIN CAPITAL LETTER J	# 
+1D679 ;	004A ;	MA	# ( 𝙹 → J ) MATHEMATICAL MONOSPACE CAPITAL J → LATIN CAPITAL LETTER J	# 
+A7B2 ;	004A ;	MA	# ( Ʝ → J ) LATIN CAPITAL LETTER J WITH CROSSED-TAIL → LATIN CAPITAL LETTER J	# 
+037F ;	004A ;	MA	# ( Ϳ → J ) GREEK CAPITAL LETTER YOT → LATIN CAPITAL LETTER J	# 
+0408 ;	004A ;	MA	# ( Ј → J ) CYRILLIC CAPITAL LETTER JE → LATIN CAPITAL LETTER J	# 
+13AB ;	004A ;	MA	# ( Ꭻ → J ) CHEROKEE LETTER GU → LATIN CAPITAL LETTER J	# 
+148D ;	004A ;	MA	# ( ᒍ → J ) CANADIAN SYLLABICS CO → LATIN CAPITAL LETTER J	# 
+A4D9 ;	004A ;	MA	# ( ꓙ → J ) LISU LETTER JA → LATIN CAPITAL LETTER J	# 
+
+0249 ;	006A 0335 ;	MA	# ( ɉ → j̵ ) LATIN SMALL LETTER J WITH STROKE → LATIN SMALL LETTER J, COMBINING SHORT STROKE OVERLAY	# 
+
+0248 ;	004A 0335 ;	MA	# ( Ɉ → J̵ ) LATIN CAPITAL LETTER J WITH STROKE → LATIN CAPITAL LETTER J, COMBINING SHORT STROKE OVERLAY	# 
+
+1499 ;	004A 00B7 ;	MA	# ( ᒙ → J· ) CANADIAN SYLLABICS WEST-CREE CWO → LATIN CAPITAL LETTER J, MIDDLE DOT	# →ᒍᐧ→
+
+1D6A5 ;	0237 ;	MA	# ( 𝚥 → ȷ ) MATHEMATICAL ITALIC SMALL DOTLESS J → LATIN SMALL LETTER DOTLESS J	# 
+0575 ;	0237 ;	MA	# ( յ → ȷ ) ARMENIAN SMALL LETTER YI → LATIN SMALL LETTER DOTLESS J	# 
+
+1D424 ;	006B ;	MA	# ( 𝐤 → k ) MATHEMATICAL BOLD SMALL K → LATIN SMALL LETTER K	# 
+1D458 ;	006B ;	MA	# ( 𝑘 → k ) MATHEMATICAL ITALIC SMALL K → LATIN SMALL LETTER K	# 
+1D48C ;	006B ;	MA	# ( 𝒌 → k ) MATHEMATICAL BOLD ITALIC SMALL K → LATIN SMALL LETTER K	# 
+1D4C0 ;	006B ;	MA	# ( 𝓀 → k ) MATHEMATICAL SCRIPT SMALL K → LATIN SMALL LETTER K	# 
+1D4F4 ;	006B ;	MA	# ( 𝓴 → k ) MATHEMATICAL BOLD SCRIPT SMALL K → LATIN SMALL LETTER K	# 
+1D528 ;	006B ;	MA	# ( 𝔨 → k ) MATHEMATICAL FRAKTUR SMALL K → LATIN SMALL LETTER K	# 
+1D55C ;	006B ;	MA	# ( 𝕜 → k ) MATHEMATICAL DOUBLE-STRUCK SMALL K → LATIN SMALL LETTER K	# 
+1D590 ;	006B ;	MA	# ( 𝖐 → k ) MATHEMATICAL BOLD FRAKTUR SMALL K → LATIN SMALL LETTER K	# 
+1D5C4 ;	006B ;	MA	# ( 𝗄 → k ) MATHEMATICAL SANS-SERIF SMALL K → LATIN SMALL LETTER K	# 
+1D5F8 ;	006B ;	MA	# ( 𝗸 → k ) MATHEMATICAL SANS-SERIF BOLD SMALL K → LATIN SMALL LETTER K	# 
+1D62C ;	006B ;	MA	# ( 𝘬 → k ) MATHEMATICAL SANS-SERIF ITALIC SMALL K → LATIN SMALL LETTER K	# 
+1D660 ;	006B ;	MA	# ( 𝙠 → k ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL K → LATIN SMALL LETTER K	# 
+1D694 ;	006B ;	MA	# ( 𝚔 → k ) MATHEMATICAL MONOSPACE SMALL K → LATIN SMALL LETTER K	# 
+1D0B ;	006B ;	MA	# ( ᴋ → k ) LATIN LETTER SMALL CAPITAL K → LATIN SMALL LETTER K	# →к→
+0138 ;	006B ;	MA	# ( ĸ → k ) LATIN SMALL LETTER KRA → LATIN SMALL LETTER K	# →к→
+03BA ;	006B ;	MA	# ( κ → k ) GREEK SMALL LETTER KAPPA → LATIN SMALL LETTER K	# →к→
+03F0 ;	006B ;	MA	# ( ϰ → k ) GREEK KAPPA SYMBOL → LATIN SMALL LETTER K	# →κ→→к→
+1D6CB ;	006B ;	MA	# ( 𝛋 → k ) MATHEMATICAL BOLD SMALL KAPPA → LATIN SMALL LETTER K	# →κ→→к→
+1D6DE ;	006B ;	MA	# ( 𝛞 → k ) MATHEMATICAL BOLD KAPPA SYMBOL → LATIN SMALL LETTER K	# →κ→→к→
+1D705 ;	006B ;	MA	# ( 𝜅 → k ) MATHEMATICAL ITALIC SMALL KAPPA → LATIN SMALL LETTER K	# →κ→→к→
+1D718 ;	006B ;	MA	# ( 𝜘 → k ) MATHEMATICAL ITALIC KAPPA SYMBOL → LATIN SMALL LETTER K	# →κ→→к→
+1D73F ;	006B ;	MA	# ( 𝜿 → k ) MATHEMATICAL BOLD ITALIC SMALL KAPPA → LATIN SMALL LETTER K	# →κ→→к→
+1D752 ;	006B ;	MA	# ( 𝝒 → k ) MATHEMATICAL BOLD ITALIC KAPPA SYMBOL → LATIN SMALL LETTER K	# →κ→→к→
+1D779 ;	006B ;	MA	# ( 𝝹 → k ) MATHEMATICAL SANS-SERIF BOLD SMALL KAPPA → LATIN SMALL LETTER K	# →κ→→к→
+1D78C ;	006B ;	MA	# ( 𝞌 → k ) MATHEMATICAL SANS-SERIF BOLD KAPPA SYMBOL → LATIN SMALL LETTER K	# →κ→→к→
+1D7B3 ;	006B ;	MA	# ( 𝞳 → k ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL KAPPA → LATIN SMALL LETTER K	# →κ→→к→
+1D7C6 ;	006B ;	MA	# ( 𝟆 → k ) MATHEMATICAL SANS-SERIF BOLD ITALIC KAPPA SYMBOL → LATIN SMALL LETTER K	# →κ→→к→
+2C95 ;	006B ;	MA	# ( ⲕ → k ) COPTIC SMALL LETTER KAPA → LATIN SMALL LETTER K	# →κ→→к→
+043A ;	006B ;	MA	# ( к → k ) CYRILLIC SMALL LETTER KA → LATIN SMALL LETTER K	# 
+
+212A ;	004B ;	MA	# ( K → K ) KELVIN SIGN → LATIN CAPITAL LETTER K	# 
+FF2B ;	004B ;	MA	# ( K → K ) FULLWIDTH LATIN CAPITAL LETTER K → LATIN CAPITAL LETTER K	# →Κ→
+1D40A ;	004B ;	MA	# ( 𝐊 → K ) MATHEMATICAL BOLD CAPITAL K → LATIN CAPITAL LETTER K	# 
+1D43E ;	004B ;	MA	# ( 𝐾 → K ) MATHEMATICAL ITALIC CAPITAL K → LATIN CAPITAL LETTER K	# 
+1D472 ;	004B ;	MA	# ( 𝑲 → K ) MATHEMATICAL BOLD ITALIC CAPITAL K → LATIN CAPITAL LETTER K	# 
+1D4A6 ;	004B ;	MA	# ( 𝒦 → K ) MATHEMATICAL SCRIPT CAPITAL K → LATIN CAPITAL LETTER K	# 
+1D4DA ;	004B ;	MA	# ( 𝓚 → K ) MATHEMATICAL BOLD SCRIPT CAPITAL K → LATIN CAPITAL LETTER K	# 
+1D50E ;	004B ;	MA	# ( 𝔎 → K ) MATHEMATICAL FRAKTUR CAPITAL K → LATIN CAPITAL LETTER K	# 
+1D542 ;	004B ;	MA	# ( 𝕂 → K ) MATHEMATICAL DOUBLE-STRUCK CAPITAL K → LATIN CAPITAL LETTER K	# 
+1D576 ;	004B ;	MA	# ( 𝕶 → K ) MATHEMATICAL BOLD FRAKTUR CAPITAL K → LATIN CAPITAL LETTER K	# 
+1D5AA ;	004B ;	MA	# ( 𝖪 → K ) MATHEMATICAL SANS-SERIF CAPITAL K → LATIN CAPITAL LETTER K	# 
+1D5DE ;	004B ;	MA	# ( 𝗞 → K ) MATHEMATICAL SANS-SERIF BOLD CAPITAL K → LATIN CAPITAL LETTER K	# 
+1D612 ;	004B ;	MA	# ( 𝘒 → K ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL K → LATIN CAPITAL LETTER K	# 
+1D646 ;	004B ;	MA	# ( 𝙆 → K ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL K → LATIN CAPITAL LETTER K	# 
+1D67A ;	004B ;	MA	# ( 𝙺 → K ) MATHEMATICAL MONOSPACE CAPITAL K → LATIN CAPITAL LETTER K	# 
+039A ;	004B ;	MA	# ( Κ → K ) GREEK CAPITAL LETTER KAPPA → LATIN CAPITAL LETTER K	# 
+1D6B1 ;	004B ;	MA	# ( 𝚱 → K ) MATHEMATICAL BOLD CAPITAL KAPPA → LATIN CAPITAL LETTER K	# →Κ→
+1D6EB ;	004B ;	MA	# ( 𝛫 → K ) MATHEMATICAL ITALIC CAPITAL KAPPA → LATIN CAPITAL LETTER K	# →𝐾→
+1D725 ;	004B ;	MA	# ( 𝜥 → K ) MATHEMATICAL BOLD ITALIC CAPITAL KAPPA → LATIN CAPITAL LETTER K	# →𝑲→
+1D75F ;	004B ;	MA	# ( 𝝟 → K ) MATHEMATICAL SANS-SERIF BOLD CAPITAL KAPPA → LATIN CAPITAL LETTER K	# →Κ→
+1D799 ;	004B ;	MA	# ( 𝞙 → K ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL KAPPA → LATIN CAPITAL LETTER K	# →Κ→
+2C94 ;	004B ;	MA	# ( Ⲕ → K ) COPTIC CAPITAL LETTER KAPA → LATIN CAPITAL LETTER K	# →Κ→
+041A ;	004B ;	MA	# ( К → K ) CYRILLIC CAPITAL LETTER KA → LATIN CAPITAL LETTER K	# 
+13E6 ;	004B ;	MA	# ( Ꮶ → K ) CHEROKEE LETTER TSO → LATIN CAPITAL LETTER K	# 
+16D5 ;	004B ;	MA	# ( ᛕ → K ) RUNIC LETTER OPEN-P → LATIN CAPITAL LETTER K	# 
+A4D7 ;	004B ;	MA	# ( ꓗ → K ) LISU LETTER KA → LATIN CAPITAL LETTER K	# 
+10518 ;	004B ;	MA	# ( 𐔘 → K ) ELBASAN LETTER QE → LATIN CAPITAL LETTER K	# 
+
+0199 ;	006B 0314 ;	MA	# ( ƙ → k̔ ) LATIN SMALL LETTER K WITH HOOK → LATIN SMALL LETTER K, COMBINING REVERSED COMMA ABOVE	# 
+
+049B ;	006B 0329 ;	MA	# ( қ → k̩ ) CYRILLIC SMALL LETTER KA WITH DESCENDER → LATIN SMALL LETTER K, COMBINING VERTICAL LINE BELOW	# →к̩→
+
+2C69 ;	004B 0329 ;	MA	# ( Ⱪ → K̩ ) LATIN CAPITAL LETTER K WITH DESCENDER → LATIN CAPITAL LETTER K, COMBINING VERTICAL LINE BELOW	# →Қ→→К̩→
+049A ;	004B 0329 ;	MA	# ( Қ → K̩ ) CYRILLIC CAPITAL LETTER KA WITH DESCENDER → LATIN CAPITAL LETTER K, COMBINING VERTICAL LINE BELOW	# →К̩→
+
+049F ;	006B 0335 ;	MA	# ( ҟ → k̵ ) CYRILLIC SMALL LETTER KA WITH STROKE → LATIN SMALL LETTER K, COMBINING SHORT STROKE OVERLAY	# →к̵→
+
+20AD ;	004B 0335 ;	MA	#* ( ₭ → K̵ ) KIP SIGN → LATIN CAPITAL LETTER K, COMBINING SHORT STROKE OVERLAY	# →K̶→
+A740 ;	004B 0335 ;	MA	# ( Ꝁ → K̵ ) LATIN CAPITAL LETTER K WITH STROKE → LATIN CAPITAL LETTER K, COMBINING SHORT STROKE OVERLAY	# →Ҟ→→К̵→
+049E ;	004B 0335 ;	MA	# ( Ҟ → K̵ ) CYRILLIC CAPITAL LETTER KA WITH STROKE → LATIN CAPITAL LETTER K, COMBINING SHORT STROKE OVERLAY	# →К̵→
+
+0198 ;	004B 0027 ;	MA	# ( Ƙ → K' ) LATIN CAPITAL LETTER K WITH HOOK → LATIN CAPITAL LETTER K, APOSTROPHE	# →Kʽ→
+
+05C0 ;	006C ;	MA	#* ( ‎׀‎ → l ) HEBREW PUNCTUATION PASEQ → LATIN SMALL LETTER L	# →|→
+007C ;	006C ;	MA	#* ( | → l ) VERTICAL LINE → LATIN SMALL LETTER L	# 
+2223 ;	006C ;	MA	#* ( ∣ → l ) DIVIDES → LATIN SMALL LETTER L	# →ǀ→
+FFE8 ;	006C ;	MA	#* ( │ → l ) HALFWIDTH FORMS LIGHT VERTICAL → LATIN SMALL LETTER L	# →|→
+0031 ;	006C ;	MA	# ( 1 → l ) DIGIT ONE → LATIN SMALL LETTER L	# 
+0661 ;	006C ;	MA	# ( ‎١‎ → l ) ARABIC-INDIC DIGIT ONE → LATIN SMALL LETTER L	# →1→
+06F1 ;	006C ;	MA	# ( ۱ → l ) EXTENDED ARABIC-INDIC DIGIT ONE → LATIN SMALL LETTER L	# →1→
+10320 ;	006C ;	MA	#* ( 𐌠 → l ) OLD ITALIC NUMERAL ONE → LATIN SMALL LETTER L	# →𐌉→→I→
+1E8C7 ;	006C ;	MA	#* ( ‎𞣇‎ → l ) MENDE KIKAKUI DIGIT ONE → LATIN SMALL LETTER L	# 
+1D7CF ;	006C ;	MA	# ( 𝟏 → l ) MATHEMATICAL BOLD DIGIT ONE → LATIN SMALL LETTER L	# →1→
+1D7D9 ;	006C ;	MA	# ( 𝟙 → l ) MATHEMATICAL DOUBLE-STRUCK DIGIT ONE → LATIN SMALL LETTER L	# →1→
+1D7E3 ;	006C ;	MA	# ( 𝟣 → l ) MATHEMATICAL SANS-SERIF DIGIT ONE → LATIN SMALL LETTER L	# →1→
+1D7ED ;	006C ;	MA	# ( 𝟭 → l ) MATHEMATICAL SANS-SERIF BOLD DIGIT ONE → LATIN SMALL LETTER L	# →1→
+1D7F7 ;	006C ;	MA	# ( 𝟷 → l ) MATHEMATICAL MONOSPACE DIGIT ONE → LATIN SMALL LETTER L	# →1→
+0049 ;	006C ;	MA	# ( I → l ) LATIN CAPITAL LETTER I → LATIN SMALL LETTER L	# 
+FF29 ;	006C ;	MA	# ( I → l ) FULLWIDTH LATIN CAPITAL LETTER I → LATIN SMALL LETTER L	# →Ӏ→
+2160 ;	006C ;	MA	# ( Ⅰ → l ) ROMAN NUMERAL ONE → LATIN SMALL LETTER L	# →Ӏ→
+2110 ;	006C ;	MA	# ( ℐ → l ) SCRIPT CAPITAL I → LATIN SMALL LETTER L	# →I→
+2111 ;	006C ;	MA	# ( ℑ → l ) BLACK-LETTER CAPITAL I → LATIN SMALL LETTER L	# →I→
+1D408 ;	006C ;	MA	# ( 𝐈 → l ) MATHEMATICAL BOLD CAPITAL I → LATIN SMALL LETTER L	# →I→
+1D43C ;	006C ;	MA	# ( 𝐼 → l ) MATHEMATICAL ITALIC CAPITAL I → LATIN SMALL LETTER L	# →I→
+1D470 ;	006C ;	MA	# ( 𝑰 → l ) MATHEMATICAL BOLD ITALIC CAPITAL I → LATIN SMALL LETTER L	# →I→
+1D4D8 ;	006C ;	MA	# ( 𝓘 → l ) MATHEMATICAL BOLD SCRIPT CAPITAL I → LATIN SMALL LETTER L	# →I→
+1D540 ;	006C ;	MA	# ( 𝕀 → l ) MATHEMATICAL DOUBLE-STRUCK CAPITAL I → LATIN SMALL LETTER L	# →I→
+1D574 ;	006C ;	MA	# ( 𝕴 → l ) MATHEMATICAL BOLD FRAKTUR CAPITAL I → LATIN SMALL LETTER L	# →I→
+1D5A8 ;	006C ;	MA	# ( 𝖨 → l ) MATHEMATICAL SANS-SERIF CAPITAL I → LATIN SMALL LETTER L	# →I→
+1D5DC ;	006C ;	MA	# ( 𝗜 → l ) MATHEMATICAL SANS-SERIF BOLD CAPITAL I → LATIN SMALL LETTER L	# →I→
+1D610 ;	006C ;	MA	# ( 𝘐 → l ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL I → LATIN SMALL LETTER L	# →I→
+1D644 ;	006C ;	MA	# ( 𝙄 → l ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL I → LATIN SMALL LETTER L	# →I→
+1D678 ;	006C ;	MA	# ( 𝙸 → l ) MATHEMATICAL MONOSPACE CAPITAL I → LATIN SMALL LETTER L	# →I→
+0196 ;	006C ;	MA	# ( Ɩ → l ) LATIN CAPITAL LETTER IOTA → LATIN SMALL LETTER L	# 
+FF4C ;	006C ;	MA	# ( l → l ) FULLWIDTH LATIN SMALL LETTER L → LATIN SMALL LETTER L	# →Ⅰ→→Ӏ→
+217C ;	006C ;	MA	# ( ⅼ → l ) SMALL ROMAN NUMERAL FIFTY → LATIN SMALL LETTER L	# 
+2113 ;	006C ;	MA	# ( ℓ → l ) SCRIPT SMALL L → LATIN SMALL LETTER L	# 
+1D425 ;	006C ;	MA	# ( 𝐥 → l ) MATHEMATICAL BOLD SMALL L → LATIN SMALL LETTER L	# 
+1D459 ;	006C ;	MA	# ( 𝑙 → l ) MATHEMATICAL ITALIC SMALL L → LATIN SMALL LETTER L	# 
+1D48D ;	006C ;	MA	# ( 𝒍 → l ) MATHEMATICAL BOLD ITALIC SMALL L → LATIN SMALL LETTER L	# 
+1D4C1 ;	006C ;	MA	# ( 𝓁 → l ) MATHEMATICAL SCRIPT SMALL L → LATIN SMALL LETTER L	# 
+1D4F5 ;	006C ;	MA	# ( 𝓵 → l ) MATHEMATICAL BOLD SCRIPT SMALL L → LATIN SMALL LETTER L	# 
+1D529 ;	006C ;	MA	# ( 𝔩 → l ) MATHEMATICAL FRAKTUR SMALL L → LATIN SMALL LETTER L	# 
+1D55D ;	006C ;	MA	# ( 𝕝 → l ) MATHEMATICAL DOUBLE-STRUCK SMALL L → LATIN SMALL LETTER L	# 
+1D591 ;	006C ;	MA	# ( 𝖑 → l ) MATHEMATICAL BOLD FRAKTUR SMALL L → LATIN SMALL LETTER L	# 
+1D5C5 ;	006C ;	MA	# ( 𝗅 → l ) MATHEMATICAL SANS-SERIF SMALL L → LATIN SMALL LETTER L	# 
+1D5F9 ;	006C ;	MA	# ( 𝗹 → l ) MATHEMATICAL SANS-SERIF BOLD SMALL L → LATIN SMALL LETTER L	# 
+1D62D ;	006C ;	MA	# ( 𝘭 → l ) MATHEMATICAL SANS-SERIF ITALIC SMALL L → LATIN SMALL LETTER L	# 
+1D661 ;	006C ;	MA	# ( 𝙡 → l ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL L → LATIN SMALL LETTER L	# 
+1D695 ;	006C ;	MA	# ( 𝚕 → l ) MATHEMATICAL MONOSPACE SMALL L → LATIN SMALL LETTER L	# 
+01C0 ;	006C ;	MA	# ( ǀ → l ) LATIN LETTER DENTAL CLICK → LATIN SMALL LETTER L	# 
+0399 ;	006C ;	MA	# ( Ι → l ) GREEK CAPITAL LETTER IOTA → LATIN SMALL LETTER L	# 
+1D6B0 ;	006C ;	MA	# ( 𝚰 → l ) MATHEMATICAL BOLD CAPITAL IOTA → LATIN SMALL LETTER L	# →Ι→
+1D6EA ;	006C ;	MA	# ( 𝛪 → l ) MATHEMATICAL ITALIC CAPITAL IOTA → LATIN SMALL LETTER L	# →Ι→
+1D724 ;	006C ;	MA	# ( 𝜤 → l ) MATHEMATICAL BOLD ITALIC CAPITAL IOTA → LATIN SMALL LETTER L	# →Ι→
+1D75E ;	006C ;	MA	# ( 𝝞 → l ) MATHEMATICAL SANS-SERIF BOLD CAPITAL IOTA → LATIN SMALL LETTER L	# →Ι→
+1D798 ;	006C ;	MA	# ( 𝞘 → l ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL IOTA → LATIN SMALL LETTER L	# →Ι→
+2C92 ;	006C ;	MA	# ( Ⲓ → l ) COPTIC CAPITAL LETTER IAUDA → LATIN SMALL LETTER L	# →Ӏ→
+0406 ;	006C ;	MA	# ( І → l ) CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I → LATIN SMALL LETTER L	# 
+04C0 ;	006C ;	MA	# ( Ӏ → l ) CYRILLIC LETTER PALOCHKA → LATIN SMALL LETTER L	# 
+05D5 ;	006C ;	MA	# ( ‎ו‎ → l ) HEBREW LETTER VAV → LATIN SMALL LETTER L	# 
+05DF ;	006C ;	MA	# ( ‎ן‎ → l ) HEBREW LETTER FINAL NUN → LATIN SMALL LETTER L	# 
+0627 ;	006C ;	MA	# ( ‎ا‎ → l ) ARABIC LETTER ALEF → LATIN SMALL LETTER L	# →1→
+1EE00 ;	006C ;	MA	# ( ‎𞸀‎ → l ) ARABIC MATHEMATICAL ALEF → LATIN SMALL LETTER L	# →‎ا‎→→1→
+1EE80 ;	006C ;	MA	# ( ‎𞺀‎ → l ) ARABIC MATHEMATICAL LOOPED ALEF → LATIN SMALL LETTER L	# →‎ا‎→→1→
+FE8E ;	006C ;	MA	# ( ‎ﺎ‎ → l ) ARABIC LETTER ALEF FINAL FORM → LATIN SMALL LETTER L	# →‎ا‎→→1→
+FE8D ;	006C ;	MA	# ( ‎ﺍ‎ → l ) ARABIC LETTER ALEF ISOLATED FORM → LATIN SMALL LETTER L	# →‎ا‎→→1→
+07CA ;	006C ;	MA	# ( ‎ߊ‎ → l ) NKO LETTER A → LATIN SMALL LETTER L	# →∣→→ǀ→
+2D4F ;	006C ;	MA	# ( ⵏ → l ) TIFINAGH LETTER YAN → LATIN SMALL LETTER L	# →Ӏ→
+16C1 ;	006C ;	MA	# ( ᛁ → l ) RUNIC LETTER ISAZ IS ISS I → LATIN SMALL LETTER L	# →I→
+A4F2 ;	006C ;	MA	# ( ꓲ → l ) LISU LETTER I → LATIN SMALL LETTER L	# →I→
+1028A ;	006C ;	MA	# ( 𐊊 → l ) LYCIAN LETTER J → LATIN SMALL LETTER L	# →I→
+10309 ;	006C ;	MA	# ( 𐌉 → l ) OLD ITALIC LETTER I → LATIN SMALL LETTER L	# →I→
+23FD ;	006C ;	MA	#* ( ⏽ → l ) POWER ON SYMBOL → LATIN SMALL LETTER L	# →I→
+
+1D22A ;	004C ;	MA	#* ( 𝈪 → L ) GREEK INSTRUMENTAL NOTATION SYMBOL-23 → LATIN CAPITAL LETTER L	# 
+216C ;	004C ;	MA	# ( Ⅼ → L ) ROMAN NUMERAL FIFTY → LATIN CAPITAL LETTER L	# 
+2112 ;	004C ;	MA	# ( ℒ → L ) SCRIPT CAPITAL L → LATIN CAPITAL LETTER L	# 
+1D40B ;	004C ;	MA	# ( 𝐋 → L ) MATHEMATICAL BOLD CAPITAL L → LATIN CAPITAL LETTER L	# 
+1D43F ;	004C ;	MA	# ( 𝐿 → L ) MATHEMATICAL ITALIC CAPITAL L → LATIN CAPITAL LETTER L	# 
+1D473 ;	004C ;	MA	# ( 𝑳 → L ) MATHEMATICAL BOLD ITALIC CAPITAL L → LATIN CAPITAL LETTER L	# 
+1D4DB ;	004C ;	MA	# ( 𝓛 → L ) MATHEMATICAL BOLD SCRIPT CAPITAL L → LATIN CAPITAL LETTER L	# 
+1D50F ;	004C ;	MA	# ( 𝔏 → L ) MATHEMATICAL FRAKTUR CAPITAL L → LATIN CAPITAL LETTER L	# 
+1D543 ;	004C ;	MA	# ( 𝕃 → L ) MATHEMATICAL DOUBLE-STRUCK CAPITAL L → LATIN CAPITAL LETTER L	# 
+1D577 ;	004C ;	MA	# ( 𝕷 → L ) MATHEMATICAL BOLD FRAKTUR CAPITAL L → LATIN CAPITAL LETTER L	# 
+1D5AB ;	004C ;	MA	# ( 𝖫 → L ) MATHEMATICAL SANS-SERIF CAPITAL L → LATIN CAPITAL LETTER L	# 
+1D5DF ;	004C ;	MA	# ( 𝗟 → L ) MATHEMATICAL SANS-SERIF BOLD CAPITAL L → LATIN CAPITAL LETTER L	# 
+1D613 ;	004C ;	MA	# ( 𝘓 → L ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL L → LATIN CAPITAL LETTER L	# 
+1D647 ;	004C ;	MA	# ( 𝙇 → L ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL L → LATIN CAPITAL LETTER L	# 
+1D67B ;	004C ;	MA	# ( 𝙻 → L ) MATHEMATICAL MONOSPACE CAPITAL L → LATIN CAPITAL LETTER L	# 
+2CD0 ;	004C ;	MA	# ( Ⳑ → L ) COPTIC CAPITAL LETTER L-SHAPED HA → LATIN CAPITAL LETTER L	# 
+13DE ;	004C ;	MA	# ( Ꮮ → L ) CHEROKEE LETTER TLE → LATIN CAPITAL LETTER L	# 
+14AA ;	004C ;	MA	# ( ᒪ → L ) CANADIAN SYLLABICS MA → LATIN CAPITAL LETTER L	# 
+A4E1 ;	004C ;	MA	# ( ꓡ → L ) LISU LETTER LA → LATIN CAPITAL LETTER L	# 
+118A3 ;	004C ;	MA	# ( 𑢣 → L ) WARANG CITI CAPITAL LETTER YU → LATIN CAPITAL LETTER L	# 
+118B2 ;	004C ;	MA	# ( 𑢲 → L ) WARANG CITI CAPITAL LETTER TTE → LATIN CAPITAL LETTER L	# 
+1041B ;	004C ;	MA	# ( 𐐛 → L ) DESERET CAPITAL LETTER ETH → LATIN CAPITAL LETTER L	# 
+10526 ;	004C ;	MA	# ( 𐔦 → L ) ELBASAN LETTER GHAMMA → LATIN CAPITAL LETTER L	# 
+
+FD3C ;	006C 030B ;	MA	# ( ‎ﴼ‎ → l̋ ) ARABIC LIGATURE ALEF WITH FATHATAN FINAL FORM → LATIN SMALL LETTER L, COMBINING DOUBLE ACUTE ACCENT	# →‎اً‎→
+FD3D ;	006C 030B ;	MA	# ( ‎ﴽ‎ → l̋ ) ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM → LATIN SMALL LETTER L, COMBINING DOUBLE ACUTE ACCENT	# →‎اً‎→
+
+0142 ;	006C 0338 ;	MA	# ( ł → l̸ ) LATIN SMALL LETTER L WITH STROKE → LATIN SMALL LETTER L, COMBINING LONG SOLIDUS OVERLAY	# →l̷→
+
+0141 ;	004C 0338 ;	MA	# ( Ł → L̸ ) LATIN CAPITAL LETTER L WITH STROKE → LATIN CAPITAL LETTER L, COMBINING LONG SOLIDUS OVERLAY	# →L̷→
+
+026D ;	006C 0328 ;	MA	# ( ɭ → l̨ ) LATIN SMALL LETTER L WITH RETROFLEX HOOK → LATIN SMALL LETTER L, COMBINING OGONEK	# →l̢→
+
+0197 ;	006C 0335 ;	MA	# ( Ɨ → l̵ ) LATIN CAPITAL LETTER I WITH STROKE → LATIN SMALL LETTER L, COMBINING SHORT STROKE OVERLAY	# →ƚ→
+019A ;	006C 0335 ;	MA	# ( ƚ → l̵ ) LATIN SMALL LETTER L WITH BAR → LATIN SMALL LETTER L, COMBINING SHORT STROKE OVERLAY	# 
+
+026B ;	006C 0334 ;	MA	# ( ɫ → l̴ ) LATIN SMALL LETTER L WITH MIDDLE TILDE → LATIN SMALL LETTER L, COMBINING TILDE OVERLAY	# 
+
+0625 ;	006C 0655 ;	MA	# ( ‎إ‎ → lٕ ) ARABIC LETTER ALEF WITH HAMZA BELOW → LATIN SMALL LETTER L, ARABIC HAMZA BELOW	# →‎ٳ‎→→‎اٟ‎→
+FE88 ;	006C 0655 ;	MA	# ( ‎ﺈ‎ → lٕ ) ARABIC LETTER ALEF WITH HAMZA BELOW FINAL FORM → LATIN SMALL LETTER L, ARABIC HAMZA BELOW	# →‎إ‎→→‎ٳ‎→→‎اٟ‎→
+FE87 ;	006C 0655 ;	MA	# ( ‎ﺇ‎ → lٕ ) ARABIC LETTER ALEF WITH HAMZA BELOW ISOLATED FORM → LATIN SMALL LETTER L, ARABIC HAMZA BELOW	# →‎إ‎→→‎ٳ‎→→‎اٟ‎→
+0673 ;	006C 0655 ;	MA	# ( ‎ٳ‎ → lٕ ) ARABIC LETTER ALEF WITH WAVY HAMZA BELOW → LATIN SMALL LETTER L, ARABIC HAMZA BELOW	# →‎اٟ‎→
+
+0140 ;	006C 00B7 ;	MA	# ( ŀ → l· ) LATIN SMALL LETTER L WITH MIDDLE DOT → LATIN SMALL LETTER L, MIDDLE DOT	# 
+013F ;	006C 00B7 ;	MA	# ( Ŀ → l· ) LATIN CAPITAL LETTER L WITH MIDDLE DOT → LATIN SMALL LETTER L, MIDDLE DOT	# →L·→→ᒪ·→→ᒪᐧ→→ᒷ→→1ᐧ→
+14B7 ;	006C 00B7 ;	MA	# ( ᒷ → l· ) CANADIAN SYLLABICS WEST-CREE MWA → LATIN SMALL LETTER L, MIDDLE DOT	# →1ᐧ→
+
+1F102 ;	006C 002C ;	MA	#* ( 🄂 → l, ) DIGIT ONE COMMA → LATIN SMALL LETTER L, COMMA	# →1,→
+
+2488 ;	006C 002E ;	MA	#* ( ⒈ → l. ) DIGIT ONE FULL STOP → LATIN SMALL LETTER L, FULL STOP	# →1.→
+
+05F1 ;	006C 0027 ;	MA	# ( ‎ױ‎ → l' ) HEBREW LIGATURE YIDDISH VAV YOD → LATIN SMALL LETTER L, APOSTROPHE	# →‎וי‎→
+
+2493 ;	006C 0032 002E ;	MA	#* ( ⒓ → l2. ) NUMBER TWELVE FULL STOP → LATIN SMALL LETTER L, DIGIT TWO, FULL STOP	# →12.→
+
+33EB ;	006C 0032 65E5 ;	MA	#* ( ㏫ → l2日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TWELVE → LATIN SMALL LETTER L, DIGIT TWO, CJK UNIFIED IDEOGRAPH-65E5	# →12日→
+
+32CB ;	006C 0032 6708 ;	MA	#* ( ㋋ → l2月 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DECEMBER → LATIN SMALL LETTER L, DIGIT TWO, CJK UNIFIED IDEOGRAPH-6708	# →12月→
+
+3364 ;	006C 0032 70B9 ;	MA	#* ( ㍤ → l2点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TWELVE → LATIN SMALL LETTER L, DIGIT TWO, CJK UNIFIED IDEOGRAPH-70B9	# →12点→
+
+2494 ;	006C 0033 002E ;	MA	#* ( ⒔ → l3. ) NUMBER THIRTEEN FULL STOP → LATIN SMALL LETTER L, DIGIT THREE, FULL STOP	# →13.→
+
+33EC ;	006C 0033 65E5 ;	MA	#* ( ㏬ → l3日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY THIRTEEN → LATIN SMALL LETTER L, DIGIT THREE, CJK UNIFIED IDEOGRAPH-65E5	# →13日→
+
+3365 ;	006C 0033 70B9 ;	MA	#* ( ㍥ → l3点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR THIRTEEN → LATIN SMALL LETTER L, DIGIT THREE, CJK UNIFIED IDEOGRAPH-70B9	# →13点→
+
+2495 ;	006C 0034 002E ;	MA	#* ( ⒕ → l4. ) NUMBER FOURTEEN FULL STOP → LATIN SMALL LETTER L, DIGIT FOUR, FULL STOP	# →14.→
+
+33ED ;	006C 0034 65E5 ;	MA	#* ( ㏭ → l4日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FOURTEEN → LATIN SMALL LETTER L, DIGIT FOUR, CJK UNIFIED IDEOGRAPH-65E5	# →14日→
+
+3366 ;	006C 0034 70B9 ;	MA	#* ( ㍦ → l4点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FOURTEEN → LATIN SMALL LETTER L, DIGIT FOUR, CJK UNIFIED IDEOGRAPH-70B9	# →14点→
+
+2496 ;	006C 0035 002E ;	MA	#* ( ⒖ → l5. ) NUMBER FIFTEEN FULL STOP → LATIN SMALL LETTER L, DIGIT FIVE, FULL STOP	# →15.→
+
+33EE ;	006C 0035 65E5 ;	MA	#* ( ㏮ → l5日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY FIFTEEN → LATIN SMALL LETTER L, DIGIT FIVE, CJK UNIFIED IDEOGRAPH-65E5	# →15日→
+
+3367 ;	006C 0035 70B9 ;	MA	#* ( ㍧ → l5点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR FIFTEEN → LATIN SMALL LETTER L, DIGIT FIVE, CJK UNIFIED IDEOGRAPH-70B9	# →15点→
+
+2497 ;	006C 0036 002E ;	MA	#* ( ⒗ → l6. ) NUMBER SIXTEEN FULL STOP → LATIN SMALL LETTER L, DIGIT SIX, FULL STOP	# →16.→
+
+33EF ;	006C 0036 65E5 ;	MA	#* ( ㏯ → l6日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SIXTEEN → LATIN SMALL LETTER L, DIGIT SIX, CJK UNIFIED IDEOGRAPH-65E5	# →16日→
+
+3368 ;	006C 0036 70B9 ;	MA	#* ( ㍨ → l6点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SIXTEEN → LATIN SMALL LETTER L, DIGIT SIX, CJK UNIFIED IDEOGRAPH-70B9	# →16点→
+
+2498 ;	006C 0037 002E ;	MA	#* ( ⒘ → l7. ) NUMBER SEVENTEEN FULL STOP → LATIN SMALL LETTER L, DIGIT SEVEN, FULL STOP	# →17.→
+
+33F0 ;	006C 0037 65E5 ;	MA	#* ( ㏰ → l7日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY SEVENTEEN → LATIN SMALL LETTER L, DIGIT SEVEN, CJK UNIFIED IDEOGRAPH-65E5	# →17日→
+
+3369 ;	006C 0037 70B9 ;	MA	#* ( ㍩ → l7点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR SEVENTEEN → LATIN SMALL LETTER L, DIGIT SEVEN, CJK UNIFIED IDEOGRAPH-70B9	# →17点→
+
+2499 ;	006C 0038 002E ;	MA	#* ( ⒙ → l8. ) NUMBER EIGHTEEN FULL STOP → LATIN SMALL LETTER L, DIGIT EIGHT, FULL STOP	# →18.→
+
+33F1 ;	006C 0038 65E5 ;	MA	#* ( ㏱ → l8日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY EIGHTEEN → LATIN SMALL LETTER L, DIGIT EIGHT, CJK UNIFIED IDEOGRAPH-65E5	# →18日→
+
+336A ;	006C 0038 70B9 ;	MA	#* ( ㍪ → l8点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR EIGHTEEN → LATIN SMALL LETTER L, DIGIT EIGHT, CJK UNIFIED IDEOGRAPH-70B9	# →18点→
+
+249A ;	006C 0039 002E ;	MA	#* ( ⒚ → l9. ) NUMBER NINETEEN FULL STOP → LATIN SMALL LETTER L, DIGIT NINE, FULL STOP	# →19.→
+
+33F2 ;	006C 0039 65E5 ;	MA	#* ( ㏲ → l9日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY NINETEEN → LATIN SMALL LETTER L, DIGIT NINE, CJK UNIFIED IDEOGRAPH-65E5	# →19日→
+
+336B ;	006C 0039 70B9 ;	MA	#* ( ㍫ → l9点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR NINETEEN → LATIN SMALL LETTER L, DIGIT NINE, CJK UNIFIED IDEOGRAPH-70B9	# →19点→
+
+01C9 ;	006C 006A ;	MA	# ( lj → lj ) LATIN SMALL LETTER LJ → LATIN SMALL LETTER L, LATIN SMALL LETTER J	# 
+
+0132 ;	006C 004A ;	MA	# ( IJ → lJ ) LATIN CAPITAL LIGATURE IJ → LATIN SMALL LETTER L, LATIN CAPITAL LETTER J	# →IJ→
+
+01C8 ;	004C 006A ;	MA	# ( Lj → Lj ) LATIN CAPITAL LETTER L WITH SMALL LETTER J → LATIN CAPITAL LETTER L, LATIN SMALL LETTER J	# 
+
+01C7 ;	004C 004A ;	MA	# ( LJ → LJ ) LATIN CAPITAL LETTER LJ → LATIN CAPITAL LETTER L, LATIN CAPITAL LETTER J	# 
+
+2016 ;	006C 006C ;	MA	#* ( ‖ → ll ) DOUBLE VERTICAL LINE → LATIN SMALL LETTER L, LATIN SMALL LETTER L	# →∥→→||→
+2225 ;	006C 006C ;	MA	#* ( ∥ → ll ) PARALLEL TO → LATIN SMALL LETTER L, LATIN SMALL LETTER L	# →||→
+2161 ;	006C 006C ;	MA	# ( Ⅱ → ll ) ROMAN NUMERAL TWO → LATIN SMALL LETTER L, LATIN SMALL LETTER L	# →II→
+01C1 ;	006C 006C ;	MA	# ( ǁ → ll ) LATIN LETTER LATERAL CLICK → LATIN SMALL LETTER L, LATIN SMALL LETTER L	# →‖→→∥→→||→
+05F0 ;	006C 006C ;	MA	# ( ‎װ‎ → ll ) HEBREW LIGATURE YIDDISH DOUBLE VAV → LATIN SMALL LETTER L, LATIN SMALL LETTER L	# →‎וו‎→
+
+2492 ;	006C 006C 002E ;	MA	#* ( ⒒ → ll. ) NUMBER ELEVEN FULL STOP → LATIN SMALL LETTER L, LATIN SMALL LETTER L, FULL STOP	# →11.→
+
+2162 ;	006C 006C 006C ;	MA	# ( Ⅲ → lll ) ROMAN NUMERAL THREE → LATIN SMALL LETTER L, LATIN SMALL LETTER L, LATIN SMALL LETTER L	# →III→
+
+33EA ;	006C 006C 65E5 ;	MA	#* ( ㏪ → ll日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY ELEVEN → LATIN SMALL LETTER L, LATIN SMALL LETTER L, CJK UNIFIED IDEOGRAPH-65E5	# →11日→
+
+32CA ;	006C 006C 6708 ;	MA	#* ( ㋊ → ll月 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR NOVEMBER → LATIN SMALL LETTER L, LATIN SMALL LETTER L, CJK UNIFIED IDEOGRAPH-6708	# →11月→
+
+3363 ;	006C 006C 70B9 ;	MA	#* ( ㍣ → ll点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR ELEVEN → LATIN SMALL LETTER L, LATIN SMALL LETTER L, CJK UNIFIED IDEOGRAPH-70B9	# →11点→
+
+042E ;	006C 004F ;	MA	# ( Ю → lO ) CYRILLIC CAPITAL LETTER YU → LATIN SMALL LETTER L, LATIN CAPITAL LETTER O	# →IO→
+
+2491 ;	006C 004F 002E ;	MA	#* ( ⒑ → lO. ) NUMBER TEN FULL STOP → LATIN SMALL LETTER L, LATIN CAPITAL LETTER O, FULL STOP	# →10.→
+
+33E9 ;	006C 004F 65E5 ;	MA	#* ( ㏩ → lO日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY TEN → LATIN SMALL LETTER L, LATIN CAPITAL LETTER O, CJK UNIFIED IDEOGRAPH-65E5	# →10日→
+
+32C9 ;	006C 004F 6708 ;	MA	#* ( ㋉ → lO月 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR OCTOBER → LATIN SMALL LETTER L, LATIN CAPITAL LETTER O, CJK UNIFIED IDEOGRAPH-6708	# →10月→
+
+3362 ;	006C 004F 70B9 ;	MA	#* ( ㍢ → lO点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR TEN → LATIN SMALL LETTER L, LATIN CAPITAL LETTER O, CJK UNIFIED IDEOGRAPH-70B9	# →10点→
+
+02AA ;	006C 0073 ;	MA	# ( ʪ → ls ) LATIN SMALL LETTER LS DIGRAPH → LATIN SMALL LETTER L, LATIN SMALL LETTER S	# 
+
+20B6 ;	006C 0074 ;	MA	#* ( ₶ → lt ) LIVRE TOURNOIS SIGN → LATIN SMALL LETTER L, LATIN SMALL LETTER T	# 
+
+2163 ;	006C 0056 ;	MA	# ( Ⅳ → lV ) ROMAN NUMERAL FOUR → LATIN SMALL LETTER L, LATIN CAPITAL LETTER V	# →IV→
+
+2168 ;	006C 0058 ;	MA	# ( Ⅸ → lX ) ROMAN NUMERAL NINE → LATIN SMALL LETTER L, LATIN CAPITAL LETTER X	# →IX→
+
+026E ;	006C 021D ;	MA	# ( ɮ → lȝ ) LATIN SMALL LETTER LEZH → LATIN SMALL LETTER L, LATIN SMALL LETTER YOGH	# →lʒ→
+
+02AB ;	006C 007A ;	MA	# ( ʫ → lz ) LATIN SMALL LETTER LZ DIGRAPH → LATIN SMALL LETTER L, LATIN SMALL LETTER Z	# 
+
+0623 ;	006C 0674 ;	MA	# ( ‎أ‎ → ‎lٴ‎ ) ARABIC LETTER ALEF WITH HAMZA ABOVE → LATIN SMALL LETTER L, ARABIC LETTER HIGH HAMZA	# →‎ٵ‎→→‎اٴ‎→
+FE84 ;	006C 0674 ;	MA	# ( ‎ﺄ‎ → ‎lٴ‎ ) ARABIC LETTER ALEF WITH HAMZA ABOVE FINAL FORM → LATIN SMALL LETTER L, ARABIC LETTER HIGH HAMZA	# →‎أ‎→→‎ٵ‎→→‎اٴ‎→
+FE83 ;	006C 0674 ;	MA	# ( ‎ﺃ‎ → ‎lٴ‎ ) ARABIC LETTER ALEF WITH HAMZA ABOVE ISOLATED FORM → LATIN SMALL LETTER L, ARABIC LETTER HIGH HAMZA	# →‎ٵ‎→→‎اٴ‎→
+0672 ;	006C 0674 ;	MA	# ( ‎ٲ‎ → ‎lٴ‎ ) ARABIC LETTER ALEF WITH WAVY HAMZA ABOVE → LATIN SMALL LETTER L, ARABIC LETTER HIGH HAMZA	# →‎أ‎→→‎ٵ‎→→‎اٴ‎→
+0675 ;	006C 0674 ;	MA	# ( ‎ٵ‎ → ‎lٴ‎ ) ARABIC LETTER HIGH HAMZA ALEF → LATIN SMALL LETTER L, ARABIC LETTER HIGH HAMZA	# →‎اٴ‎→
+
+FDF3 ;	006C 0643 0628 0631 ;	MA	# ( ‎ﷳ‎ → ‎lكبر‎ ) ARABIC LIGATURE AKBAR ISOLATED FORM → LATIN SMALL LETTER L, ARABIC LETTER KAF, ARABIC LETTER BEH, ARABIC LETTER REH	# →‎اكبر‎→
+
+FDF2 ;	006C 0644 0644 0651 0670 006F ;	MA	# ( ‎ﷲ‎ → ‎lللّٰo‎ ) ARABIC LIGATURE ALLAH ISOLATED FORM → LATIN SMALL LETTER L, ARABIC LETTER LAM, ARABIC LETTER LAM, ARABIC SHADDA, ARABIC LETTER SUPERSCRIPT ALEF, LATIN SMALL LETTER O	# →‎اللّٰه‎→
+
+33E0 ;	006C 65E5 ;	MA	#* ( ㏠ → l日 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR DAY ONE → LATIN SMALL LETTER L, CJK UNIFIED IDEOGRAPH-65E5	# →1日→
+
+32C0 ;	006C 6708 ;	MA	#* ( ㋀ → l月 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR JANUARY → LATIN SMALL LETTER L, CJK UNIFIED IDEOGRAPH-6708	# →1月→
+
+3359 ;	006C 70B9 ;	MA	#* ( ㍙ → l点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR ONE → LATIN SMALL LETTER L, CJK UNIFIED IDEOGRAPH-70B9	# →1点→
+
+2CD1 ;	029F ;	MA	# ( ⳑ → ʟ ) COPTIC SMALL LETTER L-SHAPED HA → LATIN LETTER SMALL CAPITAL L	# 
+10443 ;	029F ;	MA	# ( 𐑃 → ʟ ) DESERET SMALL LETTER ETH → LATIN LETTER SMALL CAPITAL L	# 
+
+FF2D ;	004D ;	MA	# ( M → M ) FULLWIDTH LATIN CAPITAL LETTER M → LATIN CAPITAL LETTER M	# →Μ→
+216F ;	004D ;	MA	# ( Ⅿ → M ) ROMAN NUMERAL ONE THOUSAND → LATIN CAPITAL LETTER M	# 
+2133 ;	004D ;	MA	# ( ℳ → M ) SCRIPT CAPITAL M → LATIN CAPITAL LETTER M	# 
+1D40C ;	004D ;	MA	# ( 𝐌 → M ) MATHEMATICAL BOLD CAPITAL M → LATIN CAPITAL LETTER M	# 
+1D440 ;	004D ;	MA	# ( 𝑀 → M ) MATHEMATICAL ITALIC CAPITAL M → LATIN CAPITAL LETTER M	# 
+1D474 ;	004D ;	MA	# ( 𝑴 → M ) MATHEMATICAL BOLD ITALIC CAPITAL M → LATIN CAPITAL LETTER M	# 
+1D4DC ;	004D ;	MA	# ( 𝓜 → M ) MATHEMATICAL BOLD SCRIPT CAPITAL M → LATIN CAPITAL LETTER M	# 
+1D510 ;	004D ;	MA	# ( 𝔐 → M ) MATHEMATICAL FRAKTUR CAPITAL M → LATIN CAPITAL LETTER M	# 
+1D544 ;	004D ;	MA	# ( 𝕄 → M ) MATHEMATICAL DOUBLE-STRUCK CAPITAL M → LATIN CAPITAL LETTER M	# 
+1D578 ;	004D ;	MA	# ( 𝕸 → M ) MATHEMATICAL BOLD FRAKTUR CAPITAL M → LATIN CAPITAL LETTER M	# 
+1D5AC ;	004D ;	MA	# ( 𝖬 → M ) MATHEMATICAL SANS-SERIF CAPITAL M → LATIN CAPITAL LETTER M	# 
+1D5E0 ;	004D ;	MA	# ( 𝗠 → M ) MATHEMATICAL SANS-SERIF BOLD CAPITAL M → LATIN CAPITAL LETTER M	# 
+1D614 ;	004D ;	MA	# ( 𝘔 → M ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL M → LATIN CAPITAL LETTER M	# 
+1D648 ;	004D ;	MA	# ( 𝙈 → M ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL M → LATIN CAPITAL LETTER M	# 
+1D67C ;	004D ;	MA	# ( 𝙼 → M ) MATHEMATICAL MONOSPACE CAPITAL M → LATIN CAPITAL LETTER M	# 
+039C ;	004D ;	MA	# ( Μ → M ) GREEK CAPITAL LETTER MU → LATIN CAPITAL LETTER M	# 
+1D6B3 ;	004D ;	MA	# ( 𝚳 → M ) MATHEMATICAL BOLD CAPITAL MU → LATIN CAPITAL LETTER M	# →𝐌→
+1D6ED ;	004D ;	MA	# ( 𝛭 → M ) MATHEMATICAL ITALIC CAPITAL MU → LATIN CAPITAL LETTER M	# →𝑀→
+1D727 ;	004D ;	MA	# ( 𝜧 → M ) MATHEMATICAL BOLD ITALIC CAPITAL MU → LATIN CAPITAL LETTER M	# →𝑴→
+1D761 ;	004D ;	MA	# ( 𝝡 → M ) MATHEMATICAL SANS-SERIF BOLD CAPITAL MU → LATIN CAPITAL LETTER M	# →Μ→
+1D79B ;	004D ;	MA	# ( 𝞛 → M ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL MU → LATIN CAPITAL LETTER M	# →Μ→
+03FA ;	004D ;	MA	# ( Ϻ → M ) GREEK CAPITAL LETTER SAN → LATIN CAPITAL LETTER M	# 
+2C98 ;	004D ;	MA	# ( Ⲙ → M ) COPTIC CAPITAL LETTER MI → LATIN CAPITAL LETTER M	# 
+041C ;	004D ;	MA	# ( М → M ) CYRILLIC CAPITAL LETTER EM → LATIN CAPITAL LETTER M	# 
+13B7 ;	004D ;	MA	# ( Ꮇ → M ) CHEROKEE LETTER LU → LATIN CAPITAL LETTER M	# 
+15F0 ;	004D ;	MA	# ( ᗰ → M ) CANADIAN SYLLABICS CARRIER GO → LATIN CAPITAL LETTER M	# 
+16D6 ;	004D ;	MA	# ( ᛖ → M ) RUNIC LETTER EHWAZ EH E → LATIN CAPITAL LETTER M	# 
+A4DF ;	004D ;	MA	# ( ꓟ → M ) LISU LETTER MA → LATIN CAPITAL LETTER M	# 
+102B0 ;	004D ;	MA	# ( 𐊰 → M ) CARIAN LETTER S → LATIN CAPITAL LETTER M	# 
+10311 ;	004D ;	MA	# ( 𐌑 → M ) OLD ITALIC LETTER SHE → LATIN CAPITAL LETTER M	# 
+
+04CD ;	004D 0326 ;	MA	# ( Ӎ → M̦ ) CYRILLIC CAPITAL LETTER EM WITH TAIL → LATIN CAPITAL LETTER M, COMBINING COMMA BELOW	# →М̡→
+
+1F76B ;	004D 0042 ;	MA	#* ( 🝫 → MB ) ALCHEMICAL SYMBOL FOR BATH OF MARY → LATIN CAPITAL LETTER M, LATIN CAPITAL LETTER B	# 
+
+2DE8 ;	1DDF ;	MA	# ( ⷨ → ᷟ ) COMBINING CYRILLIC LETTER EM → COMBINING LATIN LETTER SMALL CAPITAL M	# 
+
+1D427 ;	006E ;	MA	# ( 𝐧 → n ) MATHEMATICAL BOLD SMALL N → LATIN SMALL LETTER N	# 
+1D45B ;	006E ;	MA	# ( 𝑛 → n ) MATHEMATICAL ITALIC SMALL N → LATIN SMALL LETTER N	# 
+1D48F ;	006E ;	MA	# ( 𝒏 → n ) MATHEMATICAL BOLD ITALIC SMALL N → LATIN SMALL LETTER N	# 
+1D4C3 ;	006E ;	MA	# ( 𝓃 → n ) MATHEMATICAL SCRIPT SMALL N → LATIN SMALL LETTER N	# 
+1D4F7 ;	006E ;	MA	# ( 𝓷 → n ) MATHEMATICAL BOLD SCRIPT SMALL N → LATIN SMALL LETTER N	# 
+1D52B ;	006E ;	MA	# ( 𝔫 → n ) MATHEMATICAL FRAKTUR SMALL N → LATIN SMALL LETTER N	# 
+1D55F ;	006E ;	MA	# ( 𝕟 → n ) MATHEMATICAL DOUBLE-STRUCK SMALL N → LATIN SMALL LETTER N	# 
+1D593 ;	006E ;	MA	# ( 𝖓 → n ) MATHEMATICAL BOLD FRAKTUR SMALL N → LATIN SMALL LETTER N	# 
+1D5C7 ;	006E ;	MA	# ( 𝗇 → n ) MATHEMATICAL SANS-SERIF SMALL N → LATIN SMALL LETTER N	# 
+1D5FB ;	006E ;	MA	# ( 𝗻 → n ) MATHEMATICAL SANS-SERIF BOLD SMALL N → LATIN SMALL LETTER N	# 
+1D62F ;	006E ;	MA	# ( 𝘯 → n ) MATHEMATICAL SANS-SERIF ITALIC SMALL N → LATIN SMALL LETTER N	# 
+1D663 ;	006E ;	MA	# ( 𝙣 → n ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL N → LATIN SMALL LETTER N	# 
+1D697 ;	006E ;	MA	# ( 𝚗 → n ) MATHEMATICAL MONOSPACE SMALL N → LATIN SMALL LETTER N	# 
+03C0 ;	006E ;	MA	# ( π → n ) GREEK SMALL LETTER PI → LATIN SMALL LETTER N	# 
+03D6 ;	006E ;	MA	# ( ϖ → n ) GREEK PI SYMBOL → LATIN SMALL LETTER N	# →π→
+213C ;	006E ;	MA	# ( ℼ → n ) DOUBLE-STRUCK SMALL PI → LATIN SMALL LETTER N	# →π→
+1D6D1 ;	006E ;	MA	# ( 𝛑 → n ) MATHEMATICAL BOLD SMALL PI → LATIN SMALL LETTER N	# →π→
+1D6E1 ;	006E ;	MA	# ( 𝛡 → n ) MATHEMATICAL BOLD PI SYMBOL → LATIN SMALL LETTER N	# →π→
+1D70B ;	006E ;	MA	# ( 𝜋 → n ) MATHEMATICAL ITALIC SMALL PI → LATIN SMALL LETTER N	# →π→
+1D71B ;	006E ;	MA	# ( 𝜛 → n ) MATHEMATICAL ITALIC PI SYMBOL → LATIN SMALL LETTER N	# →π→
+1D745 ;	006E ;	MA	# ( 𝝅 → n ) MATHEMATICAL BOLD ITALIC SMALL PI → LATIN SMALL LETTER N	# →π→
+1D755 ;	006E ;	MA	# ( 𝝕 → n ) MATHEMATICAL BOLD ITALIC PI SYMBOL → LATIN SMALL LETTER N	# →π→
+1D77F ;	006E ;	MA	# ( 𝝿 → n ) MATHEMATICAL SANS-SERIF BOLD SMALL PI → LATIN SMALL LETTER N	# →π→
+1D78F ;	006E ;	MA	# ( 𝞏 → n ) MATHEMATICAL SANS-SERIF BOLD PI SYMBOL → LATIN SMALL LETTER N	# →π→
+1D7B9 ;	006E ;	MA	# ( 𝞹 → n ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL PI → LATIN SMALL LETTER N	# →π→
+1D7C9 ;	006E ;	MA	# ( 𝟉 → n ) MATHEMATICAL SANS-SERIF BOLD ITALIC PI SYMBOL → LATIN SMALL LETTER N	# →π→
+1D28 ;	006E ;	MA	# ( ᴨ → n ) GREEK LETTER SMALL CAPITAL PI → LATIN SMALL LETTER N	# →п→
+043F ;	006E ;	MA	# ( п → n ) CYRILLIC SMALL LETTER PE → LATIN SMALL LETTER N	# 
+0578 ;	006E ;	MA	# ( ո → n ) ARMENIAN SMALL LETTER VO → LATIN SMALL LETTER N	# 
+057C ;	006E ;	MA	# ( ռ → n ) ARMENIAN SMALL LETTER RA → LATIN SMALL LETTER N	# 
+
+FF2E ;	004E ;	MA	# ( N → N ) FULLWIDTH LATIN CAPITAL LETTER N → LATIN CAPITAL LETTER N	# →Ν→
+2115 ;	004E ;	MA	# ( ℕ → N ) DOUBLE-STRUCK CAPITAL N → LATIN CAPITAL LETTER N	# 
+1D40D ;	004E ;	MA	# ( 𝐍 → N ) MATHEMATICAL BOLD CAPITAL N → LATIN CAPITAL LETTER N	# 
+1D441 ;	004E ;	MA	# ( 𝑁 → N ) MATHEMATICAL ITALIC CAPITAL N → LATIN CAPITAL LETTER N	# 
+1D475 ;	004E ;	MA	# ( 𝑵 → N ) MATHEMATICAL BOLD ITALIC CAPITAL N → LATIN CAPITAL LETTER N	# 
+1D4A9 ;	004E ;	MA	# ( 𝒩 → N ) MATHEMATICAL SCRIPT CAPITAL N → LATIN CAPITAL LETTER N	# 
+1D4DD ;	004E ;	MA	# ( 𝓝 → N ) MATHEMATICAL BOLD SCRIPT CAPITAL N → LATIN CAPITAL LETTER N	# 
+1D511 ;	004E ;	MA	# ( 𝔑 → N ) MATHEMATICAL FRAKTUR CAPITAL N → LATIN CAPITAL LETTER N	# 
+1D579 ;	004E ;	MA	# ( 𝕹 → N ) MATHEMATICAL BOLD FRAKTUR CAPITAL N → LATIN CAPITAL LETTER N	# 
+1D5AD ;	004E ;	MA	# ( 𝖭 → N ) MATHEMATICAL SANS-SERIF CAPITAL N → LATIN CAPITAL LETTER N	# 
+1D5E1 ;	004E ;	MA	# ( 𝗡 → N ) MATHEMATICAL SANS-SERIF BOLD CAPITAL N → LATIN CAPITAL LETTER N	# 
+1D615 ;	004E ;	MA	# ( 𝘕 → N ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL N → LATIN CAPITAL LETTER N	# 
+1D649 ;	004E ;	MA	# ( 𝙉 → N ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL N → LATIN CAPITAL LETTER N	# 
+1D67D ;	004E ;	MA	# ( 𝙽 → N ) MATHEMATICAL MONOSPACE CAPITAL N → LATIN CAPITAL LETTER N	# 
+039D ;	004E ;	MA	# ( Ν → N ) GREEK CAPITAL LETTER NU → LATIN CAPITAL LETTER N	# 
+1D6B4 ;	004E ;	MA	# ( 𝚴 → N ) MATHEMATICAL BOLD CAPITAL NU → LATIN CAPITAL LETTER N	# →𝐍→
+1D6EE ;	004E ;	MA	# ( 𝛮 → N ) MATHEMATICAL ITALIC CAPITAL NU → LATIN CAPITAL LETTER N	# →𝑁→
+1D728 ;	004E ;	MA	# ( 𝜨 → N ) MATHEMATICAL BOLD ITALIC CAPITAL NU → LATIN CAPITAL LETTER N	# →𝑵→
+1D762 ;	004E ;	MA	# ( 𝝢 → N ) MATHEMATICAL SANS-SERIF BOLD CAPITAL NU → LATIN CAPITAL LETTER N	# →Ν→
+1D79C ;	004E ;	MA	# ( 𝞜 → N ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL NU → LATIN CAPITAL LETTER N	# →Ν→
+2C9A ;	004E ;	MA	# ( Ⲛ → N ) COPTIC CAPITAL LETTER NI → LATIN CAPITAL LETTER N	# 
+A4E0 ;	004E ;	MA	# ( ꓠ → N ) LISU LETTER NA → LATIN CAPITAL LETTER N	# 
+10513 ;	004E ;	MA	# ( 𐔓 → N ) ELBASAN LETTER NE → LATIN CAPITAL LETTER N	# 
+
+0273 ;	006E 0328 ;	MA	# ( ɳ → n̨ ) LATIN SMALL LETTER N WITH RETROFLEX HOOK → LATIN SMALL LETTER N, COMBINING OGONEK	# →n̢→
+
+019E ;	006E 0329 ;	MA	# ( ƞ → n̩ ) LATIN SMALL LETTER N WITH LONG RIGHT LEG → LATIN SMALL LETTER N, COMBINING VERTICAL LINE BELOW	# 
+03B7 ;	006E 0329 ;	MA	# ( η → n̩ ) GREEK SMALL LETTER ETA → LATIN SMALL LETTER N, COMBINING VERTICAL LINE BELOW	# →ƞ→
+1D6C8 ;	006E 0329 ;	MA	# ( 𝛈 → n̩ ) MATHEMATICAL BOLD SMALL ETA → LATIN SMALL LETTER N, COMBINING VERTICAL LINE BELOW	# →η→→ƞ→
+1D702 ;	006E 0329 ;	MA	# ( 𝜂 → n̩ ) MATHEMATICAL ITALIC SMALL ETA → LATIN SMALL LETTER N, COMBINING VERTICAL LINE BELOW	# →η→→ƞ→
+1D73C ;	006E 0329 ;	MA	# ( 𝜼 → n̩ ) MATHEMATICAL BOLD ITALIC SMALL ETA → LATIN SMALL LETTER N, COMBINING VERTICAL LINE BELOW	# →η→→ƞ→
+1D776 ;	006E 0329 ;	MA	# ( 𝝶 → n̩ ) MATHEMATICAL SANS-SERIF BOLD SMALL ETA → LATIN SMALL LETTER N, COMBINING VERTICAL LINE BELOW	# →η→→ƞ→
+1D7B0 ;	006E 0329 ;	MA	# ( 𝞰 → n̩ ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ETA → LATIN SMALL LETTER N, COMBINING VERTICAL LINE BELOW	# →η→→ƞ→
+
+019D ;	004E 0326 ;	MA	# ( Ɲ → N̦ ) LATIN CAPITAL LETTER N WITH LEFT HOOK → LATIN CAPITAL LETTER N, COMBINING COMMA BELOW	# →N̡→
+
+1D70 ;	006E 0334 ;	MA	# ( ᵰ → n̴ ) LATIN SMALL LETTER N WITH MIDDLE TILDE → LATIN SMALL LETTER N, COMBINING TILDE OVERLAY	# 
+
+01CC ;	006E 006A ;	MA	# ( nj → nj ) LATIN SMALL LETTER NJ → LATIN SMALL LETTER N, LATIN SMALL LETTER J	# 
+
+01CB ;	004E 006A ;	MA	# ( Nj → Nj ) LATIN CAPITAL LETTER N WITH SMALL LETTER J → LATIN CAPITAL LETTER N, LATIN SMALL LETTER J	# 
+
+01CA ;	004E 004A ;	MA	# ( NJ → NJ ) LATIN CAPITAL LETTER NJ → LATIN CAPITAL LETTER N, LATIN CAPITAL LETTER J	# 
+
+2116 ;	004E 006F ;	MA	#* ( № → No ) NUMERO SIGN → LATIN CAPITAL LETTER N, LATIN SMALL LETTER O	# 
+
+0377 ;	1D0E ;	MA	# ( ͷ → ᴎ ) GREEK SMALL LETTER PAMPHYLIAN DIGAMMA → LATIN LETTER SMALL CAPITAL REVERSED N	# →и→
+0438 ;	1D0E ;	MA	# ( и → ᴎ ) CYRILLIC SMALL LETTER I → LATIN LETTER SMALL CAPITAL REVERSED N	# 
+1044D ;	1D0E ;	MA	# ( 𐑍 → ᴎ ) DESERET SMALL LETTER ENG → LATIN LETTER SMALL CAPITAL REVERSED N	# →и→
+
+0146 ;	0272 ;	MA	# ( ņ → ɲ ) LATIN SMALL LETTER N WITH CEDILLA → LATIN SMALL LETTER N WITH LEFT HOOK	# 
+
+0C02 ;	006F ;	MA	# ( ం → o ) TELUGU SIGN ANUSVARA → LATIN SMALL LETTER O	# 
+0C82 ;	006F ;	MA	# ( ಂ → o ) KANNADA SIGN ANUSVARA → LATIN SMALL LETTER O	# 
+0D02 ;	006F ;	MA	# ( ം → o ) MALAYALAM SIGN ANUSVARA → LATIN SMALL LETTER O	# 
+0D82 ;	006F ;	MA	# ( ං → o ) SINHALA SIGN ANUSVARAYA → LATIN SMALL LETTER O	# 
+0966 ;	006F ;	MA	# ( ० → o ) DEVANAGARI DIGIT ZERO → LATIN SMALL LETTER O	# 
+0A66 ;	006F ;	MA	# ( ੦ → o ) GURMUKHI DIGIT ZERO → LATIN SMALL LETTER O	# 
+0AE6 ;	006F ;	MA	# ( ૦ → o ) GUJARATI DIGIT ZERO → LATIN SMALL LETTER O	# 
+0BE6 ;	006F ;	MA	# ( ௦ → o ) TAMIL DIGIT ZERO → LATIN SMALL LETTER O	# 
+0C66 ;	006F ;	MA	# ( ౦ → o ) TELUGU DIGIT ZERO → LATIN SMALL LETTER O	# 
+0CE6 ;	006F ;	MA	# ( ೦ → o ) KANNADA DIGIT ZERO → LATIN SMALL LETTER O	# →౦→
+0D66 ;	006F ;	MA	# ( ൦ → o ) MALAYALAM DIGIT ZERO → LATIN SMALL LETTER O	# 
+0E50 ;	006F ;	MA	# ( ๐ → o ) THAI DIGIT ZERO → LATIN SMALL LETTER O	# 
+0ED0 ;	006F ;	MA	# ( ໐ → o ) LAO DIGIT ZERO → LATIN SMALL LETTER O	# 
+1040 ;	006F ;	MA	# ( ၀ → o ) MYANMAR DIGIT ZERO → LATIN SMALL LETTER O	# 
+0665 ;	006F ;	MA	# ( ‎٥‎ → o ) ARABIC-INDIC DIGIT FIVE → LATIN SMALL LETTER O	# 
+06F5 ;	006F ;	MA	# ( ۵ → o ) EXTENDED ARABIC-INDIC DIGIT FIVE → LATIN SMALL LETTER O	# →‎٥‎→
+FF4F ;	006F ;	MA	# ( o → o ) FULLWIDTH LATIN SMALL LETTER O → LATIN SMALL LETTER O	# →о→
+2134 ;	006F ;	MA	# ( ℴ → o ) SCRIPT SMALL O → LATIN SMALL LETTER O	# 
+1D428 ;	006F ;	MA	# ( 𝐨 → o ) MATHEMATICAL BOLD SMALL O → LATIN SMALL LETTER O	# 
+1D45C ;	006F ;	MA	# ( 𝑜 → o ) MATHEMATICAL ITALIC SMALL O → LATIN SMALL LETTER O	# 
+1D490 ;	006F ;	MA	# ( 𝒐 → o ) MATHEMATICAL BOLD ITALIC SMALL O → LATIN SMALL LETTER O	# 
+1D4F8 ;	006F ;	MA	# ( 𝓸 → o ) MATHEMATICAL BOLD SCRIPT SMALL O → LATIN SMALL LETTER O	# 
+1D52C ;	006F ;	MA	# ( 𝔬 → o ) MATHEMATICAL FRAKTUR SMALL O → LATIN SMALL LETTER O	# 
+1D560 ;	006F ;	MA	# ( 𝕠 → o ) MATHEMATICAL DOUBLE-STRUCK SMALL O → LATIN SMALL LETTER O	# 
+1D594 ;	006F ;	MA	# ( 𝖔 → o ) MATHEMATICAL BOLD FRAKTUR SMALL O → LATIN SMALL LETTER O	# 
+1D5C8 ;	006F ;	MA	# ( 𝗈 → o ) MATHEMATICAL SANS-SERIF SMALL O → LATIN SMALL LETTER O	# 
+1D5FC ;	006F ;	MA	# ( 𝗼 → o ) MATHEMATICAL SANS-SERIF BOLD SMALL O → LATIN SMALL LETTER O	# 
+1D630 ;	006F ;	MA	# ( 𝘰 → o ) MATHEMATICAL SANS-SERIF ITALIC SMALL O → LATIN SMALL LETTER O	# 
+1D664 ;	006F ;	MA	# ( 𝙤 → o ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL O → LATIN SMALL LETTER O	# 
+1D698 ;	006F ;	MA	# ( 𝚘 → o ) MATHEMATICAL MONOSPACE SMALL O → LATIN SMALL LETTER O	# 
+1D0F ;	006F ;	MA	# ( ᴏ → o ) LATIN LETTER SMALL CAPITAL O → LATIN SMALL LETTER O	# 
+1D11 ;	006F ;	MA	# ( ᴑ → o ) LATIN SMALL LETTER SIDEWAYS O → LATIN SMALL LETTER O	# 
+AB3D ;	006F ;	MA	# ( ꬽ → o ) LATIN SMALL LETTER BLACKLETTER O → LATIN SMALL LETTER O	# 
+03BF ;	006F ;	MA	# ( ο → o ) GREEK SMALL LETTER OMICRON → LATIN SMALL LETTER O	# 
+1D6D0 ;	006F ;	MA	# ( 𝛐 → o ) MATHEMATICAL BOLD SMALL OMICRON → LATIN SMALL LETTER O	# →𝐨→
+1D70A ;	006F ;	MA	# ( 𝜊 → o ) MATHEMATICAL ITALIC SMALL OMICRON → LATIN SMALL LETTER O	# →𝑜→
+1D744 ;	006F ;	MA	# ( 𝝄 → o ) MATHEMATICAL BOLD ITALIC SMALL OMICRON → LATIN SMALL LETTER O	# →𝒐→
+1D77E ;	006F ;	MA	# ( 𝝾 → o ) MATHEMATICAL SANS-SERIF BOLD SMALL OMICRON → LATIN SMALL LETTER O	# →ο→
+1D7B8 ;	006F ;	MA	# ( 𝞸 → o ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMICRON → LATIN SMALL LETTER O	# →ο→
+03C3 ;	006F ;	MA	# ( σ → o ) GREEK SMALL LETTER SIGMA → LATIN SMALL LETTER O	# 
+1D6D4 ;	006F ;	MA	# ( 𝛔 → o ) MATHEMATICAL BOLD SMALL SIGMA → LATIN SMALL LETTER O	# →σ→
+1D70E ;	006F ;	MA	# ( 𝜎 → o ) MATHEMATICAL ITALIC SMALL SIGMA → LATIN SMALL LETTER O	# →σ→
+1D748 ;	006F ;	MA	# ( 𝝈 → o ) MATHEMATICAL BOLD ITALIC SMALL SIGMA → LATIN SMALL LETTER O	# →σ→
+1D782 ;	006F ;	MA	# ( 𝞂 → o ) MATHEMATICAL SANS-SERIF BOLD SMALL SIGMA → LATIN SMALL LETTER O	# →σ→
+1D7BC ;	006F ;	MA	# ( 𝞼 → o ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL SIGMA → LATIN SMALL LETTER O	# →σ→
+2C9F ;	006F ;	MA	# ( ⲟ → o ) COPTIC SMALL LETTER O → LATIN SMALL LETTER O	# 
+043E ;	006F ;	MA	# ( о → o ) CYRILLIC SMALL LETTER O → LATIN SMALL LETTER O	# 
+10FF ;	006F ;	MA	# ( ჿ → o ) GEORGIAN LETTER LABIAL SIGN → LATIN SMALL LETTER O	# 
+0585 ;	006F ;	MA	# ( օ → o ) ARMENIAN SMALL LETTER OH → LATIN SMALL LETTER O	# 
+05E1 ;	006F ;	MA	# ( ‎ס‎ → o ) HEBREW LETTER SAMEKH → LATIN SMALL LETTER O	# 
+0647 ;	006F ;	MA	# ( ‎ه‎ → o ) ARABIC LETTER HEH → LATIN SMALL LETTER O	# 
+1EE24 ;	006F ;	MA	# ( ‎𞸤‎ → o ) ARABIC MATHEMATICAL INITIAL HEH → LATIN SMALL LETTER O	# →‎ه‎→
+1EE64 ;	006F ;	MA	# ( ‎𞹤‎ → o ) ARABIC MATHEMATICAL STRETCHED HEH → LATIN SMALL LETTER O	# →‎ه‎→
+1EE84 ;	006F ;	MA	# ( ‎𞺄‎ → o ) ARABIC MATHEMATICAL LOOPED HEH → LATIN SMALL LETTER O	# →‎ه‎→
+FEEB ;	006F ;	MA	# ( ‎ﻫ‎ → o ) ARABIC LETTER HEH INITIAL FORM → LATIN SMALL LETTER O	# →‎ه‎→
+FEEC ;	006F ;	MA	# ( ‎ﻬ‎ → o ) ARABIC LETTER HEH MEDIAL FORM → LATIN SMALL LETTER O	# →‎ه‎→
+FEEA ;	006F ;	MA	# ( ‎ﻪ‎ → o ) ARABIC LETTER HEH FINAL FORM → LATIN SMALL LETTER O	# →‎ه‎→
+FEE9 ;	006F ;	MA	# ( ‎ﻩ‎ → o ) ARABIC LETTER HEH ISOLATED FORM → LATIN SMALL LETTER O	# →‎ه‎→
+06BE ;	006F ;	MA	# ( ‎ھ‎ → o ) ARABIC LETTER HEH DOACHASHMEE → LATIN SMALL LETTER O	# →‎ه‎→
+FBAC ;	006F ;	MA	# ( ‎ﮬ‎ → o ) ARABIC LETTER HEH DOACHASHMEE INITIAL FORM → LATIN SMALL LETTER O	# →‎ﻫ‎→→‎ه‎→
+FBAD ;	006F ;	MA	# ( ‎ﮭ‎ → o ) ARABIC LETTER HEH DOACHASHMEE MEDIAL FORM → LATIN SMALL LETTER O	# →‎ﻬ‎→→‎ه‎→
+FBAB ;	006F ;	MA	# ( ‎ﮫ‎ → o ) ARABIC LETTER HEH DOACHASHMEE FINAL FORM → LATIN SMALL LETTER O	# →‎ﻪ‎→→‎ه‎→
+FBAA ;	006F ;	MA	# ( ‎ﮪ‎ → o ) ARABIC LETTER HEH DOACHASHMEE ISOLATED FORM → LATIN SMALL LETTER O	# →‎ه‎→
+06C1 ;	006F ;	MA	# ( ‎ہ‎ → o ) ARABIC LETTER HEH GOAL → LATIN SMALL LETTER O	# →‎ه‎→
+FBA8 ;	006F ;	MA	# ( ‎ﮨ‎ → o ) ARABIC LETTER HEH GOAL INITIAL FORM → LATIN SMALL LETTER O	# →‎ہ‎→→‎ه‎→
+FBA9 ;	006F ;	MA	# ( ‎ﮩ‎ → o ) ARABIC LETTER HEH GOAL MEDIAL FORM → LATIN SMALL LETTER O	# →‎ہ‎→→‎ه‎→
+FBA7 ;	006F ;	MA	# ( ‎ﮧ‎ → o ) ARABIC LETTER HEH GOAL FINAL FORM → LATIN SMALL LETTER O	# →‎ہ‎→→‎ه‎→
+FBA6 ;	006F ;	MA	# ( ‎ﮦ‎ → o ) ARABIC LETTER HEH GOAL ISOLATED FORM → LATIN SMALL LETTER O	# →‎ه‎→
+06D5 ;	006F ;	MA	# ( ‎ە‎ → o ) ARABIC LETTER AE → LATIN SMALL LETTER O	# →‎ه‎→
+0D20 ;	006F ;	MA	# ( ഠ → o ) MALAYALAM LETTER TTHA → LATIN SMALL LETTER O	# 
+101D ;	006F ;	MA	# ( ဝ → o ) MYANMAR LETTER WA → LATIN SMALL LETTER O	# 
+118C8 ;	006F ;	MA	# ( 𑣈 → o ) WARANG CITI SMALL LETTER E → LATIN SMALL LETTER O	# 
+118D7 ;	006F ;	MA	# ( 𑣗 → o ) WARANG CITI SMALL LETTER BU → LATIN SMALL LETTER O	# 
+1042C ;	006F ;	MA	# ( 𐐬 → o ) DESERET SMALL LETTER LONG O → LATIN SMALL LETTER O	# 
+
+0030 ;	004F ;	MA	# ( 0 → O ) DIGIT ZERO → LATIN CAPITAL LETTER O	# 
+07C0 ;	004F ;	MA	# ( ‎߀‎ → O ) NKO DIGIT ZERO → LATIN CAPITAL LETTER O	# →0→
+09E6 ;	004F ;	MA	# ( ০ → O ) BENGALI DIGIT ZERO → LATIN CAPITAL LETTER O	# →0→
+0B66 ;	004F ;	MA	# ( ୦ → O ) ORIYA DIGIT ZERO → LATIN CAPITAL LETTER O	# →0→
+3007 ;	004F ;	MA	# ( 〇 → O ) IDEOGRAPHIC NUMBER ZERO → LATIN CAPITAL LETTER O	# 
+114D0 ;	004F ;	MA	# ( 𑓐 → O ) TIRHUTA DIGIT ZERO → LATIN CAPITAL LETTER O	# →০→→0→
+118E0 ;	004F ;	MA	# ( 𑣠 → O ) WARANG CITI DIGIT ZERO → LATIN CAPITAL LETTER O	# →0→
+1D7CE ;	004F ;	MA	# ( 𝟎 → O ) MATHEMATICAL BOLD DIGIT ZERO → LATIN CAPITAL LETTER O	# →0→
+1D7D8 ;	004F ;	MA	# ( 𝟘 → O ) MATHEMATICAL DOUBLE-STRUCK DIGIT ZERO → LATIN CAPITAL LETTER O	# →0→
+1D7E2 ;	004F ;	MA	# ( 𝟢 → O ) MATHEMATICAL SANS-SERIF DIGIT ZERO → LATIN CAPITAL LETTER O	# →0→
+1D7EC ;	004F ;	MA	# ( 𝟬 → O ) MATHEMATICAL SANS-SERIF BOLD DIGIT ZERO → LATIN CAPITAL LETTER O	# →0→
+1D7F6 ;	004F ;	MA	# ( 𝟶 → O ) MATHEMATICAL MONOSPACE DIGIT ZERO → LATIN CAPITAL LETTER O	# →0→
+FF2F ;	004F ;	MA	# ( O → O ) FULLWIDTH LATIN CAPITAL LETTER O → LATIN CAPITAL LETTER O	# →О→
+1D40E ;	004F ;	MA	# ( 𝐎 → O ) MATHEMATICAL BOLD CAPITAL O → LATIN CAPITAL LETTER O	# 
+1D442 ;	004F ;	MA	# ( 𝑂 → O ) MATHEMATICAL ITALIC CAPITAL O → LATIN CAPITAL LETTER O	# 
+1D476 ;	004F ;	MA	# ( 𝑶 → O ) MATHEMATICAL BOLD ITALIC CAPITAL O → LATIN CAPITAL LETTER O	# 
+1D4AA ;	004F ;	MA	# ( 𝒪 → O ) MATHEMATICAL SCRIPT CAPITAL O → LATIN CAPITAL LETTER O	# 
+1D4DE ;	004F ;	MA	# ( 𝓞 → O ) MATHEMATICAL BOLD SCRIPT CAPITAL O → LATIN CAPITAL LETTER O	# 
+1D512 ;	004F ;	MA	# ( 𝔒 → O ) MATHEMATICAL FRAKTUR CAPITAL O → LATIN CAPITAL LETTER O	# 
+1D546 ;	004F ;	MA	# ( 𝕆 → O ) MATHEMATICAL DOUBLE-STRUCK CAPITAL O → LATIN CAPITAL LETTER O	# 
+1D57A ;	004F ;	MA	# ( 𝕺 → O ) MATHEMATICAL BOLD FRAKTUR CAPITAL O → LATIN CAPITAL LETTER O	# 
+1D5AE ;	004F ;	MA	# ( 𝖮 → O ) MATHEMATICAL SANS-SERIF CAPITAL O → LATIN CAPITAL LETTER O	# 
+1D5E2 ;	004F ;	MA	# ( 𝗢 → O ) MATHEMATICAL SANS-SERIF BOLD CAPITAL O → LATIN CAPITAL LETTER O	# 
+1D616 ;	004F ;	MA	# ( 𝘖 → O ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL O → LATIN CAPITAL LETTER O	# 
+1D64A ;	004F ;	MA	# ( 𝙊 → O ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL O → LATIN CAPITAL LETTER O	# 
+1D67E ;	004F ;	MA	# ( 𝙾 → O ) MATHEMATICAL MONOSPACE CAPITAL O → LATIN CAPITAL LETTER O	# 
+039F ;	004F ;	MA	# ( Ο → O ) GREEK CAPITAL LETTER OMICRON → LATIN CAPITAL LETTER O	# 
+1D6B6 ;	004F ;	MA	# ( 𝚶 → O ) MATHEMATICAL BOLD CAPITAL OMICRON → LATIN CAPITAL LETTER O	# →𝐎→
+1D6F0 ;	004F ;	MA	# ( 𝛰 → O ) MATHEMATICAL ITALIC CAPITAL OMICRON → LATIN CAPITAL LETTER O	# →𝑂→
+1D72A ;	004F ;	MA	# ( 𝜪 → O ) MATHEMATICAL BOLD ITALIC CAPITAL OMICRON → LATIN CAPITAL LETTER O	# →𝑶→
+1D764 ;	004F ;	MA	# ( 𝝤 → O ) MATHEMATICAL SANS-SERIF BOLD CAPITAL OMICRON → LATIN CAPITAL LETTER O	# →Ο→
+1D79E ;	004F ;	MA	# ( 𝞞 → O ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMICRON → LATIN CAPITAL LETTER O	# →Ο→
+2C9E ;	004F ;	MA	# ( Ⲟ → O ) COPTIC CAPITAL LETTER O → LATIN CAPITAL LETTER O	# 
+041E ;	004F ;	MA	# ( О → O ) CYRILLIC CAPITAL LETTER O → LATIN CAPITAL LETTER O	# 
+0555 ;	004F ;	MA	# ( Օ → O ) ARMENIAN CAPITAL LETTER OH → LATIN CAPITAL LETTER O	# 
+2D54 ;	004F ;	MA	# ( ⵔ → O ) TIFINAGH LETTER YAR → LATIN CAPITAL LETTER O	# 
+12D0 ;	004F ;	MA	# ( ዐ → O ) ETHIOPIC SYLLABLE PHARYNGEAL A → LATIN CAPITAL LETTER O	# →Օ→
+0B20 ;	004F ;	MA	# ( ଠ → O ) ORIYA LETTER TTHA → LATIN CAPITAL LETTER O	# →୦→→0→
+A4F3 ;	004F ;	MA	# ( ꓳ → O ) LISU LETTER O → LATIN CAPITAL LETTER O	# 
+118B5 ;	004F ;	MA	# ( 𑢵 → O ) WARANG CITI CAPITAL LETTER AT → LATIN CAPITAL LETTER O	# 
+10292 ;	004F ;	MA	# ( 𐊒 → O ) LYCIAN LETTER U → LATIN CAPITAL LETTER O	# 
+102AB ;	004F ;	MA	# ( 𐊫 → O ) CARIAN LETTER O → LATIN CAPITAL LETTER O	# 
+10404 ;	004F ;	MA	# ( 𐐄 → O ) DESERET CAPITAL LETTER LONG O → LATIN CAPITAL LETTER O	# 
+10516 ;	004F ;	MA	# ( 𐔖 → O ) ELBASAN LETTER O → LATIN CAPITAL LETTER O	# 
+
+2070 ;	00BA ;	MA	#* ( ⁰ → º ) SUPERSCRIPT ZERO → MASCULINE ORDINAL INDICATOR	# 
+1D52 ;	00BA ;	MA	# ( ᵒ → º ) MODIFIER LETTER SMALL O → MASCULINE ORDINAL INDICATOR	# →⁰→
+
+01D2 ;	014F ;	MA	# ( ǒ → ŏ ) LATIN SMALL LETTER O WITH CARON → LATIN SMALL LETTER O WITH BREVE	# 
+
+01D1 ;	014E ;	MA	# ( Ǒ → Ŏ ) LATIN CAPITAL LETTER O WITH CARON → LATIN CAPITAL LETTER O WITH BREVE	# 
+
+06FF ;	006F 0302 ;	MA	# ( ‎ۿ‎ → ô ) ARABIC LETTER HEH WITH INVERTED V → LATIN SMALL LETTER O, COMBINING CIRCUMFLEX ACCENT	# →‎ھٛ‎→
+
+00F8 ;	006F 0338 ;	MA	# ( ø → o̸ ) LATIN SMALL LETTER O WITH STROKE → LATIN SMALL LETTER O, COMBINING LONG SOLIDUS OVERLAY	# →o̷→
+AB3E ;	006F 0338 ;	MA	# ( ꬾ → o̸ ) LATIN SMALL LETTER BLACKLETTER O WITH STROKE → LATIN SMALL LETTER O, COMBINING LONG SOLIDUS OVERLAY	# →ø→→o̷→
+
+00D8 ;	004F 0338 ;	MA	# ( Ø → O̸ ) LATIN CAPITAL LETTER O WITH STROKE → LATIN CAPITAL LETTER O, COMBINING LONG SOLIDUS OVERLAY	# 
+2D41 ;	004F 0338 ;	MA	# ( ⵁ → O̸ ) TIFINAGH LETTER BERBER ACADEMY YAH → LATIN CAPITAL LETTER O, COMBINING LONG SOLIDUS OVERLAY	# →Ø→
+
+01FE ;	004F 0338 0301 ;	MA	# ( Ǿ → Ó̸ ) LATIN CAPITAL LETTER O WITH STROKE AND ACUTE → LATIN CAPITAL LETTER O, COMBINING LONG SOLIDUS OVERLAY, COMBINING ACUTE ACCENT	# 
+
+0275 ;	006F 0335 ;	MA	# ( ɵ → o̵ ) LATIN SMALL LETTER BARRED O → LATIN SMALL LETTER O, COMBINING SHORT STROKE OVERLAY	# 
+A74B ;	006F 0335 ;	MA	# ( ꝋ → o̵ ) LATIN SMALL LETTER O WITH LONG STROKE OVERLAY → LATIN SMALL LETTER O, COMBINING SHORT STROKE OVERLAY	# →o̶→
+04E9 ;	006F 0335 ;	MA	# ( ө → o̵ ) CYRILLIC SMALL LETTER BARRED O → LATIN SMALL LETTER O, COMBINING SHORT STROKE OVERLAY	# →ѳ→
+0473 ;	006F 0335 ;	MA	# ( ѳ → o̵ ) CYRILLIC SMALL LETTER FITA → LATIN SMALL LETTER O, COMBINING SHORT STROKE OVERLAY	# 
+
+2296 ;	004F 0335 ;	MA	#* ( ⊖ → O̵ ) CIRCLED MINUS → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →θ→→Ꮎ→
+229D ;	004F 0335 ;	MA	#* ( ⊝ → O̵ ) CIRCLED DASH → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →⊖→→θ→→Ꮎ→
+236C ;	004F 0335 ;	MA	#* ( ⍬ → O̵ ) APL FUNCTIONAL SYMBOL ZILDE → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →θ→→Ꮎ→
+1D21A ;	004F 0335 ;	MA	#* ( 𝈚 → O̵ ) GREEK VOCAL NOTATION SYMBOL-52 → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Ꝋ→→O̶→
+1F714 ;	004F 0335 ;	MA	#* ( 🜔 → O̵ ) ALCHEMICAL SYMBOL FOR SALT → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Ɵ→→O̶→
+019F ;	004F 0335 ;	MA	# ( Ɵ → O̵ ) LATIN CAPITAL LETTER O WITH MIDDLE TILDE → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →O̶→
+A74A ;	004F 0335 ;	MA	# ( Ꝋ → O̵ ) LATIN CAPITAL LETTER O WITH LONG STROKE OVERLAY → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →O̶→
+03B8 ;	004F 0335 ;	MA	# ( θ → O̵ ) GREEK SMALL LETTER THETA → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Ꮎ→
+03D1 ;	004F 0335 ;	MA	# ( ϑ → O̵ ) GREEK THETA SYMBOL → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →θ→→Ꮎ→
+1D6C9 ;	004F 0335 ;	MA	# ( 𝛉 → O̵ ) MATHEMATICAL BOLD SMALL THETA → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →θ→→Ꮎ→
+1D6DD ;	004F 0335 ;	MA	# ( 𝛝 → O̵ ) MATHEMATICAL BOLD THETA SYMBOL → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →θ→→Ꮎ→
+1D703 ;	004F 0335 ;	MA	# ( 𝜃 → O̵ ) MATHEMATICAL ITALIC SMALL THETA → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →θ→→Ꮎ→
+1D717 ;	004F 0335 ;	MA	# ( 𝜗 → O̵ ) MATHEMATICAL ITALIC THETA SYMBOL → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →θ→→Ꮎ→
+1D73D ;	004F 0335 ;	MA	# ( 𝜽 → O̵ ) MATHEMATICAL BOLD ITALIC SMALL THETA → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →θ→→Ꮎ→
+1D751 ;	004F 0335 ;	MA	# ( 𝝑 → O̵ ) MATHEMATICAL BOLD ITALIC THETA SYMBOL → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →θ→→Ꮎ→
+1D777 ;	004F 0335 ;	MA	# ( 𝝷 → O̵ ) MATHEMATICAL SANS-SERIF BOLD SMALL THETA → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →θ→→Ꮎ→
+1D78B ;	004F 0335 ;	MA	# ( 𝞋 → O̵ ) MATHEMATICAL SANS-SERIF BOLD THETA SYMBOL → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →θ→→Ꮎ→
+1D7B1 ;	004F 0335 ;	MA	# ( 𝞱 → O̵ ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL THETA → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →θ→→Ꮎ→
+1D7C5 ;	004F 0335 ;	MA	# ( 𝟅 → O̵ ) MATHEMATICAL SANS-SERIF BOLD ITALIC THETA SYMBOL → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →θ→→Ꮎ→
+0398 ;	004F 0335 ;	MA	# ( Θ → O̵ ) GREEK CAPITAL LETTER THETA → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Ꮎ→
+03F4 ;	004F 0335 ;	MA	# ( ϴ → O̵ ) GREEK CAPITAL THETA SYMBOL → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Ѳ→→О̵→
+1D6AF ;	004F 0335 ;	MA	# ( 𝚯 → O̵ ) MATHEMATICAL BOLD CAPITAL THETA → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Θ→→Ꮎ→
+1D6B9 ;	004F 0335 ;	MA	# ( 𝚹 → O̵ ) MATHEMATICAL BOLD CAPITAL THETA SYMBOL → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Θ→→Ꮎ→
+1D6E9 ;	004F 0335 ;	MA	# ( 𝛩 → O̵ ) MATHEMATICAL ITALIC CAPITAL THETA → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Θ→→Ꮎ→
+1D6F3 ;	004F 0335 ;	MA	# ( 𝛳 → O̵ ) MATHEMATICAL ITALIC CAPITAL THETA SYMBOL → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Θ→→Ꮎ→
+1D723 ;	004F 0335 ;	MA	# ( 𝜣 → O̵ ) MATHEMATICAL BOLD ITALIC CAPITAL THETA → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Θ→→Ꮎ→
+1D72D ;	004F 0335 ;	MA	# ( 𝜭 → O̵ ) MATHEMATICAL BOLD ITALIC CAPITAL THETA SYMBOL → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Θ→→Ꮎ→
+1D75D ;	004F 0335 ;	MA	# ( 𝝝 → O̵ ) MATHEMATICAL SANS-SERIF BOLD CAPITAL THETA → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Θ→→Ꮎ→
+1D767 ;	004F 0335 ;	MA	# ( 𝝧 → O̵ ) MATHEMATICAL SANS-SERIF BOLD CAPITAL THETA SYMBOL → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Θ→→Ꮎ→
+1D797 ;	004F 0335 ;	MA	# ( 𝞗 → O̵ ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL THETA → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Θ→→Ꮎ→
+1D7A1 ;	004F 0335 ;	MA	# ( 𝞡 → O̵ ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL THETA SYMBOL → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Θ→→Ꮎ→
+04E8 ;	004F 0335 ;	MA	# ( Ө → O̵ ) CYRILLIC CAPITAL LETTER BARRED O → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Ѳ→→О̵→
+0472 ;	004F 0335 ;	MA	# ( Ѳ → O̵ ) CYRILLIC CAPITAL LETTER FITA → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →О̵→
+2D31 ;	004F 0335 ;	MA	# ( ⴱ → O̵ ) TIFINAGH LETTER YAB → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Ɵ→→O̶→
+13BE ;	004F 0335 ;	MA	# ( Ꮎ → O̵ ) CHEROKEE LETTER NA → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# 
+13EB ;	004F 0335 ;	MA	# ( Ꮻ → O̵ ) CHEROKEE LETTER WI → LATIN CAPITAL LETTER O, COMBINING SHORT STROKE OVERLAY	# →Ѳ→→О̵→
+
+FCD9 ;	006F 0670 ;	MA	# ( ‎ﳙ‎ → oٰ ) ARABIC LIGATURE HEH WITH SUPERSCRIPT ALEF INITIAL FORM → LATIN SMALL LETTER O, ARABIC LETTER SUPERSCRIPT ALEF	# →‎هٰ‎→
+
+1F101 ;	004F 002C ;	MA	#* ( 🄁 → O, ) DIGIT ZERO COMMA → LATIN CAPITAL LETTER O, COMMA	# →0,→
+
+1F100 ;	004F 002E ;	MA	#* ( 🄀 → O. ) DIGIT ZERO FULL STOP → LATIN CAPITAL LETTER O, FULL STOP	# →0.→
+
+01A1 ;	006F 0027 ;	MA	# ( ơ → o' ) LATIN SMALL LETTER O WITH HORN → LATIN SMALL LETTER O, APOSTROPHE	# →oʼ→
+
+01A0 ;	004F 0027 ;	MA	# ( Ơ → O' ) LATIN CAPITAL LETTER O WITH HORN → LATIN CAPITAL LETTER O, APOSTROPHE	# →Oʼ→
+13A4 ;	004F 0027 ;	MA	# ( Ꭴ → O' ) CHEROKEE LETTER U → LATIN CAPITAL LETTER O, APOSTROPHE	# →Ơ→→Oʼ→
+
+0025 ;	00BA 002F 2080 ;	MA	#* ( % → º/₀ ) PERCENT SIGN → MASCULINE ORDINAL INDICATOR, SOLIDUS, SUBSCRIPT ZERO	# →⁰/₀→
+066A ;	00BA 002F 2080 ;	MA	#* ( ٪ → º/₀ ) ARABIC PERCENT SIGN → MASCULINE ORDINAL INDICATOR, SOLIDUS, SUBSCRIPT ZERO	# →%→→⁰/₀→
+2052 ;	00BA 002F 2080 ;	MA	#* ( ⁒ → º/₀ ) COMMERCIAL MINUS SIGN → MASCULINE ORDINAL INDICATOR, SOLIDUS, SUBSCRIPT ZERO	# →%→→⁰/₀→
+
+2030 ;	00BA 002F 2080 2080 ;	MA	#* ( ‰ → º/₀₀ ) PER MILLE SIGN → MASCULINE ORDINAL INDICATOR, SOLIDUS, SUBSCRIPT ZERO, SUBSCRIPT ZERO	# →⁰/₀₀→
+0609 ;	00BA 002F 2080 2080 ;	MA	#* ( ؉ → º/₀₀ ) ARABIC-INDIC PER MILLE SIGN → MASCULINE ORDINAL INDICATOR, SOLIDUS, SUBSCRIPT ZERO, SUBSCRIPT ZERO	# →‰→→⁰/₀₀→
+
+2031 ;	00BA 002F 2080 2080 2080 ;	MA	#* ( ‱ → º/₀₀₀ ) PER TEN THOUSAND SIGN → MASCULINE ORDINAL INDICATOR, SOLIDUS, SUBSCRIPT ZERO, SUBSCRIPT ZERO, SUBSCRIPT ZERO	# →⁰/₀₀₀→
+060A ;	00BA 002F 2080 2080 2080 ;	MA	#* ( ؊ → º/₀₀₀ ) ARABIC-INDIC PER TEN THOUSAND SIGN → MASCULINE ORDINAL INDICATOR, SOLIDUS, SUBSCRIPT ZERO, SUBSCRIPT ZERO, SUBSCRIPT ZERO	# →‱→→⁰/₀₀₀→
+
+0153 ;	006F 0065 ;	MA	# ( œ → oe ) LATIN SMALL LIGATURE OE → LATIN SMALL LETTER O, LATIN SMALL LETTER E	# 
+
+0152 ;	004F 0045 ;	MA	# ( Œ → OE ) LATIN CAPITAL LIGATURE OE → LATIN CAPITAL LETTER O, LATIN CAPITAL LETTER E	# 
+
+0276 ;	006F 1D07 ;	MA	# ( ɶ → oᴇ ) LATIN LETTER SMALL CAPITAL OE → LATIN SMALL LETTER O, LATIN LETTER SMALL CAPITAL E	# 
+
+221E ;	006F 006F ;	MA	#* ( ∞ → oo ) INFINITY → LATIN SMALL LETTER O, LATIN SMALL LETTER O	# →ꝏ→
+A74F ;	006F 006F ;	MA	# ( ꝏ → oo ) LATIN SMALL LETTER OO → LATIN SMALL LETTER O, LATIN SMALL LETTER O	# 
+A699 ;	006F 006F ;	MA	# ( ꚙ → oo ) CYRILLIC SMALL LETTER DOUBLE O → LATIN SMALL LETTER O, LATIN SMALL LETTER O	# 
+
+A74E ;	004F 004F ;	MA	# ( Ꝏ → OO ) LATIN CAPITAL LETTER OO → LATIN CAPITAL LETTER O, LATIN CAPITAL LETTER O	# 
+A698 ;	004F 004F ;	MA	# ( Ꚙ → OO ) CYRILLIC CAPITAL LETTER DOUBLE O → LATIN CAPITAL LETTER O, LATIN CAPITAL LETTER O	# 
+
+FCD7 ;	006F 062C ;	MA	# ( ‎ﳗ‎ → ‎oج‎ ) ARABIC LIGATURE HEH WITH JEEM INITIAL FORM → LATIN SMALL LETTER O, ARABIC LETTER JEEM	# →‎هج‎→
+FC51 ;	006F 062C ;	MA	# ( ‎ﱑ‎ → ‎oج‎ ) ARABIC LIGATURE HEH WITH JEEM ISOLATED FORM → LATIN SMALL LETTER O, ARABIC LETTER JEEM	# →‎هج‎→
+
+FCD8 ;	006F 0645 ;	MA	# ( ‎ﳘ‎ → ‎oم‎ ) ARABIC LIGATURE HEH WITH MEEM INITIAL FORM → LATIN SMALL LETTER O, ARABIC LETTER MEEM	# →‎هم‎→
+FC52 ;	006F 0645 ;	MA	# ( ‎ﱒ‎ → ‎oم‎ ) ARABIC LIGATURE HEH WITH MEEM ISOLATED FORM → LATIN SMALL LETTER O, ARABIC LETTER MEEM	# →‎هم‎→
+
+FD93 ;	006F 0645 062C ;	MA	# ( ‎ﶓ‎ → ‎oمج‎ ) ARABIC LIGATURE HEH WITH MEEM WITH JEEM INITIAL FORM → LATIN SMALL LETTER O, ARABIC LETTER MEEM, ARABIC LETTER JEEM	# →‎همج‎→
+
+FD94 ;	006F 0645 0645 ;	MA	# ( ‎ﶔ‎ → ‎oمم‎ ) ARABIC LIGATURE HEH WITH MEEM WITH MEEM INITIAL FORM → LATIN SMALL LETTER O, ARABIC LETTER MEEM, ARABIC LETTER MEEM	# →‎همم‎→
+
+FC53 ;	006F 0649 ;	MA	# ( ‎ﱓ‎ → ‎oى‎ ) ARABIC LIGATURE HEH WITH ALEF MAKSURA ISOLATED FORM → LATIN SMALL LETTER O, ARABIC LETTER ALEF MAKSURA	# →‎هى‎→
+FC54 ;	006F 0649 ;	MA	# ( ‎ﱔ‎ → ‎oى‎ ) ARABIC LIGATURE HEH WITH YEH ISOLATED FORM → LATIN SMALL LETTER O, ARABIC LETTER ALEF MAKSURA	# →‎هي‎→
+
+0D5F ;	006F 0D30 006F ;	MA	# ( ൟ → oരo ) MALAYALAM LETTER ARCHAIC II → LATIN SMALL LETTER O, MALAYALAM LETTER RA, LATIN SMALL LETTER O	# →ംരം→
+
+1010 ;	006F 102C ;	MA	# ( တ → oာ ) MYANMAR LETTER TA → LATIN SMALL LETTER O, MYANMAR VOWEL SIGN AA	# →ဝာ→
+
+3358 ;	004F 70B9 ;	MA	#* ( ㍘ → O点 ) IDEOGRAPHIC TELEGRAPH SYMBOL FOR HOUR ZERO → LATIN CAPITAL LETTER O, CJK UNIFIED IDEOGRAPH-70B9	# →0点→
+
+2184 ;	0254 ;	MA	# ( ↄ → ɔ ) LATIN SMALL LETTER REVERSED C → LATIN SMALL LETTER OPEN O	# 
+1D10 ;	0254 ;	MA	# ( ᴐ → ɔ ) LATIN LETTER SMALL CAPITAL OPEN O → LATIN SMALL LETTER OPEN O	# 
+037B ;	0254 ;	MA	# ( ͻ → ɔ ) GREEK SMALL REVERSED LUNATE SIGMA SYMBOL → LATIN SMALL LETTER OPEN O	# 
+1044B ;	0254 ;	MA	# ( 𐑋 → ɔ ) DESERET SMALL LETTER EM → LATIN SMALL LETTER OPEN O	# 
+
+2183 ;	0186 ;	MA	# ( Ↄ → Ɔ ) ROMAN NUMERAL REVERSED ONE HUNDRED → LATIN CAPITAL LETTER OPEN O	# 
+03FD ;	0186 ;	MA	# ( Ͻ → Ɔ ) GREEK CAPITAL REVERSED LUNATE SIGMA SYMBOL → LATIN CAPITAL LETTER OPEN O	# 
+A4DB ;	0186 ;	MA	# ( ꓛ → Ɔ ) LISU LETTER CHA → LATIN CAPITAL LETTER OPEN O	# 
+10423 ;	0186 ;	MA	# ( 𐐣 → Ɔ ) DESERET CAPITAL LETTER EM → LATIN CAPITAL LETTER OPEN O	# 
+
+AB3F ;	0254 0338 ;	MA	# ( ꬿ → ɔ̸ ) LATIN SMALL LETTER OPEN O WITH STROKE → LATIN SMALL LETTER OPEN O, COMBINING LONG SOLIDUS OVERLAY	# 
+
+1043F ;	0277 ;	MA	# ( 𐐿 → ɷ ) DESERET SMALL LETTER KAY → LATIN SMALL LETTER CLOSED OMEGA	# 
+
+2374 ;	0070 ;	MA	#* ( ⍴ → p ) APL FUNCTIONAL SYMBOL RHO → LATIN SMALL LETTER P	# →ρ→
+FF50 ;	0070 ;	MA	# ( p → p ) FULLWIDTH LATIN SMALL LETTER P → LATIN SMALL LETTER P	# →р→
+1D429 ;	0070 ;	MA	# ( 𝐩 → p ) MATHEMATICAL BOLD SMALL P → LATIN SMALL LETTER P	# 
+1D45D ;	0070 ;	MA	# ( 𝑝 → p ) MATHEMATICAL ITALIC SMALL P → LATIN SMALL LETTER P	# 
+1D491 ;	0070 ;	MA	# ( 𝒑 → p ) MATHEMATICAL BOLD ITALIC SMALL P → LATIN SMALL LETTER P	# 
+1D4C5 ;	0070 ;	MA	# ( 𝓅 → p ) MATHEMATICAL SCRIPT SMALL P → LATIN SMALL LETTER P	# 
+1D4F9 ;	0070 ;	MA	# ( 𝓹 → p ) MATHEMATICAL BOLD SCRIPT SMALL P → LATIN SMALL LETTER P	# 
+1D52D ;	0070 ;	MA	# ( 𝔭 → p ) MATHEMATICAL FRAKTUR SMALL P → LATIN SMALL LETTER P	# 
+1D561 ;	0070 ;	MA	# ( 𝕡 → p ) MATHEMATICAL DOUBLE-STRUCK SMALL P → LATIN SMALL LETTER P	# 
+1D595 ;	0070 ;	MA	# ( 𝖕 → p ) MATHEMATICAL BOLD FRAKTUR SMALL P → LATIN SMALL LETTER P	# 
+1D5C9 ;	0070 ;	MA	# ( 𝗉 → p ) MATHEMATICAL SANS-SERIF SMALL P → LATIN SMALL LETTER P	# 
+1D5FD ;	0070 ;	MA	# ( 𝗽 → p ) MATHEMATICAL SANS-SERIF BOLD SMALL P → LATIN SMALL LETTER P	# 
+1D631 ;	0070 ;	MA	# ( 𝘱 → p ) MATHEMATICAL SANS-SERIF ITALIC SMALL P → LATIN SMALL LETTER P	# 
+1D665 ;	0070 ;	MA	# ( 𝙥 → p ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL P → LATIN SMALL LETTER P	# 
+1D699 ;	0070 ;	MA	# ( 𝚙 → p ) MATHEMATICAL MONOSPACE SMALL P → LATIN SMALL LETTER P	# 
+03C1 ;	0070 ;	MA	# ( ρ → p ) GREEK SMALL LETTER RHO → LATIN SMALL LETTER P	# 
+03F1 ;	0070 ;	MA	# ( ϱ → p ) GREEK RHO SYMBOL → LATIN SMALL LETTER P	# →ρ→
+1D6D2 ;	0070 ;	MA	# ( 𝛒 → p ) MATHEMATICAL BOLD SMALL RHO → LATIN SMALL LETTER P	# →ρ→
+1D6E0 ;	0070 ;	MA	# ( 𝛠 → p ) MATHEMATICAL BOLD RHO SYMBOL → LATIN SMALL LETTER P	# →ρ→
+1D70C ;	0070 ;	MA	# ( 𝜌 → p ) MATHEMATICAL ITALIC SMALL RHO → LATIN SMALL LETTER P	# →ρ→
+1D71A ;	0070 ;	MA	# ( 𝜚 → p ) MATHEMATICAL ITALIC RHO SYMBOL → LATIN SMALL LETTER P	# →ρ→
+1D746 ;	0070 ;	MA	# ( 𝝆 → p ) MATHEMATICAL BOLD ITALIC SMALL RHO → LATIN SMALL LETTER P	# →ρ→
+1D754 ;	0070 ;	MA	# ( 𝝔 → p ) MATHEMATICAL BOLD ITALIC RHO SYMBOL → LATIN SMALL LETTER P	# →ρ→
+1D780 ;	0070 ;	MA	# ( 𝞀 → p ) MATHEMATICAL SANS-SERIF BOLD SMALL RHO → LATIN SMALL LETTER P	# →ρ→
+1D78E ;	0070 ;	MA	# ( 𝞎 → p ) MATHEMATICAL SANS-SERIF BOLD RHO SYMBOL → LATIN SMALL LETTER P	# →ρ→
+1D7BA ;	0070 ;	MA	# ( 𝞺 → p ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL RHO → LATIN SMALL LETTER P	# →ρ→
+1D7C8 ;	0070 ;	MA	# ( 𝟈 → p ) MATHEMATICAL SANS-SERIF BOLD ITALIC RHO SYMBOL → LATIN SMALL LETTER P	# →ρ→
+2CA3 ;	0070 ;	MA	# ( ⲣ → p ) COPTIC SMALL LETTER RO → LATIN SMALL LETTER P	# →ρ→
+0440 ;	0070 ;	MA	# ( р → p ) CYRILLIC SMALL LETTER ER → LATIN SMALL LETTER P	# 
+
+FF30 ;	0050 ;	MA	# ( P → P ) FULLWIDTH LATIN CAPITAL LETTER P → LATIN CAPITAL LETTER P	# →Р→
+2119 ;	0050 ;	MA	# ( ℙ → P ) DOUBLE-STRUCK CAPITAL P → LATIN CAPITAL LETTER P	# 
+1D40F ;	0050 ;	MA	# ( 𝐏 → P ) MATHEMATICAL BOLD CAPITAL P → LATIN CAPITAL LETTER P	# 
+1D443 ;	0050 ;	MA	# ( 𝑃 → P ) MATHEMATICAL ITALIC CAPITAL P → LATIN CAPITAL LETTER P	# 
+1D477 ;	0050 ;	MA	# ( 𝑷 → P ) MATHEMATICAL BOLD ITALIC CAPITAL P → LATIN CAPITAL LETTER P	# 
+1D4AB ;	0050 ;	MA	# ( 𝒫 → P ) MATHEMATICAL SCRIPT CAPITAL P → LATIN CAPITAL LETTER P	# 
+1D4DF ;	0050 ;	MA	# ( 𝓟 → P ) MATHEMATICAL BOLD SCRIPT CAPITAL P → LATIN CAPITAL LETTER P	# 
+1D513 ;	0050 ;	MA	# ( 𝔓 → P ) MATHEMATICAL FRAKTUR CAPITAL P → LATIN CAPITAL LETTER P	# 
+1D57B ;	0050 ;	MA	# ( 𝕻 → P ) MATHEMATICAL BOLD FRAKTUR CAPITAL P → LATIN CAPITAL LETTER P	# 
+1D5AF ;	0050 ;	MA	# ( 𝖯 → P ) MATHEMATICAL SANS-SERIF CAPITAL P → LATIN CAPITAL LETTER P	# 
+1D5E3 ;	0050 ;	MA	# ( 𝗣 → P ) MATHEMATICAL SANS-SERIF BOLD CAPITAL P → LATIN CAPITAL LETTER P	# 
+1D617 ;	0050 ;	MA	# ( 𝘗 → P ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL P → LATIN CAPITAL LETTER P	# 
+1D64B ;	0050 ;	MA	# ( 𝙋 → P ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL P → LATIN CAPITAL LETTER P	# 
+1D67F ;	0050 ;	MA	# ( 𝙿 → P ) MATHEMATICAL MONOSPACE CAPITAL P → LATIN CAPITAL LETTER P	# 
+03A1 ;	0050 ;	MA	# ( Ρ → P ) GREEK CAPITAL LETTER RHO → LATIN CAPITAL LETTER P	# 
+1D6B8 ;	0050 ;	MA	# ( 𝚸 → P ) MATHEMATICAL BOLD CAPITAL RHO → LATIN CAPITAL LETTER P	# →𝐏→
+1D6F2 ;	0050 ;	MA	# ( 𝛲 → P ) MATHEMATICAL ITALIC CAPITAL RHO → LATIN CAPITAL LETTER P	# →Ρ→
+1D72C ;	0050 ;	MA	# ( 𝜬 → P ) MATHEMATICAL BOLD ITALIC CAPITAL RHO → LATIN CAPITAL LETTER P	# →Ρ→
+1D766 ;	0050 ;	MA	# ( 𝝦 → P ) MATHEMATICAL SANS-SERIF BOLD CAPITAL RHO → LATIN CAPITAL LETTER P	# →Ρ→
+1D7A0 ;	0050 ;	MA	# ( 𝞠 → P ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL RHO → LATIN CAPITAL LETTER P	# →Ρ→
+2CA2 ;	0050 ;	MA	# ( Ⲣ → P ) COPTIC CAPITAL LETTER RO → LATIN CAPITAL LETTER P	# 
+0420 ;	0050 ;	MA	# ( Р → P ) CYRILLIC CAPITAL LETTER ER → LATIN CAPITAL LETTER P	# 
+13E2 ;	0050 ;	MA	# ( Ꮲ → P ) CHEROKEE LETTER TLV → LATIN CAPITAL LETTER P	# 
+146D ;	0050 ;	MA	# ( ᑭ → P ) CANADIAN SYLLABICS KI → LATIN CAPITAL LETTER P	# 
+A4D1 ;	0050 ;	MA	# ( ꓑ → P ) LISU LETTER PA → LATIN CAPITAL LETTER P	# 
+10295 ;	0050 ;	MA	# ( 𐊕 → P ) LYCIAN LETTER R → LATIN CAPITAL LETTER P	# 
+
+01A5 ;	0070 0314 ;	MA	# ( ƥ → p̔ ) LATIN SMALL LETTER P WITH HOOK → LATIN SMALL LETTER P, COMBINING REVERSED COMMA ABOVE	# 
+
+1D7D ;	0070 0335 ;	MA	# ( ᵽ → p̵ ) LATIN SMALL LETTER P WITH STROKE → LATIN SMALL LETTER P, COMBINING SHORT STROKE OVERLAY	# 
+
+1477 ;	0070 00B7 ;	MA	# ( ᑷ → p· ) CANADIAN SYLLABICS WEST-CREE KWI → LATIN SMALL LETTER P, MIDDLE DOT	# →pᐧ→
+
+1486 ;	0050 0027 ;	MA	# ( ᒆ → P' ) CANADIAN SYLLABICS SOUTH-SLAVEY KIH → LATIN CAPITAL LETTER P, APOSTROPHE	# →ᑭᑊ→
+
+1D29 ;	1D18 ;	MA	# ( ᴩ → ᴘ ) GREEK LETTER SMALL CAPITAL RHO → LATIN LETTER SMALL CAPITAL P	# 
+
+03C6 ;	0278 ;	MA	# ( φ → ɸ ) GREEK SMALL LETTER PHI → LATIN SMALL LETTER PHI	# 
+03D5 ;	0278 ;	MA	# ( ϕ → ɸ ) GREEK PHI SYMBOL → LATIN SMALL LETTER PHI	# 
+1D6D7 ;	0278 ;	MA	# ( 𝛗 → ɸ ) MATHEMATICAL BOLD SMALL PHI → LATIN SMALL LETTER PHI	# →φ→
+1D6DF ;	0278 ;	MA	# ( 𝛟 → ɸ ) MATHEMATICAL BOLD PHI SYMBOL → LATIN SMALL LETTER PHI	# →φ→
+1D711 ;	0278 ;	MA	# ( 𝜑 → ɸ ) MATHEMATICAL ITALIC SMALL PHI → LATIN SMALL LETTER PHI	# →φ→
+1D719 ;	0278 ;	MA	# ( 𝜙 → ɸ ) MATHEMATICAL ITALIC PHI SYMBOL → LATIN SMALL LETTER PHI	# →φ→
+1D74B ;	0278 ;	MA	# ( 𝝋 → ɸ ) MATHEMATICAL BOLD ITALIC SMALL PHI → LATIN SMALL LETTER PHI	# →φ→
+1D753 ;	0278 ;	MA	# ( 𝝓 → ɸ ) MATHEMATICAL BOLD ITALIC PHI SYMBOL → LATIN SMALL LETTER PHI	# →φ→
+1D785 ;	0278 ;	MA	# ( 𝞅 → ɸ ) MATHEMATICAL SANS-SERIF BOLD SMALL PHI → LATIN SMALL LETTER PHI	# →φ→
+1D78D ;	0278 ;	MA	# ( 𝞍 → ɸ ) MATHEMATICAL SANS-SERIF BOLD PHI SYMBOL → LATIN SMALL LETTER PHI	# →φ→
+1D7BF ;	0278 ;	MA	# ( 𝞿 → ɸ ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL PHI → LATIN SMALL LETTER PHI	# →φ→
+1D7C7 ;	0278 ;	MA	# ( 𝟇 → ɸ ) MATHEMATICAL SANS-SERIF BOLD ITALIC PHI SYMBOL → LATIN SMALL LETTER PHI	# →φ→
+2CAB ;	0278 ;	MA	# ( ⲫ → ɸ ) COPTIC SMALL LETTER FI → LATIN SMALL LETTER PHI	# →ϕ→
+0444 ;	0278 ;	MA	# ( ф → ɸ ) CYRILLIC SMALL LETTER EF → LATIN SMALL LETTER PHI	# 
+
+1D42A ;	0071 ;	MA	# ( 𝐪 → q ) MATHEMATICAL BOLD SMALL Q → LATIN SMALL LETTER Q	# 
+1D45E ;	0071 ;	MA	# ( 𝑞 → q ) MATHEMATICAL ITALIC SMALL Q → LATIN SMALL LETTER Q	# 
+1D492 ;	0071 ;	MA	# ( 𝒒 → q ) MATHEMATICAL BOLD ITALIC SMALL Q → LATIN SMALL LETTER Q	# 
+1D4C6 ;	0071 ;	MA	# ( 𝓆 → q ) MATHEMATICAL SCRIPT SMALL Q → LATIN SMALL LETTER Q	# 
+1D4FA ;	0071 ;	MA	# ( 𝓺 → q ) MATHEMATICAL BOLD SCRIPT SMALL Q → LATIN SMALL LETTER Q	# 
+1D52E ;	0071 ;	MA	# ( 𝔮 → q ) MATHEMATICAL FRAKTUR SMALL Q → LATIN SMALL LETTER Q	# 
+1D562 ;	0071 ;	MA	# ( 𝕢 → q ) MATHEMATICAL DOUBLE-STRUCK SMALL Q → LATIN SMALL LETTER Q	# 
+1D596 ;	0071 ;	MA	# ( 𝖖 → q ) MATHEMATICAL BOLD FRAKTUR SMALL Q → LATIN SMALL LETTER Q	# 
+1D5CA ;	0071 ;	MA	# ( 𝗊 → q ) MATHEMATICAL SANS-SERIF SMALL Q → LATIN SMALL LETTER Q	# 
+1D5FE ;	0071 ;	MA	# ( 𝗾 → q ) MATHEMATICAL SANS-SERIF BOLD SMALL Q → LATIN SMALL LETTER Q	# 
+1D632 ;	0071 ;	MA	# ( 𝘲 → q ) MATHEMATICAL SANS-SERIF ITALIC SMALL Q → LATIN SMALL LETTER Q	# 
+1D666 ;	0071 ;	MA	# ( 𝙦 → q ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Q → LATIN SMALL LETTER Q	# 
+1D69A ;	0071 ;	MA	# ( 𝚚 → q ) MATHEMATICAL MONOSPACE SMALL Q → LATIN SMALL LETTER Q	# 
+051B ;	0071 ;	MA	# ( ԛ → q ) CYRILLIC SMALL LETTER QA → LATIN SMALL LETTER Q	# 
+0563 ;	0071 ;	MA	# ( գ → q ) ARMENIAN SMALL LETTER GIM → LATIN SMALL LETTER Q	# 
+0566 ;	0071 ;	MA	# ( զ → q ) ARMENIAN SMALL LETTER ZA → LATIN SMALL LETTER Q	# 
+
+211A ;	0051 ;	MA	# ( ℚ → Q ) DOUBLE-STRUCK CAPITAL Q → LATIN CAPITAL LETTER Q	# 
+1D410 ;	0051 ;	MA	# ( 𝐐 → Q ) MATHEMATICAL BOLD CAPITAL Q → LATIN CAPITAL LETTER Q	# 
+1D444 ;	0051 ;	MA	# ( 𝑄 → Q ) MATHEMATICAL ITALIC CAPITAL Q → LATIN CAPITAL LETTER Q	# 
+1D478 ;	0051 ;	MA	# ( 𝑸 → Q ) MATHEMATICAL BOLD ITALIC CAPITAL Q → LATIN CAPITAL LETTER Q	# 
+1D4AC ;	0051 ;	MA	# ( 𝒬 → Q ) MATHEMATICAL SCRIPT CAPITAL Q → LATIN CAPITAL LETTER Q	# 
+1D4E0 ;	0051 ;	MA	# ( 𝓠 → Q ) MATHEMATICAL BOLD SCRIPT CAPITAL Q → LATIN CAPITAL LETTER Q	# 
+1D514 ;	0051 ;	MA	# ( 𝔔 → Q ) MATHEMATICAL FRAKTUR CAPITAL Q → LATIN CAPITAL LETTER Q	# 
+1D57C ;	0051 ;	MA	# ( 𝕼 → Q ) MATHEMATICAL BOLD FRAKTUR CAPITAL Q → LATIN CAPITAL LETTER Q	# 
+1D5B0 ;	0051 ;	MA	# ( 𝖰 → Q ) MATHEMATICAL SANS-SERIF CAPITAL Q → LATIN CAPITAL LETTER Q	# 
+1D5E4 ;	0051 ;	MA	# ( 𝗤 → Q ) MATHEMATICAL SANS-SERIF BOLD CAPITAL Q → LATIN CAPITAL LETTER Q	# 
+1D618 ;	0051 ;	MA	# ( 𝘘 → Q ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL Q → LATIN CAPITAL LETTER Q	# 
+1D64C ;	0051 ;	MA	# ( 𝙌 → Q ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Q → LATIN CAPITAL LETTER Q	# 
+1D680 ;	0051 ;	MA	# ( 𝚀 → Q ) MATHEMATICAL MONOSPACE CAPITAL Q → LATIN CAPITAL LETTER Q	# 
+2D55 ;	0051 ;	MA	# ( ⵕ → Q ) TIFINAGH LETTER YARR → LATIN CAPITAL LETTER Q	# 
+
+02A0 ;	0071 0314 ;	MA	# ( ʠ → q̔ ) LATIN SMALL LETTER Q WITH HOOK → LATIN SMALL LETTER Q, COMBINING REVERSED COMMA ABOVE	# 
+
+1F700 ;	0051 0045 ;	MA	#* ( 🜀 → QE ) ALCHEMICAL SYMBOL FOR QUINTESSENCE → LATIN CAPITAL LETTER Q, LATIN CAPITAL LETTER E	# 
+
+1D90 ;	024B ;	MA	# ( ᶐ → ɋ ) LATIN SMALL LETTER ALPHA WITH RETROFLEX HOOK → LATIN SMALL LETTER Q WITH HOOK TAIL	# 
+
+1D42B ;	0072 ;	MA	# ( 𝐫 → r ) MATHEMATICAL BOLD SMALL R → LATIN SMALL LETTER R	# 
+1D45F ;	0072 ;	MA	# ( 𝑟 → r ) MATHEMATICAL ITALIC SMALL R → LATIN SMALL LETTER R	# 
+1D493 ;	0072 ;	MA	# ( 𝒓 → r ) MATHEMATICAL BOLD ITALIC SMALL R → LATIN SMALL LETTER R	# 
+1D4C7 ;	0072 ;	MA	# ( 𝓇 → r ) MATHEMATICAL SCRIPT SMALL R → LATIN SMALL LETTER R	# 
+1D4FB ;	0072 ;	MA	# ( 𝓻 → r ) MATHEMATICAL BOLD SCRIPT SMALL R → LATIN SMALL LETTER R	# 
+1D52F ;	0072 ;	MA	# ( 𝔯 → r ) MATHEMATICAL FRAKTUR SMALL R → LATIN SMALL LETTER R	# 
+1D563 ;	0072 ;	MA	# ( 𝕣 → r ) MATHEMATICAL DOUBLE-STRUCK SMALL R → LATIN SMALL LETTER R	# 
+1D597 ;	0072 ;	MA	# ( 𝖗 → r ) MATHEMATICAL BOLD FRAKTUR SMALL R → LATIN SMALL LETTER R	# 
+1D5CB ;	0072 ;	MA	# ( 𝗋 → r ) MATHEMATICAL SANS-SERIF SMALL R → LATIN SMALL LETTER R	# 
+1D5FF ;	0072 ;	MA	# ( 𝗿 → r ) MATHEMATICAL SANS-SERIF BOLD SMALL R → LATIN SMALL LETTER R	# 
+1D633 ;	0072 ;	MA	# ( 𝘳 → r ) MATHEMATICAL SANS-SERIF ITALIC SMALL R → LATIN SMALL LETTER R	# 
+1D667 ;	0072 ;	MA	# ( 𝙧 → r ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL R → LATIN SMALL LETTER R	# 
+1D69B ;	0072 ;	MA	# ( 𝚛 → r ) MATHEMATICAL MONOSPACE SMALL R → LATIN SMALL LETTER R	# 
+AB47 ;	0072 ;	MA	# ( ꭇ → r ) LATIN SMALL LETTER R WITHOUT HANDLE → LATIN SMALL LETTER R	# 
+AB48 ;	0072 ;	MA	# ( ꭈ → r ) LATIN SMALL LETTER DOUBLE R → LATIN SMALL LETTER R	# 
+1D26 ;	0072 ;	MA	# ( ᴦ → r ) GREEK LETTER SMALL CAPITAL GAMMA → LATIN SMALL LETTER R	# →г→
+2C85 ;	0072 ;	MA	# ( ⲅ → r ) COPTIC SMALL LETTER GAMMA → LATIN SMALL LETTER R	# →г→
+0433 ;	0072 ;	MA	# ( г → r ) CYRILLIC SMALL LETTER GHE → LATIN SMALL LETTER R	# 
+
+1D216 ;	0052 ;	MA	#* ( 𝈖 → R ) GREEK VOCAL NOTATION SYMBOL-23 → LATIN CAPITAL LETTER R	# 
+211B ;	0052 ;	MA	# ( ℛ → R ) SCRIPT CAPITAL R → LATIN CAPITAL LETTER R	# 
+211C ;	0052 ;	MA	# ( ℜ → R ) BLACK-LETTER CAPITAL R → LATIN CAPITAL LETTER R	# 
+211D ;	0052 ;	MA	# ( ℝ → R ) DOUBLE-STRUCK CAPITAL R → LATIN CAPITAL LETTER R	# 
+1D411 ;	0052 ;	MA	# ( 𝐑 → R ) MATHEMATICAL BOLD CAPITAL R → LATIN CAPITAL LETTER R	# 
+1D445 ;	0052 ;	MA	# ( 𝑅 → R ) MATHEMATICAL ITALIC CAPITAL R → LATIN CAPITAL LETTER R	# 
+1D479 ;	0052 ;	MA	# ( 𝑹 → R ) MATHEMATICAL BOLD ITALIC CAPITAL R → LATIN CAPITAL LETTER R	# 
+1D4E1 ;	0052 ;	MA	# ( 𝓡 → R ) MATHEMATICAL BOLD SCRIPT CAPITAL R → LATIN CAPITAL LETTER R	# 
+1D57D ;	0052 ;	MA	# ( 𝕽 → R ) MATHEMATICAL BOLD FRAKTUR CAPITAL R → LATIN CAPITAL LETTER R	# 
+1D5B1 ;	0052 ;	MA	# ( 𝖱 → R ) MATHEMATICAL SANS-SERIF CAPITAL R → LATIN CAPITAL LETTER R	# 
+1D5E5 ;	0052 ;	MA	# ( 𝗥 → R ) MATHEMATICAL SANS-SERIF BOLD CAPITAL R → LATIN CAPITAL LETTER R	# 
+1D619 ;	0052 ;	MA	# ( 𝘙 → R ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL R → LATIN CAPITAL LETTER R	# 
+1D64D ;	0052 ;	MA	# ( 𝙍 → R ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL R → LATIN CAPITAL LETTER R	# 
+1D681 ;	0052 ;	MA	# ( 𝚁 → R ) MATHEMATICAL MONOSPACE CAPITAL R → LATIN CAPITAL LETTER R	# 
+01A6 ;	0052 ;	MA	# ( Ʀ → R ) LATIN LETTER YR → LATIN CAPITAL LETTER R	# 
+13A1 ;	0052 ;	MA	# ( Ꭱ → R ) CHEROKEE LETTER E → LATIN CAPITAL LETTER R	# 
+13D2 ;	0052 ;	MA	# ( Ꮢ → R ) CHEROKEE LETTER SV → LATIN CAPITAL LETTER R	# 
+1587 ;	0052 ;	MA	# ( ᖇ → R ) CANADIAN SYLLABICS TLHI → LATIN CAPITAL LETTER R	# 
+A4E3 ;	0052 ;	MA	# ( ꓣ → R ) LISU LETTER ZHA → LATIN CAPITAL LETTER R	# 
+
+027D ;	0072 0328 ;	MA	# ( ɽ → r̨ ) LATIN SMALL LETTER R WITH TAIL → LATIN SMALL LETTER R, COMBINING OGONEK	# 
+
+027C ;	0072 0329 ;	MA	# ( ɼ → r̩ ) LATIN SMALL LETTER R WITH LONG LEG → LATIN SMALL LETTER R, COMBINING VERTICAL LINE BELOW	# 
+
+024D ;	0072 0335 ;	MA	# ( ɍ → r̵ ) LATIN SMALL LETTER R WITH STROKE → LATIN SMALL LETTER R, COMBINING SHORT STROKE OVERLAY	# 
+0493 ;	0072 0335 ;	MA	# ( ғ → r̵ ) CYRILLIC SMALL LETTER GHE WITH STROKE → LATIN SMALL LETTER R, COMBINING SHORT STROKE OVERLAY	# →г̵→
+
+1D72 ;	0072 0334 ;	MA	# ( ᵲ → r̴ ) LATIN SMALL LETTER R WITH MIDDLE TILDE → LATIN SMALL LETTER R, COMBINING TILDE OVERLAY	# 
+
+0491 ;	0072 0027 ;	MA	# ( ґ → r' ) CYRILLIC SMALL LETTER GHE WITH UPTURN → LATIN SMALL LETTER R, APOSTROPHE	# →гˈ→
+
+118E3 ;	0072 006E ;	MA	# ( 𑣣 → rn ) WARANG CITI DIGIT THREE → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+006D ;	0072 006E ;	MA	# ( m → rn ) LATIN SMALL LETTER M → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# 
+217F ;	0072 006E ;	MA	# ( ⅿ → rn ) SMALL ROMAN NUMERAL ONE THOUSAND → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+1D426 ;	0072 006E ;	MA	# ( 𝐦 → rn ) MATHEMATICAL BOLD SMALL M → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+1D45A ;	0072 006E ;	MA	# ( 𝑚 → rn ) MATHEMATICAL ITALIC SMALL M → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+1D48E ;	0072 006E ;	MA	# ( 𝒎 → rn ) MATHEMATICAL BOLD ITALIC SMALL M → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+1D4C2 ;	0072 006E ;	MA	# ( 𝓂 → rn ) MATHEMATICAL SCRIPT SMALL M → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+1D4F6 ;	0072 006E ;	MA	# ( 𝓶 → rn ) MATHEMATICAL BOLD SCRIPT SMALL M → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+1D52A ;	0072 006E ;	MA	# ( 𝔪 → rn ) MATHEMATICAL FRAKTUR SMALL M → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+1D55E ;	0072 006E ;	MA	# ( 𝕞 → rn ) MATHEMATICAL DOUBLE-STRUCK SMALL M → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+1D592 ;	0072 006E ;	MA	# ( 𝖒 → rn ) MATHEMATICAL BOLD FRAKTUR SMALL M → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+1D5C6 ;	0072 006E ;	MA	# ( 𝗆 → rn ) MATHEMATICAL SANS-SERIF SMALL M → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+1D5FA ;	0072 006E ;	MA	# ( 𝗺 → rn ) MATHEMATICAL SANS-SERIF BOLD SMALL M → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+1D62E ;	0072 006E ;	MA	# ( 𝘮 → rn ) MATHEMATICAL SANS-SERIF ITALIC SMALL M → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+1D662 ;	0072 006E ;	MA	# ( 𝙢 → rn ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL M → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+1D696 ;	0072 006E ;	MA	# ( 𝚖 → rn ) MATHEMATICAL MONOSPACE SMALL M → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+1D0D ;	0072 006E ;	MA	# ( ᴍ → rn ) LATIN LETTER SMALL CAPITAL M → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →м→→m→
+AB51 ;	0072 006E ;	MA	# ( ꭑ → rn ) LATIN SMALL LETTER TURNED UI → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+028D ;	0072 006E ;	MA	# ( ʍ → rn ) LATIN SMALL LETTER TURNED W → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+043C ;	0072 006E ;	MA	# ( м → rn ) CYRILLIC SMALL LETTER EM → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+11700 ;	0072 006E ;	MA	# ( 𑜀 → rn ) AHOM LETTER KA → LATIN SMALL LETTER R, LATIN SMALL LETTER N	# →m→
+
+20A5 ;	0072 006E 0338 ;	MA	#* ( ₥ → rn̸ ) MILL SIGN → LATIN SMALL LETTER R, LATIN SMALL LETTER N, COMBINING LONG SOLIDUS OVERLAY	# →m̷→
+
+0271 ;	0072 006E 0326 ;	MA	# ( ɱ → rn̦ ) LATIN SMALL LETTER M WITH HOOK → LATIN SMALL LETTER R, LATIN SMALL LETTER N, COMBINING COMMA BELOW	# →m̡→
+04CE ;	0072 006E 0326 ;	MA	# ( ӎ → rn̦ ) CYRILLIC SMALL LETTER EM WITH TAIL → LATIN SMALL LETTER R, LATIN SMALL LETTER N, COMBINING COMMA BELOW	# →м̡→
+
+1D6F ;	0072 006E 0334 ;	MA	# ( ᵯ → rn̴ ) LATIN SMALL LETTER M WITH MIDDLE TILDE → LATIN SMALL LETTER R, LATIN SMALL LETTER N, COMBINING TILDE OVERLAY	# →m̴→
+
+20A8 ;	0052 0073 ;	MA	#* ( ₨ → Rs ) RUPEE SIGN → LATIN CAPITAL LETTER R, LATIN SMALL LETTER S	# 
+
+044F ;	1D19 ;	MA	# ( я → ᴙ ) CYRILLIC SMALL LETTER YA → LATIN LETTER SMALL CAPITAL REVERSED R	# 
+
+1D73 ;	027E 0334 ;	MA	# ( ᵳ → ɾ̴ ) LATIN SMALL LETTER R WITH FISHHOOK AND MIDDLE TILDE → LATIN SMALL LETTER R WITH FISHHOOK, COMBINING TILDE OVERLAY	# 
+
+2129 ;	027F ;	MA	#* ( ℩ → ɿ ) TURNED GREEK SMALL LETTER IOTA → LATIN SMALL LETTER REVERSED R WITH FISHHOOK	# 
+
+FF53 ;	0073 ;	MA	# ( s → s ) FULLWIDTH LATIN SMALL LETTER S → LATIN SMALL LETTER S	# →ѕ→
+1D42C ;	0073 ;	MA	# ( 𝐬 → s ) MATHEMATICAL BOLD SMALL S → LATIN SMALL LETTER S	# 
+1D460 ;	0073 ;	MA	# ( 𝑠 → s ) MATHEMATICAL ITALIC SMALL S → LATIN SMALL LETTER S	# 
+1D494 ;	0073 ;	MA	# ( 𝒔 → s ) MATHEMATICAL BOLD ITALIC SMALL S → LATIN SMALL LETTER S	# 
+1D4C8 ;	0073 ;	MA	# ( 𝓈 → s ) MATHEMATICAL SCRIPT SMALL S → LATIN SMALL LETTER S	# 
+1D4FC ;	0073 ;	MA	# ( 𝓼 → s ) MATHEMATICAL BOLD SCRIPT SMALL S → LATIN SMALL LETTER S	# 
+1D530 ;	0073 ;	MA	# ( 𝔰 → s ) MATHEMATICAL FRAKTUR SMALL S → LATIN SMALL LETTER S	# 
+1D564 ;	0073 ;	MA	# ( 𝕤 → s ) MATHEMATICAL DOUBLE-STRUCK SMALL S → LATIN SMALL LETTER S	# 
+1D598 ;	0073 ;	MA	# ( 𝖘 → s ) MATHEMATICAL BOLD FRAKTUR SMALL S → LATIN SMALL LETTER S	# 
+1D5CC ;	0073 ;	MA	# ( 𝗌 → s ) MATHEMATICAL SANS-SERIF SMALL S → LATIN SMALL LETTER S	# 
+1D600 ;	0073 ;	MA	# ( 𝘀 → s ) MATHEMATICAL SANS-SERIF BOLD SMALL S → LATIN SMALL LETTER S	# 
+1D634 ;	0073 ;	MA	# ( 𝘴 → s ) MATHEMATICAL SANS-SERIF ITALIC SMALL S → LATIN SMALL LETTER S	# 
+1D668 ;	0073 ;	MA	# ( 𝙨 → s ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL S → LATIN SMALL LETTER S	# 
+1D69C ;	0073 ;	MA	# ( 𝚜 → s ) MATHEMATICAL MONOSPACE SMALL S → LATIN SMALL LETTER S	# 
+A731 ;	0073 ;	MA	# ( ꜱ → s ) LATIN LETTER SMALL CAPITAL S → LATIN SMALL LETTER S	# 
+01BD ;	0073 ;	MA	# ( ƽ → s ) LATIN SMALL LETTER TONE FIVE → LATIN SMALL LETTER S	# 
+0455 ;	0073 ;	MA	# ( ѕ → s ) CYRILLIC SMALL LETTER DZE → LATIN SMALL LETTER S	# 
+118C1 ;	0073 ;	MA	# ( 𑣁 → s ) WARANG CITI SMALL LETTER A → LATIN SMALL LETTER S	# 
+10448 ;	0073 ;	MA	# ( 𐑈 → s ) DESERET SMALL LETTER ZHEE → LATIN SMALL LETTER S	# 
+
+FF33 ;	0053 ;	MA	# ( S → S ) FULLWIDTH LATIN CAPITAL LETTER S → LATIN CAPITAL LETTER S	# →Ѕ→
+1D412 ;	0053 ;	MA	# ( 𝐒 → S ) MATHEMATICAL BOLD CAPITAL S → LATIN CAPITAL LETTER S	# 
+1D446 ;	0053 ;	MA	# ( 𝑆 → S ) MATHEMATICAL ITALIC CAPITAL S → LATIN CAPITAL LETTER S	# 
+1D47A ;	0053 ;	MA	# ( 𝑺 → S ) MATHEMATICAL BOLD ITALIC CAPITAL S → LATIN CAPITAL LETTER S	# 
+1D4AE ;	0053 ;	MA	# ( 𝒮 → S ) MATHEMATICAL SCRIPT CAPITAL S → LATIN CAPITAL LETTER S	# 
+1D4E2 ;	0053 ;	MA	# ( 𝓢 → S ) MATHEMATICAL BOLD SCRIPT CAPITAL S → LATIN CAPITAL LETTER S	# 
+1D516 ;	0053 ;	MA	# ( 𝔖 → S ) MATHEMATICAL FRAKTUR CAPITAL S → LATIN CAPITAL LETTER S	# 
+1D54A ;	0053 ;	MA	# ( 𝕊 → S ) MATHEMATICAL DOUBLE-STRUCK CAPITAL S → LATIN CAPITAL LETTER S	# 
+1D57E ;	0053 ;	MA	# ( 𝕾 → S ) MATHEMATICAL BOLD FRAKTUR CAPITAL S → LATIN CAPITAL LETTER S	# 
+1D5B2 ;	0053 ;	MA	# ( 𝖲 → S ) MATHEMATICAL SANS-SERIF CAPITAL S → LATIN CAPITAL LETTER S	# 
+1D5E6 ;	0053 ;	MA	# ( 𝗦 → S ) MATHEMATICAL SANS-SERIF BOLD CAPITAL S → LATIN CAPITAL LETTER S	# 
+1D61A ;	0053 ;	MA	# ( 𝘚 → S ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL S → LATIN CAPITAL LETTER S	# 
+1D64E ;	0053 ;	MA	# ( 𝙎 → S ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL S → LATIN CAPITAL LETTER S	# 
+1D682 ;	0053 ;	MA	# ( 𝚂 → S ) MATHEMATICAL MONOSPACE CAPITAL S → LATIN CAPITAL LETTER S	# 
+0405 ;	0053 ;	MA	# ( Ѕ → S ) CYRILLIC CAPITAL LETTER DZE → LATIN CAPITAL LETTER S	# 
+054F ;	0053 ;	MA	# ( Տ → S ) ARMENIAN CAPITAL LETTER TIWN → LATIN CAPITAL LETTER S	# 
+13D5 ;	0053 ;	MA	# ( Ꮥ → S ) CHEROKEE LETTER DE → LATIN CAPITAL LETTER S	# 
+13DA ;	0053 ;	MA	# ( Ꮪ → S ) CHEROKEE LETTER DU → LATIN CAPITAL LETTER S	# 
+A4E2 ;	0053 ;	MA	# ( ꓢ → S ) LISU LETTER SA → LATIN CAPITAL LETTER S	# 
+10296 ;	0053 ;	MA	# ( 𐊖 → S ) LYCIAN LETTER S → LATIN CAPITAL LETTER S	# 
+10420 ;	0053 ;	MA	# ( 𐐠 → S ) DESERET CAPITAL LETTER ZHEE → LATIN CAPITAL LETTER S	# 
+
+0282 ;	0073 0328 ;	MA	# ( ʂ → s̨ ) LATIN SMALL LETTER S WITH HOOK → LATIN SMALL LETTER S, COMBINING OGONEK	# 
+
+1D74 ;	0073 0334 ;	MA	# ( ᵴ → s̴ ) LATIN SMALL LETTER S WITH MIDDLE TILDE → LATIN SMALL LETTER S, COMBINING TILDE OVERLAY	# 
+
+A7B5 ;	00DF ;	MA	# ( ꞵ → ß ) LATIN SMALL LETTER BETA → LATIN SMALL LETTER SHARP S	# →β→
+03B2 ;	00DF ;	MA	# ( β → ß ) GREEK SMALL LETTER BETA → LATIN SMALL LETTER SHARP S	# 
+03D0 ;	00DF ;	MA	# ( ϐ → ß ) GREEK BETA SYMBOL → LATIN SMALL LETTER SHARP S	# →β→
+1D6C3 ;	00DF ;	MA	# ( 𝛃 → ß ) MATHEMATICAL BOLD SMALL BETA → LATIN SMALL LETTER SHARP S	# →β→
+1D6FD ;	00DF ;	MA	# ( 𝛽 → ß ) MATHEMATICAL ITALIC SMALL BETA → LATIN SMALL LETTER SHARP S	# →β→
+1D737 ;	00DF ;	MA	# ( 𝜷 → ß ) MATHEMATICAL BOLD ITALIC SMALL BETA → LATIN SMALL LETTER SHARP S	# →β→
+1D771 ;	00DF ;	MA	# ( 𝝱 → ß ) MATHEMATICAL SANS-SERIF BOLD SMALL BETA → LATIN SMALL LETTER SHARP S	# →β→
+1D7AB ;	00DF ;	MA	# ( 𝞫 → ß ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL BETA → LATIN SMALL LETTER SHARP S	# →β→
+13F0 ;	00DF ;	MA	# ( Ᏸ → ß ) CHEROKEE LETTER YE → LATIN SMALL LETTER SHARP S	# →β→
+
+1F75C ;	0073 0073 0073 ;	MA	#* ( 🝜 → sss ) ALCHEMICAL SYMBOL FOR STRATUM SUPER STRATUM → LATIN SMALL LETTER S, LATIN SMALL LETTER S, LATIN SMALL LETTER S	# 
+
+FB06 ;	0073 0074 ;	MA	# ( st → st ) LATIN SMALL LIGATURE ST → LATIN SMALL LETTER S, LATIN SMALL LETTER T	# 
+
+222B ;	0283 ;	MA	#* ( ∫ → ʃ ) INTEGRAL → LATIN SMALL LETTER ESH	# 
+AB4D ;	0283 ;	MA	# ( ꭍ → ʃ ) LATIN SMALL LETTER BASELINE ESH → LATIN SMALL LETTER ESH	# 
+
+2211 ;	01A9 ;	MA	#* ( ∑ → Ʃ ) N-ARY SUMMATION → LATIN CAPITAL LETTER ESH	# 
+2140 ;	01A9 ;	MA	#* ( ⅀ → Ʃ ) DOUBLE-STRUCK N-ARY SUMMATION → LATIN CAPITAL LETTER ESH	# →∑→
+03A3 ;	01A9 ;	MA	# ( Σ → Ʃ ) GREEK CAPITAL LETTER SIGMA → LATIN CAPITAL LETTER ESH	# 
+1D6BA ;	01A9 ;	MA	# ( 𝚺 → Ʃ ) MATHEMATICAL BOLD CAPITAL SIGMA → LATIN CAPITAL LETTER ESH	# →Σ→
+1D6F4 ;	01A9 ;	MA	# ( 𝛴 → Ʃ ) MATHEMATICAL ITALIC CAPITAL SIGMA → LATIN CAPITAL LETTER ESH	# →Σ→
+1D72E ;	01A9 ;	MA	# ( 𝜮 → Ʃ ) MATHEMATICAL BOLD ITALIC CAPITAL SIGMA → LATIN CAPITAL LETTER ESH	# →Σ→
+1D768 ;	01A9 ;	MA	# ( 𝝨 → Ʃ ) MATHEMATICAL SANS-SERIF BOLD CAPITAL SIGMA → LATIN CAPITAL LETTER ESH	# →Σ→
+1D7A2 ;	01A9 ;	MA	# ( 𝞢 → Ʃ ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL SIGMA → LATIN CAPITAL LETTER ESH	# →Σ→
+2D49 ;	01A9 ;	MA	# ( ⵉ → Ʃ ) TIFINAGH LETTER YI → LATIN CAPITAL LETTER ESH	# 
+
+222C ;	0283 0283 ;	MA	#* ( ∬ → ʃʃ ) DOUBLE INTEGRAL → LATIN SMALL LETTER ESH, LATIN SMALL LETTER ESH	# →∫∫→
+
+222D ;	0283 0283 0283 ;	MA	#* ( ∭ → ʃʃʃ ) TRIPLE INTEGRAL → LATIN SMALL LETTER ESH, LATIN SMALL LETTER ESH, LATIN SMALL LETTER ESH	# →∫∫∫→
+
+2A0C ;	0283 0283 0283 0283 ;	MA	#* ( ⨌ → ʃʃʃʃ ) QUADRUPLE INTEGRAL OPERATOR → LATIN SMALL LETTER ESH, LATIN SMALL LETTER ESH, LATIN SMALL LETTER ESH, LATIN SMALL LETTER ESH	# →∫∫∫∫→
+
+1D42D ;	0074 ;	MA	# ( 𝐭 → t ) MATHEMATICAL BOLD SMALL T → LATIN SMALL LETTER T	# 
+1D461 ;	0074 ;	MA	# ( 𝑡 → t ) MATHEMATICAL ITALIC SMALL T → LATIN SMALL LETTER T	# 
+1D495 ;	0074 ;	MA	# ( 𝒕 → t ) MATHEMATICAL BOLD ITALIC SMALL T → LATIN SMALL LETTER T	# 
+1D4C9 ;	0074 ;	MA	# ( 𝓉 → t ) MATHEMATICAL SCRIPT SMALL T → LATIN SMALL LETTER T	# 
+1D4FD ;	0074 ;	MA	# ( 𝓽 → t ) MATHEMATICAL BOLD SCRIPT SMALL T → LATIN SMALL LETTER T	# 
+1D531 ;	0074 ;	MA	# ( 𝔱 → t ) MATHEMATICAL FRAKTUR SMALL T → LATIN SMALL LETTER T	# 
+1D565 ;	0074 ;	MA	# ( 𝕥 → t ) MATHEMATICAL DOUBLE-STRUCK SMALL T → LATIN SMALL LETTER T	# 
+1D599 ;	0074 ;	MA	# ( 𝖙 → t ) MATHEMATICAL BOLD FRAKTUR SMALL T → LATIN SMALL LETTER T	# 
+1D5CD ;	0074 ;	MA	# ( 𝗍 → t ) MATHEMATICAL SANS-SERIF SMALL T → LATIN SMALL LETTER T	# 
+1D601 ;	0074 ;	MA	# ( 𝘁 → t ) MATHEMATICAL SANS-SERIF BOLD SMALL T → LATIN SMALL LETTER T	# 
+1D635 ;	0074 ;	MA	# ( 𝘵 → t ) MATHEMATICAL SANS-SERIF ITALIC SMALL T → LATIN SMALL LETTER T	# 
+1D669 ;	0074 ;	MA	# ( 𝙩 → t ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL T → LATIN SMALL LETTER T	# 
+1D69D ;	0074 ;	MA	# ( 𝚝 → t ) MATHEMATICAL MONOSPACE SMALL T → LATIN SMALL LETTER T	# 
+1D1B ;	0074 ;	MA	# ( ᴛ → t ) LATIN LETTER SMALL CAPITAL T → LATIN SMALL LETTER T	# →т→→τ→
+03C4 ;	0074 ;	MA	# ( τ → t ) GREEK SMALL LETTER TAU → LATIN SMALL LETTER T	# 
+1D6D5 ;	0074 ;	MA	# ( 𝛕 → t ) MATHEMATICAL BOLD SMALL TAU → LATIN SMALL LETTER T	# →τ→
+1D70F ;	0074 ;	MA	# ( 𝜏 → t ) MATHEMATICAL ITALIC SMALL TAU → LATIN SMALL LETTER T	# →τ→
+1D749 ;	0074 ;	MA	# ( 𝝉 → t ) MATHEMATICAL BOLD ITALIC SMALL TAU → LATIN SMALL LETTER T	# →τ→
+1D783 ;	0074 ;	MA	# ( 𝞃 → t ) MATHEMATICAL SANS-SERIF BOLD SMALL TAU → LATIN SMALL LETTER T	# →τ→
+1D7BD ;	0074 ;	MA	# ( 𝞽 → t ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL TAU → LATIN SMALL LETTER T	# →τ→
+0442 ;	0074 ;	MA	# ( т → t ) CYRILLIC SMALL LETTER TE → LATIN SMALL LETTER T	# →τ→
+
+22A4 ;	0054 ;	MA	#* ( ⊤ → T ) DOWN TACK → LATIN CAPITAL LETTER T	# 
+27D9 ;	0054 ;	MA	#* ( ⟙ → T ) LARGE DOWN TACK → LATIN CAPITAL LETTER T	# 
+1F768 ;	0054 ;	MA	#* ( 🝨 → T ) ALCHEMICAL SYMBOL FOR CRUCIBLE-4 → LATIN CAPITAL LETTER T	# 
+FF34 ;	0054 ;	MA	# ( T → T ) FULLWIDTH LATIN CAPITAL LETTER T → LATIN CAPITAL LETTER T	# →Т→
+1D413 ;	0054 ;	MA	# ( 𝐓 → T ) MATHEMATICAL BOLD CAPITAL T → LATIN CAPITAL LETTER T	# 
+1D447 ;	0054 ;	MA	# ( 𝑇 → T ) MATHEMATICAL ITALIC CAPITAL T → LATIN CAPITAL LETTER T	# 
+1D47B ;	0054 ;	MA	# ( 𝑻 → T ) MATHEMATICAL BOLD ITALIC CAPITAL T → LATIN CAPITAL LETTER T	# 
+1D4AF ;	0054 ;	MA	# ( 𝒯 → T ) MATHEMATICAL SCRIPT CAPITAL T → LATIN CAPITAL LETTER T	# 
+1D4E3 ;	0054 ;	MA	# ( 𝓣 → T ) MATHEMATICAL BOLD SCRIPT CAPITAL T → LATIN CAPITAL LETTER T	# 
+1D517 ;	0054 ;	MA	# ( 𝔗 → T ) MATHEMATICAL FRAKTUR CAPITAL T → LATIN CAPITAL LETTER T	# 
+1D54B ;	0054 ;	MA	# ( 𝕋 → T ) MATHEMATICAL DOUBLE-STRUCK CAPITAL T → LATIN CAPITAL LETTER T	# 
+1D57F ;	0054 ;	MA	# ( 𝕿 → T ) MATHEMATICAL BOLD FRAKTUR CAPITAL T → LATIN CAPITAL LETTER T	# 
+1D5B3 ;	0054 ;	MA	# ( 𝖳 → T ) MATHEMATICAL SANS-SERIF CAPITAL T → LATIN CAPITAL LETTER T	# 
+1D5E7 ;	0054 ;	MA	# ( 𝗧 → T ) MATHEMATICAL SANS-SERIF BOLD CAPITAL T → LATIN CAPITAL LETTER T	# 
+1D61B ;	0054 ;	MA	# ( 𝘛 → T ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL T → LATIN CAPITAL LETTER T	# 
+1D64F ;	0054 ;	MA	# ( 𝙏 → T ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL T → LATIN CAPITAL LETTER T	# 
+1D683 ;	0054 ;	MA	# ( 𝚃 → T ) MATHEMATICAL MONOSPACE CAPITAL T → LATIN CAPITAL LETTER T	# 
+03A4 ;	0054 ;	MA	# ( Τ → T ) GREEK CAPITAL LETTER TAU → LATIN CAPITAL LETTER T	# 
+1D6BB ;	0054 ;	MA	# ( 𝚻 → T ) MATHEMATICAL BOLD CAPITAL TAU → LATIN CAPITAL LETTER T	# →Τ→
+1D6F5 ;	0054 ;	MA	# ( 𝛵 → T ) MATHEMATICAL ITALIC CAPITAL TAU → LATIN CAPITAL LETTER T	# →Τ→
+1D72F ;	0054 ;	MA	# ( 𝜯 → T ) MATHEMATICAL BOLD ITALIC CAPITAL TAU → LATIN CAPITAL LETTER T	# →Τ→
+1D769 ;	0054 ;	MA	# ( 𝝩 → T ) MATHEMATICAL SANS-SERIF BOLD CAPITAL TAU → LATIN CAPITAL LETTER T	# →Τ→
+1D7A3 ;	0054 ;	MA	# ( 𝞣 → T ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL TAU → LATIN CAPITAL LETTER T	# →Τ→
+2CA6 ;	0054 ;	MA	# ( Ⲧ → T ) COPTIC CAPITAL LETTER TAU → LATIN CAPITAL LETTER T	# 
+0422 ;	0054 ;	MA	# ( Т → T ) CYRILLIC CAPITAL LETTER TE → LATIN CAPITAL LETTER T	# 
+13A2 ;	0054 ;	MA	# ( Ꭲ → T ) CHEROKEE LETTER I → LATIN CAPITAL LETTER T	# 
+A4D4 ;	0054 ;	MA	# ( ꓔ → T ) LISU LETTER TA → LATIN CAPITAL LETTER T	# 
+118BC ;	0054 ;	MA	# ( 𑢼 → T ) WARANG CITI CAPITAL LETTER HAR → LATIN CAPITAL LETTER T	# 
+10297 ;	0054 ;	MA	# ( 𐊗 → T ) LYCIAN LETTER T → LATIN CAPITAL LETTER T	# 
+102B1 ;	0054 ;	MA	# ( 𐊱 → T ) CARIAN LETTER C-18 → LATIN CAPITAL LETTER T	# 
+10315 ;	0054 ;	MA	# ( 𐌕 → T ) OLD ITALIC LETTER TE → LATIN CAPITAL LETTER T	# 
+
+01AD ;	0074 0314 ;	MA	# ( ƭ → t̔ ) LATIN SMALL LETTER T WITH HOOK → LATIN SMALL LETTER T, COMBINING REVERSED COMMA ABOVE	# 
+
+2361 ;	0054 0308 ;	MA	#* ( ⍡ → T̈ ) APL FUNCTIONAL SYMBOL UP TACK DIAERESIS → LATIN CAPITAL LETTER T, COMBINING DIAERESIS	# →⊤̈→
+
+023E ;	0054 0338 ;	MA	# ( Ⱦ → T̸ ) LATIN CAPITAL LETTER T WITH DIAGONAL STROKE → LATIN CAPITAL LETTER T, COMBINING LONG SOLIDUS OVERLAY	# 
+
+021A ;	0162 ;	MA	# ( Ț → Ţ ) LATIN CAPITAL LETTER T WITH COMMA BELOW → LATIN CAPITAL LETTER T WITH CEDILLA	# 
+
+01AE ;	0054 0328 ;	MA	# ( Ʈ → T̨ ) LATIN CAPITAL LETTER T WITH RETROFLEX HOOK → LATIN CAPITAL LETTER T, COMBINING OGONEK	# 
+
+04AD ;	0074 0329 ;	MA	# ( ҭ → t̩ ) CYRILLIC SMALL LETTER TE WITH DESCENDER → LATIN SMALL LETTER T, COMBINING VERTICAL LINE BELOW	# →т̩→
+
+04AC ;	0054 0329 ;	MA	# ( Ҭ → T̩ ) CYRILLIC CAPITAL LETTER TE WITH DESCENDER → LATIN CAPITAL LETTER T, COMBINING VERTICAL LINE BELOW	# →Т̩→
+
+20AE ;	0054 20EB ;	MA	#* ( ₮ → T⃫ ) TUGRIK SIGN → LATIN CAPITAL LETTER T, COMBINING LONG DOUBLE SOLIDUS OVERLAY	# →Т⃫→
+
+0167 ;	0074 0335 ;	MA	# ( ŧ → t̵ ) LATIN SMALL LETTER T WITH STROKE → LATIN SMALL LETTER T, COMBINING SHORT STROKE OVERLAY	# 
+
+0166 ;	0054 0335 ;	MA	# ( Ŧ → T̵ ) LATIN CAPITAL LETTER T WITH STROKE → LATIN CAPITAL LETTER T, COMBINING SHORT STROKE OVERLAY	# 
+
+1D75 ;	0074 0334 ;	MA	# ( ᵵ → t̴ ) LATIN SMALL LETTER T WITH MIDDLE TILDE → LATIN SMALL LETTER T, COMBINING TILDE OVERLAY	# 
+
+10A0 ;	A786 ;	MA	# ( Ⴀ → Ꞇ ) GEORGIAN CAPITAL LETTER AN → LATIN CAPITAL LETTER INSULAR T	# 
+
+A728 ;	0054 0033 ;	MA	# ( Ꜩ → T3 ) LATIN CAPITAL LETTER TZ → LATIN CAPITAL LETTER T, DIGIT THREE	# →TƷ→
+
+02A8 ;	0074 0255 ;	MA	# ( ʨ → tɕ ) LATIN SMALL LETTER TC DIGRAPH WITH CURL → LATIN SMALL LETTER T, LATIN SMALL LETTER C WITH CURL	# 
+
+2121 ;	0054 0045 004C ;	MA	#* ( ℡ → TEL ) TELEPHONE SIGN → LATIN CAPITAL LETTER T, LATIN CAPITAL LETTER E, LATIN CAPITAL LETTER L	# 
+
+A777 ;	0074 0066 ;	MA	# ( ꝷ → tf ) LATIN SMALL LETTER TUM → LATIN SMALL LETTER T, LATIN SMALL LETTER F	# 
+
+02A6 ;	0074 0073 ;	MA	# ( ʦ → ts ) LATIN SMALL LETTER TS DIGRAPH → LATIN SMALL LETTER T, LATIN SMALL LETTER S	# 
+
+02A7 ;	0074 0283 ;	MA	# ( ʧ → tʃ ) LATIN SMALL LETTER TESH DIGRAPH → LATIN SMALL LETTER T, LATIN SMALL LETTER ESH	# 
+
+A729 ;	0074 021D ;	MA	# ( ꜩ → tȝ ) LATIN SMALL LETTER TZ → LATIN SMALL LETTER T, LATIN SMALL LETTER YOGH	# 
+
+0163 ;	01AB ;	MA	# ( ţ → ƫ ) LATIN SMALL LETTER T WITH CEDILLA → LATIN SMALL LETTER T WITH PALATAL HOOK	# 
+021B ;	01AB ;	MA	# ( ț → ƫ ) LATIN SMALL LETTER T WITH COMMA BELOW → LATIN SMALL LETTER T WITH PALATAL HOOK	# →ţ→
+13BF ;	01AB ;	MA	# ( Ꮏ → ƫ ) CHEROKEE LETTER HNA → LATIN SMALL LETTER T WITH PALATAL HOOK	# 
+
+1D42E ;	0075 ;	MA	# ( 𝐮 → u ) MATHEMATICAL BOLD SMALL U → LATIN SMALL LETTER U	# 
+1D462 ;	0075 ;	MA	# ( 𝑢 → u ) MATHEMATICAL ITALIC SMALL U → LATIN SMALL LETTER U	# 
+1D496 ;	0075 ;	MA	# ( 𝒖 → u ) MATHEMATICAL BOLD ITALIC SMALL U → LATIN SMALL LETTER U	# 
+1D4CA ;	0075 ;	MA	# ( 𝓊 → u ) MATHEMATICAL SCRIPT SMALL U → LATIN SMALL LETTER U	# 
+1D4FE ;	0075 ;	MA	# ( 𝓾 → u ) MATHEMATICAL BOLD SCRIPT SMALL U → LATIN SMALL LETTER U	# 
+1D532 ;	0075 ;	MA	# ( 𝔲 → u ) MATHEMATICAL FRAKTUR SMALL U → LATIN SMALL LETTER U	# 
+1D566 ;	0075 ;	MA	# ( 𝕦 → u ) MATHEMATICAL DOUBLE-STRUCK SMALL U → LATIN SMALL LETTER U	# 
+1D59A ;	0075 ;	MA	# ( 𝖚 → u ) MATHEMATICAL BOLD FRAKTUR SMALL U → LATIN SMALL LETTER U	# 
+1D5CE ;	0075 ;	MA	# ( 𝗎 → u ) MATHEMATICAL SANS-SERIF SMALL U → LATIN SMALL LETTER U	# 
+1D602 ;	0075 ;	MA	# ( 𝘂 → u ) MATHEMATICAL SANS-SERIF BOLD SMALL U → LATIN SMALL LETTER U	# 
+1D636 ;	0075 ;	MA	# ( 𝘶 → u ) MATHEMATICAL SANS-SERIF ITALIC SMALL U → LATIN SMALL LETTER U	# 
+1D66A ;	0075 ;	MA	# ( 𝙪 → u ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL U → LATIN SMALL LETTER U	# 
+1D69E ;	0075 ;	MA	# ( 𝚞 → u ) MATHEMATICAL MONOSPACE SMALL U → LATIN SMALL LETTER U	# 
+A79F ;	0075 ;	MA	# ( ꞟ → u ) LATIN SMALL LETTER VOLAPUK UE → LATIN SMALL LETTER U	# 
+1D1C ;	0075 ;	MA	# ( ᴜ → u ) LATIN LETTER SMALL CAPITAL U → LATIN SMALL LETTER U	# 
+AB4E ;	0075 ;	MA	# ( ꭎ → u ) LATIN SMALL LETTER U WITH SHORT RIGHT LEG → LATIN SMALL LETTER U	# 
+AB52 ;	0075 ;	MA	# ( ꭒ → u ) LATIN SMALL LETTER U WITH LEFT HOOK → LATIN SMALL LETTER U	# 
+028B ;	0075 ;	MA	# ( ʋ → u ) LATIN SMALL LETTER V WITH HOOK → LATIN SMALL LETTER U	# 
+03C5 ;	0075 ;	MA	# ( υ → u ) GREEK SMALL LETTER UPSILON → LATIN SMALL LETTER U	# →ʋ→
+1D6D6 ;	0075 ;	MA	# ( 𝛖 → u ) MATHEMATICAL BOLD SMALL UPSILON → LATIN SMALL LETTER U	# →υ→→ʋ→
+1D710 ;	0075 ;	MA	# ( 𝜐 → u ) MATHEMATICAL ITALIC SMALL UPSILON → LATIN SMALL LETTER U	# →υ→→ʋ→
+1D74A ;	0075 ;	MA	# ( 𝝊 → u ) MATHEMATICAL BOLD ITALIC SMALL UPSILON → LATIN SMALL LETTER U	# →υ→→ʋ→
+1D784 ;	0075 ;	MA	# ( 𝞄 → u ) MATHEMATICAL SANS-SERIF BOLD SMALL UPSILON → LATIN SMALL LETTER U	# →υ→→ʋ→
+1D7BE ;	0075 ;	MA	# ( 𝞾 → u ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL UPSILON → LATIN SMALL LETTER U	# →υ→→ʋ→
+0446 ;	0075 ;	MA	# ( ц → u ) CYRILLIC SMALL LETTER TSE → LATIN SMALL LETTER U	# 
+057D ;	0075 ;	MA	# ( ս → u ) ARMENIAN SMALL LETTER SEH → LATIN SMALL LETTER U	# 
+118D8 ;	0075 ;	MA	# ( 𑣘 → u ) WARANG CITI SMALL LETTER PU → LATIN SMALL LETTER U	# →υ→→ʋ→
+
+222A ;	0055 ;	MA	#* ( ∪ → U ) UNION → LATIN CAPITAL LETTER U	# →ᑌ→
+22C3 ;	0055 ;	MA	#* ( ⋃ → U ) N-ARY UNION → LATIN CAPITAL LETTER U	# →∪→→ᑌ→
+1D414 ;	0055 ;	MA	# ( 𝐔 → U ) MATHEMATICAL BOLD CAPITAL U → LATIN CAPITAL LETTER U	# 
+1D448 ;	0055 ;	MA	# ( 𝑈 → U ) MATHEMATICAL ITALIC CAPITAL U → LATIN CAPITAL LETTER U	# 
+1D47C ;	0055 ;	MA	# ( 𝑼 → U ) MATHEMATICAL BOLD ITALIC CAPITAL U → LATIN CAPITAL LETTER U	# 
+1D4B0 ;	0055 ;	MA	# ( 𝒰 → U ) MATHEMATICAL SCRIPT CAPITAL U → LATIN CAPITAL LETTER U	# 
+1D4E4 ;	0055 ;	MA	# ( 𝓤 → U ) MATHEMATICAL BOLD SCRIPT CAPITAL U → LATIN CAPITAL LETTER U	# 
+1D518 ;	0055 ;	MA	# ( 𝔘 → U ) MATHEMATICAL FRAKTUR CAPITAL U → LATIN CAPITAL LETTER U	# 
+1D54C ;	0055 ;	MA	# ( 𝕌 → U ) MATHEMATICAL DOUBLE-STRUCK CAPITAL U → LATIN CAPITAL LETTER U	# 
+1D580 ;	0055 ;	MA	# ( 𝖀 → U ) MATHEMATICAL BOLD FRAKTUR CAPITAL U → LATIN CAPITAL LETTER U	# 
+1D5B4 ;	0055 ;	MA	# ( 𝖴 → U ) MATHEMATICAL SANS-SERIF CAPITAL U → LATIN CAPITAL LETTER U	# 
+1D5E8 ;	0055 ;	MA	# ( 𝗨 → U ) MATHEMATICAL SANS-SERIF BOLD CAPITAL U → LATIN CAPITAL LETTER U	# 
+1D61C ;	0055 ;	MA	# ( 𝘜 → U ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL U → LATIN CAPITAL LETTER U	# 
+1D650 ;	0055 ;	MA	# ( 𝙐 → U ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL U → LATIN CAPITAL LETTER U	# 
+1D684 ;	0055 ;	MA	# ( 𝚄 → U ) MATHEMATICAL MONOSPACE CAPITAL U → LATIN CAPITAL LETTER U	# 
+054D ;	0055 ;	MA	# ( Ս → U ) ARMENIAN CAPITAL LETTER SEH → LATIN CAPITAL LETTER U	# 
+1200 ;	0055 ;	MA	# ( ሀ → U ) ETHIOPIC SYLLABLE HA → LATIN CAPITAL LETTER U	# →Ս→
+144C ;	0055 ;	MA	# ( ᑌ → U ) CANADIAN SYLLABICS TE → LATIN CAPITAL LETTER U	# 
+A4F4 ;	0055 ;	MA	# ( ꓴ → U ) LISU LETTER U → LATIN CAPITAL LETTER U	# 
+118B8 ;	0055 ;	MA	# ( 𑢸 → U ) WARANG CITI CAPITAL LETTER PU → LATIN CAPITAL LETTER U	# 
+
+01D4 ;	016D ;	MA	# ( ǔ → ŭ ) LATIN SMALL LETTER U WITH CARON → LATIN SMALL LETTER U WITH BREVE	# 
+
+01D3 ;	016C ;	MA	# ( Ǔ → Ŭ ) LATIN CAPITAL LETTER U WITH CARON → LATIN CAPITAL LETTER U WITH BREVE	# 
+
+1D7E ;	0075 0335 ;	MA	# ( ᵾ → u̵ ) LATIN SMALL CAPITAL LETTER U WITH STROKE → LATIN SMALL LETTER U, COMBINING SHORT STROKE OVERLAY	# →ᴜ̵→
+
+0244 ;	0055 0335 ;	MA	# ( Ʉ → U̵ ) LATIN CAPITAL LETTER U BAR → LATIN CAPITAL LETTER U, COMBINING SHORT STROKE OVERLAY	# →U̶→
+13CC ;	0055 0335 ;	MA	# ( Ꮜ → U̵ ) CHEROKEE LETTER SA → LATIN CAPITAL LETTER U, COMBINING SHORT STROKE OVERLAY	# →Ʉ→→U̶→
+
+1458 ;	0055 00B7 ;	MA	# ( ᑘ → U· ) CANADIAN SYLLABICS WEST-CREE TWE → LATIN CAPITAL LETTER U, MIDDLE DOT	# →ᑌᐧ→→ᑌ·→
+
+1467 ;	0055 0027 ;	MA	# ( ᑧ → U' ) CANADIAN SYLLABICS TTE → LATIN CAPITAL LETTER U, APOSTROPHE	# →ᑌᑊ→→ᑌ'→
+
+1D6B ;	0075 0065 ;	MA	# ( ᵫ → ue ) LATIN SMALL LETTER UE → LATIN SMALL LETTER U, LATIN SMALL LETTER E	# 
+
+057A ;	0270 ;	MA	# ( պ → ɰ ) ARMENIAN SMALL LETTER PEH → LATIN SMALL LETTER TURNED M WITH LONG LEG	# 
+1223 ;	0270 ;	MA	# ( ሣ → ɰ ) ETHIOPIC SYLLABLE SZAA → LATIN SMALL LETTER TURNED M WITH LONG LEG	# →պ→
+
+2127 ;	01B1 ;	MA	#* ( ℧ → Ʊ ) INVERTED OHM SIGN → LATIN CAPITAL LETTER UPSILON	# 
+162E ;	01B1 ;	MA	# ( ᘮ → Ʊ ) CANADIAN SYLLABICS CARRIER LHU → LATIN CAPITAL LETTER UPSILON	# →℧→
+1634 ;	01B1 ;	MA	# ( ᘴ → Ʊ ) CANADIAN SYLLABICS CARRIER TLHU → LATIN CAPITAL LETTER UPSILON	# →ᘮ→→℧→
+
+1D7F ;	028A 0335 ;	MA	# ( ᵿ → ʊ̵ ) LATIN SMALL LETTER UPSILON WITH STROKE → LATIN SMALL LETTER UPSILON, COMBINING SHORT STROKE OVERLAY	# 
+
+2228 ;	0076 ;	MA	#* ( ∨ → v ) LOGICAL OR → LATIN SMALL LETTER V	# 
+22C1 ;	0076 ;	MA	#* ( ⋁ → v ) N-ARY LOGICAL OR → LATIN SMALL LETTER V	# →∨→
+FF56 ;	0076 ;	MA	# ( v → v ) FULLWIDTH LATIN SMALL LETTER V → LATIN SMALL LETTER V	# →ν→
+2174 ;	0076 ;	MA	# ( ⅴ → v ) SMALL ROMAN NUMERAL FIVE → LATIN SMALL LETTER V	# 
+1D42F ;	0076 ;	MA	# ( 𝐯 → v ) MATHEMATICAL BOLD SMALL V → LATIN SMALL LETTER V	# 
+1D463 ;	0076 ;	MA	# ( 𝑣 → v ) MATHEMATICAL ITALIC SMALL V → LATIN SMALL LETTER V	# 
+1D497 ;	0076 ;	MA	# ( 𝒗 → v ) MATHEMATICAL BOLD ITALIC SMALL V → LATIN SMALL LETTER V	# 
+1D4CB ;	0076 ;	MA	# ( 𝓋 → v ) MATHEMATICAL SCRIPT SMALL V → LATIN SMALL LETTER V	# 
+1D4FF ;	0076 ;	MA	# ( 𝓿 → v ) MATHEMATICAL BOLD SCRIPT SMALL V → LATIN SMALL LETTER V	# 
+1D533 ;	0076 ;	MA	# ( 𝔳 → v ) MATHEMATICAL FRAKTUR SMALL V → LATIN SMALL LETTER V	# 
+1D567 ;	0076 ;	MA	# ( 𝕧 → v ) MATHEMATICAL DOUBLE-STRUCK SMALL V → LATIN SMALL LETTER V	# 
+1D59B ;	0076 ;	MA	# ( 𝖛 → v ) MATHEMATICAL BOLD FRAKTUR SMALL V → LATIN SMALL LETTER V	# 
+1D5CF ;	0076 ;	MA	# ( 𝗏 → v ) MATHEMATICAL SANS-SERIF SMALL V → LATIN SMALL LETTER V	# 
+1D603 ;	0076 ;	MA	# ( 𝘃 → v ) MATHEMATICAL SANS-SERIF BOLD SMALL V → LATIN SMALL LETTER V	# 
+1D637 ;	0076 ;	MA	# ( 𝘷 → v ) MATHEMATICAL SANS-SERIF ITALIC SMALL V → LATIN SMALL LETTER V	# 
+1D66B ;	0076 ;	MA	# ( 𝙫 → v ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL V → LATIN SMALL LETTER V	# 
+1D69F ;	0076 ;	MA	# ( 𝚟 → v ) MATHEMATICAL MONOSPACE SMALL V → LATIN SMALL LETTER V	# 
+1D20 ;	0076 ;	MA	# ( ᴠ → v ) LATIN LETTER SMALL CAPITAL V → LATIN SMALL LETTER V	# 
+03BD ;	0076 ;	MA	# ( ν → v ) GREEK SMALL LETTER NU → LATIN SMALL LETTER V	# 
+1D6CE ;	0076 ;	MA	# ( 𝛎 → v ) MATHEMATICAL BOLD SMALL NU → LATIN SMALL LETTER V	# →ν→
+1D708 ;	0076 ;	MA	# ( 𝜈 → v ) MATHEMATICAL ITALIC SMALL NU → LATIN SMALL LETTER V	# →ν→
+1D742 ;	0076 ;	MA	# ( 𝝂 → v ) MATHEMATICAL BOLD ITALIC SMALL NU → LATIN SMALL LETTER V	# →ν→
+1D77C ;	0076 ;	MA	# ( 𝝼 → v ) MATHEMATICAL SANS-SERIF BOLD SMALL NU → LATIN SMALL LETTER V	# →ν→
+1D7B6 ;	0076 ;	MA	# ( 𝞶 → v ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL NU → LATIN SMALL LETTER V	# →ν→
+0475 ;	0076 ;	MA	# ( ѵ → v ) CYRILLIC SMALL LETTER IZHITSA → LATIN SMALL LETTER V	# 
+05D8 ;	0076 ;	MA	# ( ‎ט‎ → v ) HEBREW LETTER TET → LATIN SMALL LETTER V	# 
+118C0 ;	0076 ;	MA	# ( 𑣀 → v ) WARANG CITI SMALL LETTER NGAA → LATIN SMALL LETTER V	# 
+
+1D20D ;	0056 ;	MA	#* ( 𝈍 → V ) GREEK VOCAL NOTATION SYMBOL-14 → LATIN CAPITAL LETTER V	# 
+0667 ;	0056 ;	MA	# ( ‎٧‎ → V ) ARABIC-INDIC DIGIT SEVEN → LATIN CAPITAL LETTER V	# 
+06F7 ;	0056 ;	MA	# ( ۷ → V ) EXTENDED ARABIC-INDIC DIGIT SEVEN → LATIN CAPITAL LETTER V	# →‎٧‎→
+2164 ;	0056 ;	MA	# ( Ⅴ → V ) ROMAN NUMERAL FIVE → LATIN CAPITAL LETTER V	# 
+1D415 ;	0056 ;	MA	# ( 𝐕 → V ) MATHEMATICAL BOLD CAPITAL V → LATIN CAPITAL LETTER V	# 
+1D449 ;	0056 ;	MA	# ( 𝑉 → V ) MATHEMATICAL ITALIC CAPITAL V → LATIN CAPITAL LETTER V	# 
+1D47D ;	0056 ;	MA	# ( 𝑽 → V ) MATHEMATICAL BOLD ITALIC CAPITAL V → LATIN CAPITAL LETTER V	# 
+1D4B1 ;	0056 ;	MA	# ( 𝒱 → V ) MATHEMATICAL SCRIPT CAPITAL V → LATIN CAPITAL LETTER V	# 
+1D4E5 ;	0056 ;	MA	# ( 𝓥 → V ) MATHEMATICAL BOLD SCRIPT CAPITAL V → LATIN CAPITAL LETTER V	# 
+1D519 ;	0056 ;	MA	# ( 𝔙 → V ) MATHEMATICAL FRAKTUR CAPITAL V → LATIN CAPITAL LETTER V	# 
+1D54D ;	0056 ;	MA	# ( 𝕍 → V ) MATHEMATICAL DOUBLE-STRUCK CAPITAL V → LATIN CAPITAL LETTER V	# 
+1D581 ;	0056 ;	MA	# ( 𝖁 → V ) MATHEMATICAL BOLD FRAKTUR CAPITAL V → LATIN CAPITAL LETTER V	# 
+1D5B5 ;	0056 ;	MA	# ( 𝖵 → V ) MATHEMATICAL SANS-SERIF CAPITAL V → LATIN CAPITAL LETTER V	# 
+1D5E9 ;	0056 ;	MA	# ( 𝗩 → V ) MATHEMATICAL SANS-SERIF BOLD CAPITAL V → LATIN CAPITAL LETTER V	# 
+1D61D ;	0056 ;	MA	# ( 𝘝 → V ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL V → LATIN CAPITAL LETTER V	# 
+1D651 ;	0056 ;	MA	# ( 𝙑 → V ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL V → LATIN CAPITAL LETTER V	# 
+1D685 ;	0056 ;	MA	# ( 𝚅 → V ) MATHEMATICAL MONOSPACE CAPITAL V → LATIN CAPITAL LETTER V	# 
+0474 ;	0056 ;	MA	# ( Ѵ → V ) CYRILLIC CAPITAL LETTER IZHITSA → LATIN CAPITAL LETTER V	# 
+2D38 ;	0056 ;	MA	# ( ⴸ → V ) TIFINAGH LETTER YADH → LATIN CAPITAL LETTER V	# 
+13D9 ;	0056 ;	MA	# ( Ꮩ → V ) CHEROKEE LETTER DO → LATIN CAPITAL LETTER V	# 
+142F ;	0056 ;	MA	# ( ᐯ → V ) CANADIAN SYLLABICS PE → LATIN CAPITAL LETTER V	# 
+A6DF ;	0056 ;	MA	# ( ꛟ → V ) BAMUM LETTER KO → LATIN CAPITAL LETTER V	# 
+A4E6 ;	0056 ;	MA	# ( ꓦ → V ) LISU LETTER HA → LATIN CAPITAL LETTER V	# 
+118A0 ;	0056 ;	MA	# ( 𑢠 → V ) WARANG CITI CAPITAL LETTER NGAA → LATIN CAPITAL LETTER V	# 
+1051D ;	0056 ;	MA	# ( 𐔝 → V ) ELBASAN LETTER TE → LATIN CAPITAL LETTER V	# 
+
+143B ;	0056 00B7 ;	MA	# ( ᐻ → V· ) CANADIAN SYLLABICS WEST-CREE PWE → LATIN CAPITAL LETTER V, MIDDLE DOT	# →ᐯᐧ→
+
+1F76C ;	0056 0042 ;	MA	#* ( 🝬 → VB ) ALCHEMICAL SYMBOL FOR BATH OF VAPOURS → LATIN CAPITAL LETTER V, LATIN CAPITAL LETTER B	# 
+
+2175 ;	0076 0069 ;	MA	# ( ⅵ → vi ) SMALL ROMAN NUMERAL SIX → LATIN SMALL LETTER V, LATIN SMALL LETTER I	# 
+
+2176 ;	0076 0069 0069 ;	MA	# ( ⅶ → vii ) SMALL ROMAN NUMERAL SEVEN → LATIN SMALL LETTER V, LATIN SMALL LETTER I, LATIN SMALL LETTER I	# 
+
+2177 ;	0076 0069 0069 0069 ;	MA	# ( ⅷ → viii ) SMALL ROMAN NUMERAL EIGHT → LATIN SMALL LETTER V, LATIN SMALL LETTER I, LATIN SMALL LETTER I, LATIN SMALL LETTER I	# 
+
+2165 ;	0056 006C ;	MA	# ( Ⅵ → Vl ) ROMAN NUMERAL SIX → LATIN CAPITAL LETTER V, LATIN SMALL LETTER L	# →VI→
+
+2166 ;	0056 006C 006C ;	MA	# ( Ⅶ → Vll ) ROMAN NUMERAL SEVEN → LATIN CAPITAL LETTER V, LATIN SMALL LETTER L, LATIN SMALL LETTER L	# →VII→
+
+2167 ;	0056 006C 006C 006C ;	MA	# ( Ⅷ → Vlll ) ROMAN NUMERAL EIGHT → LATIN CAPITAL LETTER V, LATIN SMALL LETTER L, LATIN SMALL LETTER L, LATIN SMALL LETTER L	# →VIII→
+
+1F708 ;	0056 1DE4 ;	MA	#* ( 🜈 → Vᷤ ) ALCHEMICAL SYMBOL FOR AQUA VITAE → LATIN CAPITAL LETTER V, COMBINING LATIN SMALL LETTER S	# 
+
+026F ;	0076 0076 ;	MA	# ( ɯ → vv ) LATIN SMALL LETTER TURNED M → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+0077 ;	0076 0076 ;	MA	# ( w → vv ) LATIN SMALL LETTER W → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# 
+1D430 ;	0076 0076 ;	MA	# ( 𝐰 → vv ) MATHEMATICAL BOLD SMALL W → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+1D464 ;	0076 0076 ;	MA	# ( 𝑤 → vv ) MATHEMATICAL ITALIC SMALL W → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+1D498 ;	0076 0076 ;	MA	# ( 𝒘 → vv ) MATHEMATICAL BOLD ITALIC SMALL W → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+1D4CC ;	0076 0076 ;	MA	# ( 𝓌 → vv ) MATHEMATICAL SCRIPT SMALL W → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+1D500 ;	0076 0076 ;	MA	# ( 𝔀 → vv ) MATHEMATICAL BOLD SCRIPT SMALL W → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+1D534 ;	0076 0076 ;	MA	# ( 𝔴 → vv ) MATHEMATICAL FRAKTUR SMALL W → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+1D568 ;	0076 0076 ;	MA	# ( 𝕨 → vv ) MATHEMATICAL DOUBLE-STRUCK SMALL W → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+1D59C ;	0076 0076 ;	MA	# ( 𝖜 → vv ) MATHEMATICAL BOLD FRAKTUR SMALL W → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+1D5D0 ;	0076 0076 ;	MA	# ( 𝗐 → vv ) MATHEMATICAL SANS-SERIF SMALL W → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+1D604 ;	0076 0076 ;	MA	# ( 𝘄 → vv ) MATHEMATICAL SANS-SERIF BOLD SMALL W → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+1D638 ;	0076 0076 ;	MA	# ( 𝘸 → vv ) MATHEMATICAL SANS-SERIF ITALIC SMALL W → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+1D66C ;	0076 0076 ;	MA	# ( 𝙬 → vv ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL W → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+1D6A0 ;	0076 0076 ;	MA	# ( 𝚠 → vv ) MATHEMATICAL MONOSPACE SMALL W → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+1D21 ;	0076 0076 ;	MA	# ( ᴡ → vv ) LATIN LETTER SMALL CAPITAL W → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+0461 ;	0076 0076 ;	MA	# ( ѡ → vv ) CYRILLIC SMALL LETTER OMEGA → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+051D ;	0076 0076 ;	MA	# ( ԝ → vv ) CYRILLIC SMALL LETTER WE → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+0561 ;	0076 0076 ;	MA	# ( ա → vv ) ARMENIAN SMALL LETTER AYB → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →ɯ→→w→
+1170E ;	0076 0076 ;	MA	# ( 𑜎 → vv ) AHOM LETTER LA → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+1170F ;	0076 0076 ;	MA	# ( 𑜏 → vv ) AHOM LETTER SA → LATIN SMALL LETTER V, LATIN SMALL LETTER V	# →w→
+
+047D ;	0076 0076 0486 0487 ;	MA	# ( ѽ → vv҆҇ ) CYRILLIC SMALL LETTER OMEGA WITH TITLO → LATIN SMALL LETTER V, LATIN SMALL LETTER V, COMBINING CYRILLIC PSILI PNEUMATA, COMBINING CYRILLIC POKRYTIE	# →ѡ҆҇→
+
+114C5 ;	0076 0076 0307 ;	MA	# ( 𑓅 → vv̇ ) TIRHUTA GVANG → LATIN SMALL LETTER V, LATIN SMALL LETTER V, COMBINING DOT ABOVE	# →ẇ→
+
+A761 ;	0076 0079 ;	MA	# ( ꝡ → vy ) LATIN SMALL LETTER VY → LATIN SMALL LETTER V, LATIN SMALL LETTER Y	# 
+
+1D27 ;	028C ;	MA	# ( ᴧ → ʌ ) GREEK LETTER SMALL CAPITAL LAMDA → LATIN SMALL LETTER TURNED V	# 
+
+0668 ;	0245 ;	MA	# ( ‎٨‎ → Ʌ ) ARABIC-INDIC DIGIT EIGHT → LATIN CAPITAL LETTER TURNED V	# →Λ→
+06F8 ;	0245 ;	MA	# ( ۸ → Ʌ ) EXTENDED ARABIC-INDIC DIGIT EIGHT → LATIN CAPITAL LETTER TURNED V	# →‎٨‎→→Λ→
+039B ;	0245 ;	MA	# ( Λ → Ʌ ) GREEK CAPITAL LETTER LAMDA → LATIN CAPITAL LETTER TURNED V	# 
+1D6B2 ;	0245 ;	MA	# ( 𝚲 → Ʌ ) MATHEMATICAL BOLD CAPITAL LAMDA → LATIN CAPITAL LETTER TURNED V	# →Λ→
+1D6EC ;	0245 ;	MA	# ( 𝛬 → Ʌ ) MATHEMATICAL ITALIC CAPITAL LAMDA → LATIN CAPITAL LETTER TURNED V	# →Λ→
+1D726 ;	0245 ;	MA	# ( 𝜦 → Ʌ ) MATHEMATICAL BOLD ITALIC CAPITAL LAMDA → LATIN CAPITAL LETTER TURNED V	# →Λ→
+1D760 ;	0245 ;	MA	# ( 𝝠 → Ʌ ) MATHEMATICAL SANS-SERIF BOLD CAPITAL LAMDA → LATIN CAPITAL LETTER TURNED V	# →Λ→
+1D79A ;	0245 ;	MA	# ( 𝞚 → Ʌ ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL LAMDA → LATIN CAPITAL LETTER TURNED V	# →Λ→
+041B ;	0245 ;	MA	# ( Л → Ʌ ) CYRILLIC CAPITAL LETTER EL → LATIN CAPITAL LETTER TURNED V	# →Λ→
+2D37 ;	0245 ;	MA	# ( ⴷ → Ʌ ) TIFINAGH LETTER YAD → LATIN CAPITAL LETTER TURNED V	# 
+1431 ;	0245 ;	MA	# ( ᐱ → Ʌ ) CANADIAN SYLLABICS PI → LATIN CAPITAL LETTER TURNED V	# 
+A6CE ;	0245 ;	MA	# ( ꛎ → Ʌ ) BAMUM LETTER MI → LATIN CAPITAL LETTER TURNED V	# →Λ→
+A4E5 ;	0245 ;	MA	# ( ꓥ → Ʌ ) LISU LETTER NGA → LATIN CAPITAL LETTER TURNED V	# 
+1028D ;	0245 ;	MA	# ( 𐊍 → Ʌ ) LYCIAN LETTER L → LATIN CAPITAL LETTER TURNED V	# →Λ→
+
+04C5 ;	0245 0326 ;	MA	# ( Ӆ → Ʌ̦ ) CYRILLIC CAPITAL LETTER EL WITH TAIL → LATIN CAPITAL LETTER TURNED V, COMBINING COMMA BELOW	# →Л̡→
+
+143D ;	0245 00B7 ;	MA	# ( ᐽ → Ʌ· ) CANADIAN SYLLABICS WEST-CREE PWI → LATIN CAPITAL LETTER TURNED V, MIDDLE DOT	# →ᐱᐧ→→ᐱ·→
+
+118EF ;	0057 ;	MA	#* ( 𑣯 → W ) WARANG CITI NUMBER SIXTY → LATIN CAPITAL LETTER W	# 
+118E6 ;	0057 ;	MA	# ( 𑣦 → W ) WARANG CITI DIGIT SIX → LATIN CAPITAL LETTER W	# 
+1D416 ;	0057 ;	MA	# ( 𝐖 → W ) MATHEMATICAL BOLD CAPITAL W → LATIN CAPITAL LETTER W	# 
+1D44A ;	0057 ;	MA	# ( 𝑊 → W ) MATHEMATICAL ITALIC CAPITAL W → LATIN CAPITAL LETTER W	# 
+1D47E ;	0057 ;	MA	# ( 𝑾 → W ) MATHEMATICAL BOLD ITALIC CAPITAL W → LATIN CAPITAL LETTER W	# 
+1D4B2 ;	0057 ;	MA	# ( 𝒲 → W ) MATHEMATICAL SCRIPT CAPITAL W → LATIN CAPITAL LETTER W	# 
+1D4E6 ;	0057 ;	MA	# ( 𝓦 → W ) MATHEMATICAL BOLD SCRIPT CAPITAL W → LATIN CAPITAL LETTER W	# 
+1D51A ;	0057 ;	MA	# ( 𝔚 → W ) MATHEMATICAL FRAKTUR CAPITAL W → LATIN CAPITAL LETTER W	# 
+1D54E ;	0057 ;	MA	# ( 𝕎 → W ) MATHEMATICAL DOUBLE-STRUCK CAPITAL W → LATIN CAPITAL LETTER W	# 
+1D582 ;	0057 ;	MA	# ( 𝖂 → W ) MATHEMATICAL BOLD FRAKTUR CAPITAL W → LATIN CAPITAL LETTER W	# 
+1D5B6 ;	0057 ;	MA	# ( 𝖶 → W ) MATHEMATICAL SANS-SERIF CAPITAL W → LATIN CAPITAL LETTER W	# 
+1D5EA ;	0057 ;	MA	# ( 𝗪 → W ) MATHEMATICAL SANS-SERIF BOLD CAPITAL W → LATIN CAPITAL LETTER W	# 
+1D61E ;	0057 ;	MA	# ( 𝘞 → W ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL W → LATIN CAPITAL LETTER W	# 
+1D652 ;	0057 ;	MA	# ( 𝙒 → W ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL W → LATIN CAPITAL LETTER W	# 
+1D686 ;	0057 ;	MA	# ( 𝚆 → W ) MATHEMATICAL MONOSPACE CAPITAL W → LATIN CAPITAL LETTER W	# 
+051C ;	0057 ;	MA	# ( Ԝ → W ) CYRILLIC CAPITAL LETTER WE → LATIN CAPITAL LETTER W	# 
+13B3 ;	0057 ;	MA	# ( Ꮃ → W ) CHEROKEE LETTER LA → LATIN CAPITAL LETTER W	# 
+13D4 ;	0057 ;	MA	# ( Ꮤ → W ) CHEROKEE LETTER TA → LATIN CAPITAL LETTER W	# 
+A4EA ;	0057 ;	MA	# ( ꓪ → W ) LISU LETTER WA → LATIN CAPITAL LETTER W	# 
+
+20A9 ;	0057 0335 ;	MA	#* ( ₩ → W̵ ) WON SIGN → LATIN CAPITAL LETTER W, COMBINING SHORT STROKE OVERLAY	# 
+
+166E ;	0078 ;	MA	#* ( ᙮ → x ) CANADIAN SYLLABICS FULL STOP → LATIN SMALL LETTER X	# 
+00D7 ;	0078 ;	MA	#* ( × → x ) MULTIPLICATION SIGN → LATIN SMALL LETTER X	# 
+292B ;	0078 ;	MA	#* ( ⤫ → x ) RISING DIAGONAL CROSSING FALLING DIAGONAL → LATIN SMALL LETTER X	# 
+292C ;	0078 ;	MA	#* ( ⤬ → x ) FALLING DIAGONAL CROSSING RISING DIAGONAL → LATIN SMALL LETTER X	# 
+2A2F ;	0078 ;	MA	#* ( ⨯ → x ) VECTOR OR CROSS PRODUCT → LATIN SMALL LETTER X	# →×→
+FF58 ;	0078 ;	MA	# ( x → x ) FULLWIDTH LATIN SMALL LETTER X → LATIN SMALL LETTER X	# →х→
+2179 ;	0078 ;	MA	# ( ⅹ → x ) SMALL ROMAN NUMERAL TEN → LATIN SMALL LETTER X	# 
+1D431 ;	0078 ;	MA	# ( 𝐱 → x ) MATHEMATICAL BOLD SMALL X → LATIN SMALL LETTER X	# 
+1D465 ;	0078 ;	MA	# ( 𝑥 → x ) MATHEMATICAL ITALIC SMALL X → LATIN SMALL LETTER X	# 
+1D499 ;	0078 ;	MA	# ( 𝒙 → x ) MATHEMATICAL BOLD ITALIC SMALL X → LATIN SMALL LETTER X	# 
+1D4CD ;	0078 ;	MA	# ( 𝓍 → x ) MATHEMATICAL SCRIPT SMALL X → LATIN SMALL LETTER X	# 
+1D501 ;	0078 ;	MA	# ( 𝔁 → x ) MATHEMATICAL BOLD SCRIPT SMALL X → LATIN SMALL LETTER X	# 
+1D535 ;	0078 ;	MA	# ( 𝔵 → x ) MATHEMATICAL FRAKTUR SMALL X → LATIN SMALL LETTER X	# 
+1D569 ;	0078 ;	MA	# ( 𝕩 → x ) MATHEMATICAL DOUBLE-STRUCK SMALL X → LATIN SMALL LETTER X	# 
+1D59D ;	0078 ;	MA	# ( 𝖝 → x ) MATHEMATICAL BOLD FRAKTUR SMALL X → LATIN SMALL LETTER X	# 
+1D5D1 ;	0078 ;	MA	# ( 𝗑 → x ) MATHEMATICAL SANS-SERIF SMALL X → LATIN SMALL LETTER X	# 
+1D605 ;	0078 ;	MA	# ( 𝘅 → x ) MATHEMATICAL SANS-SERIF BOLD SMALL X → LATIN SMALL LETTER X	# 
+1D639 ;	0078 ;	MA	# ( 𝘹 → x ) MATHEMATICAL SANS-SERIF ITALIC SMALL X → LATIN SMALL LETTER X	# 
+1D66D ;	0078 ;	MA	# ( 𝙭 → x ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL X → LATIN SMALL LETTER X	# 
+1D6A1 ;	0078 ;	MA	# ( 𝚡 → x ) MATHEMATICAL MONOSPACE SMALL X → LATIN SMALL LETTER X	# 
+0445 ;	0078 ;	MA	# ( х → x ) CYRILLIC SMALL LETTER HA → LATIN SMALL LETTER X	# 
+1541 ;	0078 ;	MA	# ( ᕁ → x ) CANADIAN SYLLABICS SAYISI YI → LATIN SMALL LETTER X	# →᙮→
+157D ;	0078 ;	MA	# ( ᕽ → x ) CANADIAN SYLLABICS HK → LATIN SMALL LETTER X	# →ᕁ→→᙮→
+
+166D ;	0058 ;	MA	#* ( ᙭ → X ) CANADIAN SYLLABICS CHI SIGN → LATIN CAPITAL LETTER X	# 
+2573 ;	0058 ;	MA	#* ( ╳ → X ) BOX DRAWINGS LIGHT DIAGONAL CROSS → LATIN CAPITAL LETTER X	# 
+10322 ;	0058 ;	MA	#* ( 𐌢 → X ) OLD ITALIC NUMERAL TEN → LATIN CAPITAL LETTER X	# →𐌗→
+118EC ;	0058 ;	MA	#* ( 𑣬 → X ) WARANG CITI NUMBER THIRTY → LATIN CAPITAL LETTER X	# 
+FF38 ;	0058 ;	MA	# ( X → X ) FULLWIDTH LATIN CAPITAL LETTER X → LATIN CAPITAL LETTER X	# →Х→
+2169 ;	0058 ;	MA	# ( Ⅹ → X ) ROMAN NUMERAL TEN → LATIN CAPITAL LETTER X	# 
+1D417 ;	0058 ;	MA	# ( 𝐗 → X ) MATHEMATICAL BOLD CAPITAL X → LATIN CAPITAL LETTER X	# 
+1D44B ;	0058 ;	MA	# ( 𝑋 → X ) MATHEMATICAL ITALIC CAPITAL X → LATIN CAPITAL LETTER X	# 
+1D47F ;	0058 ;	MA	# ( 𝑿 → X ) MATHEMATICAL BOLD ITALIC CAPITAL X → LATIN CAPITAL LETTER X	# 
+1D4B3 ;	0058 ;	MA	# ( 𝒳 → X ) MATHEMATICAL SCRIPT CAPITAL X → LATIN CAPITAL LETTER X	# 
+1D4E7 ;	0058 ;	MA	# ( 𝓧 → X ) MATHEMATICAL BOLD SCRIPT CAPITAL X → LATIN CAPITAL LETTER X	# 
+1D51B ;	0058 ;	MA	# ( 𝔛 → X ) MATHEMATICAL FRAKTUR CAPITAL X → LATIN CAPITAL LETTER X	# 
+1D54F ;	0058 ;	MA	# ( 𝕏 → X ) MATHEMATICAL DOUBLE-STRUCK CAPITAL X → LATIN CAPITAL LETTER X	# 
+1D583 ;	0058 ;	MA	# ( 𝖃 → X ) MATHEMATICAL BOLD FRAKTUR CAPITAL X → LATIN CAPITAL LETTER X	# 
+1D5B7 ;	0058 ;	MA	# ( 𝖷 → X ) MATHEMATICAL SANS-SERIF CAPITAL X → LATIN CAPITAL LETTER X	# 
+1D5EB ;	0058 ;	MA	# ( 𝗫 → X ) MATHEMATICAL SANS-SERIF BOLD CAPITAL X → LATIN CAPITAL LETTER X	# 
+1D61F ;	0058 ;	MA	# ( 𝘟 → X ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL X → LATIN CAPITAL LETTER X	# 
+1D653 ;	0058 ;	MA	# ( 𝙓 → X ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL X → LATIN CAPITAL LETTER X	# 
+1D687 ;	0058 ;	MA	# ( 𝚇 → X ) MATHEMATICAL MONOSPACE CAPITAL X → LATIN CAPITAL LETTER X	# 
+A7B3 ;	0058 ;	MA	# ( Ꭓ → X ) LATIN CAPITAL LETTER CHI → LATIN CAPITAL LETTER X	# 
+03A7 ;	0058 ;	MA	# ( Χ → X ) GREEK CAPITAL LETTER CHI → LATIN CAPITAL LETTER X	# 
+1D6BE ;	0058 ;	MA	# ( 𝚾 → X ) MATHEMATICAL BOLD CAPITAL CHI → LATIN CAPITAL LETTER X	# →Χ→
+1D6F8 ;	0058 ;	MA	# ( 𝛸 → X ) MATHEMATICAL ITALIC CAPITAL CHI → LATIN CAPITAL LETTER X	# →Χ→
+1D732 ;	0058 ;	MA	# ( 𝜲 → X ) MATHEMATICAL BOLD ITALIC CAPITAL CHI → LATIN CAPITAL LETTER X	# →𝑿→
+1D76C ;	0058 ;	MA	# ( 𝝬 → X ) MATHEMATICAL SANS-SERIF BOLD CAPITAL CHI → LATIN CAPITAL LETTER X	# →Χ→
+1D7A6 ;	0058 ;	MA	# ( 𝞦 → X ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL CHI → LATIN CAPITAL LETTER X	# →Χ→
+2CAC ;	0058 ;	MA	# ( Ⲭ → X ) COPTIC CAPITAL LETTER KHI → LATIN CAPITAL LETTER X	# →Х→
+0425 ;	0058 ;	MA	# ( Х → X ) CYRILLIC CAPITAL LETTER HA → LATIN CAPITAL LETTER X	# 
+2D5D ;	0058 ;	MA	# ( ⵝ → X ) TIFINAGH LETTER YATH → LATIN CAPITAL LETTER X	# 
+16B7 ;	0058 ;	MA	# ( ᚷ → X ) RUNIC LETTER GEBO GYFU G → LATIN CAPITAL LETTER X	# 
+A4EB ;	0058 ;	MA	# ( ꓫ → X ) LISU LETTER SHA → LATIN CAPITAL LETTER X	# 
+10290 ;	0058 ;	MA	# ( 𐊐 → X ) LYCIAN LETTER MM → LATIN CAPITAL LETTER X	# 
+102B4 ;	0058 ;	MA	# ( 𐊴 → X ) CARIAN LETTER X → LATIN CAPITAL LETTER X	# 
+10317 ;	0058 ;	MA	# ( 𐌗 → X ) OLD ITALIC LETTER EKS → LATIN CAPITAL LETTER X	# 
+10527 ;	0058 ;	MA	# ( 𐔧 → X ) ELBASAN LETTER KHE → LATIN CAPITAL LETTER X	# 
+
+2A30 ;	0078 0307 ;	MA	#* ( ⨰ → ẋ ) MULTIPLICATION SIGN WITH DOT ABOVE → LATIN SMALL LETTER X, COMBINING DOT ABOVE	# →×̇→
+
+04B2 ;	0058 0329 ;	MA	# ( Ҳ → X̩ ) CYRILLIC CAPITAL LETTER HA WITH DESCENDER → LATIN CAPITAL LETTER X, COMBINING VERTICAL LINE BELOW	# →Х̩→
+
+217A ;	0078 0069 ;	MA	# ( ⅺ → xi ) SMALL ROMAN NUMERAL ELEVEN → LATIN SMALL LETTER X, LATIN SMALL LETTER I	# 
+
+217B ;	0078 0069 0069 ;	MA	# ( ⅻ → xii ) SMALL ROMAN NUMERAL TWELVE → LATIN SMALL LETTER X, LATIN SMALL LETTER I, LATIN SMALL LETTER I	# 
+
+216A ;	0058 006C ;	MA	# ( Ⅺ → Xl ) ROMAN NUMERAL ELEVEN → LATIN CAPITAL LETTER X, LATIN SMALL LETTER L	# →XI→
+
+216B ;	0058 006C 006C ;	MA	# ( Ⅻ → Xll ) ROMAN NUMERAL TWELVE → LATIN CAPITAL LETTER X, LATIN SMALL LETTER L, LATIN SMALL LETTER L	# →XII→
+
+0263 ;	0079 ;	MA	# ( ɣ → y ) LATIN SMALL LETTER GAMMA → LATIN SMALL LETTER Y	# →γ→
+1D8C ;	0079 ;	MA	# ( ᶌ → y ) LATIN SMALL LETTER V WITH PALATAL HOOK → LATIN SMALL LETTER Y	# 
+FF59 ;	0079 ;	MA	# ( y → y ) FULLWIDTH LATIN SMALL LETTER Y → LATIN SMALL LETTER Y	# →у→
+1D432 ;	0079 ;	MA	# ( 𝐲 → y ) MATHEMATICAL BOLD SMALL Y → LATIN SMALL LETTER Y	# 
+1D466 ;	0079 ;	MA	# ( 𝑦 → y ) MATHEMATICAL ITALIC SMALL Y → LATIN SMALL LETTER Y	# 
+1D49A ;	0079 ;	MA	# ( 𝒚 → y ) MATHEMATICAL BOLD ITALIC SMALL Y → LATIN SMALL LETTER Y	# 
+1D4CE ;	0079 ;	MA	# ( 𝓎 → y ) MATHEMATICAL SCRIPT SMALL Y → LATIN SMALL LETTER Y	# 
+1D502 ;	0079 ;	MA	# ( 𝔂 → y ) MATHEMATICAL BOLD SCRIPT SMALL Y → LATIN SMALL LETTER Y	# 
+1D536 ;	0079 ;	MA	# ( 𝔶 → y ) MATHEMATICAL FRAKTUR SMALL Y → LATIN SMALL LETTER Y	# 
+1D56A ;	0079 ;	MA	# ( 𝕪 → y ) MATHEMATICAL DOUBLE-STRUCK SMALL Y → LATIN SMALL LETTER Y	# 
+1D59E ;	0079 ;	MA	# ( 𝖞 → y ) MATHEMATICAL BOLD FRAKTUR SMALL Y → LATIN SMALL LETTER Y	# 
+1D5D2 ;	0079 ;	MA	# ( 𝗒 → y ) MATHEMATICAL SANS-SERIF SMALL Y → LATIN SMALL LETTER Y	# 
+1D606 ;	0079 ;	MA	# ( 𝘆 → y ) MATHEMATICAL SANS-SERIF BOLD SMALL Y → LATIN SMALL LETTER Y	# 
+1D63A ;	0079 ;	MA	# ( 𝘺 → y ) MATHEMATICAL SANS-SERIF ITALIC SMALL Y → LATIN SMALL LETTER Y	# 
+1D66E ;	0079 ;	MA	# ( 𝙮 → y ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Y → LATIN SMALL LETTER Y	# 
+1D6A2 ;	0079 ;	MA	# ( 𝚢 → y ) MATHEMATICAL MONOSPACE SMALL Y → LATIN SMALL LETTER Y	# 
+028F ;	0079 ;	MA	# ( ʏ → y ) LATIN LETTER SMALL CAPITAL Y → LATIN SMALL LETTER Y	# →ү→→γ→
+1EFF ;	0079 ;	MA	# ( ỿ → y ) LATIN SMALL LETTER Y WITH LOOP → LATIN SMALL LETTER Y	# 
+AB5A ;	0079 ;	MA	# ( ꭚ → y ) LATIN SMALL LETTER Y WITH SHORT RIGHT LEG → LATIN SMALL LETTER Y	# 
+03B3 ;	0079 ;	MA	# ( γ → y ) GREEK SMALL LETTER GAMMA → LATIN SMALL LETTER Y	# 
+213D ;	0079 ;	MA	# ( ℽ → y ) DOUBLE-STRUCK SMALL GAMMA → LATIN SMALL LETTER Y	# →γ→
+1D6C4 ;	0079 ;	MA	# ( 𝛄 → y ) MATHEMATICAL BOLD SMALL GAMMA → LATIN SMALL LETTER Y	# →γ→
+1D6FE ;	0079 ;	MA	# ( 𝛾 → y ) MATHEMATICAL ITALIC SMALL GAMMA → LATIN SMALL LETTER Y	# →γ→
+1D738 ;	0079 ;	MA	# ( 𝜸 → y ) MATHEMATICAL BOLD ITALIC SMALL GAMMA → LATIN SMALL LETTER Y	# →γ→
+1D772 ;	0079 ;	MA	# ( 𝝲 → y ) MATHEMATICAL SANS-SERIF BOLD SMALL GAMMA → LATIN SMALL LETTER Y	# →γ→
+1D7AC ;	0079 ;	MA	# ( 𝞬 → y ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL GAMMA → LATIN SMALL LETTER Y	# →γ→
+0443 ;	0079 ;	MA	# ( у → y ) CYRILLIC SMALL LETTER U → LATIN SMALL LETTER Y	# 
+04AF ;	0079 ;	MA	# ( ү → y ) CYRILLIC SMALL LETTER STRAIGHT U → LATIN SMALL LETTER Y	# →γ→
+10E7 ;	0079 ;	MA	# ( ყ → y ) GEORGIAN LETTER QAR → LATIN SMALL LETTER Y	# 
+118DC ;	0079 ;	MA	# ( 𑣜 → y ) WARANG CITI SMALL LETTER HAR → LATIN SMALL LETTER Y	# →ɣ→→γ→
+
+FF39 ;	0059 ;	MA	# ( Y → Y ) FULLWIDTH LATIN CAPITAL LETTER Y → LATIN CAPITAL LETTER Y	# →Υ→
+1D418 ;	0059 ;	MA	# ( 𝐘 → Y ) MATHEMATICAL BOLD CAPITAL Y → LATIN CAPITAL LETTER Y	# 
+1D44C ;	0059 ;	MA	# ( 𝑌 → Y ) MATHEMATICAL ITALIC CAPITAL Y → LATIN CAPITAL LETTER Y	# 
+1D480 ;	0059 ;	MA	# ( 𝒀 → Y ) MATHEMATICAL BOLD ITALIC CAPITAL Y → LATIN CAPITAL LETTER Y	# 
+1D4B4 ;	0059 ;	MA	# ( 𝒴 → Y ) MATHEMATICAL SCRIPT CAPITAL Y → LATIN CAPITAL LETTER Y	# 
+1D4E8 ;	0059 ;	MA	# ( 𝓨 → Y ) MATHEMATICAL BOLD SCRIPT CAPITAL Y → LATIN CAPITAL LETTER Y	# 
+1D51C ;	0059 ;	MA	# ( 𝔜 → Y ) MATHEMATICAL FRAKTUR CAPITAL Y → LATIN CAPITAL LETTER Y	# 
+1D550 ;	0059 ;	MA	# ( 𝕐 → Y ) MATHEMATICAL DOUBLE-STRUCK CAPITAL Y → LATIN CAPITAL LETTER Y	# 
+1D584 ;	0059 ;	MA	# ( 𝖄 → Y ) MATHEMATICAL BOLD FRAKTUR CAPITAL Y → LATIN CAPITAL LETTER Y	# 
+1D5B8 ;	0059 ;	MA	# ( 𝖸 → Y ) MATHEMATICAL SANS-SERIF CAPITAL Y → LATIN CAPITAL LETTER Y	# 
+1D5EC ;	0059 ;	MA	# ( 𝗬 → Y ) MATHEMATICAL SANS-SERIF BOLD CAPITAL Y → LATIN CAPITAL LETTER Y	# 
+1D620 ;	0059 ;	MA	# ( 𝘠 → Y ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL Y → LATIN CAPITAL LETTER Y	# 
+1D654 ;	0059 ;	MA	# ( 𝙔 → Y ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Y → LATIN CAPITAL LETTER Y	# 
+1D688 ;	0059 ;	MA	# ( 𝚈 → Y ) MATHEMATICAL MONOSPACE CAPITAL Y → LATIN CAPITAL LETTER Y	# 
+03A5 ;	0059 ;	MA	# ( Υ → Y ) GREEK CAPITAL LETTER UPSILON → LATIN CAPITAL LETTER Y	# 
+03D2 ;	0059 ;	MA	# ( ϒ → Y ) GREEK UPSILON WITH HOOK SYMBOL → LATIN CAPITAL LETTER Y	# 
+1D6BC ;	0059 ;	MA	# ( 𝚼 → Y ) MATHEMATICAL BOLD CAPITAL UPSILON → LATIN CAPITAL LETTER Y	# →Υ→
+1D6F6 ;	0059 ;	MA	# ( 𝛶 → Y ) MATHEMATICAL ITALIC CAPITAL UPSILON → LATIN CAPITAL LETTER Y	# →Υ→
+1D730 ;	0059 ;	MA	# ( 𝜰 → Y ) MATHEMATICAL BOLD ITALIC CAPITAL UPSILON → LATIN CAPITAL LETTER Y	# →Υ→
+1D76A ;	0059 ;	MA	# ( 𝝪 → Y ) MATHEMATICAL SANS-SERIF BOLD CAPITAL UPSILON → LATIN CAPITAL LETTER Y	# →Υ→
+1D7A4 ;	0059 ;	MA	# ( 𝞤 → Y ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL UPSILON → LATIN CAPITAL LETTER Y	# →Υ→
+2CA8 ;	0059 ;	MA	# ( Ⲩ → Y ) COPTIC CAPITAL LETTER UA → LATIN CAPITAL LETTER Y	# 
+04AE ;	0059 ;	MA	# ( Ү → Y ) CYRILLIC CAPITAL LETTER STRAIGHT U → LATIN CAPITAL LETTER Y	# 
+13A9 ;	0059 ;	MA	# ( Ꭹ → Y ) CHEROKEE LETTER GI → LATIN CAPITAL LETTER Y	# 
+13BD ;	0059 ;	MA	# ( Ꮍ → Y ) CHEROKEE LETTER MU → LATIN CAPITAL LETTER Y	# →Ꭹ→
+A4EC ;	0059 ;	MA	# ( ꓬ → Y ) LISU LETTER YA → LATIN CAPITAL LETTER Y	# 
+118A4 ;	0059 ;	MA	# ( 𑢤 → Y ) WARANG CITI CAPITAL LETTER YA → LATIN CAPITAL LETTER Y	# 
+102B2 ;	0059 ;	MA	# ( 𐊲 → Y ) CARIAN LETTER U → LATIN CAPITAL LETTER Y	# 
+
+01B4 ;	0079 0314 ;	MA	# ( ƴ → y̔ ) LATIN SMALL LETTER Y WITH HOOK → LATIN SMALL LETTER Y, COMBINING REVERSED COMMA ABOVE	# 
+
+024F ;	0079 0335 ;	MA	# ( ɏ → y̵ ) LATIN SMALL LETTER Y WITH STROKE → LATIN SMALL LETTER Y, COMBINING SHORT STROKE OVERLAY	# 
+04B1 ;	0079 0335 ;	MA	# ( ұ → y̵ ) CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE → LATIN SMALL LETTER Y, COMBINING SHORT STROKE OVERLAY	# →ү̵→
+
+00A5 ;	0059 0335 ;	MA	#* ( ¥ → Y̵ ) YEN SIGN → LATIN CAPITAL LETTER Y, COMBINING SHORT STROKE OVERLAY	# 
+024E ;	0059 0335 ;	MA	# ( Ɏ → Y̵ ) LATIN CAPITAL LETTER Y WITH STROKE → LATIN CAPITAL LETTER Y, COMBINING SHORT STROKE OVERLAY	# 
+04B0 ;	0059 0335 ;	MA	# ( Ұ → Y̵ ) CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE → LATIN CAPITAL LETTER Y, COMBINING SHORT STROKE OVERLAY	# →Ү̵→
+
+0292 ;	021D ;	MA	# ( ʒ → ȝ ) LATIN SMALL LETTER EZH → LATIN SMALL LETTER YOGH	# 
+A76B ;	021D ;	MA	# ( ꝫ → ȝ ) LATIN SMALL LETTER ET → LATIN SMALL LETTER YOGH	# 
+2CCD ;	021D ;	MA	# ( ⳍ → ȝ ) COPTIC SMALL LETTER OLD COPTIC HORI → LATIN SMALL LETTER YOGH	# 
+04E1 ;	021D ;	MA	# ( ӡ → ȝ ) CYRILLIC SMALL LETTER ABKHASIAN DZE → LATIN SMALL LETTER YOGH	# →ʒ→
+10F3 ;	021D ;	MA	# ( ჳ → ȝ ) GEORGIAN LETTER WE → LATIN SMALL LETTER YOGH	# →ʒ→
+
+1D433 ;	007A ;	MA	# ( 𝐳 → z ) MATHEMATICAL BOLD SMALL Z → LATIN SMALL LETTER Z	# 
+1D467 ;	007A ;	MA	# ( 𝑧 → z ) MATHEMATICAL ITALIC SMALL Z → LATIN SMALL LETTER Z	# 
+1D49B ;	007A ;	MA	# ( 𝒛 → z ) MATHEMATICAL BOLD ITALIC SMALL Z → LATIN SMALL LETTER Z	# 
+1D4CF ;	007A ;	MA	# ( 𝓏 → z ) MATHEMATICAL SCRIPT SMALL Z → LATIN SMALL LETTER Z	# 
+1D503 ;	007A ;	MA	# ( 𝔃 → z ) MATHEMATICAL BOLD SCRIPT SMALL Z → LATIN SMALL LETTER Z	# 
+1D537 ;	007A ;	MA	# ( 𝔷 → z ) MATHEMATICAL FRAKTUR SMALL Z → LATIN SMALL LETTER Z	# 
+1D56B ;	007A ;	MA	# ( 𝕫 → z ) MATHEMATICAL DOUBLE-STRUCK SMALL Z → LATIN SMALL LETTER Z	# 
+1D59F ;	007A ;	MA	# ( 𝖟 → z ) MATHEMATICAL BOLD FRAKTUR SMALL Z → LATIN SMALL LETTER Z	# 
+1D5D3 ;	007A ;	MA	# ( 𝗓 → z ) MATHEMATICAL SANS-SERIF SMALL Z → LATIN SMALL LETTER Z	# 
+1D607 ;	007A ;	MA	# ( 𝘇 → z ) MATHEMATICAL SANS-SERIF BOLD SMALL Z → LATIN SMALL LETTER Z	# 
+1D63B ;	007A ;	MA	# ( 𝘻 → z ) MATHEMATICAL SANS-SERIF ITALIC SMALL Z → LATIN SMALL LETTER Z	# 
+1D66F ;	007A ;	MA	# ( 𝙯 → z ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Z → LATIN SMALL LETTER Z	# 
+1D6A3 ;	007A ;	MA	# ( 𝚣 → z ) MATHEMATICAL MONOSPACE SMALL Z → LATIN SMALL LETTER Z	# 
+1D22 ;	007A ;	MA	# ( ᴢ → z ) LATIN LETTER SMALL CAPITAL Z → LATIN SMALL LETTER Z	# 
+118C4 ;	007A ;	MA	# ( 𑣄 → z ) WARANG CITI SMALL LETTER YA → LATIN SMALL LETTER Z	# 
+
+102F5 ;	005A ;	MA	#* ( 𐋵 → Z ) COPTIC EPACT NUMBER THREE HUNDRED → LATIN CAPITAL LETTER Z	# 
+118E5 ;	005A ;	MA	# ( 𑣥 → Z ) WARANG CITI DIGIT FIVE → LATIN CAPITAL LETTER Z	# 
+FF3A ;	005A ;	MA	# ( Z → Z ) FULLWIDTH LATIN CAPITAL LETTER Z → LATIN CAPITAL LETTER Z	# →Ζ→
+2124 ;	005A ;	MA	# ( ℤ → Z ) DOUBLE-STRUCK CAPITAL Z → LATIN CAPITAL LETTER Z	# 
+2128 ;	005A ;	MA	# ( ℨ → Z ) BLACK-LETTER CAPITAL Z → LATIN CAPITAL LETTER Z	# 
+1D419 ;	005A ;	MA	# ( 𝐙 → Z ) MATHEMATICAL BOLD CAPITAL Z → LATIN CAPITAL LETTER Z	# 
+1D44D ;	005A ;	MA	# ( 𝑍 → Z ) MATHEMATICAL ITALIC CAPITAL Z → LATIN CAPITAL LETTER Z	# 
+1D481 ;	005A ;	MA	# ( 𝒁 → Z ) MATHEMATICAL BOLD ITALIC CAPITAL Z → LATIN CAPITAL LETTER Z	# 
+1D4B5 ;	005A ;	MA	# ( 𝒵 → Z ) MATHEMATICAL SCRIPT CAPITAL Z → LATIN CAPITAL LETTER Z	# 
+1D4E9 ;	005A ;	MA	# ( 𝓩 → Z ) MATHEMATICAL BOLD SCRIPT CAPITAL Z → LATIN CAPITAL LETTER Z	# 
+1D585 ;	005A ;	MA	# ( 𝖅 → Z ) MATHEMATICAL BOLD FRAKTUR CAPITAL Z → LATIN CAPITAL LETTER Z	# 
+1D5B9 ;	005A ;	MA	# ( 𝖹 → Z ) MATHEMATICAL SANS-SERIF CAPITAL Z → LATIN CAPITAL LETTER Z	# 
+1D5ED ;	005A ;	MA	# ( 𝗭 → Z ) MATHEMATICAL SANS-SERIF BOLD CAPITAL Z → LATIN CAPITAL LETTER Z	# 
+1D621 ;	005A ;	MA	# ( 𝘡 → Z ) MATHEMATICAL SANS-SERIF ITALIC CAPITAL Z → LATIN CAPITAL LETTER Z	# 
+1D655 ;	005A ;	MA	# ( 𝙕 → Z ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Z → LATIN CAPITAL LETTER Z	# 
+1D689 ;	005A ;	MA	# ( 𝚉 → Z ) MATHEMATICAL MONOSPACE CAPITAL Z → LATIN CAPITAL LETTER Z	# 
+0396 ;	005A ;	MA	# ( Ζ → Z ) GREEK CAPITAL LETTER ZETA → LATIN CAPITAL LETTER Z	# 
+1D6AD ;	005A ;	MA	# ( 𝚭 → Z ) MATHEMATICAL BOLD CAPITAL ZETA → LATIN CAPITAL LETTER Z	# →Ζ→
+1D6E7 ;	005A ;	MA	# ( 𝛧 → Z ) MATHEMATICAL ITALIC CAPITAL ZETA → LATIN CAPITAL LETTER Z	# →𝑍→
+1D721 ;	005A ;	MA	# ( 𝜡 → Z ) MATHEMATICAL BOLD ITALIC CAPITAL ZETA → LATIN CAPITAL LETTER Z	# →Ζ→
+1D75B ;	005A ;	MA	# ( 𝝛 → Z ) MATHEMATICAL SANS-SERIF BOLD CAPITAL ZETA → LATIN CAPITAL LETTER Z	# →Ζ→
+1D795 ;	005A ;	MA	# ( 𝞕 → Z ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ZETA → LATIN CAPITAL LETTER Z	# →Ζ→
+13C3 ;	005A ;	MA	# ( Ꮓ → Z ) CHEROKEE LETTER NO → LATIN CAPITAL LETTER Z	# 
+A4DC ;	005A ;	MA	# ( ꓜ → Z ) LISU LETTER DZA → LATIN CAPITAL LETTER Z	# 
+118A9 ;	005A ;	MA	# ( 𑢩 → Z ) WARANG CITI CAPITAL LETTER O → LATIN CAPITAL LETTER Z	# 
+
+0290 ;	007A 0328 ;	MA	# ( ʐ → z̨ ) LATIN SMALL LETTER Z WITH RETROFLEX HOOK → LATIN SMALL LETTER Z, COMBINING OGONEK	# →z̢→
+
+01B6 ;	007A 0335 ;	MA	# ( ƶ → z̵ ) LATIN SMALL LETTER Z WITH STROKE → LATIN SMALL LETTER Z, COMBINING SHORT STROKE OVERLAY	# 
+
+01B5 ;	005A 0335 ;	MA	# ( Ƶ → Z̵ ) LATIN CAPITAL LETTER Z WITH STROKE → LATIN CAPITAL LETTER Z, COMBINING SHORT STROKE OVERLAY	# 
+
+0225 ;	007A 0326 ;	MA	# ( ȥ → z̦ ) LATIN SMALL LETTER Z WITH HOOK → LATIN SMALL LETTER Z, COMBINING COMMA BELOW	# →z̡→
+
+0224 ;	005A 0326 ;	MA	# ( Ȥ → Z̦ ) LATIN CAPITAL LETTER Z WITH HOOK → LATIN CAPITAL LETTER Z, COMBINING COMMA BELOW	# →Z̧→
+
+1D76 ;	007A 0334 ;	MA	# ( ᵶ → z̴ ) LATIN SMALL LETTER Z WITH MIDDLE TILDE → LATIN SMALL LETTER Z, COMBINING TILDE OVERLAY	# 
+
+01BF ;	00FE ;	MA	# ( ƿ → þ ) LATIN LETTER WYNN → LATIN SMALL LETTER THORN	# 
+03F8 ;	00FE ;	MA	# ( ϸ → þ ) GREEK SMALL LETTER SHO → LATIN SMALL LETTER THORN	# 
+
+03F7 ;	00DE ;	MA	# ( Ϸ → Þ ) GREEK CAPITAL LETTER SHO → LATIN CAPITAL LETTER THORN	# 
+
+2079 ;	A770 ;	MA	#* ( ⁹ → ꝰ ) SUPERSCRIPT NINE → MODIFIER LETTER US	# 
+
+1D24 ;	01A8 ;	MA	# ( ᴤ → ƨ ) LATIN LETTER VOICED LARYNGEAL SPIRANT → LATIN SMALL LETTER TONE TWO	# 
+03E9 ;	01A8 ;	MA	# ( ϩ → ƨ ) COPTIC SMALL LETTER HORI → LATIN SMALL LETTER TONE TWO	# 
+A645 ;	01A8 ;	MA	# ( ꙅ → ƨ ) CYRILLIC SMALL LETTER REVERSED DZE → LATIN SMALL LETTER TONE TWO	# 
+
+044C ;	0185 ;	MA	# ( ь → ƅ ) CYRILLIC SMALL LETTER SOFT SIGN → LATIN SMALL LETTER TONE SIX	# 
+
+044B ;	0185 0069 ;	MA	# ( ы → ƅi ) CYRILLIC SMALL LETTER YERU → LATIN SMALL LETTER TONE SIX, LATIN SMALL LETTER I	# →ьı→
+
+02E4 ;	02C1 ;	MA	# ( ˤ → ˁ ) MODIFIER LETTER SMALL REVERSED GLOTTAL STOP → MODIFIER LETTER REVERSED GLOTTAL STOP	# 
+
+A6CD ;	02A1 ;	MA	# ( ꛍ → ʡ ) BAMUM LETTER LU → LATIN LETTER GLOTTAL STOP WITH STROKE	# 
+
+2299 ;	0298 ;	MA	#* ( ⊙ → ʘ ) CIRCLED DOT OPERATOR → LATIN LETTER BILABIAL CLICK	# 
+2609 ;	0298 ;	MA	#* ( ☉ → ʘ ) SUN → LATIN LETTER BILABIAL CLICK	# →⊙→
+2A00 ;	0298 ;	MA	#* ( ⨀ → ʘ ) N-ARY CIRCLED DOT OPERATOR → LATIN LETTER BILABIAL CLICK	# →⊙→
+A668 ;	0298 ;	MA	# ( Ꙩ → ʘ ) CYRILLIC CAPITAL LETTER MONOCULAR O → LATIN LETTER BILABIAL CLICK	# 
+2D59 ;	0298 ;	MA	# ( ⵙ → ʘ ) TIFINAGH LETTER YAS → LATIN LETTER BILABIAL CLICK	# →⊙→
+
+213E ;	0393 ;	MA	# ( ℾ → Γ ) DOUBLE-STRUCK CAPITAL GAMMA → GREEK CAPITAL LETTER GAMMA	# 
+1D6AA ;	0393 ;	MA	# ( 𝚪 → Γ ) MATHEMATICAL BOLD CAPITAL GAMMA → GREEK CAPITAL LETTER GAMMA	# 
+1D6E4 ;	0393 ;	MA	# ( 𝛤 → Γ ) MATHEMATICAL ITALIC CAPITAL GAMMA → GREEK CAPITAL LETTER GAMMA	# 
+1D71E ;	0393 ;	MA	# ( 𝜞 → Γ ) MATHEMATICAL BOLD ITALIC CAPITAL GAMMA → GREEK CAPITAL LETTER GAMMA	# 
+1D758 ;	0393 ;	MA	# ( 𝝘 → Γ ) MATHEMATICAL SANS-SERIF BOLD CAPITAL GAMMA → GREEK CAPITAL LETTER GAMMA	# 
+1D792 ;	0393 ;	MA	# ( 𝞒 → Γ ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL GAMMA → GREEK CAPITAL LETTER GAMMA	# 
+2C84 ;	0393 ;	MA	# ( Ⲅ → Γ ) COPTIC CAPITAL LETTER GAMMA → GREEK CAPITAL LETTER GAMMA	# 
+0413 ;	0393 ;	MA	# ( Г → Γ ) CYRILLIC CAPITAL LETTER GHE → GREEK CAPITAL LETTER GAMMA	# 
+13B1 ;	0393 ;	MA	# ( Ꮁ → Γ ) CHEROKEE LETTER HU → GREEK CAPITAL LETTER GAMMA	# 
+14A5 ;	0393 ;	MA	# ( ᒥ → Γ ) CANADIAN SYLLABICS MI → GREEK CAPITAL LETTER GAMMA	# 
+
+0492 ;	0393 0335 ;	MA	# ( Ғ → Γ̵ ) CYRILLIC CAPITAL LETTER GHE WITH STROKE → GREEK CAPITAL LETTER GAMMA, COMBINING SHORT STROKE OVERLAY	# →Г̵→
+
+14AF ;	0393 00B7 ;	MA	# ( ᒯ → Γ· ) CANADIAN SYLLABICS WEST-CREE MWI → GREEK CAPITAL LETTER GAMMA, MIDDLE DOT	# →ᒥᐧ→→ᒥ·→
+
+0490 ;	0393 0027 ;	MA	# ( Ґ → Γ' ) CYRILLIC CAPITAL LETTER GHE WITH UPTURN → GREEK CAPITAL LETTER GAMMA, APOSTROPHE	# →Гˈ→
+
+2206 ;	0394 ;	MA	#* ( ∆ → Δ ) INCREMENT → GREEK CAPITAL LETTER DELTA	# 
+25B3 ;	0394 ;	MA	#* ( △ → Δ ) WHITE UP-POINTING TRIANGLE → GREEK CAPITAL LETTER DELTA	# 
+1F702 ;	0394 ;	MA	#* ( 🜂 → Δ ) ALCHEMICAL SYMBOL FOR FIRE → GREEK CAPITAL LETTER DELTA	# →△→
+1D6AB ;	0394 ;	MA	# ( 𝚫 → Δ ) MATHEMATICAL BOLD CAPITAL DELTA → GREEK CAPITAL LETTER DELTA	# 
+1D6E5 ;	0394 ;	MA	# ( 𝛥 → Δ ) MATHEMATICAL ITALIC CAPITAL DELTA → GREEK CAPITAL LETTER DELTA	# 
+1D71F ;	0394 ;	MA	# ( 𝜟 → Δ ) MATHEMATICAL BOLD ITALIC CAPITAL DELTA → GREEK CAPITAL LETTER DELTA	# 
+1D759 ;	0394 ;	MA	# ( 𝝙 → Δ ) MATHEMATICAL SANS-SERIF BOLD CAPITAL DELTA → GREEK CAPITAL LETTER DELTA	# 
+1D793 ;	0394 ;	MA	# ( 𝞓 → Δ ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL DELTA → GREEK CAPITAL LETTER DELTA	# 
+2C86 ;	0394 ;	MA	# ( Ⲇ → Δ ) COPTIC CAPITAL LETTER DALDA → GREEK CAPITAL LETTER DELTA	# 
+2D60 ;	0394 ;	MA	# ( ⵠ → Δ ) TIFINAGH LETTER YAV → GREEK CAPITAL LETTER DELTA	# 
+1403 ;	0394 ;	MA	# ( ᐃ → Δ ) CANADIAN SYLLABICS I → GREEK CAPITAL LETTER DELTA	# 
+10285 ;	0394 ;	MA	# ( 𐊅 → Δ ) LYCIAN LETTER D → GREEK CAPITAL LETTER DELTA	# 
+102A3 ;	0394 ;	MA	# ( 𐊣 → Δ ) CARIAN LETTER L → GREEK CAPITAL LETTER DELTA	# 
+
+2359 ;	0394 0332 ;	MA	#* ( ⍙ → Δ̲ ) APL FUNCTIONAL SYMBOL DELTA UNDERBAR → GREEK CAPITAL LETTER DELTA, COMBINING LOW LINE	# 
+
+140F ;	0394 00B7 ;	MA	# ( ᐏ → Δ· ) CANADIAN SYLLABICS WEST-CREE WI → GREEK CAPITAL LETTER DELTA, MIDDLE DOT	# →ᐃᐧ→
+
+142C ;	0394 1420 ;	MA	# ( ᐬ → Δᐠ ) CANADIAN SYLLABICS IN → GREEK CAPITAL LETTER DELTA, CANADIAN SYLLABICS FINAL GRAVE	# →ᐃᐠ→
+
+1D7CB ;	03DD ;	MA	# ( 𝟋 → ϝ ) MATHEMATICAL BOLD SMALL DIGAMMA → GREEK SMALL LETTER DIGAMMA	# 
+
+1D6C7 ;	03B6 ;	MA	# ( 𝛇 → ζ ) MATHEMATICAL BOLD SMALL ZETA → GREEK SMALL LETTER ZETA	# 
+1D701 ;	03B6 ;	MA	# ( 𝜁 → ζ ) MATHEMATICAL ITALIC SMALL ZETA → GREEK SMALL LETTER ZETA	# 
+1D73B ;	03B6 ;	MA	# ( 𝜻 → ζ ) MATHEMATICAL BOLD ITALIC SMALL ZETA → GREEK SMALL LETTER ZETA	# 
+1D775 ;	03B6 ;	MA	# ( 𝝵 → ζ ) MATHEMATICAL SANS-SERIF BOLD SMALL ZETA → GREEK SMALL LETTER ZETA	# 
+1D7AF ;	03B6 ;	MA	# ( 𝞯 → ζ ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ZETA → GREEK SMALL LETTER ZETA	# 
+
+2CE4 ;	03D7 ;	MA	# ( ⳤ → ϗ ) COPTIC SYMBOL KAI → GREEK KAI SYMBOL	# 
+
+1D6CC ;	03BB ;	MA	# ( 𝛌 → λ ) MATHEMATICAL BOLD SMALL LAMDA → GREEK SMALL LETTER LAMDA	# 
+1D706 ;	03BB ;	MA	# ( 𝜆 → λ ) MATHEMATICAL ITALIC SMALL LAMDA → GREEK SMALL LETTER LAMDA	# 
+1D740 ;	03BB ;	MA	# ( 𝝀 → λ ) MATHEMATICAL BOLD ITALIC SMALL LAMDA → GREEK SMALL LETTER LAMDA	# 
+1D77A ;	03BB ;	MA	# ( 𝝺 → λ ) MATHEMATICAL SANS-SERIF BOLD SMALL LAMDA → GREEK SMALL LETTER LAMDA	# 
+1D7B4 ;	03BB ;	MA	# ( 𝞴 → λ ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL LAMDA → GREEK SMALL LETTER LAMDA	# 
+2C96 ;	03BB ;	MA	# ( Ⲗ → λ ) COPTIC CAPITAL LETTER LAULA → GREEK SMALL LETTER LAMDA	# 
+
+00B5 ;	03BC ;	MA	# ( µ → μ ) MICRO SIGN → GREEK SMALL LETTER MU	# 
+1D6CD ;	03BC ;	MA	# ( 𝛍 → μ ) MATHEMATICAL BOLD SMALL MU → GREEK SMALL LETTER MU	# 
+1D707 ;	03BC ;	MA	# ( 𝜇 → μ ) MATHEMATICAL ITALIC SMALL MU → GREEK SMALL LETTER MU	# 
+1D741 ;	03BC ;	MA	# ( 𝝁 → μ ) MATHEMATICAL BOLD ITALIC SMALL MU → GREEK SMALL LETTER MU	# 
+1D77B ;	03BC ;	MA	# ( 𝝻 → μ ) MATHEMATICAL SANS-SERIF BOLD SMALL MU → GREEK SMALL LETTER MU	# 
+1D7B5 ;	03BC ;	MA	# ( 𝞵 → μ ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL MU → GREEK SMALL LETTER MU	# 
+
+1D6CF ;	03BE ;	MA	# ( 𝛏 → ξ ) MATHEMATICAL BOLD SMALL XI → GREEK SMALL LETTER XI	# 
+1D709 ;	03BE ;	MA	# ( 𝜉 → ξ ) MATHEMATICAL ITALIC SMALL XI → GREEK SMALL LETTER XI	# 
+1D743 ;	03BE ;	MA	# ( 𝝃 → ξ ) MATHEMATICAL BOLD ITALIC SMALL XI → GREEK SMALL LETTER XI	# 
+1D77D ;	03BE ;	MA	# ( 𝝽 → ξ ) MATHEMATICAL SANS-SERIF BOLD SMALL XI → GREEK SMALL LETTER XI	# 
+1D7B7 ;	03BE ;	MA	# ( 𝞷 → ξ ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL XI → GREEK SMALL LETTER XI	# 
+
+1D6B5 ;	039E ;	MA	# ( 𝚵 → Ξ ) MATHEMATICAL BOLD CAPITAL XI → GREEK CAPITAL LETTER XI	# 
+1D6EF ;	039E ;	MA	# ( 𝛯 → Ξ ) MATHEMATICAL ITALIC CAPITAL XI → GREEK CAPITAL LETTER XI	# 
+1D729 ;	039E ;	MA	# ( 𝜩 → Ξ ) MATHEMATICAL BOLD ITALIC CAPITAL XI → GREEK CAPITAL LETTER XI	# 
+1D763 ;	039E ;	MA	# ( 𝝣 → Ξ ) MATHEMATICAL SANS-SERIF BOLD CAPITAL XI → GREEK CAPITAL LETTER XI	# 
+1D79D ;	039E ;	MA	# ( 𝞝 → Ξ ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL XI → GREEK CAPITAL LETTER XI	# 
+
+220F ;	03A0 ;	MA	#* ( ∏ → Π ) N-ARY PRODUCT → GREEK CAPITAL LETTER PI	# 
+213F ;	03A0 ;	MA	# ( ℿ → Π ) DOUBLE-STRUCK CAPITAL PI → GREEK CAPITAL LETTER PI	# 
+1D6B7 ;	03A0 ;	MA	# ( 𝚷 → Π ) MATHEMATICAL BOLD CAPITAL PI → GREEK CAPITAL LETTER PI	# 
+1D6F1 ;	03A0 ;	MA	# ( 𝛱 → Π ) MATHEMATICAL ITALIC CAPITAL PI → GREEK CAPITAL LETTER PI	# 
+1D72B ;	03A0 ;	MA	# ( 𝜫 → Π ) MATHEMATICAL BOLD ITALIC CAPITAL PI → GREEK CAPITAL LETTER PI	# 
+1D765 ;	03A0 ;	MA	# ( 𝝥 → Π ) MATHEMATICAL SANS-SERIF BOLD CAPITAL PI → GREEK CAPITAL LETTER PI	# 
+1D79F ;	03A0 ;	MA	# ( 𝞟 → Π ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PI → GREEK CAPITAL LETTER PI	# 
+2CA0 ;	03A0 ;	MA	# ( Ⲡ → Π ) COPTIC CAPITAL LETTER PI → GREEK CAPITAL LETTER PI	# 
+041F ;	03A0 ;	MA	# ( П → Π ) CYRILLIC CAPITAL LETTER PE → GREEK CAPITAL LETTER PI	# 
+A6DB ;	03A0 ;	MA	# ( ꛛ → Π ) BAMUM LETTER NA → GREEK CAPITAL LETTER PI	# 
+
+102AD ;	03D8 ;	MA	# ( 𐊭 → Ϙ ) CARIAN LETTER T → GREEK LETTER ARCHAIC KOPPA	# 
+10312 ;	03D8 ;	MA	# ( 𐌒 → Ϙ ) OLD ITALIC LETTER KU → GREEK LETTER ARCHAIC KOPPA	# 
+
+03DB ;	03C2 ;	MA	# ( ϛ → ς ) GREEK SMALL LETTER STIGMA → GREEK SMALL LETTER FINAL SIGMA	# 
+1D6D3 ;	03C2 ;	MA	# ( 𝛓 → ς ) MATHEMATICAL BOLD SMALL FINAL SIGMA → GREEK SMALL LETTER FINAL SIGMA	# 
+1D70D ;	03C2 ;	MA	# ( 𝜍 → ς ) MATHEMATICAL ITALIC SMALL FINAL SIGMA → GREEK SMALL LETTER FINAL SIGMA	# 
+1D747 ;	03C2 ;	MA	# ( 𝝇 → ς ) MATHEMATICAL BOLD ITALIC SMALL FINAL SIGMA → GREEK SMALL LETTER FINAL SIGMA	# 
+1D781 ;	03C2 ;	MA	# ( 𝞁 → ς ) MATHEMATICAL SANS-SERIF BOLD SMALL FINAL SIGMA → GREEK SMALL LETTER FINAL SIGMA	# 
+1D7BB ;	03C2 ;	MA	# ( 𝞻 → ς ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL FINAL SIGMA → GREEK SMALL LETTER FINAL SIGMA	# 
+
+1D6BD ;	03A6 ;	MA	# ( 𝚽 → Φ ) MATHEMATICAL BOLD CAPITAL PHI → GREEK CAPITAL LETTER PHI	# 
+1D6F7 ;	03A6 ;	MA	# ( 𝛷 → Φ ) MATHEMATICAL ITALIC CAPITAL PHI → GREEK CAPITAL LETTER PHI	# 
+1D731 ;	03A6 ;	MA	# ( 𝜱 → Φ ) MATHEMATICAL BOLD ITALIC CAPITAL PHI → GREEK CAPITAL LETTER PHI	# 
+1D76B ;	03A6 ;	MA	# ( 𝝫 → Φ ) MATHEMATICAL SANS-SERIF BOLD CAPITAL PHI → GREEK CAPITAL LETTER PHI	# 
+1D7A5 ;	03A6 ;	MA	# ( 𝞥 → Φ ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PHI → GREEK CAPITAL LETTER PHI	# 
+2CAA ;	03A6 ;	MA	# ( Ⲫ → Φ ) COPTIC CAPITAL LETTER FI → GREEK CAPITAL LETTER PHI	# 
+0424 ;	03A6 ;	MA	# ( Ф → Φ ) CYRILLIC CAPITAL LETTER EF → GREEK CAPITAL LETTER PHI	# 
+0553 ;	03A6 ;	MA	# ( Փ → Φ ) ARMENIAN CAPITAL LETTER PIWR → GREEK CAPITAL LETTER PHI	# 
+1240 ;	03A6 ;	MA	# ( ቀ → Φ ) ETHIOPIC SYLLABLE QA → GREEK CAPITAL LETTER PHI	# →Փ→
+16F0 ;	03A6 ;	MA	# ( ᛰ → Φ ) RUNIC BELGTHOR SYMBOL → GREEK CAPITAL LETTER PHI	# 
+102B3 ;	03A6 ;	MA	# ( 𐊳 → Φ ) CARIAN LETTER NN → GREEK CAPITAL LETTER PHI	# 
+
+AB53 ;	03C7 ;	MA	# ( ꭓ → χ ) LATIN SMALL LETTER CHI → GREEK SMALL LETTER CHI	# 
+AB55 ;	03C7 ;	MA	# ( ꭕ → χ ) LATIN SMALL LETTER CHI WITH LOW LEFT SERIF → GREEK SMALL LETTER CHI	# 
+1D6D8 ;	03C7 ;	MA	# ( 𝛘 → χ ) MATHEMATICAL BOLD SMALL CHI → GREEK SMALL LETTER CHI	# 
+1D712 ;	03C7 ;	MA	# ( 𝜒 → χ ) MATHEMATICAL ITALIC SMALL CHI → GREEK SMALL LETTER CHI	# 
+1D74C ;	03C7 ;	MA	# ( 𝝌 → χ ) MATHEMATICAL BOLD ITALIC SMALL CHI → GREEK SMALL LETTER CHI	# 
+1D786 ;	03C7 ;	MA	# ( 𝞆 → χ ) MATHEMATICAL SANS-SERIF BOLD SMALL CHI → GREEK SMALL LETTER CHI	# 
+1D7C0 ;	03C7 ;	MA	# ( 𝟀 → χ ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL CHI → GREEK SMALL LETTER CHI	# 
+2CAD ;	03C7 ;	MA	# ( ⲭ → χ ) COPTIC SMALL LETTER KHI → GREEK SMALL LETTER CHI	# 
+
+1D6D9 ;	03C8 ;	MA	# ( 𝛙 → ψ ) MATHEMATICAL BOLD SMALL PSI → GREEK SMALL LETTER PSI	# 
+1D713 ;	03C8 ;	MA	# ( 𝜓 → ψ ) MATHEMATICAL ITALIC SMALL PSI → GREEK SMALL LETTER PSI	# 
+1D74D ;	03C8 ;	MA	# ( 𝝍 → ψ ) MATHEMATICAL BOLD ITALIC SMALL PSI → GREEK SMALL LETTER PSI	# 
+1D787 ;	03C8 ;	MA	# ( 𝞇 → ψ ) MATHEMATICAL SANS-SERIF BOLD SMALL PSI → GREEK SMALL LETTER PSI	# 
+1D7C1 ;	03C8 ;	MA	# ( 𝟁 → ψ ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL PSI → GREEK SMALL LETTER PSI	# 
+0471 ;	03C8 ;	MA	# ( ѱ → ψ ) CYRILLIC SMALL LETTER PSI → GREEK SMALL LETTER PSI	# 
+
+1D6BF ;	03A8 ;	MA	# ( 𝚿 → Ψ ) MATHEMATICAL BOLD CAPITAL PSI → GREEK CAPITAL LETTER PSI	# 
+1D6F9 ;	03A8 ;	MA	# ( 𝛹 → Ψ ) MATHEMATICAL ITALIC CAPITAL PSI → GREEK CAPITAL LETTER PSI	# 
+1D733 ;	03A8 ;	MA	# ( 𝜳 → Ψ ) MATHEMATICAL BOLD ITALIC CAPITAL PSI → GREEK CAPITAL LETTER PSI	# 
+1D76D ;	03A8 ;	MA	# ( 𝝭 → Ψ ) MATHEMATICAL SANS-SERIF BOLD CAPITAL PSI → GREEK CAPITAL LETTER PSI	# 
+1D7A7 ;	03A8 ;	MA	# ( 𝞧 → Ψ ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PSI → GREEK CAPITAL LETTER PSI	# 
+2CAE ;	03A8 ;	MA	# ( Ⲯ → Ψ ) COPTIC CAPITAL LETTER PSI → GREEK CAPITAL LETTER PSI	# 
+0470 ;	03A8 ;	MA	# ( Ѱ → Ψ ) CYRILLIC CAPITAL LETTER PSI → GREEK CAPITAL LETTER PSI	# 
+16D8 ;	03A8 ;	MA	# ( ᛘ → Ψ ) RUNIC LETTER LONG-BRANCH-MADR M → GREEK CAPITAL LETTER PSI	# 
+102B5 ;	03A8 ;	MA	# ( 𐊵 → Ψ ) CARIAN LETTER N → GREEK CAPITAL LETTER PSI	# 
+
+2375 ;	03C9 ;	MA	#* ( ⍵ → ω ) APL FUNCTIONAL SYMBOL OMEGA → GREEK SMALL LETTER OMEGA	# 
+A7B7 ;	03C9 ;	MA	# ( ꞷ → ω ) LATIN SMALL LETTER OMEGA → GREEK SMALL LETTER OMEGA	# 
+1D6DA ;	03C9 ;	MA	# ( 𝛚 → ω ) MATHEMATICAL BOLD SMALL OMEGA → GREEK SMALL LETTER OMEGA	# 
+1D714 ;	03C9 ;	MA	# ( 𝜔 → ω ) MATHEMATICAL ITALIC SMALL OMEGA → GREEK SMALL LETTER OMEGA	# 
+1D74E ;	03C9 ;	MA	# ( 𝝎 → ω ) MATHEMATICAL BOLD ITALIC SMALL OMEGA → GREEK SMALL LETTER OMEGA	# 
+1D788 ;	03C9 ;	MA	# ( 𝞈 → ω ) MATHEMATICAL SANS-SERIF BOLD SMALL OMEGA → GREEK SMALL LETTER OMEGA	# 
+1D7C2 ;	03C9 ;	MA	# ( 𝟂 → ω ) MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMEGA → GREEK SMALL LETTER OMEGA	# 
+2CB1 ;	03C9 ;	MA	# ( ⲱ → ω ) COPTIC SMALL LETTER OOU → GREEK SMALL LETTER OMEGA	# 
+A64D ;	03C9 ;	MA	# ( ꙍ → ω ) CYRILLIC SMALL LETTER BROAD OMEGA → GREEK SMALL LETTER OMEGA	# →ꞷ→
+
+2126 ;	03A9 ;	MA	# ( Ω → Ω ) OHM SIGN → GREEK CAPITAL LETTER OMEGA	# 
+1D6C0 ;	03A9 ;	MA	# ( 𝛀 → Ω ) MATHEMATICAL BOLD CAPITAL OMEGA → GREEK CAPITAL LETTER OMEGA	# 
+1D6FA ;	03A9 ;	MA	# ( 𝛺 → Ω ) MATHEMATICAL ITALIC CAPITAL OMEGA → GREEK CAPITAL LETTER OMEGA	# 
+1D734 ;	03A9 ;	MA	# ( 𝜴 → Ω ) MATHEMATICAL BOLD ITALIC CAPITAL OMEGA → GREEK CAPITAL LETTER OMEGA	# 
+1D76E ;	03A9 ;	MA	# ( 𝝮 → Ω ) MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA → GREEK CAPITAL LETTER OMEGA	# 
+1D7A8 ;	03A9 ;	MA	# ( 𝞨 → Ω ) MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA → GREEK CAPITAL LETTER OMEGA	# 
+162F ;	03A9 ;	MA	# ( ᘯ → Ω ) CANADIAN SYLLABICS CARRIER LHO → GREEK CAPITAL LETTER OMEGA	# 
+1635 ;	03A9 ;	MA	# ( ᘵ → Ω ) CANADIAN SYLLABICS CARRIER TLHO → GREEK CAPITAL LETTER OMEGA	# →ᘯ→
+102B6 ;	03A9 ;	MA	# ( 𐊶 → Ω ) CARIAN LETTER TT2 → GREEK CAPITAL LETTER OMEGA	# 
+
+2379 ;	03C9 0332 ;	MA	#* ( ⍹ → ω̲ ) APL FUNCTIONAL SYMBOL OMEGA UNDERBAR → GREEK SMALL LETTER OMEGA, COMBINING LOW LINE	# 
+
+1F7D ;	1FF4 ;	MA	# ( ώ → ῴ ) GREEK SMALL LETTER OMEGA WITH OXIA → GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI	# 
+
+2630 ;	2CB6 ;	MA	#* ( ☰ → Ⲷ ) TRIGRAM FOR HEAVEN → COPTIC CAPITAL LETTER CRYPTOGRAMMIC EIE	# 
+
+2CDC ;	03EC ;	MA	# ( Ⳝ → Ϭ ) COPTIC CAPITAL LETTER OLD NUBIAN SHIMA → COPTIC CAPITAL LETTER SHIMA	# 
+
+0497 ;	0436 0329 ;	MA	# ( җ → ж̩ ) CYRILLIC SMALL LETTER ZHE WITH DESCENDER → CYRILLIC SMALL LETTER ZHE, COMBINING VERTICAL LINE BELOW	# 
+
+0496 ;	0416 0329 ;	MA	# ( Җ → Ж̩ ) CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER → CYRILLIC CAPITAL LETTER ZHE, COMBINING VERTICAL LINE BELOW	# 
+
+1D20B ;	0418 ;	MA	#* ( 𝈋 → И ) GREEK VOCAL NOTATION SYMBOL-12 → CYRILLIC CAPITAL LETTER I	# →Ͷ→
+0376 ;	0418 ;	MA	# ( Ͷ → И ) GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA → CYRILLIC CAPITAL LETTER I	# 
+A6A1 ;	0418 ;	MA	# ( ꚡ → И ) BAMUM LETTER KA → CYRILLIC CAPITAL LETTER I	# →Ͷ→
+10425 ;	0418 ;	MA	# ( 𐐥 → И ) DESERET CAPITAL LETTER ENG → CYRILLIC CAPITAL LETTER I	# 
+
+0419 ;	040D ;	MA	# ( Й → Ѝ ) CYRILLIC CAPITAL LETTER SHORT I → CYRILLIC CAPITAL LETTER I WITH GRAVE	# 
+
+048A ;	040D 0326 ;	MA	# ( Ҋ → Ѝ̦ ) CYRILLIC CAPITAL LETTER SHORT I WITH TAIL → CYRILLIC CAPITAL LETTER I WITH GRAVE, COMBINING COMMA BELOW	# →Й̡→
+
+045D ;	0439 ;	MA	# ( ѝ → й ) CYRILLIC SMALL LETTER I WITH GRAVE → CYRILLIC SMALL LETTER SHORT I	# 
+
+048B ;	0439 0326 ;	MA	# ( ҋ → й̦ ) CYRILLIC SMALL LETTER SHORT I WITH TAIL → CYRILLIC SMALL LETTER SHORT I, COMBINING COMMA BELOW	# →й̡→
+
+1D2B ;	043B ;	MA	# ( ᴫ → л ) CYRILLIC LETTER SMALL CAPITAL EL → CYRILLIC SMALL LETTER EL	# 
+
+04C6 ;	043B 0326 ;	MA	# ( ӆ → л̦ ) CYRILLIC SMALL LETTER EL WITH TAIL → CYRILLIC SMALL LETTER EL, COMBINING COMMA BELOW	# →л̡→
+
+AB60 ;	0459 ;	MA	# ( ꭠ → љ ) LATIN SMALL LETTER SAKHA YAT → CYRILLIC SMALL LETTER LJE	# 
+
+1D202 ;	04FE ;	MA	#* ( 𝈂 → Ӿ ) GREEK VOCAL NOTATION SYMBOL-3 → CYRILLIC CAPITAL LETTER HA WITH STROKE	# 
+
+1D222 ;	0460 ;	MA	#* ( 𝈢 → Ѡ ) GREEK INSTRUMENTAL NOTATION SYMBOL-8 → CYRILLIC CAPITAL LETTER OMEGA	# 
+13C7 ;	0460 ;	MA	# ( Ꮗ → Ѡ ) CHEROKEE LETTER QUE → CYRILLIC CAPITAL LETTER OMEGA	# 
+15EF ;	0460 ;	MA	# ( ᗯ → Ѡ ) CANADIAN SYLLABICS CARRIER GU → CYRILLIC CAPITAL LETTER OMEGA	# 
+
+047C ;	0460 0486 0487 ;	MA	# ( Ѽ → Ѡ҆҇ ) CYRILLIC CAPITAL LETTER OMEGA WITH TITLO → CYRILLIC CAPITAL LETTER OMEGA, COMBINING CYRILLIC PSILI PNEUMATA, COMBINING CYRILLIC POKRYTIE	# 
+
+18ED ;	0460 00B7 ;	MA	# ( ᣭ → Ѡ· ) CANADIAN SYLLABICS CARRIER GWU → CYRILLIC CAPITAL LETTER OMEGA, MIDDLE DOT	# →ᗯᐧ→
+
+A7B6 ;	A64C ;	MA	# ( Ꞷ → Ꙍ ) LATIN CAPITAL LETTER OMEGA → CYRILLIC CAPITAL LETTER BROAD OMEGA	# 
+
+04CC ;	04B7 ;	MA	# ( ӌ → ҷ ) CYRILLIC SMALL LETTER KHAKASSIAN CHE → CYRILLIC SMALL LETTER CHE WITH DESCENDER	# 
+
+04CB ;	04B6 ;	MA	# ( Ӌ → Ҷ ) CYRILLIC CAPITAL LETTER KHAKASSIAN CHE → CYRILLIC CAPITAL LETTER CHE WITH DESCENDER	# 
+
+04BE ;	04BC 0328 ;	MA	# ( Ҿ → Ҽ̨ ) CYRILLIC CAPITAL LETTER ABKHASIAN CHE WITH DESCENDER → CYRILLIC CAPITAL LETTER ABKHASIAN CHE, COMBINING OGONEK	# 
+
+2CBD ;	0448 ;	MA	# ( ⲽ → ш ) COPTIC SMALL LETTER CRYPTOGRAMMIC NI → CYRILLIC SMALL LETTER SHA	# 
+
+2CBC ;	0428 ;	MA	# ( Ⲽ → Ш ) COPTIC CAPITAL LETTER CRYPTOGRAMMIC NI → CYRILLIC CAPITAL LETTER SHA	# 
+
+A650 ;	042A 006C ;	MA	# ( Ꙑ → Ъl ) CYRILLIC CAPITAL LETTER YERU WITH BACK YER → CYRILLIC CAPITAL LETTER HARD SIGN, LATIN SMALL LETTER L	# →ЪІ→
+
+2108 ;	042D ;	MA	#* ( ℈ → Э ) SCRUPLE → CYRILLIC CAPITAL LETTER E	# 
+
+1F701 ;	A658 ;	MA	#* ( 🜁 → Ꙙ ) ALCHEMICAL SYMBOL FOR AIR → CYRILLIC CAPITAL LETTER CLOSED LITTLE YUS	# 
+
+A992 ;	2C3F ;	MA	# ( ꦒ → ⰿ ) JAVANESE LETTER GA → GLAGOLITIC SMALL LETTER MYSLITE	# 
+
+0587 ;	0565 0582 ;	MA	# ( և → եւ ) ARMENIAN SMALL LIGATURE ECH YIWN → ARMENIAN SMALL LETTER ECH, ARMENIAN SMALL LETTER YIWN	# 
+
+1294 ;	0571 ;	MA	# ( ኔ → ձ ) ETHIOPIC SYLLABLE NEE → ARMENIAN SMALL LETTER JA	# 
+
+FB14 ;	0574 0565 ;	MA	# ( ﬔ → մե ) ARMENIAN SMALL LIGATURE MEN ECH → ARMENIAN SMALL LETTER MEN, ARMENIAN SMALL LETTER ECH	# 
+
+FB15 ;	0574 056B ;	MA	# ( ﬕ → մի ) ARMENIAN SMALL LIGATURE MEN INI → ARMENIAN SMALL LETTER MEN, ARMENIAN SMALL LETTER INI	# 
+
+FB17 ;	0574 056D ;	MA	# ( ﬗ → մխ ) ARMENIAN SMALL LIGATURE MEN XEH → ARMENIAN SMALL LETTER MEN, ARMENIAN SMALL LETTER XEH	# 
+
+FB13 ;	0574 0576 ;	MA	# ( ﬓ → մն ) ARMENIAN SMALL LIGATURE MEN NOW → ARMENIAN SMALL LETTER MEN, ARMENIAN SMALL LETTER NOW	# 
+
+2229 ;	0548 ;	MA	#* ( ∩ → Ո ) INTERSECTION → ARMENIAN CAPITAL LETTER VO	# →ᑎ→
+22C2 ;	0548 ;	MA	#* ( ⋂ → Ո ) N-ARY INTERSECTION → ARMENIAN CAPITAL LETTER VO	# →∩→→ᑎ→
+1D245 ;	0548 ;	MA	#* ( 𝉅 → Ո ) GREEK MUSICAL LEIMMA → ARMENIAN CAPITAL LETTER VO	# →∩→→ᑎ→
+1260 ;	0548 ;	MA	# ( በ → Ո ) ETHIOPIC SYLLABLE BA → ARMENIAN CAPITAL LETTER VO	# 
+144E ;	0548 ;	MA	# ( ᑎ → Ո ) CANADIAN SYLLABICS TI → ARMENIAN CAPITAL LETTER VO	# 
+A4F5 ;	0548 ;	MA	# ( ꓵ → Ո ) LISU LETTER UE → ARMENIAN CAPITAL LETTER VO	# →∩→→ᑎ→
+
+145A ;	0548 00B7 ;	MA	# ( ᑚ → Ո· ) CANADIAN SYLLABICS WEST-CREE TWI → ARMENIAN CAPITAL LETTER VO, MIDDLE DOT	# →ᑎᐧ→→ᑎ·→
+
+1468 ;	0548 0027 ;	MA	# ( ᑨ → Ո' ) CANADIAN SYLLABICS TTI → ARMENIAN CAPITAL LETTER VO, APOSTROPHE	# →ᑎᑊ→→ᑎ'→
+
+FB16 ;	057E 0576 ;	MA	# ( ﬖ → վն ) ARMENIAN SMALL LIGATURE VEW NOW → ARMENIAN SMALL LETTER VEW, ARMENIAN SMALL LETTER NOW	# 
+
+20BD ;	0554 ;	MA	#* ( ₽ → Ք ) RUBLE SIGN → ARMENIAN CAPITAL LETTER KEH	# 
+
+02D3 ;	0559 ;	MA	#* ( ˓ → ՙ ) MODIFIER LETTER CENTRED LEFT HALF RING → ARMENIAN MODIFIER LETTER LEFT HALF RING	# 
+02BF ;	0559 ;	MA	# ( ʿ → ՙ ) MODIFIER LETTER LEFT HALF RING → ARMENIAN MODIFIER LETTER LEFT HALF RING	# 
+
+2135 ;	05D0 ;	MA	# ( ℵ → ‎א‎ ) ALEF SYMBOL → HEBREW LETTER ALEF	# 
+FB21 ;	05D0 ;	MA	# ( ‎ﬡ‎ → ‎א‎ ) HEBREW LETTER WIDE ALEF → HEBREW LETTER ALEF	# 
+
+FB2F ;	FB2E ;	MA	# ( ‎אָ‎ → ‎אַ‎ ) HEBREW LETTER ALEF WITH QAMATS → HEBREW LETTER ALEF WITH PATAH	# 
+FB30 ;	FB2E ;	MA	# ( ‎אּ‎ → ‎אַ‎ ) HEBREW LETTER ALEF WITH MAPIQ → HEBREW LETTER ALEF WITH PATAH	# 
+
+FB4F ;	05D0 05DC ;	MA	# ( ‎ﭏ‎ → ‎אל‎ ) HEBREW LIGATURE ALEF LAMED → HEBREW LETTER ALEF, HEBREW LETTER LAMED	# 
+
+2136 ;	05D1 ;	MA	# ( ℶ → ‎ב‎ ) BET SYMBOL → HEBREW LETTER BET	# 
+
+2137 ;	05D2 ;	MA	# ( ℷ → ‎ג‎ ) GIMEL SYMBOL → HEBREW LETTER GIMEL	# 
+
+2138 ;	05D3 ;	MA	# ( ℸ → ‎ד‎ ) DALET SYMBOL → HEBREW LETTER DALET	# 
+FB22 ;	05D3 ;	MA	# ( ‎ﬢ‎ → ‎ד‎ ) HEBREW LETTER WIDE DALET → HEBREW LETTER DALET	# 
+
+FB23 ;	05D4 ;	MA	# ( ‎ﬣ‎ → ‎ה‎ ) HEBREW LETTER WIDE HE → HEBREW LETTER HE	# 
+
+FB39 ;	FB1D ;	MA	# ( ‎יּ‎ → ‎יִ‎ ) HEBREW LETTER YOD WITH DAGESH → HEBREW LETTER YOD WITH HIRIQ	# 
+
+FB24 ;	05DB ;	MA	# ( ‎ﬤ‎ → ‎כ‎ ) HEBREW LETTER WIDE KAF → HEBREW LETTER KAF	# 
+
+FB25 ;	05DC ;	MA	# ( ‎ﬥ‎ → ‎ל‎ ) HEBREW LETTER WIDE LAMED → HEBREW LETTER LAMED	# 
+
+FB26 ;	05DD ;	MA	# ( ‎ﬦ‎ → ‎ם‎ ) HEBREW LETTER WIDE FINAL MEM → HEBREW LETTER FINAL MEM	# 
+
+FB20 ;	05E2 ;	MA	# ( ‎ﬠ‎ → ‎ע‎ ) HEBREW LETTER ALTERNATIVE AYIN → HEBREW LETTER AYIN	# 
+
+FB27 ;	05E8 ;	MA	# ( ‎ﬧ‎ → ‎ר‎ ) HEBREW LETTER WIDE RESH → HEBREW LETTER RESH	# 
+
+FB2B ;	FB2A ;	MA	# ( ‎שׂ‎ → ‎שׁ‎ ) HEBREW LETTER SHIN WITH SIN DOT → HEBREW LETTER SHIN WITH SHIN DOT	# 
+FB49 ;	FB2A ;	MA	# ( ‎שּ‎ → ‎שׁ‎ ) HEBREW LETTER SHIN WITH DAGESH → HEBREW LETTER SHIN WITH SHIN DOT	# 
+
+FB2D ;	FB2C ;	MA	# ( ‎שּׂ‎ → ‎שּׁ‎ ) HEBREW LETTER SHIN WITH DAGESH AND SIN DOT → HEBREW LETTER SHIN WITH DAGESH AND SHIN DOT	# 
+
+FB28 ;	05EA ;	MA	# ( ‎ﬨ‎ → ‎ת‎ ) HEBREW LETTER WIDE TAV → HEBREW LETTER TAV	# 
+
+FE80 ;	0621 ;	MA	# ( ‎ﺀ‎ → ‎ء‎ ) ARABIC LETTER HAMZA ISOLATED FORM → ARABIC LETTER HAMZA	# 
+
+06FD ;	0621 0348 ;	MA	#* ( ‎۽‎ → ‎ء͈‎ ) ARABIC SIGN SINDHI AMPERSAND → ARABIC LETTER HAMZA, COMBINING DOUBLE VERTICAL LINE BELOW	# 
+
+FE82 ;	0622 ;	MA	# ( ‎ﺂ‎ → ‎آ‎ ) ARABIC LETTER ALEF WITH MADDA ABOVE FINAL FORM → ARABIC LETTER ALEF WITH MADDA ABOVE	# 
+FE81 ;	0622 ;	MA	# ( ‎ﺁ‎ → ‎آ‎ ) ARABIC LETTER ALEF WITH MADDA ABOVE ISOLATED FORM → ARABIC LETTER ALEF WITH MADDA ABOVE	# 
+
+FB51 ;	0671 ;	MA	# ( ‎ﭑ‎ → ‎ٱ‎ ) ARABIC LETTER ALEF WASLA FINAL FORM → ARABIC LETTER ALEF WASLA	# 
+FB50 ;	0671 ;	MA	# ( ‎ﭐ‎ → ‎ٱ‎ ) ARABIC LETTER ALEF WASLA ISOLATED FORM → ARABIC LETTER ALEF WASLA	# 
+
+1EE01 ;	0628 ;	MA	# ( ‎𞸁‎ → ‎ب‎ ) ARABIC MATHEMATICAL BEH → ARABIC LETTER BEH	# 
+1EE21 ;	0628 ;	MA	# ( ‎𞸡‎ → ‎ب‎ ) ARABIC MATHEMATICAL INITIAL BEH → ARABIC LETTER BEH	# 
+1EE61 ;	0628 ;	MA	# ( ‎𞹡‎ → ‎ب‎ ) ARABIC MATHEMATICAL STRETCHED BEH → ARABIC LETTER BEH	# 
+1EE81 ;	0628 ;	MA	# ( ‎𞺁‎ → ‎ب‎ ) ARABIC MATHEMATICAL LOOPED BEH → ARABIC LETTER BEH	# 
+1EEA1 ;	0628 ;	MA	# ( ‎𞺡‎ → ‎ب‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK BEH → ARABIC LETTER BEH	# 
+FE91 ;	0628 ;	MA	# ( ‎ﺑ‎ → ‎ب‎ ) ARABIC LETTER BEH INITIAL FORM → ARABIC LETTER BEH	# 
+FE92 ;	0628 ;	MA	# ( ‎ﺒ‎ → ‎ب‎ ) ARABIC LETTER BEH MEDIAL FORM → ARABIC LETTER BEH	# 
+FE90 ;	0628 ;	MA	# ( ‎ﺐ‎ → ‎ب‎ ) ARABIC LETTER BEH FINAL FORM → ARABIC LETTER BEH	# 
+FE8F ;	0628 ;	MA	# ( ‎ﺏ‎ → ‎ب‎ ) ARABIC LETTER BEH ISOLATED FORM → ARABIC LETTER BEH	# 
+
+0751 ;	0628 06DB ;	MA	# ( ‎ݑ‎ → ‎بۛ‎ ) ARABIC LETTER BEH WITH DOT BELOW AND THREE DOTS ABOVE → ARABIC LETTER BEH, ARABIC SMALL HIGH THREE DOTS	# 
+
+08A1 ;	0628 0654 ;	MA	# ( ‎ࢡ‎ → ‎بٔ‎ ) ARABIC LETTER BEH WITH HAMZA ABOVE → ARABIC LETTER BEH, ARABIC HAMZA ABOVE	# 
+
+FCA0 ;	0628 006F ;	MA	# ( ‎ﲠ‎ → ‎بo‎ ) ARABIC LIGATURE BEH WITH HEH INITIAL FORM → ARABIC LETTER BEH, LATIN SMALL LETTER O	# →‎به‎→
+FCE2 ;	0628 006F ;	MA	# ( ‎ﳢ‎ → ‎بo‎ ) ARABIC LIGATURE BEH WITH HEH MEDIAL FORM → ARABIC LETTER BEH, LATIN SMALL LETTER O	# →‎به‎→
+
+FC9C ;	0628 062C ;	MA	# ( ‎ﲜ‎ → ‎بج‎ ) ARABIC LIGATURE BEH WITH JEEM INITIAL FORM → ARABIC LETTER BEH, ARABIC LETTER JEEM	# 
+FC05 ;	0628 062C ;	MA	# ( ‎ﰅ‎ → ‎بج‎ ) ARABIC LIGATURE BEH WITH JEEM ISOLATED FORM → ARABIC LETTER BEH, ARABIC LETTER JEEM	# 
+
+FC9D ;	0628 062D ;	MA	# ( ‎ﲝ‎ → ‎بح‎ ) ARABIC LIGATURE BEH WITH HAH INITIAL FORM → ARABIC LETTER BEH, ARABIC LETTER HAH	# 
+FC06 ;	0628 062D ;	MA	# ( ‎ﰆ‎ → ‎بح‎ ) ARABIC LIGATURE BEH WITH HAH ISOLATED FORM → ARABIC LETTER BEH, ARABIC LETTER HAH	# 
+
+FDC2 ;	0628 062D 0649 ;	MA	# ( ‎ﷂ‎ → ‎بحى‎ ) ARABIC LIGATURE BEH WITH HAH WITH YEH FINAL FORM → ARABIC LETTER BEH, ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# →‎بحي‎→
+
+FC9E ;	0628 062E ;	MA	# ( ‎ﲞ‎ → ‎بخ‎ ) ARABIC LIGATURE BEH WITH KHAH INITIAL FORM → ARABIC LETTER BEH, ARABIC LETTER KHAH	# 
+FC07 ;	0628 062E ;	MA	# ( ‎ﰇ‎ → ‎بخ‎ ) ARABIC LIGATURE BEH WITH KHAH ISOLATED FORM → ARABIC LETTER BEH, ARABIC LETTER KHAH	# 
+FCD2 ;	0628 062E ;	MA	# ( ‎ﳒ‎ → ‎بخ‎ ) ARABIC LIGATURE NOON WITH JEEM INITIAL FORM → ARABIC LETTER BEH, ARABIC LETTER KHAH	# →‎ﲞ‎→
+FC4B ;	0628 062E ;	MA	# ( ‎ﱋ‎ → ‎بخ‎ ) ARABIC LIGATURE NOON WITH JEEM ISOLATED FORM → ARABIC LETTER BEH, ARABIC LETTER KHAH	# →‎نج‎→→‎ﳒ‎→→‎ﲞ‎→
+
+FD9E ;	0628 062E 0649 ;	MA	# ( ‎ﶞ‎ → ‎بخى‎ ) ARABIC LIGATURE BEH WITH KHAH WITH YEH FINAL FORM → ARABIC LETTER BEH, ARABIC LETTER KHAH, ARABIC LETTER ALEF MAKSURA	# →‎بخي‎→
+
+FC6A ;	0628 0631 ;	MA	# ( ‎ﱪ‎ → ‎بر‎ ) ARABIC LIGATURE BEH WITH REH FINAL FORM → ARABIC LETTER BEH, ARABIC LETTER REH	# 
+
+FC6B ;	0628 0632 ;	MA	# ( ‎ﱫ‎ → ‎بز‎ ) ARABIC LIGATURE BEH WITH ZAIN FINAL FORM → ARABIC LETTER BEH, ARABIC LETTER ZAIN	# 
+
+FC9F ;	0628 0645 ;	MA	# ( ‎ﲟ‎ → ‎بم‎ ) ARABIC LIGATURE BEH WITH MEEM INITIAL FORM → ARABIC LETTER BEH, ARABIC LETTER MEEM	# 
+FCE1 ;	0628 0645 ;	MA	# ( ‎ﳡ‎ → ‎بم‎ ) ARABIC LIGATURE BEH WITH MEEM MEDIAL FORM → ARABIC LETTER BEH, ARABIC LETTER MEEM	# 
+FC6C ;	0628 0645 ;	MA	# ( ‎ﱬ‎ → ‎بم‎ ) ARABIC LIGATURE BEH WITH MEEM FINAL FORM → ARABIC LETTER BEH, ARABIC LETTER MEEM	# 
+FC08 ;	0628 0645 ;	MA	# ( ‎ﰈ‎ → ‎بم‎ ) ARABIC LIGATURE BEH WITH MEEM ISOLATED FORM → ARABIC LETTER BEH, ARABIC LETTER MEEM	# 
+
+FC6D ;	0628 0646 ;	MA	# ( ‎ﱭ‎ → ‎بن‎ ) ARABIC LIGATURE BEH WITH NOON FINAL FORM → ARABIC LETTER BEH, ARABIC LETTER NOON	# 
+
+FC6E ;	0628 0649 ;	MA	# ( ‎ﱮ‎ → ‎بى‎ ) ARABIC LIGATURE BEH WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER BEH, ARABIC LETTER ALEF MAKSURA	# 
+FC09 ;	0628 0649 ;	MA	# ( ‎ﰉ‎ → ‎بى‎ ) ARABIC LIGATURE BEH WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER BEH, ARABIC LETTER ALEF MAKSURA	# 
+FC6F ;	0628 0649 ;	MA	# ( ‎ﱯ‎ → ‎بى‎ ) ARABIC LIGATURE BEH WITH YEH FINAL FORM → ARABIC LETTER BEH, ARABIC LETTER ALEF MAKSURA	# →‎بي‎→
+FC0A ;	0628 0649 ;	MA	# ( ‎ﰊ‎ → ‎بى‎ ) ARABIC LIGATURE BEH WITH YEH ISOLATED FORM → ARABIC LETTER BEH, ARABIC LETTER ALEF MAKSURA	# →‎بي‎→
+
+FB54 ;	067B ;	MA	# ( ‎ﭔ‎ → ‎ٻ‎ ) ARABIC LETTER BEEH INITIAL FORM → ARABIC LETTER BEEH	# 
+FB55 ;	067B ;	MA	# ( ‎ﭕ‎ → ‎ٻ‎ ) ARABIC LETTER BEEH MEDIAL FORM → ARABIC LETTER BEEH	# 
+FB53 ;	067B ;	MA	# ( ‎ﭓ‎ → ‎ٻ‎ ) ARABIC LETTER BEEH FINAL FORM → ARABIC LETTER BEEH	# 
+FB52 ;	067B ;	MA	# ( ‎ﭒ‎ → ‎ٻ‎ ) ARABIC LETTER BEEH ISOLATED FORM → ARABIC LETTER BEEH	# 
+06D0 ;	067B ;	MA	# ( ‎ې‎ → ‎ٻ‎ ) ARABIC LETTER E → ARABIC LETTER BEEH	# 
+FBE6 ;	067B ;	MA	# ( ‎ﯦ‎ → ‎ٻ‎ ) ARABIC LETTER E INITIAL FORM → ARABIC LETTER BEEH	# →‎ې‎→
+FBE7 ;	067B ;	MA	# ( ‎ﯧ‎ → ‎ٻ‎ ) ARABIC LETTER E MEDIAL FORM → ARABIC LETTER BEEH	# →‎ې‎→
+FBE5 ;	067B ;	MA	# ( ‎ﯥ‎ → ‎ٻ‎ ) ARABIC LETTER E FINAL FORM → ARABIC LETTER BEEH	# →‎ې‎→
+FBE4 ;	067B ;	MA	# ( ‎ﯤ‎ → ‎ٻ‎ ) ARABIC LETTER E ISOLATED FORM → ARABIC LETTER BEEH	# →‎ې‎→
+
+FB5C ;	0680 ;	MA	# ( ‎ﭜ‎ → ‎ڀ‎ ) ARABIC LETTER BEHEH INITIAL FORM → ARABIC LETTER BEHEH	# 
+FB5D ;	0680 ;	MA	# ( ‎ﭝ‎ → ‎ڀ‎ ) ARABIC LETTER BEHEH MEDIAL FORM → ARABIC LETTER BEHEH	# 
+FB5B ;	0680 ;	MA	# ( ‎ﭛ‎ → ‎ڀ‎ ) ARABIC LETTER BEHEH FINAL FORM → ARABIC LETTER BEHEH	# 
+FB5A ;	0680 ;	MA	# ( ‎ﭚ‎ → ‎ڀ‎ ) ARABIC LETTER BEHEH ISOLATED FORM → ARABIC LETTER BEHEH	# 
+
+08A9 ;	0754 ;	MA	# ( ‎ࢩ‎ → ‎ݔ‎ ) ARABIC LETTER YEH WITH TWO DOTS BELOW AND DOT ABOVE → ARABIC LETTER BEH WITH TWO DOTS BELOW AND DOT ABOVE	# 
+0767 ;	0754 ;	MA	# ( ‎ݧ‎ → ‎ݔ‎ ) ARABIC LETTER NOON WITH TWO DOTS BELOW → ARABIC LETTER BEH WITH TWO DOTS BELOW AND DOT ABOVE	# 
+
+00F6 ;	0629 ;	MA	# ( ö → ‎ة‎ ) LATIN SMALL LETTER O WITH DIAERESIS → ARABIC LETTER TEH MARBUTA	# 
+FE94 ;	0629 ;	MA	# ( ‎ﺔ‎ → ‎ة‎ ) ARABIC LETTER TEH MARBUTA FINAL FORM → ARABIC LETTER TEH MARBUTA	# 
+FE93 ;	0629 ;	MA	# ( ‎ﺓ‎ → ‎ة‎ ) ARABIC LETTER TEH MARBUTA ISOLATED FORM → ARABIC LETTER TEH MARBUTA	# 
+06C3 ;	0629 ;	MA	# ( ‎ۃ‎ → ‎ة‎ ) ARABIC LETTER TEH MARBUTA GOAL → ARABIC LETTER TEH MARBUTA	# 
+
+1EE15 ;	062A ;	MA	# ( ‎𞸕‎ → ‎ت‎ ) ARABIC MATHEMATICAL TEH → ARABIC LETTER TEH	# 
+1EE35 ;	062A ;	MA	# ( ‎𞸵‎ → ‎ت‎ ) ARABIC MATHEMATICAL INITIAL TEH → ARABIC LETTER TEH	# 
+1EE75 ;	062A ;	MA	# ( ‎𞹵‎ → ‎ت‎ ) ARABIC MATHEMATICAL STRETCHED TEH → ARABIC LETTER TEH	# 
+1EE95 ;	062A ;	MA	# ( ‎𞺕‎ → ‎ت‎ ) ARABIC MATHEMATICAL LOOPED TEH → ARABIC LETTER TEH	# 
+1EEB5 ;	062A ;	MA	# ( ‎𞺵‎ → ‎ت‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK TEH → ARABIC LETTER TEH	# 
+FE97 ;	062A ;	MA	# ( ‎ﺗ‎ → ‎ت‎ ) ARABIC LETTER TEH INITIAL FORM → ARABIC LETTER TEH	# 
+FE98 ;	062A ;	MA	# ( ‎ﺘ‎ → ‎ت‎ ) ARABIC LETTER TEH MEDIAL FORM → ARABIC LETTER TEH	# 
+FE96 ;	062A ;	MA	# ( ‎ﺖ‎ → ‎ت‎ ) ARABIC LETTER TEH FINAL FORM → ARABIC LETTER TEH	# 
+FE95 ;	062A ;	MA	# ( ‎ﺕ‎ → ‎ت‎ ) ARABIC LETTER TEH ISOLATED FORM → ARABIC LETTER TEH	# 
+
+FCA5 ;	062A 006F ;	MA	# ( ‎ﲥ‎ → ‎تo‎ ) ARABIC LIGATURE TEH WITH HEH INITIAL FORM → ARABIC LETTER TEH, LATIN SMALL LETTER O	# →‎ته‎→
+FCE4 ;	062A 006F ;	MA	# ( ‎ﳤ‎ → ‎تo‎ ) ARABIC LIGATURE TEH WITH HEH MEDIAL FORM → ARABIC LETTER TEH, LATIN SMALL LETTER O	# →‎ته‎→
+
+FCA1 ;	062A 062C ;	MA	# ( ‎ﲡ‎ → ‎تج‎ ) ARABIC LIGATURE TEH WITH JEEM INITIAL FORM → ARABIC LETTER TEH, ARABIC LETTER JEEM	# 
+FC0B ;	062A 062C ;	MA	# ( ‎ﰋ‎ → ‎تج‎ ) ARABIC LIGATURE TEH WITH JEEM ISOLATED FORM → ARABIC LETTER TEH, ARABIC LETTER JEEM	# 
+
+FD50 ;	062A 062C 0645 ;	MA	# ( ‎ﵐ‎ → ‎تجم‎ ) ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM → ARABIC LETTER TEH, ARABIC LETTER JEEM, ARABIC LETTER MEEM	# 
+
+FDA0 ;	062A 062C 0649 ;	MA	# ( ‎ﶠ‎ → ‎تجى‎ ) ARABIC LIGATURE TEH WITH JEEM WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER TEH, ARABIC LETTER JEEM, ARABIC LETTER ALEF MAKSURA	# 
+FD9F ;	062A 062C 0649 ;	MA	# ( ‎ﶟ‎ → ‎تجى‎ ) ARABIC LIGATURE TEH WITH JEEM WITH YEH FINAL FORM → ARABIC LETTER TEH, ARABIC LETTER JEEM, ARABIC LETTER ALEF MAKSURA	# →‎تجي‎→
+
+FCA2 ;	062A 062D ;	MA	# ( ‎ﲢ‎ → ‎تح‎ ) ARABIC LIGATURE TEH WITH HAH INITIAL FORM → ARABIC LETTER TEH, ARABIC LETTER HAH	# 
+FC0C ;	062A 062D ;	MA	# ( ‎ﰌ‎ → ‎تح‎ ) ARABIC LIGATURE TEH WITH HAH ISOLATED FORM → ARABIC LETTER TEH, ARABIC LETTER HAH	# 
+
+FD52 ;	062A 062D 062C ;	MA	# ( ‎ﵒ‎ → ‎تحج‎ ) ARABIC LIGATURE TEH WITH HAH WITH JEEM INITIAL FORM → ARABIC LETTER TEH, ARABIC LETTER HAH, ARABIC LETTER JEEM	# 
+FD51 ;	062A 062D 062C ;	MA	# ( ‎ﵑ‎ → ‎تحج‎ ) ARABIC LIGATURE TEH WITH HAH WITH JEEM FINAL FORM → ARABIC LETTER TEH, ARABIC LETTER HAH, ARABIC LETTER JEEM	# 
+
+FD53 ;	062A 062D 0645 ;	MA	# ( ‎ﵓ‎ → ‎تحم‎ ) ARABIC LIGATURE TEH WITH HAH WITH MEEM INITIAL FORM → ARABIC LETTER TEH, ARABIC LETTER HAH, ARABIC LETTER MEEM	# 
+
+FCA3 ;	062A 062E ;	MA	# ( ‎ﲣ‎ → ‎تخ‎ ) ARABIC LIGATURE TEH WITH KHAH INITIAL FORM → ARABIC LETTER TEH, ARABIC LETTER KHAH	# 
+FC0D ;	062A 062E ;	MA	# ( ‎ﰍ‎ → ‎تخ‎ ) ARABIC LIGATURE TEH WITH KHAH ISOLATED FORM → ARABIC LETTER TEH, ARABIC LETTER KHAH	# 
+
+FD54 ;	062A 062E 0645 ;	MA	# ( ‎ﵔ‎ → ‎تخم‎ ) ARABIC LIGATURE TEH WITH KHAH WITH MEEM INITIAL FORM → ARABIC LETTER TEH, ARABIC LETTER KHAH, ARABIC LETTER MEEM	# 
+
+FDA2 ;	062A 062E 0649 ;	MA	# ( ‎ﶢ‎ → ‎تخى‎ ) ARABIC LIGATURE TEH WITH KHAH WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER TEH, ARABIC LETTER KHAH, ARABIC LETTER ALEF MAKSURA	# 
+FDA1 ;	062A 062E 0649 ;	MA	# ( ‎ﶡ‎ → ‎تخى‎ ) ARABIC LIGATURE TEH WITH KHAH WITH YEH FINAL FORM → ARABIC LETTER TEH, ARABIC LETTER KHAH, ARABIC LETTER ALEF MAKSURA	# →‎تخي‎→
+
+FC70 ;	062A 0631 ;	MA	# ( ‎ﱰ‎ → ‎تر‎ ) ARABIC LIGATURE TEH WITH REH FINAL FORM → ARABIC LETTER TEH, ARABIC LETTER REH	# 
+
+FC71 ;	062A 0632 ;	MA	# ( ‎ﱱ‎ → ‎تز‎ ) ARABIC LIGATURE TEH WITH ZAIN FINAL FORM → ARABIC LETTER TEH, ARABIC LETTER ZAIN	# 
+
+FCA4 ;	062A 0645 ;	MA	# ( ‎ﲤ‎ → ‎تم‎ ) ARABIC LIGATURE TEH WITH MEEM INITIAL FORM → ARABIC LETTER TEH, ARABIC LETTER MEEM	# 
+FCE3 ;	062A 0645 ;	MA	# ( ‎ﳣ‎ → ‎تم‎ ) ARABIC LIGATURE TEH WITH MEEM MEDIAL FORM → ARABIC LETTER TEH, ARABIC LETTER MEEM	# 
+FC72 ;	062A 0645 ;	MA	# ( ‎ﱲ‎ → ‎تم‎ ) ARABIC LIGATURE TEH WITH MEEM FINAL FORM → ARABIC LETTER TEH, ARABIC LETTER MEEM	# 
+FC0E ;	062A 0645 ;	MA	# ( ‎ﰎ‎ → ‎تم‎ ) ARABIC LIGATURE TEH WITH MEEM ISOLATED FORM → ARABIC LETTER TEH, ARABIC LETTER MEEM	# 
+
+FD55 ;	062A 0645 062C ;	MA	# ( ‎ﵕ‎ → ‎تمج‎ ) ARABIC LIGATURE TEH WITH MEEM WITH JEEM INITIAL FORM → ARABIC LETTER TEH, ARABIC LETTER MEEM, ARABIC LETTER JEEM	# 
+
+FD56 ;	062A 0645 062D ;	MA	# ( ‎ﵖ‎ → ‎تمح‎ ) ARABIC LIGATURE TEH WITH MEEM WITH HAH INITIAL FORM → ARABIC LETTER TEH, ARABIC LETTER MEEM, ARABIC LETTER HAH	# 
+
+FD57 ;	062A 0645 062E ;	MA	# ( ‎ﵗ‎ → ‎تمخ‎ ) ARABIC LIGATURE TEH WITH MEEM WITH KHAH INITIAL FORM → ARABIC LETTER TEH, ARABIC LETTER MEEM, ARABIC LETTER KHAH	# 
+
+FDA4 ;	062A 0645 0649 ;	MA	# ( ‎ﶤ‎ → ‎تمى‎ ) ARABIC LIGATURE TEH WITH MEEM WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER TEH, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# 
+FDA3 ;	062A 0645 0649 ;	MA	# ( ‎ﶣ‎ → ‎تمى‎ ) ARABIC LIGATURE TEH WITH MEEM WITH YEH FINAL FORM → ARABIC LETTER TEH, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# →‎تمي‎→
+
+FC73 ;	062A 0646 ;	MA	# ( ‎ﱳ‎ → ‎تن‎ ) ARABIC LIGATURE TEH WITH NOON FINAL FORM → ARABIC LETTER TEH, ARABIC LETTER NOON	# 
+
+FC74 ;	062A 0649 ;	MA	# ( ‎ﱴ‎ → ‎تى‎ ) ARABIC LIGATURE TEH WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER TEH, ARABIC LETTER ALEF MAKSURA	# 
+FC0F ;	062A 0649 ;	MA	# ( ‎ﰏ‎ → ‎تى‎ ) ARABIC LIGATURE TEH WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER TEH, ARABIC LETTER ALEF MAKSURA	# 
+FC75 ;	062A 0649 ;	MA	# ( ‎ﱵ‎ → ‎تى‎ ) ARABIC LIGATURE TEH WITH YEH FINAL FORM → ARABIC LETTER TEH, ARABIC LETTER ALEF MAKSURA	# →‎تي‎→
+FC10 ;	062A 0649 ;	MA	# ( ‎ﰐ‎ → ‎تى‎ ) ARABIC LIGATURE TEH WITH YEH ISOLATED FORM → ARABIC LETTER TEH, ARABIC LETTER ALEF MAKSURA	# →‎تي‎→
+
+FB60 ;	067A ;	MA	# ( ‎ﭠ‎ → ‎ٺ‎ ) ARABIC LETTER TTEHEH INITIAL FORM → ARABIC LETTER TTEHEH	# 
+FB61 ;	067A ;	MA	# ( ‎ﭡ‎ → ‎ٺ‎ ) ARABIC LETTER TTEHEH MEDIAL FORM → ARABIC LETTER TTEHEH	# 
+FB5F ;	067A ;	MA	# ( ‎ﭟ‎ → ‎ٺ‎ ) ARABIC LETTER TTEHEH FINAL FORM → ARABIC LETTER TTEHEH	# 
+FB5E ;	067A ;	MA	# ( ‎ﭞ‎ → ‎ٺ‎ ) ARABIC LETTER TTEHEH ISOLATED FORM → ARABIC LETTER TTEHEH	# 
+
+FB64 ;	067F ;	MA	# ( ‎ﭤ‎ → ‎ٿ‎ ) ARABIC LETTER TEHEH INITIAL FORM → ARABIC LETTER TEHEH	# 
+FB65 ;	067F ;	MA	# ( ‎ﭥ‎ → ‎ٿ‎ ) ARABIC LETTER TEHEH MEDIAL FORM → ARABIC LETTER TEHEH	# 
+FB63 ;	067F ;	MA	# ( ‎ﭣ‎ → ‎ٿ‎ ) ARABIC LETTER TEHEH FINAL FORM → ARABIC LETTER TEHEH	# 
+FB62 ;	067F ;	MA	# ( ‎ﭢ‎ → ‎ٿ‎ ) ARABIC LETTER TEHEH ISOLATED FORM → ARABIC LETTER TEHEH	# 
+
+1EE02 ;	062C ;	MA	# ( ‎𞸂‎ → ‎ج‎ ) ARABIC MATHEMATICAL JEEM → ARABIC LETTER JEEM	# 
+1EE22 ;	062C ;	MA	# ( ‎𞸢‎ → ‎ج‎ ) ARABIC MATHEMATICAL INITIAL JEEM → ARABIC LETTER JEEM	# 
+1EE42 ;	062C ;	MA	# ( ‎𞹂‎ → ‎ج‎ ) ARABIC MATHEMATICAL TAILED JEEM → ARABIC LETTER JEEM	# 
+1EE62 ;	062C ;	MA	# ( ‎𞹢‎ → ‎ج‎ ) ARABIC MATHEMATICAL STRETCHED JEEM → ARABIC LETTER JEEM	# 
+1EE82 ;	062C ;	MA	# ( ‎𞺂‎ → ‎ج‎ ) ARABIC MATHEMATICAL LOOPED JEEM → ARABIC LETTER JEEM	# 
+1EEA2 ;	062C ;	MA	# ( ‎𞺢‎ → ‎ج‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK JEEM → ARABIC LETTER JEEM	# 
+FE9F ;	062C ;	MA	# ( ‎ﺟ‎ → ‎ج‎ ) ARABIC LETTER JEEM INITIAL FORM → ARABIC LETTER JEEM	# 
+FEA0 ;	062C ;	MA	# ( ‎ﺠ‎ → ‎ج‎ ) ARABIC LETTER JEEM MEDIAL FORM → ARABIC LETTER JEEM	# 
+FE9E ;	062C ;	MA	# ( ‎ﺞ‎ → ‎ج‎ ) ARABIC LETTER JEEM FINAL FORM → ARABIC LETTER JEEM	# 
+FE9D ;	062C ;	MA	# ( ‎ﺝ‎ → ‎ج‎ ) ARABIC LETTER JEEM ISOLATED FORM → ARABIC LETTER JEEM	# 
+
+FCA7 ;	062C 062D ;	MA	# ( ‎ﲧ‎ → ‎جح‎ ) ARABIC LIGATURE JEEM WITH HAH INITIAL FORM → ARABIC LETTER JEEM, ARABIC LETTER HAH	# 
+FC15 ;	062C 062D ;	MA	# ( ‎ﰕ‎ → ‎جح‎ ) ARABIC LIGATURE JEEM WITH HAH ISOLATED FORM → ARABIC LETTER JEEM, ARABIC LETTER HAH	# 
+
+FDA6 ;	062C 062D 0649 ;	MA	# ( ‎ﶦ‎ → ‎جحى‎ ) ARABIC LIGATURE JEEM WITH HAH WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER JEEM, ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# 
+FDBE ;	062C 062D 0649 ;	MA	# ( ‎ﶾ‎ → ‎جحى‎ ) ARABIC LIGATURE JEEM WITH HAH WITH YEH FINAL FORM → ARABIC LETTER JEEM, ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# →‎جحي‎→
+
+FDFB ;	062C 0644 0020 062C 0644 006C 0644 006F ;	MA	#* ( ‎ﷻ‎ → ‎جل جلlلo‎ ) ARABIC LIGATURE JALLAJALALOUHOU → ARABIC LETTER JEEM, ARABIC LETTER LAM, SPACE, ARABIC LETTER JEEM, ARABIC LETTER LAM, LATIN SMALL LETTER L, ARABIC LETTER LAM, LATIN SMALL LETTER O	# →‎جل جلاله‎→
+
+FCA8 ;	062C 0645 ;	MA	# ( ‎ﲨ‎ → ‎جم‎ ) ARABIC LIGATURE JEEM WITH MEEM INITIAL FORM → ARABIC LETTER JEEM, ARABIC LETTER MEEM	# 
+FC16 ;	062C 0645 ;	MA	# ( ‎ﰖ‎ → ‎جم‎ ) ARABIC LIGATURE JEEM WITH MEEM ISOLATED FORM → ARABIC LETTER JEEM, ARABIC LETTER MEEM	# 
+
+FD59 ;	062C 0645 062D ;	MA	# ( ‎ﵙ‎ → ‎جمح‎ ) ARABIC LIGATURE JEEM WITH MEEM WITH HAH INITIAL FORM → ARABIC LETTER JEEM, ARABIC LETTER MEEM, ARABIC LETTER HAH	# 
+FD58 ;	062C 0645 062D ;	MA	# ( ‎ﵘ‎ → ‎جمح‎ ) ARABIC LIGATURE JEEM WITH MEEM WITH HAH FINAL FORM → ARABIC LETTER JEEM, ARABIC LETTER MEEM, ARABIC LETTER HAH	# 
+
+FDA7 ;	062C 0645 0649 ;	MA	# ( ‎ﶧ‎ → ‎جمى‎ ) ARABIC LIGATURE JEEM WITH MEEM WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER JEEM, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# 
+FDA5 ;	062C 0645 0649 ;	MA	# ( ‎ﶥ‎ → ‎جمى‎ ) ARABIC LIGATURE JEEM WITH MEEM WITH YEH FINAL FORM → ARABIC LETTER JEEM, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# →‎جمي‎→
+
+FD1D ;	062C 0649 ;	MA	# ( ‎ﴝ‎ → ‎جى‎ ) ARABIC LIGATURE JEEM WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER JEEM, ARABIC LETTER ALEF MAKSURA	# 
+FD01 ;	062C 0649 ;	MA	# ( ‎ﴁ‎ → ‎جى‎ ) ARABIC LIGATURE JEEM WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER JEEM, ARABIC LETTER ALEF MAKSURA	# 
+FD1E ;	062C 0649 ;	MA	# ( ‎ﴞ‎ → ‎جى‎ ) ARABIC LIGATURE JEEM WITH YEH FINAL FORM → ARABIC LETTER JEEM, ARABIC LETTER ALEF MAKSURA	# →‎جي‎→
+FD02 ;	062C 0649 ;	MA	# ( ‎ﴂ‎ → ‎جى‎ ) ARABIC LIGATURE JEEM WITH YEH ISOLATED FORM → ARABIC LETTER JEEM, ARABIC LETTER ALEF MAKSURA	# →‎جي‎→
+
+FB78 ;	0683 ;	MA	# ( ‎ﭸ‎ → ‎ڃ‎ ) ARABIC LETTER NYEH INITIAL FORM → ARABIC LETTER NYEH	# 
+FB79 ;	0683 ;	MA	# ( ‎ﭹ‎ → ‎ڃ‎ ) ARABIC LETTER NYEH MEDIAL FORM → ARABIC LETTER NYEH	# 
+FB77 ;	0683 ;	MA	# ( ‎ﭷ‎ → ‎ڃ‎ ) ARABIC LETTER NYEH FINAL FORM → ARABIC LETTER NYEH	# 
+FB76 ;	0683 ;	MA	# ( ‎ﭶ‎ → ‎ڃ‎ ) ARABIC LETTER NYEH ISOLATED FORM → ARABIC LETTER NYEH	# 
+
+FB74 ;	0684 ;	MA	# ( ‎ﭴ‎ → ‎ڄ‎ ) ARABIC LETTER DYEH INITIAL FORM → ARABIC LETTER DYEH	# 
+FB75 ;	0684 ;	MA	# ( ‎ﭵ‎ → ‎ڄ‎ ) ARABIC LETTER DYEH MEDIAL FORM → ARABIC LETTER DYEH	# 
+FB73 ;	0684 ;	MA	# ( ‎ﭳ‎ → ‎ڄ‎ ) ARABIC LETTER DYEH FINAL FORM → ARABIC LETTER DYEH	# 
+FB72 ;	0684 ;	MA	# ( ‎ﭲ‎ → ‎ڄ‎ ) ARABIC LETTER DYEH ISOLATED FORM → ARABIC LETTER DYEH	# 
+
+FB7C ;	0686 ;	MA	# ( ‎ﭼ‎ → ‎چ‎ ) ARABIC LETTER TCHEH INITIAL FORM → ARABIC LETTER TCHEH	# 
+FB7D ;	0686 ;	MA	# ( ‎ﭽ‎ → ‎چ‎ ) ARABIC LETTER TCHEH MEDIAL FORM → ARABIC LETTER TCHEH	# 
+FB7B ;	0686 ;	MA	# ( ‎ﭻ‎ → ‎چ‎ ) ARABIC LETTER TCHEH FINAL FORM → ARABIC LETTER TCHEH	# 
+FB7A ;	0686 ;	MA	# ( ‎ﭺ‎ → ‎چ‎ ) ARABIC LETTER TCHEH ISOLATED FORM → ARABIC LETTER TCHEH	# 
+
+FB80 ;	0687 ;	MA	# ( ‎ﮀ‎ → ‎ڇ‎ ) ARABIC LETTER TCHEHEH INITIAL FORM → ARABIC LETTER TCHEHEH	# 
+FB81 ;	0687 ;	MA	# ( ‎ﮁ‎ → ‎ڇ‎ ) ARABIC LETTER TCHEHEH MEDIAL FORM → ARABIC LETTER TCHEHEH	# 
+FB7F ;	0687 ;	MA	# ( ‎ﭿ‎ → ‎ڇ‎ ) ARABIC LETTER TCHEHEH FINAL FORM → ARABIC LETTER TCHEHEH	# 
+FB7E ;	0687 ;	MA	# ( ‎ﭾ‎ → ‎ڇ‎ ) ARABIC LETTER TCHEHEH ISOLATED FORM → ARABIC LETTER TCHEHEH	# 
+
+1EE07 ;	062D ;	MA	# ( ‎𞸇‎ → ‎ح‎ ) ARABIC MATHEMATICAL HAH → ARABIC LETTER HAH	# 
+1EE27 ;	062D ;	MA	# ( ‎𞸧‎ → ‎ح‎ ) ARABIC MATHEMATICAL INITIAL HAH → ARABIC LETTER HAH	# 
+1EE47 ;	062D ;	MA	# ( ‎𞹇‎ → ‎ح‎ ) ARABIC MATHEMATICAL TAILED HAH → ARABIC LETTER HAH	# 
+1EE67 ;	062D ;	MA	# ( ‎𞹧‎ → ‎ح‎ ) ARABIC MATHEMATICAL STRETCHED HAH → ARABIC LETTER HAH	# 
+1EE87 ;	062D ;	MA	# ( ‎𞺇‎ → ‎ح‎ ) ARABIC MATHEMATICAL LOOPED HAH → ARABIC LETTER HAH	# 
+1EEA7 ;	062D ;	MA	# ( ‎𞺧‎ → ‎ح‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK HAH → ARABIC LETTER HAH	# 
+FEA3 ;	062D ;	MA	# ( ‎ﺣ‎ → ‎ح‎ ) ARABIC LETTER HAH INITIAL FORM → ARABIC LETTER HAH	# 
+FEA4 ;	062D ;	MA	# ( ‎ﺤ‎ → ‎ح‎ ) ARABIC LETTER HAH MEDIAL FORM → ARABIC LETTER HAH	# 
+FEA2 ;	062D ;	MA	# ( ‎ﺢ‎ → ‎ح‎ ) ARABIC LETTER HAH FINAL FORM → ARABIC LETTER HAH	# 
+FEA1 ;	062D ;	MA	# ( ‎ﺡ‎ → ‎ح‎ ) ARABIC LETTER HAH ISOLATED FORM → ARABIC LETTER HAH	# 
+
+0685 ;	062D 06DB ;	MA	# ( ‎څ‎ → ‎حۛ‎ ) ARABIC LETTER HAH WITH THREE DOTS ABOVE → ARABIC LETTER HAH, ARABIC SMALL HIGH THREE DOTS	# 
+
+0681 ;	062D 0654 ;	MA	# ( ‎ځ‎ → ‎حٔ‎ ) ARABIC LETTER HAH WITH HAMZA ABOVE → ARABIC LETTER HAH, ARABIC HAMZA ABOVE	# 
+0772 ;	062D 0654 ;	MA	# ( ‎ݲ‎ → ‎حٔ‎ ) ARABIC LETTER HAH WITH SMALL ARABIC LETTER TAH ABOVE → ARABIC LETTER HAH, ARABIC HAMZA ABOVE	# 
+
+FCA9 ;	062D 062C ;	MA	# ( ‎ﲩ‎ → ‎حج‎ ) ARABIC LIGATURE HAH WITH JEEM INITIAL FORM → ARABIC LETTER HAH, ARABIC LETTER JEEM	# 
+FC17 ;	062D 062C ;	MA	# ( ‎ﰗ‎ → ‎حج‎ ) ARABIC LIGATURE HAH WITH JEEM ISOLATED FORM → ARABIC LETTER HAH, ARABIC LETTER JEEM	# 
+
+FDBF ;	062D 062C 0649 ;	MA	# ( ‎ﶿ‎ → ‎حجى‎ ) ARABIC LIGATURE HAH WITH JEEM WITH YEH FINAL FORM → ARABIC LETTER HAH, ARABIC LETTER JEEM, ARABIC LETTER ALEF MAKSURA	# →‎حجي‎→
+
+FCAA ;	062D 0645 ;	MA	# ( ‎ﲪ‎ → ‎حم‎ ) ARABIC LIGATURE HAH WITH MEEM INITIAL FORM → ARABIC LETTER HAH, ARABIC LETTER MEEM	# 
+FC18 ;	062D 0645 ;	MA	# ( ‎ﰘ‎ → ‎حم‎ ) ARABIC LIGATURE HAH WITH MEEM ISOLATED FORM → ARABIC LETTER HAH, ARABIC LETTER MEEM	# 
+
+FD5B ;	062D 0645 0649 ;	MA	# ( ‎ﵛ‎ → ‎حمى‎ ) ARABIC LIGATURE HAH WITH MEEM WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER HAH, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# 
+FD5A ;	062D 0645 0649 ;	MA	# ( ‎ﵚ‎ → ‎حمى‎ ) ARABIC LIGATURE HAH WITH MEEM WITH YEH FINAL FORM → ARABIC LETTER HAH, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# →‎حمي‎→
+
+FD1B ;	062D 0649 ;	MA	# ( ‎ﴛ‎ → ‎حى‎ ) ARABIC LIGATURE HAH WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# 
+FCFF ;	062D 0649 ;	MA	# ( ‎ﳿ‎ → ‎حى‎ ) ARABIC LIGATURE HAH WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# 
+FD1C ;	062D 0649 ;	MA	# ( ‎ﴜ‎ → ‎حى‎ ) ARABIC LIGATURE HAH WITH YEH FINAL FORM → ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# →‎حي‎→
+FD00 ;	062D 0649 ;	MA	# ( ‎ﴀ‎ → ‎حى‎ ) ARABIC LIGATURE HAH WITH YEH ISOLATED FORM → ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# →‎حي‎→
+
+1EE17 ;	062E ;	MA	# ( ‎𞸗‎ → ‎خ‎ ) ARABIC MATHEMATICAL KHAH → ARABIC LETTER KHAH	# 
+1EE37 ;	062E ;	MA	# ( ‎𞸷‎ → ‎خ‎ ) ARABIC MATHEMATICAL INITIAL KHAH → ARABIC LETTER KHAH	# 
+1EE57 ;	062E ;	MA	# ( ‎𞹗‎ → ‎خ‎ ) ARABIC MATHEMATICAL TAILED KHAH → ARABIC LETTER KHAH	# 
+1EE77 ;	062E ;	MA	# ( ‎𞹷‎ → ‎خ‎ ) ARABIC MATHEMATICAL STRETCHED KHAH → ARABIC LETTER KHAH	# 
+1EE97 ;	062E ;	MA	# ( ‎𞺗‎ → ‎خ‎ ) ARABIC MATHEMATICAL LOOPED KHAH → ARABIC LETTER KHAH	# 
+1EEB7 ;	062E ;	MA	# ( ‎𞺷‎ → ‎خ‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK KHAH → ARABIC LETTER KHAH	# 
+FEA7 ;	062E ;	MA	# ( ‎ﺧ‎ → ‎خ‎ ) ARABIC LETTER KHAH INITIAL FORM → ARABIC LETTER KHAH	# 
+FEA8 ;	062E ;	MA	# ( ‎ﺨ‎ → ‎خ‎ ) ARABIC LETTER KHAH MEDIAL FORM → ARABIC LETTER KHAH	# 
+FEA6 ;	062E ;	MA	# ( ‎ﺦ‎ → ‎خ‎ ) ARABIC LETTER KHAH FINAL FORM → ARABIC LETTER KHAH	# 
+FEA5 ;	062E ;	MA	# ( ‎ﺥ‎ → ‎خ‎ ) ARABIC LETTER KHAH ISOLATED FORM → ARABIC LETTER KHAH	# 
+
+FCAB ;	062E 062C ;	MA	# ( ‎ﲫ‎ → ‎خج‎ ) ARABIC LIGATURE KHAH WITH JEEM INITIAL FORM → ARABIC LETTER KHAH, ARABIC LETTER JEEM	# 
+FC19 ;	062E 062C ;	MA	# ( ‎ﰙ‎ → ‎خج‎ ) ARABIC LIGATURE KHAH WITH JEEM ISOLATED FORM → ARABIC LETTER KHAH, ARABIC LETTER JEEM	# 
+
+FC1A ;	062E 062D ;	MA	# ( ‎ﰚ‎ → ‎خح‎ ) ARABIC LIGATURE KHAH WITH HAH ISOLATED FORM → ARABIC LETTER KHAH, ARABIC LETTER HAH	# 
+
+FCAC ;	062E 0645 ;	MA	# ( ‎ﲬ‎ → ‎خم‎ ) ARABIC LIGATURE KHAH WITH MEEM INITIAL FORM → ARABIC LETTER KHAH, ARABIC LETTER MEEM	# 
+FC1B ;	062E 0645 ;	MA	# ( ‎ﰛ‎ → ‎خم‎ ) ARABIC LIGATURE KHAH WITH MEEM ISOLATED FORM → ARABIC LETTER KHAH, ARABIC LETTER MEEM	# 
+
+FD1F ;	062E 0649 ;	MA	# ( ‎ﴟ‎ → ‎خى‎ ) ARABIC LIGATURE KHAH WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER KHAH, ARABIC LETTER ALEF MAKSURA	# 
+FD03 ;	062E 0649 ;	MA	# ( ‎ﴃ‎ → ‎خى‎ ) ARABIC LIGATURE KHAH WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER KHAH, ARABIC LETTER ALEF MAKSURA	# 
+FD20 ;	062E 0649 ;	MA	# ( ‎ﴠ‎ → ‎خى‎ ) ARABIC LIGATURE KHAH WITH YEH FINAL FORM → ARABIC LETTER KHAH, ARABIC LETTER ALEF MAKSURA	# →‎خي‎→
+FD04 ;	062E 0649 ;	MA	# ( ‎ﴄ‎ → ‎خى‎ ) ARABIC LIGATURE KHAH WITH YEH ISOLATED FORM → ARABIC LETTER KHAH, ARABIC LETTER ALEF MAKSURA	# →‎خي‎→
+
+102E1 ;	062F ;	MA	#* ( 𐋡 → ‎د‎ ) COPTIC EPACT DIGIT ONE → ARABIC LETTER DAL	# 
+1EE03 ;	062F ;	MA	# ( ‎𞸃‎ → ‎د‎ ) ARABIC MATHEMATICAL DAL → ARABIC LETTER DAL	# 
+1EE83 ;	062F ;	MA	# ( ‎𞺃‎ → ‎د‎ ) ARABIC MATHEMATICAL LOOPED DAL → ARABIC LETTER DAL	# 
+1EEA3 ;	062F ;	MA	# ( ‎𞺣‎ → ‎د‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK DAL → ARABIC LETTER DAL	# 
+FEAA ;	062F ;	MA	# ( ‎ﺪ‎ → ‎د‎ ) ARABIC LETTER DAL FINAL FORM → ARABIC LETTER DAL	# 
+FEA9 ;	062F ;	MA	# ( ‎ﺩ‎ → ‎د‎ ) ARABIC LETTER DAL ISOLATED FORM → ARABIC LETTER DAL	# 
+
+0688 ;	062F 0615 ;	MA	# ( ‎ڈ‎ → ‎دؕ‎ ) ARABIC LETTER DDAL → ARABIC LETTER DAL, ARABIC SMALL HIGH TAH	# 
+FB89 ;	062F 0615 ;	MA	# ( ‎ﮉ‎ → ‎دؕ‎ ) ARABIC LETTER DDAL FINAL FORM → ARABIC LETTER DAL, ARABIC SMALL HIGH TAH	# →‎ڈ‎→
+FB88 ;	062F 0615 ;	MA	# ( ‎ﮈ‎ → ‎دؕ‎ ) ARABIC LETTER DDAL ISOLATED FORM → ARABIC LETTER DAL, ARABIC SMALL HIGH TAH	# →‎ڈ‎→
+
+068E ;	062F 06DB ;	MA	# ( ‎ڎ‎ → ‎دۛ‎ ) ARABIC LETTER DUL → ARABIC LETTER DAL, ARABIC SMALL HIGH THREE DOTS	# 
+FB87 ;	062F 06DB ;	MA	# ( ‎ﮇ‎ → ‎دۛ‎ ) ARABIC LETTER DUL FINAL FORM → ARABIC LETTER DAL, ARABIC SMALL HIGH THREE DOTS	# →‎ڎ‎→
+FB86 ;	062F 06DB ;	MA	# ( ‎ﮆ‎ → ‎دۛ‎ ) ARABIC LETTER DUL ISOLATED FORM → ARABIC LETTER DAL, ARABIC SMALL HIGH THREE DOTS	# →‎ڎ‎→
+
+06EE ;	062F 0302 ;	MA	# ( ‎ۮ‎ → ‎د̂‎ ) ARABIC LETTER DAL WITH INVERTED V → ARABIC LETTER DAL, COMBINING CIRCUMFLEX ACCENT	# →‎دٛ‎→
+
+08AE ;	062F 0324 0323 ;	MA	# ( ‎ࢮ‎ → ‎د̤̣‎ ) ARABIC LETTER DAL WITH THREE DOTS BELOW → ARABIC LETTER DAL, COMBINING DIAERESIS BELOW, COMBINING DOT BELOW	# →‎د࣮࣭‎→
+
+1EE18 ;	0630 ;	MA	# ( ‎𞸘‎ → ‎ذ‎ ) ARABIC MATHEMATICAL THAL → ARABIC LETTER THAL	# 
+1EE98 ;	0630 ;	MA	# ( ‎𞺘‎ → ‎ذ‎ ) ARABIC MATHEMATICAL LOOPED THAL → ARABIC LETTER THAL	# 
+1EEB8 ;	0630 ;	MA	# ( ‎𞺸‎ → ‎ذ‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK THAL → ARABIC LETTER THAL	# 
+FEAC ;	0630 ;	MA	# ( ‎ﺬ‎ → ‎ذ‎ ) ARABIC LETTER THAL FINAL FORM → ARABIC LETTER THAL	# 
+FEAB ;	0630 ;	MA	# ( ‎ﺫ‎ → ‎ذ‎ ) ARABIC LETTER THAL ISOLATED FORM → ARABIC LETTER THAL	# 
+
+FC5B ;	0630 0670 ;	MA	# ( ‎ﱛ‎ → ‎ذٰ‎ ) ARABIC LIGATURE THAL WITH SUPERSCRIPT ALEF ISOLATED FORM → ARABIC LETTER THAL, ARABIC LETTER SUPERSCRIPT ALEF	# 
+
+068B ;	068A 0615 ;	MA	# ( ‎ڋ‎ → ‎ڊؕ‎ ) ARABIC LETTER DAL WITH DOT BELOW AND SMALL TAH → ARABIC LETTER DAL WITH DOT BELOW, ARABIC SMALL HIGH TAH	# 
+
+FB85 ;	068C ;	MA	# ( ‎ﮅ‎ → ‎ڌ‎ ) ARABIC LETTER DAHAL FINAL FORM → ARABIC LETTER DAHAL	# 
+FB84 ;	068C ;	MA	# ( ‎ﮄ‎ → ‎ڌ‎ ) ARABIC LETTER DAHAL ISOLATED FORM → ARABIC LETTER DAHAL	# 
+
+FB83 ;	068D ;	MA	# ( ‎ﮃ‎ → ‎ڍ‎ ) ARABIC LETTER DDAHAL FINAL FORM → ARABIC LETTER DDAHAL	# 
+FB82 ;	068D ;	MA	# ( ‎ﮂ‎ → ‎ڍ‎ ) ARABIC LETTER DDAHAL ISOLATED FORM → ARABIC LETTER DDAHAL	# 
+
+1EE13 ;	0631 ;	MA	# ( ‎𞸓‎ → ‎ر‎ ) ARABIC MATHEMATICAL REH → ARABIC LETTER REH	# 
+1EE93 ;	0631 ;	MA	# ( ‎𞺓‎ → ‎ر‎ ) ARABIC MATHEMATICAL LOOPED REH → ARABIC LETTER REH	# 
+1EEB3 ;	0631 ;	MA	# ( ‎𞺳‎ → ‎ر‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK REH → ARABIC LETTER REH	# 
+FEAE ;	0631 ;	MA	# ( ‎ﺮ‎ → ‎ر‎ ) ARABIC LETTER REH FINAL FORM → ARABIC LETTER REH	# 
+FEAD ;	0631 ;	MA	# ( ‎ﺭ‎ → ‎ر‎ ) ARABIC LETTER REH ISOLATED FORM → ARABIC LETTER REH	# 
+
+0691 ;	0631 0615 ;	MA	# ( ‎ڑ‎ → ‎رؕ‎ ) ARABIC LETTER RREH → ARABIC LETTER REH, ARABIC SMALL HIGH TAH	# 
+FB8D ;	0631 0615 ;	MA	# ( ‎ﮍ‎ → ‎رؕ‎ ) ARABIC LETTER RREH FINAL FORM → ARABIC LETTER REH, ARABIC SMALL HIGH TAH	# →‎ڑ‎→
+FB8C ;	0631 0615 ;	MA	# ( ‎ﮌ‎ → ‎رؕ‎ ) ARABIC LETTER RREH ISOLATED FORM → ARABIC LETTER REH, ARABIC SMALL HIGH TAH	# →‎ڑ‎→
+
+0698 ;	0631 06DB ;	MA	# ( ‎ژ‎ → ‎رۛ‎ ) ARABIC LETTER JEH → ARABIC LETTER REH, ARABIC SMALL HIGH THREE DOTS	# 
+FB8B ;	0631 06DB ;	MA	# ( ‎ﮋ‎ → ‎رۛ‎ ) ARABIC LETTER JEH FINAL FORM → ARABIC LETTER REH, ARABIC SMALL HIGH THREE DOTS	# →‎ژ‎→
+FB8A ;	0631 06DB ;	MA	# ( ‎ﮊ‎ → ‎رۛ‎ ) ARABIC LETTER JEH ISOLATED FORM → ARABIC LETTER REH, ARABIC SMALL HIGH THREE DOTS	# →‎ژ‎→
+
+0692 ;	0631 0306 ;	MA	# ( ‎ڒ‎ → ‎ر̆‎ ) ARABIC LETTER REH WITH SMALL V → ARABIC LETTER REH, COMBINING BREVE	# →‎رٚ‎→
+
+06EF ;	0631 0302 ;	MA	# ( ‎ۯ‎ → ‎ر̂‎ ) ARABIC LETTER REH WITH INVERTED V → ARABIC LETTER REH, COMBINING CIRCUMFLEX ACCENT	# →‎رٛ‎→
+
+076C ;	0631 0654 ;	MA	# ( ‎ݬ‎ → ‎رٔ‎ ) ARABIC LETTER REH WITH HAMZA ABOVE → ARABIC LETTER REH, ARABIC HAMZA ABOVE	# 
+
+FC5C ;	0631 0670 ;	MA	# ( ‎ﱜ‎ → ‎رٰ‎ ) ARABIC LIGATURE REH WITH SUPERSCRIPT ALEF ISOLATED FORM → ARABIC LETTER REH, ARABIC LETTER SUPERSCRIPT ALEF	# 
+
+FDF6 ;	0631 0633 0648 0644 ;	MA	# ( ‎ﷶ‎ → ‎رسول‎ ) ARABIC LIGATURE RASOUL ISOLATED FORM → ARABIC LETTER REH, ARABIC LETTER SEEN, ARABIC LETTER WAW, ARABIC LETTER LAM	# 
+
+FDFC ;	0631 0649 006C 0644 ;	MA	#* ( ‎﷼‎ → ‎رىlل‎ ) RIAL SIGN → ARABIC LETTER REH, ARABIC LETTER ALEF MAKSURA, LATIN SMALL LETTER L, ARABIC LETTER LAM	# →‎ریال‎→
+
+1EE06 ;	0632 ;	MA	# ( ‎𞸆‎ → ‎ز‎ ) ARABIC MATHEMATICAL ZAIN → ARABIC LETTER ZAIN	# 
+1EE86 ;	0632 ;	MA	# ( ‎𞺆‎ → ‎ز‎ ) ARABIC MATHEMATICAL LOOPED ZAIN → ARABIC LETTER ZAIN	# 
+1EEA6 ;	0632 ;	MA	# ( ‎𞺦‎ → ‎ز‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK ZAIN → ARABIC LETTER ZAIN	# 
+FEB0 ;	0632 ;	MA	# ( ‎ﺰ‎ → ‎ز‎ ) ARABIC LETTER ZAIN FINAL FORM → ARABIC LETTER ZAIN	# 
+FEAF ;	0632 ;	MA	# ( ‎ﺯ‎ → ‎ز‎ ) ARABIC LETTER ZAIN ISOLATED FORM → ARABIC LETTER ZAIN	# 
+
+08B2 ;	0632 0302 ;	MA	# ( ‎ࢲ‎ → ‎ز̂‎ ) ARABIC LETTER ZAIN WITH INVERTED V ABOVE → ARABIC LETTER ZAIN, COMBINING CIRCUMFLEX ACCENT	# →‎زٛ‎→
+
+0771 ;	0697 0615 ;	MA	# ( ‎ݱ‎ → ‎ڗؕ‎ ) ARABIC LETTER REH WITH SMALL ARABIC LETTER TAH AND TWO DOTS → ARABIC LETTER REH WITH TWO DOTS ABOVE, ARABIC SMALL HIGH TAH	# 
+
+1EE0E ;	0633 ;	MA	# ( ‎𞸎‎ → ‎س‎ ) ARABIC MATHEMATICAL SEEN → ARABIC LETTER SEEN	# 
+1EE2E ;	0633 ;	MA	# ( ‎𞸮‎ → ‎س‎ ) ARABIC MATHEMATICAL INITIAL SEEN → ARABIC LETTER SEEN	# 
+1EE4E ;	0633 ;	MA	# ( ‎𞹎‎ → ‎س‎ ) ARABIC MATHEMATICAL TAILED SEEN → ARABIC LETTER SEEN	# 
+1EE6E ;	0633 ;	MA	# ( ‎𞹮‎ → ‎س‎ ) ARABIC MATHEMATICAL STRETCHED SEEN → ARABIC LETTER SEEN	# 
+1EE8E ;	0633 ;	MA	# ( ‎𞺎‎ → ‎س‎ ) ARABIC MATHEMATICAL LOOPED SEEN → ARABIC LETTER SEEN	# 
+1EEAE ;	0633 ;	MA	# ( ‎𞺮‎ → ‎س‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK SEEN → ARABIC LETTER SEEN	# 
+FEB3 ;	0633 ;	MA	# ( ‎ﺳ‎ → ‎س‎ ) ARABIC LETTER SEEN INITIAL FORM → ARABIC LETTER SEEN	# 
+FEB4 ;	0633 ;	MA	# ( ‎ﺴ‎ → ‎س‎ ) ARABIC LETTER SEEN MEDIAL FORM → ARABIC LETTER SEEN	# 
+FEB2 ;	0633 ;	MA	# ( ‎ﺲ‎ → ‎س‎ ) ARABIC LETTER SEEN FINAL FORM → ARABIC LETTER SEEN	# 
+FEB1 ;	0633 ;	MA	# ( ‎ﺱ‎ → ‎س‎ ) ARABIC LETTER SEEN ISOLATED FORM → ARABIC LETTER SEEN	# 
+
+0634 ;	0633 06DB ;	MA	# ( ‎ش‎ → ‎سۛ‎ ) ARABIC LETTER SHEEN → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS	# 
+1EE14 ;	0633 06DB ;	MA	# ( ‎𞸔‎ → ‎سۛ‎ ) ARABIC MATHEMATICAL SHEEN → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS	# →‎ش‎→
+1EE34 ;	0633 06DB ;	MA	# ( ‎𞸴‎ → ‎سۛ‎ ) ARABIC MATHEMATICAL INITIAL SHEEN → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS	# →‎ش‎→
+1EE54 ;	0633 06DB ;	MA	# ( ‎𞹔‎ → ‎سۛ‎ ) ARABIC MATHEMATICAL TAILED SHEEN → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS	# →‎ش‎→
+1EE74 ;	0633 06DB ;	MA	# ( ‎𞹴‎ → ‎سۛ‎ ) ARABIC MATHEMATICAL STRETCHED SHEEN → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS	# →‎ش‎→
+1EE94 ;	0633 06DB ;	MA	# ( ‎𞺔‎ → ‎سۛ‎ ) ARABIC MATHEMATICAL LOOPED SHEEN → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS	# →‎ش‎→
+1EEB4 ;	0633 06DB ;	MA	# ( ‎𞺴‎ → ‎سۛ‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK SHEEN → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS	# →‎ش‎→
+FEB7 ;	0633 06DB ;	MA	# ( ‎ﺷ‎ → ‎سۛ‎ ) ARABIC LETTER SHEEN INITIAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS	# →‎ش‎→
+FEB8 ;	0633 06DB ;	MA	# ( ‎ﺸ‎ → ‎سۛ‎ ) ARABIC LETTER SHEEN MEDIAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS	# →‎ش‎→
+FEB6 ;	0633 06DB ;	MA	# ( ‎ﺶ‎ → ‎سۛ‎ ) ARABIC LETTER SHEEN FINAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS	# →‎ش‎→
+FEB5 ;	0633 06DB ;	MA	# ( ‎ﺵ‎ → ‎سۛ‎ ) ARABIC LETTER SHEEN ISOLATED FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS	# →‎ش‎→
+
+077E ;	0633 0302 ;	MA	# ( ‎ݾ‎ → ‎س̂‎ ) ARABIC LETTER SEEN WITH INVERTED V → ARABIC LETTER SEEN, COMBINING CIRCUMFLEX ACCENT	# →‎سٛ‎→
+
+FD31 ;	0633 006F ;	MA	# ( ‎ﴱ‎ → ‎سo‎ ) ARABIC LIGATURE SEEN WITH HEH INITIAL FORM → ARABIC LETTER SEEN, LATIN SMALL LETTER O	# →‎سه‎→
+FCE8 ;	0633 006F ;	MA	# ( ‎ﳨ‎ → ‎سo‎ ) ARABIC LIGATURE SEEN WITH HEH MEDIAL FORM → ARABIC LETTER SEEN, LATIN SMALL LETTER O	# →‎سه‎→
+
+FD32 ;	0633 06DB 006F ;	MA	# ( ‎ﴲ‎ → ‎سۛo‎ ) ARABIC LIGATURE SHEEN WITH HEH INITIAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, LATIN SMALL LETTER O	# →‎شه‎→
+FCEA ;	0633 06DB 006F ;	MA	# ( ‎ﳪ‎ → ‎سۛo‎ ) ARABIC LIGATURE SHEEN WITH HEH MEDIAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, LATIN SMALL LETTER O	# →‎شه‎→
+
+FCAD ;	0633 062C ;	MA	# ( ‎ﲭ‎ → ‎سج‎ ) ARABIC LIGATURE SEEN WITH JEEM INITIAL FORM → ARABIC LETTER SEEN, ARABIC LETTER JEEM	# 
+FD34 ;	0633 062C ;	MA	# ( ‎ﴴ‎ → ‎سج‎ ) ARABIC LIGATURE SEEN WITH JEEM MEDIAL FORM → ARABIC LETTER SEEN, ARABIC LETTER JEEM	# 
+FC1C ;	0633 062C ;	MA	# ( ‎ﰜ‎ → ‎سج‎ ) ARABIC LIGATURE SEEN WITH JEEM ISOLATED FORM → ARABIC LETTER SEEN, ARABIC LETTER JEEM	# 
+
+FD2D ;	0633 06DB 062C ;	MA	# ( ‎ﴭ‎ → ‎سۛج‎ ) ARABIC LIGATURE SHEEN WITH JEEM INITIAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER JEEM	# →‎شج‎→
+FD37 ;	0633 06DB 062C ;	MA	# ( ‎ﴷ‎ → ‎سۛج‎ ) ARABIC LIGATURE SHEEN WITH JEEM MEDIAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER JEEM	# →‎شج‎→
+FD25 ;	0633 06DB 062C ;	MA	# ( ‎ﴥ‎ → ‎سۛج‎ ) ARABIC LIGATURE SHEEN WITH JEEM FINAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER JEEM	# →‎شج‎→
+FD09 ;	0633 06DB 062C ;	MA	# ( ‎ﴉ‎ → ‎سۛج‎ ) ARABIC LIGATURE SHEEN WITH JEEM ISOLATED FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER JEEM	# →‎شج‎→
+
+FD5D ;	0633 062C 062D ;	MA	# ( ‎ﵝ‎ → ‎سجح‎ ) ARABIC LIGATURE SEEN WITH JEEM WITH HAH INITIAL FORM → ARABIC LETTER SEEN, ARABIC LETTER JEEM, ARABIC LETTER HAH	# 
+
+FD5E ;	0633 062C 0649 ;	MA	# ( ‎ﵞ‎ → ‎سجى‎ ) ARABIC LIGATURE SEEN WITH JEEM WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER SEEN, ARABIC LETTER JEEM, ARABIC LETTER ALEF MAKSURA	# 
+
+FD69 ;	0633 06DB 062C 0649 ;	MA	# ( ‎ﵩ‎ → ‎سۛجى‎ ) ARABIC LIGATURE SHEEN WITH JEEM WITH YEH FINAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER JEEM, ARABIC LETTER ALEF MAKSURA	# →‎شجي‎→
+
+FCAE ;	0633 062D ;	MA	# ( ‎ﲮ‎ → ‎سح‎ ) ARABIC LIGATURE SEEN WITH HAH INITIAL FORM → ARABIC LETTER SEEN, ARABIC LETTER HAH	# 
+FD35 ;	0633 062D ;	MA	# ( ‎ﴵ‎ → ‎سح‎ ) ARABIC LIGATURE SEEN WITH HAH MEDIAL FORM → ARABIC LETTER SEEN, ARABIC LETTER HAH	# 
+FC1D ;	0633 062D ;	MA	# ( ‎ﰝ‎ → ‎سح‎ ) ARABIC LIGATURE SEEN WITH HAH ISOLATED FORM → ARABIC LETTER SEEN, ARABIC LETTER HAH	# 
+
+FD2E ;	0633 06DB 062D ;	MA	# ( ‎ﴮ‎ → ‎سۛح‎ ) ARABIC LIGATURE SHEEN WITH HAH INITIAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER HAH	# →‎شح‎→
+FD38 ;	0633 06DB 062D ;	MA	# ( ‎ﴸ‎ → ‎سۛح‎ ) ARABIC LIGATURE SHEEN WITH HAH MEDIAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER HAH	# →‎شح‎→
+FD26 ;	0633 06DB 062D ;	MA	# ( ‎ﴦ‎ → ‎سۛح‎ ) ARABIC LIGATURE SHEEN WITH HAH FINAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER HAH	# →‎شح‎→
+FD0A ;	0633 06DB 062D ;	MA	# ( ‎ﴊ‎ → ‎سۛح‎ ) ARABIC LIGATURE SHEEN WITH HAH ISOLATED FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER HAH	# →‎شح‎→
+
+FD5C ;	0633 062D 062C ;	MA	# ( ‎ﵜ‎ → ‎سحج‎ ) ARABIC LIGATURE SEEN WITH HAH WITH JEEM INITIAL FORM → ARABIC LETTER SEEN, ARABIC LETTER HAH, ARABIC LETTER JEEM	# 
+
+FD68 ;	0633 06DB 062D 0645 ;	MA	# ( ‎ﵨ‎ → ‎سۛحم‎ ) ARABIC LIGATURE SHEEN WITH HAH WITH MEEM INITIAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER HAH, ARABIC LETTER MEEM	# →‎شحم‎→
+FD67 ;	0633 06DB 062D 0645 ;	MA	# ( ‎ﵧ‎ → ‎سۛحم‎ ) ARABIC LIGATURE SHEEN WITH HAH WITH MEEM FINAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER HAH, ARABIC LETTER MEEM	# →‎شحم‎→
+
+FDAA ;	0633 06DB 062D 0649 ;	MA	# ( ‎ﶪ‎ → ‎سۛحى‎ ) ARABIC LIGATURE SHEEN WITH HAH WITH YEH FINAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# →‎شحي‎→
+
+FCAF ;	0633 062E ;	MA	# ( ‎ﲯ‎ → ‎سخ‎ ) ARABIC LIGATURE SEEN WITH KHAH INITIAL FORM → ARABIC LETTER SEEN, ARABIC LETTER KHAH	# 
+FD36 ;	0633 062E ;	MA	# ( ‎ﴶ‎ → ‎سخ‎ ) ARABIC LIGATURE SEEN WITH KHAH MEDIAL FORM → ARABIC LETTER SEEN, ARABIC LETTER KHAH	# 
+FC1E ;	0633 062E ;	MA	# ( ‎ﰞ‎ → ‎سخ‎ ) ARABIC LIGATURE SEEN WITH KHAH ISOLATED FORM → ARABIC LETTER SEEN, ARABIC LETTER KHAH	# 
+
+FD2F ;	0633 06DB 062E ;	MA	# ( ‎ﴯ‎ → ‎سۛخ‎ ) ARABIC LIGATURE SHEEN WITH KHAH INITIAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER KHAH	# →‎شخ‎→
+FD39 ;	0633 06DB 062E ;	MA	# ( ‎ﴹ‎ → ‎سۛخ‎ ) ARABIC LIGATURE SHEEN WITH KHAH MEDIAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER KHAH	# →‎شخ‎→
+FD27 ;	0633 06DB 062E ;	MA	# ( ‎ﴧ‎ → ‎سۛخ‎ ) ARABIC LIGATURE SHEEN WITH KHAH FINAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER KHAH	# →‎شخ‎→
+FD0B ;	0633 06DB 062E ;	MA	# ( ‎ﴋ‎ → ‎سۛخ‎ ) ARABIC LIGATURE SHEEN WITH KHAH ISOLATED FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER KHAH	# →‎شخ‎→
+
+FDA8 ;	0633 062E 0649 ;	MA	# ( ‎ﶨ‎ → ‎سخى‎ ) ARABIC LIGATURE SEEN WITH KHAH WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER SEEN, ARABIC LETTER KHAH, ARABIC LETTER ALEF MAKSURA	# 
+FDC6 ;	0633 062E 0649 ;	MA	# ( ‎ﷆ‎ → ‎سخى‎ ) ARABIC LIGATURE SEEN WITH KHAH WITH YEH FINAL FORM → ARABIC LETTER SEEN, ARABIC LETTER KHAH, ARABIC LETTER ALEF MAKSURA	# →‎سخي‎→
+
+FD2A ;	0633 0631 ;	MA	# ( ‎ﴪ‎ → ‎سر‎ ) ARABIC LIGATURE SEEN WITH REH FINAL FORM → ARABIC LETTER SEEN, ARABIC LETTER REH	# 
+FD0E ;	0633 0631 ;	MA	# ( ‎ﴎ‎ → ‎سر‎ ) ARABIC LIGATURE SEEN WITH REH ISOLATED FORM → ARABIC LETTER SEEN, ARABIC LETTER REH	# 
+
+FD29 ;	0633 06DB 0631 ;	MA	# ( ‎ﴩ‎ → ‎سۛر‎ ) ARABIC LIGATURE SHEEN WITH REH FINAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER REH	# →‎شر‎→
+FD0D ;	0633 06DB 0631 ;	MA	# ( ‎ﴍ‎ → ‎سۛر‎ ) ARABIC LIGATURE SHEEN WITH REH ISOLATED FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER REH	# →‎شر‎→
+
+FCB0 ;	0633 0645 ;	MA	# ( ‎ﲰ‎ → ‎سم‎ ) ARABIC LIGATURE SEEN WITH MEEM INITIAL FORM → ARABIC LETTER SEEN, ARABIC LETTER MEEM	# 
+FCE7 ;	0633 0645 ;	MA	# ( ‎ﳧ‎ → ‎سم‎ ) ARABIC LIGATURE SEEN WITH MEEM MEDIAL FORM → ARABIC LETTER SEEN, ARABIC LETTER MEEM	# 
+FC1F ;	0633 0645 ;	MA	# ( ‎ﰟ‎ → ‎سم‎ ) ARABIC LIGATURE SEEN WITH MEEM ISOLATED FORM → ARABIC LETTER SEEN, ARABIC LETTER MEEM	# 
+
+FD30 ;	0633 06DB 0645 ;	MA	# ( ‎ﴰ‎ → ‎سۛم‎ ) ARABIC LIGATURE SHEEN WITH MEEM INITIAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER MEEM	# →‎شم‎→
+FCE9 ;	0633 06DB 0645 ;	MA	# ( ‎ﳩ‎ → ‎سۛم‎ ) ARABIC LIGATURE SHEEN WITH MEEM MEDIAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER MEEM	# →‎شم‎→
+FD28 ;	0633 06DB 0645 ;	MA	# ( ‎ﴨ‎ → ‎سۛم‎ ) ARABIC LIGATURE SHEEN WITH MEEM FINAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER MEEM	# →‎شم‎→
+FD0C ;	0633 06DB 0645 ;	MA	# ( ‎ﴌ‎ → ‎سۛم‎ ) ARABIC LIGATURE SHEEN WITH MEEM ISOLATED FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER MEEM	# →‎شم‎→
+
+FD61 ;	0633 0645 062C ;	MA	# ( ‎ﵡ‎ → ‎سمج‎ ) ARABIC LIGATURE SEEN WITH MEEM WITH JEEM INITIAL FORM → ARABIC LETTER SEEN, ARABIC LETTER MEEM, ARABIC LETTER JEEM	# 
+
+FD60 ;	0633 0645 062D ;	MA	# ( ‎ﵠ‎ → ‎سمح‎ ) ARABIC LIGATURE SEEN WITH MEEM WITH HAH INITIAL FORM → ARABIC LETTER SEEN, ARABIC LETTER MEEM, ARABIC LETTER HAH	# 
+FD5F ;	0633 0645 062D ;	MA	# ( ‎ﵟ‎ → ‎سمح‎ ) ARABIC LIGATURE SEEN WITH MEEM WITH HAH FINAL FORM → ARABIC LETTER SEEN, ARABIC LETTER MEEM, ARABIC LETTER HAH	# 
+
+FD6B ;	0633 06DB 0645 062E ;	MA	# ( ‎ﵫ‎ → ‎سۛمخ‎ ) ARABIC LIGATURE SHEEN WITH MEEM WITH KHAH INITIAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER MEEM, ARABIC LETTER KHAH	# →‎شمخ‎→
+FD6A ;	0633 06DB 0645 062E ;	MA	# ( ‎ﵪ‎ → ‎سۛمخ‎ ) ARABIC LIGATURE SHEEN WITH MEEM WITH KHAH FINAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER MEEM, ARABIC LETTER KHAH	# →‎شمخ‎→
+
+FD63 ;	0633 0645 0645 ;	MA	# ( ‎ﵣ‎ → ‎سمم‎ ) ARABIC LIGATURE SEEN WITH MEEM WITH MEEM INITIAL FORM → ARABIC LETTER SEEN, ARABIC LETTER MEEM, ARABIC LETTER MEEM	# 
+FD62 ;	0633 0645 0645 ;	MA	# ( ‎ﵢ‎ → ‎سمم‎ ) ARABIC LIGATURE SEEN WITH MEEM WITH MEEM FINAL FORM → ARABIC LETTER SEEN, ARABIC LETTER MEEM, ARABIC LETTER MEEM	# 
+
+FD6D ;	0633 06DB 0645 0645 ;	MA	# ( ‎ﵭ‎ → ‎سۛمم‎ ) ARABIC LIGATURE SHEEN WITH MEEM WITH MEEM INITIAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER MEEM, ARABIC LETTER MEEM	# →‎شمم‎→
+FD6C ;	0633 06DB 0645 0645 ;	MA	# ( ‎ﵬ‎ → ‎سۛمم‎ ) ARABIC LIGATURE SHEEN WITH MEEM WITH MEEM FINAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER MEEM, ARABIC LETTER MEEM	# →‎شمم‎→
+
+FD17 ;	0633 0649 ;	MA	# ( ‎ﴗ‎ → ‎سى‎ ) ARABIC LIGATURE SEEN WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER SEEN, ARABIC LETTER ALEF MAKSURA	# 
+FCFB ;	0633 0649 ;	MA	# ( ‎ﳻ‎ → ‎سى‎ ) ARABIC LIGATURE SEEN WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER SEEN, ARABIC LETTER ALEF MAKSURA	# 
+FD18 ;	0633 0649 ;	MA	# ( ‎ﴘ‎ → ‎سى‎ ) ARABIC LIGATURE SEEN WITH YEH FINAL FORM → ARABIC LETTER SEEN, ARABIC LETTER ALEF MAKSURA	# →‎سي‎→
+FCFC ;	0633 0649 ;	MA	# ( ‎ﳼ‎ → ‎سى‎ ) ARABIC LIGATURE SEEN WITH YEH ISOLATED FORM → ARABIC LETTER SEEN, ARABIC LETTER ALEF MAKSURA	# →‎سي‎→
+
+FD19 ;	0633 06DB 0649 ;	MA	# ( ‎ﴙ‎ → ‎سۛى‎ ) ARABIC LIGATURE SHEEN WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER ALEF MAKSURA	# →‎شى‎→
+FCFD ;	0633 06DB 0649 ;	MA	# ( ‎ﳽ‎ → ‎سۛى‎ ) ARABIC LIGATURE SHEEN WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER ALEF MAKSURA	# →‎شى‎→
+FD1A ;	0633 06DB 0649 ;	MA	# ( ‎ﴚ‎ → ‎سۛى‎ ) ARABIC LIGATURE SHEEN WITH YEH FINAL FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER ALEF MAKSURA	# →‎شي‎→
+FCFE ;	0633 06DB 0649 ;	MA	# ( ‎ﳾ‎ → ‎سۛى‎ ) ARABIC LIGATURE SHEEN WITH YEH ISOLATED FORM → ARABIC LETTER SEEN, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER ALEF MAKSURA	# →‎شي‎→
+
+102F2 ;	0635 ;	MA	#* ( 𐋲 → ‎ص‎ ) COPTIC EPACT NUMBER NINETY → ARABIC LETTER SAD	# 
+1EE11 ;	0635 ;	MA	# ( ‎𞸑‎ → ‎ص‎ ) ARABIC MATHEMATICAL SAD → ARABIC LETTER SAD	# 
+1EE31 ;	0635 ;	MA	# ( ‎𞸱‎ → ‎ص‎ ) ARABIC MATHEMATICAL INITIAL SAD → ARABIC LETTER SAD	# 
+1EE51 ;	0635 ;	MA	# ( ‎𞹑‎ → ‎ص‎ ) ARABIC MATHEMATICAL TAILED SAD → ARABIC LETTER SAD	# 
+1EE71 ;	0635 ;	MA	# ( ‎𞹱‎ → ‎ص‎ ) ARABIC MATHEMATICAL STRETCHED SAD → ARABIC LETTER SAD	# 
+1EE91 ;	0635 ;	MA	# ( ‎𞺑‎ → ‎ص‎ ) ARABIC MATHEMATICAL LOOPED SAD → ARABIC LETTER SAD	# 
+1EEB1 ;	0635 ;	MA	# ( ‎𞺱‎ → ‎ص‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK SAD → ARABIC LETTER SAD	# 
+FEBB ;	0635 ;	MA	# ( ‎ﺻ‎ → ‎ص‎ ) ARABIC LETTER SAD INITIAL FORM → ARABIC LETTER SAD	# 
+FEBC ;	0635 ;	MA	# ( ‎ﺼ‎ → ‎ص‎ ) ARABIC LETTER SAD MEDIAL FORM → ARABIC LETTER SAD	# 
+FEBA ;	0635 ;	MA	# ( ‎ﺺ‎ → ‎ص‎ ) ARABIC LETTER SAD FINAL FORM → ARABIC LETTER SAD	# 
+FEB9 ;	0635 ;	MA	# ( ‎ﺹ‎ → ‎ص‎ ) ARABIC LETTER SAD ISOLATED FORM → ARABIC LETTER SAD	# 
+
+069E ;	0635 06DB ;	MA	# ( ‎ڞ‎ → ‎صۛ‎ ) ARABIC LETTER SAD WITH THREE DOTS ABOVE → ARABIC LETTER SAD, ARABIC SMALL HIGH THREE DOTS	# 
+
+08AF ;	0635 0324 0323 ;	MA	# ( ‎ࢯ‎ → ‎ص̤̣‎ ) ARABIC LETTER SAD WITH THREE DOTS BELOW → ARABIC LETTER SAD, COMBINING DIAERESIS BELOW, COMBINING DOT BELOW	# →‎ص࣮࣭‎→
+
+FCB1 ;	0635 062D ;	MA	# ( ‎ﲱ‎ → ‎صح‎ ) ARABIC LIGATURE SAD WITH HAH INITIAL FORM → ARABIC LETTER SAD, ARABIC LETTER HAH	# 
+FC20 ;	0635 062D ;	MA	# ( ‎ﰠ‎ → ‎صح‎ ) ARABIC LIGATURE SAD WITH HAH ISOLATED FORM → ARABIC LETTER SAD, ARABIC LETTER HAH	# 
+
+FD65 ;	0635 062D 062D ;	MA	# ( ‎ﵥ‎ → ‎صحح‎ ) ARABIC LIGATURE SAD WITH HAH WITH HAH INITIAL FORM → ARABIC LETTER SAD, ARABIC LETTER HAH, ARABIC LETTER HAH	# 
+FD64 ;	0635 062D 062D ;	MA	# ( ‎ﵤ‎ → ‎صحح‎ ) ARABIC LIGATURE SAD WITH HAH WITH HAH FINAL FORM → ARABIC LETTER SAD, ARABIC LETTER HAH, ARABIC LETTER HAH	# 
+
+FDA9 ;	0635 062D 0649 ;	MA	# ( ‎ﶩ‎ → ‎صحى‎ ) ARABIC LIGATURE SAD WITH HAH WITH YEH FINAL FORM → ARABIC LETTER SAD, ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# →‎صحي‎→
+
+FCB2 ;	0635 062E ;	MA	# ( ‎ﲲ‎ → ‎صخ‎ ) ARABIC LIGATURE SAD WITH KHAH INITIAL FORM → ARABIC LETTER SAD, ARABIC LETTER KHAH	# 
+
+FD2B ;	0635 0631 ;	MA	# ( ‎ﴫ‎ → ‎صر‎ ) ARABIC LIGATURE SAD WITH REH FINAL FORM → ARABIC LETTER SAD, ARABIC LETTER REH	# 
+FD0F ;	0635 0631 ;	MA	# ( ‎ﴏ‎ → ‎صر‎ ) ARABIC LIGATURE SAD WITH REH ISOLATED FORM → ARABIC LETTER SAD, ARABIC LETTER REH	# 
+
+FDF5 ;	0635 0644 0639 0645 ;	MA	# ( ‎ﷵ‎ → ‎صلعم‎ ) ARABIC LIGATURE SALAM ISOLATED FORM → ARABIC LETTER SAD, ARABIC LETTER LAM, ARABIC LETTER AIN, ARABIC LETTER MEEM	# 
+
+FDF9 ;	0635 0644 0649 ;	MA	# ( ‎ﷹ‎ → ‎صلى‎ ) ARABIC LIGATURE SALLA ISOLATED FORM → ARABIC LETTER SAD, ARABIC LETTER LAM, ARABIC LETTER ALEF MAKSURA	# 
+FDF0 ;	0635 0644 0649 ;	MA	# ( ‎ﷰ‎ → ‎صلى‎ ) ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM → ARABIC LETTER SAD, ARABIC LETTER LAM, ARABIC LETTER ALEF MAKSURA	# →‎صلے‎→
+
+FDFA ;	0635 0644 0649 0020 006C 0644 0644 006F 0020 0639 0644 0649 006F 0020 0648 0633 0644 0645 ;	MA	#* ( ‎ﷺ‎ → ‎صلى lللo علىo وسلم‎ ) ARABIC LIGATURE SALLALLAHOU ALAYHE WASALLAM → ARABIC LETTER SAD, ARABIC LETTER LAM, ARABIC LETTER ALEF MAKSURA, SPACE, LATIN SMALL LETTER L, ARABIC LETTER LAM, ARABIC LETTER LAM, LATIN SMALL LETTER O, SPACE, ARABIC LETTER AIN, ARABIC LETTER LAM, ARABIC LETTER ALEF MAKSURA, LATIN SMALL LETTER O, SPACE, ARABIC LETTER WAW, ARABIC LETTER SEEN, ARABIC LETTER LAM, ARABIC LETTER MEEM	# →‎صلى الله عليه وسلم‎→
+
+FCB3 ;	0635 0645 ;	MA	# ( ‎ﲳ‎ → ‎صم‎ ) ARABIC LIGATURE SAD WITH MEEM INITIAL FORM → ARABIC LETTER SAD, ARABIC LETTER MEEM	# 
+FC21 ;	0635 0645 ;	MA	# ( ‎ﰡ‎ → ‎صم‎ ) ARABIC LIGATURE SAD WITH MEEM ISOLATED FORM → ARABIC LETTER SAD, ARABIC LETTER MEEM	# 
+
+FDC5 ;	0635 0645 0645 ;	MA	# ( ‎ﷅ‎ → ‎صمم‎ ) ARABIC LIGATURE SAD WITH MEEM WITH MEEM INITIAL FORM → ARABIC LETTER SAD, ARABIC LETTER MEEM, ARABIC LETTER MEEM	# 
+FD66 ;	0635 0645 0645 ;	MA	# ( ‎ﵦ‎ → ‎صمم‎ ) ARABIC LIGATURE SAD WITH MEEM WITH MEEM FINAL FORM → ARABIC LETTER SAD, ARABIC LETTER MEEM, ARABIC LETTER MEEM	# 
+
+FD21 ;	0635 0649 ;	MA	# ( ‎ﴡ‎ → ‎صى‎ ) ARABIC LIGATURE SAD WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER SAD, ARABIC LETTER ALEF MAKSURA	# 
+FD05 ;	0635 0649 ;	MA	# ( ‎ﴅ‎ → ‎صى‎ ) ARABIC LIGATURE SAD WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER SAD, ARABIC LETTER ALEF MAKSURA	# 
+FD22 ;	0635 0649 ;	MA	# ( ‎ﴢ‎ → ‎صى‎ ) ARABIC LIGATURE SAD WITH YEH FINAL FORM → ARABIC LETTER SAD, ARABIC LETTER ALEF MAKSURA	# →‎صي‎→
+FD06 ;	0635 0649 ;	MA	# ( ‎ﴆ‎ → ‎صى‎ ) ARABIC LIGATURE SAD WITH YEH ISOLATED FORM → ARABIC LETTER SAD, ARABIC LETTER ALEF MAKSURA	# →‎صي‎→
+
+1EE19 ;	0636 ;	MA	# ( ‎𞸙‎ → ‎ض‎ ) ARABIC MATHEMATICAL DAD → ARABIC LETTER DAD	# 
+1EE39 ;	0636 ;	MA	# ( ‎𞸹‎ → ‎ض‎ ) ARABIC MATHEMATICAL INITIAL DAD → ARABIC LETTER DAD	# 
+1EE59 ;	0636 ;	MA	# ( ‎𞹙‎ → ‎ض‎ ) ARABIC MATHEMATICAL TAILED DAD → ARABIC LETTER DAD	# 
+1EE79 ;	0636 ;	MA	# ( ‎𞹹‎ → ‎ض‎ ) ARABIC MATHEMATICAL STRETCHED DAD → ARABIC LETTER DAD	# 
+1EE99 ;	0636 ;	MA	# ( ‎𞺙‎ → ‎ض‎ ) ARABIC MATHEMATICAL LOOPED DAD → ARABIC LETTER DAD	# 
+1EEB9 ;	0636 ;	MA	# ( ‎𞺹‎ → ‎ض‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK DAD → ARABIC LETTER DAD	# 
+FEBF ;	0636 ;	MA	# ( ‎ﺿ‎ → ‎ض‎ ) ARABIC LETTER DAD INITIAL FORM → ARABIC LETTER DAD	# 
+FEC0 ;	0636 ;	MA	# ( ‎ﻀ‎ → ‎ض‎ ) ARABIC LETTER DAD MEDIAL FORM → ARABIC LETTER DAD	# 
+FEBE ;	0636 ;	MA	# ( ‎ﺾ‎ → ‎ض‎ ) ARABIC LETTER DAD FINAL FORM → ARABIC LETTER DAD	# 
+FEBD ;	0636 ;	MA	# ( ‎ﺽ‎ → ‎ض‎ ) ARABIC LETTER DAD ISOLATED FORM → ARABIC LETTER DAD	# 
+
+FCB4 ;	0636 062C ;	MA	# ( ‎ﲴ‎ → ‎ضج‎ ) ARABIC LIGATURE DAD WITH JEEM INITIAL FORM → ARABIC LETTER DAD, ARABIC LETTER JEEM	# 
+FC22 ;	0636 062C ;	MA	# ( ‎ﰢ‎ → ‎ضج‎ ) ARABIC LIGATURE DAD WITH JEEM ISOLATED FORM → ARABIC LETTER DAD, ARABIC LETTER JEEM	# 
+
+FCB5 ;	0636 062D ;	MA	# ( ‎ﲵ‎ → ‎ضح‎ ) ARABIC LIGATURE DAD WITH HAH INITIAL FORM → ARABIC LETTER DAD, ARABIC LETTER HAH	# 
+FC23 ;	0636 062D ;	MA	# ( ‎ﰣ‎ → ‎ضح‎ ) ARABIC LIGATURE DAD WITH HAH ISOLATED FORM → ARABIC LETTER DAD, ARABIC LETTER HAH	# 
+
+FD6E ;	0636 062D 0649 ;	MA	# ( ‎ﵮ‎ → ‎ضحى‎ ) ARABIC LIGATURE DAD WITH HAH WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER DAD, ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# 
+FDAB ;	0636 062D 0649 ;	MA	# ( ‎ﶫ‎ → ‎ضحى‎ ) ARABIC LIGATURE DAD WITH HAH WITH YEH FINAL FORM → ARABIC LETTER DAD, ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# →‎ضحي‎→
+
+FCB6 ;	0636 062E ;	MA	# ( ‎ﲶ‎ → ‎ضخ‎ ) ARABIC LIGATURE DAD WITH KHAH INITIAL FORM → ARABIC LETTER DAD, ARABIC LETTER KHAH	# 
+FC24 ;	0636 062E ;	MA	# ( ‎ﰤ‎ → ‎ضخ‎ ) ARABIC LIGATURE DAD WITH KHAH ISOLATED FORM → ARABIC LETTER DAD, ARABIC LETTER KHAH	# 
+
+FD70 ;	0636 062E 0645 ;	MA	# ( ‎ﵰ‎ → ‎ضخم‎ ) ARABIC LIGATURE DAD WITH KHAH WITH MEEM INITIAL FORM → ARABIC LETTER DAD, ARABIC LETTER KHAH, ARABIC LETTER MEEM	# 
+FD6F ;	0636 062E 0645 ;	MA	# ( ‎ﵯ‎ → ‎ضخم‎ ) ARABIC LIGATURE DAD WITH KHAH WITH MEEM FINAL FORM → ARABIC LETTER DAD, ARABIC LETTER KHAH, ARABIC LETTER MEEM	# 
+
+FD2C ;	0636 0631 ;	MA	# ( ‎ﴬ‎ → ‎ضر‎ ) ARABIC LIGATURE DAD WITH REH FINAL FORM → ARABIC LETTER DAD, ARABIC LETTER REH	# 
+FD10 ;	0636 0631 ;	MA	# ( ‎ﴐ‎ → ‎ضر‎ ) ARABIC LIGATURE DAD WITH REH ISOLATED FORM → ARABIC LETTER DAD, ARABIC LETTER REH	# 
+
+FCB7 ;	0636 0645 ;	MA	# ( ‎ﲷ‎ → ‎ضم‎ ) ARABIC LIGATURE DAD WITH MEEM INITIAL FORM → ARABIC LETTER DAD, ARABIC LETTER MEEM	# 
+FC25 ;	0636 0645 ;	MA	# ( ‎ﰥ‎ → ‎ضم‎ ) ARABIC LIGATURE DAD WITH MEEM ISOLATED FORM → ARABIC LETTER DAD, ARABIC LETTER MEEM	# 
+
+FD23 ;	0636 0649 ;	MA	# ( ‎ﴣ‎ → ‎ضى‎ ) ARABIC LIGATURE DAD WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER DAD, ARABIC LETTER ALEF MAKSURA	# 
+FD07 ;	0636 0649 ;	MA	# ( ‎ﴇ‎ → ‎ضى‎ ) ARABIC LIGATURE DAD WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER DAD, ARABIC LETTER ALEF MAKSURA	# 
+FD24 ;	0636 0649 ;	MA	# ( ‎ﴤ‎ → ‎ضى‎ ) ARABIC LIGATURE DAD WITH YEH FINAL FORM → ARABIC LETTER DAD, ARABIC LETTER ALEF MAKSURA	# →‎ضي‎→
+FD08 ;	0636 0649 ;	MA	# ( ‎ﴈ‎ → ‎ضى‎ ) ARABIC LIGATURE DAD WITH YEH ISOLATED FORM → ARABIC LETTER DAD, ARABIC LETTER ALEF MAKSURA	# →‎ضي‎→
+
+102E8 ;	0637 ;	MA	#* ( 𐋨 → ‎ط‎ ) COPTIC EPACT DIGIT EIGHT → ARABIC LETTER TAH	# 
+1EE08 ;	0637 ;	MA	# ( ‎𞸈‎ → ‎ط‎ ) ARABIC MATHEMATICAL TAH → ARABIC LETTER TAH	# 
+1EE68 ;	0637 ;	MA	# ( ‎𞹨‎ → ‎ط‎ ) ARABIC MATHEMATICAL STRETCHED TAH → ARABIC LETTER TAH	# 
+1EE88 ;	0637 ;	MA	# ( ‎𞺈‎ → ‎ط‎ ) ARABIC MATHEMATICAL LOOPED TAH → ARABIC LETTER TAH	# 
+1EEA8 ;	0637 ;	MA	# ( ‎𞺨‎ → ‎ط‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK TAH → ARABIC LETTER TAH	# 
+FEC3 ;	0637 ;	MA	# ( ‎ﻃ‎ → ‎ط‎ ) ARABIC LETTER TAH INITIAL FORM → ARABIC LETTER TAH	# 
+FEC4 ;	0637 ;	MA	# ( ‎ﻄ‎ → ‎ط‎ ) ARABIC LETTER TAH MEDIAL FORM → ARABIC LETTER TAH	# 
+FEC2 ;	0637 ;	MA	# ( ‎ﻂ‎ → ‎ط‎ ) ARABIC LETTER TAH FINAL FORM → ARABIC LETTER TAH	# 
+FEC1 ;	0637 ;	MA	# ( ‎ﻁ‎ → ‎ط‎ ) ARABIC LETTER TAH ISOLATED FORM → ARABIC LETTER TAH	# 
+
+069F ;	0637 06DB ;	MA	# ( ‎ڟ‎ → ‎طۛ‎ ) ARABIC LETTER TAH WITH THREE DOTS ABOVE → ARABIC LETTER TAH, ARABIC SMALL HIGH THREE DOTS	# 
+
+FCB8 ;	0637 062D ;	MA	# ( ‎ﲸ‎ → ‎طح‎ ) ARABIC LIGATURE TAH WITH HAH INITIAL FORM → ARABIC LETTER TAH, ARABIC LETTER HAH	# 
+FC26 ;	0637 062D ;	MA	# ( ‎ﰦ‎ → ‎طح‎ ) ARABIC LIGATURE TAH WITH HAH ISOLATED FORM → ARABIC LETTER TAH, ARABIC LETTER HAH	# 
+
+FD33 ;	0637 0645 ;	MA	# ( ‎ﴳ‎ → ‎طم‎ ) ARABIC LIGATURE TAH WITH MEEM INITIAL FORM → ARABIC LETTER TAH, ARABIC LETTER MEEM	# 
+FD3A ;	0637 0645 ;	MA	# ( ‎ﴺ‎ → ‎طم‎ ) ARABIC LIGATURE TAH WITH MEEM MEDIAL FORM → ARABIC LETTER TAH, ARABIC LETTER MEEM	# 
+FC27 ;	0637 0645 ;	MA	# ( ‎ﰧ‎ → ‎طم‎ ) ARABIC LIGATURE TAH WITH MEEM ISOLATED FORM → ARABIC LETTER TAH, ARABIC LETTER MEEM	# 
+
+FD72 ;	0637 0645 062D ;	MA	# ( ‎ﵲ‎ → ‎طمح‎ ) ARABIC LIGATURE TAH WITH MEEM WITH HAH INITIAL FORM → ARABIC LETTER TAH, ARABIC LETTER MEEM, ARABIC LETTER HAH	# 
+FD71 ;	0637 0645 062D ;	MA	# ( ‎ﵱ‎ → ‎طمح‎ ) ARABIC LIGATURE TAH WITH MEEM WITH HAH FINAL FORM → ARABIC LETTER TAH, ARABIC LETTER MEEM, ARABIC LETTER HAH	# 
+
+FD73 ;	0637 0645 0645 ;	MA	# ( ‎ﵳ‎ → ‎طمم‎ ) ARABIC LIGATURE TAH WITH MEEM WITH MEEM INITIAL FORM → ARABIC LETTER TAH, ARABIC LETTER MEEM, ARABIC LETTER MEEM	# 
+
+FD74 ;	0637 0645 0649 ;	MA	# ( ‎ﵴ‎ → ‎طمى‎ ) ARABIC LIGATURE TAH WITH MEEM WITH YEH FINAL FORM → ARABIC LETTER TAH, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# →‎طمي‎→
+
+FD11 ;	0637 0649 ;	MA	# ( ‎ﴑ‎ → ‎طى‎ ) ARABIC LIGATURE TAH WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER TAH, ARABIC LETTER ALEF MAKSURA	# 
+FCF5 ;	0637 0649 ;	MA	# ( ‎ﳵ‎ → ‎طى‎ ) ARABIC LIGATURE TAH WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER TAH, ARABIC LETTER ALEF MAKSURA	# 
+FD12 ;	0637 0649 ;	MA	# ( ‎ﴒ‎ → ‎طى‎ ) ARABIC LIGATURE TAH WITH YEH FINAL FORM → ARABIC LETTER TAH, ARABIC LETTER ALEF MAKSURA	# →‎طي‎→
+FCF6 ;	0637 0649 ;	MA	# ( ‎ﳶ‎ → ‎طى‎ ) ARABIC LIGATURE TAH WITH YEH ISOLATED FORM → ARABIC LETTER TAH, ARABIC LETTER ALEF MAKSURA	# →‎طي‎→
+
+1EE1A ;	0638 ;	MA	# ( ‎𞸚‎ → ‎ظ‎ ) ARABIC MATHEMATICAL ZAH → ARABIC LETTER ZAH	# 
+1EE7A ;	0638 ;	MA	# ( ‎𞹺‎ → ‎ظ‎ ) ARABIC MATHEMATICAL STRETCHED ZAH → ARABIC LETTER ZAH	# 
+1EE9A ;	0638 ;	MA	# ( ‎𞺚‎ → ‎ظ‎ ) ARABIC MATHEMATICAL LOOPED ZAH → ARABIC LETTER ZAH	# 
+1EEBA ;	0638 ;	MA	# ( ‎𞺺‎ → ‎ظ‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK ZAH → ARABIC LETTER ZAH	# 
+FEC7 ;	0638 ;	MA	# ( ‎ﻇ‎ → ‎ظ‎ ) ARABIC LETTER ZAH INITIAL FORM → ARABIC LETTER ZAH	# 
+FEC8 ;	0638 ;	MA	# ( ‎ﻈ‎ → ‎ظ‎ ) ARABIC LETTER ZAH MEDIAL FORM → ARABIC LETTER ZAH	# 
+FEC6 ;	0638 ;	MA	# ( ‎ﻆ‎ → ‎ظ‎ ) ARABIC LETTER ZAH FINAL FORM → ARABIC LETTER ZAH	# 
+FEC5 ;	0638 ;	MA	# ( ‎ﻅ‎ → ‎ظ‎ ) ARABIC LETTER ZAH ISOLATED FORM → ARABIC LETTER ZAH	# 
+
+FCB9 ;	0638 0645 ;	MA	# ( ‎ﲹ‎ → ‎ظم‎ ) ARABIC LIGATURE ZAH WITH MEEM INITIAL FORM → ARABIC LETTER ZAH, ARABIC LETTER MEEM	# 
+FD3B ;	0638 0645 ;	MA	# ( ‎ﴻ‎ → ‎ظم‎ ) ARABIC LIGATURE ZAH WITH MEEM MEDIAL FORM → ARABIC LETTER ZAH, ARABIC LETTER MEEM	# 
+FC28 ;	0638 0645 ;	MA	# ( ‎ﰨ‎ → ‎ظم‎ ) ARABIC LIGATURE ZAH WITH MEEM ISOLATED FORM → ARABIC LETTER ZAH, ARABIC LETTER MEEM	# 
+
+060F ;	0639 ;	MA	#* ( ؏ → ‎ع‎ ) ARABIC SIGN MISRA → ARABIC LETTER AIN	# 
+1EE0F ;	0639 ;	MA	# ( ‎𞸏‎ → ‎ع‎ ) ARABIC MATHEMATICAL AIN → ARABIC LETTER AIN	# 
+1EE2F ;	0639 ;	MA	# ( ‎𞸯‎ → ‎ع‎ ) ARABIC MATHEMATICAL INITIAL AIN → ARABIC LETTER AIN	# 
+1EE4F ;	0639 ;	MA	# ( ‎𞹏‎ → ‎ع‎ ) ARABIC MATHEMATICAL TAILED AIN → ARABIC LETTER AIN	# 
+1EE6F ;	0639 ;	MA	# ( ‎𞹯‎ → ‎ع‎ ) ARABIC MATHEMATICAL STRETCHED AIN → ARABIC LETTER AIN	# 
+1EE8F ;	0639 ;	MA	# ( ‎𞺏‎ → ‎ع‎ ) ARABIC MATHEMATICAL LOOPED AIN → ARABIC LETTER AIN	# 
+1EEAF ;	0639 ;	MA	# ( ‎𞺯‎ → ‎ع‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK AIN → ARABIC LETTER AIN	# 
+FECB ;	0639 ;	MA	# ( ‎ﻋ‎ → ‎ع‎ ) ARABIC LETTER AIN INITIAL FORM → ARABIC LETTER AIN	# 
+FECC ;	0639 ;	MA	# ( ‎ﻌ‎ → ‎ع‎ ) ARABIC LETTER AIN MEDIAL FORM → ARABIC LETTER AIN	# 
+FECA ;	0639 ;	MA	# ( ‎ﻊ‎ → ‎ع‎ ) ARABIC LETTER AIN FINAL FORM → ARABIC LETTER AIN	# 
+FEC9 ;	0639 ;	MA	# ( ‎ﻉ‎ → ‎ع‎ ) ARABIC LETTER AIN ISOLATED FORM → ARABIC LETTER AIN	# 
+
+FCBA ;	0639 062C ;	MA	# ( ‎ﲺ‎ → ‎عج‎ ) ARABIC LIGATURE AIN WITH JEEM INITIAL FORM → ARABIC LETTER AIN, ARABIC LETTER JEEM	# 
+FC29 ;	0639 062C ;	MA	# ( ‎ﰩ‎ → ‎عج‎ ) ARABIC LIGATURE AIN WITH JEEM ISOLATED FORM → ARABIC LETTER AIN, ARABIC LETTER JEEM	# 
+
+FDC4 ;	0639 062C 0645 ;	MA	# ( ‎ﷄ‎ → ‎عجم‎ ) ARABIC LIGATURE AIN WITH JEEM WITH MEEM INITIAL FORM → ARABIC LETTER AIN, ARABIC LETTER JEEM, ARABIC LETTER MEEM	# 
+FD75 ;	0639 062C 0645 ;	MA	# ( ‎ﵵ‎ → ‎عجم‎ ) ARABIC LIGATURE AIN WITH JEEM WITH MEEM FINAL FORM → ARABIC LETTER AIN, ARABIC LETTER JEEM, ARABIC LETTER MEEM	# 
+
+FDF7 ;	0639 0644 0649 006F ;	MA	# ( ‎ﷷ‎ → ‎علىo‎ ) ARABIC LIGATURE ALAYHE ISOLATED FORM → ARABIC LETTER AIN, ARABIC LETTER LAM, ARABIC LETTER ALEF MAKSURA, LATIN SMALL LETTER O	# →‎عليه‎→
+
+FCBB ;	0639 0645 ;	MA	# ( ‎ﲻ‎ → ‎عم‎ ) ARABIC LIGATURE AIN WITH MEEM INITIAL FORM → ARABIC LETTER AIN, ARABIC LETTER MEEM	# 
+FC2A ;	0639 0645 ;	MA	# ( ‎ﰪ‎ → ‎عم‎ ) ARABIC LIGATURE AIN WITH MEEM ISOLATED FORM → ARABIC LETTER AIN, ARABIC LETTER MEEM	# 
+
+FD77 ;	0639 0645 0645 ;	MA	# ( ‎ﵷ‎ → ‎عمم‎ ) ARABIC LIGATURE AIN WITH MEEM WITH MEEM INITIAL FORM → ARABIC LETTER AIN, ARABIC LETTER MEEM, ARABIC LETTER MEEM	# 
+FD76 ;	0639 0645 0645 ;	MA	# ( ‎ﵶ‎ → ‎عمم‎ ) ARABIC LIGATURE AIN WITH MEEM WITH MEEM FINAL FORM → ARABIC LETTER AIN, ARABIC LETTER MEEM, ARABIC LETTER MEEM	# 
+
+FD78 ;	0639 0645 0649 ;	MA	# ( ‎ﵸ‎ → ‎عمى‎ ) ARABIC LIGATURE AIN WITH MEEM WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER AIN, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# 
+FDB6 ;	0639 0645 0649 ;	MA	# ( ‎ﶶ‎ → ‎عمى‎ ) ARABIC LIGATURE AIN WITH MEEM WITH YEH FINAL FORM → ARABIC LETTER AIN, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# →‎عمي‎→
+
+FD13 ;	0639 0649 ;	MA	# ( ‎ﴓ‎ → ‎عى‎ ) ARABIC LIGATURE AIN WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER AIN, ARABIC LETTER ALEF MAKSURA	# 
+FCF7 ;	0639 0649 ;	MA	# ( ‎ﳷ‎ → ‎عى‎ ) ARABIC LIGATURE AIN WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER AIN, ARABIC LETTER ALEF MAKSURA	# 
+FD14 ;	0639 0649 ;	MA	# ( ‎ﴔ‎ → ‎عى‎ ) ARABIC LIGATURE AIN WITH YEH FINAL FORM → ARABIC LETTER AIN, ARABIC LETTER ALEF MAKSURA	# →‎عي‎→
+FCF8 ;	0639 0649 ;	MA	# ( ‎ﳸ‎ → ‎عى‎ ) ARABIC LIGATURE AIN WITH YEH ISOLATED FORM → ARABIC LETTER AIN, ARABIC LETTER ALEF MAKSURA	# →‎عي‎→
+
+1EE1B ;	063A ;	MA	# ( ‎𞸛‎ → ‎غ‎ ) ARABIC MATHEMATICAL GHAIN → ARABIC LETTER GHAIN	# 
+1EE3B ;	063A ;	MA	# ( ‎𞸻‎ → ‎غ‎ ) ARABIC MATHEMATICAL INITIAL GHAIN → ARABIC LETTER GHAIN	# 
+1EE5B ;	063A ;	MA	# ( ‎𞹛‎ → ‎غ‎ ) ARABIC MATHEMATICAL TAILED GHAIN → ARABIC LETTER GHAIN	# 
+1EE7B ;	063A ;	MA	# ( ‎𞹻‎ → ‎غ‎ ) ARABIC MATHEMATICAL STRETCHED GHAIN → ARABIC LETTER GHAIN	# 
+1EE9B ;	063A ;	MA	# ( ‎𞺛‎ → ‎غ‎ ) ARABIC MATHEMATICAL LOOPED GHAIN → ARABIC LETTER GHAIN	# 
+1EEBB ;	063A ;	MA	# ( ‎𞺻‎ → ‎غ‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK GHAIN → ARABIC LETTER GHAIN	# 
+FECF ;	063A ;	MA	# ( ‎ﻏ‎ → ‎غ‎ ) ARABIC LETTER GHAIN INITIAL FORM → ARABIC LETTER GHAIN	# 
+FED0 ;	063A ;	MA	# ( ‎ﻐ‎ → ‎غ‎ ) ARABIC LETTER GHAIN MEDIAL FORM → ARABIC LETTER GHAIN	# 
+FECE ;	063A ;	MA	# ( ‎ﻎ‎ → ‎غ‎ ) ARABIC LETTER GHAIN FINAL FORM → ARABIC LETTER GHAIN	# 
+FECD ;	063A ;	MA	# ( ‎ﻍ‎ → ‎غ‎ ) ARABIC LETTER GHAIN ISOLATED FORM → ARABIC LETTER GHAIN	# 
+
+FCBC ;	063A 062C ;	MA	# ( ‎ﲼ‎ → ‎غج‎ ) ARABIC LIGATURE GHAIN WITH JEEM INITIAL FORM → ARABIC LETTER GHAIN, ARABIC LETTER JEEM	# 
+FC2B ;	063A 062C ;	MA	# ( ‎ﰫ‎ → ‎غج‎ ) ARABIC LIGATURE GHAIN WITH JEEM ISOLATED FORM → ARABIC LETTER GHAIN, ARABIC LETTER JEEM	# 
+
+FCBD ;	063A 0645 ;	MA	# ( ‎ﲽ‎ → ‎غم‎ ) ARABIC LIGATURE GHAIN WITH MEEM INITIAL FORM → ARABIC LETTER GHAIN, ARABIC LETTER MEEM	# 
+FC2C ;	063A 0645 ;	MA	# ( ‎ﰬ‎ → ‎غم‎ ) ARABIC LIGATURE GHAIN WITH MEEM ISOLATED FORM → ARABIC LETTER GHAIN, ARABIC LETTER MEEM	# 
+
+FD79 ;	063A 0645 0645 ;	MA	# ( ‎ﵹ‎ → ‎غمم‎ ) ARABIC LIGATURE GHAIN WITH MEEM WITH MEEM FINAL FORM → ARABIC LETTER GHAIN, ARABIC LETTER MEEM, ARABIC LETTER MEEM	# 
+
+FD7B ;	063A 0645 0649 ;	MA	# ( ‎ﵻ‎ → ‎غمى‎ ) ARABIC LIGATURE GHAIN WITH MEEM WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER GHAIN, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# 
+FD7A ;	063A 0645 0649 ;	MA	# ( ‎ﵺ‎ → ‎غمى‎ ) ARABIC LIGATURE GHAIN WITH MEEM WITH YEH FINAL FORM → ARABIC LETTER GHAIN, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# →‎غمي‎→
+
+FD15 ;	063A 0649 ;	MA	# ( ‎ﴕ‎ → ‎غى‎ ) ARABIC LIGATURE GHAIN WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER GHAIN, ARABIC LETTER ALEF MAKSURA	# 
+FCF9 ;	063A 0649 ;	MA	# ( ‎ﳹ‎ → ‎غى‎ ) ARABIC LIGATURE GHAIN WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER GHAIN, ARABIC LETTER ALEF MAKSURA	# 
+FD16 ;	063A 0649 ;	MA	# ( ‎ﴖ‎ → ‎غى‎ ) ARABIC LIGATURE GHAIN WITH YEH FINAL FORM → ARABIC LETTER GHAIN, ARABIC LETTER ALEF MAKSURA	# →‎غي‎→
+FCFA ;	063A 0649 ;	MA	# ( ‎ﳺ‎ → ‎غى‎ ) ARABIC LIGATURE GHAIN WITH YEH ISOLATED FORM → ARABIC LETTER GHAIN, ARABIC LETTER ALEF MAKSURA	# →‎غي‎→
+
+1EE10 ;	0641 ;	MA	# ( ‎𞸐‎ → ‎ف‎ ) ARABIC MATHEMATICAL FEH → ARABIC LETTER FEH	# 
+1EE30 ;	0641 ;	MA	# ( ‎𞸰‎ → ‎ف‎ ) ARABIC MATHEMATICAL INITIAL FEH → ARABIC LETTER FEH	# 
+1EE70 ;	0641 ;	MA	# ( ‎𞹰‎ → ‎ف‎ ) ARABIC MATHEMATICAL STRETCHED FEH → ARABIC LETTER FEH	# 
+1EE90 ;	0641 ;	MA	# ( ‎𞺐‎ → ‎ف‎ ) ARABIC MATHEMATICAL LOOPED FEH → ARABIC LETTER FEH	# 
+1EEB0 ;	0641 ;	MA	# ( ‎𞺰‎ → ‎ف‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK FEH → ARABIC LETTER FEH	# 
+FED3 ;	0641 ;	MA	# ( ‎ﻓ‎ → ‎ف‎ ) ARABIC LETTER FEH INITIAL FORM → ARABIC LETTER FEH	# 
+FED4 ;	0641 ;	MA	# ( ‎ﻔ‎ → ‎ف‎ ) ARABIC LETTER FEH MEDIAL FORM → ARABIC LETTER FEH	# 
+FED2 ;	0641 ;	MA	# ( ‎ﻒ‎ → ‎ف‎ ) ARABIC LETTER FEH FINAL FORM → ARABIC LETTER FEH	# 
+FED1 ;	0641 ;	MA	# ( ‎ﻑ‎ → ‎ف‎ ) ARABIC LETTER FEH ISOLATED FORM → ARABIC LETTER FEH	# 
+06A7 ;	0641 ;	MA	# ( ‎ڧ‎ → ‎ف‎ ) ARABIC LETTER QAF WITH DOT ABOVE → ARABIC LETTER FEH	# 
+
+FCBE ;	0641 062C ;	MA	# ( ‎ﲾ‎ → ‎فج‎ ) ARABIC LIGATURE FEH WITH JEEM INITIAL FORM → ARABIC LETTER FEH, ARABIC LETTER JEEM	# 
+FC2D ;	0641 062C ;	MA	# ( ‎ﰭ‎ → ‎فج‎ ) ARABIC LIGATURE FEH WITH JEEM ISOLATED FORM → ARABIC LETTER FEH, ARABIC LETTER JEEM	# 
+
+FCBF ;	0641 062D ;	MA	# ( ‎ﲿ‎ → ‎فح‎ ) ARABIC LIGATURE FEH WITH HAH INITIAL FORM → ARABIC LETTER FEH, ARABIC LETTER HAH	# 
+FC2E ;	0641 062D ;	MA	# ( ‎ﰮ‎ → ‎فح‎ ) ARABIC LIGATURE FEH WITH HAH ISOLATED FORM → ARABIC LETTER FEH, ARABIC LETTER HAH	# 
+
+FCC0 ;	0641 062E ;	MA	# ( ‎ﳀ‎ → ‎فخ‎ ) ARABIC LIGATURE FEH WITH KHAH INITIAL FORM → ARABIC LETTER FEH, ARABIC LETTER KHAH	# 
+FC2F ;	0641 062E ;	MA	# ( ‎ﰯ‎ → ‎فخ‎ ) ARABIC LIGATURE FEH WITH KHAH ISOLATED FORM → ARABIC LETTER FEH, ARABIC LETTER KHAH	# 
+
+FD7D ;	0641 062E 0645 ;	MA	# ( ‎ﵽ‎ → ‎فخم‎ ) ARABIC LIGATURE FEH WITH KHAH WITH MEEM INITIAL FORM → ARABIC LETTER FEH, ARABIC LETTER KHAH, ARABIC LETTER MEEM	# 
+FD7C ;	0641 062E 0645 ;	MA	# ( ‎ﵼ‎ → ‎فخم‎ ) ARABIC LIGATURE FEH WITH KHAH WITH MEEM FINAL FORM → ARABIC LETTER FEH, ARABIC LETTER KHAH, ARABIC LETTER MEEM	# 
+
+FCC1 ;	0641 0645 ;	MA	# ( ‎ﳁ‎ → ‎فم‎ ) ARABIC LIGATURE FEH WITH MEEM INITIAL FORM → ARABIC LETTER FEH, ARABIC LETTER MEEM	# 
+FC30 ;	0641 0645 ;	MA	# ( ‎ﰰ‎ → ‎فم‎ ) ARABIC LIGATURE FEH WITH MEEM ISOLATED FORM → ARABIC LETTER FEH, ARABIC LETTER MEEM	# 
+
+FDC1 ;	0641 0645 0649 ;	MA	# ( ‎ﷁ‎ → ‎فمى‎ ) ARABIC LIGATURE FEH WITH MEEM WITH YEH FINAL FORM → ARABIC LETTER FEH, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# →‎فمي‎→
+
+FC7C ;	0641 0649 ;	MA	# ( ‎ﱼ‎ → ‎فى‎ ) ARABIC LIGATURE FEH WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER FEH, ARABIC LETTER ALEF MAKSURA	# 
+FC31 ;	0641 0649 ;	MA	# ( ‎ﰱ‎ → ‎فى‎ ) ARABIC LIGATURE FEH WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER FEH, ARABIC LETTER ALEF MAKSURA	# 
+FC7D ;	0641 0649 ;	MA	# ( ‎ﱽ‎ → ‎فى‎ ) ARABIC LIGATURE FEH WITH YEH FINAL FORM → ARABIC LETTER FEH, ARABIC LETTER ALEF MAKSURA	# →‎في‎→
+FC32 ;	0641 0649 ;	MA	# ( ‎ﰲ‎ → ‎فى‎ ) ARABIC LIGATURE FEH WITH YEH ISOLATED FORM → ARABIC LETTER FEH, ARABIC LETTER ALEF MAKSURA	# →‎في‎→
+
+1EE1E ;	06A1 ;	MA	# ( ‎𞸞‎ → ‎ڡ‎ ) ARABIC MATHEMATICAL DOTLESS FEH → ARABIC LETTER DOTLESS FEH	# 
+1EE7E ;	06A1 ;	MA	# ( ‎𞹾‎ → ‎ڡ‎ ) ARABIC MATHEMATICAL STRETCHED DOTLESS FEH → ARABIC LETTER DOTLESS FEH	# 
+066F ;	06A1 ;	MA	# ( ‎ٯ‎ → ‎ڡ‎ ) ARABIC LETTER DOTLESS QAF → ARABIC LETTER DOTLESS FEH	# 
+1EE1F ;	06A1 ;	MA	# ( ‎𞸟‎ → ‎ڡ‎ ) ARABIC MATHEMATICAL DOTLESS QAF → ARABIC LETTER DOTLESS FEH	# →‎ٯ‎→
+1EE5F ;	06A1 ;	MA	# ( ‎𞹟‎ → ‎ڡ‎ ) ARABIC MATHEMATICAL TAILED DOTLESS QAF → ARABIC LETTER DOTLESS FEH	# →‎ٯ‎→
+
+06A4 ;	06A1 06DB ;	MA	# ( ‎ڤ‎ → ‎ڡۛ‎ ) ARABIC LETTER VEH → ARABIC LETTER DOTLESS FEH, ARABIC SMALL HIGH THREE DOTS	# 
+FB6C ;	06A1 06DB ;	MA	# ( ‎ﭬ‎ → ‎ڡۛ‎ ) ARABIC LETTER VEH INITIAL FORM → ARABIC LETTER DOTLESS FEH, ARABIC SMALL HIGH THREE DOTS	# →‎ڤ‎→
+FB6D ;	06A1 06DB ;	MA	# ( ‎ﭭ‎ → ‎ڡۛ‎ ) ARABIC LETTER VEH MEDIAL FORM → ARABIC LETTER DOTLESS FEH, ARABIC SMALL HIGH THREE DOTS	# →‎ڤ‎→
+FB6B ;	06A1 06DB ;	MA	# ( ‎ﭫ‎ → ‎ڡۛ‎ ) ARABIC LETTER VEH FINAL FORM → ARABIC LETTER DOTLESS FEH, ARABIC SMALL HIGH THREE DOTS	# →‎ڤ‎→
+FB6A ;	06A1 06DB ;	MA	# ( ‎ﭪ‎ → ‎ڡۛ‎ ) ARABIC LETTER VEH ISOLATED FORM → ARABIC LETTER DOTLESS FEH, ARABIC SMALL HIGH THREE DOTS	# →‎ڤ‎→
+06A8 ;	06A1 06DB ;	MA	# ( ‎ڨ‎ → ‎ڡۛ‎ ) ARABIC LETTER QAF WITH THREE DOTS ABOVE → ARABIC LETTER DOTLESS FEH, ARABIC SMALL HIGH THREE DOTS	# →‎ڤ‎→
+
+08A4 ;	06A2 06DB ;	MA	# ( ‎ࢤ‎ → ‎ڢۛ‎ ) ARABIC LETTER FEH WITH DOT BELOW AND THREE DOTS ABOVE → ARABIC LETTER FEH WITH DOT MOVED BELOW, ARABIC SMALL HIGH THREE DOTS	# 
+
+FB70 ;	06A6 ;	MA	# ( ‎ﭰ‎ → ‎ڦ‎ ) ARABIC LETTER PEHEH INITIAL FORM → ARABIC LETTER PEHEH	# 
+FB71 ;	06A6 ;	MA	# ( ‎ﭱ‎ → ‎ڦ‎ ) ARABIC LETTER PEHEH MEDIAL FORM → ARABIC LETTER PEHEH	# 
+FB6F ;	06A6 ;	MA	# ( ‎ﭯ‎ → ‎ڦ‎ ) ARABIC LETTER PEHEH FINAL FORM → ARABIC LETTER PEHEH	# 
+FB6E ;	06A6 ;	MA	# ( ‎ﭮ‎ → ‎ڦ‎ ) ARABIC LETTER PEHEH ISOLATED FORM → ARABIC LETTER PEHEH	# 
+
+1EE12 ;	0642 ;	MA	# ( ‎𞸒‎ → ‎ق‎ ) ARABIC MATHEMATICAL QAF → ARABIC LETTER QAF	# 
+1EE32 ;	0642 ;	MA	# ( ‎𞸲‎ → ‎ق‎ ) ARABIC MATHEMATICAL INITIAL QAF → ARABIC LETTER QAF	# 
+1EE52 ;	0642 ;	MA	# ( ‎𞹒‎ → ‎ق‎ ) ARABIC MATHEMATICAL TAILED QAF → ARABIC LETTER QAF	# 
+1EE72 ;	0642 ;	MA	# ( ‎𞹲‎ → ‎ق‎ ) ARABIC MATHEMATICAL STRETCHED QAF → ARABIC LETTER QAF	# 
+1EE92 ;	0642 ;	MA	# ( ‎𞺒‎ → ‎ق‎ ) ARABIC MATHEMATICAL LOOPED QAF → ARABIC LETTER QAF	# 
+1EEB2 ;	0642 ;	MA	# ( ‎𞺲‎ → ‎ق‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK QAF → ARABIC LETTER QAF	# 
+FED7 ;	0642 ;	MA	# ( ‎ﻗ‎ → ‎ق‎ ) ARABIC LETTER QAF INITIAL FORM → ARABIC LETTER QAF	# 
+FED8 ;	0642 ;	MA	# ( ‎ﻘ‎ → ‎ق‎ ) ARABIC LETTER QAF MEDIAL FORM → ARABIC LETTER QAF	# 
+FED6 ;	0642 ;	MA	# ( ‎ﻖ‎ → ‎ق‎ ) ARABIC LETTER QAF FINAL FORM → ARABIC LETTER QAF	# 
+FED5 ;	0642 ;	MA	# ( ‎ﻕ‎ → ‎ق‎ ) ARABIC LETTER QAF ISOLATED FORM → ARABIC LETTER QAF	# 
+
+FCC2 ;	0642 062D ;	MA	# ( ‎ﳂ‎ → ‎قح‎ ) ARABIC LIGATURE QAF WITH HAH INITIAL FORM → ARABIC LETTER QAF, ARABIC LETTER HAH	# 
+FC33 ;	0642 062D ;	MA	# ( ‎ﰳ‎ → ‎قح‎ ) ARABIC LIGATURE QAF WITH HAH ISOLATED FORM → ARABIC LETTER QAF, ARABIC LETTER HAH	# 
+
+FDF1 ;	0642 0644 0649 ;	MA	# ( ‎ﷱ‎ → ‎قلى‎ ) ARABIC LIGATURE QALA USED AS KORANIC STOP SIGN ISOLATED FORM → ARABIC LETTER QAF, ARABIC LETTER LAM, ARABIC LETTER ALEF MAKSURA	# →‎قلے‎→
+
+FCC3 ;	0642 0645 ;	MA	# ( ‎ﳃ‎ → ‎قم‎ ) ARABIC LIGATURE QAF WITH MEEM INITIAL FORM → ARABIC LETTER QAF, ARABIC LETTER MEEM	# 
+FC34 ;	0642 0645 ;	MA	# ( ‎ﰴ‎ → ‎قم‎ ) ARABIC LIGATURE QAF WITH MEEM ISOLATED FORM → ARABIC LETTER QAF, ARABIC LETTER MEEM	# 
+
+FDB4 ;	0642 0645 062D ;	MA	# ( ‎ﶴ‎ → ‎قمح‎ ) ARABIC LIGATURE QAF WITH MEEM WITH HAH INITIAL FORM → ARABIC LETTER QAF, ARABIC LETTER MEEM, ARABIC LETTER HAH	# 
+FD7E ;	0642 0645 062D ;	MA	# ( ‎ﵾ‎ → ‎قمح‎ ) ARABIC LIGATURE QAF WITH MEEM WITH HAH FINAL FORM → ARABIC LETTER QAF, ARABIC LETTER MEEM, ARABIC LETTER HAH	# 
+
+FD7F ;	0642 0645 0645 ;	MA	# ( ‎ﵿ‎ → ‎قمم‎ ) ARABIC LIGATURE QAF WITH MEEM WITH MEEM FINAL FORM → ARABIC LETTER QAF, ARABIC LETTER MEEM, ARABIC LETTER MEEM	# 
+
+FDB2 ;	0642 0645 0649 ;	MA	# ( ‎ﶲ‎ → ‎قمى‎ ) ARABIC LIGATURE QAF WITH MEEM WITH YEH FINAL FORM → ARABIC LETTER QAF, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# →‎قمي‎→
+
+FC7E ;	0642 0649 ;	MA	# ( ‎ﱾ‎ → ‎قى‎ ) ARABIC LIGATURE QAF WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER QAF, ARABIC LETTER ALEF MAKSURA	# 
+FC35 ;	0642 0649 ;	MA	# ( ‎ﰵ‎ → ‎قى‎ ) ARABIC LIGATURE QAF WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER QAF, ARABIC LETTER ALEF MAKSURA	# 
+FC7F ;	0642 0649 ;	MA	# ( ‎ﱿ‎ → ‎قى‎ ) ARABIC LIGATURE QAF WITH YEH FINAL FORM → ARABIC LETTER QAF, ARABIC LETTER ALEF MAKSURA	# →‎قي‎→
+FC36 ;	0642 0649 ;	MA	# ( ‎ﰶ‎ → ‎قى‎ ) ARABIC LIGATURE QAF WITH YEH ISOLATED FORM → ARABIC LETTER QAF, ARABIC LETTER ALEF MAKSURA	# →‎قي‎→
+
+1EE0A ;	0643 ;	MA	# ( ‎𞸊‎ → ‎ك‎ ) ARABIC MATHEMATICAL KAF → ARABIC LETTER KAF	# 
+1EE2A ;	0643 ;	MA	# ( ‎𞸪‎ → ‎ك‎ ) ARABIC MATHEMATICAL INITIAL KAF → ARABIC LETTER KAF	# 
+1EE6A ;	0643 ;	MA	# ( ‎𞹪‎ → ‎ك‎ ) ARABIC MATHEMATICAL STRETCHED KAF → ARABIC LETTER KAF	# 
+FEDB ;	0643 ;	MA	# ( ‎ﻛ‎ → ‎ك‎ ) ARABIC LETTER KAF INITIAL FORM → ARABIC LETTER KAF	# 
+FEDC ;	0643 ;	MA	# ( ‎ﻜ‎ → ‎ك‎ ) ARABIC LETTER KAF MEDIAL FORM → ARABIC LETTER KAF	# 
+FEDA ;	0643 ;	MA	# ( ‎ﻚ‎ → ‎ك‎ ) ARABIC LETTER KAF FINAL FORM → ARABIC LETTER KAF	# 
+FED9 ;	0643 ;	MA	# ( ‎ﻙ‎ → ‎ك‎ ) ARABIC LETTER KAF ISOLATED FORM → ARABIC LETTER KAF	# 
+06A9 ;	0643 ;	MA	# ( ‎ک‎ → ‎ك‎ ) ARABIC LETTER KEHEH → ARABIC LETTER KAF	# 
+FB90 ;	0643 ;	MA	# ( ‎ﮐ‎ → ‎ك‎ ) ARABIC LETTER KEHEH INITIAL FORM → ARABIC LETTER KAF	# →‎ک‎→
+FB91 ;	0643 ;	MA	# ( ‎ﮑ‎ → ‎ك‎ ) ARABIC LETTER KEHEH MEDIAL FORM → ARABIC LETTER KAF	# →‎ک‎→
+FB8F ;	0643 ;	MA	# ( ‎ﮏ‎ → ‎ك‎ ) ARABIC LETTER KEHEH FINAL FORM → ARABIC LETTER KAF	# →‎ک‎→
+FB8E ;	0643 ;	MA	# ( ‎ﮎ‎ → ‎ك‎ ) ARABIC LETTER KEHEH ISOLATED FORM → ARABIC LETTER KAF	# →‎ک‎→
+06AA ;	0643 ;	MA	# ( ‎ڪ‎ → ‎ك‎ ) ARABIC LETTER SWASH KAF → ARABIC LETTER KAF	# 
+
+06AD ;	0643 06DB ;	MA	# ( ‎ڭ‎ → ‎كۛ‎ ) ARABIC LETTER NG → ARABIC LETTER KAF, ARABIC SMALL HIGH THREE DOTS	# 
+FBD5 ;	0643 06DB ;	MA	# ( ‎ﯕ‎ → ‎كۛ‎ ) ARABIC LETTER NG INITIAL FORM → ARABIC LETTER KAF, ARABIC SMALL HIGH THREE DOTS	# →‎ڭ‎→
+FBD6 ;	0643 06DB ;	MA	# ( ‎ﯖ‎ → ‎كۛ‎ ) ARABIC LETTER NG MEDIAL FORM → ARABIC LETTER KAF, ARABIC SMALL HIGH THREE DOTS	# →‎ڭ‎→
+FBD4 ;	0643 06DB ;	MA	# ( ‎ﯔ‎ → ‎كۛ‎ ) ARABIC LETTER NG FINAL FORM → ARABIC LETTER KAF, ARABIC SMALL HIGH THREE DOTS	# →‎ڭ‎→
+FBD3 ;	0643 06DB ;	MA	# ( ‎ﯓ‎ → ‎كۛ‎ ) ARABIC LETTER NG ISOLATED FORM → ARABIC LETTER KAF, ARABIC SMALL HIGH THREE DOTS	# →‎ڭ‎→
+0763 ;	0643 06DB ;	MA	# ( ‎ݣ‎ → ‎كۛ‎ ) ARABIC LETTER KEHEH WITH THREE DOTS ABOVE → ARABIC LETTER KAF, ARABIC SMALL HIGH THREE DOTS	# →‎ڭ‎→
+
+FC80 ;	0643 006C ;	MA	# ( ‎ﲀ‎ → ‎كl‎ ) ARABIC LIGATURE KAF WITH ALEF FINAL FORM → ARABIC LETTER KAF, LATIN SMALL LETTER L	# →‎كا‎→
+FC37 ;	0643 006C ;	MA	# ( ‎ﰷ‎ → ‎كl‎ ) ARABIC LIGATURE KAF WITH ALEF ISOLATED FORM → ARABIC LETTER KAF, LATIN SMALL LETTER L	# →‎كا‎→
+
+FCC4 ;	0643 062C ;	MA	# ( ‎ﳄ‎ → ‎كج‎ ) ARABIC LIGATURE KAF WITH JEEM INITIAL FORM → ARABIC LETTER KAF, ARABIC LETTER JEEM	# 
+FC38 ;	0643 062C ;	MA	# ( ‎ﰸ‎ → ‎كج‎ ) ARABIC LIGATURE KAF WITH JEEM ISOLATED FORM → ARABIC LETTER KAF, ARABIC LETTER JEEM	# 
+
+FCC5 ;	0643 062D ;	MA	# ( ‎ﳅ‎ → ‎كح‎ ) ARABIC LIGATURE KAF WITH HAH INITIAL FORM → ARABIC LETTER KAF, ARABIC LETTER HAH	# 
+FC39 ;	0643 062D ;	MA	# ( ‎ﰹ‎ → ‎كح‎ ) ARABIC LIGATURE KAF WITH HAH ISOLATED FORM → ARABIC LETTER KAF, ARABIC LETTER HAH	# 
+
+FCC6 ;	0643 062E ;	MA	# ( ‎ﳆ‎ → ‎كخ‎ ) ARABIC LIGATURE KAF WITH KHAH INITIAL FORM → ARABIC LETTER KAF, ARABIC LETTER KHAH	# 
+FC3A ;	0643 062E ;	MA	# ( ‎ﰺ‎ → ‎كخ‎ ) ARABIC LIGATURE KAF WITH KHAH ISOLATED FORM → ARABIC LETTER KAF, ARABIC LETTER KHAH	# 
+
+FCC7 ;	0643 0644 ;	MA	# ( ‎ﳇ‎ → ‎كل‎ ) ARABIC LIGATURE KAF WITH LAM INITIAL FORM → ARABIC LETTER KAF, ARABIC LETTER LAM	# 
+FCEB ;	0643 0644 ;	MA	# ( ‎ﳫ‎ → ‎كل‎ ) ARABIC LIGATURE KAF WITH LAM MEDIAL FORM → ARABIC LETTER KAF, ARABIC LETTER LAM	# 
+FC81 ;	0643 0644 ;	MA	# ( ‎ﲁ‎ → ‎كل‎ ) ARABIC LIGATURE KAF WITH LAM FINAL FORM → ARABIC LETTER KAF, ARABIC LETTER LAM	# 
+FC3B ;	0643 0644 ;	MA	# ( ‎ﰻ‎ → ‎كل‎ ) ARABIC LIGATURE KAF WITH LAM ISOLATED FORM → ARABIC LETTER KAF, ARABIC LETTER LAM	# 
+
+FCC8 ;	0643 0645 ;	MA	# ( ‎ﳈ‎ → ‎كم‎ ) ARABIC LIGATURE KAF WITH MEEM INITIAL FORM → ARABIC LETTER KAF, ARABIC LETTER MEEM	# 
+FCEC ;	0643 0645 ;	MA	# ( ‎ﳬ‎ → ‎كم‎ ) ARABIC LIGATURE KAF WITH MEEM MEDIAL FORM → ARABIC LETTER KAF, ARABIC LETTER MEEM	# 
+FC82 ;	0643 0645 ;	MA	# ( ‎ﲂ‎ → ‎كم‎ ) ARABIC LIGATURE KAF WITH MEEM FINAL FORM → ARABIC LETTER KAF, ARABIC LETTER MEEM	# 
+FC3C ;	0643 0645 ;	MA	# ( ‎ﰼ‎ → ‎كم‎ ) ARABIC LIGATURE KAF WITH MEEM ISOLATED FORM → ARABIC LETTER KAF, ARABIC LETTER MEEM	# 
+
+FDC3 ;	0643 0645 0645 ;	MA	# ( ‎ﷃ‎ → ‎كمم‎ ) ARABIC LIGATURE KAF WITH MEEM WITH MEEM INITIAL FORM → ARABIC LETTER KAF, ARABIC LETTER MEEM, ARABIC LETTER MEEM	# 
+FDBB ;	0643 0645 0645 ;	MA	# ( ‎ﶻ‎ → ‎كمم‎ ) ARABIC LIGATURE KAF WITH MEEM WITH MEEM FINAL FORM → ARABIC LETTER KAF, ARABIC LETTER MEEM, ARABIC LETTER MEEM	# 
+
+FDB7 ;	0643 0645 0649 ;	MA	# ( ‎ﶷ‎ → ‎كمى‎ ) ARABIC LIGATURE KAF WITH MEEM WITH YEH FINAL FORM → ARABIC LETTER KAF, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# →‎كمي‎→
+
+FC83 ;	0643 0649 ;	MA	# ( ‎ﲃ‎ → ‎كى‎ ) ARABIC LIGATURE KAF WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER KAF, ARABIC LETTER ALEF MAKSURA	# 
+FC3D ;	0643 0649 ;	MA	# ( ‎ﰽ‎ → ‎كى‎ ) ARABIC LIGATURE KAF WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER KAF, ARABIC LETTER ALEF MAKSURA	# 
+FC84 ;	0643 0649 ;	MA	# ( ‎ﲄ‎ → ‎كى‎ ) ARABIC LIGATURE KAF WITH YEH FINAL FORM → ARABIC LETTER KAF, ARABIC LETTER ALEF MAKSURA	# →‎كي‎→
+FC3E ;	0643 0649 ;	MA	# ( ‎ﰾ‎ → ‎كى‎ ) ARABIC LIGATURE KAF WITH YEH ISOLATED FORM → ARABIC LETTER KAF, ARABIC LETTER ALEF MAKSURA	# →‎كي‎→
+
+0762 ;	06AC ;	MA	# ( ‎ݢ‎ → ‎ڬ‎ ) ARABIC LETTER KEHEH WITH DOT ABOVE → ARABIC LETTER KAF WITH DOT ABOVE	# 
+
+FB94 ;	06AF ;	MA	# ( ‎ﮔ‎ → ‎گ‎ ) ARABIC LETTER GAF INITIAL FORM → ARABIC LETTER GAF	# 
+FB95 ;	06AF ;	MA	# ( ‎ﮕ‎ → ‎گ‎ ) ARABIC LETTER GAF MEDIAL FORM → ARABIC LETTER GAF	# 
+FB93 ;	06AF ;	MA	# ( ‎ﮓ‎ → ‎گ‎ ) ARABIC LETTER GAF FINAL FORM → ARABIC LETTER GAF	# 
+FB92 ;	06AF ;	MA	# ( ‎ﮒ‎ → ‎گ‎ ) ARABIC LETTER GAF ISOLATED FORM → ARABIC LETTER GAF	# 
+08B0 ;	06AF ;	MA	# ( ‎ࢰ‎ → ‎گ‎ ) ARABIC LETTER GAF WITH INVERTED STROKE → ARABIC LETTER GAF	# 
+
+06B4 ;	06AF 06DB ;	MA	# ( ‎ڴ‎ → ‎گۛ‎ ) ARABIC LETTER GAF WITH THREE DOTS ABOVE → ARABIC LETTER GAF, ARABIC SMALL HIGH THREE DOTS	# 
+
+FB9C ;	06B1 ;	MA	# ( ‎ﮜ‎ → ‎ڱ‎ ) ARABIC LETTER NGOEH INITIAL FORM → ARABIC LETTER NGOEH	# 
+FB9D ;	06B1 ;	MA	# ( ‎ﮝ‎ → ‎ڱ‎ ) ARABIC LETTER NGOEH MEDIAL FORM → ARABIC LETTER NGOEH	# 
+FB9B ;	06B1 ;	MA	# ( ‎ﮛ‎ → ‎ڱ‎ ) ARABIC LETTER NGOEH FINAL FORM → ARABIC LETTER NGOEH	# 
+FB9A ;	06B1 ;	MA	# ( ‎ﮚ‎ → ‎ڱ‎ ) ARABIC LETTER NGOEH ISOLATED FORM → ARABIC LETTER NGOEH	# 
+
+FB98 ;	06B3 ;	MA	# ( ‎ﮘ‎ → ‎ڳ‎ ) ARABIC LETTER GUEH INITIAL FORM → ARABIC LETTER GUEH	# 
+FB99 ;	06B3 ;	MA	# ( ‎ﮙ‎ → ‎ڳ‎ ) ARABIC LETTER GUEH MEDIAL FORM → ARABIC LETTER GUEH	# 
+FB97 ;	06B3 ;	MA	# ( ‎ﮗ‎ → ‎ڳ‎ ) ARABIC LETTER GUEH FINAL FORM → ARABIC LETTER GUEH	# 
+FB96 ;	06B3 ;	MA	# ( ‎ﮖ‎ → ‎ڳ‎ ) ARABIC LETTER GUEH ISOLATED FORM → ARABIC LETTER GUEH	# 
+
+1EE0B ;	0644 ;	MA	# ( ‎𞸋‎ → ‎ل‎ ) ARABIC MATHEMATICAL LAM → ARABIC LETTER LAM	# 
+1EE2B ;	0644 ;	MA	# ( ‎𞸫‎ → ‎ل‎ ) ARABIC MATHEMATICAL INITIAL LAM → ARABIC LETTER LAM	# 
+1EE4B ;	0644 ;	MA	# ( ‎𞹋‎ → ‎ل‎ ) ARABIC MATHEMATICAL TAILED LAM → ARABIC LETTER LAM	# 
+1EE8B ;	0644 ;	MA	# ( ‎𞺋‎ → ‎ل‎ ) ARABIC MATHEMATICAL LOOPED LAM → ARABIC LETTER LAM	# 
+1EEAB ;	0644 ;	MA	# ( ‎𞺫‎ → ‎ل‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK LAM → ARABIC LETTER LAM	# 
+FEDF ;	0644 ;	MA	# ( ‎ﻟ‎ → ‎ل‎ ) ARABIC LETTER LAM INITIAL FORM → ARABIC LETTER LAM	# 
+FEE0 ;	0644 ;	MA	# ( ‎ﻠ‎ → ‎ل‎ ) ARABIC LETTER LAM MEDIAL FORM → ARABIC LETTER LAM	# 
+FEDE ;	0644 ;	MA	# ( ‎ﻞ‎ → ‎ل‎ ) ARABIC LETTER LAM FINAL FORM → ARABIC LETTER LAM	# 
+FEDD ;	0644 ;	MA	# ( ‎ﻝ‎ → ‎ل‎ ) ARABIC LETTER LAM ISOLATED FORM → ARABIC LETTER LAM	# 
+
+06B7 ;	0644 06DB ;	MA	# ( ‎ڷ‎ → ‎لۛ‎ ) ARABIC LETTER LAM WITH THREE DOTS ABOVE → ARABIC LETTER LAM, ARABIC SMALL HIGH THREE DOTS	# 
+
+06B5 ;	0644 0306 ;	MA	# ( ‎ڵ‎ → ‎ل̆‎ ) ARABIC LETTER LAM WITH SMALL V → ARABIC LETTER LAM, COMBINING BREVE	# →‎لٚ‎→
+
+FEFC ;	0644 006C ;	MA	# ( ‎ﻼ‎ → ‎لl‎ ) ARABIC LIGATURE LAM WITH ALEF FINAL FORM → ARABIC LETTER LAM, LATIN SMALL LETTER L	# →‎لا‎→
+FEFB ;	0644 006C ;	MA	# ( ‎ﻻ‎ → ‎لl‎ ) ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM → ARABIC LETTER LAM, LATIN SMALL LETTER L	# →‎لا‎→
+
+FEFA ;	0644 006C 0655 ;	MA	# ( ‎ﻺ‎ → ‎لlٕ‎ ) ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM → ARABIC LETTER LAM, LATIN SMALL LETTER L, ARABIC HAMZA BELOW	# →‎لإ‎→
+FEF9 ;	0644 006C 0655 ;	MA	# ( ‎ﻹ‎ → ‎لlٕ‎ ) ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM → ARABIC LETTER LAM, LATIN SMALL LETTER L, ARABIC HAMZA BELOW	# →‎لإ‎→
+
+FEF8 ;	0644 006C 0674 ;	MA	# ( ‎ﻸ‎ → ‎لlٴ‎ ) ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM → ARABIC LETTER LAM, LATIN SMALL LETTER L, ARABIC LETTER HIGH HAMZA	# →‎لأ‎→
+FEF7 ;	0644 006C 0674 ;	MA	# ( ‎ﻷ‎ → ‎لlٴ‎ ) ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM → ARABIC LETTER LAM, LATIN SMALL LETTER L, ARABIC LETTER HIGH HAMZA	# →‎لأ‎→
+
+FCCD ;	0644 006F ;	MA	# ( ‎ﳍ‎ → ‎لo‎ ) ARABIC LIGATURE LAM WITH HEH INITIAL FORM → ARABIC LETTER LAM, LATIN SMALL LETTER O	# →‎له‎→
+
+FEF6 ;	0644 0622 ;	MA	# ( ‎ﻶ‎ → ‎لآ‎ ) ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM → ARABIC LETTER LAM, ARABIC LETTER ALEF WITH MADDA ABOVE	# 
+FEF5 ;	0644 0622 ;	MA	# ( ‎ﻵ‎ → ‎لآ‎ ) ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM → ARABIC LETTER LAM, ARABIC LETTER ALEF WITH MADDA ABOVE	# 
+
+FCC9 ;	0644 062C ;	MA	# ( ‎ﳉ‎ → ‎لج‎ ) ARABIC LIGATURE LAM WITH JEEM INITIAL FORM → ARABIC LETTER LAM, ARABIC LETTER JEEM	# 
+FC3F ;	0644 062C ;	MA	# ( ‎ﰿ‎ → ‎لج‎ ) ARABIC LIGATURE LAM WITH JEEM ISOLATED FORM → ARABIC LETTER LAM, ARABIC LETTER JEEM	# 
+
+FD83 ;	0644 062C 062C ;	MA	# ( ‎ﶃ‎ → ‎لجج‎ ) ARABIC LIGATURE LAM WITH JEEM WITH JEEM INITIAL FORM → ARABIC LETTER LAM, ARABIC LETTER JEEM, ARABIC LETTER JEEM	# 
+FD84 ;	0644 062C 062C ;	MA	# ( ‎ﶄ‎ → ‎لجج‎ ) ARABIC LIGATURE LAM WITH JEEM WITH JEEM FINAL FORM → ARABIC LETTER LAM, ARABIC LETTER JEEM, ARABIC LETTER JEEM	# 
+
+FDBA ;	0644 062C 0645 ;	MA	# ( ‎ﶺ‎ → ‎لجم‎ ) ARABIC LIGATURE LAM WITH JEEM WITH MEEM INITIAL FORM → ARABIC LETTER LAM, ARABIC LETTER JEEM, ARABIC LETTER MEEM	# 
+FDBC ;	0644 062C 0645 ;	MA	# ( ‎ﶼ‎ → ‎لجم‎ ) ARABIC LIGATURE LAM WITH JEEM WITH MEEM FINAL FORM → ARABIC LETTER LAM, ARABIC LETTER JEEM, ARABIC LETTER MEEM	# 
+
+FDAC ;	0644 062C 0649 ;	MA	# ( ‎ﶬ‎ → ‎لجى‎ ) ARABIC LIGATURE LAM WITH JEEM WITH YEH FINAL FORM → ARABIC LETTER LAM, ARABIC LETTER JEEM, ARABIC LETTER ALEF MAKSURA	# →‎لجي‎→
+
+FCCA ;	0644 062D ;	MA	# ( ‎ﳊ‎ → ‎لح‎ ) ARABIC LIGATURE LAM WITH HAH INITIAL FORM → ARABIC LETTER LAM, ARABIC LETTER HAH	# 
+FC40 ;	0644 062D ;	MA	# ( ‎ﱀ‎ → ‎لح‎ ) ARABIC LIGATURE LAM WITH HAH ISOLATED FORM → ARABIC LETTER LAM, ARABIC LETTER HAH	# 
+
+FDB5 ;	0644 062D 0645 ;	MA	# ( ‎ﶵ‎ → ‎لحم‎ ) ARABIC LIGATURE LAM WITH HAH WITH MEEM INITIAL FORM → ARABIC LETTER LAM, ARABIC LETTER HAH, ARABIC LETTER MEEM	# 
+FD80 ;	0644 062D 0645 ;	MA	# ( ‎ﶀ‎ → ‎لحم‎ ) ARABIC LIGATURE LAM WITH HAH WITH MEEM FINAL FORM → ARABIC LETTER LAM, ARABIC LETTER HAH, ARABIC LETTER MEEM	# 
+
+FD82 ;	0644 062D 0649 ;	MA	# ( ‎ﶂ‎ → ‎لحى‎ ) ARABIC LIGATURE LAM WITH HAH WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER LAM, ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# 
+FD81 ;	0644 062D 0649 ;	MA	# ( ‎ﶁ‎ → ‎لحى‎ ) ARABIC LIGATURE LAM WITH HAH WITH YEH FINAL FORM → ARABIC LETTER LAM, ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# →‎لحي‎→
+
+FCCB ;	0644 062E ;	MA	# ( ‎ﳋ‎ → ‎لخ‎ ) ARABIC LIGATURE LAM WITH KHAH INITIAL FORM → ARABIC LETTER LAM, ARABIC LETTER KHAH	# 
+FC41 ;	0644 062E ;	MA	# ( ‎ﱁ‎ → ‎لخ‎ ) ARABIC LIGATURE LAM WITH KHAH ISOLATED FORM → ARABIC LETTER LAM, ARABIC LETTER KHAH	# 
+
+FD86 ;	0644 062E 0645 ;	MA	# ( ‎ﶆ‎ → ‎لخم‎ ) ARABIC LIGATURE LAM WITH KHAH WITH MEEM INITIAL FORM → ARABIC LETTER LAM, ARABIC LETTER KHAH, ARABIC LETTER MEEM	# 
+FD85 ;	0644 062E 0645 ;	MA	# ( ‎ﶅ‎ → ‎لخم‎ ) ARABIC LIGATURE LAM WITH KHAH WITH MEEM FINAL FORM → ARABIC LETTER LAM, ARABIC LETTER KHAH, ARABIC LETTER MEEM	# 
+
+FCCC ;	0644 0645 ;	MA	# ( ‎ﳌ‎ → ‎لم‎ ) ARABIC LIGATURE LAM WITH MEEM INITIAL FORM → ARABIC LETTER LAM, ARABIC LETTER MEEM	# 
+FCED ;	0644 0645 ;	MA	# ( ‎ﳭ‎ → ‎لم‎ ) ARABIC LIGATURE LAM WITH MEEM MEDIAL FORM → ARABIC LETTER LAM, ARABIC LETTER MEEM	# 
+FC85 ;	0644 0645 ;	MA	# ( ‎ﲅ‎ → ‎لم‎ ) ARABIC LIGATURE LAM WITH MEEM FINAL FORM → ARABIC LETTER LAM, ARABIC LETTER MEEM	# 
+FC42 ;	0644 0645 ;	MA	# ( ‎ﱂ‎ → ‎لم‎ ) ARABIC LIGATURE LAM WITH MEEM ISOLATED FORM → ARABIC LETTER LAM, ARABIC LETTER MEEM	# 
+
+FD88 ;	0644 0645 062D ;	MA	# ( ‎ﶈ‎ → ‎لمح‎ ) ARABIC LIGATURE LAM WITH MEEM WITH HAH INITIAL FORM → ARABIC LETTER LAM, ARABIC LETTER MEEM, ARABIC LETTER HAH	# 
+FD87 ;	0644 0645 062D ;	MA	# ( ‎ﶇ‎ → ‎لمح‎ ) ARABIC LIGATURE LAM WITH MEEM WITH HAH FINAL FORM → ARABIC LETTER LAM, ARABIC LETTER MEEM, ARABIC LETTER HAH	# 
+
+FDAD ;	0644 0645 0649 ;	MA	# ( ‎ﶭ‎ → ‎لمى‎ ) ARABIC LIGATURE LAM WITH MEEM WITH YEH FINAL FORM → ARABIC LETTER LAM, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# →‎لمي‎→
+
+FC86 ;	0644 0649 ;	MA	# ( ‎ﲆ‎ → ‎لى‎ ) ARABIC LIGATURE LAM WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER LAM, ARABIC LETTER ALEF MAKSURA	# 
+FC43 ;	0644 0649 ;	MA	# ( ‎ﱃ‎ → ‎لى‎ ) ARABIC LIGATURE LAM WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER LAM, ARABIC LETTER ALEF MAKSURA	# 
+FC87 ;	0644 0649 ;	MA	# ( ‎ﲇ‎ → ‎لى‎ ) ARABIC LIGATURE LAM WITH YEH FINAL FORM → ARABIC LETTER LAM, ARABIC LETTER ALEF MAKSURA	# →‎لي‎→
+FC44 ;	0644 0649 ;	MA	# ( ‎ﱄ‎ → ‎لى‎ ) ARABIC LIGATURE LAM WITH YEH ISOLATED FORM → ARABIC LETTER LAM, ARABIC LETTER ALEF MAKSURA	# →‎لي‎→
+
+1EE0C ;	0645 ;	MA	# ( ‎𞸌‎ → ‎م‎ ) ARABIC MATHEMATICAL MEEM → ARABIC LETTER MEEM	# 
+1EE2C ;	0645 ;	MA	# ( ‎𞸬‎ → ‎م‎ ) ARABIC MATHEMATICAL INITIAL MEEM → ARABIC LETTER MEEM	# 
+1EE6C ;	0645 ;	MA	# ( ‎𞹬‎ → ‎م‎ ) ARABIC MATHEMATICAL STRETCHED MEEM → ARABIC LETTER MEEM	# 
+1EE8C ;	0645 ;	MA	# ( ‎𞺌‎ → ‎م‎ ) ARABIC MATHEMATICAL LOOPED MEEM → ARABIC LETTER MEEM	# 
+1EEAC ;	0645 ;	MA	# ( ‎𞺬‎ → ‎م‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK MEEM → ARABIC LETTER MEEM	# 
+FEE3 ;	0645 ;	MA	# ( ‎ﻣ‎ → ‎م‎ ) ARABIC LETTER MEEM INITIAL FORM → ARABIC LETTER MEEM	# 
+FEE4 ;	0645 ;	MA	# ( ‎ﻤ‎ → ‎م‎ ) ARABIC LETTER MEEM MEDIAL FORM → ARABIC LETTER MEEM	# 
+FEE2 ;	0645 ;	MA	# ( ‎ﻢ‎ → ‎م‎ ) ARABIC LETTER MEEM FINAL FORM → ARABIC LETTER MEEM	# 
+FEE1 ;	0645 ;	MA	# ( ‎ﻡ‎ → ‎م‎ ) ARABIC LETTER MEEM ISOLATED FORM → ARABIC LETTER MEEM	# 
+
+08A7 ;	0645 06DB ;	MA	# ( ‎ࢧ‎ → ‎مۛ‎ ) ARABIC LETTER MEEM WITH THREE DOTS ABOVE → ARABIC LETTER MEEM, ARABIC SMALL HIGH THREE DOTS	# 
+
+06FE ;	0645 0348 ;	MA	#* ( ‎۾‎ → ‎م͈‎ ) ARABIC SIGN SINDHI POSTPOSITION MEN → ARABIC LETTER MEEM, COMBINING DOUBLE VERTICAL LINE BELOW	# 
+
+FC88 ;	0645 006C ;	MA	# ( ‎ﲈ‎ → ‎مl‎ ) ARABIC LIGATURE MEEM WITH ALEF FINAL FORM → ARABIC LETTER MEEM, LATIN SMALL LETTER L	# →‎ما‎→
+
+FCCE ;	0645 062C ;	MA	# ( ‎ﳎ‎ → ‎مج‎ ) ARABIC LIGATURE MEEM WITH JEEM INITIAL FORM → ARABIC LETTER MEEM, ARABIC LETTER JEEM	# 
+FC45 ;	0645 062C ;	MA	# ( ‎ﱅ‎ → ‎مج‎ ) ARABIC LIGATURE MEEM WITH JEEM ISOLATED FORM → ARABIC LETTER MEEM, ARABIC LETTER JEEM	# 
+
+FD8C ;	0645 062C 062D ;	MA	# ( ‎ﶌ‎ → ‎مجح‎ ) ARABIC LIGATURE MEEM WITH JEEM WITH HAH INITIAL FORM → ARABIC LETTER MEEM, ARABIC LETTER JEEM, ARABIC LETTER HAH	# 
+
+FD92 ;	0645 062C 062E ;	MA	# ( ‎ﶒ‎ → ‎مجخ‎ ) ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM → ARABIC LETTER MEEM, ARABIC LETTER JEEM, ARABIC LETTER KHAH	# 
+
+FD8D ;	0645 062C 0645 ;	MA	# ( ‎ﶍ‎ → ‎مجم‎ ) ARABIC LIGATURE MEEM WITH JEEM WITH MEEM INITIAL FORM → ARABIC LETTER MEEM, ARABIC LETTER JEEM, ARABIC LETTER MEEM	# 
+
+FDC0 ;	0645 062C 0649 ;	MA	# ( ‎ﷀ‎ → ‎مجى‎ ) ARABIC LIGATURE MEEM WITH JEEM WITH YEH FINAL FORM → ARABIC LETTER MEEM, ARABIC LETTER JEEM, ARABIC LETTER ALEF MAKSURA	# →‎مجي‎→
+
+FCCF ;	0645 062D ;	MA	# ( ‎ﳏ‎ → ‎مح‎ ) ARABIC LIGATURE MEEM WITH HAH INITIAL FORM → ARABIC LETTER MEEM, ARABIC LETTER HAH	# 
+FC46 ;	0645 062D ;	MA	# ( ‎ﱆ‎ → ‎مح‎ ) ARABIC LIGATURE MEEM WITH HAH ISOLATED FORM → ARABIC LETTER MEEM, ARABIC LETTER HAH	# 
+
+FD89 ;	0645 062D 062C ;	MA	# ( ‎ﶉ‎ → ‎محج‎ ) ARABIC LIGATURE MEEM WITH HAH WITH JEEM INITIAL FORM → ARABIC LETTER MEEM, ARABIC LETTER HAH, ARABIC LETTER JEEM	# 
+
+FD8A ;	0645 062D 0645 ;	MA	# ( ‎ﶊ‎ → ‎محم‎ ) ARABIC LIGATURE MEEM WITH HAH WITH MEEM INITIAL FORM → ARABIC LETTER MEEM, ARABIC LETTER HAH, ARABIC LETTER MEEM	# 
+
+FDF4 ;	0645 062D 0645 062F ;	MA	# ( ‎ﷴ‎ → ‎محمد‎ ) ARABIC LIGATURE MOHAMMAD ISOLATED FORM → ARABIC LETTER MEEM, ARABIC LETTER HAH, ARABIC LETTER MEEM, ARABIC LETTER DAL	# 
+
+FD8B ;	0645 062D 0649 ;	MA	# ( ‎ﶋ‎ → ‎محى‎ ) ARABIC LIGATURE MEEM WITH HAH WITH YEH FINAL FORM → ARABIC LETTER MEEM, ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# →‎محي‎→
+
+FCD0 ;	0645 062E ;	MA	# ( ‎ﳐ‎ → ‎مخ‎ ) ARABIC LIGATURE MEEM WITH KHAH INITIAL FORM → ARABIC LETTER MEEM, ARABIC LETTER KHAH	# 
+FC47 ;	0645 062E ;	MA	# ( ‎ﱇ‎ → ‎مخ‎ ) ARABIC LIGATURE MEEM WITH KHAH ISOLATED FORM → ARABIC LETTER MEEM, ARABIC LETTER KHAH	# 
+
+FD8E ;	0645 062E 062C ;	MA	# ( ‎ﶎ‎ → ‎مخج‎ ) ARABIC LIGATURE MEEM WITH KHAH WITH JEEM INITIAL FORM → ARABIC LETTER MEEM, ARABIC LETTER KHAH, ARABIC LETTER JEEM	# 
+
+FD8F ;	0645 062E 0645 ;	MA	# ( ‎ﶏ‎ → ‎مخم‎ ) ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM → ARABIC LETTER MEEM, ARABIC LETTER KHAH, ARABIC LETTER MEEM	# 
+
+FDB9 ;	0645 062E 0649 ;	MA	# ( ‎ﶹ‎ → ‎مخى‎ ) ARABIC LIGATURE MEEM WITH KHAH WITH YEH FINAL FORM → ARABIC LETTER MEEM, ARABIC LETTER KHAH, ARABIC LETTER ALEF MAKSURA	# →‎مخي‎→
+
+FCD1 ;	0645 0645 ;	MA	# ( ‎ﳑ‎ → ‎مم‎ ) ARABIC LIGATURE MEEM WITH MEEM INITIAL FORM → ARABIC LETTER MEEM, ARABIC LETTER MEEM	# 
+FC89 ;	0645 0645 ;	MA	# ( ‎ﲉ‎ → ‎مم‎ ) ARABIC LIGATURE MEEM WITH MEEM FINAL FORM → ARABIC LETTER MEEM, ARABIC LETTER MEEM	# 
+FC48 ;	0645 0645 ;	MA	# ( ‎ﱈ‎ → ‎مم‎ ) ARABIC LIGATURE MEEM WITH MEEM ISOLATED FORM → ARABIC LETTER MEEM, ARABIC LETTER MEEM	# 
+
+FDB1 ;	0645 0645 0649 ;	MA	# ( ‎ﶱ‎ → ‎ممى‎ ) ARABIC LIGATURE MEEM WITH MEEM WITH YEH FINAL FORM → ARABIC LETTER MEEM, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# →‎ممي‎→
+
+FC49 ;	0645 0649 ;	MA	# ( ‎ﱉ‎ → ‎مى‎ ) ARABIC LIGATURE MEEM WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# 
+FC4A ;	0645 0649 ;	MA	# ( ‎ﱊ‎ → ‎مى‎ ) ARABIC LIGATURE MEEM WITH YEH ISOLATED FORM → ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# →‎مي‎→
+
+1EE0D ;	0646 ;	MA	# ( ‎𞸍‎ → ‎ن‎ ) ARABIC MATHEMATICAL NOON → ARABIC LETTER NOON	# 
+1EE2D ;	0646 ;	MA	# ( ‎𞸭‎ → ‎ن‎ ) ARABIC MATHEMATICAL INITIAL NOON → ARABIC LETTER NOON	# 
+1EE4D ;	0646 ;	MA	# ( ‎𞹍‎ → ‎ن‎ ) ARABIC MATHEMATICAL TAILED NOON → ARABIC LETTER NOON	# 
+1EE6D ;	0646 ;	MA	# ( ‎𞹭‎ → ‎ن‎ ) ARABIC MATHEMATICAL STRETCHED NOON → ARABIC LETTER NOON	# 
+1EE8D ;	0646 ;	MA	# ( ‎𞺍‎ → ‎ن‎ ) ARABIC MATHEMATICAL LOOPED NOON → ARABIC LETTER NOON	# 
+1EEAD ;	0646 ;	MA	# ( ‎𞺭‎ → ‎ن‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK NOON → ARABIC LETTER NOON	# 
+FEE7 ;	0646 ;	MA	# ( ‎ﻧ‎ → ‎ن‎ ) ARABIC LETTER NOON INITIAL FORM → ARABIC LETTER NOON	# 
+FEE8 ;	0646 ;	MA	# ( ‎ﻨ‎ → ‎ن‎ ) ARABIC LETTER NOON MEDIAL FORM → ARABIC LETTER NOON	# 
+FEE6 ;	0646 ;	MA	# ( ‎ﻦ‎ → ‎ن‎ ) ARABIC LETTER NOON FINAL FORM → ARABIC LETTER NOON	# 
+FEE5 ;	0646 ;	MA	# ( ‎ﻥ‎ → ‎ن‎ ) ARABIC LETTER NOON ISOLATED FORM → ARABIC LETTER NOON	# 
+
+0768 ;	0646 0615 ;	MA	# ( ‎ݨ‎ → ‎نؕ‎ ) ARABIC LETTER NOON WITH SMALL TAH → ARABIC LETTER NOON, ARABIC SMALL HIGH TAH	# 
+
+0769 ;	0646 0306 ;	MA	# ( ‎ݩ‎ → ‎ن̆‎ ) ARABIC LETTER NOON WITH SMALL V → ARABIC LETTER NOON, COMBINING BREVE	# →‎نٚ‎→
+
+FCD6 ;	0646 006F ;	MA	# ( ‎ﳖ‎ → ‎نo‎ ) ARABIC LIGATURE NOON WITH HEH INITIAL FORM → ARABIC LETTER NOON, LATIN SMALL LETTER O	# →‎نه‎→
+FCEF ;	0646 006F ;	MA	# ( ‎ﳯ‎ → ‎نo‎ ) ARABIC LIGATURE NOON WITH HEH MEDIAL FORM → ARABIC LETTER NOON, LATIN SMALL LETTER O	# →‎نه‎→
+
+FDB8 ;	0646 062C 062D ;	MA	# ( ‎ﶸ‎ → ‎نجح‎ ) ARABIC LIGATURE NOON WITH JEEM WITH HAH INITIAL FORM → ARABIC LETTER NOON, ARABIC LETTER JEEM, ARABIC LETTER HAH	# 
+FDBD ;	0646 062C 062D ;	MA	# ( ‎ﶽ‎ → ‎نجح‎ ) ARABIC LIGATURE NOON WITH JEEM WITH HAH FINAL FORM → ARABIC LETTER NOON, ARABIC LETTER JEEM, ARABIC LETTER HAH	# 
+
+FD98 ;	0646 062C 0645 ;	MA	# ( ‎ﶘ‎ → ‎نجم‎ ) ARABIC LIGATURE NOON WITH JEEM WITH MEEM INITIAL FORM → ARABIC LETTER NOON, ARABIC LETTER JEEM, ARABIC LETTER MEEM	# 
+FD97 ;	0646 062C 0645 ;	MA	# ( ‎ﶗ‎ → ‎نجم‎ ) ARABIC LIGATURE NOON WITH JEEM WITH MEEM FINAL FORM → ARABIC LETTER NOON, ARABIC LETTER JEEM, ARABIC LETTER MEEM	# 
+
+FD99 ;	0646 062C 0649 ;	MA	# ( ‎ﶙ‎ → ‎نجى‎ ) ARABIC LIGATURE NOON WITH JEEM WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER NOON, ARABIC LETTER JEEM, ARABIC LETTER ALEF MAKSURA	# 
+FDC7 ;	0646 062C 0649 ;	MA	# ( ‎ﷇ‎ → ‎نجى‎ ) ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM → ARABIC LETTER NOON, ARABIC LETTER JEEM, ARABIC LETTER ALEF MAKSURA	# →‎نجي‎→
+
+FCD3 ;	0646 062D ;	MA	# ( ‎ﳓ‎ → ‎نح‎ ) ARABIC LIGATURE NOON WITH HAH INITIAL FORM → ARABIC LETTER NOON, ARABIC LETTER HAH	# 
+FC4C ;	0646 062D ;	MA	# ( ‎ﱌ‎ → ‎نح‎ ) ARABIC LIGATURE NOON WITH HAH ISOLATED FORM → ARABIC LETTER NOON, ARABIC LETTER HAH	# 
+
+FD95 ;	0646 062D 0645 ;	MA	# ( ‎ﶕ‎ → ‎نحم‎ ) ARABIC LIGATURE NOON WITH HAH WITH MEEM INITIAL FORM → ARABIC LETTER NOON, ARABIC LETTER HAH, ARABIC LETTER MEEM	# 
+
+FD96 ;	0646 062D 0649 ;	MA	# ( ‎ﶖ‎ → ‎نحى‎ ) ARABIC LIGATURE NOON WITH HAH WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER NOON, ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# 
+FDB3 ;	0646 062D 0649 ;	MA	# ( ‎ﶳ‎ → ‎نحى‎ ) ARABIC LIGATURE NOON WITH HAH WITH YEH FINAL FORM → ARABIC LETTER NOON, ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# →‎نحي‎→
+
+FCD4 ;	0646 062E ;	MA	# ( ‎ﳔ‎ → ‎نخ‎ ) ARABIC LIGATURE NOON WITH KHAH INITIAL FORM → ARABIC LETTER NOON, ARABIC LETTER KHAH	# 
+FC4D ;	0646 062E ;	MA	# ( ‎ﱍ‎ → ‎نخ‎ ) ARABIC LIGATURE NOON WITH KHAH ISOLATED FORM → ARABIC LETTER NOON, ARABIC LETTER KHAH	# 
+
+FC8A ;	0646 0631 ;	MA	# ( ‎ﲊ‎ → ‎نر‎ ) ARABIC LIGATURE NOON WITH REH FINAL FORM → ARABIC LETTER NOON, ARABIC LETTER REH	# 
+
+FC8B ;	0646 0632 ;	MA	# ( ‎ﲋ‎ → ‎نز‎ ) ARABIC LIGATURE NOON WITH ZAIN FINAL FORM → ARABIC LETTER NOON, ARABIC LETTER ZAIN	# 
+
+FCD5 ;	0646 0645 ;	MA	# ( ‎ﳕ‎ → ‎نم‎ ) ARABIC LIGATURE NOON WITH MEEM INITIAL FORM → ARABIC LETTER NOON, ARABIC LETTER MEEM	# 
+FCEE ;	0646 0645 ;	MA	# ( ‎ﳮ‎ → ‎نم‎ ) ARABIC LIGATURE NOON WITH MEEM MEDIAL FORM → ARABIC LETTER NOON, ARABIC LETTER MEEM	# 
+FC8C ;	0646 0645 ;	MA	# ( ‎ﲌ‎ → ‎نم‎ ) ARABIC LIGATURE NOON WITH MEEM FINAL FORM → ARABIC LETTER NOON, ARABIC LETTER MEEM	# 
+FC4E ;	0646 0645 ;	MA	# ( ‎ﱎ‎ → ‎نم‎ ) ARABIC LIGATURE NOON WITH MEEM ISOLATED FORM → ARABIC LETTER NOON, ARABIC LETTER MEEM	# 
+
+FD9B ;	0646 0645 0649 ;	MA	# ( ‎ﶛ‎ → ‎نمى‎ ) ARABIC LIGATURE NOON WITH MEEM WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER NOON, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# 
+FD9A ;	0646 0645 0649 ;	MA	# ( ‎ﶚ‎ → ‎نمى‎ ) ARABIC LIGATURE NOON WITH MEEM WITH YEH FINAL FORM → ARABIC LETTER NOON, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# →‎نمي‎→
+
+FC8D ;	0646 0646 ;	MA	# ( ‎ﲍ‎ → ‎نن‎ ) ARABIC LIGATURE NOON WITH NOON FINAL FORM → ARABIC LETTER NOON, ARABIC LETTER NOON	# 
+
+FC8E ;	0646 0649 ;	MA	# ( ‎ﲎ‎ → ‎نى‎ ) ARABIC LIGATURE NOON WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER NOON, ARABIC LETTER ALEF MAKSURA	# 
+FC4F ;	0646 0649 ;	MA	# ( ‎ﱏ‎ → ‎نى‎ ) ARABIC LIGATURE NOON WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER NOON, ARABIC LETTER ALEF MAKSURA	# 
+FC8F ;	0646 0649 ;	MA	# ( ‎ﲏ‎ → ‎نى‎ ) ARABIC LIGATURE NOON WITH YEH FINAL FORM → ARABIC LETTER NOON, ARABIC LETTER ALEF MAKSURA	# →‎ني‎→
+FC50 ;	0646 0649 ;	MA	# ( ‎ﱐ‎ → ‎نى‎ ) ARABIC LIGATURE NOON WITH YEH ISOLATED FORM → ARABIC LETTER NOON, ARABIC LETTER ALEF MAKSURA	# →‎ني‎→
+
+06C2 ;	06C0 ;	MA	# ( ‎ۂ‎ → ‎ۀ‎ ) ARABIC LETTER HEH GOAL WITH HAMZA ABOVE → ARABIC LETTER HEH WITH YEH ABOVE	# →‎ﮤ‎→
+FBA5 ;	06C0 ;	MA	# ( ‎ﮥ‎ → ‎ۀ‎ ) ARABIC LETTER HEH WITH YEH ABOVE FINAL FORM → ARABIC LETTER HEH WITH YEH ABOVE	# 
+FBA4 ;	06C0 ;	MA	# ( ‎ﮤ‎ → ‎ۀ‎ ) ARABIC LETTER HEH WITH YEH ABOVE ISOLATED FORM → ARABIC LETTER HEH WITH YEH ABOVE	# 
+
+102E4 ;	0648 ;	MA	#* ( 𐋤 → ‎و‎ ) COPTIC EPACT DIGIT FOUR → ARABIC LETTER WAW	# 
+1EE05 ;	0648 ;	MA	# ( ‎𞸅‎ → ‎و‎ ) ARABIC MATHEMATICAL WAW → ARABIC LETTER WAW	# 
+1EE85 ;	0648 ;	MA	# ( ‎𞺅‎ → ‎و‎ ) ARABIC MATHEMATICAL LOOPED WAW → ARABIC LETTER WAW	# 
+1EEA5 ;	0648 ;	MA	# ( ‎𞺥‎ → ‎و‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK WAW → ARABIC LETTER WAW	# 
+FEEE ;	0648 ;	MA	# ( ‎ﻮ‎ → ‎و‎ ) ARABIC LETTER WAW FINAL FORM → ARABIC LETTER WAW	# 
+FEED ;	0648 ;	MA	# ( ‎ﻭ‎ → ‎و‎ ) ARABIC LETTER WAW ISOLATED FORM → ARABIC LETTER WAW	# 
+08B1 ;	0648 ;	MA	# ( ‎ࢱ‎ → ‎و‎ ) ARABIC LETTER STRAIGHT WAW → ARABIC LETTER WAW	# 
+
+06CB ;	0648 06DB ;	MA	# ( ‎ۋ‎ → ‎وۛ‎ ) ARABIC LETTER VE → ARABIC LETTER WAW, ARABIC SMALL HIGH THREE DOTS	# 
+FBDF ;	0648 06DB ;	MA	# ( ‎ﯟ‎ → ‎وۛ‎ ) ARABIC LETTER VE FINAL FORM → ARABIC LETTER WAW, ARABIC SMALL HIGH THREE DOTS	# →‎ۋ‎→
+FBDE ;	0648 06DB ;	MA	# ( ‎ﯞ‎ → ‎وۛ‎ ) ARABIC LETTER VE ISOLATED FORM → ARABIC LETTER WAW, ARABIC SMALL HIGH THREE DOTS	# →‎ۋ‎→
+
+06C7 ;	0648 0313 ;	MA	# ( ‎ۇ‎ → ‎و̓‎ ) ARABIC LETTER U → ARABIC LETTER WAW, COMBINING COMMA ABOVE	# →‎وُ‎→
+FBD8 ;	0648 0313 ;	MA	# ( ‎ﯘ‎ → ‎و̓‎ ) ARABIC LETTER U FINAL FORM → ARABIC LETTER WAW, COMBINING COMMA ABOVE	# →‎ۇ‎→→‎وُ‎→
+FBD7 ;	0648 0313 ;	MA	# ( ‎ﯗ‎ → ‎و̓‎ ) ARABIC LETTER U ISOLATED FORM → ARABIC LETTER WAW, COMBINING COMMA ABOVE	# →‎ۇ‎→→‎وُ‎→
+
+06C6 ;	0648 0306 ;	MA	# ( ‎ۆ‎ → ‎و̆‎ ) ARABIC LETTER OE → ARABIC LETTER WAW, COMBINING BREVE	# →‎وٚ‎→
+FBDA ;	0648 0306 ;	MA	# ( ‎ﯚ‎ → ‎و̆‎ ) ARABIC LETTER OE FINAL FORM → ARABIC LETTER WAW, COMBINING BREVE	# →‎ۆ‎→→‎وٚ‎→
+FBD9 ;	0648 0306 ;	MA	# ( ‎ﯙ‎ → ‎و̆‎ ) ARABIC LETTER OE ISOLATED FORM → ARABIC LETTER WAW, COMBINING BREVE	# →‎ۆ‎→→‎وٚ‎→
+
+06C9 ;	0648 0302 ;	MA	# ( ‎ۉ‎ → ‎و̂‎ ) ARABIC LETTER KIRGHIZ YU → ARABIC LETTER WAW, COMBINING CIRCUMFLEX ACCENT	# →‎وٛ‎→
+FBE3 ;	0648 0302 ;	MA	# ( ‎ﯣ‎ → ‎و̂‎ ) ARABIC LETTER KIRGHIZ YU FINAL FORM → ARABIC LETTER WAW, COMBINING CIRCUMFLEX ACCENT	# →‎ۉ‎→→‎وٛ‎→
+FBE2 ;	0648 0302 ;	MA	# ( ‎ﯢ‎ → ‎و̂‎ ) ARABIC LETTER KIRGHIZ YU ISOLATED FORM → ARABIC LETTER WAW, COMBINING CIRCUMFLEX ACCENT	# →‎ۉ‎→→‎وٛ‎→
+
+06C8 ;	0648 0670 ;	MA	# ( ‎ۈ‎ → ‎وٰ‎ ) ARABIC LETTER YU → ARABIC LETTER WAW, ARABIC LETTER SUPERSCRIPT ALEF	# 
+FBDC ;	0648 0670 ;	MA	# ( ‎ﯜ‎ → ‎وٰ‎ ) ARABIC LETTER YU FINAL FORM → ARABIC LETTER WAW, ARABIC LETTER SUPERSCRIPT ALEF	# →‎ۈ‎→
+FBDB ;	0648 0670 ;	MA	# ( ‎ﯛ‎ → ‎وٰ‎ ) ARABIC LETTER YU ISOLATED FORM → ARABIC LETTER WAW, ARABIC LETTER SUPERSCRIPT ALEF	# →‎ۈ‎→
+
+0624 ;	0648 0674 ;	MA	# ( ‎ؤ‎ → ‎وٴ‎ ) ARABIC LETTER WAW WITH HAMZA ABOVE → ARABIC LETTER WAW, ARABIC LETTER HIGH HAMZA	# →‎ٶ‎→
+FE86 ;	0648 0674 ;	MA	# ( ‎ﺆ‎ → ‎وٴ‎ ) ARABIC LETTER WAW WITH HAMZA ABOVE FINAL FORM → ARABIC LETTER WAW, ARABIC LETTER HIGH HAMZA	# →‎ٶ‎→
+FE85 ;	0648 0674 ;	MA	# ( ‎ﺅ‎ → ‎وٴ‎ ) ARABIC LETTER WAW WITH HAMZA ABOVE ISOLATED FORM → ARABIC LETTER WAW, ARABIC LETTER HIGH HAMZA	# →‎ٶ‎→
+0676 ;	0648 0674 ;	MA	# ( ‎ٶ‎ → ‎وٴ‎ ) ARABIC LETTER HIGH HAMZA WAW → ARABIC LETTER WAW, ARABIC LETTER HIGH HAMZA	# 
+
+0677 ;	0648 0313 0674 ;	MA	# ( ‎ٷ‎ → ‎و̓ٴ‎ ) ARABIC LETTER U WITH HAMZA ABOVE → ARABIC LETTER WAW, COMBINING COMMA ABOVE, ARABIC LETTER HIGH HAMZA	# →‎ۇٴ‎→
+FBDD ;	0648 0313 0674 ;	MA	# ( ‎ﯝ‎ → ‎و̓ٴ‎ ) ARABIC LETTER U WITH HAMZA ABOVE ISOLATED FORM → ARABIC LETTER WAW, COMBINING COMMA ABOVE, ARABIC LETTER HIGH HAMZA	# →‎ۇٴ‎→
+
+FDF8 ;	0648 0633 0644 0645 ;	MA	# ( ‎ﷸ‎ → ‎وسلم‎ ) ARABIC LIGATURE WASALLAM ISOLATED FORM → ARABIC LETTER WAW, ARABIC LETTER SEEN, ARABIC LETTER LAM, ARABIC LETTER MEEM	# 
+
+FBE1 ;	06C5 ;	MA	# ( ‎ﯡ‎ → ‎ۅ‎ ) ARABIC LETTER KIRGHIZ OE FINAL FORM → ARABIC LETTER KIRGHIZ OE	# 
+FBE0 ;	06C5 ;	MA	# ( ‎ﯠ‎ → ‎ۅ‎ ) ARABIC LETTER KIRGHIZ OE ISOLATED FORM → ARABIC LETTER KIRGHIZ OE	# 
+
+066E ;	0649 ;	MA	# ( ‎ٮ‎ → ‎ى‎ ) ARABIC LETTER DOTLESS BEH → ARABIC LETTER ALEF MAKSURA	# 
+1EE1C ;	0649 ;	MA	# ( ‎𞸜‎ → ‎ى‎ ) ARABIC MATHEMATICAL DOTLESS BEH → ARABIC LETTER ALEF MAKSURA	# →‎ٮ‎→
+1EE7C ;	0649 ;	MA	# ( ‎𞹼‎ → ‎ى‎ ) ARABIC MATHEMATICAL STRETCHED DOTLESS BEH → ARABIC LETTER ALEF MAKSURA	# →‎ٮ‎→
+06BA ;	0649 ;	MA	# ( ‎ں‎ → ‎ى‎ ) ARABIC LETTER NOON GHUNNA → ARABIC LETTER ALEF MAKSURA	# 
+1EE1D ;	0649 ;	MA	# ( ‎𞸝‎ → ‎ى‎ ) ARABIC MATHEMATICAL DOTLESS NOON → ARABIC LETTER ALEF MAKSURA	# →‎ں‎→
+1EE5D ;	0649 ;	MA	# ( ‎𞹝‎ → ‎ى‎ ) ARABIC MATHEMATICAL TAILED DOTLESS NOON → ARABIC LETTER ALEF MAKSURA	# →‎ں‎→
+FB9F ;	0649 ;	MA	# ( ‎ﮟ‎ → ‎ى‎ ) ARABIC LETTER NOON GHUNNA FINAL FORM → ARABIC LETTER ALEF MAKSURA	# →‎ں‎→
+FB9E ;	0649 ;	MA	# ( ‎ﮞ‎ → ‎ى‎ ) ARABIC LETTER NOON GHUNNA ISOLATED FORM → ARABIC LETTER ALEF MAKSURA	# →‎ں‎→
+FBE8 ;	0649 ;	MA	# ( ‎ﯨ‎ → ‎ى‎ ) ARABIC LETTER UIGHUR KAZAKH KIRGHIZ ALEF MAKSURA INITIAL FORM → ARABIC LETTER ALEF MAKSURA	# 
+FBE9 ;	0649 ;	MA	# ( ‎ﯩ‎ → ‎ى‎ ) ARABIC LETTER UIGHUR KAZAKH KIRGHIZ ALEF MAKSURA MEDIAL FORM → ARABIC LETTER ALEF MAKSURA	# 
+FEF0 ;	0649 ;	MA	# ( ‎ﻰ‎ → ‎ى‎ ) ARABIC LETTER ALEF MAKSURA FINAL FORM → ARABIC LETTER ALEF MAKSURA	# 
+FEEF ;	0649 ;	MA	# ( ‎ﻯ‎ → ‎ى‎ ) ARABIC LETTER ALEF MAKSURA ISOLATED FORM → ARABIC LETTER ALEF MAKSURA	# 
+064A ;	0649 ;	MA	# ( ‎ي‎ → ‎ى‎ ) ARABIC LETTER YEH → ARABIC LETTER ALEF MAKSURA	# 
+1EE09 ;	0649 ;	MA	# ( ‎𞸉‎ → ‎ى‎ ) ARABIC MATHEMATICAL YEH → ARABIC LETTER ALEF MAKSURA	# →‎ي‎→
+1EE29 ;	0649 ;	MA	# ( ‎𞸩‎ → ‎ى‎ ) ARABIC MATHEMATICAL INITIAL YEH → ARABIC LETTER ALEF MAKSURA	# →‎ي‎→
+1EE49 ;	0649 ;	MA	# ( ‎𞹉‎ → ‎ى‎ ) ARABIC MATHEMATICAL TAILED YEH → ARABIC LETTER ALEF MAKSURA	# →‎ي‎→
+1EE69 ;	0649 ;	MA	# ( ‎𞹩‎ → ‎ى‎ ) ARABIC MATHEMATICAL STRETCHED YEH → ARABIC LETTER ALEF MAKSURA	# →‎ي‎→
+1EE89 ;	0649 ;	MA	# ( ‎𞺉‎ → ‎ى‎ ) ARABIC MATHEMATICAL LOOPED YEH → ARABIC LETTER ALEF MAKSURA	# →‎ي‎→
+1EEA9 ;	0649 ;	MA	# ( ‎𞺩‎ → ‎ى‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK YEH → ARABIC LETTER ALEF MAKSURA	# →‎ي‎→
+FEF3 ;	0649 ;	MA	# ( ‎ﻳ‎ → ‎ى‎ ) ARABIC LETTER YEH INITIAL FORM → ARABIC LETTER ALEF MAKSURA	# →‎ي‎→
+FEF4 ;	0649 ;	MA	# ( ‎ﻴ‎ → ‎ى‎ ) ARABIC LETTER YEH MEDIAL FORM → ARABIC LETTER ALEF MAKSURA	# →‎ي‎→
+FEF2 ;	0649 ;	MA	# ( ‎ﻲ‎ → ‎ى‎ ) ARABIC LETTER YEH FINAL FORM → ARABIC LETTER ALEF MAKSURA	# →‎ي‎→
+FEF1 ;	0649 ;	MA	# ( ‎ﻱ‎ → ‎ى‎ ) ARABIC LETTER YEH ISOLATED FORM → ARABIC LETTER ALEF MAKSURA	# →‎ي‎→
+06CC ;	0649 ;	MA	# ( ‎ی‎ → ‎ى‎ ) ARABIC LETTER FARSI YEH → ARABIC LETTER ALEF MAKSURA	# 
+FBFE ;	0649 ;	MA	# ( ‎ﯾ‎ → ‎ى‎ ) ARABIC LETTER FARSI YEH INITIAL FORM → ARABIC LETTER ALEF MAKSURA	# →‎ی‎→
+FBFF ;	0649 ;	MA	# ( ‎ﯿ‎ → ‎ى‎ ) ARABIC LETTER FARSI YEH MEDIAL FORM → ARABIC LETTER ALEF MAKSURA	# →‎ی‎→
+FBFD ;	0649 ;	MA	# ( ‎ﯽ‎ → ‎ى‎ ) ARABIC LETTER FARSI YEH FINAL FORM → ARABIC LETTER ALEF MAKSURA	# →‎ﻰ‎→
+FBFC ;	0649 ;	MA	# ( ‎ﯼ‎ → ‎ى‎ ) ARABIC LETTER FARSI YEH ISOLATED FORM → ARABIC LETTER ALEF MAKSURA	# 
+06D2 ;	0649 ;	MA	# ( ‎ے‎ → ‎ى‎ ) ARABIC LETTER YEH BARREE → ARABIC LETTER ALEF MAKSURA	# →‎ي‎→
+FBAF ;	0649 ;	MA	# ( ‎ﮯ‎ → ‎ى‎ ) ARABIC LETTER YEH BARREE FINAL FORM → ARABIC LETTER ALEF MAKSURA	# →‎ے‎→→‎ي‎→
+FBAE ;	0649 ;	MA	# ( ‎ﮮ‎ → ‎ى‎ ) ARABIC LETTER YEH BARREE ISOLATED FORM → ARABIC LETTER ALEF MAKSURA	# →‎ے‎→→‎ي‎→
+
+0679 ;	0649 0615 ;	MA	# ( ‎ٹ‎ → ‎ىؕ‎ ) ARABIC LETTER TTEH → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH TAH	# →‎ٮؕ‎→
+FB68 ;	0649 0615 ;	MA	# ( ‎ﭨ‎ → ‎ىؕ‎ ) ARABIC LETTER TTEH INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH TAH	# →‎ٹ‎→→‎ٮؕ‎→
+FB69 ;	0649 0615 ;	MA	# ( ‎ﭩ‎ → ‎ىؕ‎ ) ARABIC LETTER TTEH MEDIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH TAH	# →‎ٹ‎→→‎ٮؕ‎→
+FB67 ;	0649 0615 ;	MA	# ( ‎ﭧ‎ → ‎ىؕ‎ ) ARABIC LETTER TTEH FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH TAH	# →‎ٹ‎→→‎ٮؕ‎→
+FB66 ;	0649 0615 ;	MA	# ( ‎ﭦ‎ → ‎ىؕ‎ ) ARABIC LETTER TTEH ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH TAH	# →‎ٹ‎→→‎ٮؕ‎→
+06BB ;	0649 0615 ;	MA	# ( ‎ڻ‎ → ‎ىؕ‎ ) ARABIC LETTER RNOON → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH TAH	# →‎ںؕ‎→
+FBA2 ;	0649 0615 ;	MA	# ( ‎ﮢ‎ → ‎ىؕ‎ ) ARABIC LETTER RNOON INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH TAH	# →‎ڻ‎→→‎ںؕ‎→
+FBA3 ;	0649 0615 ;	MA	# ( ‎ﮣ‎ → ‎ىؕ‎ ) ARABIC LETTER RNOON MEDIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH TAH	# →‎ڻ‎→→‎ںؕ‎→
+FBA1 ;	0649 0615 ;	MA	# ( ‎ﮡ‎ → ‎ىؕ‎ ) ARABIC LETTER RNOON FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH TAH	# →‎ڻ‎→→‎ںؕ‎→
+FBA0 ;	0649 0615 ;	MA	# ( ‎ﮠ‎ → ‎ىؕ‎ ) ARABIC LETTER RNOON ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH TAH	# →‎ڻ‎→→‎ںؕ‎→
+
+067E ;	0649 06DB ;	MA	# ( ‎پ‎ → ‎ىۛ‎ ) ARABIC LETTER PEH → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎ڽ‎→→‎ںۛ‎→
+FB58 ;	0649 06DB ;	MA	# ( ‎ﭘ‎ → ‎ىۛ‎ ) ARABIC LETTER PEH INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎پ‎→→‎ڽ‎→→‎ںۛ‎→
+FB59 ;	0649 06DB ;	MA	# ( ‎ﭙ‎ → ‎ىۛ‎ ) ARABIC LETTER PEH MEDIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎پ‎→→‎ڽ‎→→‎ںۛ‎→
+FB57 ;	0649 06DB ;	MA	# ( ‎ﭗ‎ → ‎ىۛ‎ ) ARABIC LETTER PEH FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎پ‎→→‎ڽ‎→→‎ںۛ‎→
+FB56 ;	0649 06DB ;	MA	# ( ‎ﭖ‎ → ‎ىۛ‎ ) ARABIC LETTER PEH ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎پ‎→→‎ڽ‎→→‎ںۛ‎→
+062B ;	0649 06DB ;	MA	# ( ‎ث‎ → ‎ىۛ‎ ) ARABIC LETTER THEH → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎ٮۛ‎→
+1EE16 ;	0649 06DB ;	MA	# ( ‎𞸖‎ → ‎ىۛ‎ ) ARABIC MATHEMATICAL THEH → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎ث‎→→‎ٮۛ‎→
+1EE36 ;	0649 06DB ;	MA	# ( ‎𞸶‎ → ‎ىۛ‎ ) ARABIC MATHEMATICAL INITIAL THEH → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎ث‎→→‎ٮۛ‎→
+1EE76 ;	0649 06DB ;	MA	# ( ‎𞹶‎ → ‎ىۛ‎ ) ARABIC MATHEMATICAL STRETCHED THEH → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎ث‎→→‎ٮۛ‎→
+1EE96 ;	0649 06DB ;	MA	# ( ‎𞺖‎ → ‎ىۛ‎ ) ARABIC MATHEMATICAL LOOPED THEH → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎ث‎→→‎ٮۛ‎→
+1EEB6 ;	0649 06DB ;	MA	# ( ‎𞺶‎ → ‎ىۛ‎ ) ARABIC MATHEMATICAL DOUBLE-STRUCK THEH → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎ث‎→→‎ٮۛ‎→
+FE9B ;	0649 06DB ;	MA	# ( ‎ﺛ‎ → ‎ىۛ‎ ) ARABIC LETTER THEH INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎ث‎→→‎ٮۛ‎→
+FE9C ;	0649 06DB ;	MA	# ( ‎ﺜ‎ → ‎ىۛ‎ ) ARABIC LETTER THEH MEDIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎ث‎→→‎ٮۛ‎→
+FE9A ;	0649 06DB ;	MA	# ( ‎ﺚ‎ → ‎ىۛ‎ ) ARABIC LETTER THEH FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎ث‎→→‎ٮۛ‎→
+FE99 ;	0649 06DB ;	MA	# ( ‎ﺙ‎ → ‎ىۛ‎ ) ARABIC LETTER THEH ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎ث‎→→‎ٮۛ‎→
+06BD ;	0649 06DB ;	MA	# ( ‎ڽ‎ → ‎ىۛ‎ ) ARABIC LETTER NOON WITH THREE DOTS ABOVE → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎ںۛ‎→
+06D1 ;	0649 06DB ;	MA	# ( ‎ۑ‎ → ‎ىۛ‎ ) ARABIC LETTER YEH WITH THREE DOTS BELOW → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎پ‎→→‎ڽ‎→→‎ںۛ‎→
+063F ;	0649 06DB ;	MA	# ( ‎ؿ‎ → ‎ىۛ‎ ) ARABIC LETTER FARSI YEH WITH THREE DOTS ABOVE → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS	# →‎یۛ‎→
+
+0756 ;	0649 0306 ;	MA	# ( ‎ݖ‎ → ‎ى̆‎ ) ARABIC LETTER BEH WITH SMALL V → ARABIC LETTER ALEF MAKSURA, COMBINING BREVE	# →‎ٮٚ‎→
+06CE ;	0649 0306 ;	MA	# ( ‎ێ‎ → ‎ى̆‎ ) ARABIC LETTER YEH WITH SMALL V → ARABIC LETTER ALEF MAKSURA, COMBINING BREVE	# →‎یٚ‎→
+
+063D ;	0649 0302 ;	MA	# ( ‎ؽ‎ → ‎ى̂‎ ) ARABIC LETTER FARSI YEH WITH INVERTED V → ARABIC LETTER ALEF MAKSURA, COMBINING CIRCUMFLEX ACCENT	# →‎یٛ‎→
+
+08A8 ;	0649 0654 ;	MA	# ( ‎ࢨ‎ → ‎ىٔ‎ ) ARABIC LETTER YEH WITH TWO DOTS BELOW AND HAMZA ABOVE → ARABIC LETTER ALEF MAKSURA, ARABIC HAMZA ABOVE	# →‎ئ‎→
+
+FC90 ;	0649 0670 ;	MA	# ( ‎ﲐ‎ → ‎ىٰ‎ ) ARABIC LIGATURE ALEF MAKSURA WITH SUPERSCRIPT ALEF FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER SUPERSCRIPT ALEF	# 
+FC5D ;	0649 0670 ;	MA	# ( ‎ﱝ‎ → ‎ىٰ‎ ) ARABIC LIGATURE ALEF MAKSURA WITH SUPERSCRIPT ALEF ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER SUPERSCRIPT ALEF	# 
+
+FCDE ;	0649 006F ;	MA	# ( ‎ﳞ‎ → ‎ىo‎ ) ARABIC LIGATURE YEH WITH HEH INITIAL FORM → ARABIC LETTER ALEF MAKSURA, LATIN SMALL LETTER O	# →‎يه‎→
+FCF1 ;	0649 006F ;	MA	# ( ‎ﳱ‎ → ‎ىo‎ ) ARABIC LIGATURE YEH WITH HEH MEDIAL FORM → ARABIC LETTER ALEF MAKSURA, LATIN SMALL LETTER O	# →‎يه‎→
+
+FCE6 ;	0649 06DB 006F ;	MA	# ( ‎ﳦ‎ → ‎ىۛo‎ ) ARABIC LIGATURE THEH WITH HEH MEDIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS, LATIN SMALL LETTER O	# →‎ثه‎→
+
+0626 ;	0649 0674 ;	MA	# ( ‎ئ‎ → ‎ىٴ‎ ) ARABIC LETTER YEH WITH HAMZA ABOVE → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA	# →‎ٸ‎→→‎يٴ‎→
+FE8B ;	0649 0674 ;	MA	# ( ‎ﺋ‎ → ‎ىٴ‎ ) ARABIC LETTER YEH WITH HAMZA ABOVE INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA	# →‎ئ‎→→‎ٸ‎→→‎يٴ‎→
+FE8C ;	0649 0674 ;	MA	# ( ‎ﺌ‎ → ‎ىٴ‎ ) ARABIC LETTER YEH WITH HAMZA ABOVE MEDIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA	# →‎ئ‎→→‎ٸ‎→→‎يٴ‎→
+FE8A ;	0649 0674 ;	MA	# ( ‎ﺊ‎ → ‎ىٴ‎ ) ARABIC LETTER YEH WITH HAMZA ABOVE FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA	# →‎ئ‎→→‎ٸ‎→→‎يٴ‎→
+FE89 ;	0649 0674 ;	MA	# ( ‎ﺉ‎ → ‎ىٴ‎ ) ARABIC LETTER YEH WITH HAMZA ABOVE ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA	# →‎ٸ‎→→‎يٴ‎→
+0678 ;	0649 0674 ;	MA	# ( ‎ٸ‎ → ‎ىٴ‎ ) ARABIC LETTER HIGH HAMZA YEH → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA	# →‎يٴ‎→
+
+FBEB ;	0649 0674 006C ;	MA	# ( ‎ﯫ‎ → ‎ىٴl‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, LATIN SMALL LETTER L	# →‎ئا‎→
+FBEA ;	0649 0674 006C ;	MA	# ( ‎ﯪ‎ → ‎ىٴl‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, LATIN SMALL LETTER L	# →‎ئا‎→
+
+FC9B ;	0649 0674 006F ;	MA	# ( ‎ﲛ‎ → ‎ىٴo‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HEH INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, LATIN SMALL LETTER O	# →‎ئه‎→
+FCE0 ;	0649 0674 006F ;	MA	# ( ‎ﳠ‎ → ‎ىٴo‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HEH MEDIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, LATIN SMALL LETTER O	# →‎ئه‎→
+FBED ;	0649 0674 006F ;	MA	# ( ‎ﯭ‎ → ‎ىٴo‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH AE FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, LATIN SMALL LETTER O	# →‎ئە‎→→‎ٴىo‎→→‎ئه‎→
+FBEC ;	0649 0674 006F ;	MA	# ( ‎ﯬ‎ → ‎ىٴo‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH AE ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, LATIN SMALL LETTER O	# →‎ئە‎→→‎ٴىo‎→→‎ئه‎→
+
+FBF8 ;	0649 0674 067B ;	MA	# ( ‎ﯸ‎ → ‎ىٴٻ‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER BEEH	# →‎ئې‎→
+FBF7 ;	0649 0674 067B ;	MA	# ( ‎ﯷ‎ → ‎ىٴٻ‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER BEEH	# →‎ئې‎→
+FBF6 ;	0649 0674 067B ;	MA	# ( ‎ﯶ‎ → ‎ىٴٻ‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER BEEH	# →‎ئې‎→
+
+FC97 ;	0649 0674 062C ;	MA	# ( ‎ﲗ‎ → ‎ىٴج‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH JEEM INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER JEEM	# →‎ئج‎→
+FC00 ;	0649 0674 062C ;	MA	# ( ‎ﰀ‎ → ‎ىٴج‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH JEEM ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER JEEM	# →‎ئج‎→
+
+FC98 ;	0649 0674 062D ;	MA	# ( ‎ﲘ‎ → ‎ىٴح‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HAH INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER HAH	# →‎ئح‎→
+FC01 ;	0649 0674 062D ;	MA	# ( ‎ﰁ‎ → ‎ىٴح‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HAH ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER HAH	# →‎ئح‎→
+
+FC99 ;	0649 0674 062E ;	MA	# ( ‎ﲙ‎ → ‎ىٴخ‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH KHAH INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER KHAH	# →‎ئخ‎→
+
+FC64 ;	0649 0674 0631 ;	MA	# ( ‎ﱤ‎ → ‎ىٴر‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH REH FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER REH	# →‎ئر‎→
+
+FC65 ;	0649 0674 0632 ;	MA	# ( ‎ﱥ‎ → ‎ىٴز‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ZAIN FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER ZAIN	# →‎ئز‎→
+
+FC9A ;	0649 0674 0645 ;	MA	# ( ‎ﲚ‎ → ‎ىٴم‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER MEEM	# →‎ئم‎→
+FCDF ;	0649 0674 0645 ;	MA	# ( ‎ﳟ‎ → ‎ىٴم‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM MEDIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER MEEM	# →‎ئم‎→
+FC66 ;	0649 0674 0645 ;	MA	# ( ‎ﱦ‎ → ‎ىٴم‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER MEEM	# →‎ئم‎→
+FC02 ;	0649 0674 0645 ;	MA	# ( ‎ﰂ‎ → ‎ىٴم‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER MEEM	# →‎ئم‎→
+
+FC67 ;	0649 0674 0646 ;	MA	# ( ‎ﱧ‎ → ‎ىٴن‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH NOON FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER NOON	# →‎ئن‎→
+
+FBEF ;	0649 0674 0648 ;	MA	# ( ‎ﯯ‎ → ‎ىٴو‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH WAW FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER WAW	# →‎ئو‎→
+FBEE ;	0649 0674 0648 ;	MA	# ( ‎ﯮ‎ → ‎ىٴو‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH WAW ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER WAW	# →‎ئو‎→
+
+FBF1 ;	0649 0674 0648 0313 ;	MA	# ( ‎ﯱ‎ → ‎ىٴو̓‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH U FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER WAW, COMBINING COMMA ABOVE	# →‎ئۇ‎→
+FBF0 ;	0649 0674 0648 0313 ;	MA	# ( ‎ﯰ‎ → ‎ىٴو̓‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH U ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER WAW, COMBINING COMMA ABOVE	# →‎ئۇ‎→
+
+FBF3 ;	0649 0674 0648 0306 ;	MA	# ( ‎ﯳ‎ → ‎ىٴو̆‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH OE FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER WAW, COMBINING BREVE	# →‎ئۆ‎→
+FBF2 ;	0649 0674 0648 0306 ;	MA	# ( ‎ﯲ‎ → ‎ىٴو̆‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH OE ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER WAW, COMBINING BREVE	# →‎ئۆ‎→
+
+FBF5 ;	0649 0674 0648 0670 ;	MA	# ( ‎ﯵ‎ → ‎ىٴوٰ‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YU FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER WAW, ARABIC LETTER SUPERSCRIPT ALEF	# →‎ئۈ‎→
+FBF4 ;	0649 0674 0648 0670 ;	MA	# ( ‎ﯴ‎ → ‎ىٴوٰ‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YU ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER WAW, ARABIC LETTER SUPERSCRIPT ALEF	# →‎ئۈ‎→
+
+FBFB ;	0649 0674 0649 ;	MA	# ( ‎ﯻ‎ → ‎ىٴى‎ ) ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER ALEF MAKSURA	# →‎ئى‎→
+FBFA ;	0649 0674 0649 ;	MA	# ( ‎ﯺ‎ → ‎ىٴى‎ ) ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER ALEF MAKSURA	# →‎ئى‎→
+FC68 ;	0649 0674 0649 ;	MA	# ( ‎ﱨ‎ → ‎ىٴى‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER ALEF MAKSURA	# →‎ئى‎→
+FBF9 ;	0649 0674 0649 ;	MA	# ( ‎ﯹ‎ → ‎ىٴى‎ ) ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER ALEF MAKSURA	# →‎ئى‎→
+FC03 ;	0649 0674 0649 ;	MA	# ( ‎ﰃ‎ → ‎ىٴى‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER ALEF MAKSURA	# →‎ئى‎→
+FC69 ;	0649 0674 0649 ;	MA	# ( ‎ﱩ‎ → ‎ىٴى‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YEH FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER ALEF MAKSURA	# →‎ئي‎→→‎ٴىى‎→→‎ئى‎→
+FC04 ;	0649 0674 0649 ;	MA	# ( ‎ﰄ‎ → ‎ىٴى‎ ) ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YEH ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HIGH HAMZA, ARABIC LETTER ALEF MAKSURA	# →‎ئي‎→→‎ٴىى‎→→‎ئى‎→
+
+FCDA ;	0649 062C ;	MA	# ( ‎ﳚ‎ → ‎ىج‎ ) ARABIC LIGATURE YEH WITH JEEM INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER JEEM	# →‎يج‎→
+FC55 ;	0649 062C ;	MA	# ( ‎ﱕ‎ → ‎ىج‎ ) ARABIC LIGATURE YEH WITH JEEM ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER JEEM	# →‎يج‎→
+
+FC11 ;	0649 06DB 062C ;	MA	# ( ‎ﰑ‎ → ‎ىۛج‎ ) ARABIC LIGATURE THEH WITH JEEM ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER JEEM	# →‎ثج‎→
+
+FDAF ;	0649 062C 0649 ;	MA	# ( ‎ﶯ‎ → ‎ىجى‎ ) ARABIC LIGATURE YEH WITH JEEM WITH YEH FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER JEEM, ARABIC LETTER ALEF MAKSURA	# →‎يجي‎→
+
+FCDB ;	0649 062D ;	MA	# ( ‎ﳛ‎ → ‎ىح‎ ) ARABIC LIGATURE YEH WITH HAH INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HAH	# →‎يح‎→
+FC56 ;	0649 062D ;	MA	# ( ‎ﱖ‎ → ‎ىح‎ ) ARABIC LIGATURE YEH WITH HAH ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HAH	# →‎يح‎→
+
+FDAE ;	0649 062D 0649 ;	MA	# ( ‎ﶮ‎ → ‎ىحى‎ ) ARABIC LIGATURE YEH WITH HAH WITH YEH FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER HAH, ARABIC LETTER ALEF MAKSURA	# →‎يحي‎→
+
+FCDC ;	0649 062E ;	MA	# ( ‎ﳜ‎ → ‎ىخ‎ ) ARABIC LIGATURE YEH WITH KHAH INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER KHAH	# →‎يخ‎→
+FC57 ;	0649 062E ;	MA	# ( ‎ﱗ‎ → ‎ىخ‎ ) ARABIC LIGATURE YEH WITH KHAH ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER KHAH	# →‎يخ‎→
+
+FC91 ;	0649 0631 ;	MA	# ( ‎ﲑ‎ → ‎ىر‎ ) ARABIC LIGATURE YEH WITH REH FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER REH	# →‎ير‎→
+
+FC76 ;	0649 06DB 0631 ;	MA	# ( ‎ﱶ‎ → ‎ىۛر‎ ) ARABIC LIGATURE THEH WITH REH FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER REH	# →‎ثر‎→
+
+FC92 ;	0649 0632 ;	MA	# ( ‎ﲒ‎ → ‎ىز‎ ) ARABIC LIGATURE YEH WITH ZAIN FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER ZAIN	# →‎يز‎→
+
+FC77 ;	0649 06DB 0632 ;	MA	# ( ‎ﱷ‎ → ‎ىۛز‎ ) ARABIC LIGATURE THEH WITH ZAIN FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER ZAIN	# →‎ثز‎→
+
+FCDD ;	0649 0645 ;	MA	# ( ‎ﳝ‎ → ‎ىم‎ ) ARABIC LIGATURE YEH WITH MEEM INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER MEEM	# →‎يم‎→
+FCF0 ;	0649 0645 ;	MA	# ( ‎ﳰ‎ → ‎ىم‎ ) ARABIC LIGATURE YEH WITH MEEM MEDIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER MEEM	# →‎يم‎→
+FC93 ;	0649 0645 ;	MA	# ( ‎ﲓ‎ → ‎ىم‎ ) ARABIC LIGATURE YEH WITH MEEM FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER MEEM	# →‎يم‎→
+FC58 ;	0649 0645 ;	MA	# ( ‎ﱘ‎ → ‎ىم‎ ) ARABIC LIGATURE YEH WITH MEEM ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER MEEM	# →‎يم‎→
+
+FCA6 ;	0649 06DB 0645 ;	MA	# ( ‎ﲦ‎ → ‎ىۛم‎ ) ARABIC LIGATURE THEH WITH MEEM INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER MEEM	# →‎ثم‎→
+FCE5 ;	0649 06DB 0645 ;	MA	# ( ‎ﳥ‎ → ‎ىۛم‎ ) ARABIC LIGATURE THEH WITH MEEM MEDIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER MEEM	# →‎ثم‎→
+FC78 ;	0649 06DB 0645 ;	MA	# ( ‎ﱸ‎ → ‎ىۛم‎ ) ARABIC LIGATURE THEH WITH MEEM FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER MEEM	# →‎ثم‎→
+FC12 ;	0649 06DB 0645 ;	MA	# ( ‎ﰒ‎ → ‎ىۛم‎ ) ARABIC LIGATURE THEH WITH MEEM ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER MEEM	# →‎ثم‎→
+
+FD9D ;	0649 0645 0645 ;	MA	# ( ‎ﶝ‎ → ‎ىمم‎ ) ARABIC LIGATURE YEH WITH MEEM WITH MEEM INITIAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER MEEM, ARABIC LETTER MEEM	# →‎يمم‎→
+FD9C ;	0649 0645 0645 ;	MA	# ( ‎ﶜ‎ → ‎ىمم‎ ) ARABIC LIGATURE YEH WITH MEEM WITH MEEM FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER MEEM, ARABIC LETTER MEEM	# →‎يمم‎→
+
+FDB0 ;	0649 0645 0649 ;	MA	# ( ‎ﶰ‎ → ‎ىمى‎ ) ARABIC LIGATURE YEH WITH MEEM WITH YEH FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER MEEM, ARABIC LETTER ALEF MAKSURA	# →‎يمي‎→
+
+FC94 ;	0649 0646 ;	MA	# ( ‎ﲔ‎ → ‎ىن‎ ) ARABIC LIGATURE YEH WITH NOON FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER NOON	# →‎ين‎→
+
+FC79 ;	0649 06DB 0646 ;	MA	# ( ‎ﱹ‎ → ‎ىۛن‎ ) ARABIC LIGATURE THEH WITH NOON FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER NOON	# →‎ثن‎→
+
+FC95 ;	0649 0649 ;	MA	# ( ‎ﲕ‎ → ‎ىى‎ ) ARABIC LIGATURE YEH WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER ALEF MAKSURA	# →‎يى‎→
+FC59 ;	0649 0649 ;	MA	# ( ‎ﱙ‎ → ‎ىى‎ ) ARABIC LIGATURE YEH WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER ALEF MAKSURA	# →‎يى‎→
+FC96 ;	0649 0649 ;	MA	# ( ‎ﲖ‎ → ‎ىى‎ ) ARABIC LIGATURE YEH WITH YEH FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER ALEF MAKSURA	# →‎يي‎→
+FC5A ;	0649 0649 ;	MA	# ( ‎ﱚ‎ → ‎ىى‎ ) ARABIC LIGATURE YEH WITH YEH ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC LETTER ALEF MAKSURA	# →‎يي‎→
+
+FC7A ;	0649 06DB 0649 ;	MA	# ( ‎ﱺ‎ → ‎ىۛى‎ ) ARABIC LIGATURE THEH WITH ALEF MAKSURA FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER ALEF MAKSURA	# →‎ثى‎→
+FC13 ;	0649 06DB 0649 ;	MA	# ( ‎ﰓ‎ → ‎ىۛى‎ ) ARABIC LIGATURE THEH WITH ALEF MAKSURA ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER ALEF MAKSURA	# →‎ثى‎→
+FC7B ;	0649 06DB 0649 ;	MA	# ( ‎ﱻ‎ → ‎ىۛى‎ ) ARABIC LIGATURE THEH WITH YEH FINAL FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER ALEF MAKSURA	# →‎ثي‎→
+FC14 ;	0649 06DB 0649 ;	MA	# ( ‎ﰔ‎ → ‎ىۛى‎ ) ARABIC LIGATURE THEH WITH YEH ISOLATED FORM → ARABIC LETTER ALEF MAKSURA, ARABIC SMALL HIGH THREE DOTS, ARABIC LETTER ALEF MAKSURA	# →‎ثي‎→
+
+FBB1 ;	06D3 ;	MA	# ( ‎ﮱ‎ → ‎ۓ‎ ) ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM → ARABIC LETTER YEH BARREE WITH HAMZA ABOVE	# 
+FBB0 ;	06D3 ;	MA	# ( ‎ﮰ‎ → ‎ۓ‎ ) ARABIC LETTER YEH BARREE WITH HAMZA ABOVE ISOLATED FORM → ARABIC LETTER YEH BARREE WITH HAMZA ABOVE	# 
+
+102B8 ;	2D40 ;	MA	# ( 𐊸 → ⵀ ) CARIAN LETTER SS → TIFINAGH LETTER YAH	# 
+
+205E ;	2D42 ;	MA	#* ( ⁞ → ⵂ ) VERTICAL FOUR DOTS → TIFINAGH LETTER TUAREG YAH	# 
+2E3D ;	2D42 ;	MA	#* ( ⸽ → ⵂ ) VERTICAL SIX DOTS → TIFINAGH LETTER TUAREG YAH	# →⁞→
+2999 ;	2D42 ;	MA	#* ( ⦙ → ⵂ ) DOTTED FENCE → TIFINAGH LETTER TUAREG YAH	# →⁞→
+
+FE19 ;	2D57 ;	MA	#* ( ︙ → ⵗ ) PRESENTATION FORM FOR VERTICAL HORIZONTAL ELLIPSIS → TIFINAGH LETTER TUAREG YAGH	# →⁝→
+205D ;	2D57 ;	MA	#* ( ⁝ → ⵗ ) TRICOLON → TIFINAGH LETTER TUAREG YAGH	# 
+22EE ;	2D57 ;	MA	#* ( ⋮ → ⵗ ) VERTICAL ELLIPSIS → TIFINAGH LETTER TUAREG YAGH	# →︙→→⁝→
+
+0544 ;	1206 ;	MA	# ( Մ → ሆ ) ARMENIAN CAPITAL LETTER MEN → ETHIOPIC SYLLABLE HO	# 
+
+054C ;	1261 ;	MA	# ( Ռ → ቡ ) ARMENIAN CAPITAL LETTER RA → ETHIOPIC SYLLABLE BU	# 
+
+053B ;	12AE ;	MA	# ( Ի → ኮ ) ARMENIAN CAPITAL LETTER INI → ETHIOPIC SYLLABLE KO	# 
+
+054A ;	1323 ;	MA	# ( Պ → ጣ ) ARMENIAN CAPITAL LETTER PEH → ETHIOPIC SYLLABLE THAA	# 
+
+0906 ;	0905 093E ;	MA	# ( आ → अा ) DEVANAGARI LETTER AA → DEVANAGARI LETTER A, DEVANAGARI VOWEL SIGN AA	# 
+
+0912 ;	0905 093E 0946 ;	MA	# ( ऒ → अाॆ ) DEVANAGARI LETTER SHORT O → DEVANAGARI LETTER A, DEVANAGARI VOWEL SIGN AA, DEVANAGARI VOWEL SIGN SHORT E	# →अॊ→→आॆ→
+
+0913 ;	0905 093E 0947 ;	MA	# ( ओ → अाे ) DEVANAGARI LETTER O → DEVANAGARI LETTER A, DEVANAGARI VOWEL SIGN AA, DEVANAGARI VOWEL SIGN E	# →अो→→आे→
+
+0914 ;	0905 093E 0948 ;	MA	# ( औ → अाै ) DEVANAGARI LETTER AU → DEVANAGARI LETTER A, DEVANAGARI VOWEL SIGN AA, DEVANAGARI VOWEL SIGN AI	# →अौ→→आै→
+
+0904 ;	0905 0946 ;	MA	# ( ऄ → अॆ ) DEVANAGARI LETTER SHORT A → DEVANAGARI LETTER A, DEVANAGARI VOWEL SIGN SHORT E	# 
+
+0911 ;	0905 0949 ;	MA	# ( ऑ → अॉ ) DEVANAGARI LETTER CANDRA O → DEVANAGARI LETTER A, DEVANAGARI VOWEL SIGN CANDRA O	# 
+
+090D ;	090F 0945 ;	MA	# ( ऍ → एॅ ) DEVANAGARI LETTER CANDRA E → DEVANAGARI LETTER E, DEVANAGARI VOWEL SIGN CANDRA E	# 
+
+090E ;	090F 0946 ;	MA	# ( ऎ → एॆ ) DEVANAGARI LETTER SHORT E → DEVANAGARI LETTER E, DEVANAGARI VOWEL SIGN SHORT E	# 
+
+0910 ;	090F 0947 ;	MA	# ( ऐ → एे ) DEVANAGARI LETTER AI → DEVANAGARI LETTER E, DEVANAGARI VOWEL SIGN E	# 
+
+0908 ;	0930 094D 0907 ;	MA	# ( ई → र्इ ) DEVANAGARI LETTER II → DEVANAGARI LETTER RA, DEVANAGARI SIGN VIRAMA, DEVANAGARI LETTER I	# 
+
+0ABD ;	093D ;	MA	# ( ઽ → ऽ ) GUJARATI SIGN AVAGRAHA → DEVANAGARI SIGN AVAGRAHA	# 
+
+111DC ;	A8FB ;	MA	# ( 𑇜 → ꣻ ) SHARADA HEADSTROKE → DEVANAGARI HEADSTROKE	# 
+
+111CB ;	093A ;	MA	# ( 𑇋 → ऺ ) SHARADA VOWEL MODIFIER MARK → DEVANAGARI VOWEL SIGN OE	# 
+
+0AC1 ;	0941 ;	MA	# ( ુ → ु ) GUJARATI VOWEL SIGN U → DEVANAGARI VOWEL SIGN U	# 
+
+0AC2 ;	0942 ;	MA	# ( ૂ → ू ) GUJARATI VOWEL SIGN UU → DEVANAGARI VOWEL SIGN UU	# 
+
+0A4B ;	0946 ;	MA	# ( ੋ → ॆ ) GURMUKHI VOWEL SIGN OO → DEVANAGARI VOWEL SIGN SHORT E	# 
+
+0A4D ;	094D ;	MA	# ( ੍ → ् ) GURMUKHI SIGN VIRAMA → DEVANAGARI SIGN VIRAMA	# 
+0ACD ;	094D ;	MA	# ( ્ → ् ) GUJARATI SIGN VIRAMA → DEVANAGARI SIGN VIRAMA	# 
+
+0986 ;	0985 09BE ;	MA	# ( আ → অা ) BENGALI LETTER AA → BENGALI LETTER A, BENGALI VOWEL SIGN AA	# 
+
+09E0 ;	098B 09C3 ;	MA	# ( ৠ → ঋৃ ) BENGALI LETTER VOCALIC RR → BENGALI LETTER VOCALIC R, BENGALI VOWEL SIGN VOCALIC R	# 
+09E1 ;	098B 09C3 ;	MA	# ( ৡ → ঋৃ ) BENGALI LETTER VOCALIC LL → BENGALI LETTER VOCALIC R, BENGALI VOWEL SIGN VOCALIC R	# →ঌৢ→→ৠ→
+
+11492 ;	0998 ;	MA	# ( 𑒒 → ঘ ) TIRHUTA LETTER GHA → BENGALI LETTER GHA	# 
+
+11494 ;	099A ;	MA	# ( 𑒔 → চ ) TIRHUTA LETTER CA → BENGALI LETTER CA	# 
+
+11496 ;	099C ;	MA	# ( 𑒖 → জ ) TIRHUTA LETTER JA → BENGALI LETTER JA	# 
+
+11498 ;	099E ;	MA	# ( 𑒘 → ঞ ) TIRHUTA LETTER NYA → BENGALI LETTER NYA	# 
+
+11499 ;	099F ;	MA	# ( 𑒙 → ট ) TIRHUTA LETTER TTA → BENGALI LETTER TTA	# 
+
+1149B ;	09A1 ;	MA	# ( 𑒛 → ড ) TIRHUTA LETTER DDA → BENGALI LETTER DDA	# 
+
+114AA ;	09A3 ;	MA	# ( 𑒪 → ণ ) TIRHUTA LETTER LA → BENGALI LETTER NNA	# 
+
+1149E ;	09A4 ;	MA	# ( 𑒞 → ত ) TIRHUTA LETTER TA → BENGALI LETTER TA	# 
+
+1149F ;	09A5 ;	MA	# ( 𑒟 → থ ) TIRHUTA LETTER THA → BENGALI LETTER THA	# 
+
+114A0 ;	09A6 ;	MA	# ( 𑒠 → দ ) TIRHUTA LETTER DA → BENGALI LETTER DA	# 
+
+114A1 ;	09A7 ;	MA	# ( 𑒡 → ধ ) TIRHUTA LETTER DHA → BENGALI LETTER DHA	# 
+
+114A2 ;	09A8 ;	MA	# ( 𑒢 → ন ) TIRHUTA LETTER NA → BENGALI LETTER NA	# 
+
+114A3 ;	09AA ;	MA	# ( 𑒣 → প ) TIRHUTA LETTER PA → BENGALI LETTER PA	# 
+
+114A9 ;	09AC ;	MA	# ( 𑒩 → ব ) TIRHUTA LETTER RA → BENGALI LETTER BA	# 
+
+114A7 ;	09AE ;	MA	# ( 𑒧 → ম ) TIRHUTA LETTER MA → BENGALI LETTER MA	# 
+
+114A8 ;	09AF ;	MA	# ( 𑒨 → য ) TIRHUTA LETTER YA → BENGALI LETTER YA	# 
+
+114AB ;	09B0 ;	MA	# ( 𑒫 → র ) TIRHUTA LETTER VA → BENGALI LETTER RA	# 
+
+1149D ;	09B2 ;	MA	# ( 𑒝 → ল ) TIRHUTA LETTER NNA → BENGALI LETTER LA	# 
+
+114AD ;	09B7 ;	MA	# ( 𑒭 → ষ ) TIRHUTA LETTER SSA → BENGALI LETTER SSA	# 
+
+114AE ;	09B8 ;	MA	# ( 𑒮 → স ) TIRHUTA LETTER SA → BENGALI LETTER SA	# 
+
+114C4 ;	09BD ;	MA	# ( 𑓄 → ঽ ) TIRHUTA SIGN AVAGRAHA → BENGALI SIGN AVAGRAHA	# 
+
+114B0 ;	09BE ;	MA	# ( 𑒰 → া ) TIRHUTA VOWEL SIGN AA → BENGALI VOWEL SIGN AA	# 
+
+114B1 ;	09BF ;	MA	# ( 𑒱 → ি ) TIRHUTA VOWEL SIGN I → BENGALI VOWEL SIGN I	# 
+
+114B9 ;	09C7 ;	MA	# ( 𑒹 → ে ) TIRHUTA VOWEL SIGN E → BENGALI VOWEL SIGN E	# 
+
+114BC ;	09CB ;	MA	# ( 𑒼 → ো ) TIRHUTA VOWEL SIGN O → BENGALI VOWEL SIGN O	# 
+
+114BE ;	09CC ;	MA	# ( 𑒾 → ৌ ) TIRHUTA VOWEL SIGN AU → BENGALI VOWEL SIGN AU	# 
+
+114C2 ;	09CD ;	MA	# ( 𑓂 → ্ ) TIRHUTA SIGN VIRAMA → BENGALI SIGN VIRAMA	# 
+
+114BD ;	09D7 ;	MA	# ( 𑒽 → ৗ ) TIRHUTA VOWEL SIGN SHORT O → BENGALI AU LENGTH MARK	# 
+
+0A09 ;	0A73 0A41 ;	MA	# ( ਉ → ੳੁ ) GURMUKHI LETTER U → GURMUKHI URA, GURMUKHI VOWEL SIGN U	# 
+
+0A0A ;	0A73 0A42 ;	MA	# ( ਊ → ੳੂ ) GURMUKHI LETTER UU → GURMUKHI URA, GURMUKHI VOWEL SIGN UU	# 
+
+0A06 ;	0A05 0A3E ;	MA	# ( ਆ → ਅਾ ) GURMUKHI LETTER AA → GURMUKHI LETTER A, GURMUKHI VOWEL SIGN AA	# 
+
+0A10 ;	0A05 0A48 ;	MA	# ( ਐ → ਅੈ ) GURMUKHI LETTER AI → GURMUKHI LETTER A, GURMUKHI VOWEL SIGN AI	# 
+
+0A14 ;	0A05 0A4C ;	MA	# ( ਔ → ਅੌ ) GURMUKHI LETTER AU → GURMUKHI LETTER A, GURMUKHI VOWEL SIGN AU	# 
+
+0A07 ;	0A72 0A3F ;	MA	# ( ਇ → ੲਿ ) GURMUKHI LETTER I → GURMUKHI IRI, GURMUKHI VOWEL SIGN I	# 
+
+0A08 ;	0A72 0A40 ;	MA	# ( ਈ → ੲੀ ) GURMUKHI LETTER II → GURMUKHI IRI, GURMUKHI VOWEL SIGN II	# 
+
+0A0F ;	0A72 0A47 ;	MA	# ( ਏ → ੲੇ ) GURMUKHI LETTER EE → GURMUKHI IRI, GURMUKHI VOWEL SIGN EE	# 
+
+0A86 ;	0A85 0ABE ;	MA	# ( આ → અા ) GUJARATI LETTER AA → GUJARATI LETTER A, GUJARATI VOWEL SIGN AA	# 
+
+0A91 ;	0A85 0ABE 0AC5 ;	MA	# ( ઑ → અાૅ ) GUJARATI VOWEL CANDRA O → GUJARATI LETTER A, GUJARATI VOWEL SIGN AA, GUJARATI VOWEL SIGN CANDRA E	# →અૉ→→આૅ→
+
+0A93 ;	0A85 0ABE 0AC7 ;	MA	# ( ઓ → અાે ) GUJARATI LETTER O → GUJARATI LETTER A, GUJARATI VOWEL SIGN AA, GUJARATI VOWEL SIGN E	# →અો→→આે→
+
+0A94 ;	0A85 0ABE 0AC8 ;	MA	# ( ઔ → અાૈ ) GUJARATI LETTER AU → GUJARATI LETTER A, GUJARATI VOWEL SIGN AA, GUJARATI VOWEL SIGN AI	# →અૌ→→આૈ→
+
+0A8D ;	0A85 0AC5 ;	MA	# ( ઍ → અૅ ) GUJARATI VOWEL CANDRA E → GUJARATI LETTER A, GUJARATI VOWEL SIGN CANDRA E	# 
+
+0A8F ;	0A85 0AC7 ;	MA	# ( એ → અે ) GUJARATI LETTER E → GUJARATI LETTER A, GUJARATI VOWEL SIGN E	# 
+
+0A90 ;	0A85 0AC8 ;	MA	# ( ઐ → અૈ ) GUJARATI LETTER AI → GUJARATI LETTER A, GUJARATI VOWEL SIGN AI	# 
+
+0B06 ;	0B05 0B3E ;	MA	# ( ଆ → ଅା ) ORIYA LETTER AA → ORIYA LETTER A, ORIYA VOWEL SIGN AA	# 
+
+0BEE ;	0B85 ;	MA	# ( ௮ → அ ) TAMIL DIGIT EIGHT → TAMIL LETTER A	# 
+
+0BB0 ;	0B88 ;	MA	# ( ர → ஈ ) TAMIL LETTER RA → TAMIL LETTER II	# →ா→
+0BBE ;	0B88 ;	MA	# ( ா → ஈ ) TAMIL VOWEL SIGN AA → TAMIL LETTER II	# 
+
+0BEB ;	0B88 0BC1 ;	MA	# ( ௫ → ஈு ) TAMIL DIGIT FIVE → TAMIL LETTER II, TAMIL VOWEL SIGN U	# →ரு→
+
+0BE8 ;	0B89 ;	MA	# ( ௨ → உ ) TAMIL DIGIT TWO → TAMIL LETTER U	# 
+0D09 ;	0B89 ;	MA	# ( ഉ → உ ) MALAYALAM LETTER U → TAMIL LETTER U	# 
+
+0B8A ;	0B89 0BB3 ;	MA	# ( ஊ → உள ) TAMIL LETTER UU → TAMIL LETTER U, TAMIL LETTER LLA	# 
+
+0D0A ;	0B89 0D57 ;	MA	# ( ഊ → உൗ ) MALAYALAM LETTER UU → TAMIL LETTER U, MALAYALAM AU LENGTH MARK	# →ഉൗ→
+
+0BED ;	0B8E ;	MA	# ( ௭ → எ ) TAMIL DIGIT SEVEN → TAMIL LETTER E	# 
+
+0BF7 ;	0B8E 0BB5 ;	MA	#* ( ௷ → எவ ) TAMIL CREDIT SIGN → TAMIL LETTER E, TAMIL LETTER VA	# 
+
+0B9C ;	0B90 ;	MA	# ( ஜ → ஐ ) TAMIL LETTER JA → TAMIL LETTER AI	# 
+0D1C ;	0B90 ;	MA	# ( ജ → ஐ ) MALAYALAM LETTER JA → TAMIL LETTER AI	# →ஜ→
+
+0BE7 ;	0B95 ;	MA	# ( ௧ → க ) TAMIL DIGIT ONE → TAMIL LETTER KA	# 
+
+0BEA ;	0B9A ;	MA	# ( ௪ → ச ) TAMIL DIGIT FOUR → TAMIL LETTER CA	# 
+
+0BEC ;	0B9A 0BC1 ;	MA	# ( ௬ → சு ) TAMIL DIGIT SIX → TAMIL LETTER CA, TAMIL VOWEL SIGN U	# 
+
+0BF2 ;	0B9A 0BC2 ;	MA	#* ( ௲ → சூ ) TAMIL NUMBER ONE THOUSAND → TAMIL LETTER CA, TAMIL VOWEL SIGN UU	# 
+
+0D3A ;	0B9F 0BBF ;	MA	# ( ഺ → டி ) MALAYALAM LETTER TTTA → TAMIL LETTER TTA, TAMIL VOWEL SIGN I	# 
+
+0D23 ;	0BA3 ;	MA	# ( ണ → ண ) MALAYALAM LETTER NNA → TAMIL LETTER NNA	# 
+
+0BFA ;	0BA8 0BC0 ;	MA	#* ( ௺ → நீ ) TAMIL NUMBER SIGN → TAMIL LETTER NA, TAMIL VOWEL SIGN II	# 
+
+0BF4 ;	0BAE 0BC0 ;	MA	#* ( ௴ → மீ ) TAMIL MONTH SIGN → TAMIL LETTER MA, TAMIL VOWEL SIGN II	# 
+
+0BF0 ;	0BAF ;	MA	#* ( ௰ → ய ) TAMIL NUMBER TEN → TAMIL LETTER YA	# 
+
+0D34 ;	0BB4 ;	MA	# ( ഴ → ழ ) MALAYALAM LETTER LLLA → TAMIL LETTER LLLA	# 
+
+0BD7 ;	0BB3 ;	MA	# ( ௗ → ள ) TAMIL AU LENGTH MARK → TAMIL LETTER LLA	# 
+
+0BC8 ;	0BA9 ;	MA	# ( ை → ன ) TAMIL VOWEL SIGN AI → TAMIL LETTER NNNA	# 
+
+0D36 ;	0BB6 ;	MA	# ( ശ → ஶ ) MALAYALAM LETTER SHA → TAMIL LETTER SHA	# 
+
+0BF8 ;	0BB7 ;	MA	#* ( ௸ → ஷ ) TAMIL AS ABOVE SIGN → TAMIL LETTER SSA	# 
+
+0D3F ;	0BBF ;	MA	# ( ി → ி ) MALAYALAM VOWEL SIGN I → TAMIL VOWEL SIGN I	# 
+0D40 ;	0BBF ;	MA	# ( ീ → ி ) MALAYALAM VOWEL SIGN II → TAMIL VOWEL SIGN I	# 
+
+0BCA ;	0BC6 0B88 ;	MA	# ( ொ → ெஈ ) TAMIL VOWEL SIGN O → TAMIL VOWEL SIGN E, TAMIL LETTER II	# →ெர→
+
+0BCC ;	0BC6 0BB3 ;	MA	# ( ௌ → ெள ) TAMIL VOWEL SIGN AU → TAMIL VOWEL SIGN E, TAMIL LETTER LLA	# 
+
+0BCB ;	0BC7 0B88 ;	MA	# ( ோ → ேஈ ) TAMIL VOWEL SIGN OO → TAMIL VOWEL SIGN EE, TAMIL LETTER II	# →ேர→
+
+0C85 ;	0C05 ;	MA	# ( ಅ → అ ) KANNADA LETTER A → TELUGU LETTER A	# 
+
+0C86 ;	0C06 ;	MA	# ( ಆ → ఆ ) KANNADA LETTER AA → TELUGU LETTER AA	# 
+
+0C87 ;	0C07 ;	MA	# ( ಇ → ఇ ) KANNADA LETTER I → TELUGU LETTER I	# 
+
+0C60 ;	0C0B 0C3E ;	MA	# ( ౠ → ఋా ) TELUGU LETTER VOCALIC RR → TELUGU LETTER VOCALIC R, TELUGU VOWEL SIGN AA	# 
+
+0C61 ;	0C0C 0C3E ;	MA	# ( ౡ → ఌా ) TELUGU LETTER VOCALIC LL → TELUGU LETTER VOCALIC L, TELUGU VOWEL SIGN AA	# 
+
+0C92 ;	0C12 ;	MA	# ( ಒ → ఒ ) KANNADA LETTER O → TELUGU LETTER O	# 
+
+0C14 ;	0C12 0C4C ;	MA	# ( ఔ → ఒౌ ) TELUGU LETTER AU → TELUGU LETTER O, TELUGU VOWEL SIGN AU	# 
+0C94 ;	0C12 0C4C ;	MA	# ( ಔ → ఒౌ ) KANNADA LETTER AU → TELUGU LETTER O, TELUGU VOWEL SIGN AU	# →ఔ→
+
+0C13 ;	0C12 0C55 ;	MA	# ( ఓ → ఒౕ ) TELUGU LETTER OO → TELUGU LETTER O, TELUGU LENGTH MARK	# 
+0C93 ;	0C12 0C55 ;	MA	# ( ಓ → ఒౕ ) KANNADA LETTER OO → TELUGU LETTER O, TELUGU LENGTH MARK	# →ఓ→
+
+0C9C ;	0C1C ;	MA	# ( ಜ → జ ) KANNADA LETTER JA → TELUGU LETTER JA	# 
+
+0C9E ;	0C1E ;	MA	# ( ಞ → ఞ ) KANNADA LETTER NYA → TELUGU LETTER NYA	# 
+
+0C22 ;	0C21 0323 ;	MA	# ( ఢ → డ̣ ) TELUGU LETTER DDHA → TELUGU LETTER DDA, COMBINING DOT BELOW	# 
+
+0CA3 ;	0C23 ;	MA	# ( ಣ → ణ ) KANNADA LETTER NNA → TELUGU LETTER NNA	# 
+
+0C25 ;	0C27 05BC ;	MA	# ( థ → ధּ ) TELUGU LETTER THA → TELUGU LETTER DHA, HEBREW POINT DAGESH OR MAPIQ	# 
+
+0C2D ;	0C2C 0323 ;	MA	# ( భ → బ̣ ) TELUGU LETTER BHA → TELUGU LETTER BA, COMBINING DOT BELOW	# 
+
+0CAF ;	0C2F ;	MA	# ( ಯ → య ) KANNADA LETTER YA → TELUGU LETTER YA	# 
+
+0C20 ;	0C30 05BC ;	MA	# ( ఠ → రּ ) TELUGU LETTER TTHA → TELUGU LETTER RA, HEBREW POINT DAGESH OR MAPIQ	# 
+
+0CB1 ;	0C31 ;	MA	# ( ಱ → ఱ ) KANNADA LETTER RRA → TELUGU LETTER RRA	# 
+
+0CB2 ;	0C32 ;	MA	# ( ಲ → ల ) KANNADA LETTER LA → TELUGU LETTER LA	# 
+
+0C37 ;	0C35 0323 ;	MA	# ( ష → వ̣ ) TELUGU LETTER SSA → TELUGU LETTER VA, COMBINING DOT BELOW	# 
+
+0C39 ;	0C35 0C3E ;	MA	# ( హ → వా ) TELUGU LETTER HA → TELUGU LETTER VA, TELUGU VOWEL SIGN AA	# 
+
+0C2E ;	0C35 0C41 ;	MA	# ( మ → వు ) TELUGU LETTER MA → TELUGU LETTER VA, TELUGU VOWEL SIGN U	# 
+
+0C42 ;	0C41 0C3E ;	MA	# ( ూ → ుా ) TELUGU VOWEL SIGN UU → TELUGU VOWEL SIGN U, TELUGU VOWEL SIGN AA	# 
+
+0C44 ;	0C43 0C3E ;	MA	# ( ౄ → ృా ) TELUGU VOWEL SIGN VOCALIC RR → TELUGU VOWEL SIGN VOCALIC R, TELUGU VOWEL SIGN AA	# 
+
+0CE1 ;	0C8C 0CBE ;	MA	# ( ೡ → ಌಾ ) KANNADA LETTER VOCALIC LL → KANNADA LETTER VOCALIC L, KANNADA VOWEL SIGN AA	# 
+
+0D08 ;	0D07 0D57 ;	MA	# ( ഈ → ഇൗ ) MALAYALAM LETTER II → MALAYALAM LETTER I, MALAYALAM AU LENGTH MARK	# 
+
+0D10 ;	0D0E 0D46 ;	MA	# ( ഐ → എെ ) MALAYALAM LETTER AI → MALAYALAM LETTER E, MALAYALAM VOWEL SIGN E	# 
+
+0D13 ;	0D12 0D3E ;	MA	# ( ഓ → ഒാ ) MALAYALAM LETTER OO → MALAYALAM LETTER O, MALAYALAM VOWEL SIGN AA	# 
+
+0D14 ;	0D12 0D57 ;	MA	# ( ഔ → ഒൗ ) MALAYALAM LETTER AU → MALAYALAM LETTER O, MALAYALAM AU LENGTH MARK	# 
+
+0D61 ;	0D1E ;	MA	# ( ൡ → ഞ ) MALAYALAM LETTER VOCALIC LL → MALAYALAM LETTER NYA	# 
+
+0D6B ;	0D26 0D4D 0D30 ;	MA	# ( ൫ → ദ്ര ) MALAYALAM DIGIT FIVE → MALAYALAM LETTER DA, MALAYALAM SIGN VIRAMA, MALAYALAM LETTER RA	# 
+
+0D79 ;	0D28 0D41 ;	MA	#* ( ൹ → നു ) MALAYALAM DATE MARK → MALAYALAM LETTER NA, MALAYALAM VOWEL SIGN U	# 
+0D0C ;	0D28 0D41 ;	MA	# ( ഌ → നു ) MALAYALAM LETTER VOCALIC L → MALAYALAM LETTER NA, MALAYALAM VOWEL SIGN U	# 
+0D19 ;	0D28 0D41 ;	MA	# ( ങ → നു ) MALAYALAM LETTER NGA → MALAYALAM LETTER NA, MALAYALAM VOWEL SIGN U	# →ഌ→
+
+0D6F ;	0D28 0D4D ;	MA	# ( ൯ → ന് ) MALAYALAM DIGIT NINE → MALAYALAM LETTER NA, MALAYALAM SIGN VIRAMA	# 
+0D7B ;	0D28 0D4D ;	MA	# ( ൻ → ന് ) MALAYALAM LETTER CHILLU N → MALAYALAM LETTER NA, MALAYALAM SIGN VIRAMA	# →൯→
+
+0D6C ;	0D28 0D4D 0D28 ;	MA	# ( ൬ → ന്ന ) MALAYALAM DIGIT SIX → MALAYALAM LETTER NA, MALAYALAM SIGN VIRAMA, MALAYALAM LETTER NA	# 
+
+0D5A ;	0D28 0D4D 0D2E ;	MA	#* ( ൚ → ന്മ ) MALAYALAM FRACTION THREE EIGHTIETHS → MALAYALAM LETTER NA, MALAYALAM SIGN VIRAMA, MALAYALAM LETTER MA	# 
+
+0D31 ;	0D30 ;	MA	# ( റ → ര ) MALAYALAM LETTER RRA → MALAYALAM LETTER RA	# 
+
+0D6A ;	0D30 0D4D ;	MA	# ( ൪ → ര് ) MALAYALAM DIGIT FOUR → MALAYALAM LETTER RA, MALAYALAM SIGN VIRAMA	# 
+0D7C ;	0D30 0D4D ;	MA	# ( ർ → ര് ) MALAYALAM LETTER CHILLU RR → MALAYALAM LETTER RA, MALAYALAM SIGN VIRAMA	# →൪→
+
+0D6E ;	0D35 0D4D 0D30 ;	MA	# ( ൮ → വ്ര ) MALAYALAM DIGIT EIGHT → MALAYALAM LETTER VA, MALAYALAM SIGN VIRAMA, MALAYALAM LETTER RA	# 
+
+0D76 ;	0D39 0D4D 0D2E ;	MA	#* ( ൶ → ഹ്മ ) MALAYALAM FRACTION ONE SIXTEENTH → MALAYALAM LETTER HA, MALAYALAM SIGN VIRAMA, MALAYALAM LETTER MA	# 
+
+0D42 ;	0D41 ;	MA	# ( ൂ → ു ) MALAYALAM VOWEL SIGN UU → MALAYALAM VOWEL SIGN U	# 
+0D43 ;	0D41 ;	MA	# ( ൃ → ു ) MALAYALAM VOWEL SIGN VOCALIC R → MALAYALAM VOWEL SIGN U	# →ൂ→
+
+0D48 ;	0D46 0D46 ;	MA	# ( ൈ → െെ ) MALAYALAM VOWEL SIGN AI → MALAYALAM VOWEL SIGN E, MALAYALAM VOWEL SIGN E	# 
+
+0DEA ;	0DA2 ;	MA	# ( ෪ → ජ ) SINHALA LITH DIGIT FOUR → SINHALA LETTER ALPAPRAANA JAYANNA	# 
+
+0DEB ;	0DAF ;	MA	# ( ෫ → ද ) SINHALA LITH DIGIT FIVE → SINHALA LETTER ALPAPRAANA DAYANNA	# 
+
+115D8 ;	11582 ;	MA	# ( 𑗘 → 𑖂 ) SIDDHAM LETTER THREE-CIRCLE ALTERNATE I → SIDDHAM LETTER I	# 
+115D9 ;	11582 ;	MA	# ( 𑗙 → 𑖂 ) SIDDHAM LETTER TWO-CIRCLE ALTERNATE I → SIDDHAM LETTER I	# 
+
+115DA ;	11583 ;	MA	# ( 𑗚 → 𑖃 ) SIDDHAM LETTER TWO-CIRCLE ALTERNATE II → SIDDHAM LETTER II	# 
+
+115DB ;	11584 ;	MA	# ( 𑗛 → 𑖄 ) SIDDHAM LETTER ALTERNATE U → SIDDHAM LETTER U	# 
+
+115DC ;	115B2 ;	MA	# ( 𑗜 → 𑖲 ) SIDDHAM VOWEL SIGN ALTERNATE U → SIDDHAM VOWEL SIGN U	# 
+
+115DD ;	115B3 ;	MA	# ( 𑗝 → 𑖳 ) SIDDHAM VOWEL SIGN ALTERNATE UU → SIDDHAM VOWEL SIGN UU	# 
+
+0E03 ;	0E02 ;	MA	# ( ฃ → ข ) THAI CHARACTER KHO KHUAT → THAI CHARACTER KHO KHAI	# 
+
+0E14 ;	0E04 ;	MA	# ( ด → ค ) THAI CHARACTER DO DEK → THAI CHARACTER KHO KHWAI	# 
+0E15 ;	0E04 ;	MA	# ( ต → ค ) THAI CHARACTER TO TAO → THAI CHARACTER KHO KHWAI	# →ด→
+
+0E21 ;	0E06 ;	MA	# ( ม → ฆ ) THAI CHARACTER MO MA → THAI CHARACTER KHO RAKHANG	# 
+
+0E88 ;	0E08 ;	MA	# ( ຈ → จ ) LAO LETTER CO → THAI CHARACTER CHO CHAN	# 
+
+0E0B ;	0E0A ;	MA	# ( ซ → ช ) THAI CHARACTER SO SO → THAI CHARACTER CHO CHANG	# 
+
+0E0F ;	0E0E ;	MA	# ( ฏ → ฎ ) THAI CHARACTER TO PATAK → THAI CHARACTER DO CHADA	# 
+
+0E17 ;	0E11 ;	MA	# ( ท → ฑ ) THAI CHARACTER THO THAHAN → THAI CHARACTER THO NANGMONTHO	# 
+
+0E9A ;	0E1A ;	MA	# ( ບ → บ ) LAO LETTER BO → THAI CHARACTER BO BAIMAI	# 
+
+0E9B ;	0E1B ;	MA	# ( ປ → ป ) LAO LETTER PO → THAI CHARACTER PO PLA	# 
+
+0E9D ;	0E1D ;	MA	# ( ຝ → ฝ ) LAO LETTER FO TAM → THAI CHARACTER FO FA	# 
+
+0E9E ;	0E1E ;	MA	# ( ພ → พ ) LAO LETTER PHO TAM → THAI CHARACTER PHO PHAN	# 
+
+0E9F ;	0E1F ;	MA	# ( ຟ → ฟ ) LAO LETTER FO SUNG → THAI CHARACTER FO FAN	# 
+
+0E26 ;	0E20 ;	MA	# ( ฦ → ภ ) THAI CHARACTER LU → THAI CHARACTER PHO SAMPHAO	# 
+
+0E8D ;	0E22 ;	MA	# ( ຍ → ย ) LAO LETTER NYO → THAI CHARACTER YO YAK	# 
+
+17D4 ;	0E2F ;	MA	#* ( ។ → ฯ ) KHMER SIGN KHAN → THAI CHARACTER PAIYANNOI	# 
+
+0E45 ;	0E32 ;	MA	# ( ๅ → า ) THAI CHARACTER LAKKHANGYAO → THAI CHARACTER SARA AA	# 
+
+0E33 ;	030A 0E32 ;	MA	# ( ำ → ̊า ) THAI CHARACTER SARA AM → COMBINING RING ABOVE, THAI CHARACTER SARA AA	# →ํา→
+
+17B7 ;	0E34 ;	MA	# ( ិ → ิ ) KHMER VOWEL SIGN I → THAI CHARACTER SARA I	# 
+
+17B8 ;	0E35 ;	MA	# ( ី → ี ) KHMER VOWEL SIGN II → THAI CHARACTER SARA II	# 
+
+17B9 ;	0E36 ;	MA	# ( ឹ → ึ ) KHMER VOWEL SIGN Y → THAI CHARACTER SARA UE	# 
+
+17BA ;	0E37 ;	MA	# ( ឺ → ื ) KHMER VOWEL SIGN YY → THAI CHARACTER SARA UEE	# 
+
+0EB8 ;	0E38 ;	MA	# ( ຸ → ุ ) LAO VOWEL SIGN U → THAI CHARACTER SARA U	# 
+
+0EB9 ;	0E39 ;	MA	# ( ູ → ู ) LAO VOWEL SIGN UU → THAI CHARACTER SARA UU	# 
+
+0E41 ;	0E40 0E40 ;	MA	# ( แ → เเ ) THAI CHARACTER SARA AE → THAI CHARACTER SARA E, THAI CHARACTER SARA E	# 
+
+0EDC ;	0EAB 0E99 ;	MA	# ( ໜ → ຫນ ) LAO HO NO → LAO LETTER HO SUNG, LAO LETTER NO	# 
+
+0EDD ;	0EAB 0EA1 ;	MA	# ( ໝ → ຫມ ) LAO HO MO → LAO LETTER HO SUNG, LAO LETTER MO	# 
+
+0EB3 ;	030A 0EB2 ;	MA	# ( ຳ → ̊າ ) LAO VOWEL SIGN AM → COMBINING RING ABOVE, LAO VOWEL SIGN AA	# →ໍາ→
+
+0F6A ;	0F62 ;	MA	# ( ཪ → ར ) TIBETAN LETTER FIXED-FORM RA → TIBETAN LETTER RA	# 
+
+0F00 ;	0F68 0F7C 0F7E ;	MA	# ( ༀ → ཨོཾ ) TIBETAN SYLLABLE OM → TIBETAN LETTER A, TIBETAN VOWEL SIGN O, TIBETAN SIGN RJES SU NGA RO	# 
+
+0F77 ;	0FB2 0F71 0F80 ;	MA	# ( ཷ → ྲཱྀ ) TIBETAN VOWEL SIGN VOCALIC RR → TIBETAN SUBJOINED LETTER RA, TIBETAN VOWEL SIGN AA, TIBETAN VOWEL SIGN REVERSED I	# 
+
+0F79 ;	0FB3 0F71 0F80 ;	MA	# ( ཹ → ླཱྀ ) TIBETAN VOWEL SIGN VOCALIC LL → TIBETAN SUBJOINED LETTER LA, TIBETAN VOWEL SIGN AA, TIBETAN VOWEL SIGN REVERSED I	# 
+
+1081 ;	1002 103E ;	MA	# ( ႁ → ဂှ ) MYANMAR LETTER SHAN HA → MYANMAR LETTER GA, MYANMAR CONSONANT SIGN MEDIAL HA	# 
+
+1000 ;	1002 102C ;	MA	# ( က → ဂာ ) MYANMAR LETTER KA → MYANMAR LETTER GA, MYANMAR VOWEL SIGN AA	# 
+
+1070 ;	1003 103E ;	MA	# ( ၰ → ဃှ ) MYANMAR LETTER EASTERN PWO KAREN GHWA → MYANMAR LETTER GHA, MYANMAR CONSONANT SIGN MEDIAL HA	# 
+
+1066 ;	1015 103E ;	MA	# ( ၦ → ပှ ) MYANMAR LETTER WESTERN PWO KAREN PWA → MYANMAR LETTER PA, MYANMAR CONSONANT SIGN MEDIAL HA	# 
+
+101F ;	1015 102C ;	MA	# ( ဟ → ပာ ) MYANMAR LETTER HA → MYANMAR LETTER PA, MYANMAR VOWEL SIGN AA	# 
+
+106F ;	1015 102C 103E ;	MA	# ( ၯ → ပာှ ) MYANMAR LETTER EASTERN PWO KAREN YWA → MYANMAR LETTER PA, MYANMAR VOWEL SIGN AA, MYANMAR CONSONANT SIGN MEDIAL HA	# →ဟှ→
+
+102A ;	1029 1031 102C 103A ;	MA	# ( ဪ → ဩော် ) MYANMAR LETTER AU → MYANMAR LETTER O, MYANMAR VOWEL SIGN E, MYANMAR VOWEL SIGN AA, MYANMAR SIGN ASAT	# 
+
+109E ;	1083 030A ;	MA	#* ( ႞ → ႃ̊ ) MYANMAR SYMBOL SHAN ONE → MYANMAR VOWEL SIGN SHAN AA, COMBINING RING ABOVE	# →ႃံ→
+
+17A3 ;	17A2 ;	MA	# ( ឣ → អ ) KHMER INDEPENDENT VOWEL QAQ → KHMER LETTER QA	# 
+
+19D0 ;	199E ;	MA	# ( ᧐ → ᦞ ) NEW TAI LUE DIGIT ZERO → NEW TAI LUE LETTER LOW VA	# 
+
+19D1 ;	19B1 ;	MA	# ( ᧑ → ᦱ ) NEW TAI LUE DIGIT ONE → NEW TAI LUE VOWEL SIGN AA	# 
+
+1A80 ;	1A45 ;	MA	# ( ᪀ → ᩅ ) TAI THAM HORA DIGIT ZERO → TAI THAM LETTER WA	# 
+1A90 ;	1A45 ;	MA	# ( ᪐ → ᩅ ) TAI THAM THAM DIGIT ZERO → TAI THAM LETTER WA	# 
+
+AA53 ;	AA01 ;	MA	# ( ꩓ → ꨁ ) CHAM DIGIT THREE → CHAM LETTER I	# 
+
+AA56 ;	AA23 ;	MA	# ( ꩖ → ꨣ ) CHAM DIGIT SIX → CHAM LETTER RA	# 
+
+1B52 ;	1B0D ;	MA	# ( ᭒ → ᬍ ) BALINESE DIGIT TWO → BALINESE LETTER LA LENGA	# 
+
+1B53 ;	1B11 ;	MA	# ( ᭓ → ᬑ ) BALINESE DIGIT THREE → BALINESE LETTER OKARA	# 
+
+1B58 ;	1B28 ;	MA	# ( ᭘ → ᬨ ) BALINESE DIGIT EIGHT → BALINESE LETTER PA KAPAL	# 
+
+A9A3 ;	A99D ;	MA	# ( ꦣ → ꦝ ) JAVANESE LETTER DA MAHAPRANA → JAVANESE LETTER DDA	# 
+
+1896 ;	185C ;	MA	# ( ᢖ → ᡜ ) MONGOLIAN LETTER ALI GALI ZA → MONGOLIAN LETTER TODO DZA	# 
+
+1855 ;	1835 ;	MA	# ( ᡕ → ᠵ ) MONGOLIAN LETTER TODO YA → MONGOLIAN LETTER JA	# 
+
+1FF6 ;	13EF ;	MA	# ( ῶ → Ꮿ ) GREEK SMALL LETTER OMEGA WITH PERISPOMENI → CHEROKEE LETTER YA	# 
+
+140D ;	1401 00B7 ;	MA	# ( ᐍ → ᐁ· ) CANADIAN SYLLABICS WEST-CREE WE → CANADIAN SYLLABICS E, MIDDLE DOT	# →ᐁᐧ→
+
+142B ;	1401 1420 ;	MA	# ( ᐫ → ᐁᐠ ) CANADIAN SYLLABICS EN → CANADIAN SYLLABICS E, CANADIAN SYLLABICS FINAL GRAVE	# 
+
+1411 ;	1404 00B7 ;	MA	# ( ᐑ → ᐄ· ) CANADIAN SYLLABICS WEST-CREE WII → CANADIAN SYLLABICS II, MIDDLE DOT	# →ᐄᐧ→
+
+1413 ;	1405 00B7 ;	MA	# ( ᐓ → ᐅ· ) CANADIAN SYLLABICS WEST-CREE WO → CANADIAN SYLLABICS O, MIDDLE DOT	# →ᐅᐧ→
+
+142D ;	1405 1420 ;	MA	# ( ᐭ → ᐅᐠ ) CANADIAN SYLLABICS ON → CANADIAN SYLLABICS O, CANADIAN SYLLABICS FINAL GRAVE	# 
+
+1415 ;	1406 00B7 ;	MA	# ( ᐕ → ᐆ· ) CANADIAN SYLLABICS WEST-CREE WOO → CANADIAN SYLLABICS OO, MIDDLE DOT	# →ᐆᐧ→
+
+1418 ;	140A 00B7 ;	MA	# ( ᐘ → ᐊ· ) CANADIAN SYLLABICS WEST-CREE WA → CANADIAN SYLLABICS A, MIDDLE DOT	# →ᐊᐧ→
+
+142E ;	140A 1420 ;	MA	# ( ᐮ → ᐊᐠ ) CANADIAN SYLLABICS AN → CANADIAN SYLLABICS A, CANADIAN SYLLABICS FINAL GRAVE	# 
+
+141A ;	140B 00B7 ;	MA	# ( ᐚ → ᐋ· ) CANADIAN SYLLABICS WEST-CREE WAA → CANADIAN SYLLABICS AA, MIDDLE DOT	# →ᐋᐧ→
+
+14D1 ;	1421 ;	MA	# ( ᓑ → ᐡ ) CANADIAN SYLLABICS CARRIER NG → CANADIAN SYLLABICS FINAL BOTTOM HALF RING	# 
+
+1540 ;	1429 ;	MA	# ( ᕀ → ᐩ ) CANADIAN SYLLABICS WEST-CREE Y → CANADIAN SYLLABICS FINAL PLUS	# 
+
+143F ;	1432 00B7 ;	MA	# ( ᐿ → ᐲ· ) CANADIAN SYLLABICS WEST-CREE PWII → CANADIAN SYLLABICS PII, MIDDLE DOT	# →ᐲᐧ→
+
+1443 ;	1434 00B7 ;	MA	# ( ᑃ → ᐴ· ) CANADIAN SYLLABICS WEST-CREE PWOO → CANADIAN SYLLABICS POO, MIDDLE DOT	# →ᐴᐧ→
+
+2369 ;	1435 ;	MA	#* ( ⍩ → ᐵ ) APL FUNCTIONAL SYMBOL GREATER-THAN DIAERESIS → CANADIAN SYLLABICS Y-CREE POO	# 
+
+1447 ;	1439 00B7 ;	MA	# ( ᑇ → ᐹ· ) CANADIAN SYLLABICS WEST-CREE PWAA → CANADIAN SYLLABICS PAA, MIDDLE DOT	# →ᐹᐧ→
+
+145C ;	144F 00B7 ;	MA	# ( ᑜ → ᑏ· ) CANADIAN SYLLABICS WEST-CREE TWII → CANADIAN SYLLABICS TII, MIDDLE DOT	# →ᑏᐧ→
+
+2E27 ;	1450 ;	MA	#* ( ⸧ → ᑐ ) RIGHT SIDEWAYS U BRACKET → CANADIAN SYLLABICS TO	# →⊃→
+2283 ;	1450 ;	MA	#* ( ⊃ → ᑐ ) SUPERSET OF → CANADIAN SYLLABICS TO	# 
+
+145E ;	1450 00B7 ;	MA	# ( ᑞ → ᑐ· ) CANADIAN SYLLABICS WEST-CREE TWO → CANADIAN SYLLABICS TO, MIDDLE DOT	# →ᑐᐧ→
+
+1469 ;	1450 0027 ;	MA	# ( ᑩ → ᑐ' ) CANADIAN SYLLABICS TTO → CANADIAN SYLLABICS TO, APOSTROPHE	# →ᑐᑊ→
+
+27C9 ;	1450 002F ;	MA	#* ( ⟉ → ᑐ/ ) SUPERSET PRECEDING SOLIDUS → CANADIAN SYLLABICS TO, SOLIDUS	# →⊃/→
+
+2AD7 ;	1450 1455 ;	MA	#* ( ⫗ → ᑐᑕ ) SUPERSET BESIDE SUBSET → CANADIAN SYLLABICS TO, CANADIAN SYLLABICS TA	# →⊃⊂→
+
+1460 ;	1451 00B7 ;	MA	# ( ᑠ → ᑑ· ) CANADIAN SYLLABICS WEST-CREE TWOO → CANADIAN SYLLABICS TOO, MIDDLE DOT	# →ᑑᐧ→
+
+2E26 ;	1455 ;	MA	#* ( ⸦ → ᑕ ) LEFT SIDEWAYS U BRACKET → CANADIAN SYLLABICS TA	# →⊂→
+2282 ;	1455 ;	MA	#* ( ⊂ → ᑕ ) SUBSET OF → CANADIAN SYLLABICS TA	# 
+
+1462 ;	1455 00B7 ;	MA	# ( ᑢ → ᑕ· ) CANADIAN SYLLABICS WEST-CREE TWA → CANADIAN SYLLABICS TA, MIDDLE DOT	# →ᑕᐧ→
+
+146A ;	1455 0027 ;	MA	# ( ᑪ → ᑕ' ) CANADIAN SYLLABICS TTA → CANADIAN SYLLABICS TA, APOSTROPHE	# →ᑕᑊ→
+
+1464 ;	1456 00B7 ;	MA	# ( ᑤ → ᑖ· ) CANADIAN SYLLABICS WEST-CREE TWAA → CANADIAN SYLLABICS TAA, MIDDLE DOT	# →ᑖᐧ→
+
+1475 ;	146B 00B7 ;	MA	# ( ᑵ → ᑫ· ) CANADIAN SYLLABICS WEST-CREE KWE → CANADIAN SYLLABICS KE, MIDDLE DOT	# →ᑫᐧ→
+
+1485 ;	146B 0027 ;	MA	# ( ᒅ → ᑫ' ) CANADIAN SYLLABICS SOUTH-SLAVEY KEH → CANADIAN SYLLABICS KE, APOSTROPHE	# →ᑫᑊ→
+
+1479 ;	146E 00B7 ;	MA	# ( ᑹ → ᑮ· ) CANADIAN SYLLABICS WEST-CREE KWII → CANADIAN SYLLABICS KII, MIDDLE DOT	# →ᑮᐧ→
+
+147D ;	1470 00B7 ;	MA	# ( ᑽ → ᑰ· ) CANADIAN SYLLABICS WEST-CREE KWOO → CANADIAN SYLLABICS KOO, MIDDLE DOT	# →ᑰᐧ→
+
+147F ;	1472 00B7 ;	MA	# ( ᑿ → ᑲ· ) CANADIAN SYLLABICS WEST-CREE KWA → CANADIAN SYLLABICS KA, MIDDLE DOT	# →ᑲᐧ→
+
+1488 ;	1472 0027 ;	MA	# ( ᒈ → ᑲ' ) CANADIAN SYLLABICS SOUTH-SLAVEY KAH → CANADIAN SYLLABICS KA, APOSTROPHE	# →ᑲᑊ→
+
+1481 ;	1473 00B7 ;	MA	# ( ᒁ → ᑳ· ) CANADIAN SYLLABICS WEST-CREE KWAA → CANADIAN SYLLABICS KAA, MIDDLE DOT	# →ᑳᐧ→
+
+1603 ;	1489 ;	MA	# ( ᘃ → ᒉ ) CANADIAN SYLLABICS CARRIER NO → CANADIAN SYLLABICS CE	# 
+
+1493 ;	1489 00B7 ;	MA	# ( ᒓ → ᒉ· ) CANADIAN SYLLABICS WEST-CREE CWE → CANADIAN SYLLABICS CE, MIDDLE DOT	# →ᒉᐧ→
+
+1495 ;	148B 00B7 ;	MA	# ( ᒕ → ᒋ· ) CANADIAN SYLLABICS WEST-CREE CWI → CANADIAN SYLLABICS CI, MIDDLE DOT	# →ᒋᐧ→
+
+1497 ;	148C 00B7 ;	MA	# ( ᒗ → ᒌ· ) CANADIAN SYLLABICS WEST-CREE CWII → CANADIAN SYLLABICS CII, MIDDLE DOT	# →ᒌᐧ→
+
+149B ;	148E 00B7 ;	MA	# ( ᒛ → ᒎ· ) CANADIAN SYLLABICS WEST-CREE CWOO → CANADIAN SYLLABICS COO, MIDDLE DOT	# →ᒎᐧ→
+
+1602 ;	1490 ;	MA	# ( ᘂ → ᒐ ) CANADIAN SYLLABICS CARRIER NU → CANADIAN SYLLABICS CA	# 
+
+149D ;	1490 00B7 ;	MA	# ( ᒝ → ᒐ· ) CANADIAN SYLLABICS WEST-CREE CWA → CANADIAN SYLLABICS CA, MIDDLE DOT	# →ᒐᐧ→
+
+149F ;	1491 00B7 ;	MA	# ( ᒟ → ᒑ· ) CANADIAN SYLLABICS WEST-CREE CWAA → CANADIAN SYLLABICS CAA, MIDDLE DOT	# →ᒑᐧ→
+
+14AD ;	14A3 00B7 ;	MA	# ( ᒭ → ᒣ· ) CANADIAN SYLLABICS WEST-CREE MWE → CANADIAN SYLLABICS ME, MIDDLE DOT	# →ᒣᐧ→
+
+14B1 ;	14A6 00B7 ;	MA	# ( ᒱ → ᒦ· ) CANADIAN SYLLABICS WEST-CREE MWII → CANADIAN SYLLABICS MII, MIDDLE DOT	# →ᒦᐧ→
+
+14B3 ;	14A7 00B7 ;	MA	# ( ᒳ → ᒧ· ) CANADIAN SYLLABICS WEST-CREE MWO → CANADIAN SYLLABICS MO, MIDDLE DOT	# →ᒧᐧ→
+
+14B5 ;	14A8 00B7 ;	MA	# ( ᒵ → ᒨ· ) CANADIAN SYLLABICS WEST-CREE MWOO → CANADIAN SYLLABICS MOO, MIDDLE DOT	# →ᒨᐧ→
+
+14B9 ;	14AB 00B7 ;	MA	# ( ᒹ → ᒫ· ) CANADIAN SYLLABICS WEST-CREE MWAA → CANADIAN SYLLABICS MAA, MIDDLE DOT	# →ᒫᐧ→
+
+14CA ;	14C0 00B7 ;	MA	# ( ᓊ → ᓀ· ) CANADIAN SYLLABICS WEST-CREE NWE → CANADIAN SYLLABICS NE, MIDDLE DOT	# →ᓀᐧ→
+
+14CC ;	14C7 00B7 ;	MA	# ( ᓌ → ᓇ· ) CANADIAN SYLLABICS WEST-CREE NWA → CANADIAN SYLLABICS NA, MIDDLE DOT	# →ᓇᐧ→
+
+14CE ;	14C8 00B7 ;	MA	# ( ᓎ → ᓈ· ) CANADIAN SYLLABICS WEST-CREE NWAA → CANADIAN SYLLABICS NAA, MIDDLE DOT	# →ᓈᐧ→
+
+1604 ;	14D3 ;	MA	# ( ᘄ → ᓓ ) CANADIAN SYLLABICS CARRIER NE → CANADIAN SYLLABICS LE	# 
+
+14DD ;	14D3 00B7 ;	MA	# ( ᓝ → ᓓ· ) CANADIAN SYLLABICS WEST-CREE LWE → CANADIAN SYLLABICS LE, MIDDLE DOT	# →ᓓᐧ→
+
+14DF ;	14D5 00B7 ;	MA	# ( ᓟ → ᓕ· ) CANADIAN SYLLABICS WEST-CREE LWI → CANADIAN SYLLABICS LI, MIDDLE DOT	# →ᓕᐧ→
+
+14E1 ;	14D6 00B7 ;	MA	# ( ᓡ → ᓖ· ) CANADIAN SYLLABICS WEST-CREE LWII → CANADIAN SYLLABICS LII, MIDDLE DOT	# →ᓖᐧ→
+
+14E3 ;	14D7 00B7 ;	MA	# ( ᓣ → ᓗ· ) CANADIAN SYLLABICS WEST-CREE LWO → CANADIAN SYLLABICS LO, MIDDLE DOT	# →ᓗᐧ→
+
+14E5 ;	14D8 00B7 ;	MA	# ( ᓥ → ᓘ· ) CANADIAN SYLLABICS WEST-CREE LWOO → CANADIAN SYLLABICS LOO, MIDDLE DOT	# →ᓘᐧ→
+
+1607 ;	14DA ;	MA	# ( ᘇ → ᓚ ) CANADIAN SYLLABICS CARRIER NA → CANADIAN SYLLABICS LA	# 
+
+14E7 ;	14DA 00B7 ;	MA	# ( ᓧ → ᓚ· ) CANADIAN SYLLABICS WEST-CREE LWA → CANADIAN SYLLABICS LA, MIDDLE DOT	# →ᓚᐧ→
+
+14E9 ;	14DB 00B7 ;	MA	# ( ᓩ → ᓛ· ) CANADIAN SYLLABICS WEST-CREE LWAA → CANADIAN SYLLABICS LAA, MIDDLE DOT	# →ᓛᐧ→
+
+14F7 ;	14ED 00B7 ;	MA	# ( ᓷ → ᓭ· ) CANADIAN SYLLABICS WEST-CREE SWE → CANADIAN SYLLABICS SE, MIDDLE DOT	# →ᓭᐧ→
+
+14F9 ;	14EF 00B7 ;	MA	# ( ᓹ → ᓯ· ) CANADIAN SYLLABICS WEST-CREE SWI → CANADIAN SYLLABICS SI, MIDDLE DOT	# →ᓯᐧ→
+
+14FB ;	14F0 00B7 ;	MA	# ( ᓻ → ᓰ· ) CANADIAN SYLLABICS WEST-CREE SWII → CANADIAN SYLLABICS SII, MIDDLE DOT	# →ᓰᐧ→
+
+14FD ;	14F1 00B7 ;	MA	# ( ᓽ → ᓱ· ) CANADIAN SYLLABICS WEST-CREE SWO → CANADIAN SYLLABICS SO, MIDDLE DOT	# →ᓱᐧ→
+
+14FF ;	14F2 00B7 ;	MA	# ( ᓿ → ᓲ· ) CANADIAN SYLLABICS WEST-CREE SWOO → CANADIAN SYLLABICS SOO, MIDDLE DOT	# →ᓲᐧ→
+
+1501 ;	14F4 00B7 ;	MA	# ( ᔁ → ᓴ· ) CANADIAN SYLLABICS WEST-CREE SWA → CANADIAN SYLLABICS SA, MIDDLE DOT	# →ᓴᐧ→
+
+1503 ;	14F5 00B7 ;	MA	# ( ᔃ → ᓵ· ) CANADIAN SYLLABICS WEST-CREE SWAA → CANADIAN SYLLABICS SAA, MIDDLE DOT	# →ᓵᐧ→
+
+150C ;	150B 003C ;	MA	# ( ᔌ → ᔋ< ) CANADIAN SYLLABICS NASKAPI SPWA → CANADIAN SYLLABICS NASKAPI S-W, LESS-THAN SIGN	# →ᔋᐸ→
+
+150D ;	150B 1455 ;	MA	# ( ᔍ → ᔋᑕ ) CANADIAN SYLLABICS NASKAPI STWA → CANADIAN SYLLABICS NASKAPI S-W, CANADIAN SYLLABICS TA	# 
+
+150E ;	150B 1472 ;	MA	# ( ᔎ → ᔋᑲ ) CANADIAN SYLLABICS NASKAPI SKWA → CANADIAN SYLLABICS NASKAPI S-W, CANADIAN SYLLABICS KA	# 
+
+150F ;	150B 1490 ;	MA	# ( ᔏ → ᔋᒐ ) CANADIAN SYLLABICS NASKAPI SCWA → CANADIAN SYLLABICS NASKAPI S-W, CANADIAN SYLLABICS CA	# 
+
+1518 ;	1510 00B7 ;	MA	# ( ᔘ → ᔐ· ) CANADIAN SYLLABICS WEST-CREE SHWE → CANADIAN SYLLABICS SHE, MIDDLE DOT	# →ᔐᐧ→
+
+151A ;	1511 00B7 ;	MA	# ( ᔚ → ᔑ· ) CANADIAN SYLLABICS WEST-CREE SHWI → CANADIAN SYLLABICS SHI, MIDDLE DOT	# →ᔑᐧ→
+
+151C ;	1512 00B7 ;	MA	# ( ᔜ → ᔒ· ) CANADIAN SYLLABICS WEST-CREE SHWII → CANADIAN SYLLABICS SHII, MIDDLE DOT	# →ᔒᐧ→
+
+151E ;	1513 00B7 ;	MA	# ( ᔞ → ᔓ· ) CANADIAN SYLLABICS WEST-CREE SHWO → CANADIAN SYLLABICS SHO, MIDDLE DOT	# →ᔓᐧ→
+
+1520 ;	1514 00B7 ;	MA	# ( ᔠ → ᔔ· ) CANADIAN SYLLABICS WEST-CREE SHWOO → CANADIAN SYLLABICS SHOO, MIDDLE DOT	# →ᔔᐧ→
+
+1522 ;	1515 00B7 ;	MA	# ( ᔢ → ᔕ· ) CANADIAN SYLLABICS WEST-CREE SHWA → CANADIAN SYLLABICS SHA, MIDDLE DOT	# →ᔕᐧ→
+
+1524 ;	1516 00B7 ;	MA	# ( ᔤ → ᔖ· ) CANADIAN SYLLABICS WEST-CREE SHWAA → CANADIAN SYLLABICS SHAA, MIDDLE DOT	# →ᔖᐧ→
+
+1532 ;	1528 00B7 ;	MA	# ( ᔲ → ᔨ· ) CANADIAN SYLLABICS WEST-CREE YWI → CANADIAN SYLLABICS YI, MIDDLE DOT	# →ᔨᐧ→
+
+1534 ;	1529 00B7 ;	MA	# ( ᔴ → ᔩ· ) CANADIAN SYLLABICS WEST-CREE YWII → CANADIAN SYLLABICS YII, MIDDLE DOT	# →ᔩᐧ→
+
+1536 ;	152A 00B7 ;	MA	# ( ᔶ → ᔪ· ) CANADIAN SYLLABICS WEST-CREE YWO → CANADIAN SYLLABICS YO, MIDDLE DOT	# →ᔪᐧ→
+
+1538 ;	152B 00B7 ;	MA	# ( ᔸ → ᔫ· ) CANADIAN SYLLABICS WEST-CREE YWOO → CANADIAN SYLLABICS YOO, MIDDLE DOT	# →ᔫᐧ→
+
+153A ;	152D 00B7 ;	MA	# ( ᔺ → ᔭ· ) CANADIAN SYLLABICS WEST-CREE YWA → CANADIAN SYLLABICS YA, MIDDLE DOT	# →ᔭᐧ→
+
+153C ;	152E 00B7 ;	MA	# ( ᔼ → ᔮ· ) CANADIAN SYLLABICS WEST-CREE YWAA → CANADIAN SYLLABICS YAA, MIDDLE DOT	# →ᔮᐧ→
+
+1622 ;	1543 ;	MA	# ( ᘢ → ᕃ ) CANADIAN SYLLABICS CARRIER LU → CANADIAN SYLLABICS R-CREE RE	# 
+
+18E0 ;	1543 00B7 ;	MA	# ( ᣠ → ᕃ· ) CANADIAN SYLLABICS R-CREE RWE → CANADIAN SYLLABICS R-CREE RE, MIDDLE DOT	# →ᕃᐧ→
+
+1623 ;	1546 ;	MA	# ( ᘣ → ᕆ ) CANADIAN SYLLABICS CARRIER LO → CANADIAN SYLLABICS RI	# 
+
+1624 ;	154A ;	MA	# ( ᘤ → ᕊ ) CANADIAN SYLLABICS CARRIER LE → CANADIAN SYLLABICS WEST-CREE LO	# 
+
+154F ;	154C 00B7 ;	MA	# ( ᕏ → ᕌ· ) CANADIAN SYLLABICS WEST-CREE RWAA → CANADIAN SYLLABICS RAA, MIDDLE DOT	# →ᕌᐧ→
+
+1581 ;	1550 0064 ;	MA	# ( ᖁ → ᕐd ) CANADIAN SYLLABICS QO → CANADIAN SYLLABICS R, LATIN SMALL LETTER D	# →ᕐᑯ→
+
+157F ;	1550 0050 ;	MA	# ( ᕿ → ᕐP ) CANADIAN SYLLABICS QI → CANADIAN SYLLABICS R, LATIN CAPITAL LETTER P	# →ᕐᑭ→
+
+166F ;	1550 146B ;	MA	# ( ᙯ → ᕐᑫ ) CANADIAN SYLLABICS QAI → CANADIAN SYLLABICS R, CANADIAN SYLLABICS KE	# 
+
+157E ;	1550 146C ;	MA	# ( ᕾ → ᕐᑬ ) CANADIAN SYLLABICS QAAI → CANADIAN SYLLABICS R, CANADIAN SYLLABICS KAAI	# 
+
+1580 ;	1550 146E ;	MA	# ( ᖀ → ᕐᑮ ) CANADIAN SYLLABICS QII → CANADIAN SYLLABICS R, CANADIAN SYLLABICS KII	# 
+
+1582 ;	1550 1470 ;	MA	# ( ᖂ → ᕐᑰ ) CANADIAN SYLLABICS QOO → CANADIAN SYLLABICS R, CANADIAN SYLLABICS KOO	# 
+
+1583 ;	1550 1472 ;	MA	# ( ᖃ → ᕐᑲ ) CANADIAN SYLLABICS QA → CANADIAN SYLLABICS R, CANADIAN SYLLABICS KA	# 
+
+1584 ;	1550 1473 ;	MA	# ( ᖄ → ᕐᑳ ) CANADIAN SYLLABICS QAA → CANADIAN SYLLABICS R, CANADIAN SYLLABICS KAA	# 
+
+1585 ;	1550 1483 ;	MA	# ( ᖅ → ᕐᒃ ) CANADIAN SYLLABICS Q → CANADIAN SYLLABICS R, CANADIAN SYLLABICS K	# 
+
+155C ;	155A 00B7 ;	MA	# ( ᕜ → ᕚ· ) CANADIAN SYLLABICS WEST-CREE FWAA → CANADIAN SYLLABICS FAA, MIDDLE DOT	# →ᕚᐧ→
+
+18E3 ;	155E 00B7 ;	MA	# ( ᣣ → ᕞ· ) CANADIAN SYLLABICS THWE → CANADIAN SYLLABICS THE, MIDDLE DOT	# →ᕞᐧ→
+
+18E4 ;	1566 00B7 ;	MA	# ( ᣤ → ᕦ· ) CANADIAN SYLLABICS THWA → CANADIAN SYLLABICS THA, MIDDLE DOT	# →ᕦᐧ→
+
+1569 ;	1567 00B7 ;	MA	# ( ᕩ → ᕧ· ) CANADIAN SYLLABICS WEST-CREE THWAA → CANADIAN SYLLABICS THAA, MIDDLE DOT	# →ᕧᐧ→
+
+18E5 ;	156B 00B7 ;	MA	# ( ᣥ → ᕫ· ) CANADIAN SYLLABICS TTHWE → CANADIAN SYLLABICS TTHE, MIDDLE DOT	# →ᕫᐧ→
+
+18E8 ;	1586 00B7 ;	MA	# ( ᣨ → ᖆ· ) CANADIAN SYLLABICS TLHWE → CANADIAN SYLLABICS TLHE, MIDDLE DOT	# →ᖆᐧ→
+
+1591 ;	1595 004A ;	MA	# ( ᖑ → ᖕJ ) CANADIAN SYLLABICS NGO → CANADIAN SYLLABICS NG, LATIN CAPITAL LETTER J	# →ᖕᒍ→
+
+1670 ;	1595 1489 ;	MA	# ( ᙰ → ᖕᒉ ) CANADIAN SYLLABICS NGAI → CANADIAN SYLLABICS NG, CANADIAN SYLLABICS CE	# 
+
+158E ;	1595 148A ;	MA	# ( ᖎ → ᖕᒊ ) CANADIAN SYLLABICS NGAAI → CANADIAN SYLLABICS NG, CANADIAN SYLLABICS CAAI	# 
+
+158F ;	1595 148B ;	MA	# ( ᖏ → ᖕᒋ ) CANADIAN SYLLABICS NGI → CANADIAN SYLLABICS NG, CANADIAN SYLLABICS CI	# 
+
+1590 ;	1595 148C ;	MA	# ( ᖐ → ᖕᒌ ) CANADIAN SYLLABICS NGII → CANADIAN SYLLABICS NG, CANADIAN SYLLABICS CII	# 
+
+1592 ;	1595 148E ;	MA	# ( ᖒ → ᖕᒎ ) CANADIAN SYLLABICS NGOO → CANADIAN SYLLABICS NG, CANADIAN SYLLABICS COO	# 
+
+1593 ;	1595 1490 ;	MA	# ( ᖓ → ᖕᒐ ) CANADIAN SYLLABICS NGA → CANADIAN SYLLABICS NG, CANADIAN SYLLABICS CA	# 
+
+1594 ;	1595 1491 ;	MA	# ( ᖔ → ᖕᒑ ) CANADIAN SYLLABICS NGAA → CANADIAN SYLLABICS NG, CANADIAN SYLLABICS CAA	# 
+
+1673 ;	1596 004A ;	MA	# ( ᙳ → ᖖJ ) CANADIAN SYLLABICS NNGO → CANADIAN SYLLABICS NNG, LATIN CAPITAL LETTER J	# →ᖖᒍ→
+
+1671 ;	1596 148B ;	MA	# ( ᙱ → ᖖᒋ ) CANADIAN SYLLABICS NNGI → CANADIAN SYLLABICS NNG, CANADIAN SYLLABICS CI	# 
+
+1672 ;	1596 148C ;	MA	# ( ᙲ → ᖖᒌ ) CANADIAN SYLLABICS NNGII → CANADIAN SYLLABICS NNG, CANADIAN SYLLABICS CII	# 
+
+1674 ;	1596 148E ;	MA	# ( ᙴ → ᖖᒎ ) CANADIAN SYLLABICS NNGOO → CANADIAN SYLLABICS NNG, CANADIAN SYLLABICS COO	# 
+
+1675 ;	1596 1490 ;	MA	# ( ᙵ → ᖖᒐ ) CANADIAN SYLLABICS NNGA → CANADIAN SYLLABICS NNG, CANADIAN SYLLABICS CA	# 
+
+1676 ;	1596 1491 ;	MA	# ( ᙶ → ᖖᒑ ) CANADIAN SYLLABICS NNGAA → CANADIAN SYLLABICS NNG, CANADIAN SYLLABICS CAA	# 
+
+18EA ;	1597 00B7 ;	MA	# ( ᣪ → ᖗ· ) CANADIAN SYLLABICS SAYISI SHWE → CANADIAN SYLLABICS SAYISI SHE, MIDDLE DOT	# →ᖗᐧ→
+
+1677 ;	15A7 00B7 ;	MA	# ( ᙷ → ᖧ· ) CANADIAN SYLLABICS WOODS-CREE THWEE → CANADIAN SYLLABICS TH-CREE THE, MIDDLE DOT	# →ᖧᐧ→
+
+1678 ;	15A8 00B7 ;	MA	# ( ᙸ → ᖨ· ) CANADIAN SYLLABICS WOODS-CREE THWI → CANADIAN SYLLABICS TH-CREE THI, MIDDLE DOT	# →ᖨᐧ→
+
+1679 ;	15A9 00B7 ;	MA	# ( ᙹ → ᖩ· ) CANADIAN SYLLABICS WOODS-CREE THWII → CANADIAN SYLLABICS TH-CREE THII, MIDDLE DOT	# →ᖩᐧ→
+
+167A ;	15AA 00B7 ;	MA	# ( ᙺ → ᖪ· ) CANADIAN SYLLABICS WOODS-CREE THWO → CANADIAN SYLLABICS TH-CREE THO, MIDDLE DOT	# →ᖪᐧ→
+
+167B ;	15AB 00B7 ;	MA	# ( ᙻ → ᖫ· ) CANADIAN SYLLABICS WOODS-CREE THWOO → CANADIAN SYLLABICS TH-CREE THOO, MIDDLE DOT	# →ᖫᐧ→
+
+167C ;	15AC 00B7 ;	MA	# ( ᙼ → ᖬ· ) CANADIAN SYLLABICS WOODS-CREE THWA → CANADIAN SYLLABICS TH-CREE THA, MIDDLE DOT	# →ᖬᐧ→
+
+167D ;	15AD 00B7 ;	MA	# ( ᙽ → ᖭ· ) CANADIAN SYLLABICS WOODS-CREE THWAA → CANADIAN SYLLABICS TH-CREE THAA, MIDDLE DOT	# →ᖭᐧ→
+
+2AAB ;	15D2 ;	MA	#* ( ⪫ → ᗒ ) LARGER THAN → CANADIAN SYLLABICS CARRIER WE	# 
+
+2AAA ;	15D5 ;	MA	#* ( ⪪ → ᗕ ) SMALLER THAN → CANADIAN SYLLABICS CARRIER WA	# 
+
+A4F7 ;	15E1 ;	MA	# ( ꓷ → ᗡ ) LISU LETTER OE → CANADIAN SYLLABICS CARRIER THA	# 
+
+18F0 ;	15F4 00B7 ;	MA	# ( ᣰ → ᗴ· ) CANADIAN SYLLABICS CARRIER GWA → CANADIAN SYLLABICS CARRIER GA, MIDDLE DOT	# →ᗴᐧ→
+
+18F2 ;	161B 00B7 ;	MA	# ( ᣲ → ᘛ· ) CANADIAN SYLLABICS CARRIER JWA → CANADIAN SYLLABICS CARRIER JA, MIDDLE DOT	# →ᘛᐧ→
+
+1DBB ;	1646 ;	MA	# ( ᶻ → ᙆ ) MODIFIER LETTER SMALL Z → CANADIAN SYLLABICS CARRIER Z	# 
+
+A4ED ;	1660 ;	MA	# ( ꓭ → ᙠ ) LISU LETTER GHA → CANADIAN SYLLABICS CARRIER TSA	# 
+
+02E1 ;	18F3 ;	MA	# ( ˡ → ᣳ ) MODIFIER LETTER SMALL L → CANADIAN SYLLABICS BEAVER DENE L	# 
+
+02B3 ;	18F4 ;	MA	# ( ʳ → ᣴ ) MODIFIER LETTER SMALL R → CANADIAN SYLLABICS BEAVER DENE R	# 
+
+02E2 ;	18F5 ;	MA	# ( ˢ → ᣵ ) MODIFIER LETTER SMALL S → CANADIAN SYLLABICS CARRIER DENTAL S	# 
+
+A6B0 ;	16B9 ;	MA	# ( ꚰ → ᚹ ) BAMUM LETTER TAA → RUNIC LETTER WUNJO WYNN W	# 
+
+16E1 ;	16BC ;	MA	# ( ᛡ → ᚼ ) RUNIC LETTER IOR → RUNIC LETTER LONG-BRANCH-HAGALL H	# 
+
+237F ;	16BD ;	MA	#* ( ⍿ → ᚽ ) VERTICAL LINE WITH MIDDLE DOT → RUNIC LETTER SHORT-TWIG-HAGALL H	# →ᛂ→
+16C2 ;	16BD ;	MA	# ( ᛂ → ᚽ ) RUNIC LETTER E → RUNIC LETTER SHORT-TWIG-HAGALL H	# 
+
+1D23F ;	16CB ;	MA	#* ( 𝈿 → ᛋ ) GREEK INSTRUMENTAL NOTATION SYMBOL-52 → RUNIC LETTER SIGEL LONG-BRANCH-SOL S	# 
+
+2191 ;	16CF ;	MA	#* ( ↑ → ᛏ ) UPWARDS ARROW → RUNIC LETTER TIWAZ TIR TYR T	# 
+
+21BF ;	16D0 ;	MA	#* ( ↿ → ᛐ ) UPWARDS HARPOON WITH BARB LEFTWARDS → RUNIC LETTER SHORT-TWIG-TYR T	# 
+
+296E ;	16D0 21C2 ;	MA	#* ( ⥮ → ᛐ⇂ ) UPWARDS HARPOON WITH BARB LEFT BESIDE DOWNWARDS HARPOON WITH BARB RIGHT → RUNIC LETTER SHORT-TWIG-TYR T, DOWNWARDS HARPOON WITH BARB RIGHTWARDS	# →↿⇂→
+
+2963 ;	16D0 16DA ;	MA	#* ( ⥣ → ᛐᛚ ) UPWARDS HARPOON WITH BARB LEFT BESIDE UPWARDS HARPOON WITH BARB RIGHT → RUNIC LETTER SHORT-TWIG-TYR T, RUNIC LETTER LAUKAZ LAGU LOGR L	# →↿↾→
+
+2D63 ;	16EF ;	MA	# ( ⵣ → ᛯ ) TIFINAGH LETTER YAZ → RUNIC TVIMADUR SYMBOL	# 
+
+21BE ;	16DA ;	MA	#* ( ↾ → ᛚ ) UPWARDS HARPOON WITH BARB RIGHTWARDS → RUNIC LETTER LAUKAZ LAGU LOGR L	# 
+2A21 ;	16DA ;	MA	#* ( ⨡ → ᛚ ) Z NOTATION SCHEMA PROJECTION → RUNIC LETTER LAUKAZ LAGU LOGR L	# →↾→
+
+22C4 ;	16DC ;	MA	#* ( ⋄ → ᛜ ) DIAMOND OPERATOR → RUNIC LETTER INGWAZ	# →◇→
+25C7 ;	16DC ;	MA	#* ( ◇ → ᛜ ) WHITE DIAMOND → RUNIC LETTER INGWAZ	# 
+25CA ;	16DC ;	MA	#* ( ◊ → ᛜ ) LOZENGE → RUNIC LETTER INGWAZ	# →⋄→→◇→
+2662 ;	16DC ;	MA	#* ( ♢ → ᛜ ) WHITE DIAMOND SUIT → RUNIC LETTER INGWAZ	# →◊→→⋄→→◇→
+1F754 ;	16DC ;	MA	#* ( 🝔 → ᛜ ) ALCHEMICAL SYMBOL FOR SOAP → RUNIC LETTER INGWAZ	# →◇→
+118B7 ;	16DC ;	MA	# ( 𑢷 → ᛜ ) WARANG CITI CAPITAL LETTER BU → RUNIC LETTER INGWAZ	# →◇→
+10294 ;	16DC ;	MA	# ( 𐊔 → ᛜ ) LYCIAN LETTER KK → RUNIC LETTER INGWAZ	# →◇→
+
+235A ;	16DC 0332 ;	MA	#* ( ⍚ → ᛜ̲ ) APL FUNCTIONAL SYMBOL DIAMOND UNDERBAR → RUNIC LETTER INGWAZ, COMBINING LOW LINE	# →◇̲→
+
+22C8 ;	16DE ;	MA	#* ( ⋈ → ᛞ ) BOWTIE → RUNIC LETTER DAGAZ DAEG D	# 
+2A1D ;	16DE ;	MA	#* ( ⨝ → ᛞ ) JOIN → RUNIC LETTER DAGAZ DAEG D	# →⋈→
+
+2195 ;	16E8 ;	MA	#* ( ↕ → ᛨ ) UP DOWN ARROW → RUNIC LETTER ICELANDIC-YR	# 
+
+3131 ;	1100 ;	MA	# ( ㄱ → ᄀ ) HANGUL LETTER KIYEOK → HANGUL CHOSEONG KIYEOK	# 
+11A8 ;	1100 ;	MA	# ( ᆨ → ᄀ ) HANGUL JONGSEONG KIYEOK → HANGUL CHOSEONG KIYEOK	# 
+
+1101 ;	1100 1100 ;	MA	# ( ᄁ → ᄀᄀ ) HANGUL CHOSEONG SSANGKIYEOK → HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG KIYEOK	# 
+3132 ;	1100 1100 ;	MA	# ( ㄲ → ᄀᄀ ) HANGUL LETTER SSANGKIYEOK → HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG KIYEOK	# →ᄁ→
+11A9 ;	1100 1100 ;	MA	# ( ᆩ → ᄀᄀ ) HANGUL JONGSEONG SSANGKIYEOK → HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG KIYEOK	# →ᄁ→
+
+11FA ;	1100 1102 ;	MA	# ( ᇺ → ᄀᄂ ) HANGUL JONGSEONG KIYEOK-NIEUN → HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG NIEUN	# →ᆨᆫ→
+
+115A ;	1100 1103 ;	MA	# ( ᅚ → ᄀᄃ ) HANGUL CHOSEONG KIYEOK-TIKEUT → HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG TIKEUT	# 
+
+11C3 ;	1100 1105 ;	MA	# ( ᇃ → ᄀᄅ ) HANGUL JONGSEONG KIYEOK-RIEUL → HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG RIEUL	# →ᆨᆯ→
+
+11FB ;	1100 1107 ;	MA	# ( ᇻ → ᄀᄇ ) HANGUL JONGSEONG KIYEOK-PIEUP → HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG PIEUP	# →ᆨᆸ→
+
+11AA ;	1100 1109 ;	MA	# ( ᆪ → ᄀᄉ ) HANGUL JONGSEONG KIYEOK-SIOS → HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG SIOS	# →ᆨᆺ→
+3133 ;	1100 1109 ;	MA	# ( ㄳ → ᄀᄉ ) HANGUL LETTER KIYEOK-SIOS → HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG SIOS	# →ᆪ→→ᆨᆺ→
+
+11C4 ;	1100 1109 1100 ;	MA	# ( ᇄ → ᄀᄉᄀ ) HANGUL JONGSEONG KIYEOK-SIOS-KIYEOK → HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG KIYEOK	# →ᆨᆺᆨ→
+
+11FC ;	1100 110E ;	MA	# ( ᇼ → ᄀᄎ ) HANGUL JONGSEONG KIYEOK-CHIEUCH → HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG CHIEUCH	# →ᆨᆾ→
+
+11FD ;	1100 110F ;	MA	# ( ᇽ → ᄀᄏ ) HANGUL JONGSEONG KIYEOK-KHIEUKH → HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG KHIEUKH	# →ᆨᆿ→
+
+11FE ;	1100 1112 ;	MA	# ( ᇾ → ᄀᄒ ) HANGUL JONGSEONG KIYEOK-HIEUH → HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG HIEUH	# →ᆨᇂ→
+
+3134 ;	1102 ;	MA	# ( ㄴ → ᄂ ) HANGUL LETTER NIEUN → HANGUL CHOSEONG NIEUN	# 
+11AB ;	1102 ;	MA	# ( ᆫ → ᄂ ) HANGUL JONGSEONG NIEUN → HANGUL CHOSEONG NIEUN	# 
+
+1113 ;	1102 1100 ;	MA	# ( ᄓ → ᄂᄀ ) HANGUL CHOSEONG NIEUN-KIYEOK → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG KIYEOK	# 
+11C5 ;	1102 1100 ;	MA	# ( ᇅ → ᄂᄀ ) HANGUL JONGSEONG NIEUN-KIYEOK → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG KIYEOK	# →ᄓ→
+
+1114 ;	1102 1102 ;	MA	# ( ᄔ → ᄂᄂ ) HANGUL CHOSEONG SSANGNIEUN → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG NIEUN	# 
+3165 ;	1102 1102 ;	MA	# ( ㅥ → ᄂᄂ ) HANGUL LETTER SSANGNIEUN → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG NIEUN	# →ᄔ→
+11FF ;	1102 1102 ;	MA	# ( ᇿ → ᄂᄂ ) HANGUL JONGSEONG SSANGNIEUN → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG NIEUN	# →ᆫᆫ→
+
+1115 ;	1102 1103 ;	MA	# ( ᄕ → ᄂᄃ ) HANGUL CHOSEONG NIEUN-TIKEUT → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG TIKEUT	# 
+3166 ;	1102 1103 ;	MA	# ( ㅦ → ᄂᄃ ) HANGUL LETTER NIEUN-TIKEUT → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG TIKEUT	# →ᄕ→
+11C6 ;	1102 1103 ;	MA	# ( ᇆ → ᄂᄃ ) HANGUL JONGSEONG NIEUN-TIKEUT → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG TIKEUT	# →ᄕ→
+
+D7CB ;	1102 1105 ;	MA	# ( ퟋ → ᄂᄅ ) HANGUL JONGSEONG NIEUN-RIEUL → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG RIEUL	# →ᆫᆯ→
+
+1116 ;	1102 1107 ;	MA	# ( ᄖ → ᄂᄇ ) HANGUL CHOSEONG NIEUN-PIEUP → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG PIEUP	# 
+
+115B ;	1102 1109 ;	MA	# ( ᅛ → ᄂᄉ ) HANGUL CHOSEONG NIEUN-SIOS → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG SIOS	# 
+11C7 ;	1102 1109 ;	MA	# ( ᇇ → ᄂᄉ ) HANGUL JONGSEONG NIEUN-SIOS → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG SIOS	# →ᆫᆺ→
+3167 ;	1102 1109 ;	MA	# ( ㅧ → ᄂᄉ ) HANGUL LETTER NIEUN-SIOS → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG SIOS	# →ᇇ→→ᆫᆺ→
+
+115C ;	1102 110C ;	MA	# ( ᅜ → ᄂᄌ ) HANGUL CHOSEONG NIEUN-CIEUC → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG CIEUC	# 
+11AC ;	1102 110C ;	MA	# ( ᆬ → ᄂᄌ ) HANGUL JONGSEONG NIEUN-CIEUC → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG CIEUC	# →ᆫᆽ→
+3135 ;	1102 110C ;	MA	# ( ㄵ → ᄂᄌ ) HANGUL LETTER NIEUN-CIEUC → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG CIEUC	# →ᆬ→→ᆫᆽ→
+
+D7CC ;	1102 110E ;	MA	# ( ퟌ → ᄂᄎ ) HANGUL JONGSEONG NIEUN-CHIEUCH → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG CHIEUCH	# →ᆫᆾ→
+
+11C9 ;	1102 1110 ;	MA	# ( ᇉ → ᄂᄐ ) HANGUL JONGSEONG NIEUN-THIEUTH → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG THIEUTH	# →ᆫᇀ→
+
+115D ;	1102 1112 ;	MA	# ( ᅝ → ᄂᄒ ) HANGUL CHOSEONG NIEUN-HIEUH → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG HIEUH	# 
+11AD ;	1102 1112 ;	MA	# ( ᆭ → ᄂᄒ ) HANGUL JONGSEONG NIEUN-HIEUH → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG HIEUH	# →ᆫᇂ→
+3136 ;	1102 1112 ;	MA	# ( ㄶ → ᄂᄒ ) HANGUL LETTER NIEUN-HIEUH → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG HIEUH	# →ᆭ→→ᆫᇂ→
+
+11C8 ;	1102 1140 ;	MA	# ( ᇈ → ᄂᅀ ) HANGUL JONGSEONG NIEUN-PANSIOS → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG PANSIOS	# →ᆫᇫ→
+3168 ;	1102 1140 ;	MA	# ( ㅨ → ᄂᅀ ) HANGUL LETTER NIEUN-PANSIOS → HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG PANSIOS	# →ᇈ→→ᆫᇫ→
+
+3137 ;	1103 ;	MA	# ( ㄷ → ᄃ ) HANGUL LETTER TIKEUT → HANGUL CHOSEONG TIKEUT	# 
+11AE ;	1103 ;	MA	# ( ᆮ → ᄃ ) HANGUL JONGSEONG TIKEUT → HANGUL CHOSEONG TIKEUT	# 
+
+1117 ;	1103 1100 ;	MA	# ( ᄗ → ᄃᄀ ) HANGUL CHOSEONG TIKEUT-KIYEOK → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG KIYEOK	# 
+11CA ;	1103 1100 ;	MA	# ( ᇊ → ᄃᄀ ) HANGUL JONGSEONG TIKEUT-KIYEOK → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG KIYEOK	# →ᄗ→
+
+1104 ;	1103 1103 ;	MA	# ( ᄄ → ᄃᄃ ) HANGUL CHOSEONG SSANGTIKEUT → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG TIKEUT	# 
+3138 ;	1103 1103 ;	MA	# ( ㄸ → ᄃᄃ ) HANGUL LETTER SSANGTIKEUT → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG TIKEUT	# →ᄄ→
+D7CD ;	1103 1103 ;	MA	# ( ퟍ → ᄃᄃ ) HANGUL JONGSEONG SSANGTIKEUT → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG TIKEUT	# →ᆮᆮ→
+
+D7CE ;	1103 1103 1107 ;	MA	# ( ퟎ → ᄃᄃᄇ ) HANGUL JONGSEONG SSANGTIKEUT-PIEUP → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG PIEUP	# →ᆮᆮᆸ→
+
+115E ;	1103 1105 ;	MA	# ( ᅞ → ᄃᄅ ) HANGUL CHOSEONG TIKEUT-RIEUL → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG RIEUL	# 
+11CB ;	1103 1105 ;	MA	# ( ᇋ → ᄃᄅ ) HANGUL JONGSEONG TIKEUT-RIEUL → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG RIEUL	# →ᆮᆯ→
+
+A960 ;	1103 1106 ;	MA	# ( ꥠ → ᄃᄆ ) HANGUL CHOSEONG TIKEUT-MIEUM → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG MIEUM	# 
+
+A961 ;	1103 1107 ;	MA	# ( ꥡ → ᄃᄇ ) HANGUL CHOSEONG TIKEUT-PIEUP → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG PIEUP	# 
+D7CF ;	1103 1107 ;	MA	# ( ퟏ → ᄃᄇ ) HANGUL JONGSEONG TIKEUT-PIEUP → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG PIEUP	# →ᆮᆸ→
+
+A962 ;	1103 1109 ;	MA	# ( ꥢ → ᄃᄉ ) HANGUL CHOSEONG TIKEUT-SIOS → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG SIOS	# 
+D7D0 ;	1103 1109 ;	MA	# ( ퟐ → ᄃᄉ ) HANGUL JONGSEONG TIKEUT-SIOS → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG SIOS	# →ᆮᆺ→
+
+D7D1 ;	1103 1109 1100 ;	MA	# ( ퟑ → ᄃᄉᄀ ) HANGUL JONGSEONG TIKEUT-SIOS-KIYEOK → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG KIYEOK	# →ᆮᆺᆨ→
+
+A963 ;	1103 110C ;	MA	# ( ꥣ → ᄃᄌ ) HANGUL CHOSEONG TIKEUT-CIEUC → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG CIEUC	# 
+D7D2 ;	1103 110C ;	MA	# ( ퟒ → ᄃᄌ ) HANGUL JONGSEONG TIKEUT-CIEUC → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG CIEUC	# →ᆮᆽ→
+
+D7D3 ;	1103 110E ;	MA	# ( ퟓ → ᄃᄎ ) HANGUL JONGSEONG TIKEUT-CHIEUCH → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG CHIEUCH	# →ᆮᆾ→
+
+D7D4 ;	1103 1110 ;	MA	# ( ퟔ → ᄃᄐ ) HANGUL JONGSEONG TIKEUT-THIEUTH → HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG THIEUTH	# →ᆮᇀ→
+
+3139 ;	1105 ;	MA	# ( ㄹ → ᄅ ) HANGUL LETTER RIEUL → HANGUL CHOSEONG RIEUL	# 
+11AF ;	1105 ;	MA	# ( ᆯ → ᄅ ) HANGUL JONGSEONG RIEUL → HANGUL CHOSEONG RIEUL	# 
+
+A964 ;	1105 1100 ;	MA	# ( ꥤ → ᄅᄀ ) HANGUL CHOSEONG RIEUL-KIYEOK → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG KIYEOK	# 
+11B0 ;	1105 1100 ;	MA	# ( ᆰ → ᄅᄀ ) HANGUL JONGSEONG RIEUL-KIYEOK → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG KIYEOK	# →ᆯᆨ→
+313A ;	1105 1100 ;	MA	# ( ㄺ → ᄅᄀ ) HANGUL LETTER RIEUL-KIYEOK → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG KIYEOK	# →ᆰ→→ᆯᆨ→
+
+A965 ;	1105 1100 1100 ;	MA	# ( ꥥ → ᄅᄀᄀ ) HANGUL CHOSEONG RIEUL-SSANGKIYEOK → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG KIYEOK	# 
+D7D5 ;	1105 1100 1100 ;	MA	# ( ퟕ → ᄅᄀᄀ ) HANGUL JONGSEONG RIEUL-SSANGKIYEOK → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG KIYEOK	# →ᆯᆨᆨ→
+
+11CC ;	1105 1100 1109 ;	MA	# ( ᇌ → ᄅᄀᄉ ) HANGUL JONGSEONG RIEUL-KIYEOK-SIOS → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG SIOS	# →ᆯᆨᆺ→
+3169 ;	1105 1100 1109 ;	MA	# ( ㅩ → ᄅᄀᄉ ) HANGUL LETTER RIEUL-KIYEOK-SIOS → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG SIOS	# →ᇌ→→ᆯᆨᆺ→
+
+D7D6 ;	1105 1100 1112 ;	MA	# ( ퟖ → ᄅᄀᄒ ) HANGUL JONGSEONG RIEUL-KIYEOK-HIEUH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG HIEUH	# →ᆯᆨᇂ→
+
+1118 ;	1105 1102 ;	MA	# ( ᄘ → ᄅᄂ ) HANGUL CHOSEONG RIEUL-NIEUN → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG NIEUN	# 
+11CD ;	1105 1102 ;	MA	# ( ᇍ → ᄅᄂ ) HANGUL JONGSEONG RIEUL-NIEUN → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG NIEUN	# →ᄘ→
+
+A966 ;	1105 1103 ;	MA	# ( ꥦ → ᄅᄃ ) HANGUL CHOSEONG RIEUL-TIKEUT → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG TIKEUT	# 
+11CE ;	1105 1103 ;	MA	# ( ᇎ → ᄅᄃ ) HANGUL JONGSEONG RIEUL-TIKEUT → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG TIKEUT	# →ᆯᆮ→
+316A ;	1105 1103 ;	MA	# ( ㅪ → ᄅᄃ ) HANGUL LETTER RIEUL-TIKEUT → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG TIKEUT	# →ᇎ→→ᆯᆮ→
+
+A967 ;	1105 1103 1103 ;	MA	# ( ꥧ → ᄅᄃᄃ ) HANGUL CHOSEONG RIEUL-SSANGTIKEUT → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG TIKEUT	# 
+
+11CF ;	1105 1103 1112 ;	MA	# ( ᇏ → ᄅᄃᄒ ) HANGUL JONGSEONG RIEUL-TIKEUT-HIEUH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG TIKEUT, HANGUL CHOSEONG HIEUH	# →ᆯᆮᇂ→
+
+1119 ;	1105 1105 ;	MA	# ( ᄙ → ᄅᄅ ) HANGUL CHOSEONG SSANGRIEUL → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG RIEUL	# 
+11D0 ;	1105 1105 ;	MA	# ( ᇐ → ᄅᄅ ) HANGUL JONGSEONG SSANGRIEUL → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG RIEUL	# →ᄙ→
+
+D7D7 ;	1105 1105 110F ;	MA	# ( ퟗ → ᄅᄅᄏ ) HANGUL JONGSEONG SSANGRIEUL-KHIEUKH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG KHIEUKH	# →ᆯᆯᆿ→
+
+A968 ;	1105 1106 ;	MA	# ( ꥨ → ᄅᄆ ) HANGUL CHOSEONG RIEUL-MIEUM → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG MIEUM	# 
+11B1 ;	1105 1106 ;	MA	# ( ᆱ → ᄅᄆ ) HANGUL JONGSEONG RIEUL-MIEUM → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG MIEUM	# →ᆯᆷ→
+313B ;	1105 1106 ;	MA	# ( ㄻ → ᄅᄆ ) HANGUL LETTER RIEUL-MIEUM → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG MIEUM	# →ᆱ→→ᆯᆷ→
+
+11D1 ;	1105 1106 1100 ;	MA	# ( ᇑ → ᄅᄆᄀ ) HANGUL JONGSEONG RIEUL-MIEUM-KIYEOK → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG KIYEOK	# →ᆯᆷᆨ→
+
+11D2 ;	1105 1106 1109 ;	MA	# ( ᇒ → ᄅᄆᄉ ) HANGUL JONGSEONG RIEUL-MIEUM-SIOS → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG SIOS	# →ᆯᆷᆺ→
+
+D7D8 ;	1105 1106 1112 ;	MA	# ( ퟘ → ᄅᄆᄒ ) HANGUL JONGSEONG RIEUL-MIEUM-HIEUH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG HIEUH	# →ᆯᆷᇂ→
+
+A969 ;	1105 1107 ;	MA	# ( ꥩ → ᄅᄇ ) HANGUL CHOSEONG RIEUL-PIEUP → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG PIEUP	# 
+11B2 ;	1105 1107 ;	MA	# ( ᆲ → ᄅᄇ ) HANGUL JONGSEONG RIEUL-PIEUP → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG PIEUP	# →ᆯᆸ→
+313C ;	1105 1107 ;	MA	# ( ㄼ → ᄅᄇ ) HANGUL LETTER RIEUL-PIEUP → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG PIEUP	# →ᆲ→→ᆯᆸ→
+
+D7D9 ;	1105 1107 1103 ;	MA	# ( ퟙ → ᄅᄇᄃ ) HANGUL JONGSEONG RIEUL-PIEUP-TIKEUT → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG TIKEUT	# →ᆯᆸᆮ→
+
+A96A ;	1105 1107 1107 ;	MA	# ( ꥪ → ᄅᄇᄇ ) HANGUL CHOSEONG RIEUL-SSANGPIEUP → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG PIEUP	# 
+
+11D3 ;	1105 1107 1109 ;	MA	# ( ᇓ → ᄅᄇᄉ ) HANGUL JONGSEONG RIEUL-PIEUP-SIOS → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG SIOS	# →ᆯᆸᆺ→
+316B ;	1105 1107 1109 ;	MA	# ( ㅫ → ᄅᄇᄉ ) HANGUL LETTER RIEUL-PIEUP-SIOS → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG SIOS	# →ᇓ→→ᆯᆸᆺ→
+
+A96B ;	1105 1107 110B ;	MA	# ( ꥫ → ᄅᄇᄋ ) HANGUL CHOSEONG RIEUL-KAPYEOUNPIEUP → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG IEUNG	# 
+11D5 ;	1105 1107 110B ;	MA	# ( ᇕ → ᄅᄇᄋ ) HANGUL JONGSEONG RIEUL-KAPYEOUNPIEUP → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG IEUNG	# →ᆯᆸᆼ→
+
+D7DA ;	1105 1107 1111 ;	MA	# ( ퟚ → ᄅᄇᄑ ) HANGUL JONGSEONG RIEUL-PIEUP-PHIEUPH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG PHIEUPH	# →ᆯᆸᇁ→
+
+11D4 ;	1105 1107 1112 ;	MA	# ( ᇔ → ᄅᄇᄒ ) HANGUL JONGSEONG RIEUL-PIEUP-HIEUH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG HIEUH	# →ᆯᆸᇂ→
+
+A96C ;	1105 1109 ;	MA	# ( ꥬ → ᄅᄉ ) HANGUL CHOSEONG RIEUL-SIOS → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG SIOS	# 
+11B3 ;	1105 1109 ;	MA	# ( ᆳ → ᄅᄉ ) HANGUL JONGSEONG RIEUL-SIOS → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG SIOS	# →ᆯᆺ→
+313D ;	1105 1109 ;	MA	# ( ㄽ → ᄅᄉ ) HANGUL LETTER RIEUL-SIOS → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG SIOS	# →ᆳ→→ᆯᆺ→
+
+11D6 ;	1105 1109 1109 ;	MA	# ( ᇖ → ᄅᄉᄉ ) HANGUL JONGSEONG RIEUL-SSANGSIOS → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG SIOS	# →ᆯᆺᆺ→
+
+111B ;	1105 110B ;	MA	# ( ᄛ → ᄅᄋ ) HANGUL CHOSEONG KAPYEOUNRIEUL → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG IEUNG	# 
+D7DD ;	1105 110B ;	MA	# ( ퟝ → ᄅᄋ ) HANGUL JONGSEONG KAPYEOUNRIEUL → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG IEUNG	# →ᆯᆼ→
+
+A96D ;	1105 110C ;	MA	# ( ꥭ → ᄅᄌ ) HANGUL CHOSEONG RIEUL-CIEUC → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG CIEUC	# 
+
+A96E ;	1105 110F ;	MA	# ( ꥮ → ᄅᄏ ) HANGUL CHOSEONG RIEUL-KHIEUKH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG KHIEUKH	# 
+11D8 ;	1105 110F ;	MA	# ( ᇘ → ᄅᄏ ) HANGUL JONGSEONG RIEUL-KHIEUKH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG KHIEUKH	# →ᆯᆿ→
+
+11B4 ;	1105 1110 ;	MA	# ( ᆴ → ᄅᄐ ) HANGUL JONGSEONG RIEUL-THIEUTH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG THIEUTH	# →ᆯᇀ→
+313E ;	1105 1110 ;	MA	# ( ㄾ → ᄅᄐ ) HANGUL LETTER RIEUL-THIEUTH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG THIEUTH	# →ᆴ→→ᆯᇀ→
+
+11B5 ;	1105 1111 ;	MA	# ( ᆵ → ᄅᄑ ) HANGUL JONGSEONG RIEUL-PHIEUPH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG PHIEUPH	# →ᆯᇁ→
+313F ;	1105 1111 ;	MA	# ( ㄿ → ᄅᄑ ) HANGUL LETTER RIEUL-PHIEUPH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG PHIEUPH	# →ᆵ→→ᆯᇁ→
+
+111A ;	1105 1112 ;	MA	# ( ᄚ → ᄅᄒ ) HANGUL CHOSEONG RIEUL-HIEUH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG HIEUH	# 
+3140 ;	1105 1112 ;	MA	# ( ㅀ → ᄅᄒ ) HANGUL LETTER RIEUL-HIEUH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG HIEUH	# →ᄚ→
+113B ;	1105 1112 ;	MA	# ( ᄻ → ᄅᄒ ) HANGUL CHOSEONG SIOS-HIEUH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG HIEUH	# →ᄚ→
+11B6 ;	1105 1112 ;	MA	# ( ᆶ → ᄅᄒ ) HANGUL JONGSEONG RIEUL-HIEUH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG HIEUH	# →ᄚ→
+D7F2 ;	1105 1112 ;	MA	# ( ퟲ → ᄅᄒ ) HANGUL JONGSEONG SIOS-HIEUH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG HIEUH	# →ᆺᇂ→→ᄉᄒ→→ᄻ→→ᄚ→
+
+11D7 ;	1105 1140 ;	MA	# ( ᇗ → ᄅᅀ ) HANGUL JONGSEONG RIEUL-PANSIOS → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG PANSIOS	# →ᆯᇫ→
+316C ;	1105 1140 ;	MA	# ( ㅬ → ᄅᅀ ) HANGUL LETTER RIEUL-PANSIOS → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG PANSIOS	# →ᇗ→→ᆯᇫ→
+
+D7DB ;	1105 114C ;	MA	# ( ퟛ → ᄅᅌ ) HANGUL JONGSEONG RIEUL-YESIEUNG → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG YESIEUNG	# →ᆯᇰ→
+
+11D9 ;	1105 1159 ;	MA	# ( ᇙ → ᄅᅙ ) HANGUL JONGSEONG RIEUL-YEORINHIEUH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG YEORINHIEUH	# →ᆯᇹ→
+316D ;	1105 1159 ;	MA	# ( ㅭ → ᄅᅙ ) HANGUL LETTER RIEUL-YEORINHIEUH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG YEORINHIEUH	# →ᇙ→→ᆯᇹ→
+
+D7DC ;	1105 1159 1112 ;	MA	# ( ퟜ → ᄅᅙᄒ ) HANGUL JONGSEONG RIEUL-YEORINHIEUH-HIEUH → HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG YEORINHIEUH, HANGUL CHOSEONG HIEUH	# →ᆯᇹᇂ→
+
+3141 ;	1106 ;	MA	# ( ㅁ → ᄆ ) HANGUL LETTER MIEUM → HANGUL CHOSEONG MIEUM	# 
+11B7 ;	1106 ;	MA	# ( ᆷ → ᄆ ) HANGUL JONGSEONG MIEUM → HANGUL CHOSEONG MIEUM	# 
+
+A96F ;	1106 1100 ;	MA	# ( ꥯ → ᄆᄀ ) HANGUL CHOSEONG MIEUM-KIYEOK → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG KIYEOK	# 
+11DA ;	1106 1100 ;	MA	# ( ᇚ → ᄆᄀ ) HANGUL JONGSEONG MIEUM-KIYEOK → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG KIYEOK	# →ᆷᆨ→
+
+D7DE ;	1106 1102 ;	MA	# ( ퟞ → ᄆᄂ ) HANGUL JONGSEONG MIEUM-NIEUN → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG NIEUN	# →ᆷᆫ→
+
+D7DF ;	1106 1102 1102 ;	MA	# ( ퟟ → ᄆᄂᄂ ) HANGUL JONGSEONG MIEUM-SSANGNIEUN → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG NIEUN, HANGUL CHOSEONG NIEUN	# →ᆷᆫᆫ→
+
+A970 ;	1106 1103 ;	MA	# ( ꥰ → ᄆᄃ ) HANGUL CHOSEONG MIEUM-TIKEUT → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG TIKEUT	# 
+
+11DB ;	1106 1105 ;	MA	# ( ᇛ → ᄆᄅ ) HANGUL JONGSEONG MIEUM-RIEUL → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG RIEUL	# →ᆷᆯ→
+
+D7E0 ;	1106 1106 ;	MA	# ( ퟠ → ᄆᄆ ) HANGUL JONGSEONG SSANGMIEUM → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG MIEUM	# →ᆷᆷ→
+
+111C ;	1106 1107 ;	MA	# ( ᄜ → ᄆᄇ ) HANGUL CHOSEONG MIEUM-PIEUP → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG PIEUP	# 
+316E ;	1106 1107 ;	MA	# ( ㅮ → ᄆᄇ ) HANGUL LETTER MIEUM-PIEUP → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG PIEUP	# →ᄜ→
+11DC ;	1106 1107 ;	MA	# ( ᇜ → ᄆᄇ ) HANGUL JONGSEONG MIEUM-PIEUP → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG PIEUP	# →ᄜ→
+
+D7E1 ;	1106 1107 1109 ;	MA	# ( ퟡ → ᄆᄇᄉ ) HANGUL JONGSEONG MIEUM-PIEUP-SIOS → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG SIOS	# →ᆷᆸᆺ→
+
+A971 ;	1106 1109 ;	MA	# ( ꥱ → ᄆᄉ ) HANGUL CHOSEONG MIEUM-SIOS → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG SIOS	# 
+11DD ;	1106 1109 ;	MA	# ( ᇝ → ᄆᄉ ) HANGUL JONGSEONG MIEUM-SIOS → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG SIOS	# →ᆷᆺ→
+316F ;	1106 1109 ;	MA	# ( ㅯ → ᄆᄉ ) HANGUL LETTER MIEUM-SIOS → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG SIOS	# →ᇝ→→ᆷᆺ→
+
+11DE ;	1106 1109 1109 ;	MA	# ( ᇞ → ᄆᄉᄉ ) HANGUL JONGSEONG MIEUM-SSANGSIOS → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG SIOS	# →ᆷᆺᆺ→
+
+111D ;	1106 110B ;	MA	# ( ᄝ → ᄆᄋ ) HANGUL CHOSEONG KAPYEOUNMIEUM → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG IEUNG	# 
+3171 ;	1106 110B ;	MA	# ( ㅱ → ᄆᄋ ) HANGUL LETTER KAPYEOUNMIEUM → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG IEUNG	# →ᄝ→
+11E2 ;	1106 110B ;	MA	# ( ᇢ → ᄆᄋ ) HANGUL JONGSEONG KAPYEOUNMIEUM → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG IEUNG	# →ᄝ→
+
+D7E2 ;	1106 110C ;	MA	# ( ퟢ → ᄆᄌ ) HANGUL JONGSEONG MIEUM-CIEUC → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG CIEUC	# →ᆷᆽ→
+
+11E0 ;	1106 110E ;	MA	# ( ᇠ → ᄆᄎ ) HANGUL JONGSEONG MIEUM-CHIEUCH → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG CHIEUCH	# →ᆷᆾ→
+
+11E1 ;	1106 1112 ;	MA	# ( ᇡ → ᄆᄒ ) HANGUL JONGSEONG MIEUM-HIEUH → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG HIEUH	# →ᆷᇂ→
+
+11DF ;	1106 1140 ;	MA	# ( ᇟ → ᄆᅀ ) HANGUL JONGSEONG MIEUM-PANSIOS → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG PANSIOS	# →ᆷᇫ→
+3170 ;	1106 1140 ;	MA	# ( ㅰ → ᄆᅀ ) HANGUL LETTER MIEUM-PANSIOS → HANGUL CHOSEONG MIEUM, HANGUL CHOSEONG PANSIOS	# →ᇟ→→ᆷᇫ→
+
+3142 ;	1107 ;	MA	# ( ㅂ → ᄇ ) HANGUL LETTER PIEUP → HANGUL CHOSEONG PIEUP	# 
+11B8 ;	1107 ;	MA	# ( ᆸ → ᄇ ) HANGUL JONGSEONG PIEUP → HANGUL CHOSEONG PIEUP	# 
+
+111E ;	1107 1100 ;	MA	# ( ᄞ → ᄇᄀ ) HANGUL CHOSEONG PIEUP-KIYEOK → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG KIYEOK	# 
+3172 ;	1107 1100 ;	MA	# ( ㅲ → ᄇᄀ ) HANGUL LETTER PIEUP-KIYEOK → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG KIYEOK	# →ᄞ→
+
+111F ;	1107 1102 ;	MA	# ( ᄟ → ᄇᄂ ) HANGUL CHOSEONG PIEUP-NIEUN → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG NIEUN	# 
+
+1120 ;	1107 1103 ;	MA	# ( ᄠ → ᄇᄃ ) HANGUL CHOSEONG PIEUP-TIKEUT → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG TIKEUT	# 
+3173 ;	1107 1103 ;	MA	# ( ㅳ → ᄇᄃ ) HANGUL LETTER PIEUP-TIKEUT → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG TIKEUT	# →ᄠ→
+D7E3 ;	1107 1103 ;	MA	# ( ퟣ → ᄇᄃ ) HANGUL JONGSEONG PIEUP-TIKEUT → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG TIKEUT	# →ᆸᆮ→
+
+11E3 ;	1107 1105 ;	MA	# ( ᇣ → ᄇᄅ ) HANGUL JONGSEONG PIEUP-RIEUL → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG RIEUL	# →ᆸᆯ→
+
+D7E4 ;	1107 1105 1111 ;	MA	# ( ퟤ → ᄇᄅᄑ ) HANGUL JONGSEONG PIEUP-RIEUL-PHIEUPH → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG RIEUL, HANGUL CHOSEONG PHIEUPH	# →ᆸᆯᇁ→
+
+D7E5 ;	1107 1106 ;	MA	# ( ퟥ → ᄇᄆ ) HANGUL JONGSEONG PIEUP-MIEUM → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG MIEUM	# →ᆸᆷ→
+
+1108 ;	1107 1107 ;	MA	# ( ᄈ → ᄇᄇ ) HANGUL CHOSEONG SSANGPIEUP → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG PIEUP	# 
+3143 ;	1107 1107 ;	MA	# ( ㅃ → ᄇᄇ ) HANGUL LETTER SSANGPIEUP → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG PIEUP	# →ᄈ→
+D7E6 ;	1107 1107 ;	MA	# ( ퟦ → ᄇᄇ ) HANGUL JONGSEONG SSANGPIEUP → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG PIEUP	# →ᆸᆸ→
+
+112C ;	1107 1107 110B ;	MA	# ( ᄬ → ᄇᄇᄋ ) HANGUL CHOSEONG KAPYEOUNSSANGPIEUP → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG IEUNG	# 
+3179 ;	1107 1107 110B ;	MA	# ( ㅹ → ᄇᄇᄋ ) HANGUL LETTER KAPYEOUNSSANGPIEUP → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG IEUNG	# →ᄬ→
+
+1121 ;	1107 1109 ;	MA	# ( ᄡ → ᄇᄉ ) HANGUL CHOSEONG PIEUP-SIOS → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG SIOS	# 
+3144 ;	1107 1109 ;	MA	# ( ㅄ → ᄇᄉ ) HANGUL LETTER PIEUP-SIOS → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG SIOS	# →ᄡ→
+11B9 ;	1107 1109 ;	MA	# ( ᆹ → ᄇᄉ ) HANGUL JONGSEONG PIEUP-SIOS → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG SIOS	# →ᄡ→
+
+1122 ;	1107 1109 1100 ;	MA	# ( ᄢ → ᄇᄉᄀ ) HANGUL CHOSEONG PIEUP-SIOS-KIYEOK → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG KIYEOK	# 
+3174 ;	1107 1109 1100 ;	MA	# ( ㅴ → ᄇᄉᄀ ) HANGUL LETTER PIEUP-SIOS-KIYEOK → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG KIYEOK	# →ᄢ→
+
+1123 ;	1107 1109 1103 ;	MA	# ( ᄣ → ᄇᄉᄃ ) HANGUL CHOSEONG PIEUP-SIOS-TIKEUT → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG TIKEUT	# 
+3175 ;	1107 1109 1103 ;	MA	# ( ㅵ → ᄇᄉᄃ ) HANGUL LETTER PIEUP-SIOS-TIKEUT → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG TIKEUT	# →ᄣ→
+D7E7 ;	1107 1109 1103 ;	MA	# ( ퟧ → ᄇᄉᄃ ) HANGUL JONGSEONG PIEUP-SIOS-TIKEUT → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG TIKEUT	# →ᆸᆺᆮ→
+
+1124 ;	1107 1109 1107 ;	MA	# ( ᄤ → ᄇᄉᄇ ) HANGUL CHOSEONG PIEUP-SIOS-PIEUP → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG PIEUP	# 
+
+1125 ;	1107 1109 1109 ;	MA	# ( ᄥ → ᄇᄉᄉ ) HANGUL CHOSEONG PIEUP-SSANGSIOS → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG SIOS	# 
+
+1126 ;	1107 1109 110C ;	MA	# ( ᄦ → ᄇᄉᄌ ) HANGUL CHOSEONG PIEUP-SIOS-CIEUC → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG CIEUC	# 
+
+A972 ;	1107 1109 1110 ;	MA	# ( ꥲ → ᄇᄉᄐ ) HANGUL CHOSEONG PIEUP-SIOS-THIEUTH → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG THIEUTH	# 
+
+112B ;	1107 110B ;	MA	# ( ᄫ → ᄇᄋ ) HANGUL CHOSEONG KAPYEOUNPIEUP → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG IEUNG	# 
+3178 ;	1107 110B ;	MA	# ( ㅸ → ᄇᄋ ) HANGUL LETTER KAPYEOUNPIEUP → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG IEUNG	# →ᄫ→
+11E6 ;	1107 110B ;	MA	# ( ᇦ → ᄇᄋ ) HANGUL JONGSEONG KAPYEOUNPIEUP → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG IEUNG	# →ᄫ→
+
+1127 ;	1107 110C ;	MA	# ( ᄧ → ᄇᄌ ) HANGUL CHOSEONG PIEUP-CIEUC → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG CIEUC	# 
+3176 ;	1107 110C ;	MA	# ( ㅶ → ᄇᄌ ) HANGUL LETTER PIEUP-CIEUC → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG CIEUC	# →ᄧ→
+D7E8 ;	1107 110C ;	MA	# ( ퟨ → ᄇᄌ ) HANGUL JONGSEONG PIEUP-CIEUC → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG CIEUC	# →ᆸᆽ→
+
+1128 ;	1107 110E ;	MA	# ( ᄨ → ᄇᄎ ) HANGUL CHOSEONG PIEUP-CHIEUCH → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG CHIEUCH	# 
+D7E9 ;	1107 110E ;	MA	# ( ퟩ → ᄇᄎ ) HANGUL JONGSEONG PIEUP-CHIEUCH → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG CHIEUCH	# →ᆸᆾ→
+
+A973 ;	1107 110F ;	MA	# ( ꥳ → ᄇᄏ ) HANGUL CHOSEONG PIEUP-KHIEUKH → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG KHIEUKH	# 
+
+1129 ;	1107 1110 ;	MA	# ( ᄩ → ᄇᄐ ) HANGUL CHOSEONG PIEUP-THIEUTH → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG THIEUTH	# 
+3177 ;	1107 1110 ;	MA	# ( ㅷ → ᄇᄐ ) HANGUL LETTER PIEUP-THIEUTH → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG THIEUTH	# →ᄩ→
+
+112A ;	1107 1111 ;	MA	# ( ᄪ → ᄇᄑ ) HANGUL CHOSEONG PIEUP-PHIEUPH → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG PHIEUPH	# 
+11E4 ;	1107 1111 ;	MA	# ( ᇤ → ᄇᄑ ) HANGUL JONGSEONG PIEUP-PHIEUPH → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG PHIEUPH	# →ᄪ→
+
+A974 ;	1107 1112 ;	MA	# ( ꥴ → ᄇᄒ ) HANGUL CHOSEONG PIEUP-HIEUH → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG HIEUH	# 
+11E5 ;	1107 1112 ;	MA	# ( ᇥ → ᄇᄒ ) HANGUL JONGSEONG PIEUP-HIEUH → HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG HIEUH	# →ᆸᇂ→
+
+3145 ;	1109 ;	MA	# ( ㅅ → ᄉ ) HANGUL LETTER SIOS → HANGUL CHOSEONG SIOS	# 
+11BA ;	1109 ;	MA	# ( ᆺ → ᄉ ) HANGUL JONGSEONG SIOS → HANGUL CHOSEONG SIOS	# 
+
+112D ;	1109 1100 ;	MA	# ( ᄭ → ᄉᄀ ) HANGUL CHOSEONG SIOS-KIYEOK → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG KIYEOK	# 
+317A ;	1109 1100 ;	MA	# ( ㅺ → ᄉᄀ ) HANGUL LETTER SIOS-KIYEOK → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG KIYEOK	# →ᄭ→
+11E7 ;	1109 1100 ;	MA	# ( ᇧ → ᄉᄀ ) HANGUL JONGSEONG SIOS-KIYEOK → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG KIYEOK	# →ᄭ→
+
+112E ;	1109 1102 ;	MA	# ( ᄮ → ᄉᄂ ) HANGUL CHOSEONG SIOS-NIEUN → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG NIEUN	# 
+317B ;	1109 1102 ;	MA	# ( ㅻ → ᄉᄂ ) HANGUL LETTER SIOS-NIEUN → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG NIEUN	# →ᄮ→
+
+112F ;	1109 1103 ;	MA	# ( ᄯ → ᄉᄃ ) HANGUL CHOSEONG SIOS-TIKEUT → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG TIKEUT	# 
+317C ;	1109 1103 ;	MA	# ( ㅼ → ᄉᄃ ) HANGUL LETTER SIOS-TIKEUT → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG TIKEUT	# →ᄯ→
+11E8 ;	1109 1103 ;	MA	# ( ᇨ → ᄉᄃ ) HANGUL JONGSEONG SIOS-TIKEUT → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG TIKEUT	# →ᄯ→
+
+1130 ;	1109 1105 ;	MA	# ( ᄰ → ᄉᄅ ) HANGUL CHOSEONG SIOS-RIEUL → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG RIEUL	# 
+11E9 ;	1109 1105 ;	MA	# ( ᇩ → ᄉᄅ ) HANGUL JONGSEONG SIOS-RIEUL → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG RIEUL	# →ᄰ→
+
+1131 ;	1109 1106 ;	MA	# ( ᄱ → ᄉᄆ ) HANGUL CHOSEONG SIOS-MIEUM → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG MIEUM	# 
+D7EA ;	1109 1106 ;	MA	# ( ퟪ → ᄉᄆ ) HANGUL JONGSEONG SIOS-MIEUM → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG MIEUM	# →ᆺᆷ→
+
+1132 ;	1109 1107 ;	MA	# ( ᄲ → ᄉᄇ ) HANGUL CHOSEONG SIOS-PIEUP → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG PIEUP	# 
+317D ;	1109 1107 ;	MA	# ( ㅽ → ᄉᄇ ) HANGUL LETTER SIOS-PIEUP → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG PIEUP	# →ᄲ→
+11EA ;	1109 1107 ;	MA	# ( ᇪ → ᄉᄇ ) HANGUL JONGSEONG SIOS-PIEUP → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG PIEUP	# →ᄲ→
+
+1133 ;	1109 1107 1100 ;	MA	# ( ᄳ → ᄉᄇᄀ ) HANGUL CHOSEONG SIOS-PIEUP-KIYEOK → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG KIYEOK	# 
+
+D7EB ;	1109 1107 110B ;	MA	# ( ퟫ → ᄉᄇᄋ ) HANGUL JONGSEONG SIOS-KAPYEOUNPIEUP → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG IEUNG	# →ᆺᆸᆼ→
+
+110A ;	1109 1109 ;	MA	# ( ᄊ → ᄉᄉ ) HANGUL CHOSEONG SSANGSIOS → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG SIOS	# 
+3146 ;	1109 1109 ;	MA	# ( ㅆ → ᄉᄉ ) HANGUL LETTER SSANGSIOS → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG SIOS	# →ᄊ→
+11BB ;	1109 1109 ;	MA	# ( ᆻ → ᄉᄉ ) HANGUL JONGSEONG SSANGSIOS → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG SIOS	# →ᄊ→
+
+D7EC ;	1109 1109 1100 ;	MA	# ( ퟬ → ᄉᄉᄀ ) HANGUL JONGSEONG SSANGSIOS-KIYEOK → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG KIYEOK	# →ᆺᆺᆨ→
+
+D7ED ;	1109 1109 1103 ;	MA	# ( ퟭ → ᄉᄉᄃ ) HANGUL JONGSEONG SSANGSIOS-TIKEUT → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG TIKEUT	# →ᆺᆺᆮ→
+
+A975 ;	1109 1109 1107 ;	MA	# ( ꥵ → ᄉᄉᄇ ) HANGUL CHOSEONG SSANGSIOS-PIEUP → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG PIEUP	# 
+
+1134 ;	1109 1109 1109 ;	MA	# ( ᄴ → ᄉᄉᄉ ) HANGUL CHOSEONG SIOS-SSANGSIOS → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG SIOS, HANGUL CHOSEONG SIOS	# 
+
+1135 ;	1109 110B ;	MA	# ( ᄵ → ᄉᄋ ) HANGUL CHOSEONG SIOS-IEUNG → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG IEUNG	# 
+
+1136 ;	1109 110C ;	MA	# ( ᄶ → ᄉᄌ ) HANGUL CHOSEONG SIOS-CIEUC → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG CIEUC	# 
+317E ;	1109 110C ;	MA	# ( ㅾ → ᄉᄌ ) HANGUL LETTER SIOS-CIEUC → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG CIEUC	# →ᄶ→
+D7EF ;	1109 110C ;	MA	# ( ퟯ → ᄉᄌ ) HANGUL JONGSEONG SIOS-CIEUC → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG CIEUC	# →ᆺᆽ→
+
+1137 ;	1109 110E ;	MA	# ( ᄷ → ᄉᄎ ) HANGUL CHOSEONG SIOS-CHIEUCH → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG CHIEUCH	# 
+D7F0 ;	1109 110E ;	MA	# ( ퟰ → ᄉᄎ ) HANGUL JONGSEONG SIOS-CHIEUCH → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG CHIEUCH	# →ᆺᆾ→
+
+1138 ;	1109 110F ;	MA	# ( ᄸ → ᄉᄏ ) HANGUL CHOSEONG SIOS-KHIEUKH → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG KHIEUKH	# 
+
+1139 ;	1109 1110 ;	MA	# ( ᄹ → ᄉᄐ ) HANGUL CHOSEONG SIOS-THIEUTH → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG THIEUTH	# 
+D7F1 ;	1109 1110 ;	MA	# ( ퟱ → ᄉᄐ ) HANGUL JONGSEONG SIOS-THIEUTH → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG THIEUTH	# →ᆺᇀ→
+
+113A ;	1109 1111 ;	MA	# ( ᄺ → ᄉᄑ ) HANGUL CHOSEONG SIOS-PHIEUPH → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG PHIEUPH	# 
+
+D7EE ;	1109 1140 ;	MA	# ( ퟮ → ᄉᅀ ) HANGUL JONGSEONG SIOS-PANSIOS → HANGUL CHOSEONG SIOS, HANGUL CHOSEONG PANSIOS	# →ᆺᇫ→
+
+3147 ;	110B ;	MA	# ( ㅇ → ᄋ ) HANGUL LETTER IEUNG → HANGUL CHOSEONG IEUNG	# 
+11BC ;	110B ;	MA	# ( ᆼ → ᄋ ) HANGUL JONGSEONG IEUNG → HANGUL CHOSEONG IEUNG	# 
+
+1141 ;	110B 1100 ;	MA	# ( ᅁ → ᄋᄀ ) HANGUL CHOSEONG IEUNG-KIYEOK → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG KIYEOK	# 
+11EC ;	110B 1100 ;	MA	# ( ᇬ → ᄋᄀ ) HANGUL JONGSEONG IEUNG-KIYEOK → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG KIYEOK	# →ᅁ→
+
+11ED ;	110B 1100 1100 ;	MA	# ( ᇭ → ᄋᄀᄀ ) HANGUL JONGSEONG IEUNG-SSANGKIYEOK → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG KIYEOK, HANGUL CHOSEONG KIYEOK	# →ᆼᆨᆨ→
+
+1142 ;	110B 1103 ;	MA	# ( ᅂ → ᄋᄃ ) HANGUL CHOSEONG IEUNG-TIKEUT → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG TIKEUT	# 
+
+A976 ;	110B 1105 ;	MA	# ( ꥶ → ᄋᄅ ) HANGUL CHOSEONG IEUNG-RIEUL → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG RIEUL	# 
+
+1143 ;	110B 1106 ;	MA	# ( ᅃ → ᄋᄆ ) HANGUL CHOSEONG IEUNG-MIEUM → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG MIEUM	# 
+
+1144 ;	110B 1107 ;	MA	# ( ᅄ → ᄋᄇ ) HANGUL CHOSEONG IEUNG-PIEUP → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG PIEUP	# 
+
+1145 ;	110B 1109 ;	MA	# ( ᅅ → ᄋᄉ ) HANGUL CHOSEONG IEUNG-SIOS → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG SIOS	# 
+11F1 ;	110B 1109 ;	MA	# ( ᇱ → ᄋᄉ ) HANGUL JONGSEONG YESIEUNG-SIOS → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG SIOS	# →ᅅ→
+3182 ;	110B 1109 ;	MA	# ( ㆂ → ᄋᄉ ) HANGUL LETTER YESIEUNG-SIOS → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG SIOS	# →ᇱ→→ᅅ→
+
+1147 ;	110B 110B ;	MA	# ( ᅇ → ᄋᄋ ) HANGUL CHOSEONG SSANGIEUNG → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG IEUNG	# 
+3180 ;	110B 110B ;	MA	# ( ㆀ → ᄋᄋ ) HANGUL LETTER SSANGIEUNG → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG IEUNG	# →ᅇ→
+11EE ;	110B 110B ;	MA	# ( ᇮ → ᄋᄋ ) HANGUL JONGSEONG SSANGIEUNG → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG IEUNG	# →ᅇ→
+
+1148 ;	110B 110C ;	MA	# ( ᅈ → ᄋᄌ ) HANGUL CHOSEONG IEUNG-CIEUC → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG CIEUC	# 
+
+1149 ;	110B 110E ;	MA	# ( ᅉ → ᄋᄎ ) HANGUL CHOSEONG IEUNG-CHIEUCH → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG CHIEUCH	# 
+
+11EF ;	110B 110F ;	MA	# ( ᇯ → ᄋᄏ ) HANGUL JONGSEONG IEUNG-KHIEUKH → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG KHIEUKH	# →ᆼᆿ→
+
+114A ;	110B 1110 ;	MA	# ( ᅊ → ᄋᄐ ) HANGUL CHOSEONG IEUNG-THIEUTH → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG THIEUTH	# 
+
+114B ;	110B 1111 ;	MA	# ( ᅋ → ᄋᄑ ) HANGUL CHOSEONG IEUNG-PHIEUPH → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG PHIEUPH	# 
+
+A977 ;	110B 1112 ;	MA	# ( ꥷ → ᄋᄒ ) HANGUL CHOSEONG IEUNG-HIEUH → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG HIEUH	# 
+
+1146 ;	110B 1140 ;	MA	# ( ᅆ → ᄋᅀ ) HANGUL CHOSEONG IEUNG-PANSIOS → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG PANSIOS	# 
+11F2 ;	110B 1140 ;	MA	# ( ᇲ → ᄋᅀ ) HANGUL JONGSEONG YESIEUNG-PANSIOS → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG PANSIOS	# →ᅆ→
+3183 ;	110B 1140 ;	MA	# ( ㆃ → ᄋᅀ ) HANGUL LETTER YESIEUNG-PANSIOS → HANGUL CHOSEONG IEUNG, HANGUL CHOSEONG PANSIOS	# →ᇲ→→ᅆ→
+
+3148 ;	110C ;	MA	# ( ㅈ → ᄌ ) HANGUL LETTER CIEUC → HANGUL CHOSEONG CIEUC	# 
+11BD ;	110C ;	MA	# ( ᆽ → ᄌ ) HANGUL JONGSEONG CIEUC → HANGUL CHOSEONG CIEUC	# 
+
+D7F7 ;	110C 1107 ;	MA	# ( ퟷ → ᄌᄇ ) HANGUL JONGSEONG CIEUC-PIEUP → HANGUL CHOSEONG CIEUC, HANGUL CHOSEONG PIEUP	# →ᆽᆸ→
+
+D7F8 ;	110C 1107 1107 ;	MA	# ( ퟸ → ᄌᄇᄇ ) HANGUL JONGSEONG CIEUC-SSANGPIEUP → HANGUL CHOSEONG CIEUC, HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG PIEUP	# →ᆽᆸᆸ→
+
+114D ;	110C 110B ;	MA	# ( ᅍ → ᄌᄋ ) HANGUL CHOSEONG CIEUC-IEUNG → HANGUL CHOSEONG CIEUC, HANGUL CHOSEONG IEUNG	# 
+
+110D ;	110C 110C ;	MA	# ( ᄍ → ᄌᄌ ) HANGUL CHOSEONG SSANGCIEUC → HANGUL CHOSEONG CIEUC, HANGUL CHOSEONG CIEUC	# 
+3149 ;	110C 110C ;	MA	# ( ㅉ → ᄌᄌ ) HANGUL LETTER SSANGCIEUC → HANGUL CHOSEONG CIEUC, HANGUL CHOSEONG CIEUC	# →ᄍ→
+D7F9 ;	110C 110C ;	MA	# ( ퟹ → ᄌᄌ ) HANGUL JONGSEONG SSANGCIEUC → HANGUL CHOSEONG CIEUC, HANGUL CHOSEONG CIEUC	# →ᆽᆽ→
+
+A978 ;	110C 110C 1112 ;	MA	# ( ꥸ → ᄌᄌᄒ ) HANGUL CHOSEONG SSANGCIEUC-HIEUH → HANGUL CHOSEONG CIEUC, HANGUL CHOSEONG CIEUC, HANGUL CHOSEONG HIEUH	# 
+
+314A ;	110E ;	MA	# ( ㅊ → ᄎ ) HANGUL LETTER CHIEUCH → HANGUL CHOSEONG CHIEUCH	# 
+11BE ;	110E ;	MA	# ( ᆾ → ᄎ ) HANGUL JONGSEONG CHIEUCH → HANGUL CHOSEONG CHIEUCH	# 
+
+1152 ;	110E 110F ;	MA	# ( ᅒ → ᄎᄏ ) HANGUL CHOSEONG CHIEUCH-KHIEUKH → HANGUL CHOSEONG CHIEUCH, HANGUL CHOSEONG KHIEUKH	# 
+
+1153 ;	110E 1112 ;	MA	# ( ᅓ → ᄎᄒ ) HANGUL CHOSEONG CHIEUCH-HIEUH → HANGUL CHOSEONG CHIEUCH, HANGUL CHOSEONG HIEUH	# 
+
+314B ;	110F ;	MA	# ( ㅋ → ᄏ ) HANGUL LETTER KHIEUKH → HANGUL CHOSEONG KHIEUKH	# 
+11BF ;	110F ;	MA	# ( ᆿ → ᄏ ) HANGUL JONGSEONG KHIEUKH → HANGUL CHOSEONG KHIEUKH	# 
+
+314C ;	1110 ;	MA	# ( ㅌ → ᄐ ) HANGUL LETTER THIEUTH → HANGUL CHOSEONG THIEUTH	# 
+11C0 ;	1110 ;	MA	# ( ᇀ → ᄐ ) HANGUL JONGSEONG THIEUTH → HANGUL CHOSEONG THIEUTH	# 
+
+A979 ;	1110 1110 ;	MA	# ( ꥹ → ᄐᄐ ) HANGUL CHOSEONG SSANGTHIEUTH → HANGUL CHOSEONG THIEUTH, HANGUL CHOSEONG THIEUTH	# 
+
+314D ;	1111 ;	MA	# ( ㅍ → ᄑ ) HANGUL LETTER PHIEUPH → HANGUL CHOSEONG PHIEUPH	# 
+11C1 ;	1111 ;	MA	# ( ᇁ → ᄑ ) HANGUL JONGSEONG PHIEUPH → HANGUL CHOSEONG PHIEUPH	# 
+
+1156 ;	1111 1107 ;	MA	# ( ᅖ → ᄑᄇ ) HANGUL CHOSEONG PHIEUPH-PIEUP → HANGUL CHOSEONG PHIEUPH, HANGUL CHOSEONG PIEUP	# 
+11F3 ;	1111 1107 ;	MA	# ( ᇳ → ᄑᄇ ) HANGUL JONGSEONG PHIEUPH-PIEUP → HANGUL CHOSEONG PHIEUPH, HANGUL CHOSEONG PIEUP	# →ᅖ→
+
+D7FA ;	1111 1109 ;	MA	# ( ퟺ → ᄑᄉ ) HANGUL JONGSEONG PHIEUPH-SIOS → HANGUL CHOSEONG PHIEUPH, HANGUL CHOSEONG SIOS	# →ᇁᆺ→
+
+1157 ;	1111 110B ;	MA	# ( ᅗ → ᄑᄋ ) HANGUL CHOSEONG KAPYEOUNPHIEUPH → HANGUL CHOSEONG PHIEUPH, HANGUL CHOSEONG IEUNG	# 
+3184 ;	1111 110B ;	MA	# ( ㆄ → ᄑᄋ ) HANGUL LETTER KAPYEOUNPHIEUPH → HANGUL CHOSEONG PHIEUPH, HANGUL CHOSEONG IEUNG	# →ᅗ→
+11F4 ;	1111 110B ;	MA	# ( ᇴ → ᄑᄋ ) HANGUL JONGSEONG KAPYEOUNPHIEUPH → HANGUL CHOSEONG PHIEUPH, HANGUL CHOSEONG IEUNG	# →ᅗ→
+
+D7FB ;	1111 1110 ;	MA	# ( ퟻ → ᄑᄐ ) HANGUL JONGSEONG PHIEUPH-THIEUTH → HANGUL CHOSEONG PHIEUPH, HANGUL CHOSEONG THIEUTH	# →ᇁᇀ→
+
+A97A ;	1111 1112 ;	MA	# ( ꥺ → ᄑᄒ ) HANGUL CHOSEONG PHIEUPH-HIEUH → HANGUL CHOSEONG PHIEUPH, HANGUL CHOSEONG HIEUH	# 
+
+314E ;	1112 ;	MA	# ( ㅎ → ᄒ ) HANGUL LETTER HIEUH → HANGUL CHOSEONG HIEUH	# 
+11C2 ;	1112 ;	MA	# ( ᇂ → ᄒ ) HANGUL JONGSEONG HIEUH → HANGUL CHOSEONG HIEUH	# 
+
+11F5 ;	1112 1102 ;	MA	# ( ᇵ → ᄒᄂ ) HANGUL JONGSEONG HIEUH-NIEUN → HANGUL CHOSEONG HIEUH, HANGUL CHOSEONG NIEUN	# →ᇂᆫ→
+
+11F6 ;	1112 1105 ;	MA	# ( ᇶ → ᄒᄅ ) HANGUL JONGSEONG HIEUH-RIEUL → HANGUL CHOSEONG HIEUH, HANGUL CHOSEONG RIEUL	# →ᇂᆯ→
+
+11F7 ;	1112 1106 ;	MA	# ( ᇷ → ᄒᄆ ) HANGUL JONGSEONG HIEUH-MIEUM → HANGUL CHOSEONG HIEUH, HANGUL CHOSEONG MIEUM	# →ᇂᆷ→
+
+11F8 ;	1112 1107 ;	MA	# ( ᇸ → ᄒᄇ ) HANGUL JONGSEONG HIEUH-PIEUP → HANGUL CHOSEONG HIEUH, HANGUL CHOSEONG PIEUP	# →ᇂᆸ→
+
+A97B ;	1112 1109 ;	MA	# ( ꥻ → ᄒᄉ ) HANGUL CHOSEONG HIEUH-SIOS → HANGUL CHOSEONG HIEUH, HANGUL CHOSEONG SIOS	# 
+
+1158 ;	1112 1112 ;	MA	# ( ᅘ → ᄒᄒ ) HANGUL CHOSEONG SSANGHIEUH → HANGUL CHOSEONG HIEUH, HANGUL CHOSEONG HIEUH	# 
+3185 ;	1112 1112 ;	MA	# ( ㆅ → ᄒᄒ ) HANGUL LETTER SSANGHIEUH → HANGUL CHOSEONG HIEUH, HANGUL CHOSEONG HIEUH	# →ᅘ→
+
+113D ;	113C 113C ;	MA	# ( ᄽ → ᄼᄼ ) HANGUL CHOSEONG CHITUEUMSSANGSIOS → HANGUL CHOSEONG CHITUEUMSIOS, HANGUL CHOSEONG CHITUEUMSIOS	# 
+
+113F ;	113E 113E ;	MA	# ( ᄿ → ᄾᄾ ) HANGUL CHOSEONG CEONGCHIEUMSSANGSIOS → HANGUL CHOSEONG CEONGCHIEUMSIOS, HANGUL CHOSEONG CEONGCHIEUMSIOS	# 
+
+317F ;	1140 ;	MA	# ( ㅿ → ᅀ ) HANGUL LETTER PANSIOS → HANGUL CHOSEONG PANSIOS	# 
+11EB ;	1140 ;	MA	# ( ᇫ → ᅀ ) HANGUL JONGSEONG PANSIOS → HANGUL CHOSEONG PANSIOS	# 
+
+D7F3 ;	1140 1107 ;	MA	# ( ퟳ → ᅀᄇ ) HANGUL JONGSEONG PANSIOS-PIEUP → HANGUL CHOSEONG PANSIOS, HANGUL CHOSEONG PIEUP	# →ᇫᆸ→
+
+D7F4 ;	1140 1107 110B ;	MA	# ( ퟴ → ᅀᄇᄋ ) HANGUL JONGSEONG PANSIOS-KAPYEOUNPIEUP → HANGUL CHOSEONG PANSIOS, HANGUL CHOSEONG PIEUP, HANGUL CHOSEONG IEUNG	# →ᇫᆸᆼ→
+
+3181 ;	114C ;	MA	# ( ㆁ → ᅌ ) HANGUL LETTER YESIEUNG → HANGUL CHOSEONG YESIEUNG	# 
+11F0 ;	114C ;	MA	# ( ᇰ → ᅌ ) HANGUL JONGSEONG YESIEUNG → HANGUL CHOSEONG YESIEUNG	# 
+
+D7F5 ;	114C 1106 ;	MA	# ( ퟵ → ᅌᄆ ) HANGUL JONGSEONG YESIEUNG-MIEUM → HANGUL CHOSEONG YESIEUNG, HANGUL CHOSEONG MIEUM	# →ᇰᆷ→
+
+D7F6 ;	114C 1112 ;	MA	# ( ퟶ → ᅌᄒ ) HANGUL JONGSEONG YESIEUNG-HIEUH → HANGUL CHOSEONG YESIEUNG, HANGUL CHOSEONG HIEUH	# →ᇰᇂ→
+
+114F ;	114E 114E ;	MA	# ( ᅏ → ᅎᅎ ) HANGUL CHOSEONG CHITUEUMSSANGCIEUC → HANGUL CHOSEONG CHITUEUMCIEUC, HANGUL CHOSEONG CHITUEUMCIEUC	# 
+
+1151 ;	1150 1150 ;	MA	# ( ᅑ → ᅐᅐ ) HANGUL CHOSEONG CEONGCHIEUMSSANGCIEUC → HANGUL CHOSEONG CEONGCHIEUMCIEUC, HANGUL CHOSEONG CEONGCHIEUMCIEUC	# 
+
+3186 ;	1159 ;	MA	# ( ㆆ → ᅙ ) HANGUL LETTER YEORINHIEUH → HANGUL CHOSEONG YEORINHIEUH	# 
+11F9 ;	1159 ;	MA	# ( ᇹ → ᅙ ) HANGUL JONGSEONG YEORINHIEUH → HANGUL CHOSEONG YEORINHIEUH	# 
+
+A97C ;	1159 1159 ;	MA	# ( ꥼ → ᅙᅙ ) HANGUL CHOSEONG SSANGYEORINHIEUH → HANGUL CHOSEONG YEORINHIEUH, HANGUL CHOSEONG YEORINHIEUH	# 
+
+3164 ;	1160 ;	MA	# (  →  ) HANGUL FILLER → HANGUL JUNGSEONG FILLER	# 
+
+314F ;	1161 ;	MA	# ( ㅏ → ᅡ ) HANGUL LETTER A → HANGUL JUNGSEONG A	# 
+
+11A3 ;	1161 30FC ;	MA	# ( ᆣ → ᅡー ) HANGUL JUNGSEONG A-EU → HANGUL JUNGSEONG A, KATAKANA-HIRAGANA PROLONGED SOUND MARK	# →ᅡᅳ→
+
+1176 ;	1161 1169 ;	MA	# ( ᅶ → ᅡᅩ ) HANGUL JUNGSEONG A-O → HANGUL JUNGSEONG A, HANGUL JUNGSEONG O	# 
+
+1177 ;	1161 116E ;	MA	# ( ᅷ → ᅡᅮ ) HANGUL JUNGSEONG A-U → HANGUL JUNGSEONG A, HANGUL JUNGSEONG U	# 
+
+1162 ;	1161 4E28 ;	MA	# ( ᅢ → ᅡ丨 ) HANGUL JUNGSEONG AE → HANGUL JUNGSEONG A, CJK UNIFIED IDEOGRAPH-4E28	# →ᅡᅵ→
+3150 ;	1161 4E28 ;	MA	# ( ㅐ → ᅡ丨 ) HANGUL LETTER AE → HANGUL JUNGSEONG A, CJK UNIFIED IDEOGRAPH-4E28	# →ᅢ→→ᅡᅵ→
+
+3151 ;	1163 ;	MA	# ( ㅑ → ᅣ ) HANGUL LETTER YA → HANGUL JUNGSEONG YA	# 
+
+1178 ;	1163 1169 ;	MA	# ( ᅸ → ᅣᅩ ) HANGUL JUNGSEONG YA-O → HANGUL JUNGSEONG YA, HANGUL JUNGSEONG O	# 
+
+1179 ;	1163 116D ;	MA	# ( ᅹ → ᅣᅭ ) HANGUL JUNGSEONG YA-YO → HANGUL JUNGSEONG YA, HANGUL JUNGSEONG YO	# 
+
+11A4 ;	1163 116E ;	MA	# ( ᆤ → ᅣᅮ ) HANGUL JUNGSEONG YA-U → HANGUL JUNGSEONG YA, HANGUL JUNGSEONG U	# 
+
+1164 ;	1163 4E28 ;	MA	# ( ᅤ → ᅣ丨 ) HANGUL JUNGSEONG YAE → HANGUL JUNGSEONG YA, CJK UNIFIED IDEOGRAPH-4E28	# →ᅣᅵ→
+3152 ;	1163 4E28 ;	MA	# ( ㅒ → ᅣ丨 ) HANGUL LETTER YAE → HANGUL JUNGSEONG YA, CJK UNIFIED IDEOGRAPH-4E28	# →ᅤ→→ᅣᅵ→
+
+3153 ;	1165 ;	MA	# ( ㅓ → ᅥ ) HANGUL LETTER EO → HANGUL JUNGSEONG EO	# 
+
+117C ;	1165 30FC ;	MA	# ( ᅼ → ᅥー ) HANGUL JUNGSEONG EO-EU → HANGUL JUNGSEONG EO, KATAKANA-HIRAGANA PROLONGED SOUND MARK	# →ᅥᅳ→
+
+117A ;	1165 1169 ;	MA	# ( ᅺ → ᅥᅩ ) HANGUL JUNGSEONG EO-O → HANGUL JUNGSEONG EO, HANGUL JUNGSEONG O	# 
+
+117B ;	1165 116E ;	MA	# ( ᅻ → ᅥᅮ ) HANGUL JUNGSEONG EO-U → HANGUL JUNGSEONG EO, HANGUL JUNGSEONG U	# 
+
+1166 ;	1165 4E28 ;	MA	# ( ᅦ → ᅥ丨 ) HANGUL JUNGSEONG E → HANGUL JUNGSEONG EO, CJK UNIFIED IDEOGRAPH-4E28	# →ᅥᅵ→
+3154 ;	1165 4E28 ;	MA	# ( ㅔ → ᅥ丨 ) HANGUL LETTER E → HANGUL JUNGSEONG EO, CJK UNIFIED IDEOGRAPH-4E28	# →ᅦ→→ᅥᅵ→
+
+3155 ;	1167 ;	MA	# ( ㅕ → ᅧ ) HANGUL LETTER YEO → HANGUL JUNGSEONG YEO	# 
+
+11A5 ;	1167 1163 ;	MA	# ( ᆥ → ᅧᅣ ) HANGUL JUNGSEONG YEO-YA → HANGUL JUNGSEONG YEO, HANGUL JUNGSEONG YA	# 
+
+117D ;	1167 1169 ;	MA	# ( ᅽ → ᅧᅩ ) HANGUL JUNGSEONG YEO-O → HANGUL JUNGSEONG YEO, HANGUL JUNGSEONG O	# 
+
+117E ;	1167 116E ;	MA	# ( ᅾ → ᅧᅮ ) HANGUL JUNGSEONG YEO-U → HANGUL JUNGSEONG YEO, HANGUL JUNGSEONG U	# 
+
+1168 ;	1167 4E28 ;	MA	# ( ᅨ → ᅧ丨 ) HANGUL JUNGSEONG YE → HANGUL JUNGSEONG YEO, CJK UNIFIED IDEOGRAPH-4E28	# →ᅧᅵ→
+3156 ;	1167 4E28 ;	MA	# ( ㅖ → ᅧ丨 ) HANGUL LETTER YE → HANGUL JUNGSEONG YEO, CJK UNIFIED IDEOGRAPH-4E28	# →ᅨ→→ᅧᅵ→
+
+3157 ;	1169 ;	MA	# ( ㅗ → ᅩ ) HANGUL LETTER O → HANGUL JUNGSEONG O	# 
+
+116A ;	1169 1161 ;	MA	# ( ᅪ → ᅩᅡ ) HANGUL JUNGSEONG WA → HANGUL JUNGSEONG O, HANGUL JUNGSEONG A	# 
+3158 ;	1169 1161 ;	MA	# ( ㅘ → ᅩᅡ ) HANGUL LETTER WA → HANGUL JUNGSEONG O, HANGUL JUNGSEONG A	# →ᅪ→
+
+116B ;	1169 1161 4E28 ;	MA	# ( ᅫ → ᅩᅡ丨 ) HANGUL JUNGSEONG WAE → HANGUL JUNGSEONG O, HANGUL JUNGSEONG A, CJK UNIFIED IDEOGRAPH-4E28	# →ᅩᅡᅵ→
+3159 ;	1169 1161 4E28 ;	MA	# ( ㅙ → ᅩᅡ丨 ) HANGUL LETTER WAE → HANGUL JUNGSEONG O, HANGUL JUNGSEONG A, CJK UNIFIED IDEOGRAPH-4E28	# →ᅫ→→ᅩᅡᅵ→
+
+11A6 ;	1169 1163 ;	MA	# ( ᆦ → ᅩᅣ ) HANGUL JUNGSEONG O-YA → HANGUL JUNGSEONG O, HANGUL JUNGSEONG YA	# 
+
+11A7 ;	1169 1163 4E28 ;	MA	# ( ᆧ → ᅩᅣ丨 ) HANGUL JUNGSEONG O-YAE → HANGUL JUNGSEONG O, HANGUL JUNGSEONG YA, CJK UNIFIED IDEOGRAPH-4E28	# →ᅩᅣᅵ→
+
+117F ;	1169 1165 ;	MA	# ( ᅿ → ᅩᅥ ) HANGUL JUNGSEONG O-EO → HANGUL JUNGSEONG O, HANGUL JUNGSEONG EO	# 
+
+1180 ;	1169 1165 4E28 ;	MA	# ( ᆀ → ᅩᅥ丨 ) HANGUL JUNGSEONG O-E → HANGUL JUNGSEONG O, HANGUL JUNGSEONG EO, CJK UNIFIED IDEOGRAPH-4E28	# →ᅩᅥᅵ→
+
+D7B0 ;	1169 1167 ;	MA	# ( ힰ → ᅩᅧ ) HANGUL JUNGSEONG O-YEO → HANGUL JUNGSEONG O, HANGUL JUNGSEONG YEO	# 
+
+1181 ;	1169 1167 4E28 ;	MA	# ( ᆁ → ᅩᅧ丨 ) HANGUL JUNGSEONG O-YE → HANGUL JUNGSEONG O, HANGUL JUNGSEONG YEO, CJK UNIFIED IDEOGRAPH-4E28	# →ᅩᅧᅵ→
+
+1182 ;	1169 1169 ;	MA	# ( ᆂ → ᅩᅩ ) HANGUL JUNGSEONG O-O → HANGUL JUNGSEONG O, HANGUL JUNGSEONG O	# 
+
+D7B1 ;	1169 1169 4E28 ;	MA	# ( ힱ → ᅩᅩ丨 ) HANGUL JUNGSEONG O-O-I → HANGUL JUNGSEONG O, HANGUL JUNGSEONG O, CJK UNIFIED IDEOGRAPH-4E28	# →ᅩᅩᅵ→
+
+1183 ;	1169 116E ;	MA	# ( ᆃ → ᅩᅮ ) HANGUL JUNGSEONG O-U → HANGUL JUNGSEONG O, HANGUL JUNGSEONG U	# 
+
+116C ;	1169 4E28 ;	MA	# ( ᅬ → ᅩ丨 ) HANGUL JUNGSEONG OE → HANGUL JUNGSEONG O, CJK UNIFIED IDEOGRAPH-4E28	# →ᅩᅵ→
+315A ;	1169 4E28 ;	MA	# ( ㅚ → ᅩ丨 ) HANGUL LETTER OE → HANGUL JUNGSEONG O, CJK UNIFIED IDEOGRAPH-4E28	# →ᅬ→→ᅩᅵ→
+
+315B ;	116D ;	MA	# ( ㅛ → ᅭ ) HANGUL LETTER YO → HANGUL JUNGSEONG YO	# 
+
+D7B2 ;	116D 1161 ;	MA	# ( ힲ → ᅭᅡ ) HANGUL JUNGSEONG YO-A → HANGUL JUNGSEONG YO, HANGUL JUNGSEONG A	# 
+
+D7B3 ;	116D 1161 4E28 ;	MA	# ( ힳ → ᅭᅡ丨 ) HANGUL JUNGSEONG YO-AE → HANGUL JUNGSEONG YO, HANGUL JUNGSEONG A, CJK UNIFIED IDEOGRAPH-4E28	# →ᅭᅡᅵ→
+
+1184 ;	116D 1163 ;	MA	# ( ᆄ → ᅭᅣ ) HANGUL JUNGSEONG YO-YA → HANGUL JUNGSEONG YO, HANGUL JUNGSEONG YA	# 
+3187 ;	116D 1163 ;	MA	# ( ㆇ → ᅭᅣ ) HANGUL LETTER YO-YA → HANGUL JUNGSEONG YO, HANGUL JUNGSEONG YA	# →ᆄ→
+1186 ;	116D 1163 ;	MA	# ( ᆆ → ᅭᅣ ) HANGUL JUNGSEONG YO-YEO → HANGUL JUNGSEONG YO, HANGUL JUNGSEONG YA	# →ᆄ→
+
+1185 ;	116D 1163 4E28 ;	MA	# ( ᆅ → ᅭᅣ丨 ) HANGUL JUNGSEONG YO-YAE → HANGUL JUNGSEONG YO, HANGUL JUNGSEONG YA, CJK UNIFIED IDEOGRAPH-4E28	# →ᅭᅣᅵ→
+3188 ;	116D 1163 4E28 ;	MA	# ( ㆈ → ᅭᅣ丨 ) HANGUL LETTER YO-YAE → HANGUL JUNGSEONG YO, HANGUL JUNGSEONG YA, CJK UNIFIED IDEOGRAPH-4E28	# →ᆅ→→ᅭᅣᅵ→
+
+D7B4 ;	116D 1165 ;	MA	# ( ힴ → ᅭᅥ ) HANGUL JUNGSEONG YO-EO → HANGUL JUNGSEONG YO, HANGUL JUNGSEONG EO	# 
+
+1187 ;	116D 1169 ;	MA	# ( ᆇ → ᅭᅩ ) HANGUL JUNGSEONG YO-O → HANGUL JUNGSEONG YO, HANGUL JUNGSEONG O	# 
+
+1188 ;	116D 4E28 ;	MA	# ( ᆈ → ᅭ丨 ) HANGUL JUNGSEONG YO-I → HANGUL JUNGSEONG YO, CJK UNIFIED IDEOGRAPH-4E28	# →ᅭᅵ→
+3189 ;	116D 4E28 ;	MA	# ( ㆉ → ᅭ丨 ) HANGUL LETTER YO-I → HANGUL JUNGSEONG YO, CJK UNIFIED IDEOGRAPH-4E28	# →ᆈ→→ᅭᅵ→
+
+315C ;	116E ;	MA	# ( ㅜ → ᅮ ) HANGUL LETTER U → HANGUL JUNGSEONG U	# 
+
+1189 ;	116E 1161 ;	MA	# ( ᆉ → ᅮᅡ ) HANGUL JUNGSEONG U-A → HANGUL JUNGSEONG U, HANGUL JUNGSEONG A	# 
+
+118A ;	116E 1161 4E28 ;	MA	# ( ᆊ → ᅮᅡ丨 ) HANGUL JUNGSEONG U-AE → HANGUL JUNGSEONG U, HANGUL JUNGSEONG A, CJK UNIFIED IDEOGRAPH-4E28	# →ᅮᅡᅵ→
+
+116F ;	116E 1165 ;	MA	# ( ᅯ → ᅮᅥ ) HANGUL JUNGSEONG WEO → HANGUL JUNGSEONG U, HANGUL JUNGSEONG EO	# 
+315D ;	116E 1165 ;	MA	# ( ㅝ → ᅮᅥ ) HANGUL LETTER WEO → HANGUL JUNGSEONG U, HANGUL JUNGSEONG EO	# →ᅯ→
+
+118B ;	116E 1165 30FC ;	MA	# ( ᆋ → ᅮᅥー ) HANGUL JUNGSEONG U-EO-EU → HANGUL JUNGSEONG U, HANGUL JUNGSEONG EO, KATAKANA-HIRAGANA PROLONGED SOUND MARK	# →ᅮᅥᅳ→
+
+1170 ;	116E 1165 4E28 ;	MA	# ( ᅰ → ᅮᅥ丨 ) HANGUL JUNGSEONG WE → HANGUL JUNGSEONG U, HANGUL JUNGSEONG EO, CJK UNIFIED IDEOGRAPH-4E28	# →ᅮᅥᅵ→
+315E ;	116E 1165 4E28 ;	MA	# ( ㅞ → ᅮᅥ丨 ) HANGUL LETTER WE → HANGUL JUNGSEONG U, HANGUL JUNGSEONG EO, CJK UNIFIED IDEOGRAPH-4E28	# →ᅰ→→ᅮᅥᅵ→
+
+D7B5 ;	116E 1167 ;	MA	# ( ힵ → ᅮᅧ ) HANGUL JUNGSEONG U-YEO → HANGUL JUNGSEONG U, HANGUL JUNGSEONG YEO	# 
+
+118C ;	116E 1167 4E28 ;	MA	# ( ᆌ → ᅮᅧ丨 ) HANGUL JUNGSEONG U-YE → HANGUL JUNGSEONG U, HANGUL JUNGSEONG YEO, CJK UNIFIED IDEOGRAPH-4E28	# →ᅮᅧᅵ→
+
+118D ;	116E 116E ;	MA	# ( ᆍ → ᅮᅮ ) HANGUL JUNGSEONG U-U → HANGUL JUNGSEONG U, HANGUL JUNGSEONG U	# 
+
+1171 ;	116E 4E28 ;	MA	# ( ᅱ → ᅮ丨 ) HANGUL JUNGSEONG WI → HANGUL JUNGSEONG U, CJK UNIFIED IDEOGRAPH-4E28	# →ᅮᅵ→
+315F ;	116E 4E28 ;	MA	# ( ㅟ → ᅮ丨 ) HANGUL LETTER WI → HANGUL JUNGSEONG U, CJK UNIFIED IDEOGRAPH-4E28	# →ᅱ→→ᅮᅵ→
+
+D7B6 ;	116E 4E28 4E28 ;	MA	# ( ힶ → ᅮ丨丨 ) HANGUL JUNGSEONG U-I-I → HANGUL JUNGSEONG U, CJK UNIFIED IDEOGRAPH-4E28, CJK UNIFIED IDEOGRAPH-4E28	# →ᅮᅵᅵ→
+
+3160 ;	1172 ;	MA	# ( ㅠ → ᅲ ) HANGUL LETTER YU → HANGUL JUNGSEONG YU	# 
+
+118E ;	1172 1161 ;	MA	# ( ᆎ → ᅲᅡ ) HANGUL JUNGSEONG YU-A → HANGUL JUNGSEONG YU, HANGUL JUNGSEONG A	# 
+
+D7B7 ;	1172 1161 4E28 ;	MA	# ( ힷ → ᅲᅡ丨 ) HANGUL JUNGSEONG YU-AE → HANGUL JUNGSEONG YU, HANGUL JUNGSEONG A, CJK UNIFIED IDEOGRAPH-4E28	# →ᅲᅡᅵ→
+
+118F ;	1172 1165 ;	MA	# ( ᆏ → ᅲᅥ ) HANGUL JUNGSEONG YU-EO → HANGUL JUNGSEONG YU, HANGUL JUNGSEONG EO	# 
+
+1190 ;	1172 1165 4E28 ;	MA	# ( ᆐ → ᅲᅥ丨 ) HANGUL JUNGSEONG YU-E → HANGUL JUNGSEONG YU, HANGUL JUNGSEONG EO, CJK UNIFIED IDEOGRAPH-4E28	# →ᅲᅥᅵ→
+
+1191 ;	1172 1167 ;	MA	# ( ᆑ → ᅲᅧ ) HANGUL JUNGSEONG YU-YEO → HANGUL JUNGSEONG YU, HANGUL JUNGSEONG YEO	# 
+318A ;	1172 1167 ;	MA	# ( ㆊ → ᅲᅧ ) HANGUL LETTER YU-YEO → HANGUL JUNGSEONG YU, HANGUL JUNGSEONG YEO	# →ᆑ→
+
+1192 ;	1172 1167 4E28 ;	MA	# ( ᆒ → ᅲᅧ丨 ) HANGUL JUNGSEONG YU-YE → HANGUL JUNGSEONG YU, HANGUL JUNGSEONG YEO, CJK UNIFIED IDEOGRAPH-4E28	# →ᅲᅧᅵ→
+318B ;	1172 1167 4E28 ;	MA	# ( ㆋ → ᅲᅧ丨 ) HANGUL LETTER YU-YE → HANGUL JUNGSEONG YU, HANGUL JUNGSEONG YEO, CJK UNIFIED IDEOGRAPH-4E28	# →ᆒ→→ᅲᅧᅵ→
+
+D7B8 ;	1172 1169 ;	MA	# ( ힸ → ᅲᅩ ) HANGUL JUNGSEONG YU-O → HANGUL JUNGSEONG YU, HANGUL JUNGSEONG O	# 
+
+1193 ;	1172 116E ;	MA	# ( ᆓ → ᅲᅮ ) HANGUL JUNGSEONG YU-U → HANGUL JUNGSEONG YU, HANGUL JUNGSEONG U	# 
+
+1194 ;	1172 4E28 ;	MA	# ( ᆔ → ᅲ丨 ) HANGUL JUNGSEONG YU-I → HANGUL JUNGSEONG YU, CJK UNIFIED IDEOGRAPH-4E28	# →ᅲᅵ→
+318C ;	1172 4E28 ;	MA	# ( ㆌ → ᅲ丨 ) HANGUL LETTER YU-I → HANGUL JUNGSEONG YU, CJK UNIFIED IDEOGRAPH-4E28	# →ᆔ→→ᅲᅵ→
+
+318D ;	119E ;	MA	# ( ㆍ → ᆞ ) HANGUL LETTER ARAEA → HANGUL JUNGSEONG ARAEA	# 
+
+D7C5 ;	119E 1161 ;	MA	# ( ퟅ → ᆞᅡ ) HANGUL JUNGSEONG ARAEA-A → HANGUL JUNGSEONG ARAEA, HANGUL JUNGSEONG A	# 
+
+119F ;	119E 1165 ;	MA	# ( ᆟ → ᆞᅥ ) HANGUL JUNGSEONG ARAEA-EO → HANGUL JUNGSEONG ARAEA, HANGUL JUNGSEONG EO	# 
+
+D7C6 ;	119E 1165 4E28 ;	MA	# ( ퟆ → ᆞᅥ丨 ) HANGUL JUNGSEONG ARAEA-E → HANGUL JUNGSEONG ARAEA, HANGUL JUNGSEONG EO, CJK UNIFIED IDEOGRAPH-4E28	# →ᆞᅥᅵ→
+
+11A0 ;	119E 116E ;	MA	# ( ᆠ → ᆞᅮ ) HANGUL JUNGSEONG ARAEA-U → HANGUL JUNGSEONG ARAEA, HANGUL JUNGSEONG U	# 
+
+11A2 ;	119E 119E ;	MA	# ( ᆢ → ᆞᆞ ) HANGUL JUNGSEONG SSANGARAEA → HANGUL JUNGSEONG ARAEA, HANGUL JUNGSEONG ARAEA	# 
+
+11A1 ;	119E 4E28 ;	MA	# ( ᆡ → ᆞ丨 ) HANGUL JUNGSEONG ARAEA-I → HANGUL JUNGSEONG ARAEA, CJK UNIFIED IDEOGRAPH-4E28	# →ᆞᅵ→
+318E ;	119E 4E28 ;	MA	# ( ㆎ → ᆞ丨 ) HANGUL LETTER ARAEAE → HANGUL JUNGSEONG ARAEA, CJK UNIFIED IDEOGRAPH-4E28	# →ᆡ→→ᆞᅵ→
+
+30D8 ;	3078 ;	MA	# ( ヘ → へ ) KATAKANA LETTER HE → HIRAGANA LETTER HE	# 
+
+2341 ;	303C ;	MA	#* ( ⍁ → 〼 ) APL FUNCTIONAL SYMBOL QUAD SLASH → MASU MARK	# →⧄→
+29C4 ;	303C ;	MA	#* ( ⧄ → 〼 ) SQUARED RISING DIAGONAL SLASH → MASU MARK	# 
+
+A49E ;	A04A ;	MA	#* ( ꒞ → ꁊ ) YI RADICAL PUT → YI SYLLABLE PUT	# 
+
+A4AC ;	A050 ;	MA	#* ( ꒬ → ꁐ ) YI RADICAL PYT → YI SYLLABLE PYT	# 
+
+A49C ;	A0C0 ;	MA	#* ( ꒜ → ꃀ ) YI RADICAL MOP → YI SYLLABLE MOP	# 
+
+A4A8 ;	A132 ;	MA	#* ( ꒨ → ꄲ ) YI RADICAL TU → YI SYLLABLE TU	# 
+
+A4BF ;	A259 ;	MA	#* ( ꒿ → ꉙ ) YI RADICAL HXOP → YI SYLLABLE HXOP	# 
+
+A4BE ;	A2B1 ;	MA	#* ( ꒾ → ꊱ ) YI RADICAL CIP → YI SYLLABLE CIP	# 
+
+A494 ;	A2CD ;	MA	#* ( ꒔ → ꋍ ) YI RADICAL CYP → YI SYLLABLE CYP	# 
+
+A4C0 ;	A3AB ;	MA	#* ( ꓀ → ꎫ ) YI RADICAL SHAT → YI SYLLABLE SHAT	# 
+
+A4C2 ;	A3B5 ;	MA	#* ( ꓂ → ꎵ ) YI RADICAL SHOP → YI SYLLABLE SHOP	# 
+
+A4BA ;	A3BF ;	MA	#* ( ꒺ → ꎿ ) YI RADICAL SHUR → YI SYLLABLE SHUR	# 
+
+A4B0 ;	A3C2 ;	MA	#* ( ꒰ → ꏂ ) YI RADICAL SHY → YI SYLLABLE SHY	# 
+
+A4A7 ;	A458 ;	MA	#* ( ꒧ → ꑘ ) YI RADICAL NYOP → YI SYLLABLE NYOP	# 
+
+22A5 ;	A4D5 ;	MA	#* ( ⊥ → ꓕ ) UP TACK → LISU LETTER THA	# 
+27C2 ;	A4D5 ;	MA	#* ( ⟂ → ꓕ ) PERPENDICULAR → LISU LETTER THA	# →⊥→
+1D21C ;	A4D5 ;	MA	#* ( 𝈜 → ꓕ ) GREEK VOCAL NOTATION SYMBOL-54 → LISU LETTER THA	# →Ʇ→
+A7B1 ;	A4D5 ;	MA	# ( Ʇ → ꓕ ) LATIN CAPITAL LETTER TURNED T → LISU LETTER THA	# 
+
+A79E ;	A4E4 ;	MA	# ( Ꞟ → ꓤ ) LATIN CAPITAL LETTER VOLAPUK UE → LISU LETTER ZA	# 
+
+2141 ;	A4E8 ;	MA	#* ( ⅁ → ꓨ ) TURNED SANS-SERIF CAPITAL G → LISU LETTER HHA	# 
+
+2142 ;	A4F6 ;	MA	#* ( ⅂ → ꓶ ) TURNED SANS-SERIF CAPITAL L → LISU LETTER UH	# 
+1D215 ;	A4F6 ;	MA	#* ( 𝈕 → ꓶ ) GREEK VOCAL NOTATION SYMBOL-22 → LISU LETTER UH	# →⅂→
+1D22B ;	A4F6 ;	MA	#* ( 𝈫 → ꓶ ) GREEK INSTRUMENTAL NOTATION SYMBOL-24 → LISU LETTER UH	# →𝈕→→⅂→
+10411 ;	A4F6 ;	MA	# ( 𐐑 → ꓶ ) DESERET CAPITAL LETTER PEE → LISU LETTER UH	# →⅂→
+
+2295 ;	102A8 ;	MA	#* ( ⊕ → 𐊨 ) CIRCLED PLUS → CARIAN LETTER Q	# 
+2A01 ;	102A8 ;	MA	#* ( ⨁ → 𐊨 ) N-ARY CIRCLED PLUS OPERATOR → CARIAN LETTER Q	# →⊕→
+1F728 ;	102A8 ;	MA	#* ( 🜨 → 𐊨 ) ALCHEMICAL SYMBOL FOR VERDIGRIS → CARIAN LETTER Q	# →⊕→
+A69A ;	102A8 ;	MA	# ( Ꚛ → 𐊨 ) CYRILLIC CAPITAL LETTER CROSSED O → CARIAN LETTER Q	# →⊕→
+
+25BD ;	102BC ;	MA	#* ( ▽ → 𐊼 ) WHITE DOWN-POINTING TRIANGLE → CARIAN LETTER K	# 
+1D214 ;	102BC ;	MA	#* ( 𝈔 → 𐊼 ) GREEK VOCAL NOTATION SYMBOL-21 → CARIAN LETTER K	# →▽→
+1F704 ;	102BC ;	MA	#* ( 🜄 → 𐊼 ) ALCHEMICAL SYMBOL FOR WATER → CARIAN LETTER K	# →▽→
+
+29D6 ;	102C0 ;	MA	#* ( ⧖ → 𐋀 ) WHITE HOURGLASS → CARIAN LETTER G	# 
+
+A79B ;	1043A ;	MA	# ( ꞛ → 𐐺 ) LATIN SMALL LETTER VOLAPUK AE → DESERET SMALL LETTER BEE	# 
+
+A79A ;	10412 ;	MA	# ( Ꞛ → 𐐒 ) LATIN CAPITAL LETTER VOLAPUK AE → DESERET CAPITAL LETTER BEE	# 
+
+104A0 ;	10486 ;	MA	# ( 𐒠 → 𐒆 ) OSMANYA DIGIT ZERO → OSMANYA LETTER DEEL	# 
+
+103D1 ;	10382 ;	MA	# ( 𐏑 → 𐎂 ) OLD PERSIAN NUMBER ONE → UGARITIC LETTER GAMLA	# 
+
+103D3 ;	10393 ;	MA	# ( 𐏓 → 𐎓 ) OLD PERSIAN NUMBER TEN → UGARITIC LETTER AIN	# 
+
+12038 ;	1039A ;	MA	# ( 𒀸 → 𐎚 ) CUNEIFORM SIGN ASH → UGARITIC LETTER TO	# 
+
+2625 ;	1099E ;	MA	#* ( ☥ → ‎𐦞‎ ) ANKH → MEROITIC HIEROGLYPHIC SYMBOL VIDJ	# 
+132F9 ;	1099E ;	MA	# ( 𓋹 → ‎𐦞‎ ) EGYPTIAN HIEROGLYPH S034 → MEROITIC HIEROGLYPHIC SYMBOL VIDJ	# →☥→
+
+3039 ;	5344 ;	MA	# ( 〹 → 卄 ) HANGZHOU NUMERAL TWENTY → CJK UNIFIED IDEOGRAPH-5344	# 
+
+F967 ;	4E0D ;	MA	# ( 不 → 不 ) CJK COMPATIBILITY IDEOGRAPH-F967 → CJK UNIFIED IDEOGRAPH-4E0D	# 
+
+2F800 ;	4E3D ;	MA	# ( 丽 → 丽 ) CJK COMPATIBILITY IDEOGRAPH-2F800 → CJK UNIFIED IDEOGRAPH-4E3D	# 
+
+FA70 ;	4E26 ;	MA	# ( 並 → 並 ) CJK COMPATIBILITY IDEOGRAPH-FA70 → CJK UNIFIED IDEOGRAPH-4E26	# 
+
+239C ;	4E28 ;	MA	#* ( ⎜ → 丨 ) LEFT PARENTHESIS EXTENSION → CJK UNIFIED IDEOGRAPH-4E28	# →⎥→→⎮→
+239F ;	4E28 ;	MA	#* ( ⎟ → 丨 ) RIGHT PARENTHESIS EXTENSION → CJK UNIFIED IDEOGRAPH-4E28	# →⎥→→⎮→
+23A2 ;	4E28 ;	MA	#* ( ⎢ → 丨 ) LEFT SQUARE BRACKET EXTENSION → CJK UNIFIED IDEOGRAPH-4E28	# →⎥→→⎮→
+23A5 ;	4E28 ;	MA	#* ( ⎥ → 丨 ) RIGHT SQUARE BRACKET EXTENSION → CJK UNIFIED IDEOGRAPH-4E28	# →⎮→
+23AA ;	4E28 ;	MA	#* ( ⎪ → 丨 ) CURLY BRACKET EXTENSION → CJK UNIFIED IDEOGRAPH-4E28	# →⎥→→⎮→
+23AE ;	4E28 ;	MA	#* ( ⎮ → 丨 ) INTEGRAL EXTENSION → CJK UNIFIED IDEOGRAPH-4E28	# 
+31D1 ;	4E28 ;	MA	#* ( ㇑ → 丨 ) CJK STROKE S → CJK UNIFIED IDEOGRAPH-4E28	# 
+1175 ;	4E28 ;	MA	# ( ᅵ → 丨 ) HANGUL JUNGSEONG I → CJK UNIFIED IDEOGRAPH-4E28	# →ㅣ→
+3163 ;	4E28 ;	MA	# ( ㅣ → 丨 ) HANGUL LETTER I → CJK UNIFIED IDEOGRAPH-4E28	# 
+2F01 ;	4E28 ;	MA	#* ( ⼁ → 丨 ) KANGXI RADICAL LINE → CJK UNIFIED IDEOGRAPH-4E28	# 
+
+119C ;	4E28 30FC ;	MA	# ( ᆜ → 丨ー ) HANGUL JUNGSEONG I-EU → CJK UNIFIED IDEOGRAPH-4E28, KATAKANA-HIRAGANA PROLONGED SOUND MARK	# →ᅵᅳ→
+
+1198 ;	4E28 1161 ;	MA	# ( ᆘ → 丨ᅡ ) HANGUL JUNGSEONG I-A → CJK UNIFIED IDEOGRAPH-4E28, HANGUL JUNGSEONG A	# →ᅵᅡ→
+
+1199 ;	4E28 1163 ;	MA	# ( ᆙ → 丨ᅣ ) HANGUL JUNGSEONG I-YA → CJK UNIFIED IDEOGRAPH-4E28, HANGUL JUNGSEONG YA	# →ᅵᅣ→
+
+D7BD ;	4E28 1163 1169 ;	MA	# ( ힽ → 丨ᅣᅩ ) HANGUL JUNGSEONG I-YA-O → CJK UNIFIED IDEOGRAPH-4E28, HANGUL JUNGSEONG YA, HANGUL JUNGSEONG O	# →ᅵᅣᅩ→
+
+D7BE ;	4E28 1163 4E28 ;	MA	# ( ힾ → 丨ᅣ丨 ) HANGUL JUNGSEONG I-YAE → CJK UNIFIED IDEOGRAPH-4E28, HANGUL JUNGSEONG YA, CJK UNIFIED IDEOGRAPH-4E28	# →ᅵᅣᅵ→
+
+D7BF ;	4E28 1167 ;	MA	# ( ힿ → 丨ᅧ ) HANGUL JUNGSEONG I-YEO → CJK UNIFIED IDEOGRAPH-4E28, HANGUL JUNGSEONG YEO	# →ᅵᅧ→
+
+D7C0 ;	4E28 1167 4E28 ;	MA	# ( ퟀ → 丨ᅧ丨 ) HANGUL JUNGSEONG I-YE → CJK UNIFIED IDEOGRAPH-4E28, HANGUL JUNGSEONG YEO, CJK UNIFIED IDEOGRAPH-4E28	# →ᅵᅧᅵ→
+
+119A ;	4E28 1169 ;	MA	# ( ᆚ → 丨ᅩ ) HANGUL JUNGSEONG I-O → CJK UNIFIED IDEOGRAPH-4E28, HANGUL JUNGSEONG O	# →ᅵᅩ→
+
+D7C1 ;	4E28 1169 4E28 ;	MA	# ( ퟁ → 丨ᅩ丨 ) HANGUL JUNGSEONG I-O-I → CJK UNIFIED IDEOGRAPH-4E28, HANGUL JUNGSEONG O, CJK UNIFIED IDEOGRAPH-4E28	# →ᅵᅩᅵ→
+
+D7C2 ;	4E28 116D ;	MA	# ( ퟂ → 丨ᅭ ) HANGUL JUNGSEONG I-YO → CJK UNIFIED IDEOGRAPH-4E28, HANGUL JUNGSEONG YO	# →ᅵᅭ→
+
+119B ;	4E28 116E ;	MA	# ( ᆛ → 丨ᅮ ) HANGUL JUNGSEONG I-U → CJK UNIFIED IDEOGRAPH-4E28, HANGUL JUNGSEONG U	# →ᅵᅮ→
+
+D7C3 ;	4E28 1172 ;	MA	# ( ퟃ → 丨ᅲ ) HANGUL JUNGSEONG I-YU → CJK UNIFIED IDEOGRAPH-4E28, HANGUL JUNGSEONG YU	# →ᅵᅲ→
+
+119D ;	4E28 119E ;	MA	# ( ᆝ → 丨ᆞ ) HANGUL JUNGSEONG I-ARAEA → CJK UNIFIED IDEOGRAPH-4E28, HANGUL JUNGSEONG ARAEA	# →ᅵᆞ→
+
+D7C4 ;	4E28 4E28 ;	MA	# ( ퟄ → 丨丨 ) HANGUL JUNGSEONG I-I → CJK UNIFIED IDEOGRAPH-4E28, CJK UNIFIED IDEOGRAPH-4E28	# →ᅵᅵ→
+
+F905 ;	4E32 ;	MA	# ( 串 → 串 ) CJK COMPATIBILITY IDEOGRAPH-F905 → CJK UNIFIED IDEOGRAPH-4E32	# 
+
+2F801 ;	4E38 ;	MA	# ( 丸 → 丸 ) CJK COMPATIBILITY IDEOGRAPH-2F801 → CJK UNIFIED IDEOGRAPH-4E38	# 
+
+F95E ;	4E39 ;	MA	# ( 丹 → 丹 ) CJK COMPATIBILITY IDEOGRAPH-F95E → CJK UNIFIED IDEOGRAPH-4E39	# 
+
+2F802 ;	4E41 ;	MA	# ( 乁 → 乁 ) CJK COMPATIBILITY IDEOGRAPH-2F802 → CJK UNIFIED IDEOGRAPH-4E41	# 
+
+31E0 ;	4E59 ;	MA	#* ( ㇠ → 乙 ) CJK STROKE HXWG → CJK UNIFIED IDEOGRAPH-4E59	# 
+2F04 ;	4E59 ;	MA	#* ( ⼄ → 乙 ) KANGXI RADICAL SECOND → CJK UNIFIED IDEOGRAPH-4E59	# 
+
+31DF ;	4E5A ;	MA	#* ( ㇟ → 乚 ) CJK STROKE SWG → CJK UNIFIED IDEOGRAPH-4E5A	# 
+2E83 ;	4E5A ;	MA	#* ( ⺃ → 乚 ) CJK RADICAL SECOND TWO → CJK UNIFIED IDEOGRAPH-4E5A	# 
+
+31D6 ;	4E5B ;	MA	#* ( ㇖ → 乛 ) CJK STROKE HG → CJK UNIFIED IDEOGRAPH-4E5B	# 
+2E82 ;	4E5B ;	MA	#* ( ⺂ → 乛 ) CJK RADICAL SECOND ONE → CJK UNIFIED IDEOGRAPH-4E5B	# →㇖→
+
+2EF2 ;	4E80 ;	MA	#* ( ⻲ → 亀 ) CJK RADICAL J-SIMPLIFIED TURTLE → CJK UNIFIED IDEOGRAPH-4E80	# 
+
+F91B ;	4E82 ;	MA	# ( 亂 → 亂 ) CJK COMPATIBILITY IDEOGRAPH-F91B → CJK UNIFIED IDEOGRAPH-4E82	# 
+
+31DA ;	4E85 ;	MA	#* ( ㇚ → 亅 ) CJK STROKE SG → CJK UNIFIED IDEOGRAPH-4E85	# 
+2F05 ;	4E85 ;	MA	#* ( ⼅ → 亅 ) KANGXI RADICAL HOOK → CJK UNIFIED IDEOGRAPH-4E85	# 
+
+F9BA ;	4E86 ;	MA	# ( 了 → 了 ) CJK COMPATIBILITY IDEOGRAPH-F9BA → CJK UNIFIED IDEOGRAPH-4E86	# 
+
+30CB ;	4E8C ;	MA	# ( ニ → 二 ) KATAKANA LETTER NI → CJK UNIFIED IDEOGRAPH-4E8C	# 
+2F06 ;	4E8C ;	MA	#* ( ⼆ → 二 ) KANGXI RADICAL TWO → CJK UNIFIED IDEOGRAPH-4E8C	# 
+
+2F803 ;	20122 ;	MA	# ( 𠄢 → 𠄢 ) CJK COMPATIBILITY IDEOGRAPH-2F803 → CJK UNIFIED IDEOGRAPH-20122	# 
+
+2F07 ;	4EA0 ;	MA	#* ( ⼇ → 亠 ) KANGXI RADICAL LID → CJK UNIFIED IDEOGRAPH-4EA0	# 
+
+F977 ;	4EAE ;	MA	# ( 亮 → 亮 ) CJK COMPATIBILITY IDEOGRAPH-F977 → CJK UNIFIED IDEOGRAPH-4EAE	# 
+
+2F08 ;	4EBA ;	MA	#* ( ⼈ → 人 ) KANGXI RADICAL MAN → CJK UNIFIED IDEOGRAPH-4EBA	# 
+
+30A4 ;	4EBB ;	MA	# ( イ → 亻 ) KATAKANA LETTER I → CJK UNIFIED IDEOGRAPH-4EBB	# →⺅→
+2E85 ;	4EBB ;	MA	#* ( ⺅ → 亻 ) CJK RADICAL PERSON → CJK UNIFIED IDEOGRAPH-4EBB	# 
+
+F9FD ;	4EC0 ;	MA	# ( 什 → 什 ) CJK COMPATIBILITY IDEOGRAPH-F9FD → CJK UNIFIED IDEOGRAPH-4EC0	# 
+
+2F819 ;	4ECC ;	MA	# ( 仌 → 仌 ) CJK COMPATIBILITY IDEOGRAPH-2F819 → CJK UNIFIED IDEOGRAPH-4ECC	# 
+
+F9A8 ;	4EE4 ;	MA	# ( 令 → 令 ) CJK COMPATIBILITY IDEOGRAPH-F9A8 → CJK UNIFIED IDEOGRAPH-4EE4	# 
+
+2F804 ;	4F60 ;	MA	# ( 你 → 你 ) CJK COMPATIBILITY IDEOGRAPH-2F804 → CJK UNIFIED IDEOGRAPH-4F60	# 
+
+5002 ;	4F75 ;	MA	# ( 倂 → 併 ) CJK UNIFIED IDEOGRAPH-5002 → CJK UNIFIED IDEOGRAPH-4F75	# 
+2F807 ;	4F75 ;	MA	# ( 倂 → 併 ) CJK COMPATIBILITY IDEOGRAPH-2F807 → CJK UNIFIED IDEOGRAPH-4F75	# →倂→
+
+FA73 ;	4F80 ;	MA	# ( 侀 → 侀 ) CJK COMPATIBILITY IDEOGRAPH-FA73 → CJK UNIFIED IDEOGRAPH-4F80	# 
+
+F92D ;	4F86 ;	MA	# ( 來 → 來 ) CJK COMPATIBILITY IDEOGRAPH-F92D → CJK UNIFIED IDEOGRAPH-4F86	# 
+
+F9B5 ;	4F8B ;	MA	# ( 例 → 例 ) CJK COMPATIBILITY IDEOGRAPH-F9B5 → CJK UNIFIED IDEOGRAPH-4F8B	# 
+
+FA30 ;	4FAE ;	MA	# ( 侮 → 侮 ) CJK COMPATIBILITY IDEOGRAPH-FA30 → CJK UNIFIED IDEOGRAPH-4FAE	# 
+2F805 ;	4FAE ;	MA	# ( 侮 → 侮 ) CJK COMPATIBILITY IDEOGRAPH-2F805 → CJK UNIFIED IDEOGRAPH-4FAE	# 
+
+2F806 ;	4FBB ;	MA	# ( 侻 → 侻 ) CJK COMPATIBILITY IDEOGRAPH-2F806 → CJK UNIFIED IDEOGRAPH-4FBB	# 
+
+F965 ;	4FBF ;	MA	# ( 便 → 便 ) CJK COMPATIBILITY IDEOGRAPH-F965 → CJK UNIFIED IDEOGRAPH-4FBF	# 
+
+503C ;	5024 ;	MA	# ( 值 → 値 ) CJK UNIFIED IDEOGRAPH-503C → CJK UNIFIED IDEOGRAPH-5024	# 
+
+F9D4 ;	502B ;	MA	# ( 倫 → 倫 ) CJK COMPATIBILITY IDEOGRAPH-F9D4 → CJK UNIFIED IDEOGRAPH-502B	# 
+
+2F808 ;	507A ;	MA	# ( 偺 → 偺 ) CJK COMPATIBILITY IDEOGRAPH-2F808 → CJK UNIFIED IDEOGRAPH-507A	# 
+
+2F809 ;	5099 ;	MA	# ( 備 → 備 ) CJK COMPATIBILITY IDEOGRAPH-2F809 → CJK UNIFIED IDEOGRAPH-5099	# 
+
+2F80B ;	50CF ;	MA	# ( 像 → 像 ) CJK COMPATIBILITY IDEOGRAPH-2F80B → CJK UNIFIED IDEOGRAPH-50CF	# 
+
+F9BB ;	50DA ;	MA	# ( 僚 → 僚 ) CJK COMPATIBILITY IDEOGRAPH-F9BB → CJK UNIFIED IDEOGRAPH-50DA	# 
+
+FA31 ;	50E7 ;	MA	# ( 僧 → 僧 ) CJK COMPATIBILITY IDEOGRAPH-FA31 → CJK UNIFIED IDEOGRAPH-50E7	# 
+2F80A ;	50E7 ;	MA	# ( 僧 → 僧 ) CJK COMPATIBILITY IDEOGRAPH-2F80A → CJK UNIFIED IDEOGRAPH-50E7	# 
+
+2F80C ;	349E ;	MA	# ( 㒞 → 㒞 ) CJK COMPATIBILITY IDEOGRAPH-2F80C → CJK UNIFIED IDEOGRAPH-349E	# 
+
+2F09 ;	513F ;	MA	#* ( ⼉ → 儿 ) KANGXI RADICAL LEGS → CJK UNIFIED IDEOGRAPH-513F	# 
+
+FA0C ;	5140 ;	MA	# ( 兀 → 兀 ) CJK COMPATIBILITY IDEOGRAPH-FA0C → CJK UNIFIED IDEOGRAPH-5140	# 
+2E8E ;	5140 ;	MA	#* ( ⺎ → 兀 ) CJK RADICAL LAME ONE → CJK UNIFIED IDEOGRAPH-5140	# 
+
+FA74 ;	5145 ;	MA	# ( 充 → 充 ) CJK COMPATIBILITY IDEOGRAPH-FA74 → CJK UNIFIED IDEOGRAPH-5145	# 
+
+FA32 ;	514D ;	MA	# ( 免 → 免 ) CJK COMPATIBILITY IDEOGRAPH-FA32 → CJK UNIFIED IDEOGRAPH-514D	# 
+2F80E ;	514D ;	MA	# ( 免 → 免 ) CJK COMPATIBILITY IDEOGRAPH-2F80E → CJK UNIFIED IDEOGRAPH-514D	# 
+
+2F80F ;	5154 ;	MA	# ( 兔 → 兔 ) CJK COMPATIBILITY IDEOGRAPH-2F80F → CJK UNIFIED IDEOGRAPH-5154	# 
+
+2F810 ;	5164 ;	MA	# ( 兤 → 兤 ) CJK COMPATIBILITY IDEOGRAPH-2F810 → CJK UNIFIED IDEOGRAPH-5164	# 
+
+2F0A ;	5165 ;	MA	#* ( ⼊ → 入 ) KANGXI RADICAL ENTER → CJK UNIFIED IDEOGRAPH-5165	# 
+
+2F814 ;	5167 ;	MA	# ( 內 → 內 ) CJK COMPATIBILITY IDEOGRAPH-2F814 → CJK UNIFIED IDEOGRAPH-5167	# 
+
+FA72 ;	5168 ;	MA	# ( 全 → 全 ) CJK COMPATIBILITY IDEOGRAPH-FA72 → CJK UNIFIED IDEOGRAPH-5168	# 
+
+F978 ;	5169 ;	MA	# ( 兩 → 兩 ) CJK COMPATIBILITY IDEOGRAPH-F978 → CJK UNIFIED IDEOGRAPH-5169	# 
+
+30CF ;	516B ;	MA	# ( ハ → 八 ) KATAKANA LETTER HA → CJK UNIFIED IDEOGRAPH-516B	# 
+2F0B ;	516B ;	MA	#* ( ⼋ → 八 ) KANGXI RADICAL EIGHT → CJK UNIFIED IDEOGRAPH-516B	# 
+
+F9D1 ;	516D ;	MA	# ( 六 → 六 ) CJK COMPATIBILITY IDEOGRAPH-F9D1 → CJK UNIFIED IDEOGRAPH-516D	# 
+
+2F811 ;	5177 ;	MA	# ( 具 → 具 ) CJK COMPATIBILITY IDEOGRAPH-2F811 → CJK UNIFIED IDEOGRAPH-5177	# 
+
+2F812 ;	2051C ;	MA	# ( 𠔜 → 𠔜 ) CJK COMPATIBILITY IDEOGRAPH-2F812 → CJK UNIFIED IDEOGRAPH-2051C	# 
+
+2F91B ;	20525 ;	MA	# ( 𠔥 → 𠔥 ) CJK COMPATIBILITY IDEOGRAPH-2F91B → CJK UNIFIED IDEOGRAPH-20525	# 
+
+FA75 ;	5180 ;	MA	# ( 冀 → 冀 ) CJK COMPATIBILITY IDEOGRAPH-FA75 → CJK UNIFIED IDEOGRAPH-5180	# 
+
+2F813 ;	34B9 ;	MA	# ( 㒹 → 㒹 ) CJK COMPATIBILITY IDEOGRAPH-2F813 → CJK UNIFIED IDEOGRAPH-34B9	# 
+
+2F0C ;	5182 ;	MA	#* ( ⼌ → 冂 ) KANGXI RADICAL DOWN BOX → CJK UNIFIED IDEOGRAPH-5182	# 
+
+2F815 ;	518D ;	MA	# ( 再 → 再 ) CJK COMPATIBILITY IDEOGRAPH-2F815 → CJK UNIFIED IDEOGRAPH-518D	# 
+
+2F816 ;	2054B ;	MA	# ( 𠕋 → 𠕋 ) CJK COMPATIBILITY IDEOGRAPH-2F816 → CJK UNIFIED IDEOGRAPH-2054B	# 
+
+2F8D2 ;	5192 ;	MA	# ( 冒 → 冒 ) CJK COMPATIBILITY IDEOGRAPH-2F8D2 → CJK UNIFIED IDEOGRAPH-5192	# 
+
+2F8D3 ;	5195 ;	MA	# ( 冕 → 冕 ) CJK COMPATIBILITY IDEOGRAPH-2F8D3 → CJK UNIFIED IDEOGRAPH-5195	# 
+
+2F9CA ;	34BB ;	MA	# ( 㒻 → 㒻 ) CJK COMPATIBILITY IDEOGRAPH-2F9CA → CJK UNIFIED IDEOGRAPH-34BB	# 
+
+2F8D4 ;	6700 ;	MA	# ( 最 → 最 ) CJK COMPATIBILITY IDEOGRAPH-2F8D4 → CJK UNIFIED IDEOGRAPH-6700	# 
+
+2F0D ;	5196 ;	MA	#* ( ⼍ → 冖 ) KANGXI RADICAL COVER → CJK UNIFIED IDEOGRAPH-5196	# 
+
+2F817 ;	5197 ;	MA	# ( 冗 → 冗 ) CJK COMPATIBILITY IDEOGRAPH-2F817 → CJK UNIFIED IDEOGRAPH-5197	# 
+
+2F818 ;	51A4 ;	MA	# ( 冤 → 冤 ) CJK COMPATIBILITY IDEOGRAPH-2F818 → CJK UNIFIED IDEOGRAPH-51A4	# 
+
+2F0E ;	51AB ;	MA	#* ( ⼎ → 冫 ) KANGXI RADICAL ICE → CJK UNIFIED IDEOGRAPH-51AB	# 
+
+2F81A ;	51AC ;	MA	# ( 冬 → 冬 ) CJK COMPATIBILITY IDEOGRAPH-2F81A → CJK UNIFIED IDEOGRAPH-51AC	# 
+
+FA71 ;	51B5 ;	MA	# ( 况 → 况 ) CJK COMPATIBILITY IDEOGRAPH-FA71 → CJK UNIFIED IDEOGRAPH-51B5	# 
+2F81B ;	51B5 ;	MA	# ( 况 → 况 ) CJK COMPATIBILITY IDEOGRAPH-2F81B → CJK UNIFIED IDEOGRAPH-51B5	# 
+
+F92E ;	51B7 ;	MA	# ( 冷 → 冷 ) CJK COMPATIBILITY IDEOGRAPH-F92E → CJK UNIFIED IDEOGRAPH-51B7	# 
+
+F979 ;	51C9 ;	MA	# ( 凉 → 凉 ) CJK COMPATIBILITY IDEOGRAPH-F979 → CJK UNIFIED IDEOGRAPH-51C9	# 
+
+F955 ;	51CC ;	MA	# ( 凌 → 凌 ) CJK COMPATIBILITY IDEOGRAPH-F955 → CJK UNIFIED IDEOGRAPH-51CC	# 
+
+F954 ;	51DC ;	MA	# ( 凜 → 凜 ) CJK COMPATIBILITY IDEOGRAPH-F954 → CJK UNIFIED IDEOGRAPH-51DC	# 
+
+FA15 ;	51DE ;	MA	# ( 凞 → 凞 ) CJK COMPATIBILITY IDEOGRAPH-FA15 → CJK UNIFIED IDEOGRAPH-51DE	# 
+
+2F0F ;	51E0 ;	MA	#* ( ⼏ → 几 ) KANGXI RADICAL TABLE → CJK UNIFIED IDEOGRAPH-51E0	# 
+
+2F80D ;	2063A ;	MA	# ( 𠘺 → 𠘺 ) CJK COMPATIBILITY IDEOGRAPH-2F80D → CJK UNIFIED IDEOGRAPH-2063A	# 
+
+2F81D ;	51F5 ;	MA	# ( 凵 → 凵 ) CJK COMPATIBILITY IDEOGRAPH-2F81D → CJK UNIFIED IDEOGRAPH-51F5	# 
+2F10 ;	51F5 ;	MA	#* ( ⼐ → 凵 ) KANGXI RADICAL OPEN BOX → CJK UNIFIED IDEOGRAPH-51F5	# 
+
+2F11 ;	5200 ;	MA	#* ( ⼑ → 刀 ) KANGXI RADICAL KNIFE → CJK UNIFIED IDEOGRAPH-5200	# 
+
+2E89 ;	5202 ;	MA	#* ( ⺉ → 刂 ) CJK RADICAL KNIFE TWO → CJK UNIFIED IDEOGRAPH-5202	# 
+
+2F81E ;	5203 ;	MA	# ( 刃 → 刃 ) CJK COMPATIBILITY IDEOGRAPH-2F81E → CJK UNIFIED IDEOGRAPH-5203	# 
+
+FA00 ;	5207 ;	MA	# ( 切 → 切 ) CJK COMPATIBILITY IDEOGRAPH-FA00 → CJK UNIFIED IDEOGRAPH-5207	# 
+2F850 ;	5207 ;	MA	# ( 切 → 切 ) CJK COMPATIBILITY IDEOGRAPH-2F850 → CJK UNIFIED IDEOGRAPH-5207	# 
+
+F99C ;	5217 ;	MA	# ( 列 → 列 ) CJK COMPATIBILITY IDEOGRAPH-F99C → CJK UNIFIED IDEOGRAPH-5217	# 
+
+F9DD ;	5229 ;	MA	# ( 利 → 利 ) CJK COMPATIBILITY IDEOGRAPH-F9DD → CJK UNIFIED IDEOGRAPH-5229	# 
+
+2F81F ;	34DF ;	MA	# ( 㓟 → 㓟 ) CJK COMPATIBILITY IDEOGRAPH-2F81F → CJK UNIFIED IDEOGRAPH-34DF	# 
+
+F9FF ;	523A ;	MA	# ( 刺 → 刺 ) CJK COMPATIBILITY IDEOGRAPH-F9FF → CJK UNIFIED IDEOGRAPH-523A	# 
+
+2F820 ;	523B ;	MA	# ( 刻 → 刻 ) CJK COMPATIBILITY IDEOGRAPH-2F820 → CJK UNIFIED IDEOGRAPH-523B	# 
+
+2F821 ;	5246 ;	MA	# ( 剆 → 剆 ) CJK COMPATIBILITY IDEOGRAPH-2F821 → CJK UNIFIED IDEOGRAPH-5246	# 
+
+2F822 ;	5272 ;	MA	# ( 割 → 割 ) CJK COMPATIBILITY IDEOGRAPH-2F822 → CJK UNIFIED IDEOGRAPH-5272	# 
+
+2F823 ;	5277 ;	MA	# ( 剷 → 剷 ) CJK COMPATIBILITY IDEOGRAPH-2F823 → CJK UNIFIED IDEOGRAPH-5277	# 
+
+F9C7 ;	5289 ;	MA	# ( 劉 → 劉 ) CJK COMPATIBILITY IDEOGRAPH-F9C7 → CJK UNIFIED IDEOGRAPH-5289	# 
+
+2F9D9 ;	20804 ;	MA	# ( 𠠄 → 𠠄 ) CJK COMPATIBILITY IDEOGRAPH-2F9D9 → CJK UNIFIED IDEOGRAPH-20804	# 
+
+30AB ;	529B ;	MA	# ( カ → 力 ) KATAKANA LETTER KA → CJK UNIFIED IDEOGRAPH-529B	# →⼒→
+F98A ;	529B ;	MA	# ( 力 → 力 ) CJK COMPATIBILITY IDEOGRAPH-F98A → CJK UNIFIED IDEOGRAPH-529B	# 
+2F12 ;	529B ;	MA	#* ( ⼒ → 力 ) KANGXI RADICAL POWER → CJK UNIFIED IDEOGRAPH-529B	# 
+
+F99D ;	52A3 ;	MA	# ( 劣 → 劣 ) CJK COMPATIBILITY IDEOGRAPH-F99D → CJK UNIFIED IDEOGRAPH-52A3	# 
+
+2F824 ;	3515 ;	MA	# ( 㔕 → 㔕 ) CJK COMPATIBILITY IDEOGRAPH-2F824 → CJK UNIFIED IDEOGRAPH-3515	# 
+
+2F992 ;	52B3 ;	MA	# ( 劳 → 劳 ) CJK COMPATIBILITY IDEOGRAPH-2F992 → CJK UNIFIED IDEOGRAPH-52B3	# 
+
+FA76 ;	52C7 ;	MA	# ( 勇 → 勇 ) CJK COMPATIBILITY IDEOGRAPH-FA76 → CJK UNIFIED IDEOGRAPH-52C7	# 
+2F825 ;	52C7 ;	MA	# ( 勇 → 勇 ) CJK COMPATIBILITY IDEOGRAPH-2F825 → CJK UNIFIED IDEOGRAPH-52C7	# 
+
+FA33 ;	52C9 ;	MA	# ( 勉 → 勉 ) CJK COMPATIBILITY IDEOGRAPH-FA33 → CJK UNIFIED IDEOGRAPH-52C9	# 
+2F826 ;	52C9 ;	MA	# ( 勉 → 勉 ) CJK COMPATIBILITY IDEOGRAPH-2F826 → CJK UNIFIED IDEOGRAPH-52C9	# 
+
+F952 ;	52D2 ;	MA	# ( 勒 → 勒 ) CJK COMPATIBILITY IDEOGRAPH-F952 → CJK UNIFIED IDEOGRAPH-52D2	# 
+
+F92F ;	52DE ;	MA	# ( 勞 → 勞 ) CJK COMPATIBILITY IDEOGRAPH-F92F → CJK UNIFIED IDEOGRAPH-52DE	# 
+
+FA34 ;	52E4 ;	MA	# ( 勤 → 勤 ) CJK COMPATIBILITY IDEOGRAPH-FA34 → CJK UNIFIED IDEOGRAPH-52E4	# 
+2F827 ;	52E4 ;	MA	# ( 勤 → 勤 ) CJK COMPATIBILITY IDEOGRAPH-2F827 → CJK UNIFIED IDEOGRAPH-52E4	# 
+
+F97F ;	52F5 ;	MA	# ( 勵 → 勵 ) CJK COMPATIBILITY IDEOGRAPH-F97F → CJK UNIFIED IDEOGRAPH-52F5	# 
+
+2F13 ;	52F9 ;	MA	#* ( ⼓ → 勹 ) KANGXI RADICAL WRAP → CJK UNIFIED IDEOGRAPH-52F9	# 
+
+FA77 ;	52FA ;	MA	# ( 勺 → 勺 ) CJK COMPATIBILITY IDEOGRAPH-FA77 → CJK UNIFIED IDEOGRAPH-52FA	# 
+2F828 ;	52FA ;	MA	# ( 勺 → 勺 ) CJK COMPATIBILITY IDEOGRAPH-2F828 → CJK UNIFIED IDEOGRAPH-52FA	# 
+
+2F829 ;	5305 ;	MA	# ( 包 → 包 ) CJK COMPATIBILITY IDEOGRAPH-2F829 → CJK UNIFIED IDEOGRAPH-5305	# 
+
+2F82A ;	5306 ;	MA	# ( 匆 → 匆 ) CJK COMPATIBILITY IDEOGRAPH-2F82A → CJK UNIFIED IDEOGRAPH-5306	# 
+
+2F9DD ;	208DE ;	MA	# ( 𠣞 → 𠣞 ) CJK COMPATIBILITY IDEOGRAPH-2F9DD → CJK UNIFIED IDEOGRAPH-208DE	# 
+
+2F14 ;	5315 ;	MA	#* ( ⼔ → 匕 ) KANGXI RADICAL SPOON → CJK UNIFIED IDEOGRAPH-5315	# 
+
+F963 ;	5317 ;	MA	# ( 北 → 北 ) CJK COMPATIBILITY IDEOGRAPH-F963 → CJK UNIFIED IDEOGRAPH-5317	# 
+2F82B ;	5317 ;	MA	# ( 北 → 北 ) CJK COMPATIBILITY IDEOGRAPH-2F82B → CJK UNIFIED IDEOGRAPH-5317	# 
+
+2F15 ;	531A ;	MA	#* ( ⼕ → 匚 ) KANGXI RADICAL RIGHT OPEN BOX → CJK UNIFIED IDEOGRAPH-531A	# 
+
+2F16 ;	5338 ;	MA	#* ( ⼖ → 匸 ) KANGXI RADICAL HIDING ENCLOSURE → CJK UNIFIED IDEOGRAPH-5338	# 
+
+F9EB ;	533F ;	MA	# ( 匿 → 匿 ) CJK COMPATIBILITY IDEOGRAPH-F9EB → CJK UNIFIED IDEOGRAPH-533F	# 
+
+2F17 ;	5341 ;	MA	#* ( ⼗ → 十 ) KANGXI RADICAL TEN → CJK UNIFIED IDEOGRAPH-5341	# 
+3038 ;	5341 ;	MA	# ( 〸 → 十 ) HANGZHOU NUMERAL TEN → CJK UNIFIED IDEOGRAPH-5341	# 
+
+303A ;	5345 ;	MA	# ( 〺 → 卅 ) HANGZHOU NUMERAL THIRTY → CJK UNIFIED IDEOGRAPH-5345	# 
+
+2F82C ;	5349 ;	MA	# ( 卉 → 卉 ) CJK COMPATIBILITY IDEOGRAPH-2F82C → CJK UNIFIED IDEOGRAPH-5349	# 
+
+0FD6 ;	534D ;	MA	#* ( ࿖ → 卍 ) LEFT-FACING SVASTI SIGN → CJK UNIFIED IDEOGRAPH-534D	# 
+
+0FD5 ;	5350 ;	MA	#* ( ࿕ → 卐 ) RIGHT-FACING SVASTI SIGN → CJK UNIFIED IDEOGRAPH-5350	# 
+
+FA35 ;	5351 ;	MA	# ( 卑 → 卑 ) CJK COMPATIBILITY IDEOGRAPH-FA35 → CJK UNIFIED IDEOGRAPH-5351	# 
+2F82D ;	5351 ;	MA	# ( 卑 → 卑 ) CJK COMPATIBILITY IDEOGRAPH-2F82D → CJK UNIFIED IDEOGRAPH-5351	# 
+
+2F82E ;	535A ;	MA	# ( 博 → 博 ) CJK COMPATIBILITY IDEOGRAPH-2F82E → CJK UNIFIED IDEOGRAPH-535A	# 
+
+30C8 ;	535C ;	MA	# ( ト → 卜 ) KATAKANA LETTER TO → CJK UNIFIED IDEOGRAPH-535C	# →⼘→
+2F18 ;	535C ;	MA	#* ( ⼘ → 卜 ) KANGXI RADICAL DIVINATION → CJK UNIFIED IDEOGRAPH-535C	# 
+
+2F19 ;	5369 ;	MA	#* ( ⼙ → 卩 ) KANGXI RADICAL SEAL → CJK UNIFIED IDEOGRAPH-5369	# 
+
+2E8B ;	353E ;	MA	#* ( ⺋ → 㔾 ) CJK RADICAL SEAL → CJK UNIFIED IDEOGRAPH-353E	# 
+
+2F82F ;	5373 ;	MA	# ( 即 → 即 ) CJK COMPATIBILITY IDEOGRAPH-2F82F → CJK UNIFIED IDEOGRAPH-5373	# 
+
+F91C ;	5375 ;	MA	# ( 卵 → 卵 ) CJK COMPATIBILITY IDEOGRAPH-F91C → CJK UNIFIED IDEOGRAPH-5375	# 
+
+2F830 ;	537D ;	MA	# ( 卽 → 卽 ) CJK COMPATIBILITY IDEOGRAPH-2F830 → CJK UNIFIED IDEOGRAPH-537D	# 
+
+2F831 ;	537F ;	MA	# ( 卿 → 卿 ) CJK COMPATIBILITY IDEOGRAPH-2F831 → CJK UNIFIED IDEOGRAPH-537F	# 
+2F832 ;	537F ;	MA	# ( 卿 → 卿 ) CJK COMPATIBILITY IDEOGRAPH-2F832 → CJK UNIFIED IDEOGRAPH-537F	# 
+2F833 ;	537F ;	MA	# ( 卿 → 卿 ) CJK COMPATIBILITY IDEOGRAPH-2F833 → CJK UNIFIED IDEOGRAPH-537F	# 
+
+2F1A ;	5382 ;	MA	#* ( ⼚ → 厂 ) KANGXI RADICAL CLIFF → CJK UNIFIED IDEOGRAPH-5382	# 
+
+2F834 ;	20A2C ;	MA	# ( 𠨬 → 𠨬 ) CJK COMPATIBILITY IDEOGRAPH-2F834 → CJK UNIFIED IDEOGRAPH-20A2C	# 
+
+2F1B ;	53B6 ;	MA	#* ( ⼛ → 厶 ) KANGXI RADICAL PRIVATE → CJK UNIFIED IDEOGRAPH-53B6	# 
+
+F96B ;	53C3 ;	MA	# ( 參 → 參 ) CJK COMPATIBILITY IDEOGRAPH-F96B → CJK UNIFIED IDEOGRAPH-53C3	# 
+
+2F1C ;	53C8 ;	MA	#* ( ⼜ → 又 ) KANGXI RADICAL AGAIN → CJK UNIFIED IDEOGRAPH-53C8	# 
+
+2F836 ;	53CA ;	MA	# ( 及 → 及 ) CJK COMPATIBILITY IDEOGRAPH-2F836 → CJK UNIFIED IDEOGRAPH-53CA	# 
+
+2F837 ;	53DF ;	MA	# ( 叟 → 叟 ) CJK COMPATIBILITY IDEOGRAPH-2F837 → CJK UNIFIED IDEOGRAPH-53DF	# 
+
+2F838 ;	20B63 ;	MA	# ( 𠭣 → 𠭣 ) CJK COMPATIBILITY IDEOGRAPH-2F838 → CJK UNIFIED IDEOGRAPH-20B63	# 
+
+30ED ;	53E3 ;	MA	# ( ロ → 口 ) KATAKANA LETTER RO → CJK UNIFIED IDEOGRAPH-53E3	# →⼞→→⼝→
+2F1D ;	53E3 ;	MA	#* ( ⼝ → 口 ) KANGXI RADICAL MOUTH → CJK UNIFIED IDEOGRAPH-53E3	# 
+56D7 ;	53E3 ;	MA	# ( 囗 → 口 ) CJK UNIFIED IDEOGRAPH-56D7 → CJK UNIFIED IDEOGRAPH-53E3	# →⼞→→⼝→
+2F1E ;	53E3 ;	MA	#* ( ⼞ → 口 ) KANGXI RADICAL ENCLOSURE → CJK UNIFIED IDEOGRAPH-53E3	# →⼝→
+
+F906 ;	53E5 ;	MA	# ( 句 → 句 ) CJK COMPATIBILITY IDEOGRAPH-F906 → CJK UNIFIED IDEOGRAPH-53E5	# 
+
+2F839 ;	53EB ;	MA	# ( 叫 → 叫 ) CJK COMPATIBILITY IDEOGRAPH-2F839 → CJK UNIFIED IDEOGRAPH-53EB	# 
+
+2F83A ;	53F1 ;	MA	# ( 叱 → 叱 ) CJK COMPATIBILITY IDEOGRAPH-2F83A → CJK UNIFIED IDEOGRAPH-53F1	# 
+
+2F83B ;	5406 ;	MA	# ( 吆 → 吆 ) CJK COMPATIBILITY IDEOGRAPH-2F83B → CJK UNIFIED IDEOGRAPH-5406	# 
+
+F9DE ;	540F ;	MA	# ( 吏 → 吏 ) CJK COMPATIBILITY IDEOGRAPH-F9DE → CJK UNIFIED IDEOGRAPH-540F	# 
+
+F9ED ;	541D ;	MA	# ( 吝 → 吝 ) CJK COMPATIBILITY IDEOGRAPH-F9ED → CJK UNIFIED IDEOGRAPH-541D	# 
+
+2F83D ;	5438 ;	MA	# ( 吸 → 吸 ) CJK COMPATIBILITY IDEOGRAPH-2F83D → CJK UNIFIED IDEOGRAPH-5438	# 
+
+F980 ;	5442 ;	MA	# ( 呂 → 呂 ) CJK COMPATIBILITY IDEOGRAPH-F980 → CJK UNIFIED IDEOGRAPH-5442	# 
+
+2F83E ;	5448 ;	MA	# ( 呈 → 呈 ) CJK COMPATIBILITY IDEOGRAPH-2F83E → CJK UNIFIED IDEOGRAPH-5448	# 
+
+2F83F ;	5468 ;	MA	# ( 周 → 周 ) CJK COMPATIBILITY IDEOGRAPH-2F83F → CJK UNIFIED IDEOGRAPH-5468	# 
+
+2F83C ;	549E ;	MA	# ( 咞 → 咞 ) CJK COMPATIBILITY IDEOGRAPH-2F83C → CJK UNIFIED IDEOGRAPH-549E	# 
+
+2F840 ;	54A2 ;	MA	# ( 咢 → 咢 ) CJK COMPATIBILITY IDEOGRAPH-2F840 → CJK UNIFIED IDEOGRAPH-54A2	# 
+
+F99E ;	54BD ;	MA	# ( 咽 → 咽 ) CJK COMPATIBILITY IDEOGRAPH-F99E → CJK UNIFIED IDEOGRAPH-54BD	# 
+
+439B ;	3588 ;	MA	# ( 䎛 → 㖈 ) CJK UNIFIED IDEOGRAPH-439B → CJK UNIFIED IDEOGRAPH-3588	# 
+
+2F841 ;	54F6 ;	MA	# ( 哶 → 哶 ) CJK COMPATIBILITY IDEOGRAPH-2F841 → CJK UNIFIED IDEOGRAPH-54F6	# 
+
+2F842 ;	5510 ;	MA	# ( 唐 → 唐 ) CJK COMPATIBILITY IDEOGRAPH-2F842 → CJK UNIFIED IDEOGRAPH-5510	# 
+
+2F843 ;	5553 ;	MA	# ( 啓 → 啓 ) CJK COMPATIBILITY IDEOGRAPH-2F843 → CJK UNIFIED IDEOGRAPH-5553	# 
+555F ;	5553 ;	MA	# ( 啟 → 啓 ) CJK UNIFIED IDEOGRAPH-555F → CJK UNIFIED IDEOGRAPH-5553	# 
+
+FA79 ;	5555 ;	MA	# ( 啕 → 啕 ) CJK COMPATIBILITY IDEOGRAPH-FA79 → CJK UNIFIED IDEOGRAPH-5555	# 
+
+2F844 ;	5563 ;	MA	# ( 啣 → 啣 ) CJK COMPATIBILITY IDEOGRAPH-2F844 → CJK UNIFIED IDEOGRAPH-5563	# 
+
+2F845 ;	5584 ;	MA	# ( 善 → 善 ) CJK COMPATIBILITY IDEOGRAPH-2F845 → CJK UNIFIED IDEOGRAPH-5584	# 
+2F846 ;	5584 ;	MA	# ( 善 → 善 ) CJK COMPATIBILITY IDEOGRAPH-2F846 → CJK UNIFIED IDEOGRAPH-5584	# 
+
+F90B ;	5587 ;	MA	# ( 喇 → 喇 ) CJK COMPATIBILITY IDEOGRAPH-F90B → CJK UNIFIED IDEOGRAPH-5587	# 
+
+FA7A ;	5599 ;	MA	# ( 喙 → 喙 ) CJK COMPATIBILITY IDEOGRAPH-FA7A → CJK UNIFIED IDEOGRAPH-5599	# 
+2F847 ;	5599 ;	MA	# ( 喙 → 喙 ) CJK COMPATIBILITY IDEOGRAPH-2F847 → CJK UNIFIED IDEOGRAPH-5599	# 
+
+FA36 ;	559D ;	MA	# ( 喝 → 喝 ) CJK COMPATIBILITY IDEOGRAPH-FA36 → CJK UNIFIED IDEOGRAPH-559D	# 
+FA78 ;	559D ;	MA	# ( 喝 → 喝 ) CJK COMPATIBILITY IDEOGRAPH-FA78 → CJK UNIFIED IDEOGRAPH-559D	# 
+
+2F848 ;	55AB ;	MA	# ( 喫 → 喫 ) CJK COMPATIBILITY IDEOGRAPH-2F848 → CJK UNIFIED IDEOGRAPH-55AB	# 
+
+2F849 ;	55B3 ;	MA	# ( 喳 → 喳 ) CJK COMPATIBILITY IDEOGRAPH-2F849 → CJK UNIFIED IDEOGRAPH-55B3	# 
+
+FA0D ;	55C0 ;	MA	# ( 嗀 → 嗀 ) CJK COMPATIBILITY IDEOGRAPH-FA0D → CJK UNIFIED IDEOGRAPH-55C0	# 
+
+2F84A ;	55C2 ;	MA	# ( 嗂 → 嗂 ) CJK COMPATIBILITY IDEOGRAPH-2F84A → CJK UNIFIED IDEOGRAPH-55C2	# 
+
+FA7B ;	55E2 ;	MA	# ( 嗢 → 嗢 ) CJK COMPATIBILITY IDEOGRAPH-FA7B → CJK UNIFIED IDEOGRAPH-55E2	# 
+
+FA37 ;	5606 ;	MA	# ( 嘆 → 嘆 ) CJK COMPATIBILITY IDEOGRAPH-FA37 → CJK UNIFIED IDEOGRAPH-5606	# 
+2F84C ;	5606 ;	MA	# ( 嘆 → 嘆 ) CJK COMPATIBILITY IDEOGRAPH-2F84C → CJK UNIFIED IDEOGRAPH-5606	# 
+
+2F84E ;	5651 ;	MA	# ( 噑 → 噑 ) CJK COMPATIBILITY IDEOGRAPH-2F84E → CJK UNIFIED IDEOGRAPH-5651	# 
+
+2F84F ;	5674 ;	MA	# ( 噴 → 噴 ) CJK COMPATIBILITY IDEOGRAPH-2F84F → CJK UNIFIED IDEOGRAPH-5674	# 
+
+FA38 ;	5668 ;	MA	# ( 器 → 器 ) CJK COMPATIBILITY IDEOGRAPH-FA38 → CJK UNIFIED IDEOGRAPH-5668	# 
+
+F9A9 ;	56F9 ;	MA	# ( 囹 → 囹 ) CJK COMPATIBILITY IDEOGRAPH-F9A9 → CJK UNIFIED IDEOGRAPH-56F9	# 
+
+2F84B ;	5716 ;	MA	# ( 圖 → 圖 ) CJK COMPATIBILITY IDEOGRAPH-2F84B → CJK UNIFIED IDEOGRAPH-5716	# 
+
+2F84D ;	5717 ;	MA	# ( 圗 → 圗 ) CJK COMPATIBILITY IDEOGRAPH-2F84D → CJK UNIFIED IDEOGRAPH-5717	# 
+
+2F1F ;	571F ;	MA	#* ( ⼟ → 土 ) KANGXI RADICAL EARTH → CJK UNIFIED IDEOGRAPH-571F	# 
+58EB ;	571F ;	MA	# ( 士 → 土 ) CJK UNIFIED IDEOGRAPH-58EB → CJK UNIFIED IDEOGRAPH-571F	# →⼠→→⼟→
+2F20 ;	571F ;	MA	#* ( ⼠ → 土 ) KANGXI RADICAL SCHOLAR → CJK UNIFIED IDEOGRAPH-571F	# →⼟→
+
+2F855 ;	578B ;	MA	# ( 型 → 型 ) CJK COMPATIBILITY IDEOGRAPH-2F855 → CJK UNIFIED IDEOGRAPH-578B	# 
+
+2F852 ;	57CE ;	MA	# ( 城 → 城 ) CJK COMPATIBILITY IDEOGRAPH-2F852 → CJK UNIFIED IDEOGRAPH-57CE	# 
+
+39B3 ;	363D ;	MA	# ( 㦳 → 㘽 ) CJK UNIFIED IDEOGRAPH-39B3 → CJK UNIFIED IDEOGRAPH-363D	# 
+
+2F853 ;	57F4 ;	MA	# ( 埴 → 埴 ) CJK COMPATIBILITY IDEOGRAPH-2F853 → CJK UNIFIED IDEOGRAPH-57F4	# 
+
+2F854 ;	580D ;	MA	# ( 堍 → 堍 ) CJK COMPATIBILITY IDEOGRAPH-2F854 → CJK UNIFIED IDEOGRAPH-580D	# 
+
+2F857 ;	5831 ;	MA	# ( 報 → 報 ) CJK COMPATIBILITY IDEOGRAPH-2F857 → CJK UNIFIED IDEOGRAPH-5831	# 
+
+2F856 ;	5832 ;	MA	# ( 堲 → 堲 ) CJK COMPATIBILITY IDEOGRAPH-2F856 → CJK UNIFIED IDEOGRAPH-5832	# 
+
+FA39 ;	5840 ;	MA	# ( 塀 → 塀 ) CJK COMPATIBILITY IDEOGRAPH-FA39 → CJK UNIFIED IDEOGRAPH-5840	# 
+
+FA10 ;	585A ;	MA	# ( 塚 → 塚 ) CJK COMPATIBILITY IDEOGRAPH-FA10 → CJK UNIFIED IDEOGRAPH-585A	# 
+FA7C ;	585A ;	MA	# ( 塚 → 塚 ) CJK COMPATIBILITY IDEOGRAPH-FA7C → CJK UNIFIED IDEOGRAPH-585A	# 
+
+F96C ;	585E ;	MA	# ( 塞 → 塞 ) CJK COMPATIBILITY IDEOGRAPH-F96C → CJK UNIFIED IDEOGRAPH-585E	# 
+
+586B ;	5861 ;	MA	# ( 填 → 塡 ) CJK UNIFIED IDEOGRAPH-586B → CJK UNIFIED IDEOGRAPH-5861	# 
+
+58FF ;	58AB ;	MA	# ( 壿 → 墫 ) CJK UNIFIED IDEOGRAPH-58FF → CJK UNIFIED IDEOGRAPH-58AB	# 
+
+2F858 ;	58AC ;	MA	# ( 墬 → 墬 ) CJK COMPATIBILITY IDEOGRAPH-2F858 → CJK UNIFIED IDEOGRAPH-58AC	# 
+
+FA7D ;	58B3 ;	MA	# ( 墳 → 墳 ) CJK COMPATIBILITY IDEOGRAPH-FA7D → CJK UNIFIED IDEOGRAPH-58B3	# 
+
+F94A ;	58D8 ;	MA	# ( 壘 → 壘 ) CJK COMPATIBILITY IDEOGRAPH-F94A → CJK UNIFIED IDEOGRAPH-58D8	# 
+
+F942 ;	58DF ;	MA	# ( 壟 → 壟 ) CJK COMPATIBILITY IDEOGRAPH-F942 → CJK UNIFIED IDEOGRAPH-58DF	# 
+
+2F859 ;	214E4 ;	MA	# ( 𡓤 → 𡓤 ) CJK COMPATIBILITY IDEOGRAPH-2F859 → CJK UNIFIED IDEOGRAPH-214E4	# 
+
+2F851 ;	58EE ;	MA	# ( 壮 → 壮 ) CJK COMPATIBILITY IDEOGRAPH-2F851 → CJK UNIFIED IDEOGRAPH-58EE	# 
+
+2F85A ;	58F2 ;	MA	# ( 売 → 売 ) CJK COMPATIBILITY IDEOGRAPH-2F85A → CJK UNIFIED IDEOGRAPH-58F2	# 
+
+2F85B ;	58F7 ;	MA	# ( 壷 → 壷 ) CJK COMPATIBILITY IDEOGRAPH-2F85B → CJK UNIFIED IDEOGRAPH-58F7	# 
+
+2F21 ;	5902 ;	MA	#* ( ⼡ → 夂 ) KANGXI RADICAL GO → CJK UNIFIED IDEOGRAPH-5902	# 
+
+2F85C ;	5906 ;	MA	# ( 夆 → 夆 ) CJK COMPATIBILITY IDEOGRAPH-2F85C → CJK UNIFIED IDEOGRAPH-5906	# 
+
+2F22 ;	590A ;	MA	#* ( ⼢ → 夊 ) KANGXI RADICAL GO SLOWLY → CJK UNIFIED IDEOGRAPH-590A	# 
+
+30BF ;	5915 ;	MA	# ( タ → 夕 ) KATAKANA LETTER TA → CJK UNIFIED IDEOGRAPH-5915	# →⼣→
+2F23 ;	5915 ;	MA	#* ( ⼣ → 夕 ) KANGXI RADICAL EVENING → CJK UNIFIED IDEOGRAPH-5915	# 
+
+2F85D ;	591A ;	MA	# ( 多 → 多 ) CJK COMPATIBILITY IDEOGRAPH-2F85D → CJK UNIFIED IDEOGRAPH-591A	# 
+
+2F85E ;	5922 ;	MA	# ( 夢 → 夢 ) CJK COMPATIBILITY IDEOGRAPH-2F85E → CJK UNIFIED IDEOGRAPH-5922	# 
+
+2F24 ;	5927 ;	MA	#* ( ⼤ → 大 ) KANGXI RADICAL BIG → CJK UNIFIED IDEOGRAPH-5927	# 
+
+FA7E ;	5944 ;	MA	# ( 奄 → 奄 ) CJK COMPATIBILITY IDEOGRAPH-FA7E → CJK UNIFIED IDEOGRAPH-5944	# 
+
+F90C ;	5948 ;	MA	# ( 奈 → 奈 ) CJK COMPATIBILITY IDEOGRAPH-F90C → CJK UNIFIED IDEOGRAPH-5948	# 
+
+F909 ;	5951 ;	MA	# ( 契 → 契 ) CJK COMPATIBILITY IDEOGRAPH-F909 → CJK UNIFIED IDEOGRAPH-5951	# 
+
+FA7F ;	5954 ;	MA	# ( 奔 → 奔 ) CJK COMPATIBILITY IDEOGRAPH-FA7F → CJK UNIFIED IDEOGRAPH-5954	# 
+
+2F85F ;	5962 ;	MA	# ( 奢 → 奢 ) CJK COMPATIBILITY IDEOGRAPH-2F85F → CJK UNIFIED IDEOGRAPH-5962	# 
+
+F981 ;	5973 ;	MA	# ( 女 → 女 ) CJK COMPATIBILITY IDEOGRAPH-F981 → CJK UNIFIED IDEOGRAPH-5973	# 
+2F25 ;	5973 ;	MA	#* ( ⼥ → 女 ) KANGXI RADICAL WOMAN → CJK UNIFIED IDEOGRAPH-5973	# 
+
+2F860 ;	216A8 ;	MA	# ( 𡚨 → 𡚨 ) CJK COMPATIBILITY IDEOGRAPH-2F860 → CJK UNIFIED IDEOGRAPH-216A8	# 
+
+2F861 ;	216EA ;	MA	# ( 𡛪 → 𡛪 ) CJK COMPATIBILITY IDEOGRAPH-2F861 → CJK UNIFIED IDEOGRAPH-216EA	# 
+
+2F865 ;	59D8 ;	MA	# ( 姘 → 姘 ) CJK COMPATIBILITY IDEOGRAPH-2F865 → CJK UNIFIED IDEOGRAPH-59D8	# 
+
+2F862 ;	59EC ;	MA	# ( 姬 → 姬 ) CJK COMPATIBILITY IDEOGRAPH-2F862 → CJK UNIFIED IDEOGRAPH-59EC	# 
+
+2F863 ;	5A1B ;	MA	# ( 娛 → 娛 ) CJK COMPATIBILITY IDEOGRAPH-2F863 → CJK UNIFIED IDEOGRAPH-5A1B	# 
+
+2F864 ;	5A27 ;	MA	# ( 娧 → 娧 ) CJK COMPATIBILITY IDEOGRAPH-2F864 → CJK UNIFIED IDEOGRAPH-5A27	# 
+
+FA80 ;	5A62 ;	MA	# ( 婢 → 婢 ) CJK COMPATIBILITY IDEOGRAPH-FA80 → CJK UNIFIED IDEOGRAPH-5A62	# 
+
+2F866 ;	5A66 ;	MA	# ( 婦 → 婦 ) CJK COMPATIBILITY IDEOGRAPH-2F866 → CJK UNIFIED IDEOGRAPH-5A66	# 
+
+5B00 ;	5AAF ;	MA	# ( 嬀 → 媯 ) CJK UNIFIED IDEOGRAPH-5B00 → CJK UNIFIED IDEOGRAPH-5AAF	# 
+
+2F867 ;	36EE ;	MA	# ( 㛮 → 㛮 ) CJK COMPATIBILITY IDEOGRAPH-2F867 → CJK UNIFIED IDEOGRAPH-36EE	# 
+
+2F868 ;	36FC ;	MA	# ( 㛼 → 㛼 ) CJK COMPATIBILITY IDEOGRAPH-2F868 → CJK UNIFIED IDEOGRAPH-36FC	# 
+
+2F986 ;	5AB5 ;	MA	# ( 媵 → 媵 ) CJK COMPATIBILITY IDEOGRAPH-2F986 → CJK UNIFIED IDEOGRAPH-5AB5	# 
+
+2F869 ;	5B08 ;	MA	# ( 嬈 → 嬈 ) CJK COMPATIBILITY IDEOGRAPH-2F869 → CJK UNIFIED IDEOGRAPH-5B08	# 
+
+FA81 ;	5B28 ;	MA	# ( 嬨 → 嬨 ) CJK COMPATIBILITY IDEOGRAPH-FA81 → CJK UNIFIED IDEOGRAPH-5B28	# 
+
+2F86A ;	5B3E ;	MA	# ( 嬾 → 嬾 ) CJK COMPATIBILITY IDEOGRAPH-2F86A → CJK UNIFIED IDEOGRAPH-5B3E	# 
+2F86B ;	5B3E ;	MA	# ( 嬾 → 嬾 ) CJK COMPATIBILITY IDEOGRAPH-2F86B → CJK UNIFIED IDEOGRAPH-5B3E	# 
+
+2F26 ;	5B50 ;	MA	#* ( ⼦ → 子 ) KANGXI RADICAL CHILD → CJK UNIFIED IDEOGRAPH-5B50	# 
+
+2F27 ;	5B80 ;	MA	#* ( ⼧ → 宀 ) KANGXI RADICAL ROOF → CJK UNIFIED IDEOGRAPH-5B80	# 
+
+FA04 ;	5B85 ;	MA	# ( 宅 → 宅 ) CJK COMPATIBILITY IDEOGRAPH-FA04 → CJK UNIFIED IDEOGRAPH-5B85	# 
+
+2F86C ;	219C8 ;	MA	# ( 𡧈 → 𡧈 ) CJK COMPATIBILITY IDEOGRAPH-2F86C → CJK UNIFIED IDEOGRAPH-219C8	# 
+
+2F86D ;	5BC3 ;	MA	# ( 寃 → 寃 ) CJK COMPATIBILITY IDEOGRAPH-2F86D → CJK UNIFIED IDEOGRAPH-5BC3	# 
+
+2F86E ;	5BD8 ;	MA	# ( 寘 → 寘 ) CJK COMPATIBILITY IDEOGRAPH-2F86E → CJK UNIFIED IDEOGRAPH-5BD8	# 
+
+F95F ;	5BE7 ;	MA	# ( 寧 → 寧 ) CJK COMPATIBILITY IDEOGRAPH-F95F → CJK UNIFIED IDEOGRAPH-5BE7	# 
+F9AA ;	5BE7 ;	MA	# ( 寧 → 寧 ) CJK COMPATIBILITY IDEOGRAPH-F9AA → CJK UNIFIED IDEOGRAPH-5BE7	# 
+2F86F ;	5BE7 ;	MA	# ( 寧 → 寧 ) CJK COMPATIBILITY IDEOGRAPH-2F86F → CJK UNIFIED IDEOGRAPH-5BE7	# 
+
+F9BC ;	5BEE ;	MA	# ( 寮 → 寮 ) CJK COMPATIBILITY IDEOGRAPH-F9BC → CJK UNIFIED IDEOGRAPH-5BEE	# 
+
+2F870 ;	5BF3 ;	MA	# ( 寳 → 寳 ) CJK COMPATIBILITY IDEOGRAPH-2F870 → CJK UNIFIED IDEOGRAPH-5BF3	# 
+
+2F871 ;	21B18 ;	MA	# ( 𡬘 → 𡬘 ) CJK COMPATIBILITY IDEOGRAPH-2F871 → CJK UNIFIED IDEOGRAPH-21B18	# 
+
+2F28 ;	5BF8 ;	MA	#* ( ⼨ → 寸 ) KANGXI RADICAL INCH → CJK UNIFIED IDEOGRAPH-5BF8	# 
+
+2F872 ;	5BFF ;	MA	# ( 寿 → 寿 ) CJK COMPATIBILITY IDEOGRAPH-2F872 → CJK UNIFIED IDEOGRAPH-5BFF	# 
+
+2F873 ;	5C06 ;	MA	# ( 将 → 将 ) CJK COMPATIBILITY IDEOGRAPH-2F873 → CJK UNIFIED IDEOGRAPH-5C06	# 
+
+2F29 ;	5C0F ;	MA	#* ( ⼩ → 小 ) KANGXI RADICAL SMALL → CJK UNIFIED IDEOGRAPH-5C0F	# 
+
+2F875 ;	5C22 ;	MA	# ( 尢 → 尢 ) CJK COMPATIBILITY IDEOGRAPH-2F875 → CJK UNIFIED IDEOGRAPH-5C22	# 
+2E90 ;	5C22 ;	MA	#* ( ⺐ → 尢 ) CJK RADICAL LAME THREE → CJK UNIFIED IDEOGRAPH-5C22	# 
+2F2A ;	5C22 ;	MA	#* ( ⼪ → 尢 ) KANGXI RADICAL LAME → CJK UNIFIED IDEOGRAPH-5C22	# 
+
+2E8F ;	5C23 ;	MA	#* ( ⺏ → 尣 ) CJK RADICAL LAME TWO → CJK UNIFIED IDEOGRAPH-5C23	# 
+
+2F876 ;	3781 ;	MA	# ( 㞁 → 㞁 ) CJK COMPATIBILITY IDEOGRAPH-2F876 → CJK UNIFIED IDEOGRAPH-3781	# 
+
+2F2B ;	5C38 ;	MA	#* ( ⼫ → 尸 ) KANGXI RADICAL CORPSE → CJK UNIFIED IDEOGRAPH-5C38	# 
+
+F9BD ;	5C3F ;	MA	# ( 尿 → 尿 ) CJK COMPATIBILITY IDEOGRAPH-F9BD → CJK UNIFIED IDEOGRAPH-5C3F	# 
+
+2F877 ;	5C60 ;	MA	# ( 屠 → 屠 ) CJK COMPATIBILITY IDEOGRAPH-2F877 → CJK UNIFIED IDEOGRAPH-5C60	# 
+
+F94B ;	5C62 ;	MA	# ( 屢 → 屢 ) CJK COMPATIBILITY IDEOGRAPH-F94B → CJK UNIFIED IDEOGRAPH-5C62	# 
+
+FA3B ;	5C64 ;	MA	# ( 層 → 層 ) CJK COMPATIBILITY IDEOGRAPH-FA3B → CJK UNIFIED IDEOGRAPH-5C64	# 
+
+F9DF ;	5C65 ;	MA	# ( 履 → 履 ) CJK COMPATIBILITY IDEOGRAPH-F9DF → CJK UNIFIED IDEOGRAPH-5C65	# 
+
+FA3C ;	5C6E ;	MA	# ( 屮 → 屮 ) CJK COMPATIBILITY IDEOGRAPH-FA3C → CJK UNIFIED IDEOGRAPH-5C6E	# 
+2F878 ;	5C6E ;	MA	# ( 屮 → 屮 ) CJK COMPATIBILITY IDEOGRAPH-2F878 → CJK UNIFIED IDEOGRAPH-5C6E	# 
+2F2C ;	5C6E ;	MA	#* ( ⼬ → 屮 ) KANGXI RADICAL SPROUT → CJK UNIFIED IDEOGRAPH-5C6E	# 
+
+2F8F8 ;	21D0B ;	MA	# ( 𡴋 → 𡴋 ) CJK COMPATIBILITY IDEOGRAPH-2F8F8 → CJK UNIFIED IDEOGRAPH-21D0B	# 
+
+2F2D ;	5C71 ;	MA	#* ( ⼭ → 山 ) KANGXI RADICAL MOUNTAIN → CJK UNIFIED IDEOGRAPH-5C71	# 
+
+2F879 ;	5CC0 ;	MA	# ( 峀 → 峀 ) CJK COMPATIBILITY IDEOGRAPH-2F879 → CJK UNIFIED IDEOGRAPH-5CC0	# 
+
+2F87A ;	5C8D ;	MA	# ( 岍 → 岍 ) CJK COMPATIBILITY IDEOGRAPH-2F87A → CJK UNIFIED IDEOGRAPH-5C8D	# 
+
+2F87B ;	21DE4 ;	MA	# ( 𡷤 → 𡷤 ) CJK COMPATIBILITY IDEOGRAPH-2F87B → CJK UNIFIED IDEOGRAPH-21DE4	# 
+
+2F87D ;	21DE6 ;	MA	# ( 𡷦 → 𡷦 ) CJK COMPATIBILITY IDEOGRAPH-2F87D → CJK UNIFIED IDEOGRAPH-21DE6	# 
+
+F9D5 ;	5D19 ;	MA	# ( 崙 → 崙 ) CJK COMPATIBILITY IDEOGRAPH-F9D5 → CJK UNIFIED IDEOGRAPH-5D19	# 
+
+2F87C ;	5D43 ;	MA	# ( 嵃 → 嵃 ) CJK COMPATIBILITY IDEOGRAPH-2F87C → CJK UNIFIED IDEOGRAPH-5D43	# 
+
+F921 ;	5D50 ;	MA	# ( 嵐 → 嵐 ) CJK COMPATIBILITY IDEOGRAPH-F921 → CJK UNIFIED IDEOGRAPH-5D50	# 
+
+2F87F ;	5D6B ;	MA	# ( 嵫 → 嵫 ) CJK COMPATIBILITY IDEOGRAPH-2F87F → CJK UNIFIED IDEOGRAPH-5D6B	# 
+
+2F87E ;	5D6E ;	MA	# ( 嵮 → 嵮 ) CJK COMPATIBILITY IDEOGRAPH-2F87E → CJK UNIFIED IDEOGRAPH-5D6E	# 
+
+2F880 ;	5D7C ;	MA	# ( 嵼 → 嵼 ) CJK COMPATIBILITY IDEOGRAPH-2F880 → CJK UNIFIED IDEOGRAPH-5D7C	# 
+
+2F9F4 ;	5DB2 ;	MA	# ( 嶲 → 嶲 ) CJK COMPATIBILITY IDEOGRAPH-2F9F4 → CJK UNIFIED IDEOGRAPH-5DB2	# 
+
+F9AB ;	5DBA ;	MA	# ( 嶺 → 嶺 ) CJK COMPATIBILITY IDEOGRAPH-F9AB → CJK UNIFIED IDEOGRAPH-5DBA	# 
+
+2F2E ;	5DDB ;	MA	#* ( ⼮ → 巛 ) KANGXI RADICAL RIVER → CJK UNIFIED IDEOGRAPH-5DDB	# 
+
+2F882 ;	5DE2 ;	MA	# ( 巢 → 巢 ) CJK COMPATIBILITY IDEOGRAPH-2F882 → CJK UNIFIED IDEOGRAPH-5DE2	# 
+
+30A8 ;	5DE5 ;	MA	# ( エ → 工 ) KATAKANA LETTER E → CJK UNIFIED IDEOGRAPH-5DE5	# →⼯→
+2F2F ;	5DE5 ;	MA	#* ( ⼯ → 工 ) KANGXI RADICAL WORK → CJK UNIFIED IDEOGRAPH-5DE5	# 
+
+2F30 ;	5DF1 ;	MA	#* ( ⼰ → 己 ) KANGXI RADICAL ONESELF → CJK UNIFIED IDEOGRAPH-5DF1	# 
+
+2E92 ;	5DF3 ;	MA	#* ( ⺒ → 巳 ) CJK RADICAL SNAKE → CJK UNIFIED IDEOGRAPH-5DF3	# 
+
+2F883 ;	382F ;	MA	# ( 㠯 → 㠯 ) CJK COMPATIBILITY IDEOGRAPH-2F883 → CJK UNIFIED IDEOGRAPH-382F	# 
+
+2F884 ;	5DFD ;	MA	# ( 巽 → 巽 ) CJK COMPATIBILITY IDEOGRAPH-2F884 → CJK UNIFIED IDEOGRAPH-5DFD	# 
+
+2F31 ;	5DFE ;	MA	#* ( ⼱ → 巾 ) KANGXI RADICAL TURBAN → CJK UNIFIED IDEOGRAPH-5DFE	# 
+
+5E32 ;	5E21 ;	MA	# ( 帲 → 帡 ) CJK UNIFIED IDEOGRAPH-5E32 → CJK UNIFIED IDEOGRAPH-5E21	# 
+
+2F885 ;	5E28 ;	MA	# ( 帨 → 帨 ) CJK COMPATIBILITY IDEOGRAPH-2F885 → CJK UNIFIED IDEOGRAPH-5E28	# 
+
+2F886 ;	5E3D ;	MA	# ( 帽 → 帽 ) CJK COMPATIBILITY IDEOGRAPH-2F886 → CJK UNIFIED IDEOGRAPH-5E3D	# 
+
+2F887 ;	5E69 ;	MA	# ( 幩 → 幩 ) CJK COMPATIBILITY IDEOGRAPH-2F887 → CJK UNIFIED IDEOGRAPH-5E69	# 
+
+2F888 ;	3862 ;	MA	# ( 㡢 → 㡢 ) CJK COMPATIBILITY IDEOGRAPH-2F888 → CJK UNIFIED IDEOGRAPH-3862	# 
+
+2F889 ;	22183 ;	MA	# ( 𢆃 → 𢆃 ) CJK COMPATIBILITY IDEOGRAPH-2F889 → CJK UNIFIED IDEOGRAPH-22183	# 
+
+2F32 ;	5E72 ;	MA	#* ( ⼲ → 干 ) KANGXI RADICAL DRY → CJK UNIFIED IDEOGRAPH-5E72	# 
+
+F98E ;	5E74 ;	MA	# ( 年 → 年 ) CJK COMPATIBILITY IDEOGRAPH-F98E → CJK UNIFIED IDEOGRAPH-5E74	# 
+
+2F939 ;	2219F ;	MA	# ( 𢆟 → 𢆟 ) CJK COMPATIBILITY IDEOGRAPH-2F939 → CJK UNIFIED IDEOGRAPH-2219F	# 
+
+2E93 ;	5E7A ;	MA	#* ( ⺓ → 幺 ) CJK RADICAL THREAD → CJK UNIFIED IDEOGRAPH-5E7A	# 
+2F33 ;	5E7A ;	MA	#* ( ⼳ → 幺 ) KANGXI RADICAL SHORT THREAD → CJK UNIFIED IDEOGRAPH-5E7A	# 
+
+2F34 ;	5E7F ;	MA	#* ( ⼴ → 广 ) KANGXI RADICAL DOTTED CLIFF → CJK UNIFIED IDEOGRAPH-5E7F	# 
+
+FA01 ;	5EA6 ;	MA	# ( 度 → 度 ) CJK COMPATIBILITY IDEOGRAPH-FA01 → CJK UNIFIED IDEOGRAPH-5EA6	# 
+
+2F88A ;	387C ;	MA	# ( 㡼 → 㡼 ) CJK COMPATIBILITY IDEOGRAPH-2F88A → CJK UNIFIED IDEOGRAPH-387C	# 
+
+2F88B ;	5EB0 ;	MA	# ( 庰 → 庰 ) CJK COMPATIBILITY IDEOGRAPH-2F88B → CJK UNIFIED IDEOGRAPH-5EB0	# 
+
+2F88C ;	5EB3 ;	MA	# ( 庳 → 庳 ) CJK COMPATIBILITY IDEOGRAPH-2F88C → CJK UNIFIED IDEOGRAPH-5EB3	# 
+
+2F88D ;	5EB6 ;	MA	# ( 庶 → 庶 ) CJK COMPATIBILITY IDEOGRAPH-2F88D → CJK UNIFIED IDEOGRAPH-5EB6	# 
+
+F928 ;	5ECA ;	MA	# ( 廊 → 廊 ) CJK COMPATIBILITY IDEOGRAPH-F928 → CJK UNIFIED IDEOGRAPH-5ECA	# 
+2F88E ;	5ECA ;	MA	# ( 廊 → 廊 ) CJK COMPATIBILITY IDEOGRAPH-2F88E → CJK UNIFIED IDEOGRAPH-5ECA	# 
+
+F9A2 ;	5EC9 ;	MA	# ( 廉 → 廉 ) CJK COMPATIBILITY IDEOGRAPH-F9A2 → CJK UNIFIED IDEOGRAPH-5EC9	# 
+
+FA82 ;	5ED2 ;	MA	# ( 廒 → 廒 ) CJK COMPATIBILITY IDEOGRAPH-FA82 → CJK UNIFIED IDEOGRAPH-5ED2	# 
+
+FA0B ;	5ED3 ;	MA	# ( 廓 → 廓 ) CJK COMPATIBILITY IDEOGRAPH-FA0B → CJK UNIFIED IDEOGRAPH-5ED3	# 
+
+FA83 ;	5ED9 ;	MA	# ( 廙 → 廙 ) CJK COMPATIBILITY IDEOGRAPH-FA83 → CJK UNIFIED IDEOGRAPH-5ED9	# 
+
+F982 ;	5EEC ;	MA	# ( 廬 → 廬 ) CJK COMPATIBILITY IDEOGRAPH-F982 → CJK UNIFIED IDEOGRAPH-5EEC	# 
+
+2F35 ;	5EF4 ;	MA	#* ( ⼵ → 廴 ) KANGXI RADICAL LONG STRIDE → CJK UNIFIED IDEOGRAPH-5EF4	# 
+
+2F890 ;	5EFE ;	MA	# ( 廾 → 廾 ) CJK COMPATIBILITY IDEOGRAPH-2F890 → CJK UNIFIED IDEOGRAPH-5EFE	# 
+2F36 ;	5EFE ;	MA	#* ( ⼶ → 廾 ) KANGXI RADICAL TWO HANDS → CJK UNIFIED IDEOGRAPH-5EFE	# 
+
+2F891 ;	22331 ;	MA	# ( 𢌱 → 𢌱 ) CJK COMPATIBILITY IDEOGRAPH-2F891 → CJK UNIFIED IDEOGRAPH-22331	# 
+2F892 ;	22331 ;	MA	# ( 𢌱 → 𢌱 ) CJK COMPATIBILITY IDEOGRAPH-2F892 → CJK UNIFIED IDEOGRAPH-22331	# 
+
+F943 ;	5F04 ;	MA	# ( 弄 → 弄 ) CJK COMPATIBILITY IDEOGRAPH-F943 → CJK UNIFIED IDEOGRAPH-5F04	# 
+
+2F37 ;	5F0B ;	MA	#* ( ⼷ → 弋 ) KANGXI RADICAL SHOOT → CJK UNIFIED IDEOGRAPH-5F0B	# 
+
+2F38 ;	5F13 ;	MA	#* ( ⼸ → 弓 ) KANGXI RADICAL BOW → CJK UNIFIED IDEOGRAPH-5F13	# 
+
+2F894 ;	5F22 ;	MA	# ( 弢 → 弢 ) CJK COMPATIBILITY IDEOGRAPH-2F894 → CJK UNIFIED IDEOGRAPH-5F22	# 
+2F895 ;	5F22 ;	MA	# ( 弢 → 弢 ) CJK COMPATIBILITY IDEOGRAPH-2F895 → CJK UNIFIED IDEOGRAPH-5F22	# 
+
+2F39 ;	5F50 ;	MA	#* ( ⼹ → 彐 ) KANGXI RADICAL SNOUT → CJK UNIFIED IDEOGRAPH-5F50	# 
+
+2E94 ;	5F51 ;	MA	#* ( ⺔ → 彑 ) CJK RADICAL SNOUT ONE → CJK UNIFIED IDEOGRAPH-5F51	# 
+
+2F874 ;	5F53 ;	MA	# ( 当 → 当 ) CJK COMPATIBILITY IDEOGRAPH-2F874 → CJK UNIFIED IDEOGRAPH-5F53	# 
+
+2F896 ;	38C7 ;	MA	# ( 㣇 → 㣇 ) CJK COMPATIBILITY IDEOGRAPH-2F896 → CJK UNIFIED IDEOGRAPH-38C7	# 
+
+2F3A ;	5F61 ;	MA	#* ( ⼺ → 彡 ) KANGXI RADICAL BRISTLE → CJK UNIFIED IDEOGRAPH-5F61	# 
+
+2F899 ;	5F62 ;	MA	# ( 形 → 形 ) CJK COMPATIBILITY IDEOGRAPH-2F899 → CJK UNIFIED IDEOGRAPH-5F62	# 
+
+FA84 ;	5F69 ;	MA	# ( 彩 → 彩 ) CJK COMPATIBILITY IDEOGRAPH-FA84 → CJK UNIFIED IDEOGRAPH-5F69	# 
+
+2F89A ;	5F6B ;	MA	# ( 彫 → 彫 ) CJK COMPATIBILITY IDEOGRAPH-2F89A → CJK UNIFIED IDEOGRAPH-5F6B	# 
+
+2F3B ;	5F73 ;	MA	#* ( ⼻ → 彳 ) KANGXI RADICAL STEP → CJK UNIFIED IDEOGRAPH-5F73	# 
+
+F9D8 ;	5F8B ;	MA	# ( 律 → 律 ) CJK COMPATIBILITY IDEOGRAPH-F9D8 → CJK UNIFIED IDEOGRAPH-5F8B	# 
+
+2F89B ;	38E3 ;	MA	# ( 㣣 → 㣣 ) CJK COMPATIBILITY IDEOGRAPH-2F89B → CJK UNIFIED IDEOGRAPH-38E3	# 
+
+2F89C ;	5F9A ;	MA	# ( 徚 → 徚 ) CJK COMPATIBILITY IDEOGRAPH-2F89C → CJK UNIFIED IDEOGRAPH-5F9A	# 
+
+F966 ;	5FA9 ;	MA	# ( 復 → 復 ) CJK COMPATIBILITY IDEOGRAPH-F966 → CJK UNIFIED IDEOGRAPH-5FA9	# 
+
+FA85 ;	5FAD ;	MA	# ( 徭 → 徭 ) CJK COMPATIBILITY IDEOGRAPH-FA85 → CJK UNIFIED IDEOGRAPH-5FAD	# 
+
+2F3C ;	5FC3 ;	MA	#* ( ⼼ → 心 ) KANGXI RADICAL HEART → CJK UNIFIED IDEOGRAPH-5FC3	# 
+
+2E96 ;	5FC4 ;	MA	#* ( ⺖ → 忄 ) CJK RADICAL HEART ONE → CJK UNIFIED IDEOGRAPH-5FC4	# 
+
+2E97 ;	38FA ;	MA	#* ( ⺗ → 㣺 ) CJK RADICAL HEART TWO → CJK UNIFIED IDEOGRAPH-38FA	# 
+
+2F89D ;	5FCD ;	MA	# ( 忍 → 忍 ) CJK COMPATIBILITY IDEOGRAPH-2F89D → CJK UNIFIED IDEOGRAPH-5FCD	# 
+
+2F89E ;	5FD7 ;	MA	# ( 志 → 志 ) CJK COMPATIBILITY IDEOGRAPH-2F89E → CJK UNIFIED IDEOGRAPH-5FD7	# 
+
+F9A3 ;	5FF5 ;	MA	# ( 念 → 念 ) CJK COMPATIBILITY IDEOGRAPH-F9A3 → CJK UNIFIED IDEOGRAPH-5FF5	# 
+
+2F89F ;	5FF9 ;	MA	# ( 忹 → 忹 ) CJK COMPATIBILITY IDEOGRAPH-2F89F → CJK UNIFIED IDEOGRAPH-5FF9	# 
+
+F960 ;	6012 ;	MA	# ( 怒 → 怒 ) CJK COMPATIBILITY IDEOGRAPH-F960 → CJK UNIFIED IDEOGRAPH-6012	# 
+
+F9AC ;	601C ;	MA	# ( 怜 → 怜 ) CJK COMPATIBILITY IDEOGRAPH-F9AC → CJK UNIFIED IDEOGRAPH-601C	# 
+
+FA6B ;	6075 ;	MA	# ( 恵 → 恵 ) CJK COMPATIBILITY IDEOGRAPH-FA6B → CJK UNIFIED IDEOGRAPH-6075	# 
+
+2F8A2 ;	391C ;	MA	# ( 㤜 → 㤜 ) CJK COMPATIBILITY IDEOGRAPH-2F8A2 → CJK UNIFIED IDEOGRAPH-391C	# 
+
+2F8A1 ;	393A ;	MA	# ( 㤺 → 㤺 ) CJK COMPATIBILITY IDEOGRAPH-2F8A1 → CJK UNIFIED IDEOGRAPH-393A	# 
+
+2F8A0 ;	6081 ;	MA	# ( 悁 → 悁 ) CJK COMPATIBILITY IDEOGRAPH-2F8A0 → CJK UNIFIED IDEOGRAPH-6081	# 
+
+FA3D ;	6094 ;	MA	# ( 悔 → 悔 ) CJK COMPATIBILITY IDEOGRAPH-FA3D → CJK UNIFIED IDEOGRAPH-6094	# 
+2F8A3 ;	6094 ;	MA	# ( 悔 → 悔 ) CJK COMPATIBILITY IDEOGRAPH-2F8A3 → CJK UNIFIED IDEOGRAPH-6094	# 
+
+2F8A5 ;	60C7 ;	MA	# ( 惇 → 惇 ) CJK COMPATIBILITY IDEOGRAPH-2F8A5 → CJK UNIFIED IDEOGRAPH-60C7	# 
+
+FA86 ;	60D8 ;	MA	# ( 惘 → 惘 ) CJK COMPATIBILITY IDEOGRAPH-FA86 → CJK UNIFIED IDEOGRAPH-60D8	# 
+
+F9B9 ;	60E1 ;	MA	# ( 惡 → 惡 ) CJK COMPATIBILITY IDEOGRAPH-F9B9 → CJK UNIFIED IDEOGRAPH-60E1	# 
+
+2F8A4 ;	226D4 ;	MA	# ( 𢛔 → 𢛔 ) CJK COMPATIBILITY IDEOGRAPH-2F8A4 → CJK UNIFIED IDEOGRAPH-226D4	# 
+
+FA88 ;	6108 ;	MA	# ( 愈 → 愈 ) CJK COMPATIBILITY IDEOGRAPH-FA88 → CJK UNIFIED IDEOGRAPH-6108	# 
+
+FA3E ;	6168 ;	MA	# ( 慨 → 慨 ) CJK COMPATIBILITY IDEOGRAPH-FA3E → CJK UNIFIED IDEOGRAPH-6168	# 
+
+F9D9 ;	6144 ;	MA	# ( 慄 → 慄 ) CJK COMPATIBILITY IDEOGRAPH-F9D9 → CJK UNIFIED IDEOGRAPH-6144	# 
+
+2F8A6 ;	6148 ;	MA	# ( 慈 → 慈 ) CJK COMPATIBILITY IDEOGRAPH-2F8A6 → CJK UNIFIED IDEOGRAPH-6148	# 
+
+2F8A7 ;	614C ;	MA	# ( 慌 → 慌 ) CJK COMPATIBILITY IDEOGRAPH-2F8A7 → CJK UNIFIED IDEOGRAPH-614C	# 
+2F8A9 ;	614C ;	MA	# ( 慌 → 慌 ) CJK COMPATIBILITY IDEOGRAPH-2F8A9 → CJK UNIFIED IDEOGRAPH-614C	# 
+
+FA87 ;	614E ;	MA	# ( 慎 → 慎 ) CJK COMPATIBILITY IDEOGRAPH-FA87 → CJK UNIFIED IDEOGRAPH-614E	# 
+2F8A8 ;	614E ;	MA	# ( 慎 → 慎 ) CJK COMPATIBILITY IDEOGRAPH-2F8A8 → CJK UNIFIED IDEOGRAPH-614E	# 
+
+FA8A ;	6160 ;	MA	# ( 慠 → 慠 ) CJK COMPATIBILITY IDEOGRAPH-FA8A → CJK UNIFIED IDEOGRAPH-6160	# 
+
+2F8AA ;	617A ;	MA	# ( 慺 → 慺 ) CJK COMPATIBILITY IDEOGRAPH-2F8AA → CJK UNIFIED IDEOGRAPH-617A	# 
+
+FA3F ;	618E ;	MA	# ( 憎 → 憎 ) CJK COMPATIBILITY IDEOGRAPH-FA3F → CJK UNIFIED IDEOGRAPH-618E	# 
+FA89 ;	618E ;	MA	# ( 憎 → 憎 ) CJK COMPATIBILITY IDEOGRAPH-FA89 → CJK UNIFIED IDEOGRAPH-618E	# 
+2F8AB ;	618E ;	MA	# ( 憎 → 憎 ) CJK COMPATIBILITY IDEOGRAPH-2F8AB → CJK UNIFIED IDEOGRAPH-618E	# 
+
+F98F ;	6190 ;	MA	# ( 憐 → 憐 ) CJK COMPATIBILITY IDEOGRAPH-F98F → CJK UNIFIED IDEOGRAPH-6190	# 
+
+2F8AD ;	61A4 ;	MA	# ( 憤 → 憤 ) CJK COMPATIBILITY IDEOGRAPH-2F8AD → CJK UNIFIED IDEOGRAPH-61A4	# 
+
+2F8AE ;	61AF ;	MA	# ( 憯 → 憯 ) CJK COMPATIBILITY IDEOGRAPH-2F8AE → CJK UNIFIED IDEOGRAPH-61AF	# 
+
+2F8AC ;	61B2 ;	MA	# ( 憲 → 憲 ) CJK COMPATIBILITY IDEOGRAPH-2F8AC → CJK UNIFIED IDEOGRAPH-61B2	# 
+
+FAD0 ;	22844 ;	MA	# ( 𢡄 → 𢡄 ) CJK COMPATIBILITY IDEOGRAPH-FAD0 → CJK UNIFIED IDEOGRAPH-22844	# 
+
+FACF ;	2284A ;	MA	# ( 𢡊 → 𢡊 ) CJK COMPATIBILITY IDEOGRAPH-FACF → CJK UNIFIED IDEOGRAPH-2284A	# 
+
+2F8AF ;	61DE ;	MA	# ( 懞 → 懞 ) CJK COMPATIBILITY IDEOGRAPH-2F8AF → CJK UNIFIED IDEOGRAPH-61DE	# 
+
+FA40 ;	61F2 ;	MA	# ( 懲 → 懲 ) CJK COMPATIBILITY IDEOGRAPH-FA40 → CJK UNIFIED IDEOGRAPH-61F2	# 
+FA8B ;	61F2 ;	MA	# ( 懲 → 懲 ) CJK COMPATIBILITY IDEOGRAPH-FA8B → CJK UNIFIED IDEOGRAPH-61F2	# 
+2F8B0 ;	61F2 ;	MA	# ( 懲 → 懲 ) CJK COMPATIBILITY IDEOGRAPH-2F8B0 → CJK UNIFIED IDEOGRAPH-61F2	# 
+
+F90D ;	61F6 ;	MA	# ( 懶 → 懶 ) CJK COMPATIBILITY IDEOGRAPH-F90D → CJK UNIFIED IDEOGRAPH-61F6	# 
+2F8B1 ;	61F6 ;	MA	# ( 懶 → 懶 ) CJK COMPATIBILITY IDEOGRAPH-2F8B1 → CJK UNIFIED IDEOGRAPH-61F6	# 
+
+F990 ;	6200 ;	MA	# ( 戀 → 戀 ) CJK COMPATIBILITY IDEOGRAPH-F990 → CJK UNIFIED IDEOGRAPH-6200	# 
+
+2F3D ;	6208 ;	MA	#* ( ⼽ → 戈 ) KANGXI RADICAL HALBERD → CJK UNIFIED IDEOGRAPH-6208	# 
+
+2F8B2 ;	6210 ;	MA	# ( 成 → 成 ) CJK COMPATIBILITY IDEOGRAPH-2F8B2 → CJK UNIFIED IDEOGRAPH-6210	# 
+
+2F8B3 ;	621B ;	MA	# ( 戛 → 戛 ) CJK COMPATIBILITY IDEOGRAPH-2F8B3 → CJK UNIFIED IDEOGRAPH-621B	# 
+
+F9D2 ;	622E ;	MA	# ( 戮 → 戮 ) CJK COMPATIBILITY IDEOGRAPH-F9D2 → CJK UNIFIED IDEOGRAPH-622E	# 
+
+FA8C ;	6234 ;	MA	# ( 戴 → 戴 ) CJK COMPATIBILITY IDEOGRAPH-FA8C → CJK UNIFIED IDEOGRAPH-6234	# 
+
+2F3E ;	6236 ;	MA	#* ( ⼾ → 戶 ) KANGXI RADICAL DOOR → CJK UNIFIED IDEOGRAPH-6236	# 
+6238 ;	6236 ;	MA	# ( 戸 → 戶 ) CJK UNIFIED IDEOGRAPH-6238 → CJK UNIFIED IDEOGRAPH-6236	# →⼾→
+
+2F3F ;	624B ;	MA	#* ( ⼿ → 手 ) KANGXI RADICAL HAND → CJK UNIFIED IDEOGRAPH-624B	# 
+
+2E98 ;	624C ;	MA	#* ( ⺘ → 扌 ) CJK RADICAL HAND → CJK UNIFIED IDEOGRAPH-624C	# 
+
+2F8B4 ;	625D ;	MA	# ( 扝 → 扝 ) CJK COMPATIBILITY IDEOGRAPH-2F8B4 → CJK UNIFIED IDEOGRAPH-625D	# 
+
+2F8B5 ;	62B1 ;	MA	# ( 抱 → 抱 ) CJK COMPATIBILITY IDEOGRAPH-2F8B5 → CJK UNIFIED IDEOGRAPH-62B1	# 
+
+F925 ;	62C9 ;	MA	# ( 拉 → 拉 ) CJK COMPATIBILITY IDEOGRAPH-F925 → CJK UNIFIED IDEOGRAPH-62C9	# 
+
+F95B ;	62CF ;	MA	# ( 拏 → 拏 ) CJK COMPATIBILITY IDEOGRAPH-F95B → CJK UNIFIED IDEOGRAPH-62CF	# 
+
+FA02 ;	62D3 ;	MA	# ( 拓 → 拓 ) CJK COMPATIBILITY IDEOGRAPH-FA02 → CJK UNIFIED IDEOGRAPH-62D3	# 
+
+2F8B6 ;	62D4 ;	MA	# ( 拔 → 拔 ) CJK COMPATIBILITY IDEOGRAPH-2F8B6 → CJK UNIFIED IDEOGRAPH-62D4	# 
+
+2F8BA ;	62FC ;	MA	# ( 拼 → 拼 ) CJK COMPATIBILITY IDEOGRAPH-2F8BA → CJK UNIFIED IDEOGRAPH-62FC	# 
+
+F973 ;	62FE ;	MA	# ( 拾 → 拾 ) CJK COMPATIBILITY IDEOGRAPH-F973 → CJK UNIFIED IDEOGRAPH-62FE	# 
+
+2F8B8 ;	22B0C ;	MA	# ( 𢬌 → 𢬌 ) CJK COMPATIBILITY IDEOGRAPH-2F8B8 → CJK UNIFIED IDEOGRAPH-22B0C	# 
+
+2F8B9 ;	633D ;	MA	# ( 挽 → 挽 ) CJK COMPATIBILITY IDEOGRAPH-2F8B9 → CJK UNIFIED IDEOGRAPH-633D	# 
+
+2F8B7 ;	6350 ;	MA	# ( 捐 → 捐 ) CJK COMPATIBILITY IDEOGRAPH-2F8B7 → CJK UNIFIED IDEOGRAPH-6350	# 
+
+2F8BB ;	6368 ;	MA	# ( 捨 → 捨 ) CJK COMPATIBILITY IDEOGRAPH-2F8BB → CJK UNIFIED IDEOGRAPH-6368	# 
+
+F9A4 ;	637B ;	MA	# ( 捻 → 捻 ) CJK COMPATIBILITY IDEOGRAPH-F9A4 → CJK UNIFIED IDEOGRAPH-637B	# 
+
+2F8BC ;	6383 ;	MA	# ( 掃 → 掃 ) CJK COMPATIBILITY IDEOGRAPH-2F8BC → CJK UNIFIED IDEOGRAPH-6383	# 
+
+F975 ;	63A0 ;	MA	# ( 掠 → 掠 ) CJK COMPATIBILITY IDEOGRAPH-F975 → CJK UNIFIED IDEOGRAPH-63A0	# 
+
+2F8C1 ;	63A9 ;	MA	# ( 掩 → 掩 ) CJK COMPATIBILITY IDEOGRAPH-2F8C1 → CJK UNIFIED IDEOGRAPH-63A9	# 
+
+FA8D ;	63C4 ;	MA	# ( 揄 → 揄 ) CJK COMPATIBILITY IDEOGRAPH-FA8D → CJK UNIFIED IDEOGRAPH-63C4	# 
+
+2F8BD ;	63E4 ;	MA	# ( 揤 → 揤 ) CJK COMPATIBILITY IDEOGRAPH-2F8BD → CJK UNIFIED IDEOGRAPH-63E4	# 
+
+FA8F ;	6452 ;	MA	# ( 摒 → 摒 ) CJK COMPATIBILITY IDEOGRAPH-FA8F → CJK UNIFIED IDEOGRAPH-6452	# 
+
+2F8BE ;	22BF1 ;	MA	# ( 𢯱 → 𢯱 ) CJK COMPATIBILITY IDEOGRAPH-2F8BE → CJK UNIFIED IDEOGRAPH-22BF1	# 
+
+FA8E ;	641C ;	MA	# ( 搜 → 搜 ) CJK COMPATIBILITY IDEOGRAPH-FA8E → CJK UNIFIED IDEOGRAPH-641C	# 
+
+2F8BF ;	6422 ;	MA	# ( 搢 → 搢 ) CJK COMPATIBILITY IDEOGRAPH-2F8BF → CJK UNIFIED IDEOGRAPH-6422	# 
+
+2F8C0 ;	63C5 ;	MA	# ( 揅 → 揅 ) CJK COMPATIBILITY IDEOGRAPH-2F8C0 → CJK UNIFIED IDEOGRAPH-63C5	# 
+
+2F8C3 ;	6469 ;	MA	# ( 摩 → 摩 ) CJK COMPATIBILITY IDEOGRAPH-2F8C3 → CJK UNIFIED IDEOGRAPH-6469	# 
+
+2F8C6 ;	6477 ;	MA	# ( 摷 → 摷 ) CJK COMPATIBILITY IDEOGRAPH-2F8C6 → CJK UNIFIED IDEOGRAPH-6477	# 
+
+2F8C4 ;	647E ;	MA	# ( 摾 → 摾 ) CJK COMPATIBILITY IDEOGRAPH-2F8C4 → CJK UNIFIED IDEOGRAPH-647E	# 
+
+2F8C2 ;	3A2E ;	MA	# ( 㨮 → 㨮 ) CJK COMPATIBILITY IDEOGRAPH-2F8C2 → CJK UNIFIED IDEOGRAPH-3A2E	# 
+
+6409 ;	3A41 ;	MA	# ( 搉 → 㩁 ) CJK UNIFIED IDEOGRAPH-6409 → CJK UNIFIED IDEOGRAPH-3A41	# 
+
+F991 ;	649A ;	MA	# ( 撚 → 撚 ) CJK COMPATIBILITY IDEOGRAPH-F991 → CJK UNIFIED IDEOGRAPH-649A	# 
+
+2F8C5 ;	649D ;	MA	# ( 撝 → 撝 ) CJK COMPATIBILITY IDEOGRAPH-2F8C5 → CJK UNIFIED IDEOGRAPH-649D	# 
+
+F930 ;	64C4 ;	MA	# ( 擄 → 擄 ) CJK COMPATIBILITY IDEOGRAPH-F930 → CJK UNIFIED IDEOGRAPH-64C4	# 
+
+2F8C7 ;	3A6C ;	MA	# ( 㩬 → 㩬 ) CJK COMPATIBILITY IDEOGRAPH-2F8C7 → CJK UNIFIED IDEOGRAPH-3A6C	# 
+
+2F40 ;	652F ;	MA	#* ( ⽀ → 支 ) KANGXI RADICAL BRANCH → CJK UNIFIED IDEOGRAPH-652F	# 
+
+2F41 ;	6534 ;	MA	#* ( ⽁ → 攴 ) KANGXI RADICAL RAP → CJK UNIFIED IDEOGRAPH-6534	# 
+
+2E99 ;	6535 ;	MA	#* ( ⺙ → 攵 ) CJK RADICAL RAP → CJK UNIFIED IDEOGRAPH-6535	# 
+
+FA41 ;	654F ;	MA	# ( 敏 → 敏 ) CJK COMPATIBILITY IDEOGRAPH-FA41 → CJK UNIFIED IDEOGRAPH-654F	# 
+2F8C8 ;	654F ;	MA	# ( 敏 → 敏 ) CJK COMPATIBILITY IDEOGRAPH-2F8C8 → CJK UNIFIED IDEOGRAPH-654F	# 
+
+FA90 ;	6556 ;	MA	# ( 敖 → 敖 ) CJK COMPATIBILITY IDEOGRAPH-FA90 → CJK UNIFIED IDEOGRAPH-6556	# 
+
+2F8C9 ;	656C ;	MA	# ( 敬 → 敬 ) CJK COMPATIBILITY IDEOGRAPH-2F8C9 → CJK UNIFIED IDEOGRAPH-656C	# 
+
+F969 ;	6578 ;	MA	# ( 數 → 數 ) CJK COMPATIBILITY IDEOGRAPH-F969 → CJK UNIFIED IDEOGRAPH-6578	# 
+
+2F8CA ;	2300A ;	MA	# ( 𣀊 → 𣀊 ) CJK COMPATIBILITY IDEOGRAPH-2F8CA → CJK UNIFIED IDEOGRAPH-2300A	# 
+
+2F42 ;	6587 ;	MA	#* ( ⽂ → 文 ) KANGXI RADICAL SCRIPT → CJK UNIFIED IDEOGRAPH-6587	# 
+
+2EEB ;	6589 ;	MA	#* ( ⻫ → 斉 ) CJK RADICAL J-SIMPLIFIED EVEN → CJK UNIFIED IDEOGRAPH-6589	# 
+
+2F43 ;	6597 ;	MA	#* ( ⽃ → 斗 ) KANGXI RADICAL DIPPER → CJK UNIFIED IDEOGRAPH-6597	# 
+
+F9BE ;	6599 ;	MA	# ( 料 → 料 ) CJK COMPATIBILITY IDEOGRAPH-F9BE → CJK UNIFIED IDEOGRAPH-6599	# 
+
+2F44 ;	65A4 ;	MA	#* ( ⽄ → 斤 ) KANGXI RADICAL AXE → CJK UNIFIED IDEOGRAPH-65A4	# 
+
+2F45 ;	65B9 ;	MA	#* ( ⽅ → 方 ) KANGXI RADICAL SQUARE → CJK UNIFIED IDEOGRAPH-65B9	# 
+
+F983 ;	65C5 ;	MA	# ( 旅 → 旅 ) CJK COMPATIBILITY IDEOGRAPH-F983 → CJK UNIFIED IDEOGRAPH-65C5	# 
+
+2F46 ;	65E0 ;	MA	#* ( ⽆ → 无 ) KANGXI RADICAL NOT → CJK UNIFIED IDEOGRAPH-65E0	# 
+
+2E9B ;	65E1 ;	MA	#* ( ⺛ → 旡 ) CJK RADICAL CHOKE → CJK UNIFIED IDEOGRAPH-65E1	# 
+
+FA42 ;	65E2 ;	MA	# ( 既 → 既 ) CJK COMPATIBILITY IDEOGRAPH-FA42 → CJK UNIFIED IDEOGRAPH-65E2	# 
+
+2F8CB ;	65E3 ;	MA	# ( 旣 → 旣 ) CJK COMPATIBILITY IDEOGRAPH-2F8CB → CJK UNIFIED IDEOGRAPH-65E3	# 
+
+2F47 ;	65E5 ;	MA	#* ( ⽇ → 日 ) KANGXI RADICAL SUN → CJK UNIFIED IDEOGRAPH-65E5	# 
+
+F9E0 ;	6613 ;	MA	# ( 易 → 易 ) CJK COMPATIBILITY IDEOGRAPH-F9E0 → CJK UNIFIED IDEOGRAPH-6613	# 
+
+66F6 ;	3ADA ;	MA	# ( 曶 → 㫚 ) CJK UNIFIED IDEOGRAPH-66F6 → CJK UNIFIED IDEOGRAPH-3ADA	# 
+
+2F8D1 ;	3AE4 ;	MA	# ( 㫤 → 㫤 ) CJK COMPATIBILITY IDEOGRAPH-2F8D1 → CJK UNIFIED IDEOGRAPH-3AE4	# 
+
+2F8CD ;	6649 ;	MA	# ( 晉 → 晉 ) CJK COMPATIBILITY IDEOGRAPH-2F8CD → CJK UNIFIED IDEOGRAPH-6649	# 
+
+6669 ;	665A ;	MA	# ( 晩 → 晚 ) CJK UNIFIED IDEOGRAPH-6669 → CJK UNIFIED IDEOGRAPH-665A	# 
+
+FA12 ;	6674 ;	MA	# ( 晴 → 晴 ) CJK COMPATIBILITY IDEOGRAPH-FA12 → CJK UNIFIED IDEOGRAPH-6674	# 
+FA91 ;	6674 ;	MA	# ( 晴 → 晴 ) CJK COMPATIBILITY IDEOGRAPH-FA91 → CJK UNIFIED IDEOGRAPH-6674	# 
+
+FA43 ;	6691 ;	MA	# ( 暑 → 暑 ) CJK COMPATIBILITY IDEOGRAPH-FA43 → CJK UNIFIED IDEOGRAPH-6691	# 
+2F8CF ;	6691 ;	MA	# ( 暑 → 暑 ) CJK COMPATIBILITY IDEOGRAPH-2F8CF → CJK UNIFIED IDEOGRAPH-6691	# 
+
+F9C5 ;	6688 ;	MA	# ( 暈 → 暈 ) CJK COMPATIBILITY IDEOGRAPH-F9C5 → CJK UNIFIED IDEOGRAPH-6688	# 
+
+2F8D0 ;	3B08 ;	MA	# ( 㬈 → 㬈 ) CJK COMPATIBILITY IDEOGRAPH-2F8D0 → CJK UNIFIED IDEOGRAPH-3B08	# 
+
+2F8D5 ;	669C ;	MA	# ( 暜 → 暜 ) CJK COMPATIBILITY IDEOGRAPH-2F8D5 → CJK UNIFIED IDEOGRAPH-669C	# 
+
+FA06 ;	66B4 ;	MA	# ( 暴 → 暴 ) CJK COMPATIBILITY IDEOGRAPH-FA06 → CJK UNIFIED IDEOGRAPH-66B4	# 
+
+F98B ;	66C6 ;	MA	# ( 曆 → 曆 ) CJK COMPATIBILITY IDEOGRAPH-F98B → CJK UNIFIED IDEOGRAPH-66C6	# 
+
+2F8CE ;	3B19 ;	MA	# ( 㬙 → 㬙 ) CJK COMPATIBILITY IDEOGRAPH-2F8CE → CJK UNIFIED IDEOGRAPH-3B19	# 
+
+2F897 ;	232B8 ;	MA	# ( 𣊸 → 𣊸 ) CJK COMPATIBILITY IDEOGRAPH-2F897 → CJK UNIFIED IDEOGRAPH-232B8	# 
+
+2F48 ;	66F0 ;	MA	#* ( ⽈ → 曰 ) KANGXI RADICAL SAY → CJK UNIFIED IDEOGRAPH-66F0	# 
+
+F901 ;	66F4 ;	MA	# ( 更 → 更 ) CJK COMPATIBILITY IDEOGRAPH-F901 → CJK UNIFIED IDEOGRAPH-66F4	# 
+
+2F8CC ;	66F8 ;	MA	# ( 書 → 書 ) CJK COMPATIBILITY IDEOGRAPH-2F8CC → CJK UNIFIED IDEOGRAPH-66F8	# 
+
+2F49 ;	6708 ;	MA	#* ( ⽉ → 月 ) KANGXI RADICAL MOON → CJK UNIFIED IDEOGRAPH-6708	# 
+
+2F980 ;	2335F ;	MA	# ( 𣍟 → 𣍟 ) CJK COMPATIBILITY IDEOGRAPH-2F980 → CJK UNIFIED IDEOGRAPH-2335F	# 
+
+80A6 ;	670C ;	MA	# ( 肦 → 朌 ) CJK UNIFIED IDEOGRAPH-80A6 → CJK UNIFIED IDEOGRAPH-670C	# 
+
+80D0 ;	670F ;	MA	# ( 胐 → 朏 ) CJK UNIFIED IDEOGRAPH-80D0 → CJK UNIFIED IDEOGRAPH-670F	# 
+
+80CA ;	6710 ;	MA	# ( 胊 → 朐 ) CJK UNIFIED IDEOGRAPH-80CA → CJK UNIFIED IDEOGRAPH-6710	# 
+
+8101 ;	6713 ;	MA	# ( 脁 → 朓 ) CJK UNIFIED IDEOGRAPH-8101 → CJK UNIFIED IDEOGRAPH-6713	# 
+
+80F6 ;	3B35 ;	MA	# ( 胶 → 㬵 ) CJK UNIFIED IDEOGRAPH-80F6 → CJK UNIFIED IDEOGRAPH-3B35	# 
+
+F929 ;	6717 ;	MA	# ( 朗 → 朗 ) CJK COMPATIBILITY IDEOGRAPH-F929 → CJK UNIFIED IDEOGRAPH-6717	# 
+FA92 ;	6717 ;	MA	# ( 朗 → 朗 ) CJK COMPATIBILITY IDEOGRAPH-FA92 → CJK UNIFIED IDEOGRAPH-6717	# 
+2F8D8 ;	6717 ;	MA	# ( 朗 → 朗 ) CJK COMPATIBILITY IDEOGRAPH-2F8D8 → CJK UNIFIED IDEOGRAPH-6717	# 
+
+8127 ;	6718 ;	MA	# ( 脧 → 朘 ) CJK UNIFIED IDEOGRAPH-8127 → CJK UNIFIED IDEOGRAPH-6718	# 
+
+FA93 ;	671B ;	MA	# ( 望 → 望 ) CJK COMPATIBILITY IDEOGRAPH-FA93 → CJK UNIFIED IDEOGRAPH-671B	# 
+2F8D9 ;	671B ;	MA	# ( 望 → 望 ) CJK COMPATIBILITY IDEOGRAPH-2F8D9 → CJK UNIFIED IDEOGRAPH-671B	# 
+
+2F8DA ;	6721 ;	MA	# ( 朡 → 朡 ) CJK COMPATIBILITY IDEOGRAPH-2F8DA → CJK UNIFIED IDEOGRAPH-6721	# 
+
+5E50 ;	3B3A ;	MA	# ( 幐 → 㬺 ) CJK UNIFIED IDEOGRAPH-5E50 → CJK UNIFIED IDEOGRAPH-3B3A	# 
+
+4420 ;	3B3B ;	MA	# ( 䐠 → 㬻 ) CJK UNIFIED IDEOGRAPH-4420 → CJK UNIFIED IDEOGRAPH-3B3B	# 
+
+2F989 ;	23393 ;	MA	# ( 𣎓 → 𣎓 ) CJK COMPATIBILITY IDEOGRAPH-2F989 → CJK UNIFIED IDEOGRAPH-23393	# 
+
+81A7 ;	6723 ;	MA	# ( 膧 → 朣 ) CJK UNIFIED IDEOGRAPH-81A7 → CJK UNIFIED IDEOGRAPH-6723	# 
+
+2F98A ;	2339C ;	MA	# ( 𣎜 → 𣎜 ) CJK COMPATIBILITY IDEOGRAPH-2F98A → CJK UNIFIED IDEOGRAPH-2339C	# 
+
+2F4A ;	6728 ;	MA	#* ( ⽊ → 木 ) KANGXI RADICAL TREE → CJK UNIFIED IDEOGRAPH-6728	# 
+
+F9E1 ;	674E ;	MA	# ( 李 → 李 ) CJK COMPATIBILITY IDEOGRAPH-F9E1 → CJK UNIFIED IDEOGRAPH-674E	# 
+
+2F8DC ;	6753 ;	MA	# ( 杓 → 杓 ) CJK COMPATIBILITY IDEOGRAPH-2F8DC → CJK UNIFIED IDEOGRAPH-6753	# 
+
+FA94 ;	6756 ;	MA	# ( 杖 → 杖 ) CJK COMPATIBILITY IDEOGRAPH-FA94 → CJK UNIFIED IDEOGRAPH-6756	# 
+
+2F8DB ;	675E ;	MA	# ( 杞 → 杞 ) CJK COMPATIBILITY IDEOGRAPH-2F8DB → CJK UNIFIED IDEOGRAPH-675E	# 
+
+2F8DD ;	233C3 ;	MA	# ( 𣏃 → 𣏃 ) CJK COMPATIBILITY IDEOGRAPH-2F8DD → CJK UNIFIED IDEOGRAPH-233C3	# 
+
+67FF ;	676E ;	MA	# ( 柿 → 杮 ) CJK UNIFIED IDEOGRAPH-67FF → CJK UNIFIED IDEOGRAPH-676E	# 
+
+F9C8 ;	677B ;	MA	# ( 杻 → 杻 ) CJK COMPATIBILITY IDEOGRAPH-F9C8 → CJK UNIFIED IDEOGRAPH-677B	# 
+
+2F8E0 ;	6785 ;	MA	# ( 枅 → 枅 ) CJK COMPATIBILITY IDEOGRAPH-2F8E0 → CJK UNIFIED IDEOGRAPH-6785	# 
+
+F9F4 ;	6797 ;	MA	# ( 林 → 林 ) CJK COMPATIBILITY IDEOGRAPH-F9F4 → CJK UNIFIED IDEOGRAPH-6797	# 
+
+2F8DE ;	3B49 ;	MA	# ( 㭉 → 㭉 ) CJK COMPATIBILITY IDEOGRAPH-2F8DE → CJK UNIFIED IDEOGRAPH-3B49	# 
+
+FAD1 ;	233D5 ;	MA	# ( 𣏕 → 𣏕 ) CJK COMPATIBILITY IDEOGRAPH-FAD1 → CJK UNIFIED IDEOGRAPH-233D5	# 
+
+F9C9 ;	67F3 ;	MA	# ( 柳 → 柳 ) CJK COMPATIBILITY IDEOGRAPH-F9C9 → CJK UNIFIED IDEOGRAPH-67F3	# 
+
+2F8DF ;	67FA ;	MA	# ( 柺 → 柺 ) CJK COMPATIBILITY IDEOGRAPH-2F8DF → CJK UNIFIED IDEOGRAPH-67FA	# 
+
+F9DA ;	6817 ;	MA	# ( 栗 → 栗 ) CJK COMPATIBILITY IDEOGRAPH-F9DA → CJK UNIFIED IDEOGRAPH-6817	# 
+
+2F8E5 ;	681F ;	MA	# ( 栟 → 栟 ) CJK COMPATIBILITY IDEOGRAPH-2F8E5 → CJK UNIFIED IDEOGRAPH-681F	# 
+
+2F8E1 ;	6852 ;	MA	# ( 桒 → 桒 ) CJK COMPATIBILITY IDEOGRAPH-2F8E1 → CJK UNIFIED IDEOGRAPH-6852	# 
+
+2F8E3 ;	2346D ;	MA	# ( 𣑭 → 𣑭 ) CJK COMPATIBILITY IDEOGRAPH-2F8E3 → CJK UNIFIED IDEOGRAPH-2346D	# 
+
+F97A ;	6881 ;	MA	# ( 梁 → 梁 ) CJK COMPATIBILITY IDEOGRAPH-F97A → CJK UNIFIED IDEOGRAPH-6881	# 
+
+FA44 ;	6885 ;	MA	# ( 梅 → 梅 ) CJK COMPATIBILITY IDEOGRAPH-FA44 → CJK UNIFIED IDEOGRAPH-6885	# 
+2F8E2 ;	6885 ;	MA	# ( 梅 → 梅 ) CJK COMPATIBILITY IDEOGRAPH-2F8E2 → CJK UNIFIED IDEOGRAPH-6885	# 
+
+2F8E4 ;	688E ;	MA	# ( 梎 → 梎 ) CJK COMPATIBILITY IDEOGRAPH-2F8E4 → CJK UNIFIED IDEOGRAPH-688E	# 
+
+F9E2 ;	68A8 ;	MA	# ( 梨 → 梨 ) CJK COMPATIBILITY IDEOGRAPH-F9E2 → CJK UNIFIED IDEOGRAPH-68A8	# 
+
+2F8E6 ;	6914 ;	MA	# ( 椔 → 椔 ) CJK COMPATIBILITY IDEOGRAPH-2F8E6 → CJK UNIFIED IDEOGRAPH-6914	# 
+
+2F8E8 ;	6942 ;	MA	# ( 楂 → 楂 ) CJK COMPATIBILITY IDEOGRAPH-2F8E8 → CJK UNIFIED IDEOGRAPH-6942	# 
+
+FAD2 ;	3B9D ;	MA	# ( 㮝 → 㮝 ) CJK COMPATIBILITY IDEOGRAPH-FAD2 → CJK UNIFIED IDEOGRAPH-3B9D	# 
+2F8E7 ;	3B9D ;	MA	# ( 㮝 → 㮝 ) CJK COMPATIBILITY IDEOGRAPH-2F8E7 → CJK UNIFIED IDEOGRAPH-3B9D	# 
+
+69E9 ;	3BA3 ;	MA	# ( 槩 → 㮣 ) CJK UNIFIED IDEOGRAPH-69E9 → CJK UNIFIED IDEOGRAPH-3BA3	# 
+
+6A27 ;	699D ;	MA	# ( 樧 → 榝 ) CJK UNIFIED IDEOGRAPH-6A27 → CJK UNIFIED IDEOGRAPH-699D	# 
+
+2F8E9 ;	69A3 ;	MA	# ( 榣 → 榣 ) CJK COMPATIBILITY IDEOGRAPH-2F8E9 → CJK UNIFIED IDEOGRAPH-69A3	# 
+
+2F8EA ;	69EA ;	MA	# ( 槪 → 槪 ) CJK COMPATIBILITY IDEOGRAPH-2F8EA → CJK UNIFIED IDEOGRAPH-69EA	# 
+
+F914 ;	6A02 ;	MA	# ( 樂 → 樂 ) CJK COMPATIBILITY IDEOGRAPH-F914 → CJK UNIFIED IDEOGRAPH-6A02	# 
+F95C ;	6A02 ;	MA	# ( 樂 → 樂 ) CJK COMPATIBILITY IDEOGRAPH-F95C → CJK UNIFIED IDEOGRAPH-6A02	# 
+F9BF ;	6A02 ;	MA	# ( 樂 → 樂 ) CJK COMPATIBILITY IDEOGRAPH-F9BF → CJK UNIFIED IDEOGRAPH-6A02	# 
+
+F94C ;	6A13 ;	MA	# ( 樓 → 樓 ) CJK COMPATIBILITY IDEOGRAPH-F94C → CJK UNIFIED IDEOGRAPH-6A13	# 
+
+2F8EC ;	236A3 ;	MA	# ( 𣚣 → 𣚣 ) CJK COMPATIBILITY IDEOGRAPH-2F8EC → CJK UNIFIED IDEOGRAPH-236A3	# 
+
+2F8EB ;	6AA8 ;	MA	# ( 檨 → 檨 ) CJK COMPATIBILITY IDEOGRAPH-2F8EB → CJK UNIFIED IDEOGRAPH-6AA8	# 
+
+F931 ;	6AD3 ;	MA	# ( 櫓 → 櫓 ) CJK COMPATIBILITY IDEOGRAPH-F931 → CJK UNIFIED IDEOGRAPH-6AD3	# 
+
+2F8ED ;	6ADB ;	MA	# ( 櫛 → 櫛 ) CJK COMPATIBILITY IDEOGRAPH-2F8ED → CJK UNIFIED IDEOGRAPH-6ADB	# 
+
+F91D ;	6B04 ;	MA	# ( 欄 → 欄 ) CJK COMPATIBILITY IDEOGRAPH-F91D → CJK UNIFIED IDEOGRAPH-6B04	# 
+
+2F8EE ;	3C18 ;	MA	# ( 㰘 → 㰘 ) CJK COMPATIBILITY IDEOGRAPH-2F8EE → CJK UNIFIED IDEOGRAPH-3C18	# 
+
+2F4B ;	6B20 ;	MA	#* ( ⽋ → 欠 ) KANGXI RADICAL LACK → CJK UNIFIED IDEOGRAPH-6B20	# 
+
+2F8EF ;	6B21 ;	MA	# ( 次 → 次 ) CJK COMPATIBILITY IDEOGRAPH-2F8EF → CJK UNIFIED IDEOGRAPH-6B21	# 
+
+2F8F0 ;	238A7 ;	MA	# ( 𣢧 → 𣢧 ) CJK COMPATIBILITY IDEOGRAPH-2F8F0 → CJK UNIFIED IDEOGRAPH-238A7	# 
+
+2F8F1 ;	6B54 ;	MA	# ( 歔 → 歔 ) CJK COMPATIBILITY IDEOGRAPH-2F8F1 → CJK UNIFIED IDEOGRAPH-6B54	# 
+
+2F8F2 ;	3C4E ;	MA	# ( 㱎 → 㱎 ) CJK COMPATIBILITY IDEOGRAPH-2F8F2 → CJK UNIFIED IDEOGRAPH-3C4E	# 
+
+2F4C ;	6B62 ;	MA	#* ( ⽌ → 止 ) KANGXI RADICAL STOP → CJK UNIFIED IDEOGRAPH-6B62	# 
+
+2EED ;	6B6F ;	MA	#* ( ⻭ → 歯 ) CJK RADICAL J-SIMPLIFIED TOOTH → CJK UNIFIED IDEOGRAPH-6B6F	# 
+
+2F8F3 ;	6B72 ;	MA	# ( 歲 → 歲 ) CJK COMPATIBILITY IDEOGRAPH-2F8F3 → CJK UNIFIED IDEOGRAPH-6B72	# 
+
+F98C ;	6B77 ;	MA	# ( 歷 → 歷 ) CJK COMPATIBILITY IDEOGRAPH-F98C → CJK UNIFIED IDEOGRAPH-6B77	# 
+
+FA95 ;	6B79 ;	MA	# ( 歹 → 歹 ) CJK COMPATIBILITY IDEOGRAPH-FA95 → CJK UNIFIED IDEOGRAPH-6B79	# 
+2F4D ;	6B79 ;	MA	#* ( ⽍ → 歹 ) KANGXI RADICAL DEATH → CJK UNIFIED IDEOGRAPH-6B79	# 
+
+2E9E ;	6B7A ;	MA	#* ( ⺞ → 歺 ) CJK RADICAL DEATH → CJK UNIFIED IDEOGRAPH-6B7A	# 
+
+2F8F4 ;	6B9F ;	MA	# ( 殟 → 殟 ) CJK COMPATIBILITY IDEOGRAPH-2F8F4 → CJK UNIFIED IDEOGRAPH-6B9F	# 
+
+F9A5 ;	6BAE ;	MA	# ( 殮 → 殮 ) CJK COMPATIBILITY IDEOGRAPH-F9A5 → CJK UNIFIED IDEOGRAPH-6BAE	# 
+
+2F4E ;	6BB3 ;	MA	#* ( ⽎ → 殳 ) KANGXI RADICAL WEAPON → CJK UNIFIED IDEOGRAPH-6BB3	# 
+
+F970 ;	6BBA ;	MA	# ( 殺 → 殺 ) CJK COMPATIBILITY IDEOGRAPH-F970 → CJK UNIFIED IDEOGRAPH-6BBA	# 
+FA96 ;	6BBA ;	MA	# ( 殺 → 殺 ) CJK COMPATIBILITY IDEOGRAPH-FA96 → CJK UNIFIED IDEOGRAPH-6BBA	# 
+2F8F5 ;	6BBA ;	MA	# ( 殺 → 殺 ) CJK COMPATIBILITY IDEOGRAPH-2F8F5 → CJK UNIFIED IDEOGRAPH-6BBA	# 
+
+2F8F6 ;	6BBB ;	MA	# ( 殻 → 殻 ) CJK COMPATIBILITY IDEOGRAPH-2F8F6 → CJK UNIFIED IDEOGRAPH-6BBB	# 
+
+2F8F7 ;	23A8D ;	MA	# ( 𣪍 → 𣪍 ) CJK COMPATIBILITY IDEOGRAPH-2F8F7 → CJK UNIFIED IDEOGRAPH-23A8D	# 
+
+2F4F ;	6BCB ;	MA	#* ( ⽏ → 毋 ) KANGXI RADICAL DO NOT → CJK UNIFIED IDEOGRAPH-6BCB	# 
+
+2E9F ;	6BCD ;	MA	#* ( ⺟ → 母 ) CJK RADICAL MOTHER → CJK UNIFIED IDEOGRAPH-6BCD	# 
+
+2F8F9 ;	23AFA ;	MA	# ( 𣫺 → 𣫺 ) CJK COMPATIBILITY IDEOGRAPH-2F8F9 → CJK UNIFIED IDEOGRAPH-23AFA	# 
+
+2F50 ;	6BD4 ;	MA	#* ( ⽐ → 比 ) KANGXI RADICAL COMPARE → CJK UNIFIED IDEOGRAPH-6BD4	# 
+
+2F51 ;	6BDB ;	MA	#* ( ⽑ → 毛 ) KANGXI RADICAL FUR → CJK UNIFIED IDEOGRAPH-6BDB	# 
+
+2F52 ;	6C0F ;	MA	#* ( ⽒ → 氏 ) KANGXI RADICAL CLAN → CJK UNIFIED IDEOGRAPH-6C0F	# 
+
+2EA0 ;	6C11 ;	MA	#* ( ⺠ → 民 ) CJK RADICAL CIVILIAN → CJK UNIFIED IDEOGRAPH-6C11	# 
+
+2F53 ;	6C14 ;	MA	#* ( ⽓ → 气 ) KANGXI RADICAL STEAM → CJK UNIFIED IDEOGRAPH-6C14	# 
+
+2F54 ;	6C34 ;	MA	#* ( ⽔ → 水 ) KANGXI RADICAL WATER → CJK UNIFIED IDEOGRAPH-6C34	# 
+
+2EA1 ;	6C35 ;	MA	#* ( ⺡ → 氵 ) CJK RADICAL WATER ONE → CJK UNIFIED IDEOGRAPH-6C35	# 
+
+2EA2 ;	6C3A ;	MA	#* ( ⺢ → 氺 ) CJK RADICAL WATER TWO → CJK UNIFIED IDEOGRAPH-6C3A	# 
+
+2F8FA ;	6C4E ;	MA	# ( 汎 → 汎 ) CJK COMPATIBILITY IDEOGRAPH-2F8FA → CJK UNIFIED IDEOGRAPH-6C4E	# 
+
+2F8FE ;	6C67 ;	MA	# ( 汧 → 汧 ) CJK COMPATIBILITY IDEOGRAPH-2F8FE → CJK UNIFIED IDEOGRAPH-6C67	# 
+
+F972 ;	6C88 ;	MA	# ( 沈 → 沈 ) CJK COMPATIBILITY IDEOGRAPH-F972 → CJK UNIFIED IDEOGRAPH-6C88	# 
+
+2F8FC ;	6CBF ;	MA	# ( 沿 → 沿 ) CJK COMPATIBILITY IDEOGRAPH-2F8FC → CJK UNIFIED IDEOGRAPH-6CBF	# 
+
+F968 ;	6CCC ;	MA	# ( 泌 → 泌 ) CJK COMPATIBILITY IDEOGRAPH-F968 → CJK UNIFIED IDEOGRAPH-6CCC	# 
+
+2F8FD ;	6CCD ;	MA	# ( 泍 → 泍 ) CJK COMPATIBILITY IDEOGRAPH-2F8FD → CJK UNIFIED IDEOGRAPH-6CCD	# 
+
+F9E3 ;	6CE5 ;	MA	# ( 泥 → 泥 ) CJK COMPATIBILITY IDEOGRAPH-F9E3 → CJK UNIFIED IDEOGRAPH-6CE5	# 
+
+2F8FB ;	23CBC ;	MA	# ( 𣲼 → 𣲼 ) CJK COMPATIBILITY IDEOGRAPH-2F8FB → CJK UNIFIED IDEOGRAPH-23CBC	# 
+
+F915 ;	6D1B ;	MA	# ( 洛 → 洛 ) CJK COMPATIBILITY IDEOGRAPH-F915 → CJK UNIFIED IDEOGRAPH-6D1B	# 
+
+FA05 ;	6D1E ;	MA	# ( 洞 → 洞 ) CJK COMPATIBILITY IDEOGRAPH-FA05 → CJK UNIFIED IDEOGRAPH-6D1E	# 
+
+2F907 ;	6D34 ;	MA	# ( 洴 → 洴 ) CJK COMPATIBILITY IDEOGRAPH-2F907 → CJK UNIFIED IDEOGRAPH-6D34	# 
+
+2F900 ;	6D3E ;	MA	# ( 派 → 派 ) CJK COMPATIBILITY IDEOGRAPH-2F900 → CJK UNIFIED IDEOGRAPH-6D3E	# 
+
+F9CA ;	6D41 ;	MA	# ( 流 → 流 ) CJK COMPATIBILITY IDEOGRAPH-F9CA → CJK UNIFIED IDEOGRAPH-6D41	# 
+FA97 ;	6D41 ;	MA	# ( 流 → 流 ) CJK COMPATIBILITY IDEOGRAPH-FA97 → CJK UNIFIED IDEOGRAPH-6D41	# 
+2F902 ;	6D41 ;	MA	# ( 流 → 流 ) CJK COMPATIBILITY IDEOGRAPH-2F902 → CJK UNIFIED IDEOGRAPH-6D41	# 
+
+2F8FF ;	6D16 ;	MA	# ( 洖 → 洖 ) CJK COMPATIBILITY IDEOGRAPH-2F8FF → CJK UNIFIED IDEOGRAPH-6D16	# 
+
+2F903 ;	6D69 ;	MA	# ( 浩 → 浩 ) CJK COMPATIBILITY IDEOGRAPH-2F903 → CJK UNIFIED IDEOGRAPH-6D69	# 
+
+F92A ;	6D6A ;	MA	# ( 浪 → 浪 ) CJK COMPATIBILITY IDEOGRAPH-F92A → CJK UNIFIED IDEOGRAPH-6D6A	# 
+
+FA45 ;	6D77 ;	MA	# ( 海 → 海 ) CJK COMPATIBILITY IDEOGRAPH-FA45 → CJK UNIFIED IDEOGRAPH-6D77	# 
+2F901 ;	6D77 ;	MA	# ( 海 → 海 ) CJK COMPATIBILITY IDEOGRAPH-2F901 → CJK UNIFIED IDEOGRAPH-6D77	# 
+
+2F904 ;	6D78 ;	MA	# ( 浸 → 浸 ) CJK COMPATIBILITY IDEOGRAPH-2F904 → CJK UNIFIED IDEOGRAPH-6D78	# 
+
+2F905 ;	6D85 ;	MA	# ( 涅 → 涅 ) CJK COMPATIBILITY IDEOGRAPH-2F905 → CJK UNIFIED IDEOGRAPH-6D85	# 
+
+2F906 ;	23D1E ;	MA	# ( 𣴞 → 𣴞 ) CJK COMPATIBILITY IDEOGRAPH-2F906 → CJK UNIFIED IDEOGRAPH-23D1E	# 
+
+F9F5 ;	6DCB ;	MA	# ( 淋 → 淋 ) CJK COMPATIBILITY IDEOGRAPH-F9F5 → CJK UNIFIED IDEOGRAPH-6DCB	# 
+
+F94D ;	6DDA ;	MA	# ( 淚 → 淚 ) CJK COMPATIBILITY IDEOGRAPH-F94D → CJK UNIFIED IDEOGRAPH-6DDA	# 
+
+F9D6 ;	6DEA ;	MA	# ( 淪 → 淪 ) CJK COMPATIBILITY IDEOGRAPH-F9D6 → CJK UNIFIED IDEOGRAPH-6DEA	# 
+
+2F90E ;	6DF9 ;	MA	# ( 淹 → 淹 ) CJK COMPATIBILITY IDEOGRAPH-2F90E → CJK UNIFIED IDEOGRAPH-6DF9	# 
+
+FA46 ;	6E1A ;	MA	# ( 渚 → 渚 ) CJK COMPATIBILITY IDEOGRAPH-FA46 → CJK UNIFIED IDEOGRAPH-6E1A	# 
+
+2F908 ;	6E2F ;	MA	# ( 港 → 港 ) CJK COMPATIBILITY IDEOGRAPH-2F908 → CJK UNIFIED IDEOGRAPH-6E2F	# 
+
+2F909 ;	6E6E ;	MA	# ( 湮 → 湮 ) CJK COMPATIBILITY IDEOGRAPH-2F909 → CJK UNIFIED IDEOGRAPH-6E6E	# 
+
+6F59 ;	6E88 ;	MA	# ( 潙 → 溈 ) CJK UNIFIED IDEOGRAPH-6F59 → CJK UNIFIED IDEOGRAPH-6E88	# 
+
+FA99 ;	6ECB ;	MA	# ( 滋 → 滋 ) CJK COMPATIBILITY IDEOGRAPH-FA99 → CJK UNIFIED IDEOGRAPH-6ECB	# 
+2F90B ;	6ECB ;	MA	# ( 滋 → 滋 ) CJK COMPATIBILITY IDEOGRAPH-2F90B → CJK UNIFIED IDEOGRAPH-6ECB	# 
+
+F9CB ;	6E9C ;	MA	# ( 溜 → 溜 ) CJK COMPATIBILITY IDEOGRAPH-F9CB → CJK UNIFIED IDEOGRAPH-6E9C	# 
+
+F9EC ;	6EBA ;	MA	# ( 溺 → 溺 ) CJK COMPATIBILITY IDEOGRAPH-F9EC → CJK UNIFIED IDEOGRAPH-6EBA	# 
+
+2F90C ;	6EC7 ;	MA	# ( 滇 → 滇 ) CJK COMPATIBILITY IDEOGRAPH-2F90C → CJK UNIFIED IDEOGRAPH-6EC7	# 
+
+F904 ;	6ED1 ;	MA	# ( 滑 → 滑 ) CJK COMPATIBILITY IDEOGRAPH-F904 → CJK UNIFIED IDEOGRAPH-6ED1	# 
+
+FA98 ;	6EDB ;	MA	# ( 滛 → 滛 ) CJK COMPATIBILITY IDEOGRAPH-FA98 → CJK UNIFIED IDEOGRAPH-6EDB	# 
+
+2F90A ;	3D33 ;	MA	# ( 㴳 → 㴳 ) CJK COMPATIBILITY IDEOGRAPH-2F90A → CJK UNIFIED IDEOGRAPH-3D33	# 
+
+F94E ;	6F0F ;	MA	# ( 漏 → 漏 ) CJK COMPATIBILITY IDEOGRAPH-F94E → CJK UNIFIED IDEOGRAPH-6F0F	# 
+
+FA47 ;	6F22 ;	MA	# ( 漢 → 漢 ) CJK COMPATIBILITY IDEOGRAPH-FA47 → CJK UNIFIED IDEOGRAPH-6F22	# 
+FA9A ;	6F22 ;	MA	# ( 漢 → 漢 ) CJK COMPATIBILITY IDEOGRAPH-FA9A → CJK UNIFIED IDEOGRAPH-6F22	# 
+
+F992 ;	6F23 ;	MA	# ( 漣 → 漣 ) CJK COMPATIBILITY IDEOGRAPH-F992 → CJK UNIFIED IDEOGRAPH-6F23	# 
+
+2F90D ;	23ED1 ;	MA	# ( 𣻑 → 𣻑 ) CJK COMPATIBILITY IDEOGRAPH-2F90D → CJK UNIFIED IDEOGRAPH-23ED1	# 
+
+2F90F ;	6F6E ;	MA	# ( 潮 → 潮 ) CJK COMPATIBILITY IDEOGRAPH-2F90F → CJK UNIFIED IDEOGRAPH-6F6E	# 
+
+2F910 ;	23F5E ;	MA	# ( 𣽞 → 𣽞 ) CJK COMPATIBILITY IDEOGRAPH-2F910 → CJK UNIFIED IDEOGRAPH-23F5E	# 
+
+2F911 ;	23F8E ;	MA	# ( 𣾎 → 𣾎 ) CJK COMPATIBILITY IDEOGRAPH-2F911 → CJK UNIFIED IDEOGRAPH-23F8E	# 
+
+2F912 ;	6FC6 ;	MA	# ( 濆 → 濆 ) CJK COMPATIBILITY IDEOGRAPH-2F912 → CJK UNIFIED IDEOGRAPH-6FC6	# 
+
+F922 ;	6FEB ;	MA	# ( 濫 → 濫 ) CJK COMPATIBILITY IDEOGRAPH-F922 → CJK UNIFIED IDEOGRAPH-6FEB	# 
+
+F984 ;	6FFE ;	MA	# ( 濾 → 濾 ) CJK COMPATIBILITY IDEOGRAPH-F984 → CJK UNIFIED IDEOGRAPH-6FFE	# 
+
+2F915 ;	701B ;	MA	# ( 瀛 → 瀛 ) CJK COMPATIBILITY IDEOGRAPH-2F915 → CJK UNIFIED IDEOGRAPH-701B	# 
+
+FA9B ;	701E ;	MA	# ( 瀞 → 瀞 ) CJK COMPATIBILITY IDEOGRAPH-FA9B → CJK UNIFIED IDEOGRAPH-701E	# 
+2F914 ;	701E ;	MA	# ( 瀞 → 瀞 ) CJK COMPATIBILITY IDEOGRAPH-2F914 → CJK UNIFIED IDEOGRAPH-701E	# 
+
+2F913 ;	7039 ;	MA	# ( 瀹 → 瀹 ) CJK COMPATIBILITY IDEOGRAPH-2F913 → CJK UNIFIED IDEOGRAPH-7039	# 
+
+2F917 ;	704A ;	MA	# ( 灊 → 灊 ) CJK COMPATIBILITY IDEOGRAPH-2F917 → CJK UNIFIED IDEOGRAPH-704A	# 
+
+2F916 ;	3D96 ;	MA	# ( 㶖 → 㶖 ) CJK COMPATIBILITY IDEOGRAPH-2F916 → CJK UNIFIED IDEOGRAPH-3D96	# 
+
+2F55 ;	706B ;	MA	#* ( ⽕ → 火 ) KANGXI RADICAL FIRE → CJK UNIFIED IDEOGRAPH-706B	# 
+
+2EA3 ;	706C ;	MA	#* ( ⺣ → 灬 ) CJK RADICAL FIRE → CJK UNIFIED IDEOGRAPH-706C	# 
+
+2F835 ;	7070 ;	MA	# ( 灰 → 灰 ) CJK COMPATIBILITY IDEOGRAPH-2F835 → CJK UNIFIED IDEOGRAPH-7070	# 
+
+2F919 ;	7077 ;	MA	# ( 灷 → 灷 ) CJK COMPATIBILITY IDEOGRAPH-2F919 → CJK UNIFIED IDEOGRAPH-7077	# 
+
+2F918 ;	707D ;	MA	# ( 災 → 災 ) CJK COMPATIBILITY IDEOGRAPH-2F918 → CJK UNIFIED IDEOGRAPH-707D	# 
+
+F9FB ;	7099 ;	MA	# ( 炙 → 炙 ) CJK COMPATIBILITY IDEOGRAPH-F9FB → CJK UNIFIED IDEOGRAPH-7099	# 
+
+2F91A ;	70AD ;	MA	# ( 炭 → 炭 ) CJK COMPATIBILITY IDEOGRAPH-2F91A → CJK UNIFIED IDEOGRAPH-70AD	# 
+
+F99F ;	70C8 ;	MA	# ( 烈 → 烈 ) CJK COMPATIBILITY IDEOGRAPH-F99F → CJK UNIFIED IDEOGRAPH-70C8	# 
+
+F916 ;	70D9 ;	MA	# ( 烙 → 烙 ) CJK COMPATIBILITY IDEOGRAPH-F916 → CJK UNIFIED IDEOGRAPH-70D9	# 
+
+FA48 ;	716E ;	MA	# ( 煮 → 煮 ) CJK COMPATIBILITY IDEOGRAPH-FA48 → CJK UNIFIED IDEOGRAPH-716E	# 
+FA9C ;	716E ;	MA	# ( 煮 → 煮 ) CJK COMPATIBILITY IDEOGRAPH-FA9C → CJK UNIFIED IDEOGRAPH-716E	# 
+
+2F91D ;	24263 ;	MA	# ( 𤉣 → 𤉣 ) CJK COMPATIBILITY IDEOGRAPH-2F91D → CJK UNIFIED IDEOGRAPH-24263	# 
+
+2F91C ;	7145 ;	MA	# ( 煅 → 煅 ) CJK COMPATIBILITY IDEOGRAPH-2F91C → CJK UNIFIED IDEOGRAPH-7145	# 
+
+F993 ;	7149 ;	MA	# ( 煉 → 煉 ) CJK COMPATIBILITY IDEOGRAPH-F993 → CJK UNIFIED IDEOGRAPH-7149	# 
+
+FA6C ;	242EE ;	MA	# ( 𤋮 → 𤋮 ) CJK COMPATIBILITY IDEOGRAPH-FA6C → CJK UNIFIED IDEOGRAPH-242EE	# 
+
+2F91E ;	719C ;	MA	# ( 熜 → 熜 ) CJK COMPATIBILITY IDEOGRAPH-2F91E → CJK UNIFIED IDEOGRAPH-719C	# 
+
+F9C0 ;	71CE ;	MA	# ( 燎 → 燎 ) CJK COMPATIBILITY IDEOGRAPH-F9C0 → CJK UNIFIED IDEOGRAPH-71CE	# 
+
+F9EE ;	71D0 ;	MA	# ( 燐 → 燐 ) CJK COMPATIBILITY IDEOGRAPH-F9EE → CJK UNIFIED IDEOGRAPH-71D0	# 
+
+2F91F ;	243AB ;	MA	# ( 𤎫 → 𤎫 ) CJK COMPATIBILITY IDEOGRAPH-2F91F → CJK UNIFIED IDEOGRAPH-243AB	# 
+
+F932 ;	7210 ;	MA	# ( 爐 → 爐 ) CJK COMPATIBILITY IDEOGRAPH-F932 → CJK UNIFIED IDEOGRAPH-7210	# 
+
+F91E ;	721B ;	MA	# ( 爛 → 爛 ) CJK COMPATIBILITY IDEOGRAPH-F91E → CJK UNIFIED IDEOGRAPH-721B	# 
+
+2F920 ;	7228 ;	MA	# ( 爨 → 爨 ) CJK COMPATIBILITY IDEOGRAPH-2F920 → CJK UNIFIED IDEOGRAPH-7228	# 
+
+2F56 ;	722A ;	MA	#* ( ⽖ → 爪 ) KANGXI RADICAL CLAW → CJK UNIFIED IDEOGRAPH-722A	# 
+
+FA49 ;	722B ;	MA	# ( 爫 → 爫 ) CJK COMPATIBILITY IDEOGRAPH-FA49 → CJK UNIFIED IDEOGRAPH-722B	# 
+2EA4 ;	722B ;	MA	#* ( ⺤ → 爫 ) CJK RADICAL PAW ONE → CJK UNIFIED IDEOGRAPH-722B	# 
+
+FA9E ;	7235 ;	MA	# ( 爵 → 爵 ) CJK COMPATIBILITY IDEOGRAPH-FA9E → CJK UNIFIED IDEOGRAPH-7235	# 
+2F921 ;	7235 ;	MA	# ( 爵 → 爵 ) CJK COMPATIBILITY IDEOGRAPH-2F921 → CJK UNIFIED IDEOGRAPH-7235	# 
+
+2F57 ;	7236 ;	MA	#* ( ⽗ → 父 ) KANGXI RADICAL FATHER → CJK UNIFIED IDEOGRAPH-7236	# 
+
+2F58 ;	723B ;	MA	#* ( ⽘ → 爻 ) KANGXI RADICAL DOUBLE X → CJK UNIFIED IDEOGRAPH-723B	# 
+
+2EA6 ;	4E2C ;	MA	#* ( ⺦ → 丬 ) CJK RADICAL SIMPLIFIED HALF TREE TRUNK → CJK UNIFIED IDEOGRAPH-4E2C	# 
+
+2F59 ;	723F ;	MA	#* ( ⽙ → 爿 ) KANGXI RADICAL HALF TREE TRUNK → CJK UNIFIED IDEOGRAPH-723F	# 
+
+2F5A ;	7247 ;	MA	#* ( ⽚ → 片 ) KANGXI RADICAL SLICE → CJK UNIFIED IDEOGRAPH-7247	# 
+
+2F922 ;	7250 ;	MA	# ( 牐 → 牐 ) CJK COMPATIBILITY IDEOGRAPH-2F922 → CJK UNIFIED IDEOGRAPH-7250	# 
+
+2F5B ;	7259 ;	MA	#* ( ⽛ → 牙 ) KANGXI RADICAL FANG → CJK UNIFIED IDEOGRAPH-7259	# 
+
+2F923 ;	24608 ;	MA	# ( 𤘈 → 𤘈 ) CJK COMPATIBILITY IDEOGRAPH-2F923 → CJK UNIFIED IDEOGRAPH-24608	# 
+
+2F5C ;	725B ;	MA	#* ( ⽜ → 牛 ) KANGXI RADICAL COW → CJK UNIFIED IDEOGRAPH-725B	# 
+
+F946 ;	7262 ;	MA	# ( 牢 → 牢 ) CJK COMPATIBILITY IDEOGRAPH-F946 → CJK UNIFIED IDEOGRAPH-7262	# 
+
+2F924 ;	7280 ;	MA	# ( 犀 → 犀 ) CJK COMPATIBILITY IDEOGRAPH-2F924 → CJK UNIFIED IDEOGRAPH-7280	# 
+
+2F925 ;	7295 ;	MA	# ( 犕 → 犕 ) CJK COMPATIBILITY IDEOGRAPH-2F925 → CJK UNIFIED IDEOGRAPH-7295	# 
+
+2F5D ;	72AC ;	MA	#* ( ⽝ → 犬 ) KANGXI RADICAL DOG → CJK UNIFIED IDEOGRAPH-72AC	# 
+
+2EA8 ;	72AD ;	MA	#* ( ⺨ → 犭 ) CJK RADICAL DOG → CJK UNIFIED IDEOGRAPH-72AD	# 
+
+FA9F ;	72AF ;	MA	# ( 犯 → 犯 ) CJK COMPATIBILITY IDEOGRAPH-FA9F → CJK UNIFIED IDEOGRAPH-72AF	# 
+
+F9FA ;	72C0 ;	MA	# ( 狀 → 狀 ) CJK COMPATIBILITY IDEOGRAPH-F9FA → CJK UNIFIED IDEOGRAPH-72C0	# 
+
+2F926 ;	24735 ;	MA	# ( 𤜵 → 𤜵 ) CJK COMPATIBILITY IDEOGRAPH-2F926 → CJK UNIFIED IDEOGRAPH-24735	# 
+
+F92B ;	72FC ;	MA	# ( 狼 → 狼 ) CJK COMPATIBILITY IDEOGRAPH-F92B → CJK UNIFIED IDEOGRAPH-72FC	# 
+
+FA16 ;	732A ;	MA	# ( 猪 → 猪 ) CJK COMPATIBILITY IDEOGRAPH-FA16 → CJK UNIFIED IDEOGRAPH-732A	# 
+FAA0 ;	732A ;	MA	# ( 猪 → 猪 ) CJK COMPATIBILITY IDEOGRAPH-FAA0 → CJK UNIFIED IDEOGRAPH-732A	# 
+
+2F927 ;	24814 ;	MA	# ( 𤠔 → 𤠔 ) CJK COMPATIBILITY IDEOGRAPH-2F927 → CJK UNIFIED IDEOGRAPH-24814	# 
+
+F9A7 ;	7375 ;	MA	# ( 獵 → 獵 ) CJK COMPATIBILITY IDEOGRAPH-F9A7 → CJK UNIFIED IDEOGRAPH-7375	# 
+
+2F928 ;	737A ;	MA	# ( 獺 → 獺 ) CJK COMPATIBILITY IDEOGRAPH-2F928 → CJK UNIFIED IDEOGRAPH-737A	# 
+
+2F5E ;	7384 ;	MA	#* ( ⽞ → 玄 ) KANGXI RADICAL PROFOUND → CJK UNIFIED IDEOGRAPH-7384	# 
+
+F961 ;	7387 ;	MA	# ( 率 → 率 ) CJK COMPATIBILITY IDEOGRAPH-F961 → CJK UNIFIED IDEOGRAPH-7387	# 
+F9DB ;	7387 ;	MA	# ( 率 → 率 ) CJK COMPATIBILITY IDEOGRAPH-F9DB → CJK UNIFIED IDEOGRAPH-7387	# 
+
+2F5F ;	7389 ;	MA	#* ( ⽟ → 玉 ) KANGXI RADICAL JADE → CJK UNIFIED IDEOGRAPH-7389	# 
+
+2F929 ;	738B ;	MA	# ( 王 → 王 ) CJK COMPATIBILITY IDEOGRAPH-2F929 → CJK UNIFIED IDEOGRAPH-738B	# 
+
+2F92A ;	3EAC ;	MA	# ( 㺬 → 㺬 ) CJK COMPATIBILITY IDEOGRAPH-2F92A → CJK UNIFIED IDEOGRAPH-3EAC	# 
+
+2F92B ;	73A5 ;	MA	# ( 玥 → 玥 ) CJK COMPATIBILITY IDEOGRAPH-2F92B → CJK UNIFIED IDEOGRAPH-73A5	# 
+
+F9AD ;	73B2 ;	MA	# ( 玲 → 玲 ) CJK COMPATIBILITY IDEOGRAPH-F9AD → CJK UNIFIED IDEOGRAPH-73B2	# 
+
+2F92C ;	3EB8 ;	MA	# ( 㺸 → 㺸 ) CJK COMPATIBILITY IDEOGRAPH-2F92C → CJK UNIFIED IDEOGRAPH-3EB8	# 
+2F92D ;	3EB8 ;	MA	# ( 㺸 → 㺸 ) CJK COMPATIBILITY IDEOGRAPH-2F92D → CJK UNIFIED IDEOGRAPH-3EB8	# 
+
+F917 ;	73DE ;	MA	# ( 珞 → 珞 ) CJK COMPATIBILITY IDEOGRAPH-F917 → CJK UNIFIED IDEOGRAPH-73DE	# 
+
+F9CC ;	7409 ;	MA	# ( 琉 → 琉 ) CJK COMPATIBILITY IDEOGRAPH-F9CC → CJK UNIFIED IDEOGRAPH-7409	# 
+
+F9E4 ;	7406 ;	MA	# ( 理 → 理 ) CJK COMPATIBILITY IDEOGRAPH-F9E4 → CJK UNIFIED IDEOGRAPH-7406	# 
+
+FA4A ;	7422 ;	MA	# ( 琢 → 琢 ) CJK COMPATIBILITY IDEOGRAPH-FA4A → CJK UNIFIED IDEOGRAPH-7422	# 
+
+2F92E ;	7447 ;	MA	# ( 瑇 → 瑇 ) CJK COMPATIBILITY IDEOGRAPH-2F92E → CJK UNIFIED IDEOGRAPH-7447	# 
+
+2F92F ;	745C ;	MA	# ( 瑜 → 瑜 ) CJK COMPATIBILITY IDEOGRAPH-2F92F → CJK UNIFIED IDEOGRAPH-745C	# 
+
+F9AE ;	7469 ;	MA	# ( 瑩 → 瑩 ) CJK COMPATIBILITY IDEOGRAPH-F9AE → CJK UNIFIED IDEOGRAPH-7469	# 
+
+FAA1 ;	7471 ;	MA	# ( 瑱 → 瑱 ) CJK COMPATIBILITY IDEOGRAPH-FAA1 → CJK UNIFIED IDEOGRAPH-7471	# 
+2F930 ;	7471 ;	MA	# ( 瑱 → 瑱 ) CJK COMPATIBILITY IDEOGRAPH-2F930 → CJK UNIFIED IDEOGRAPH-7471	# 
+
+2F931 ;	7485 ;	MA	# ( 璅 → 璅 ) CJK COMPATIBILITY IDEOGRAPH-2F931 → CJK UNIFIED IDEOGRAPH-7485	# 
+
+F994 ;	7489 ;	MA	# ( 璉 → 璉 ) CJK COMPATIBILITY IDEOGRAPH-F994 → CJK UNIFIED IDEOGRAPH-7489	# 
+
+F9EF ;	7498 ;	MA	# ( 璘 → 璘 ) CJK COMPATIBILITY IDEOGRAPH-F9EF → CJK UNIFIED IDEOGRAPH-7498	# 
+
+2F932 ;	74CA ;	MA	# ( 瓊 → 瓊 ) CJK COMPATIBILITY IDEOGRAPH-2F932 → CJK UNIFIED IDEOGRAPH-74CA	# 
+
+2F60 ;	74DC ;	MA	#* ( ⽠ → 瓜 ) KANGXI RADICAL MELON → CJK UNIFIED IDEOGRAPH-74DC	# 
+
+2F61 ;	74E6 ;	MA	#* ( ⽡ → 瓦 ) KANGXI RADICAL TILE → CJK UNIFIED IDEOGRAPH-74E6	# 
+
+2F933 ;	3F1B ;	MA	# ( 㼛 → 㼛 ) CJK COMPATIBILITY IDEOGRAPH-2F933 → CJK UNIFIED IDEOGRAPH-3F1B	# 
+
+FAA2 ;	7506 ;	MA	# ( 甆 → 甆 ) CJK COMPATIBILITY IDEOGRAPH-FAA2 → CJK UNIFIED IDEOGRAPH-7506	# 
+
+2F62 ;	7518 ;	MA	#* ( ⽢ → 甘 ) KANGXI RADICAL SWEET → CJK UNIFIED IDEOGRAPH-7518	# 
+
+2F63 ;	751F ;	MA	#* ( ⽣ → 生 ) KANGXI RADICAL LIFE → CJK UNIFIED IDEOGRAPH-751F	# 
+
+2F934 ;	7524 ;	MA	# ( 甤 → 甤 ) CJK COMPATIBILITY IDEOGRAPH-2F934 → CJK UNIFIED IDEOGRAPH-7524	# 
+
+2F64 ;	7528 ;	MA	#* ( ⽤ → 用 ) KANGXI RADICAL USE → CJK UNIFIED IDEOGRAPH-7528	# 
+
+2F65 ;	7530 ;	MA	#* ( ⽥ → 田 ) KANGXI RADICAL FIELD → CJK UNIFIED IDEOGRAPH-7530	# 
+
+FAA3 ;	753B ;	MA	# ( 画 → 画 ) CJK COMPATIBILITY IDEOGRAPH-FAA3 → CJK UNIFIED IDEOGRAPH-753B	# 
+
+2F936 ;	753E ;	MA	# ( 甾 → 甾 ) CJK COMPATIBILITY IDEOGRAPH-2F936 → CJK UNIFIED IDEOGRAPH-753E	# 
+
+2F935 ;	24C36 ;	MA	# ( 𤰶 → 𤰶 ) CJK COMPATIBILITY IDEOGRAPH-2F935 → CJK UNIFIED IDEOGRAPH-24C36	# 
+
+F9CD ;	7559 ;	MA	# ( 留 → 留 ) CJK COMPATIBILITY IDEOGRAPH-F9CD → CJK UNIFIED IDEOGRAPH-7559	# 
+
+F976 ;	7565 ;	MA	# ( 略 → 略 ) CJK COMPATIBILITY IDEOGRAPH-F976 → CJK UNIFIED IDEOGRAPH-7565	# 
+
+F962 ;	7570 ;	MA	# ( 異 → 異 ) CJK COMPATIBILITY IDEOGRAPH-F962 → CJK UNIFIED IDEOGRAPH-7570	# 
+2F938 ;	7570 ;	MA	# ( 異 → 異 ) CJK COMPATIBILITY IDEOGRAPH-2F938 → CJK UNIFIED IDEOGRAPH-7570	# 
+
+2F937 ;	24C92 ;	MA	# ( 𤲒 → 𤲒 ) CJK COMPATIBILITY IDEOGRAPH-2F937 → CJK UNIFIED IDEOGRAPH-24C92	# 
+
+2F66 ;	758B ;	MA	#* ( ⽦ → 疋 ) KANGXI RADICAL BOLT OF CLOTH → CJK UNIFIED IDEOGRAPH-758B	# 
+
+2F67 ;	7592 ;	MA	#* ( ⽧ → 疒 ) KANGXI RADICAL SICKNESS → CJK UNIFIED IDEOGRAPH-7592	# 
+
+F9E5 ;	75E2 ;	MA	# ( 痢 → 痢 ) CJK COMPATIBILITY IDEOGRAPH-F9E5 → CJK UNIFIED IDEOGRAPH-75E2	# 
+
+2F93A ;	7610 ;	MA	# ( 瘐 → 瘐 ) CJK COMPATIBILITY IDEOGRAPH-2F93A → CJK UNIFIED IDEOGRAPH-7610	# 
+
+FAA5 ;	761F ;	MA	# ( 瘟 → 瘟 ) CJK COMPATIBILITY IDEOGRAPH-FAA5 → CJK UNIFIED IDEOGRAPH-761F	# 
+
+FAA4 ;	761D ;	MA	# ( 瘝 → 瘝 ) CJK COMPATIBILITY IDEOGRAPH-FAA4 → CJK UNIFIED IDEOGRAPH-761D	# 
+
+F9C1 ;	7642 ;	MA	# ( 療 → 療 ) CJK COMPATIBILITY IDEOGRAPH-F9C1 → CJK UNIFIED IDEOGRAPH-7642	# 
+
+F90E ;	7669 ;	MA	# ( 癩 → 癩 ) CJK COMPATIBILITY IDEOGRAPH-F90E → CJK UNIFIED IDEOGRAPH-7669	# 
+
+2F68 ;	7676 ;	MA	#* ( ⽨ → 癶 ) KANGXI RADICAL DOTTED TENT → CJK UNIFIED IDEOGRAPH-7676	# 
+
+2F69 ;	767D ;	MA	#* ( ⽩ → 白 ) KANGXI RADICAL WHITE → CJK UNIFIED IDEOGRAPH-767D	# 
+
+2F93B ;	24FA1 ;	MA	# ( 𤾡 → 𤾡 ) CJK COMPATIBILITY IDEOGRAPH-2F93B → CJK UNIFIED IDEOGRAPH-24FA1	# 
+
+2F93C ;	24FB8 ;	MA	# ( 𤾸 → 𤾸 ) CJK COMPATIBILITY IDEOGRAPH-2F93C → CJK UNIFIED IDEOGRAPH-24FB8	# 
+
+2F6A ;	76AE ;	MA	#* ( ⽪ → 皮 ) KANGXI RADICAL SKIN → CJK UNIFIED IDEOGRAPH-76AE	# 
+
+2F6B ;	76BF ;	MA	#* ( ⽫ → 皿 ) KANGXI RADICAL DISH → CJK UNIFIED IDEOGRAPH-76BF	# 
+
+2F93D ;	25044 ;	MA	# ( 𥁄 → 𥁄 ) CJK COMPATIBILITY IDEOGRAPH-2F93D → CJK UNIFIED IDEOGRAPH-25044	# 
+
+2F93E ;	3FFC ;	MA	# ( 㿼 → 㿼 ) CJK COMPATIBILITY IDEOGRAPH-2F93E → CJK UNIFIED IDEOGRAPH-3FFC	# 
+
+FA17 ;	76CA ;	MA	# ( 益 → 益 ) CJK COMPATIBILITY IDEOGRAPH-FA17 → CJK UNIFIED IDEOGRAPH-76CA	# 
+FAA6 ;	76CA ;	MA	# ( 益 → 益 ) CJK COMPATIBILITY IDEOGRAPH-FAA6 → CJK UNIFIED IDEOGRAPH-76CA	# 
+
+FAA7 ;	76DB ;	MA	# ( 盛 → 盛 ) CJK COMPATIBILITY IDEOGRAPH-FAA7 → CJK UNIFIED IDEOGRAPH-76DB	# 
+
+F933 ;	76E7 ;	MA	# ( 盧 → 盧 ) CJK COMPATIBILITY IDEOGRAPH-F933 → CJK UNIFIED IDEOGRAPH-76E7	# 
+
+2F93F ;	4008 ;	MA	# ( 䀈 → 䀈 ) CJK COMPATIBILITY IDEOGRAPH-2F93F → CJK UNIFIED IDEOGRAPH-4008	# 
+
+2F6C ;	76EE ;	MA	#* ( ⽬ → 目 ) KANGXI RADICAL EYE → CJK UNIFIED IDEOGRAPH-76EE	# 
+
+FAA8 ;	76F4 ;	MA	# ( 直 → 直 ) CJK COMPATIBILITY IDEOGRAPH-FAA8 → CJK UNIFIED IDEOGRAPH-76F4	# 
+2F940 ;	76F4 ;	MA	# ( 直 → 直 ) CJK COMPATIBILITY IDEOGRAPH-2F940 → CJK UNIFIED IDEOGRAPH-76F4	# 
+
+2F942 ;	250F2 ;	MA	# ( 𥃲 → 𥃲 ) CJK COMPATIBILITY IDEOGRAPH-2F942 → CJK UNIFIED IDEOGRAPH-250F2	# 
+
+2F941 ;	250F3 ;	MA	# ( 𥃳 → 𥃳 ) CJK COMPATIBILITY IDEOGRAPH-2F941 → CJK UNIFIED IDEOGRAPH-250F3	# 
+
+F96D ;	7701 ;	MA	# ( 省 → 省 ) CJK COMPATIBILITY IDEOGRAPH-F96D → CJK UNIFIED IDEOGRAPH-7701	# 
+
+FAD3 ;	4018 ;	MA	# ( 䀘 → 䀘 ) CJK COMPATIBILITY IDEOGRAPH-FAD3 → CJK UNIFIED IDEOGRAPH-4018	# 
+
+2F943 ;	25119 ;	MA	# ( 𥄙 → 𥄙 ) CJK COMPATIBILITY IDEOGRAPH-2F943 → CJK UNIFIED IDEOGRAPH-25119	# 
+
+2F945 ;	771E ;	MA	# ( 眞 → 眞 ) CJK COMPATIBILITY IDEOGRAPH-2F945 → CJK UNIFIED IDEOGRAPH-771E	# 
+
+2F946 ;	771F ;	MA	# ( 真 → 真 ) CJK COMPATIBILITY IDEOGRAPH-2F946 → CJK UNIFIED IDEOGRAPH-771F	# 
+2F947 ;	771F ;	MA	# ( 真 → 真 ) CJK COMPATIBILITY IDEOGRAPH-2F947 → CJK UNIFIED IDEOGRAPH-771F	# 
+
+2F944 ;	25133 ;	MA	# ( 𥄳 → 𥄳 ) CJK COMPATIBILITY IDEOGRAPH-2F944 → CJK UNIFIED IDEOGRAPH-25133	# 
+
+FAAA ;	7740 ;	MA	# ( 着 → 着 ) CJK COMPATIBILITY IDEOGRAPH-FAAA → CJK UNIFIED IDEOGRAPH-7740	# 
+
+FAA9 ;	774A ;	MA	# ( 睊 → 睊 ) CJK COMPATIBILITY IDEOGRAPH-FAA9 → CJK UNIFIED IDEOGRAPH-774A	# 
+2F948 ;	774A ;	MA	# ( 睊 → 睊 ) CJK COMPATIBILITY IDEOGRAPH-2F948 → CJK UNIFIED IDEOGRAPH-774A	# 
+
+9FC3 ;	4039 ;	MA	# ( 鿃 → 䀹 ) CJK UNIFIED IDEOGRAPH-9FC3 → CJK UNIFIED IDEOGRAPH-4039	# →䀹→
+FAD4 ;	4039 ;	MA	# ( 䀹 → 䀹 ) CJK COMPATIBILITY IDEOGRAPH-FAD4 → CJK UNIFIED IDEOGRAPH-4039	# 
+2F949 ;	4039 ;	MA	# ( 䀹 → 䀹 ) CJK COMPATIBILITY IDEOGRAPH-2F949 → CJK UNIFIED IDEOGRAPH-4039	# 
+
+6663 ;	403F ;	MA	# ( 晣 → 䀿 ) CJK UNIFIED IDEOGRAPH-6663 → CJK UNIFIED IDEOGRAPH-403F	# 
+
+2F94B ;	4046 ;	MA	# ( 䁆 → 䁆 ) CJK COMPATIBILITY IDEOGRAPH-2F94B → CJK UNIFIED IDEOGRAPH-4046	# 
+
+2F94A ;	778B ;	MA	# ( 瞋 → 瞋 ) CJK COMPATIBILITY IDEOGRAPH-2F94A → CJK UNIFIED IDEOGRAPH-778B	# 
+
+FAD5 ;	25249 ;	MA	# ( 𥉉 → 𥉉 ) CJK COMPATIBILITY IDEOGRAPH-FAD5 → CJK UNIFIED IDEOGRAPH-25249	# 
+
+FA9D ;	77A7 ;	MA	# ( 瞧 → 瞧 ) CJK COMPATIBILITY IDEOGRAPH-FA9D → CJK UNIFIED IDEOGRAPH-77A7	# 
+
+2F6D ;	77DB ;	MA	#* ( ⽭ → 矛 ) KANGXI RADICAL SPEAR → CJK UNIFIED IDEOGRAPH-77DB	# 
+
+2F6E ;	77E2 ;	MA	#* ( ⽮ → 矢 ) KANGXI RADICAL ARROW → CJK UNIFIED IDEOGRAPH-77E2	# 
+
+2F6F ;	77F3 ;	MA	#* ( ⽯ → 石 ) KANGXI RADICAL STONE → CJK UNIFIED IDEOGRAPH-77F3	# 
+
+2F94C ;	4096 ;	MA	# ( 䂖 → 䂖 ) CJK COMPATIBILITY IDEOGRAPH-2F94C → CJK UNIFIED IDEOGRAPH-4096	# 
+
+2F94D ;	2541D ;	MA	# ( 𥐝 → 𥐝 ) CJK COMPATIBILITY IDEOGRAPH-2F94D → CJK UNIFIED IDEOGRAPH-2541D	# 
+
+784F ;	7814 ;	MA	# ( 硏 → 研 ) CJK UNIFIED IDEOGRAPH-784F → CJK UNIFIED IDEOGRAPH-7814	# 
+
+2F94E ;	784E ;	MA	# ( 硎 → 硎 ) CJK COMPATIBILITY IDEOGRAPH-2F94E → CJK UNIFIED IDEOGRAPH-784E	# 
+
+F9CE ;	786B ;	MA	# ( 硫 → 硫 ) CJK COMPATIBILITY IDEOGRAPH-F9CE → CJK UNIFIED IDEOGRAPH-786B	# 
+
+F93B ;	788C ;	MA	# ( 碌 → 碌 ) CJK COMPATIBILITY IDEOGRAPH-F93B → CJK UNIFIED IDEOGRAPH-788C	# 
+2F94F ;	788C ;	MA	# ( 碌 → 碌 ) CJK COMPATIBILITY IDEOGRAPH-2F94F → CJK UNIFIED IDEOGRAPH-788C	# 
+
+FA4B ;	7891 ;	MA	# ( 碑 → 碑 ) CJK COMPATIBILITY IDEOGRAPH-FA4B → CJK UNIFIED IDEOGRAPH-7891	# 
+
+F947 ;	78CA ;	MA	# ( 磊 → 磊 ) CJK COMPATIBILITY IDEOGRAPH-F947 → CJK UNIFIED IDEOGRAPH-78CA	# 
+
+FAAB ;	78CC ;	MA	# ( 磌 → 磌 ) CJK COMPATIBILITY IDEOGRAPH-FAAB → CJK UNIFIED IDEOGRAPH-78CC	# 
+2F950 ;	78CC ;	MA	# ( 磌 → 磌 ) CJK COMPATIBILITY IDEOGRAPH-2F950 → CJK UNIFIED IDEOGRAPH-78CC	# 
+
+F964 ;	78FB ;	MA	# ( 磻 → 磻 ) CJK COMPATIBILITY IDEOGRAPH-F964 → CJK UNIFIED IDEOGRAPH-78FB	# 
+
+2F951 ;	40E3 ;	MA	# ( 䃣 → 䃣 ) CJK COMPATIBILITY IDEOGRAPH-2F951 → CJK UNIFIED IDEOGRAPH-40E3	# 
+
+F985 ;	792A ;	MA	# ( 礪 → 礪 ) CJK COMPATIBILITY IDEOGRAPH-F985 → CJK UNIFIED IDEOGRAPH-792A	# 
+
+2F70 ;	793A ;	MA	#* ( ⽰ → 示 ) KANGXI RADICAL SPIRIT → CJK UNIFIED IDEOGRAPH-793A	# 
+
+2EAD ;	793B ;	MA	#* ( ⺭ → 礻 ) CJK RADICAL SPIRIT TWO → CJK UNIFIED IDEOGRAPH-793B	# 
+
+FA18 ;	793C ;	MA	# ( 礼 → 礼 ) CJK COMPATIBILITY IDEOGRAPH-FA18 → CJK UNIFIED IDEOGRAPH-793C	# 
+
+FA4C ;	793E ;	MA	# ( 社 → 社 ) CJK COMPATIBILITY IDEOGRAPH-FA4C → CJK UNIFIED IDEOGRAPH-793E	# 
+
+FA4E ;	7948 ;	MA	# ( 祈 → 祈 ) CJK COMPATIBILITY IDEOGRAPH-FA4E → CJK UNIFIED IDEOGRAPH-7948	# 
+
+FA4D ;	7949 ;	MA	# ( 祉 → 祉 ) CJK COMPATIBILITY IDEOGRAPH-FA4D → CJK UNIFIED IDEOGRAPH-7949	# 
+
+2F952 ;	25626 ;	MA	# ( 𥘦 → 𥘦 ) CJK COMPATIBILITY IDEOGRAPH-2F952 → CJK UNIFIED IDEOGRAPH-25626	# 
+
+FA4F ;	7950 ;	MA	# ( 祐 → 祐 ) CJK COMPATIBILITY IDEOGRAPH-FA4F → CJK UNIFIED IDEOGRAPH-7950	# 
+
+FA50 ;	7956 ;	MA	# ( 祖 → 祖 ) CJK COMPATIBILITY IDEOGRAPH-FA50 → CJK UNIFIED IDEOGRAPH-7956	# 
+2F953 ;	7956 ;	MA	# ( 祖 → 祖 ) CJK COMPATIBILITY IDEOGRAPH-2F953 → CJK UNIFIED IDEOGRAPH-7956	# 
+
+FA51 ;	795D ;	MA	# ( 祝 → 祝 ) CJK COMPATIBILITY IDEOGRAPH-FA51 → CJK UNIFIED IDEOGRAPH-795D	# 
+
+FA19 ;	795E ;	MA	# ( 神 → 神 ) CJK COMPATIBILITY IDEOGRAPH-FA19 → CJK UNIFIED IDEOGRAPH-795E	# 
+
+FA1A ;	7965 ;	MA	# ( 祥 → 祥 ) CJK COMPATIBILITY IDEOGRAPH-FA1A → CJK UNIFIED IDEOGRAPH-7965	# 
+
+FA61 ;	8996 ;	MA	# ( 視 → 視 ) CJK COMPATIBILITY IDEOGRAPH-FA61 → CJK UNIFIED IDEOGRAPH-8996	# 
+FAB8 ;	8996 ;	MA	# ( 視 → 視 ) CJK COMPATIBILITY IDEOGRAPH-FAB8 → CJK UNIFIED IDEOGRAPH-8996	# 
+
+F93C ;	797F ;	MA	# ( 祿 → 祿 ) CJK COMPATIBILITY IDEOGRAPH-F93C → CJK UNIFIED IDEOGRAPH-797F	# 
+
+2F954 ;	2569A ;	MA	# ( 𥚚 → 𥚚 ) CJK COMPATIBILITY IDEOGRAPH-2F954 → CJK UNIFIED IDEOGRAPH-2569A	# 
+
+FA52 ;	798D ;	MA	# ( 禍 → 禍 ) CJK COMPATIBILITY IDEOGRAPH-FA52 → CJK UNIFIED IDEOGRAPH-798D	# 
+
+FA53 ;	798E ;	MA	# ( 禎 → 禎 ) CJK COMPATIBILITY IDEOGRAPH-FA53 → CJK UNIFIED IDEOGRAPH-798E	# 
+
+FA1B ;	798F ;	MA	# ( 福 → 福 ) CJK COMPATIBILITY IDEOGRAPH-FA1B → CJK UNIFIED IDEOGRAPH-798F	# 
+2F956 ;	798F ;	MA	# ( 福 → 福 ) CJK COMPATIBILITY IDEOGRAPH-2F956 → CJK UNIFIED IDEOGRAPH-798F	# 
+
+2F955 ;	256C5 ;	MA	# ( 𥛅 → 𥛅 ) CJK COMPATIBILITY IDEOGRAPH-2F955 → CJK UNIFIED IDEOGRAPH-256C5	# 
+
+F9B6 ;	79AE ;	MA	# ( 禮 → 禮 ) CJK COMPATIBILITY IDEOGRAPH-F9B6 → CJK UNIFIED IDEOGRAPH-79AE	# 
+
+2F71 ;	79B8 ;	MA	#* ( ⽱ → 禸 ) KANGXI RADICAL TRACK → CJK UNIFIED IDEOGRAPH-79B8	# 
+
+2F72 ;	79BE ;	MA	#* ( ⽲ → 禾 ) KANGXI RADICAL GRAIN → CJK UNIFIED IDEOGRAPH-79BE	# 
+
+F995 ;	79CA ;	MA	# ( 秊 → 秊 ) CJK COMPATIBILITY IDEOGRAPH-F995 → CJK UNIFIED IDEOGRAPH-79CA	# 
+
+2F958 ;	412F ;	MA	# ( 䄯 → 䄯 ) CJK COMPATIBILITY IDEOGRAPH-2F958 → CJK UNIFIED IDEOGRAPH-412F	# 
+
+2F957 ;	79EB ;	MA	# ( 秫 → 秫 ) CJK COMPATIBILITY IDEOGRAPH-2F957 → CJK UNIFIED IDEOGRAPH-79EB	# 
+
+F956 ;	7A1C ;	MA	# ( 稜 → 稜 ) CJK COMPATIBILITY IDEOGRAPH-F956 → CJK UNIFIED IDEOGRAPH-7A1C	# 
+
+2F95A ;	7A4A ;	MA	# ( 穊 → 穊 ) CJK COMPATIBILITY IDEOGRAPH-2F95A → CJK UNIFIED IDEOGRAPH-7A4A	# 
+
+FA54 ;	7A40 ;	MA	# ( 穀 → 穀 ) CJK COMPATIBILITY IDEOGRAPH-FA54 → CJK UNIFIED IDEOGRAPH-7A40	# 
+2F959 ;	7A40 ;	MA	# ( 穀 → 穀 ) CJK COMPATIBILITY IDEOGRAPH-2F959 → CJK UNIFIED IDEOGRAPH-7A40	# 
+
+2F95B ;	7A4F ;	MA	# ( 穏 → 穏 ) CJK COMPATIBILITY IDEOGRAPH-2F95B → CJK UNIFIED IDEOGRAPH-7A4F	# 
+
+2F73 ;	7A74 ;	MA	#* ( ⽳ → 穴 ) KANGXI RADICAL CAVE → CJK UNIFIED IDEOGRAPH-7A74	# 
+
+FA55 ;	7A81 ;	MA	# ( 突 → 突 ) CJK COMPATIBILITY IDEOGRAPH-FA55 → CJK UNIFIED IDEOGRAPH-7A81	# 
+
+2F95C ;	2597C ;	MA	# ( 𥥼 → 𥥼 ) CJK COMPATIBILITY IDEOGRAPH-2F95C → CJK UNIFIED IDEOGRAPH-2597C	# 
+
+FAAC ;	7AB1 ;	MA	# ( 窱 → 窱 ) CJK COMPATIBILITY IDEOGRAPH-FAAC → CJK UNIFIED IDEOGRAPH-7AB1	# 
+
+F9F7 ;	7ACB ;	MA	# ( 立 → 立 ) CJK COMPATIBILITY IDEOGRAPH-F9F7 → CJK UNIFIED IDEOGRAPH-7ACB	# 
+2F74 ;	7ACB ;	MA	#* ( ⽴ → 立 ) KANGXI RADICAL STAND → CJK UNIFIED IDEOGRAPH-7ACB	# 
+
+2EEF ;	7ADC ;	MA	#* ( ⻯ → 竜 ) CJK RADICAL J-SIMPLIFIED DRAGON → CJK UNIFIED IDEOGRAPH-7ADC	# 
+
+2F95D ;	25AA7 ;	MA	# ( 𥪧 → 𥪧 ) CJK COMPATIBILITY IDEOGRAPH-2F95D → CJK UNIFIED IDEOGRAPH-25AA7	# 
+2F95E ;	25AA7 ;	MA	# ( 𥪧 → 𥪧 ) CJK COMPATIBILITY IDEOGRAPH-2F95E → CJK UNIFIED IDEOGRAPH-25AA7	# 
+
+2F95F ;	7AEE ;	MA	# ( 竮 → 竮 ) CJK COMPATIBILITY IDEOGRAPH-2F95F → CJK UNIFIED IDEOGRAPH-7AEE	# 
+
+2F75 ;	7AF9 ;	MA	#* ( ⽵ → 竹 ) KANGXI RADICAL BAMBOO → CJK UNIFIED IDEOGRAPH-7AF9	# 
+
+F9F8 ;	7B20 ;	MA	# ( 笠 → 笠 ) CJK COMPATIBILITY IDEOGRAPH-F9F8 → CJK UNIFIED IDEOGRAPH-7B20	# 
+
+FA56 ;	7BC0 ;	MA	# ( 節 → 節 ) CJK COMPATIBILITY IDEOGRAPH-FA56 → CJK UNIFIED IDEOGRAPH-7BC0	# 
+FAAD ;	7BC0 ;	MA	# ( 節 → 節 ) CJK COMPATIBILITY IDEOGRAPH-FAAD → CJK UNIFIED IDEOGRAPH-7BC0	# 
+
+2F960 ;	4202 ;	MA	# ( 䈂 → 䈂 ) CJK COMPATIBILITY IDEOGRAPH-2F960 → CJK UNIFIED IDEOGRAPH-4202	# 
+
+2F961 ;	25BAB ;	MA	# ( 𥮫 → 𥮫 ) CJK COMPATIBILITY IDEOGRAPH-2F961 → CJK UNIFIED IDEOGRAPH-25BAB	# 
+
+2F962 ;	7BC6 ;	MA	# ( 篆 → 篆 ) CJK COMPATIBILITY IDEOGRAPH-2F962 → CJK UNIFIED IDEOGRAPH-7BC6	# 
+
+2F964 ;	4227 ;	MA	# ( 䈧 → 䈧 ) CJK COMPATIBILITY IDEOGRAPH-2F964 → CJK UNIFIED IDEOGRAPH-4227	# 
+
+2F963 ;	7BC9 ;	MA	# ( 築 → 築 ) CJK COMPATIBILITY IDEOGRAPH-2F963 → CJK UNIFIED IDEOGRAPH-7BC9	# 
+
+2F965 ;	25C80 ;	MA	# ( 𥲀 → 𥲀 ) CJK COMPATIBILITY IDEOGRAPH-2F965 → CJK UNIFIED IDEOGRAPH-25C80	# 
+
+FAD6 ;	25CD0 ;	MA	# ( 𥳐 → 𥳐 ) CJK COMPATIBILITY IDEOGRAPH-FAD6 → CJK UNIFIED IDEOGRAPH-25CD0	# 
+
+F9A6 ;	7C3E ;	MA	# ( 簾 → 簾 ) CJK COMPATIBILITY IDEOGRAPH-F9A6 → CJK UNIFIED IDEOGRAPH-7C3E	# 
+
+F944 ;	7C60 ;	MA	# ( 籠 → 籠 ) CJK COMPATIBILITY IDEOGRAPH-F944 → CJK UNIFIED IDEOGRAPH-7C60	# 
+
+2F76 ;	7C73 ;	MA	#* ( ⽶ → 米 ) KANGXI RADICAL RICE → CJK UNIFIED IDEOGRAPH-7C73	# 
+
+FAAE ;	7C7B ;	MA	# ( 类 → 类 ) CJK COMPATIBILITY IDEOGRAPH-FAAE → CJK UNIFIED IDEOGRAPH-7C7B	# 
+
+F9F9 ;	7C92 ;	MA	# ( 粒 → 粒 ) CJK COMPATIBILITY IDEOGRAPH-F9F9 → CJK UNIFIED IDEOGRAPH-7C92	# 
+
+FA1D ;	7CBE ;	MA	# ( 精 → 精 ) CJK COMPATIBILITY IDEOGRAPH-FA1D → CJK UNIFIED IDEOGRAPH-7CBE	# 
+
+2F966 ;	7CD2 ;	MA	# ( 糒 → 糒 ) CJK COMPATIBILITY IDEOGRAPH-2F966 → CJK UNIFIED IDEOGRAPH-7CD2	# 
+
+FA03 ;	7CD6 ;	MA	# ( 糖 → 糖 ) CJK COMPATIBILITY IDEOGRAPH-FA03 → CJK UNIFIED IDEOGRAPH-7CD6	# 
+
+2F968 ;	7CE8 ;	MA	# ( 糨 → 糨 ) CJK COMPATIBILITY IDEOGRAPH-2F968 → CJK UNIFIED IDEOGRAPH-7CE8	# 
+
+2F967 ;	42A0 ;	MA	# ( 䊠 → 䊠 ) CJK COMPATIBILITY IDEOGRAPH-2F967 → CJK UNIFIED IDEOGRAPH-42A0	# 
+
+2F969 ;	7CE3 ;	MA	# ( 糣 → 糣 ) CJK COMPATIBILITY IDEOGRAPH-2F969 → CJK UNIFIED IDEOGRAPH-7CE3	# 
+
+F97B ;	7CE7 ;	MA	# ( 糧 → 糧 ) CJK COMPATIBILITY IDEOGRAPH-F97B → CJK UNIFIED IDEOGRAPH-7CE7	# 
+
+2F77 ;	7CF8 ;	MA	#* ( ⽷ → 糸 ) KANGXI RADICAL SILK → CJK UNIFIED IDEOGRAPH-7CF8	# 
+
+2EAF ;	7CF9 ;	MA	#* ( ⺯ → 糹 ) CJK RADICAL SILK → CJK UNIFIED IDEOGRAPH-7CF9	# 
+
+2F96B ;	25F86 ;	MA	# ( 𥾆 → 𥾆 ) CJK COMPATIBILITY IDEOGRAPH-2F96B → CJK UNIFIED IDEOGRAPH-25F86	# 
+
+2F96A ;	7D00 ;	MA	# ( 紀 → 紀 ) CJK COMPATIBILITY IDEOGRAPH-2F96A → CJK UNIFIED IDEOGRAPH-7D00	# 
+
+F9CF ;	7D10 ;	MA	# ( 紐 → 紐 ) CJK COMPATIBILITY IDEOGRAPH-F9CF → CJK UNIFIED IDEOGRAPH-7D10	# 
+
+F96A ;	7D22 ;	MA	# ( 索 → 索 ) CJK COMPATIBILITY IDEOGRAPH-F96A → CJK UNIFIED IDEOGRAPH-7D22	# 
+
+F94F ;	7D2F ;	MA	# ( 累 → 累 ) CJK COMPATIBILITY IDEOGRAPH-F94F → CJK UNIFIED IDEOGRAPH-7D2F	# 
+
+7D76 ;	7D55 ;	MA	# ( 絶 → 絕 ) CJK UNIFIED IDEOGRAPH-7D76 → CJK UNIFIED IDEOGRAPH-7D55	# 
+
+2F96C ;	7D63 ;	MA	# ( 絣 → 絣 ) CJK COMPATIBILITY IDEOGRAPH-2F96C → CJK UNIFIED IDEOGRAPH-7D63	# 
+
+FAAF ;	7D5B ;	MA	# ( 絛 → 絛 ) CJK COMPATIBILITY IDEOGRAPH-FAAF → CJK UNIFIED IDEOGRAPH-7D5B	# 
+
+F93D ;	7DA0 ;	MA	# ( 綠 → 綠 ) CJK COMPATIBILITY IDEOGRAPH-F93D → CJK UNIFIED IDEOGRAPH-7DA0	# 
+
+F957 ;	7DBE ;	MA	# ( 綾 → 綾 ) CJK COMPATIBILITY IDEOGRAPH-F957 → CJK UNIFIED IDEOGRAPH-7DBE	# 
+
+2F96E ;	7DC7 ;	MA	# ( 緇 → 緇 ) CJK COMPATIBILITY IDEOGRAPH-2F96E → CJK UNIFIED IDEOGRAPH-7DC7	# 
+
+F996 ;	7DF4 ;	MA	# ( 練 → 練 ) CJK COMPATIBILITY IDEOGRAPH-F996 → CJK UNIFIED IDEOGRAPH-7DF4	# 
+FA57 ;	7DF4 ;	MA	# ( 練 → 練 ) CJK COMPATIBILITY IDEOGRAPH-FA57 → CJK UNIFIED IDEOGRAPH-7DF4	# 
+FAB0 ;	7DF4 ;	MA	# ( 練 → 練 ) CJK COMPATIBILITY IDEOGRAPH-FAB0 → CJK UNIFIED IDEOGRAPH-7DF4	# 
+
+2F96F ;	7E02 ;	MA	# ( 縂 → 縂 ) CJK COMPATIBILITY IDEOGRAPH-2F96F → CJK UNIFIED IDEOGRAPH-7E02	# 
+
+2F96D ;	4301 ;	MA	# ( 䌁 → 䌁 ) CJK COMPATIBILITY IDEOGRAPH-2F96D → CJK UNIFIED IDEOGRAPH-4301	# 
+
+FA58 ;	7E09 ;	MA	# ( 縉 → 縉 ) CJK COMPATIBILITY IDEOGRAPH-FA58 → CJK UNIFIED IDEOGRAPH-7E09	# 
+
+F950 ;	7E37 ;	MA	# ( 縷 → 縷 ) CJK COMPATIBILITY IDEOGRAPH-F950 → CJK UNIFIED IDEOGRAPH-7E37	# 
+
+FA59 ;	7E41 ;	MA	# ( 繁 → 繁 ) CJK COMPATIBILITY IDEOGRAPH-FA59 → CJK UNIFIED IDEOGRAPH-7E41	# 
+
+2F970 ;	7E45 ;	MA	# ( 繅 → 繅 ) CJK COMPATIBILITY IDEOGRAPH-2F970 → CJK UNIFIED IDEOGRAPH-7E45	# 
+
+2F898 ;	261DA ;	MA	# ( 𦇚 → 𦇚 ) CJK COMPATIBILITY IDEOGRAPH-2F898 → CJK UNIFIED IDEOGRAPH-261DA	# 
+
+2F971 ;	4334 ;	MA	# ( 䌴 → 䌴 ) CJK COMPATIBILITY IDEOGRAPH-2F971 → CJK UNIFIED IDEOGRAPH-4334	# 
+
+2F78 ;	7F36 ;	MA	#* ( ⽸ → 缶 ) KANGXI RADICAL JAR → CJK UNIFIED IDEOGRAPH-7F36	# 
+
+2F972 ;	26228 ;	MA	# ( 𦈨 → 𦈨 ) CJK COMPATIBILITY IDEOGRAPH-2F972 → CJK UNIFIED IDEOGRAPH-26228	# 
+
+FAB1 ;	7F3E ;	MA	# ( 缾 → 缾 ) CJK COMPATIBILITY IDEOGRAPH-FAB1 → CJK UNIFIED IDEOGRAPH-7F3E	# 
+
+2F973 ;	26247 ;	MA	# ( 𦉇 → 𦉇 ) CJK COMPATIBILITY IDEOGRAPH-2F973 → CJK UNIFIED IDEOGRAPH-26247	# 
+
+2F79 ;	7F51 ;	MA	#* ( ⽹ → 网 ) KANGXI RADICAL NET → CJK UNIFIED IDEOGRAPH-7F51	# 
+
+2EAB ;	7F52 ;	MA	#* ( ⺫ → 罒 ) CJK RADICAL EYE → CJK UNIFIED IDEOGRAPH-7F52	# 
+2EB2 ;	7F52 ;	MA	#* ( ⺲ → 罒 ) CJK RADICAL NET TWO → CJK UNIFIED IDEOGRAPH-7F52	# 
+
+2EB1 ;	7F53 ;	MA	#* ( ⺱ → 罓 ) CJK RADICAL NET ONE → CJK UNIFIED IDEOGRAPH-7F53	# 
+
+2F974 ;	4359 ;	MA	# ( 䍙 → 䍙 ) CJK COMPATIBILITY IDEOGRAPH-2F974 → CJK UNIFIED IDEOGRAPH-4359	# 
+
+FA5A ;	7F72 ;	MA	# ( 署 → 署 ) CJK COMPATIBILITY IDEOGRAPH-FA5A → CJK UNIFIED IDEOGRAPH-7F72	# 
+
+2F975 ;	262D9 ;	MA	# ( 𦋙 → 𦋙 ) CJK COMPATIBILITY IDEOGRAPH-2F975 → CJK UNIFIED IDEOGRAPH-262D9	# 
+
+F9E6 ;	7F79 ;	MA	# ( 罹 → 罹 ) CJK COMPATIBILITY IDEOGRAPH-F9E6 → CJK UNIFIED IDEOGRAPH-7F79	# 
+
+2F976 ;	7F7A ;	MA	# ( 罺 → 罺 ) CJK COMPATIBILITY IDEOGRAPH-2F976 → CJK UNIFIED IDEOGRAPH-7F7A	# 
+
+F90F ;	7F85 ;	MA	# ( 羅 → 羅 ) CJK COMPATIBILITY IDEOGRAPH-F90F → CJK UNIFIED IDEOGRAPH-7F85	# 
+
+2F977 ;	2633E ;	MA	# ( 𦌾 → 𦌾 ) CJK COMPATIBILITY IDEOGRAPH-2F977 → CJK UNIFIED IDEOGRAPH-2633E	# 
+
+2F7A ;	7F8A ;	MA	#* ( ⽺ → 羊 ) KANGXI RADICAL SHEEP → CJK UNIFIED IDEOGRAPH-7F8A	# 
+
+2F978 ;	7F95 ;	MA	# ( 羕 → 羕 ) CJK COMPATIBILITY IDEOGRAPH-2F978 → CJK UNIFIED IDEOGRAPH-7F95	# 
+
+F9AF ;	7F9A ;	MA	# ( 羚 → 羚 ) CJK COMPATIBILITY IDEOGRAPH-F9AF → CJK UNIFIED IDEOGRAPH-7F9A	# 
+
+FA1E ;	7FBD ;	MA	# ( 羽 → 羽 ) CJK COMPATIBILITY IDEOGRAPH-FA1E → CJK UNIFIED IDEOGRAPH-7FBD	# 
+2F7B ;	7FBD ;	MA	#* ( ⽻ → 羽 ) KANGXI RADICAL FEATHER → CJK UNIFIED IDEOGRAPH-7FBD	# 
+
+2F979 ;	7FFA ;	MA	# ( 翺 → 翺 ) CJK COMPATIBILITY IDEOGRAPH-2F979 → CJK UNIFIED IDEOGRAPH-7FFA	# 
+
+F934 ;	8001 ;	MA	# ( 老 → 老 ) CJK COMPATIBILITY IDEOGRAPH-F934 → CJK UNIFIED IDEOGRAPH-8001	# 
+2F7C ;	8001 ;	MA	#* ( ⽼ → 老 ) KANGXI RADICAL OLD → CJK UNIFIED IDEOGRAPH-8001	# 
+
+2EB9 ;	8002 ;	MA	#* ( ⺹ → 耂 ) CJK RADICAL OLD → CJK UNIFIED IDEOGRAPH-8002	# 
+
+FA5B ;	8005 ;	MA	# ( 者 → 者 ) CJK COMPATIBILITY IDEOGRAPH-FA5B → CJK UNIFIED IDEOGRAPH-8005	# 
+FAB2 ;	8005 ;	MA	# ( 者 → 者 ) CJK COMPATIBILITY IDEOGRAPH-FAB2 → CJK UNIFIED IDEOGRAPH-8005	# 
+2F97A ;	8005 ;	MA	# ( 者 → 者 ) CJK COMPATIBILITY IDEOGRAPH-2F97A → CJK UNIFIED IDEOGRAPH-8005	# 
+
+2F7D ;	800C ;	MA	#* ( ⽽ → 而 ) KANGXI RADICAL AND → CJK UNIFIED IDEOGRAPH-800C	# 
+
+2F97B ;	264DA ;	MA	# ( 𦓚 → 𦓚 ) CJK COMPATIBILITY IDEOGRAPH-2F97B → CJK UNIFIED IDEOGRAPH-264DA	# 
+
+2F7E ;	8012 ;	MA	#* ( ⽾ → 耒 ) KANGXI RADICAL PLOW → CJK UNIFIED IDEOGRAPH-8012	# 
+
+2F97C ;	26523 ;	MA	# ( 𦔣 → 𦔣 ) CJK COMPATIBILITY IDEOGRAPH-2F97C → CJK UNIFIED IDEOGRAPH-26523	# 
+
+2F7F ;	8033 ;	MA	#* ( ⽿ → 耳 ) KANGXI RADICAL EAR → CJK UNIFIED IDEOGRAPH-8033	# 
+
+F9B0 ;	8046 ;	MA	# ( 聆 → 聆 ) CJK COMPATIBILITY IDEOGRAPH-F9B0 → CJK UNIFIED IDEOGRAPH-8046	# 
+
+2F97D ;	8060 ;	MA	# ( 聠 → 聠 ) CJK COMPATIBILITY IDEOGRAPH-2F97D → CJK UNIFIED IDEOGRAPH-8060	# 
+
+2F97E ;	265A8 ;	MA	# ( 𦖨 → 𦖨 ) CJK COMPATIBILITY IDEOGRAPH-2F97E → CJK UNIFIED IDEOGRAPH-265A8	# 
+
+F997 ;	806F ;	MA	# ( 聯 → 聯 ) CJK COMPATIBILITY IDEOGRAPH-F997 → CJK UNIFIED IDEOGRAPH-806F	# 
+
+2F97F ;	8070 ;	MA	# ( 聰 → 聰 ) CJK COMPATIBILITY IDEOGRAPH-2F97F → CJK UNIFIED IDEOGRAPH-8070	# 
+
+F945 ;	807E ;	MA	# ( 聾 → 聾 ) CJK COMPATIBILITY IDEOGRAPH-F945 → CJK UNIFIED IDEOGRAPH-807E	# 
+
+2F80 ;	807F ;	MA	#* ( ⾀ → 聿 ) KANGXI RADICAL BRUSH → CJK UNIFIED IDEOGRAPH-807F	# 
+
+2EBA ;	8080 ;	MA	#* ( ⺺ → 肀 ) CJK RADICAL BRUSH ONE → CJK UNIFIED IDEOGRAPH-8080	# 
+
+2F81 ;	8089 ;	MA	#* ( ⾁ → 肉 ) KANGXI RADICAL MEAT → CJK UNIFIED IDEOGRAPH-8089	# 
+
+F953 ;	808B ;	MA	# ( 肋 → 肋 ) CJK COMPATIBILITY IDEOGRAPH-F953 → CJK UNIFIED IDEOGRAPH-808B	# 
+
+2F8D6 ;	80AD ;	MA	# ( 肭 → 肭 ) CJK COMPATIBILITY IDEOGRAPH-2F8D6 → CJK UNIFIED IDEOGRAPH-80AD	# 
+
+2F982 ;	80B2 ;	MA	# ( 育 → 育 ) CJK COMPATIBILITY IDEOGRAPH-2F982 → CJK UNIFIED IDEOGRAPH-80B2	# 
+
+2F981 ;	43D5 ;	MA	# ( 䏕 → 䏕 ) CJK COMPATIBILITY IDEOGRAPH-2F981 → CJK UNIFIED IDEOGRAPH-43D5	# 
+
+2F8D7 ;	43D9 ;	MA	# ( 䏙 → 䏙 ) CJK COMPATIBILITY IDEOGRAPH-2F8D7 → CJK UNIFIED IDEOGRAPH-43D9	# 
+
+8141 ;	80FC ;	MA	# ( 腁 → 胼 ) CJK UNIFIED IDEOGRAPH-8141 → CJK UNIFIED IDEOGRAPH-80FC	# 
+
+2F983 ;	8103 ;	MA	# ( 脃 → 脃 ) CJK COMPATIBILITY IDEOGRAPH-2F983 → CJK UNIFIED IDEOGRAPH-8103	# 
+
+2F985 ;	813E ;	MA	# ( 脾 → 脾 ) CJK COMPATIBILITY IDEOGRAPH-2F985 → CJK UNIFIED IDEOGRAPH-813E	# 
+
+2F984 ;	440B ;	MA	# ( 䐋 → 䐋 ) CJK COMPATIBILITY IDEOGRAPH-2F984 → CJK UNIFIED IDEOGRAPH-440B	# 
+
+2F987 ;	267A7 ;	MA	# ( 𦞧 → 𦞧 ) CJK COMPATIBILITY IDEOGRAPH-2F987 → CJK UNIFIED IDEOGRAPH-267A7	# 
+
+2F988 ;	267B5 ;	MA	# ( 𦞵 → 𦞵 ) CJK COMPATIBILITY IDEOGRAPH-2F988 → CJK UNIFIED IDEOGRAPH-267B5	# 
+
+6726 ;	4443 ;	MA	# ( 朦 → 䑃 ) CJK UNIFIED IDEOGRAPH-6726 → CJK UNIFIED IDEOGRAPH-4443	# 
+
+F926 ;	81D8 ;	MA	# ( 臘 → 臘 ) CJK COMPATIBILITY IDEOGRAPH-F926 → CJK UNIFIED IDEOGRAPH-81D8	# 
+
+2F82 ;	81E3 ;	MA	#* ( ⾂ → 臣 ) KANGXI RADICAL MINISTER → CJK UNIFIED IDEOGRAPH-81E3	# 
+
+F9F6 ;	81E8 ;	MA	# ( 臨 → 臨 ) CJK COMPATIBILITY IDEOGRAPH-F9F6 → CJK UNIFIED IDEOGRAPH-81E8	# 
+
+2F83 ;	81EA ;	MA	#* ( ⾃ → 自 ) KANGXI RADICAL SELF → CJK UNIFIED IDEOGRAPH-81EA	# 
+
+FA5C ;	81ED ;	MA	# ( 臭 → 臭 ) CJK COMPATIBILITY IDEOGRAPH-FA5C → CJK UNIFIED IDEOGRAPH-81ED	# 
+
+2F84 ;	81F3 ;	MA	#* ( ⾄ → 至 ) KANGXI RADICAL ARRIVE → CJK UNIFIED IDEOGRAPH-81F3	# 
+
+2F85 ;	81FC ;	MA	#* ( ⾅ → 臼 ) KANGXI RADICAL MORTAR → CJK UNIFIED IDEOGRAPH-81FC	# 
+
+2F893 ;	8201 ;	MA	# ( 舁 → 舁 ) CJK COMPATIBILITY IDEOGRAPH-2F893 → CJK UNIFIED IDEOGRAPH-8201	# 
+2F98B ;	8201 ;	MA	# ( 舁 → 舁 ) CJK COMPATIBILITY IDEOGRAPH-2F98B → CJK UNIFIED IDEOGRAPH-8201	# 
+
+2F98C ;	8204 ;	MA	# ( 舄 → 舄 ) CJK COMPATIBILITY IDEOGRAPH-2F98C → CJK UNIFIED IDEOGRAPH-8204	# 
+
+2F86 ;	820C ;	MA	#* ( ⾆ → 舌 ) KANGXI RADICAL TONGUE → CJK UNIFIED IDEOGRAPH-820C	# 
+
+FA6D ;	8218 ;	MA	# ( 舘 → 舘 ) CJK COMPATIBILITY IDEOGRAPH-FA6D → CJK UNIFIED IDEOGRAPH-8218	# 
+
+2F87 ;	821B ;	MA	#* ( ⾇ → 舛 ) KANGXI RADICAL OPPOSE → CJK UNIFIED IDEOGRAPH-821B	# 
+
+2F88 ;	821F ;	MA	#* ( ⾈ → 舟 ) KANGXI RADICAL BOAT → CJK UNIFIED IDEOGRAPH-821F	# 
+
+2F98E ;	446B ;	MA	# ( 䑫 → 䑫 ) CJK COMPATIBILITY IDEOGRAPH-2F98E → CJK UNIFIED IDEOGRAPH-446B	# 
+
+2F89 ;	826E ;	MA	#* ( ⾉ → 艮 ) KANGXI RADICAL STOPPING → CJK UNIFIED IDEOGRAPH-826E	# 
+
+F97C ;	826F ;	MA	# ( 良 → 良 ) CJK COMPATIBILITY IDEOGRAPH-F97C → CJK UNIFIED IDEOGRAPH-826F	# 
+
+2F8A ;	8272 ;	MA	#* ( ⾊ → 色 ) KANGXI RADICAL COLOR → CJK UNIFIED IDEOGRAPH-8272	# 
+
+2F8B ;	8278 ;	MA	#* ( ⾋ → 艸 ) KANGXI RADICAL GRASS → CJK UNIFIED IDEOGRAPH-8278	# 
+
+FA5D ;	8279 ;	MA	# ( 艹 → 艹 ) CJK COMPATIBILITY IDEOGRAPH-FA5D → CJK UNIFIED IDEOGRAPH-8279	# 
+FA5E ;	8279 ;	MA	# ( 艹 → 艹 ) CJK COMPATIBILITY IDEOGRAPH-FA5E → CJK UNIFIED IDEOGRAPH-8279	# 
+2EBE ;	8279 ;	MA	#* ( ⺾ → 艹 ) CJK RADICAL GRASS ONE → CJK UNIFIED IDEOGRAPH-8279	# 
+2EBF ;	8279 ;	MA	#* ( ⺿ → 艹 ) CJK RADICAL GRASS TWO → CJK UNIFIED IDEOGRAPH-8279	# →艹→
+2EC0 ;	8279 ;	MA	#* ( ⻀ → 艹 ) CJK RADICAL GRASS THREE → CJK UNIFIED IDEOGRAPH-8279	# →艹→
+
+2F990 ;	828B ;	MA	# ( 芋 → 芋 ) CJK COMPATIBILITY IDEOGRAPH-2F990 → CJK UNIFIED IDEOGRAPH-828B	# 
+
+2F98F ;	8291 ;	MA	# ( 芑 → 芑 ) CJK COMPATIBILITY IDEOGRAPH-2F98F → CJK UNIFIED IDEOGRAPH-8291	# 
+
+2F991 ;	829D ;	MA	# ( 芝 → 芝 ) CJK COMPATIBILITY IDEOGRAPH-2F991 → CJK UNIFIED IDEOGRAPH-829D	# 
+
+2F993 ;	82B1 ;	MA	# ( 花 → 花 ) CJK COMPATIBILITY IDEOGRAPH-2F993 → CJK UNIFIED IDEOGRAPH-82B1	# 
+
+2F994 ;	82B3 ;	MA	# ( 芳 → 芳 ) CJK COMPATIBILITY IDEOGRAPH-2F994 → CJK UNIFIED IDEOGRAPH-82B3	# 
+
+2F995 ;	82BD ;	MA	# ( 芽 → 芽 ) CJK COMPATIBILITY IDEOGRAPH-2F995 → CJK UNIFIED IDEOGRAPH-82BD	# 
+
+F974 ;	82E5 ;	MA	# ( 若 → 若 ) CJK COMPATIBILITY IDEOGRAPH-F974 → CJK UNIFIED IDEOGRAPH-82E5	# 
+2F998 ;	82E5 ;	MA	# ( 若 → 若 ) CJK COMPATIBILITY IDEOGRAPH-2F998 → CJK UNIFIED IDEOGRAPH-82E5	# 
+
+2F996 ;	82E6 ;	MA	# ( 苦 → 苦 ) CJK COMPATIBILITY IDEOGRAPH-2F996 → CJK UNIFIED IDEOGRAPH-82E6	# 
+
+2F997 ;	26B3C ;	MA	# ( 𦬼 → 𦬼 ) CJK COMPATIBILITY IDEOGRAPH-2F997 → CJK UNIFIED IDEOGRAPH-26B3C	# 
+
+F9FE ;	8336 ;	MA	# ( 茶 → 茶 ) CJK COMPATIBILITY IDEOGRAPH-F9FE → CJK UNIFIED IDEOGRAPH-8336	# 
+
+FAB3 ;	8352 ;	MA	# ( 荒 → 荒 ) CJK COMPATIBILITY IDEOGRAPH-FAB3 → CJK UNIFIED IDEOGRAPH-8352	# 
+
+2F99A ;	8363 ;	MA	# ( 荣 → 荣 ) CJK COMPATIBILITY IDEOGRAPH-2F99A → CJK UNIFIED IDEOGRAPH-8363	# 
+
+2F999 ;	831D ;	MA	# ( 茝 → 茝 ) CJK COMPATIBILITY IDEOGRAPH-2F999 → CJK UNIFIED IDEOGRAPH-831D	# 
+
+2F99C ;	8323 ;	MA	# ( 茣 → 茣 ) CJK COMPATIBILITY IDEOGRAPH-2F99C → CJK UNIFIED IDEOGRAPH-8323	# 
+
+2F99D ;	83BD ;	MA	# ( 莽 → 莽 ) CJK COMPATIBILITY IDEOGRAPH-2F99D → CJK UNIFIED IDEOGRAPH-83BD	# 
+
+2F9A0 ;	8353 ;	MA	# ( 荓 → 荓 ) CJK COMPATIBILITY IDEOGRAPH-2F9A0 → CJK UNIFIED IDEOGRAPH-8353	# 
+
+F93E ;	83C9 ;	MA	# ( 菉 → 菉 ) CJK COMPATIBILITY IDEOGRAPH-F93E → CJK UNIFIED IDEOGRAPH-83C9	# 
+
+2F9A1 ;	83CA ;	MA	# ( 菊 → 菊 ) CJK COMPATIBILITY IDEOGRAPH-2F9A1 → CJK UNIFIED IDEOGRAPH-83CA	# 
+
+2F9A2 ;	83CC ;	MA	# ( 菌 → 菌 ) CJK COMPATIBILITY IDEOGRAPH-2F9A2 → CJK UNIFIED IDEOGRAPH-83CC	# 
+
+2F9A3 ;	83DC ;	MA	# ( 菜 → 菜 ) CJK COMPATIBILITY IDEOGRAPH-2F9A3 → CJK UNIFIED IDEOGRAPH-83DC	# 
+
+2F99E ;	83E7 ;	MA	# ( 菧 → 菧 ) CJK COMPATIBILITY IDEOGRAPH-2F99E → CJK UNIFIED IDEOGRAPH-83E7	# 
+
+FAB4 ;	83EF ;	MA	# ( 華 → 華 ) CJK COMPATIBILITY IDEOGRAPH-FAB4 → CJK UNIFIED IDEOGRAPH-83EF	# 
+
+F958 ;	83F1 ;	MA	# ( 菱 → 菱 ) CJK COMPATIBILITY IDEOGRAPH-F958 → CJK UNIFIED IDEOGRAPH-83F1	# 
+
+FA5F ;	8457 ;	MA	# ( 著 → 著 ) CJK COMPATIBILITY IDEOGRAPH-FA5F → CJK UNIFIED IDEOGRAPH-8457	# 
+2F99F ;	8457 ;	MA	# ( 著 → 著 ) CJK COMPATIBILITY IDEOGRAPH-2F99F → CJK UNIFIED IDEOGRAPH-8457	# 
+
+2F9A4 ;	26C36 ;	MA	# ( 𦰶 → 𦰶 ) CJK COMPATIBILITY IDEOGRAPH-2F9A4 → CJK UNIFIED IDEOGRAPH-26C36	# 
+
+2F99B ;	83AD ;	MA	# ( 莭 → 莭 ) CJK COMPATIBILITY IDEOGRAPH-2F99B → CJK UNIFIED IDEOGRAPH-83AD	# 
+
+F918 ;	843D ;	MA	# ( 落 → 落 ) CJK COMPATIBILITY IDEOGRAPH-F918 → CJK UNIFIED IDEOGRAPH-843D	# 
+
+F96E ;	8449 ;	MA	# ( 葉 → 葉 ) CJK COMPATIBILITY IDEOGRAPH-F96E → CJK UNIFIED IDEOGRAPH-8449	# 
+
+853F ;	848D ;	MA	# ( 蔿 → 蒍 ) CJK UNIFIED IDEOGRAPH-853F → CJK UNIFIED IDEOGRAPH-848D	# 
+
+2F9A6 ;	26CD5 ;	MA	# ( 𦳕 → 𦳕 ) CJK COMPATIBILITY IDEOGRAPH-2F9A6 → CJK UNIFIED IDEOGRAPH-26CD5	# 
+
+2F9A5 ;	26D6B ;	MA	# ( 𦵫 → 𦵫 ) CJK COMPATIBILITY IDEOGRAPH-2F9A5 → CJK UNIFIED IDEOGRAPH-26D6B	# 
+
+F999 ;	84EE ;	MA	# ( 蓮 → 蓮 ) CJK COMPATIBILITY IDEOGRAPH-F999 → CJK UNIFIED IDEOGRAPH-84EE	# 
+
+2F9A8 ;	84F1 ;	MA	# ( 蓱 → 蓱 ) CJK COMPATIBILITY IDEOGRAPH-2F9A8 → CJK UNIFIED IDEOGRAPH-84F1	# 
+
+2F9A9 ;	84F3 ;	MA	# ( 蓳 → 蓳 ) CJK COMPATIBILITY IDEOGRAPH-2F9A9 → CJK UNIFIED IDEOGRAPH-84F3	# 
+
+F9C2 ;	84FC ;	MA	# ( 蓼 → 蓼 ) CJK COMPATIBILITY IDEOGRAPH-F9C2 → CJK UNIFIED IDEOGRAPH-84FC	# 
+
+2F9AA ;	8516 ;	MA	# ( 蔖 → 蔖 ) CJK COMPATIBILITY IDEOGRAPH-2F9AA → CJK UNIFIED IDEOGRAPH-8516	# 
+
+2F9A7 ;	452B ;	MA	# ( 䔫 → 䔫 ) CJK COMPATIBILITY IDEOGRAPH-2F9A7 → CJK UNIFIED IDEOGRAPH-452B	# 
+
+2F9AC ;	8564 ;	MA	# ( 蕤 → 蕤 ) CJK COMPATIBILITY IDEOGRAPH-2F9AC → CJK UNIFIED IDEOGRAPH-8564	# 
+
+2F9AD ;	26F2C ;	MA	# ( 𦼬 → 𦼬 ) CJK COMPATIBILITY IDEOGRAPH-2F9AD → CJK UNIFIED IDEOGRAPH-26F2C	# 
+
+F923 ;	85CD ;	MA	# ( 藍 → 藍 ) CJK COMPATIBILITY IDEOGRAPH-F923 → CJK UNIFIED IDEOGRAPH-85CD	# 
+
+2F9AE ;	455D ;	MA	# ( 䕝 → 䕝 ) CJK COMPATIBILITY IDEOGRAPH-2F9AE → CJK UNIFIED IDEOGRAPH-455D	# 
+
+2F9B0 ;	26FB1 ;	MA	# ( 𦾱 → 𦾱 ) CJK COMPATIBILITY IDEOGRAPH-2F9B0 → CJK UNIFIED IDEOGRAPH-26FB1	# 
+
+2F9AF ;	4561 ;	MA	# ( 䕡 → 䕡 ) CJK COMPATIBILITY IDEOGRAPH-2F9AF → CJK UNIFIED IDEOGRAPH-4561	# 
+
+F9F0 ;	85FA ;	MA	# ( 藺 → 藺 ) CJK COMPATIBILITY IDEOGRAPH-F9F0 → CJK UNIFIED IDEOGRAPH-85FA	# 
+
+F935 ;	8606 ;	MA	# ( 蘆 → 蘆 ) CJK COMPATIBILITY IDEOGRAPH-F935 → CJK UNIFIED IDEOGRAPH-8606	# 
+
+2F9B2 ;	456B ;	MA	# ( 䕫 → 䕫 ) CJK COMPATIBILITY IDEOGRAPH-2F9B2 → CJK UNIFIED IDEOGRAPH-456B	# 
+
+FA20 ;	8612 ;	MA	# ( 蘒 → 蘒 ) CJK COMPATIBILITY IDEOGRAPH-FA20 → CJK UNIFIED IDEOGRAPH-8612	# 
+
+F91F ;	862D ;	MA	# ( 蘭 → 蘭 ) CJK COMPATIBILITY IDEOGRAPH-F91F → CJK UNIFIED IDEOGRAPH-862D	# 
+
+2F9B1 ;	270D2 ;	MA	# ( 𧃒 → 𧃒 ) CJK COMPATIBILITY IDEOGRAPH-2F9B1 → CJK UNIFIED IDEOGRAPH-270D2	# 
+
+8641 ;	8637 ;	MA	# ( 虁 → 蘷 ) CJK UNIFIED IDEOGRAPH-8641 → CJK UNIFIED IDEOGRAPH-8637	# 
+
+F910 ;	863F ;	MA	# ( 蘿 → 蘿 ) CJK COMPATIBILITY IDEOGRAPH-F910 → CJK UNIFIED IDEOGRAPH-863F	# 
+
+2F8C ;	864D ;	MA	#* ( ⾌ → 虍 ) KANGXI RADICAL TIGER → CJK UNIFIED IDEOGRAPH-864D	# 
+
+2EC1 ;	864E ;	MA	#* ( ⻁ → 虎 ) CJK RADICAL TIGER → CJK UNIFIED IDEOGRAPH-864E	# 
+
+2F9B3 ;	8650 ;	MA	# ( 虐 → 虐 ) CJK COMPATIBILITY IDEOGRAPH-2F9B3 → CJK UNIFIED IDEOGRAPH-8650	# 
+
+F936 ;	865C ;	MA	# ( 虜 → 虜 ) CJK COMPATIBILITY IDEOGRAPH-F936 → CJK UNIFIED IDEOGRAPH-865C	# 
+2F9B4 ;	865C ;	MA	# ( 虜 → 虜 ) CJK COMPATIBILITY IDEOGRAPH-2F9B4 → CJK UNIFIED IDEOGRAPH-865C	# 
+
+2F9B5 ;	8667 ;	MA	# ( 虧 → 虧 ) CJK COMPATIBILITY IDEOGRAPH-2F9B5 → CJK UNIFIED IDEOGRAPH-8667	# 
+
+2F9B6 ;	8669 ;	MA	# ( 虩 → 虩 ) CJK COMPATIBILITY IDEOGRAPH-2F9B6 → CJK UNIFIED IDEOGRAPH-8669	# 
+
+2F8D ;	866B ;	MA	#* ( ⾍ → 虫 ) KANGXI RADICAL INSECT → CJK UNIFIED IDEOGRAPH-866B	# 
+
+2F9B7 ;	86A9 ;	MA	# ( 蚩 → 蚩 ) CJK COMPATIBILITY IDEOGRAPH-2F9B7 → CJK UNIFIED IDEOGRAPH-86A9	# 
+
+2F9B8 ;	8688 ;	MA	# ( 蚈 → 蚈 ) CJK COMPATIBILITY IDEOGRAPH-2F9B8 → CJK UNIFIED IDEOGRAPH-8688	# 
+
+2F9BA ;	86E2 ;	MA	# ( 蛢 → 蛢 ) CJK COMPATIBILITY IDEOGRAPH-2F9BA → CJK UNIFIED IDEOGRAPH-86E2	# 
+
+2F9B9 ;	870E ;	MA	# ( 蜎 → 蜎 ) CJK COMPATIBILITY IDEOGRAPH-2F9B9 → CJK UNIFIED IDEOGRAPH-870E	# 
+
+2F9BC ;	8728 ;	MA	# ( 蜨 → 蜨 ) CJK COMPATIBILITY IDEOGRAPH-2F9BC → CJK UNIFIED IDEOGRAPH-8728	# 
+
+2F9BD ;	876B ;	MA	# ( 蝫 → 蝫 ) CJK COMPATIBILITY IDEOGRAPH-2F9BD → CJK UNIFIED IDEOGRAPH-876B	# 
+
+2F9C0 ;	87E1 ;	MA	# ( 蟡 → 蟡 ) CJK COMPATIBILITY IDEOGRAPH-2F9C0 → CJK UNIFIED IDEOGRAPH-87E1	# 
+
+FAB5 ;	8779 ;	MA	# ( 蝹 → 蝹 ) CJK COMPATIBILITY IDEOGRAPH-FAB5 → CJK UNIFIED IDEOGRAPH-8779	# 
+2F9BB ;	8779 ;	MA	# ( 蝹 → 蝹 ) CJK COMPATIBILITY IDEOGRAPH-2F9BB → CJK UNIFIED IDEOGRAPH-8779	# 
+
+2F9BE ;	8786 ;	MA	# ( 螆 → 螆 ) CJK COMPATIBILITY IDEOGRAPH-2F9BE → CJK UNIFIED IDEOGRAPH-8786	# 
+
+2F9BF ;	45D7 ;	MA	# ( 䗗 → 䗗 ) CJK COMPATIBILITY IDEOGRAPH-2F9BF → CJK UNIFIED IDEOGRAPH-45D7	# 
+
+2F9AB ;	273CA ;	MA	# ( 𧏊 → 𧏊 ) CJK COMPATIBILITY IDEOGRAPH-2F9AB → CJK UNIFIED IDEOGRAPH-273CA	# 
+
+F911 ;	87BA ;	MA	# ( 螺 → 螺 ) CJK COMPATIBILITY IDEOGRAPH-F911 → CJK UNIFIED IDEOGRAPH-87BA	# 
+
+2F9C1 ;	8801 ;	MA	# ( 蠁 → 蠁 ) CJK COMPATIBILITY IDEOGRAPH-2F9C1 → CJK UNIFIED IDEOGRAPH-8801	# 
+
+2F9C2 ;	45F9 ;	MA	# ( 䗹 → 䗹 ) CJK COMPATIBILITY IDEOGRAPH-2F9C2 → CJK UNIFIED IDEOGRAPH-45F9	# 
+
+F927 ;	881F ;	MA	# ( 蠟 → 蠟 ) CJK COMPATIBILITY IDEOGRAPH-F927 → CJK UNIFIED IDEOGRAPH-881F	# 
+
+2F8E ;	8840 ;	MA	#* ( ⾎ → 血 ) KANGXI RADICAL BLOOD → CJK UNIFIED IDEOGRAPH-8840	# 
+
+FA08 ;	884C ;	MA	# ( 行 → 行 ) CJK COMPATIBILITY IDEOGRAPH-FA08 → CJK UNIFIED IDEOGRAPH-884C	# 
+2F8F ;	884C ;	MA	#* ( ⾏ → 行 ) KANGXI RADICAL WALK ENCLOSURE → CJK UNIFIED IDEOGRAPH-884C	# 
+
+2F9C3 ;	8860 ;	MA	# ( 衠 → 衠 ) CJK COMPATIBILITY IDEOGRAPH-2F9C3 → CJK UNIFIED IDEOGRAPH-8860	# 
+
+2F9C4 ;	8863 ;	MA	# ( 衣 → 衣 ) CJK COMPATIBILITY IDEOGRAPH-2F9C4 → CJK UNIFIED IDEOGRAPH-8863	# 
+2F90 ;	8863 ;	MA	#* ( ⾐ → 衣 ) KANGXI RADICAL CLOTHES → CJK UNIFIED IDEOGRAPH-8863	# 
+
+2EC2 ;	8864 ;	MA	#* ( ⻂ → 衤 ) CJK RADICAL CLOTHES → CJK UNIFIED IDEOGRAPH-8864	# 
+
+F9A0 ;	88C2 ;	MA	# ( 裂 → 裂 ) CJK COMPATIBILITY IDEOGRAPH-F9A0 → CJK UNIFIED IDEOGRAPH-88C2	# 
+
+2F9C5 ;	27667 ;	MA	# ( 𧙧 → 𧙧 ) CJK COMPATIBILITY IDEOGRAPH-2F9C5 → CJK UNIFIED IDEOGRAPH-27667	# 
+
+F9E7 ;	88CF ;	MA	# ( 裏 → 裏 ) CJK COMPATIBILITY IDEOGRAPH-F9E7 → CJK UNIFIED IDEOGRAPH-88CF	# 
+
+2F9C6 ;	88D7 ;	MA	# ( 裗 → 裗 ) CJK COMPATIBILITY IDEOGRAPH-2F9C6 → CJK UNIFIED IDEOGRAPH-88D7	# 
+
+2F9C7 ;	88DE ;	MA	# ( 裞 → 裞 ) CJK COMPATIBILITY IDEOGRAPH-2F9C7 → CJK UNIFIED IDEOGRAPH-88DE	# 
+
+F9E8 ;	88E1 ;	MA	# ( 裡 → 裡 ) CJK COMPATIBILITY IDEOGRAPH-F9E8 → CJK UNIFIED IDEOGRAPH-88E1	# 
+
+F912 ;	88F8 ;	MA	# ( 裸 → 裸 ) CJK COMPATIBILITY IDEOGRAPH-F912 → CJK UNIFIED IDEOGRAPH-88F8	# 
+
+2F9C9 ;	88FA ;	MA	# ( 裺 → 裺 ) CJK COMPATIBILITY IDEOGRAPH-2F9C9 → CJK UNIFIED IDEOGRAPH-88FA	# 
+
+2F9C8 ;	4635 ;	MA	# ( 䘵 → 䘵 ) CJK COMPATIBILITY IDEOGRAPH-2F9C8 → CJK UNIFIED IDEOGRAPH-4635	# 
+
+FA60 ;	8910 ;	MA	# ( 褐 → 褐 ) CJK COMPATIBILITY IDEOGRAPH-FA60 → CJK UNIFIED IDEOGRAPH-8910	# 
+
+FAB6 ;	8941 ;	MA	# ( 襁 → 襁 ) CJK COMPATIBILITY IDEOGRAPH-FAB6 → CJK UNIFIED IDEOGRAPH-8941	# 
+
+F924 ;	8964 ;	MA	# ( 襤 → 襤 ) CJK COMPATIBILITY IDEOGRAPH-F924 → CJK UNIFIED IDEOGRAPH-8964	# 
+
+2F91 ;	897E ;	MA	#* ( ⾑ → 襾 ) KANGXI RADICAL WEST → CJK UNIFIED IDEOGRAPH-897E	# 
+
+2EC4 ;	897F ;	MA	#* ( ⻄ → 西 ) CJK RADICAL WEST TWO → CJK UNIFIED IDEOGRAPH-897F	# 
+
+2EC3 ;	8980 ;	MA	#* ( ⻃ → 覀 ) CJK RADICAL WEST ONE → CJK UNIFIED IDEOGRAPH-8980	# 
+
+FAB7 ;	8986 ;	MA	# ( 覆 → 覆 ) CJK COMPATIBILITY IDEOGRAPH-FAB7 → CJK UNIFIED IDEOGRAPH-8986	# 
+
+FA0A ;	898B ;	MA	# ( 見 → 見 ) CJK COMPATIBILITY IDEOGRAPH-FA0A → CJK UNIFIED IDEOGRAPH-898B	# 
+2F92 ;	898B ;	MA	#* ( ⾒ → 見 ) KANGXI RADICAL SEE → CJK UNIFIED IDEOGRAPH-898B	# 
+
+2F9CB ;	278AE ;	MA	# ( 𧢮 → 𧢮 ) CJK COMPATIBILITY IDEOGRAPH-2F9CB → CJK UNIFIED IDEOGRAPH-278AE	# 
+
+2EC5 ;	89C1 ;	MA	#* ( ⻅ → 见 ) CJK RADICAL C-SIMPLIFIED SEE → CJK UNIFIED IDEOGRAPH-89C1	# 
+
+2F93 ;	89D2 ;	MA	#* ( ⾓ → 角 ) KANGXI RADICAL HORN → CJK UNIFIED IDEOGRAPH-89D2	# 
+
+2F94 ;	8A00 ;	MA	#* ( ⾔ → 言 ) KANGXI RADICAL SPEECH → CJK UNIFIED IDEOGRAPH-8A00	# 
+
+2F9CC ;	27966 ;	MA	# ( 𧥦 → 𧥦 ) CJK COMPATIBILITY IDEOGRAPH-2F9CC → CJK UNIFIED IDEOGRAPH-27966	# 
+
+8A7D ;	8A2E ;	MA	# ( 詽 → 訮 ) CJK UNIFIED IDEOGRAPH-8A7D → CJK UNIFIED IDEOGRAPH-8A2E	# 
+
+8A1E ;	46B6 ;	MA	# ( 訞 → 䚶 ) CJK UNIFIED IDEOGRAPH-8A1E → CJK UNIFIED IDEOGRAPH-46B6	# 
+
+2F9CD ;	46BE ;	MA	# ( 䚾 → 䚾 ) CJK COMPATIBILITY IDEOGRAPH-2F9CD → CJK UNIFIED IDEOGRAPH-46BE	# 
+
+2F9CE ;	46C7 ;	MA	# ( 䛇 → 䛇 ) CJK COMPATIBILITY IDEOGRAPH-2F9CE → CJK UNIFIED IDEOGRAPH-46C7	# 
+
+2F9CF ;	8AA0 ;	MA	# ( 誠 → 誠 ) CJK COMPATIBILITY IDEOGRAPH-2F9CF → CJK UNIFIED IDEOGRAPH-8AA0	# 
+
+F96F ;	8AAA ;	MA	# ( 說 → 說 ) CJK COMPATIBILITY IDEOGRAPH-F96F → CJK UNIFIED IDEOGRAPH-8AAA	# 
+F9A1 ;	8AAA ;	MA	# ( 說 → 說 ) CJK COMPATIBILITY IDEOGRAPH-F9A1 → CJK UNIFIED IDEOGRAPH-8AAA	# 
+
+FAB9 ;	8ABF ;	MA	# ( 調 → 調 ) CJK COMPATIBILITY IDEOGRAPH-FAB9 → CJK UNIFIED IDEOGRAPH-8ABF	# 
+
+FABB ;	8ACB ;	MA	# ( 請 → 請 ) CJK COMPATIBILITY IDEOGRAPH-FABB → CJK UNIFIED IDEOGRAPH-8ACB	# 
+
+F97D ;	8AD2 ;	MA	# ( 諒 → 諒 ) CJK COMPATIBILITY IDEOGRAPH-F97D → CJK UNIFIED IDEOGRAPH-8AD2	# 
+
+F941 ;	8AD6 ;	MA	# ( 論 → 論 ) CJK COMPATIBILITY IDEOGRAPH-F941 → CJK UNIFIED IDEOGRAPH-8AD6	# 
+
+FABE ;	8AED ;	MA	# ( 諭 → 諭 ) CJK COMPATIBILITY IDEOGRAPH-FABE → CJK UNIFIED IDEOGRAPH-8AED	# 
+2F9D0 ;	8AED ;	MA	# ( 諭 → 諭 ) CJK COMPATIBILITY IDEOGRAPH-2F9D0 → CJK UNIFIED IDEOGRAPH-8AED	# 
+
+FA22 ;	8AF8 ;	MA	# ( 諸 → 諸 ) CJK COMPATIBILITY IDEOGRAPH-FA22 → CJK UNIFIED IDEOGRAPH-8AF8	# 
+FABA ;	8AF8 ;	MA	# ( 諸 → 諸 ) CJK COMPATIBILITY IDEOGRAPH-FABA → CJK UNIFIED IDEOGRAPH-8AF8	# 
+
+F95D ;	8AFE ;	MA	# ( 諾 → 諾 ) CJK COMPATIBILITY IDEOGRAPH-F95D → CJK UNIFIED IDEOGRAPH-8AFE	# 
+FABD ;	8AFE ;	MA	# ( 諾 → 諾 ) CJK COMPATIBILITY IDEOGRAPH-FABD → CJK UNIFIED IDEOGRAPH-8AFE	# 
+
+FA62 ;	8B01 ;	MA	# ( 謁 → 謁 ) CJK COMPATIBILITY IDEOGRAPH-FA62 → CJK UNIFIED IDEOGRAPH-8B01	# 
+FABC ;	8B01 ;	MA	# ( 謁 → 謁 ) CJK COMPATIBILITY IDEOGRAPH-FABC → CJK UNIFIED IDEOGRAPH-8B01	# 
+
+FA63 ;	8B39 ;	MA	# ( 謹 → 謹 ) CJK COMPATIBILITY IDEOGRAPH-FA63 → CJK UNIFIED IDEOGRAPH-8B39	# 
+FABF ;	8B39 ;	MA	# ( 謹 → 謹 ) CJK COMPATIBILITY IDEOGRAPH-FABF → CJK UNIFIED IDEOGRAPH-8B39	# 
+
+F9FC ;	8B58 ;	MA	# ( 識 → 識 ) CJK COMPATIBILITY IDEOGRAPH-F9FC → CJK UNIFIED IDEOGRAPH-8B58	# 
+
+F95A ;	8B80 ;	MA	# ( 讀 → 讀 ) CJK COMPATIBILITY IDEOGRAPH-F95A → CJK UNIFIED IDEOGRAPH-8B80	# 
+
+8B8F ;	8B86 ;	MA	# ( 讏 → 讆 ) CJK UNIFIED IDEOGRAPH-8B8F → CJK UNIFIED IDEOGRAPH-8B86	# 
+
+FAC0 ;	8B8A ;	MA	# ( 變 → 變 ) CJK COMPATIBILITY IDEOGRAPH-FAC0 → CJK UNIFIED IDEOGRAPH-8B8A	# 
+2F9D1 ;	8B8A ;	MA	# ( 變 → 變 ) CJK COMPATIBILITY IDEOGRAPH-2F9D1 → CJK UNIFIED IDEOGRAPH-8B8A	# 
+
+2EC8 ;	8BA0 ;	MA	#* ( ⻈ → 讠 ) CJK RADICAL C-SIMPLIFIED SPEECH → CJK UNIFIED IDEOGRAPH-8BA0	# 
+
+2F95 ;	8C37 ;	MA	#* ( ⾕ → 谷 ) KANGXI RADICAL VALLEY → CJK UNIFIED IDEOGRAPH-8C37	# 
+
+2F96 ;	8C46 ;	MA	#* ( ⾖ → 豆 ) KANGXI RADICAL BEAN → CJK UNIFIED IDEOGRAPH-8C46	# 
+
+F900 ;	8C48 ;	MA	# ( 豈 → 豈 ) CJK COMPATIBILITY IDEOGRAPH-F900 → CJK UNIFIED IDEOGRAPH-8C48	# 
+
+2F9D2 ;	8C55 ;	MA	# ( 豕 → 豕 ) CJK COMPATIBILITY IDEOGRAPH-2F9D2 → CJK UNIFIED IDEOGRAPH-8C55	# 
+2F97 ;	8C55 ;	MA	#* ( ⾗ → 豕 ) KANGXI RADICAL PIG → CJK UNIFIED IDEOGRAPH-8C55	# 
+
+8C63 ;	8C5C ;	MA	# ( 豣 → 豜 ) CJK UNIFIED IDEOGRAPH-8C63 → CJK UNIFIED IDEOGRAPH-8C5C	# 
+
+2F98 ;	8C78 ;	MA	#* ( ⾘ → 豸 ) KANGXI RADICAL BADGER → CJK UNIFIED IDEOGRAPH-8C78	# 
+
+2F9D3 ;	27CA8 ;	MA	# ( 𧲨 → 𧲨 ) CJK COMPATIBILITY IDEOGRAPH-2F9D3 → CJK UNIFIED IDEOGRAPH-27CA8	# 
+
+2F99 ;	8C9D ;	MA	#* ( ⾙ → 貝 ) KANGXI RADICAL SHELL → CJK UNIFIED IDEOGRAPH-8C9D	# 
+
+2F9D4 ;	8CAB ;	MA	# ( 貫 → 貫 ) CJK COMPATIBILITY IDEOGRAPH-2F9D4 → CJK UNIFIED IDEOGRAPH-8CAB	# 
+
+2F9D5 ;	8CC1 ;	MA	# ( 賁 → 賁 ) CJK COMPATIBILITY IDEOGRAPH-2F9D5 → CJK UNIFIED IDEOGRAPH-8CC1	# 
+
+F948 ;	8CC2 ;	MA	# ( 賂 → 賂 ) CJK COMPATIBILITY IDEOGRAPH-F948 → CJK UNIFIED IDEOGRAPH-8CC2	# 
+
+F903 ;	8CC8 ;	MA	# ( 賈 → 賈 ) CJK COMPATIBILITY IDEOGRAPH-F903 → CJK UNIFIED IDEOGRAPH-8CC8	# 
+
+FA64 ;	8CD3 ;	MA	# ( 賓 → 賓 ) CJK COMPATIBILITY IDEOGRAPH-FA64 → CJK UNIFIED IDEOGRAPH-8CD3	# 
+
+FA65 ;	8D08 ;	MA	# ( 贈 → 贈 ) CJK COMPATIBILITY IDEOGRAPH-FA65 → CJK UNIFIED IDEOGRAPH-8D08	# 
+FAC1 ;	8D08 ;	MA	# ( 贈 → 贈 ) CJK COMPATIBILITY IDEOGRAPH-FAC1 → CJK UNIFIED IDEOGRAPH-8D08	# 
+
+2F9D6 ;	8D1B ;	MA	# ( 贛 → 贛 ) CJK COMPATIBILITY IDEOGRAPH-2F9D6 → CJK UNIFIED IDEOGRAPH-8D1B	# 
+
+2EC9 ;	8D1D ;	MA	#* ( ⻉ → 贝 ) CJK RADICAL C-SIMPLIFIED SHELL → CJK UNIFIED IDEOGRAPH-8D1D	# 
+
+2F9A ;	8D64 ;	MA	#* ( ⾚ → 赤 ) KANGXI RADICAL RED → CJK UNIFIED IDEOGRAPH-8D64	# 
+
+2F9B ;	8D70 ;	MA	#* ( ⾛ → 走 ) KANGXI RADICAL RUN → CJK UNIFIED IDEOGRAPH-8D70	# 
+
+2F9D7 ;	8D77 ;	MA	# ( 起 → 起 ) CJK COMPATIBILITY IDEOGRAPH-2F9D7 → CJK UNIFIED IDEOGRAPH-8D77	# 
+
+8D86 ;	8D7F ;	MA	# ( 趆 → 赿 ) CJK UNIFIED IDEOGRAPH-8D86 → CJK UNIFIED IDEOGRAPH-8D7F	# 
+
+FAD7 ;	27ED3 ;	MA	# ( 𧻓 → 𧻓 ) CJK COMPATIBILITY IDEOGRAPH-FAD7 → CJK UNIFIED IDEOGRAPH-27ED3	# 
+
+2F9D8 ;	27F2F ;	MA	# ( 𧼯 → 𧼯 ) CJK COMPATIBILITY IDEOGRAPH-2F9D8 → CJK UNIFIED IDEOGRAPH-27F2F	# 
+
+2F9C ;	8DB3 ;	MA	#* ( ⾜ → 足 ) KANGXI RADICAL FOOT → CJK UNIFIED IDEOGRAPH-8DB3	# 
+
+2F9DA ;	8DCB ;	MA	# ( 跋 → 跋 ) CJK COMPATIBILITY IDEOGRAPH-2F9DA → CJK UNIFIED IDEOGRAPH-8DCB	# 
+
+2F9DB ;	8DBC ;	MA	# ( 趼 → 趼 ) CJK COMPATIBILITY IDEOGRAPH-2F9DB → CJK UNIFIED IDEOGRAPH-8DBC	# 
+
+8DFA ;	8DE5 ;	MA	# ( 跺 → 跥 ) CJK UNIFIED IDEOGRAPH-8DFA → CJK UNIFIED IDEOGRAPH-8DE5	# 
+
+F937 ;	8DEF ;	MA	# ( 路 → 路 ) CJK COMPATIBILITY IDEOGRAPH-F937 → CJK UNIFIED IDEOGRAPH-8DEF	# 
+
+2F9DC ;	8DF0 ;	MA	# ( 跰 → 跰 ) CJK COMPATIBILITY IDEOGRAPH-2F9DC → CJK UNIFIED IDEOGRAPH-8DF0	# 
+
+8E9B ;	8E97 ;	MA	# ( 躛 → 躗 ) CJK UNIFIED IDEOGRAPH-8E9B → CJK UNIFIED IDEOGRAPH-8E97	# 
+
+2F9D ;	8EAB ;	MA	#* ( ⾝ → 身 ) KANGXI RADICAL BODY → CJK UNIFIED IDEOGRAPH-8EAB	# 
+
+F902 ;	8ECA ;	MA	# ( 車 → 車 ) CJK COMPATIBILITY IDEOGRAPH-F902 → CJK UNIFIED IDEOGRAPH-8ECA	# 
+2F9E ;	8ECA ;	MA	#* ( ⾞ → 車 ) KANGXI RADICAL CART → CJK UNIFIED IDEOGRAPH-8ECA	# 
+
+2F9DE ;	8ED4 ;	MA	# ( 軔 → 軔 ) CJK COMPATIBILITY IDEOGRAPH-2F9DE → CJK UNIFIED IDEOGRAPH-8ED4	# 
+
+8F27 ;	8EFF ;	MA	# ( 輧 → 軿 ) CJK UNIFIED IDEOGRAPH-8F27 → CJK UNIFIED IDEOGRAPH-8EFF	# 
+
+F998 ;	8F26 ;	MA	# ( 輦 → 輦 ) CJK COMPATIBILITY IDEOGRAPH-F998 → CJK UNIFIED IDEOGRAPH-8F26	# 
+
+F9D7 ;	8F2A ;	MA	# ( 輪 → 輪 ) CJK COMPATIBILITY IDEOGRAPH-F9D7 → CJK UNIFIED IDEOGRAPH-8F2A	# 
+
+FAC2 ;	8F38 ;	MA	# ( 輸 → 輸 ) CJK COMPATIBILITY IDEOGRAPH-FAC2 → CJK UNIFIED IDEOGRAPH-8F38	# 
+2F9DF ;	8F38 ;	MA	# ( 輸 → 輸 ) CJK COMPATIBILITY IDEOGRAPH-2F9DF → CJK UNIFIED IDEOGRAPH-8F38	# 
+
+FA07 ;	8F3B ;	MA	# ( 輻 → 輻 ) CJK COMPATIBILITY IDEOGRAPH-FA07 → CJK UNIFIED IDEOGRAPH-8F3B	# 
+
+F98D ;	8F62 ;	MA	# ( 轢 → 轢 ) CJK COMPATIBILITY IDEOGRAPH-F98D → CJK UNIFIED IDEOGRAPH-8F62	# 
+
+2ECB ;	8F66 ;	MA	#* ( ⻋ → 车 ) CJK RADICAL C-SIMPLIFIED CART → CJK UNIFIED IDEOGRAPH-8F66	# 
+
+2F9F ;	8F9B ;	MA	#* ( ⾟ → 辛 ) KANGXI RADICAL BITTER → CJK UNIFIED IDEOGRAPH-8F9B	# 
+
+2F98D ;	8F9E ;	MA	# ( 辞 → 辞 ) CJK COMPATIBILITY IDEOGRAPH-2F98D → CJK UNIFIED IDEOGRAPH-8F9E	# 
+
+F971 ;	8FB0 ;	MA	# ( 辰 → 辰 ) CJK COMPATIBILITY IDEOGRAPH-F971 → CJK UNIFIED IDEOGRAPH-8FB0	# 
+2FA0 ;	8FB0 ;	MA	#* ( ⾠ → 辰 ) KANGXI RADICAL MORNING → CJK UNIFIED IDEOGRAPH-8FB0	# 
+
+2FA1 ;	8FB5 ;	MA	#* ( ⾡ → 辵 ) KANGXI RADICAL WALK → CJK UNIFIED IDEOGRAPH-8FB5	# 
+
+FA66 ;	8FB6 ;	MA	# ( 辶 → 辶 ) CJK COMPATIBILITY IDEOGRAPH-FA66 → CJK UNIFIED IDEOGRAPH-8FB6	# 
+2ECC ;	8FB6 ;	MA	#* ( ⻌ → 辶 ) CJK RADICAL SIMPLIFIED WALK → CJK UNIFIED IDEOGRAPH-8FB6	# 
+2ECD ;	8FB6 ;	MA	#* ( ⻍ → 辶 ) CJK RADICAL WALK ONE → CJK UNIFIED IDEOGRAPH-8FB6	# 
+
+2F881 ;	5DE1 ;	MA	# ( 巡 → 巡 ) CJK COMPATIBILITY IDEOGRAPH-2F881 → CJK UNIFIED IDEOGRAPH-5DE1	# 
+
+F99A ;	9023 ;	MA	# ( 連 → 連 ) CJK COMPATIBILITY IDEOGRAPH-F99A → CJK UNIFIED IDEOGRAPH-9023	# 
+
+FA25 ;	9038 ;	MA	# ( 逸 → 逸 ) CJK COMPATIBILITY IDEOGRAPH-FA25 → CJK UNIFIED IDEOGRAPH-9038	# 
+FA67 ;	9038 ;	MA	# ( 逸 → 逸 ) CJK COMPATIBILITY IDEOGRAPH-FA67 → CJK UNIFIED IDEOGRAPH-9038	# 
+
+FAC3 ;	9072 ;	MA	# ( 遲 → 遲 ) CJK COMPATIBILITY IDEOGRAPH-FAC3 → CJK UNIFIED IDEOGRAPH-9072	# 
+
+F9C3 ;	907C ;	MA	# ( 遼 → 遼 ) CJK COMPATIBILITY IDEOGRAPH-F9C3 → CJK UNIFIED IDEOGRAPH-907C	# 
+
+2F9E0 ;	285D2 ;	MA	# ( 𨗒 → 𨗒 ) CJK COMPATIBILITY IDEOGRAPH-2F9E0 → CJK UNIFIED IDEOGRAPH-285D2	# 
+
+2F9E1 ;	285ED ;	MA	# ( 𨗭 → 𨗭 ) CJK COMPATIBILITY IDEOGRAPH-2F9E1 → CJK UNIFIED IDEOGRAPH-285ED	# 
+
+F913 ;	908F ;	MA	# ( 邏 → 邏 ) CJK COMPATIBILITY IDEOGRAPH-F913 → CJK UNIFIED IDEOGRAPH-908F	# 
+
+2FA2 ;	9091 ;	MA	#* ( ⾢ → 邑 ) KANGXI RADICAL CITY → CJK UNIFIED IDEOGRAPH-9091	# 
+
+2F9E2 ;	9094 ;	MA	# ( 邔 → 邔 ) CJK COMPATIBILITY IDEOGRAPH-2F9E2 → CJK UNIFIED IDEOGRAPH-9094	# 
+
+F92C ;	90CE ;	MA	# ( 郎 → 郎 ) CJK COMPATIBILITY IDEOGRAPH-F92C → CJK UNIFIED IDEOGRAPH-90CE	# 
+90DE ;	90CE ;	MA	# ( 郞 → 郎 ) CJK UNIFIED IDEOGRAPH-90DE → CJK UNIFIED IDEOGRAPH-90CE	# →郎→
+FA2E ;	90CE ;	MA	# ( 郞 → 郎 ) CJK COMPATIBILITY IDEOGRAPH-FA2E → CJK UNIFIED IDEOGRAPH-90CE	# →郞→→郎→
+
+2F9E3 ;	90F1 ;	MA	# ( 郱 → 郱 ) CJK COMPATIBILITY IDEOGRAPH-2F9E3 → CJK UNIFIED IDEOGRAPH-90F1	# 
+
+FA26 ;	90FD ;	MA	# ( 都 → 都 ) CJK COMPATIBILITY IDEOGRAPH-FA26 → CJK UNIFIED IDEOGRAPH-90FD	# 
+
+2F9E5 ;	2872E ;	MA	# ( 𨜮 → 𨜮 ) CJK COMPATIBILITY IDEOGRAPH-2F9E5 → CJK UNIFIED IDEOGRAPH-2872E	# 
+
+2F9E4 ;	9111 ;	MA	# ( 鄑 → 鄑 ) CJK COMPATIBILITY IDEOGRAPH-2F9E4 → CJK UNIFIED IDEOGRAPH-9111	# 
+
+2F9E6 ;	911B ;	MA	# ( 鄛 → 鄛 ) CJK COMPATIBILITY IDEOGRAPH-2F9E6 → CJK UNIFIED IDEOGRAPH-911B	# 
+
+2FA3 ;	9149 ;	MA	#* ( ⾣ → 酉 ) KANGXI RADICAL WINE → CJK UNIFIED IDEOGRAPH-9149	# 
+
+F919 ;	916A ;	MA	# ( 酪 → 酪 ) CJK COMPATIBILITY IDEOGRAPH-F919 → CJK UNIFIED IDEOGRAPH-916A	# 
+
+FAC4 ;	9199 ;	MA	# ( 醙 → 醙 ) CJK COMPATIBILITY IDEOGRAPH-FAC4 → CJK UNIFIED IDEOGRAPH-9199	# 
+
+F9B7 ;	91B4 ;	MA	# ( 醴 → 醴 ) CJK COMPATIBILITY IDEOGRAPH-F9B7 → CJK UNIFIED IDEOGRAPH-91B4	# 
+
+2FA4 ;	91C6 ;	MA	#* ( ⾤ → 釆 ) KANGXI RADICAL DISTINGUISH → CJK UNIFIED IDEOGRAPH-91C6	# 
+
+F9E9 ;	91CC ;	MA	# ( 里 → 里 ) CJK COMPATIBILITY IDEOGRAPH-F9E9 → CJK UNIFIED IDEOGRAPH-91CC	# 
+2FA5 ;	91CC ;	MA	#* ( ⾥ → 里 ) KANGXI RADICAL VILLAGE → CJK UNIFIED IDEOGRAPH-91CC	# 
+
+F97E ;	91CF ;	MA	# ( 量 → 量 ) CJK COMPATIBILITY IDEOGRAPH-F97E → CJK UNIFIED IDEOGRAPH-91CF	# 
+
+F90A ;	91D1 ;	MA	# ( 金 → 金 ) CJK COMPATIBILITY IDEOGRAPH-F90A → CJK UNIFIED IDEOGRAPH-91D1	# 
+2FA6 ;	91D1 ;	MA	#* ( ⾦ → 金 ) KANGXI RADICAL GOLD → CJK UNIFIED IDEOGRAPH-91D1	# 
+
+F9B1 ;	9234 ;	MA	# ( 鈴 → 鈴 ) CJK COMPATIBILITY IDEOGRAPH-F9B1 → CJK UNIFIED IDEOGRAPH-9234	# 
+
+2F9E7 ;	9238 ;	MA	# ( 鈸 → 鈸 ) CJK COMPATIBILITY IDEOGRAPH-2F9E7 → CJK UNIFIED IDEOGRAPH-9238	# 
+
+FAC5 ;	9276 ;	MA	# ( 鉶 → 鉶 ) CJK COMPATIBILITY IDEOGRAPH-FAC5 → CJK UNIFIED IDEOGRAPH-9276	# 
+
+2F9E8 ;	92D7 ;	MA	# ( 鋗 → 鋗 ) CJK COMPATIBILITY IDEOGRAPH-2F9E8 → CJK UNIFIED IDEOGRAPH-92D7	# 
+
+2F9E9 ;	92D8 ;	MA	# ( 鋘 → 鋘 ) CJK COMPATIBILITY IDEOGRAPH-2F9E9 → CJK UNIFIED IDEOGRAPH-92D8	# 
+
+2F9EA ;	927C ;	MA	# ( 鉼 → 鉼 ) CJK COMPATIBILITY IDEOGRAPH-2F9EA → CJK UNIFIED IDEOGRAPH-927C	# 
+
+F93F ;	9304 ;	MA	# ( 錄 → 錄 ) CJK COMPATIBILITY IDEOGRAPH-F93F → CJK UNIFIED IDEOGRAPH-9304	# 
+
+F99B ;	934A ;	MA	# ( 鍊 → 鍊 ) CJK COMPATIBILITY IDEOGRAPH-F99B → CJK UNIFIED IDEOGRAPH-934A	# 
+
+93AE ;	93AD ;	MA	# ( 鎮 → 鎭 ) CJK UNIFIED IDEOGRAPH-93AE → CJK UNIFIED IDEOGRAPH-93AD	# 
+
+2F9EB ;	93F9 ;	MA	# ( 鏹 → 鏹 ) CJK COMPATIBILITY IDEOGRAPH-2F9EB → CJK UNIFIED IDEOGRAPH-93F9	# 
+
+2F9EC ;	9415 ;	MA	# ( 鐕 → 鐕 ) CJK COMPATIBILITY IDEOGRAPH-2F9EC → CJK UNIFIED IDEOGRAPH-9415	# 
+
+2F9ED ;	28BFA ;	MA	# ( 𨯺 → 𨯺 ) CJK COMPATIBILITY IDEOGRAPH-2F9ED → CJK UNIFIED IDEOGRAPH-28BFA	# 
+
+2ED0 ;	9485 ;	MA	#* ( ⻐ → 钅 ) CJK RADICAL C-SIMPLIFIED GOLD → CJK UNIFIED IDEOGRAPH-9485	# 
+
+2ED1 ;	9577 ;	MA	#* ( ⻑ → 長 ) CJK RADICAL LONG ONE → CJK UNIFIED IDEOGRAPH-9577	# 
+2FA7 ;	9577 ;	MA	#* ( ⾧ → 長 ) KANGXI RADICAL LONG → CJK UNIFIED IDEOGRAPH-9577	# 
+
+2ED2 ;	9578 ;	MA	#* ( ⻒ → 镸 ) CJK RADICAL LONG TWO → CJK UNIFIED IDEOGRAPH-9578	# 
+
+2ED3 ;	957F ;	MA	#* ( ⻓ → 长 ) CJK RADICAL C-SIMPLIFIED LONG → CJK UNIFIED IDEOGRAPH-957F	# 
+
+2FA8 ;	9580 ;	MA	#* ( ⾨ → 門 ) KANGXI RADICAL GATE → CJK UNIFIED IDEOGRAPH-9580	# 
+
+2F9EE ;	958B ;	MA	# ( 開 → 開 ) CJK COMPATIBILITY IDEOGRAPH-2F9EE → CJK UNIFIED IDEOGRAPH-958B	# 
+
+2F9EF ;	4995 ;	MA	# ( 䦕 → 䦕 ) CJK COMPATIBILITY IDEOGRAPH-2F9EF → CJK UNIFIED IDEOGRAPH-4995	# 
+
+F986 ;	95AD ;	MA	# ( 閭 → 閭 ) CJK COMPATIBILITY IDEOGRAPH-F986 → CJK UNIFIED IDEOGRAPH-95AD	# 
+
+2F9F0 ;	95B7 ;	MA	# ( 閷 → 閷 ) CJK COMPATIBILITY IDEOGRAPH-2F9F0 → CJK UNIFIED IDEOGRAPH-95B7	# 
+
+2F9F1 ;	28D77 ;	MA	# ( 𨵷 → 𨵷 ) CJK COMPATIBILITY IDEOGRAPH-2F9F1 → CJK UNIFIED IDEOGRAPH-28D77	# 
+
+2ED4 ;	95E8 ;	MA	#* ( ⻔ → 门 ) CJK RADICAL C-SIMPLIFIED GATE → CJK UNIFIED IDEOGRAPH-95E8	# 
+
+2FA9 ;	961C ;	MA	#* ( ⾩ → 阜 ) KANGXI RADICAL MOUND → CJK UNIFIED IDEOGRAPH-961C	# 
+
+2ECF ;	961D ;	MA	#* ( ⻏ → 阝 ) CJK RADICAL CITY → CJK UNIFIED IDEOGRAPH-961D	# 
+2ED6 ;	961D ;	MA	#* ( ⻖ → 阝 ) CJK RADICAL MOUND TWO → CJK UNIFIED IDEOGRAPH-961D	# 
+
+F9C6 ;	962E ;	MA	# ( 阮 → 阮 ) CJK COMPATIBILITY IDEOGRAPH-F9C6 → CJK UNIFIED IDEOGRAPH-962E	# 
+
+F951 ;	964B ;	MA	# ( 陋 → 陋 ) CJK COMPATIBILITY IDEOGRAPH-F951 → CJK UNIFIED IDEOGRAPH-964B	# 
+
+FA09 ;	964D ;	MA	# ( 降 → 降 ) CJK COMPATIBILITY IDEOGRAPH-FA09 → CJK UNIFIED IDEOGRAPH-964D	# 
+
+F959 ;	9675 ;	MA	# ( 陵 → 陵 ) CJK COMPATIBILITY IDEOGRAPH-F959 → CJK UNIFIED IDEOGRAPH-9675	# 
+
+F9D3 ;	9678 ;	MA	# ( 陸 → 陸 ) CJK COMPATIBILITY IDEOGRAPH-F9D3 → CJK UNIFIED IDEOGRAPH-9678	# 
+
+FAC6 ;	967C ;	MA	# ( 陼 → 陼 ) CJK COMPATIBILITY IDEOGRAPH-FAC6 → CJK UNIFIED IDEOGRAPH-967C	# 
+
+F9DC ;	9686 ;	MA	# ( 隆 → 隆 ) CJK COMPATIBILITY IDEOGRAPH-F9DC → CJK UNIFIED IDEOGRAPH-9686	# 
+
+F9F1 ;	96A3 ;	MA	# ( 隣 → 隣 ) CJK COMPATIBILITY IDEOGRAPH-F9F1 → CJK UNIFIED IDEOGRAPH-96A3	# 
+
+2F9F2 ;	49E6 ;	MA	# ( 䧦 → 䧦 ) CJK COMPATIBILITY IDEOGRAPH-2F9F2 → CJK UNIFIED IDEOGRAPH-49E6	# 
+
+2FAA ;	96B6 ;	MA	#* ( ⾪ → 隶 ) KANGXI RADICAL SLAVE → CJK UNIFIED IDEOGRAPH-96B6	# 
+
+FA2F ;	96B7 ;	MA	# ( 隷 → 隷 ) CJK COMPATIBILITY IDEOGRAPH-FA2F → CJK UNIFIED IDEOGRAPH-96B7	# 
+96B8 ;	96B7 ;	MA	# ( 隸 → 隷 ) CJK UNIFIED IDEOGRAPH-96B8 → CJK UNIFIED IDEOGRAPH-96B7	# →隸→
+F9B8 ;	96B7 ;	MA	# ( 隸 → 隷 ) CJK COMPATIBILITY IDEOGRAPH-F9B8 → CJK UNIFIED IDEOGRAPH-96B7	# 
+
+2FAB ;	96B9 ;	MA	#* ( ⾫ → 隹 ) KANGXI RADICAL SHORT TAILED BIRD → CJK UNIFIED IDEOGRAPH-96B9	# 
+
+2F9F3 ;	96C3 ;	MA	# ( 雃 → 雃 ) CJK COMPATIBILITY IDEOGRAPH-2F9F3 → CJK UNIFIED IDEOGRAPH-96C3	# 
+
+F9EA ;	96E2 ;	MA	# ( 離 → 離 ) CJK COMPATIBILITY IDEOGRAPH-F9EA → CJK UNIFIED IDEOGRAPH-96E2	# 
+
+FA68 ;	96E3 ;	MA	# ( 難 → 難 ) CJK COMPATIBILITY IDEOGRAPH-FA68 → CJK UNIFIED IDEOGRAPH-96E3	# 
+FAC7 ;	96E3 ;	MA	# ( 難 → 難 ) CJK COMPATIBILITY IDEOGRAPH-FAC7 → CJK UNIFIED IDEOGRAPH-96E3	# 
+
+2FAC ;	96E8 ;	MA	#* ( ⾬ → 雨 ) KANGXI RADICAL RAIN → CJK UNIFIED IDEOGRAPH-96E8	# 
+
+F9B2 ;	96F6 ;	MA	# ( 零 → 零 ) CJK COMPATIBILITY IDEOGRAPH-F9B2 → CJK UNIFIED IDEOGRAPH-96F6	# 
+
+F949 ;	96F7 ;	MA	# ( 雷 → 雷 ) CJK COMPATIBILITY IDEOGRAPH-F949 → CJK UNIFIED IDEOGRAPH-96F7	# 
+
+2F9F5 ;	9723 ;	MA	# ( 霣 → 霣 ) CJK COMPATIBILITY IDEOGRAPH-2F9F5 → CJK UNIFIED IDEOGRAPH-9723	# 
+
+2F9F6 ;	29145 ;	MA	# ( 𩅅 → 𩅅 ) CJK COMPATIBILITY IDEOGRAPH-2F9F6 → CJK UNIFIED IDEOGRAPH-29145	# 
+
+F938 ;	9732 ;	MA	# ( 露 → 露 ) CJK COMPATIBILITY IDEOGRAPH-F938 → CJK UNIFIED IDEOGRAPH-9732	# 
+
+F9B3 ;	9748 ;	MA	# ( 靈 → 靈 ) CJK COMPATIBILITY IDEOGRAPH-F9B3 → CJK UNIFIED IDEOGRAPH-9748	# 
+
+2FAD ;	9751 ;	MA	#* ( ⾭ → 靑 ) KANGXI RADICAL BLUE → CJK UNIFIED IDEOGRAPH-9751	# 
+
+2ED8 ;	9752 ;	MA	#* ( ⻘ → 青 ) CJK RADICAL BLUE → CJK UNIFIED IDEOGRAPH-9752	# 
+
+FA1C ;	9756 ;	MA	# ( 靖 → 靖 ) CJK COMPATIBILITY IDEOGRAPH-FA1C → CJK UNIFIED IDEOGRAPH-9756	# 
+FAC8 ;	9756 ;	MA	# ( 靖 → 靖 ) CJK COMPATIBILITY IDEOGRAPH-FAC8 → CJK UNIFIED IDEOGRAPH-9756	# 
+
+2F81C ;	291DF ;	MA	# ( 𩇟 → 𩇟 ) CJK COMPATIBILITY IDEOGRAPH-2F81C → CJK UNIFIED IDEOGRAPH-291DF	# 
+
+2FAE ;	975E ;	MA	#* ( ⾮ → 非 ) KANGXI RADICAL WRONG → CJK UNIFIED IDEOGRAPH-975E	# 
+
+2FAF ;	9762 ;	MA	#* ( ⾯ → 面 ) KANGXI RADICAL FACE → CJK UNIFIED IDEOGRAPH-9762	# 
+
+2F9F7 ;	2921A ;	MA	# ( 𩈚 → 𩈚 ) CJK COMPATIBILITY IDEOGRAPH-2F9F7 → CJK UNIFIED IDEOGRAPH-2921A	# 
+
+2FB0 ;	9769 ;	MA	#* ( ⾰ → 革 ) KANGXI RADICAL LEATHER → CJK UNIFIED IDEOGRAPH-9769	# 
+
+2F9F8 ;	4A6E ;	MA	# ( 䩮 → 䩮 ) CJK COMPATIBILITY IDEOGRAPH-2F9F8 → CJK UNIFIED IDEOGRAPH-4A6E	# 
+
+2F9F9 ;	4A76 ;	MA	# ( 䩶 → 䩶 ) CJK COMPATIBILITY IDEOGRAPH-2F9F9 → CJK UNIFIED IDEOGRAPH-4A76	# 
+
+2FB1 ;	97CB ;	MA	#* ( ⾱ → 韋 ) KANGXI RADICAL TANNED LEATHER → CJK UNIFIED IDEOGRAPH-97CB	# 
+
+FAC9 ;	97DB ;	MA	# ( 韛 → 韛 ) CJK COMPATIBILITY IDEOGRAPH-FAC9 → CJK UNIFIED IDEOGRAPH-97DB	# 
+
+2F9FA ;	97E0 ;	MA	# ( 韠 → 韠 ) CJK COMPATIBILITY IDEOGRAPH-2F9FA → CJK UNIFIED IDEOGRAPH-97E0	# 
+
+2ED9 ;	97E6 ;	MA	#* ( ⻙ → 韦 ) CJK RADICAL C-SIMPLIFIED TANNED LEATHER → CJK UNIFIED IDEOGRAPH-97E6	# 
+
+2FB2 ;	97ED ;	MA	#* ( ⾲ → 韭 ) KANGXI RADICAL LEEK → CJK UNIFIED IDEOGRAPH-97ED	# 
+
+2F9FB ;	2940A ;	MA	# ( 𩐊 → 𩐊 ) CJK COMPATIBILITY IDEOGRAPH-2F9FB → CJK UNIFIED IDEOGRAPH-2940A	# 
+
+2FB3 ;	97F3 ;	MA	#* ( ⾳ → 音 ) KANGXI RADICAL SOUND → CJK UNIFIED IDEOGRAPH-97F3	# 
+
+FA69 ;	97FF ;	MA	# ( 響 → 響 ) CJK COMPATIBILITY IDEOGRAPH-FA69 → CJK UNIFIED IDEOGRAPH-97FF	# 
+FACA ;	97FF ;	MA	# ( 響 → 響 ) CJK COMPATIBILITY IDEOGRAPH-FACA → CJK UNIFIED IDEOGRAPH-97FF	# 
+
+2FB4 ;	9801 ;	MA	#* ( ⾴ → 頁 ) KANGXI RADICAL LEAF → CJK UNIFIED IDEOGRAPH-9801	# 
+
+2F9FC ;	4AB2 ;	MA	# ( 䪲 → 䪲 ) CJK COMPATIBILITY IDEOGRAPH-2F9FC → CJK UNIFIED IDEOGRAPH-4AB2	# 
+
+FACB ;	980B ;	MA	# ( 頋 → 頋 ) CJK COMPATIBILITY IDEOGRAPH-FACB → CJK UNIFIED IDEOGRAPH-980B	# 
+2F9FE ;	980B ;	MA	# ( 頋 → 頋 ) CJK COMPATIBILITY IDEOGRAPH-2F9FE → CJK UNIFIED IDEOGRAPH-980B	# 
+2F9FF ;	980B ;	MA	# ( 頋 → 頋 ) CJK COMPATIBILITY IDEOGRAPH-2F9FF → CJK UNIFIED IDEOGRAPH-980B	# 
+
+F9B4 ;	9818 ;	MA	# ( 領 → 領 ) CJK COMPATIBILITY IDEOGRAPH-F9B4 → CJK UNIFIED IDEOGRAPH-9818	# 
+
+2FA00 ;	9829 ;	MA	# ( 頩 → 頩 ) CJK COMPATIBILITY IDEOGRAPH-2FA00 → CJK UNIFIED IDEOGRAPH-9829	# 
+
+2F9FD ;	29496 ;	MA	# ( 𩒖 → 𩒖 ) CJK COMPATIBILITY IDEOGRAPH-2F9FD → CJK UNIFIED IDEOGRAPH-29496	# 
+
+FA6A ;	983B ;	MA	# ( 頻 → 頻 ) CJK COMPATIBILITY IDEOGRAPH-FA6A → CJK UNIFIED IDEOGRAPH-983B	# 
+FACC ;	983B ;	MA	# ( 頻 → 頻 ) CJK COMPATIBILITY IDEOGRAPH-FACC → CJK UNIFIED IDEOGRAPH-983B	# 
+
+F9D0 ;	985E ;	MA	# ( 類 → 類 ) CJK COMPATIBILITY IDEOGRAPH-F9D0 → CJK UNIFIED IDEOGRAPH-985E	# 
+
+2EDA ;	9875 ;	MA	#* ( ⻚ → 页 ) CJK RADICAL C-SIMPLIFIED LEAF → CJK UNIFIED IDEOGRAPH-9875	# 
+
+2FB5 ;	98A8 ;	MA	#* ( ⾵ → 風 ) KANGXI RADICAL WIND → CJK UNIFIED IDEOGRAPH-98A8	# 
+
+2FA01 ;	295B6 ;	MA	# ( 𩖶 → 𩖶 ) CJK COMPATIBILITY IDEOGRAPH-2FA01 → CJK UNIFIED IDEOGRAPH-295B6	# 
+
+2EDB ;	98CE ;	MA	#* ( ⻛ → 风 ) CJK RADICAL C-SIMPLIFIED WIND → CJK UNIFIED IDEOGRAPH-98CE	# 
+
+2FB6 ;	98DB ;	MA	#* ( ⾶ → 飛 ) KANGXI RADICAL FLY → CJK UNIFIED IDEOGRAPH-98DB	# 
+
+2EDC ;	98DE ;	MA	#* ( ⻜ → 飞 ) CJK RADICAL C-SIMPLIFIED FLY → CJK UNIFIED IDEOGRAPH-98DE	# 
+
+2EDD ;	98DF ;	MA	#* ( ⻝ → 食 ) CJK RADICAL EAT ONE → CJK UNIFIED IDEOGRAPH-98DF	# 
+2FB7 ;	98DF ;	MA	#* ( ⾷ → 食 ) KANGXI RADICAL EAT → CJK UNIFIED IDEOGRAPH-98DF	# 
+
+2EDF ;	98E0 ;	MA	#* ( ⻟ → 飠 ) CJK RADICAL EAT THREE → CJK UNIFIED IDEOGRAPH-98E0	# 
+
+2FA02 ;	98E2 ;	MA	# ( 飢 → 飢 ) CJK COMPATIBILITY IDEOGRAPH-2FA02 → CJK UNIFIED IDEOGRAPH-98E2	# 
+
+FA2A ;	98EF ;	MA	# ( 飯 → 飯 ) CJK COMPATIBILITY IDEOGRAPH-FA2A → CJK UNIFIED IDEOGRAPH-98EF	# 
+
+FA2B ;	98FC ;	MA	# ( 飼 → 飼 ) CJK COMPATIBILITY IDEOGRAPH-FA2B → CJK UNIFIED IDEOGRAPH-98FC	# 
+
+2FA03 ;	4B33 ;	MA	# ( 䬳 → 䬳 ) CJK COMPATIBILITY IDEOGRAPH-2FA03 → CJK UNIFIED IDEOGRAPH-4B33	# 
+
+FA2C ;	9928 ;	MA	# ( 館 → 館 ) CJK COMPATIBILITY IDEOGRAPH-FA2C → CJK UNIFIED IDEOGRAPH-9928	# 
+
+2FA04 ;	9929 ;	MA	# ( 餩 → 餩 ) CJK COMPATIBILITY IDEOGRAPH-2FA04 → CJK UNIFIED IDEOGRAPH-9929	# 
+
+2EE0 ;	9963 ;	MA	#* ( ⻠ → 饣 ) CJK RADICAL C-SIMPLIFIED EAT → CJK UNIFIED IDEOGRAPH-9963	# 
+
+2FB8 ;	9996 ;	MA	#* ( ⾸ → 首 ) KANGXI RADICAL HEAD → CJK UNIFIED IDEOGRAPH-9996	# 
+
+2FB9 ;	9999 ;	MA	#* ( ⾹ → 香 ) KANGXI RADICAL FRAGRANT → CJK UNIFIED IDEOGRAPH-9999	# 
+
+2FA05 ;	99A7 ;	MA	# ( 馧 → 馧 ) CJK COMPATIBILITY IDEOGRAPH-2FA05 → CJK UNIFIED IDEOGRAPH-99A7	# 
+
+2FBA ;	99AC ;	MA	#* ( ⾺ → 馬 ) KANGXI RADICAL HORSE → CJK UNIFIED IDEOGRAPH-99AC	# 
+
+2FA06 ;	99C2 ;	MA	# ( 駂 → 駂 ) CJK COMPATIBILITY IDEOGRAPH-2FA06 → CJK UNIFIED IDEOGRAPH-99C2	# 
+
+F91A ;	99F1 ;	MA	# ( 駱 → 駱 ) CJK COMPATIBILITY IDEOGRAPH-F91A → CJK UNIFIED IDEOGRAPH-99F1	# 
+
+2FA07 ;	99FE ;	MA	# ( 駾 → 駾 ) CJK COMPATIBILITY IDEOGRAPH-2FA07 → CJK UNIFIED IDEOGRAPH-99FE	# 
+
+F987 ;	9A6A ;	MA	# ( 驪 → 驪 ) CJK COMPATIBILITY IDEOGRAPH-F987 → CJK UNIFIED IDEOGRAPH-9A6A	# 
+
+2EE2 ;	9A6C ;	MA	#* ( ⻢ → 马 ) CJK RADICAL C-SIMPLIFIED HORSE → CJK UNIFIED IDEOGRAPH-9A6C	# 
+
+2FBB ;	9AA8 ;	MA	#* ( ⾻ → 骨 ) KANGXI RADICAL BONE → CJK UNIFIED IDEOGRAPH-9AA8	# 
+
+2FA08 ;	4BCE ;	MA	# ( 䯎 → 䯎 ) CJK COMPATIBILITY IDEOGRAPH-2FA08 → CJK UNIFIED IDEOGRAPH-4BCE	# 
+
+2FBC ;	9AD8 ;	MA	#* ( ⾼ → 高 ) KANGXI RADICAL TALL → CJK UNIFIED IDEOGRAPH-9AD8	# 
+
+2FBD ;	9ADF ;	MA	#* ( ⾽ → 髟 ) KANGXI RADICAL HAIR → CJK UNIFIED IDEOGRAPH-9ADF	# 
+
+2FA09 ;	29B30 ;	MA	# ( 𩬰 → 𩬰 ) CJK COMPATIBILITY IDEOGRAPH-2FA09 → CJK UNIFIED IDEOGRAPH-29B30	# 
+
+FACD ;	9B12 ;	MA	# ( 鬒 → 鬒 ) CJK COMPATIBILITY IDEOGRAPH-FACD → CJK UNIFIED IDEOGRAPH-9B12	# 
+2FA0A ;	9B12 ;	MA	# ( 鬒 → 鬒 ) CJK COMPATIBILITY IDEOGRAPH-2FA0A → CJK UNIFIED IDEOGRAPH-9B12	# 
+
+2FBE ;	9B25 ;	MA	#* ( ⾾ → 鬥 ) KANGXI RADICAL FIGHT → CJK UNIFIED IDEOGRAPH-9B25	# 
+
+2FBF ;	9B2F ;	MA	#* ( ⾿ → 鬯 ) KANGXI RADICAL SACRIFICIAL WINE → CJK UNIFIED IDEOGRAPH-9B2F	# 
+
+2FC0 ;	9B32 ;	MA	#* ( ⿀ → 鬲 ) KANGXI RADICAL CAULDRON → CJK UNIFIED IDEOGRAPH-9B32	# 
+
+2FC1 ;	9B3C ;	MA	#* ( ⿁ → 鬼 ) KANGXI RADICAL GHOST → CJK UNIFIED IDEOGRAPH-9B3C	# 
+2EE4 ;	9B3C ;	MA	#* ( ⻤ → 鬼 ) CJK RADICAL GHOST → CJK UNIFIED IDEOGRAPH-9B3C	# 
+
+2FC2 ;	9B5A ;	MA	#* ( ⿂ → 魚 ) KANGXI RADICAL FISH → CJK UNIFIED IDEOGRAPH-9B5A	# 
+
+F939 ;	9B6F ;	MA	# ( 魯 → 魯 ) CJK COMPATIBILITY IDEOGRAPH-F939 → CJK UNIFIED IDEOGRAPH-9B6F	# 
+
+2FA0B ;	9C40 ;	MA	# ( 鱀 → 鱀 ) CJK COMPATIBILITY IDEOGRAPH-2FA0B → CJK UNIFIED IDEOGRAPH-9C40	# 
+
+F9F2 ;	9C57 ;	MA	# ( 鱗 → 鱗 ) CJK COMPATIBILITY IDEOGRAPH-F9F2 → CJK UNIFIED IDEOGRAPH-9C57	# 
+
+2EE5 ;	9C7C ;	MA	#* ( ⻥ → 鱼 ) CJK RADICAL C-SIMPLIFIED FISH → CJK UNIFIED IDEOGRAPH-9C7C	# 
+
+2FC3 ;	9CE5 ;	MA	#* ( ⿃ → 鳥 ) KANGXI RADICAL BIRD → CJK UNIFIED IDEOGRAPH-9CE5	# 
+
+2FA0C ;	9CFD ;	MA	# ( 鳽 → 鳽 ) CJK COMPATIBILITY IDEOGRAPH-2FA0C → CJK UNIFIED IDEOGRAPH-9CFD	# 
+
+2FA0D ;	4CCE ;	MA	# ( 䳎 → 䳎 ) CJK COMPATIBILITY IDEOGRAPH-2FA0D → CJK UNIFIED IDEOGRAPH-4CCE	# 
+
+2FA0F ;	9D67 ;	MA	# ( 鵧 → 鵧 ) CJK COMPATIBILITY IDEOGRAPH-2FA0F → CJK UNIFIED IDEOGRAPH-9D67	# 
+
+2FA0E ;	4CED ;	MA	# ( 䳭 → 䳭 ) CJK COMPATIBILITY IDEOGRAPH-2FA0E → CJK UNIFIED IDEOGRAPH-4CED	# 
+
+2FA10 ;	2A0CE ;	MA	# ( 𪃎 → 𪃎 ) CJK COMPATIBILITY IDEOGRAPH-2FA10 → CJK UNIFIED IDEOGRAPH-2A0CE	# 
+
+FA2D ;	9DB4 ;	MA	# ( 鶴 → 鶴 ) CJK COMPATIBILITY IDEOGRAPH-FA2D → CJK UNIFIED IDEOGRAPH-9DB4	# 
+
+2FA12 ;	2A105 ;	MA	# ( 𪄅 → 𪄅 ) CJK COMPATIBILITY IDEOGRAPH-2FA12 → CJK UNIFIED IDEOGRAPH-2A105	# 
+
+2FA11 ;	4CF8 ;	MA	# ( 䳸 → 䳸 ) CJK COMPATIBILITY IDEOGRAPH-2FA11 → CJK UNIFIED IDEOGRAPH-4CF8	# 
+
+F93A ;	9DFA ;	MA	# ( 鷺 → 鷺 ) CJK COMPATIBILITY IDEOGRAPH-F93A → CJK UNIFIED IDEOGRAPH-9DFA	# 
+
+2FA13 ;	2A20E ;	MA	# ( 𪈎 → 𪈎 ) CJK COMPATIBILITY IDEOGRAPH-2FA13 → CJK UNIFIED IDEOGRAPH-2A20E	# 
+
+F920 ;	9E1E ;	MA	# ( 鸞 → 鸞 ) CJK COMPATIBILITY IDEOGRAPH-F920 → CJK UNIFIED IDEOGRAPH-9E1E	# 
+
+9E43 ;	9E42 ;	MA	# ( 鹃 → 鹂 ) CJK UNIFIED IDEOGRAPH-9E43 → CJK UNIFIED IDEOGRAPH-9E42	# 
+
+2FC4 ;	9E75 ;	MA	#* ( ⿄ → 鹵 ) KANGXI RADICAL SALT → CJK UNIFIED IDEOGRAPH-9E75	# 
+
+F940 ;	9E7F ;	MA	# ( 鹿 → 鹿 ) CJK COMPATIBILITY IDEOGRAPH-F940 → CJK UNIFIED IDEOGRAPH-9E7F	# 
+2FC5 ;	9E7F ;	MA	#* ( ⿅ → 鹿 ) KANGXI RADICAL DEER → CJK UNIFIED IDEOGRAPH-9E7F	# 
+
+2FA14 ;	2A291 ;	MA	# ( 𪊑 → 𪊑 ) CJK COMPATIBILITY IDEOGRAPH-2FA14 → CJK UNIFIED IDEOGRAPH-2A291	# 
+
+F988 ;	9E97 ;	MA	# ( 麗 → 麗 ) CJK COMPATIBILITY IDEOGRAPH-F988 → CJK UNIFIED IDEOGRAPH-9E97	# 
+
+F9F3 ;	9E9F ;	MA	# ( 麟 → 麟 ) CJK COMPATIBILITY IDEOGRAPH-F9F3 → CJK UNIFIED IDEOGRAPH-9E9F	# 
+
+2FC6 ;	9EA5 ;	MA	#* ( ⿆ → 麥 ) KANGXI RADICAL WHEAT → CJK UNIFIED IDEOGRAPH-9EA5	# 
+
+2EE8 ;	9EA6 ;	MA	#* ( ⻨ → 麦 ) CJK RADICAL SIMPLIFIED WHEAT → CJK UNIFIED IDEOGRAPH-9EA6	# 
+
+2FA15 ;	9EBB ;	MA	# ( 麻 → 麻 ) CJK COMPATIBILITY IDEOGRAPH-2FA15 → CJK UNIFIED IDEOGRAPH-9EBB	# 
+2FC7 ;	9EBB ;	MA	#* ( ⿇ → 麻 ) KANGXI RADICAL HEMP → CJK UNIFIED IDEOGRAPH-9EBB	# 
+
+2F88F ;	2A392 ;	MA	# ( 𪎒 → 𪎒 ) CJK COMPATIBILITY IDEOGRAPH-2F88F → CJK UNIFIED IDEOGRAPH-2A392	# 
+
+2FC8 ;	9EC3 ;	MA	#* ( ⿈ → 黃 ) KANGXI RADICAL YELLOW → CJK UNIFIED IDEOGRAPH-9EC3	# 
+
+2EE9 ;	9EC4 ;	MA	#* ( ⻩ → 黄 ) CJK RADICAL SIMPLIFIED YELLOW → CJK UNIFIED IDEOGRAPH-9EC4	# 
+
+2FC9 ;	9ECD ;	MA	#* ( ⿉ → 黍 ) KANGXI RADICAL MILLET → CJK UNIFIED IDEOGRAPH-9ECD	# 
+
+F989 ;	9ECE ;	MA	# ( 黎 → 黎 ) CJK COMPATIBILITY IDEOGRAPH-F989 → CJK UNIFIED IDEOGRAPH-9ECE	# 
+
+2FA16 ;	4D56 ;	MA	# ( 䵖 → 䵖 ) CJK COMPATIBILITY IDEOGRAPH-2FA16 → CJK UNIFIED IDEOGRAPH-4D56	# 
+
+2FCA ;	9ED1 ;	MA	#* ( ⿊ → 黑 ) KANGXI RADICAL BLACK → CJK UNIFIED IDEOGRAPH-9ED1	# 
+9ED2 ;	9ED1 ;	MA	# ( 黒 → 黑 ) CJK UNIFIED IDEOGRAPH-9ED2 → CJK UNIFIED IDEOGRAPH-9ED1	# →⿊→
+
+FA3A ;	58A8 ;	MA	# ( 墨 → 墨 ) CJK COMPATIBILITY IDEOGRAPH-FA3A → CJK UNIFIED IDEOGRAPH-58A8	# 
+
+2FA17 ;	9EF9 ;	MA	# ( 黹 → 黹 ) CJK COMPATIBILITY IDEOGRAPH-2FA17 → CJK UNIFIED IDEOGRAPH-9EF9	# 
+2FCB ;	9EF9 ;	MA	#* ( ⿋ → 黹 ) KANGXI RADICAL EMBROIDERY → CJK UNIFIED IDEOGRAPH-9EF9	# 
+
+2FCC ;	9EFD ;	MA	#* ( ⿌ → 黽 ) KANGXI RADICAL FROG → CJK UNIFIED IDEOGRAPH-9EFD	# 
+
+2FA19 ;	9F05 ;	MA	# ( 鼅 → 鼅 ) CJK COMPATIBILITY IDEOGRAPH-2FA19 → CJK UNIFIED IDEOGRAPH-9F05	# 
+
+2FA18 ;	9EFE ;	MA	# ( 黾 → 黾 ) CJK COMPATIBILITY IDEOGRAPH-2FA18 → CJK UNIFIED IDEOGRAPH-9EFE	# 
+
+2FCD ;	9F0E ;	MA	#* ( ⿍ → 鼎 ) KANGXI RADICAL TRIPOD → CJK UNIFIED IDEOGRAPH-9F0E	# 
+
+2FA1A ;	9F0F ;	MA	# ( 鼏 → 鼏 ) CJK COMPATIBILITY IDEOGRAPH-2FA1A → CJK UNIFIED IDEOGRAPH-9F0F	# 
+
+2FCE ;	9F13 ;	MA	#* ( ⿎ → 鼓 ) KANGXI RADICAL DRUM → CJK UNIFIED IDEOGRAPH-9F13	# 
+
+2FA1B ;	9F16 ;	MA	# ( 鼖 → 鼖 ) CJK COMPATIBILITY IDEOGRAPH-2FA1B → CJK UNIFIED IDEOGRAPH-9F16	# 
+
+2FCF ;	9F20 ;	MA	#* ( ⿏ → 鼠 ) KANGXI RADICAL RAT → CJK UNIFIED IDEOGRAPH-9F20	# 
+
+2FA1C ;	9F3B ;	MA	# ( 鼻 → 鼻 ) CJK COMPATIBILITY IDEOGRAPH-2FA1C → CJK UNIFIED IDEOGRAPH-9F3B	# 
+2FD0 ;	9F3B ;	MA	#* ( ⿐ → 鼻 ) KANGXI RADICAL NOSE → CJK UNIFIED IDEOGRAPH-9F3B	# 
+
+FAD8 ;	9F43 ;	MA	# ( 齃 → 齃 ) CJK COMPATIBILITY IDEOGRAPH-FAD8 → CJK UNIFIED IDEOGRAPH-9F43	# 
+
+2FD1 ;	9F4A ;	MA	#* ( ⿑ → 齊 ) KANGXI RADICAL EVEN → CJK UNIFIED IDEOGRAPH-9F4A	# 
+
+2EEC ;	9F50 ;	MA	#* ( ⻬ → 齐 ) CJK RADICAL C-SIMPLIFIED EVEN → CJK UNIFIED IDEOGRAPH-9F50	# 
+
+2FD2 ;	9F52 ;	MA	#* ( ⿒ → 齒 ) KANGXI RADICAL TOOTH → CJK UNIFIED IDEOGRAPH-9F52	# 
+
+2FA1D ;	2A600 ;	MA	# ( 𪘀 → 𪘀 ) CJK COMPATIBILITY IDEOGRAPH-2FA1D → CJK UNIFIED IDEOGRAPH-2A600	# 
+
+2EEE ;	9F7F ;	MA	#* ( ⻮ → 齿 ) CJK RADICAL C-SIMPLIFIED TOOTH → CJK UNIFIED IDEOGRAPH-9F7F	# 
+
+F9C4 ;	9F8D ;	MA	# ( 龍 → 龍 ) CJK COMPATIBILITY IDEOGRAPH-F9C4 → CJK UNIFIED IDEOGRAPH-9F8D	# 
+2FD3 ;	9F8D ;	MA	#* ( ⿓ → 龍 ) KANGXI RADICAL DRAGON → CJK UNIFIED IDEOGRAPH-9F8D	# 
+
+FAD9 ;	9F8E ;	MA	# ( 龎 → 龎 ) CJK COMPATIBILITY IDEOGRAPH-FAD9 → CJK UNIFIED IDEOGRAPH-9F8E	# 
+
+2EF0 ;	9F99 ;	MA	#* ( ⻰ → 龙 ) CJK RADICAL C-SIMPLIFIED DRAGON → CJK UNIFIED IDEOGRAPH-9F99	# 
+
+F907 ;	9F9C ;	MA	# ( 龜 → 龜 ) CJK COMPATIBILITY IDEOGRAPH-F907 → CJK UNIFIED IDEOGRAPH-9F9C	# 
+F908 ;	9F9C ;	MA	# ( 龜 → 龜 ) CJK COMPATIBILITY IDEOGRAPH-F908 → CJK UNIFIED IDEOGRAPH-9F9C	# 
+FACE ;	9F9C ;	MA	# ( 龜 → 龜 ) CJK COMPATIBILITY IDEOGRAPH-FACE → CJK UNIFIED IDEOGRAPH-9F9C	# 
+2FD4 ;	9F9C ;	MA	#* ( ⿔ → 龜 ) KANGXI RADICAL TURTLE → CJK UNIFIED IDEOGRAPH-9F9C	# 
+
+2EF3 ;	9F9F ;	MA	#* ( ⻳ → 龟 ) CJK RADICAL C-SIMPLIFIED TURTLE → CJK UNIFIED IDEOGRAPH-9F9F	# 
+
+2FD5 ;	9FA0 ;	MA	#* ( ⿕ → 龠 ) KANGXI RADICAL FLUTE → CJK UNIFIED IDEOGRAPH-9FA0	# 
+
+23FC ;	23FB ;	MA	#* ( ⏼ → ⏻ ) POWER ON-OFF SYMBOL → POWER SYMBOL	# 
+
+11413 ;	11434 11442 11412 ;	MA	# ( 𑐓 → 𑐴𑑂𑐒 ) NEWA LETTER NGHA → NEWA LETTER HA, NEWA SIGN VIRAMA, NEWA LETTER NGA	# 
+
+11419 ;	11434 11442 11418 ;	MA	# ( 𑐙 → 𑐴𑑂𑐘 ) NEWA LETTER NYHA → NEWA LETTER HA, NEWA SIGN VIRAMA, NEWA LETTER NYA	# 
+
+11424 ;	11434 11442 11423 ;	MA	# ( 𑐤 → 𑐴𑑂𑐣 ) NEWA LETTER NHA → NEWA LETTER HA, NEWA SIGN VIRAMA, NEWA LETTER NA	# 
+
+1142A ;	11434 11442 11429 ;	MA	# ( 𑐪 → 𑐴𑑂𑐩 ) NEWA LETTER MHA → NEWA LETTER HA, NEWA SIGN VIRAMA, NEWA LETTER MA	# 
+
+1142D ;	11434 11442 1142C ;	MA	# ( 𑐭 → 𑐴𑑂𑐬 ) NEWA LETTER RHA → NEWA LETTER HA, NEWA SIGN VIRAMA, NEWA LETTER RA	# 
+
+1142F ;	11434 11442 1142E ;	MA	# ( 𑐯 → 𑐴𑑂𑐮 ) NEWA LETTER LHA → NEWA LETTER HA, NEWA SIGN VIRAMA, NEWA LETTER LA	# 
+
+# total: 6167
+
diff --git a/utils/build-presets.ini b/utils/build-presets.ini
index d295197..355bda1 100644
--- a/utils/build-presets.ini
+++ b/utils/build-presets.ini
@@ -960,6 +960,8 @@
 
 dash-dash
 
+skip-test-lldb
+
 swift-install-components=compiler;clang-builtin-headers;stdlib;sdk-overlay;license;sourcekit-xpc-service;swift-remote-mirror;swift-remote-mirror-headers
 llvm-install-components=libclang;libclang-headers
 
diff --git a/utils/find-overlay-dependencies.sh b/utils/find-overlay-dependencies.sh
index 1667dd2..c8880e9 100755
--- a/utils/find-overlay-dependencies.sh
+++ b/utils/find-overlay-dependencies.sh
@@ -56,6 +56,8 @@
 SDKS[appletvos]="arm64"
 SDKS[watchos]="armv7k"
 
+SDKS_ORDERED=(macosx iphoneos appletvos watchos)
+
 typeset -A CMAKE_DEPENDS_NAME
 CMAKE_DEPENDS_NAME[macosx]="SWIFT_MODULE_DEPENDS_OSX"
 CMAKE_DEPENDS_NAME[iphoneos]="SWIFT_MODULE_DEPENDS_IOS"
@@ -63,10 +65,11 @@
 CMAKE_DEPENDS_NAME[watchos]="SWIFT_MODULE_DEPENDS_WATCHOS"
 
 echo $1
-for sdk in ${(k)SDKS}; do
+for sdk in $SDKS_ORDERED; do
+  sdkfull="${sdk}${SUFFIX}"
   arch=$SDKS[$sdk]
-  printf "%s:\n\t" "$sdk"
-  deps=$(echo "@import $1;" | xcrun -sdk $sdk clang -arch $arch -x objective-c - -M -fmodules 2>/dev/null)
+  printf "%s:\n\t" "$sdkfull"
+  deps=$(echo "@import $1;" | xcrun -sdk "${sdkfull}" clang -arch $arch -x objective-c -F $(xcrun -show-sdk-path -sdk "${sdkfull}")/System/Library/PrivateFrameworks - -M -fmodules 2>/dev/null)
   if [[ $? != 0 ]]; then
     # Clear the cmake file of this unsupported platform and loop
     echo "unsupported"
@@ -85,6 +88,10 @@
         egrep -q "\b$overlay\b") &&
         DEPENDS_ON+=${CUSTOM_NAMED_MODULES[$overlay]-$overlay}
   done
+
+  if [[ $sdk != macosx* ]]; then
+    DEPENDS_ON=("${(@)DEPENDS_ON:#XPC}")
+  fi
   echo "$DEPENDS_ON"
   if [[ $UPDATE_CMAKE == 1 ]]; then
     sed -i "" -E -e "s/^([ \t]*$CMAKE_DEPENDS_NAME[$sdk]).*$/\1 $DEPENDS_ON # auto-updated/" "$CMAKE_PATH"
diff --git a/utils/generate_confusables.py b/utils/generate_confusables.py
new file mode 100755
index 0000000..dbe963d
--- /dev/null
+++ b/utils/generate_confusables.py
@@ -0,0 +1,99 @@
+#!/usr/bin/env python
+# utils/update_confusables.py - Utility to update definitions of unicode 
+# confusables
+#
+# This source file is part of the Swift.org open source project
+#
+# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+# Licensed under Apache License v2.0 with Runtime Library Exception
+#
+# See https://swift.org/LICENSE.txt for license information
+# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+
+import os.path
+import re
+import sys
+
+
+def _usage(program_name):
+    return 'usage: {}'.format(
+        program_name)
+
+
+def _help(program_name):
+    return '{}\n\n'.format(_usage(program_name)) + \
+        'This script generates include/swift/Parse/Confusables.def from ' \
+        'utils/UnicodeData/confusables.txt.\n' \
+        'The latest version of the data file can be found at ' \
+        'ftp://ftp.unicode.org/Public/security/latest/confusables.txt.'
+
+
+def main(args=sys.argv):
+    program_name = os.path.basename(args.pop(0))
+
+    if len(args) == 1 and args[0] in ['-h', '--help']:
+        print(_help(program_name))
+        return 0
+
+    charactersToCheck = [
+        u"(", u")", u"{",
+        u"}", u"[", u"]",
+        u".", u",", u":",
+        u";", u"=", u"@",
+        u"#", u"&", u"/",
+        u"|", u"\\", u"-",
+        u"*", u"+", u">",
+        u"<", u"!", u"?"
+    ]
+
+    modifiedHex = [
+        hex(ord(char))[2:].zfill(4).upper() for char in charactersToCheck
+    ]
+
+    basepath = os.path.dirname(__file__)
+    confusablesFilePath = os.path.abspath(
+        os.path.join(basepath, "UnicodeData/confusables.txt")
+    )
+
+    pairs = []
+    with open(confusablesFilePath, 'r') as f:
+        pattern = re.compile("(.+)\W+;\W+(.+)\W+;")
+        for line in f:
+            match = pattern.match(line)
+            if match is not None:
+                confusedString = match.group(1).replace(" ", "")
+                normalString = match.group(2).replace(" ", "")
+                for hexValue in modifiedHex:
+                    if hexValue == normalString:
+                        confused = hex(int(confusedString, 16))
+                        normal = hex(int(normalString, 16))
+                        pairs.append((confused, normal))
+
+    defFilePath = os.path.abspath(
+        os.path.join(basepath, "..", "include/swift/Parse/Confusables.def")
+    )
+    with open(defFilePath, 'w') as f:
+        f.write("//===--- Confusables.def - Confusable unicode characters")
+        f.write(" ------------------===//")
+        header = '''
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+'''
+        f.write(header)
+        f.write("//===----------------------------------------------------")
+        f.write("------------------===//\n\n")
+        f.write("// CONFUSABLE(CONFUSABLE_POINT, BASEPOINT)\n\n")
+        for (confused, expected) in pairs:
+            f.write("CONFUSABLE(" + confused + ", " + expected + ")\n")
+        f.write("\n#undef CONFUSABLE\n")
+
+
+if __name__ == '__main__':
+    main()
diff --git a/utils/process-stats-dir.py b/utils/process-stats-dir.py
new file mode 100755
index 0000000..50ac8de
--- /dev/null
+++ b/utils/process-stats-dir.py
@@ -0,0 +1,237 @@
+#!/usr/bin/python
+#
+# ==-- process-stats-dir - summarize one or more Swift -stats-output-dirs --==#
+#
+# This source file is part of the Swift.org open source project
+#
+# Copyright (c) 2014-2017 Apple Inc. and the Swift project authors
+# Licensed under Apache License v2.0 with Runtime Library Exception
+#
+# See https://swift.org/LICENSE.txt for license information
+# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+#
+# ==------------------------------------------------------------------------==#
+#
+# This file processes the contents of one or more directories generated by
+# `swiftc -stats-output-dir` and emits summary data, traces etc. for analysis.
+
+import argparse
+import json
+import os
+import random
+import re
+import sys
+
+
+class JobStats:
+
+    def __init__(self, jobkind, jobid, module, start_usec, dur_usec,
+                 jobargs, stats):
+        self.jobkind = jobkind
+        self.jobid = jobid
+        self.module = module
+        self.start_usec = start_usec
+        self.dur_usec = dur_usec
+        self.jobargs = jobargs
+        self.stats = stats
+
+    def is_driver_job(self):
+        return self.jobkind == 'driver'
+
+    def driver_jobs_ran(self):
+        assert(self.is_driver_job())
+        return self.stats.get("Driver.NumDriverJobsRun", 0)
+
+    def driver_jobs_skipped(self):
+        assert(self.is_driver_job())
+        return self.stats.get("Driver.NumDriverJobsSkipped", 0)
+
+    def driver_jobs_total(self):
+        assert(self.is_driver_job())
+        return self.driver_jobs_ran() + self.driver_jobs_skipped()
+
+    def merged_with(self, other):
+        merged_stats = {}
+        for k, v in self.stats.items() + other.stats.items():
+            merged_stats[k] = v + merged_stats.get(k, 0.0)
+        merged_kind = self.jobkind
+        if other.jobkind != merged_kind:
+            merged_kind = "<merged>"
+        merged_module = self.module
+        if other.module != merged_module:
+            merged_module = "<merged>"
+        merged_start = min(self.start_usec, other.start_usec)
+        merged_end = max(self.start_usec + self.dur_usec,
+                         other.start_usec + other.dur_usec)
+        merged_dur = merged_end - merged_start
+        return JobStats(merged_kind, random.randint(0, 1000000000),
+                        merged_module, merged_start, merged_dur,
+                        self.jobargs + other.jobargs, merged_stats)
+
+    def incrementality_percentage(self):
+        assert(self.is_driver_job())
+        ran = self.driver_jobs_ran()
+        total = self.driver_jobs_total()
+        return (float(ran) / float(total)) * 100.0
+
+    # Return a JSON-formattable object of the form preferred by google chrome's
+    # 'catapult' trace-viewer.
+    def to_catapult_trace_obj(self):
+        return {"name": self.module,
+                "cat": self.jobkind,
+                "ph": "X",              # "X" == "complete event"
+                "pid": self.jobid,
+                "tid": 1,
+                "ts": self.start_usec,
+                "dur": self.dur_usec,
+                "args": self.jobargs}
+
+
+# Return an array of JobStats objects
+def load_stats_dir(path):
+    jobstats = []
+    fpat = r"^stats-(?P<start>\d+)-swift-(?P<kind>\w+)-(?P<pid>\d+).json$"
+    for root, dirs, files in os.walk(path):
+        for f in files:
+            m = re.match(fpat, f)
+            if m:
+                # NB: "pid" in fpat is a random number, not unix pid.
+                mg = m.groupdict()
+                jobkind = mg['kind']
+                jobid = int(mg['pid'])
+                start_usec = int(mg['start'])
+
+                j = json.load(open(os.path.join(root, f)))
+                dur_usec = 1
+                jobargs = None
+                module = "module"
+                patstr = (r"time\.swift-" + jobkind +
+                          r"\.(?P<module>[^\.]+)(?P<filename>.*)\.wall$")
+                pat = re.compile(patstr)
+                for (k, v) in j.items():
+                    tm = re.match(pat, k)
+                    if tm:
+                        tmg = tm.groupdict()
+                        dur_usec = int(1000000.0 * float(v))
+                        module = tmg['module']
+                        if 'filename' in tmg:
+                            ff = tmg['filename']
+                            if ff.startswith('.'):
+                                ff = ff[1:]
+                            jobargs = [ff]
+                        break
+                e = JobStats(jobkind=jobkind, jobid=jobid,
+                             module=module, start_usec=start_usec,
+                             dur_usec=dur_usec, jobargs=jobargs,
+                             stats=j)
+                jobstats.append(e)
+    return jobstats
+
+
+# Passed args with 2-element remainder ["old", "new"], return a list of tuples
+# of the form [(name, (oldstats, newstats))] where each name is a common subdir
+# of each of "old" and "new", and the stats are those found in the respective
+# dirs.
+def load_paired_stats_dirs(args):
+    assert(len(args.remainder) == 2)
+    paired_stats = []
+    (old, new) = args.remainder
+    for p in sorted(os.listdir(old)):
+        full_old = os.path.join(old, p)
+        full_new = os.path.join(new, p)
+        if not (os.path.exists(full_old) and os.path.isdir(full_old) and
+                os.path.exists(full_new) and os.path.isdir(full_new)):
+            continue
+        old_stats = load_stats_dir(full_old)
+        new_stats = load_stats_dir(full_new)
+        if len(old_stats) == 0 or len(new_stats) == 0:
+            continue
+        paired_stats.append((p, (old_stats, new_stats)))
+    return paired_stats
+
+
+def write_catapult_trace(args):
+    allstats = []
+    for path in args.remainder:
+        allstats += load_stats_dir(path)
+    json.dump([s.to_catapult_trace_obj() for s in allstats], args.output)
+
+
+def merge_all_jobstats(jobstats):
+    m = None
+    for j in jobstats:
+        if m is None:
+            m = j
+        else:
+            m = m.merged_with(j)
+    return m
+
+
+def show_paired_incrementality(args):
+    for (name, (oldstats, newstats)) in load_paired_stats_dirs(args):
+        olddriver = merge_all_jobstats([x for x in oldstats
+                                        if x.is_driver_job()])
+        newdriver = merge_all_jobstats([x for x in newstats
+                                        if x.is_driver_job()])
+        if olddriver is None or newdriver is None:
+            continue
+        if args.csv:
+            args.output.write("'%s',%d,%d\n" % (name,
+                              olddriver.driver_jobs_ran(),
+                              newdriver.driver_jobs_ran()))
+        else:
+            oldpct = olddriver.incrementality_percentage()
+            newpct = newdriver.incrementality_percentage()
+            deltapct = newpct - oldpct
+            oldskip = olddriver.driver_jobs_skipped()
+            newskip = newdriver.driver_jobs_skipped()
+            deltaskip = newskip - oldskip
+            fmt = "{}:\t" + "\t".join([lab + ":{:>3.0f}% ({} skipped)" for
+                                       lab in ['old', 'new', 'delta']]) + "\n"
+            args.output.write(fmt.format(name,
+                                         oldpct, oldskip,
+                                         newpct, newskip,
+                                         deltapct, deltaskip))
+
+
+def show_incrementality(args):
+    for path in args.remainder:
+        stats = load_stats_dir(path)
+        for s in stats:
+            if s.is_driver_job():
+                pct = s.incrementality_percentage()
+                args.output.write("%s: %f\n" % (os.path.basename(path), pct))
+
+
+def main():
+    parser = argparse.ArgumentParser()
+    parser.add_argument("--verbose", action="store_true",
+                        help="Report activity verbosely")
+    parser.add_argument("--output", default="-",
+                        type=argparse.FileType('wb', 0),
+                        help="Write output to file")
+    parser.add_argument("--paired", action="store_true",
+                        help="Process two dirs-of-stats-dirs, pairwise")
+    parser.add_argument("--csv", action="store_true",
+                        help="Write output as CSV")
+    modes = parser.add_mutually_exclusive_group(required=True)
+    modes.add_argument("--catapult", action="store_true",
+                       help="emit a 'catapult'-compatible trace of events")
+    modes.add_argument("--incrementality", action="store_true",
+                       help="summarize the 'incrementality' of a build")
+    parser.add_argument('remainder', nargs=argparse.REMAINDER,
+                        help="stats-dirs to process")
+
+    args = parser.parse_args()
+    if len(args.remainder) == 0:
+        parser.print_help()
+        sys.exit(1)
+    if args.catapult:
+        write_catapult_trace(args)
+    elif args.incrementality:
+        if args.paired:
+            show_paired_incrementality(args)
+        else:
+            show_incrementality(args)
+
+main()
diff --git a/utils/update-checkout-config.json b/utils/update-checkout-config.json
index 55f95a3..92057f3 100644
--- a/utils/update-checkout-config.json
+++ b/utils/update-checkout-config.json
@@ -118,15 +118,15 @@
                 "clang": "swift-4.0-branch",
                 "swift": "swift-4.0-branch",
                 "lldb": "swift-4.0-branch",
-                "cmark": "master",
-                "llbuild": "master",
-                "swiftpm": "master",
+                "cmark": "swift-4.0-branch",
+                "llbuild": "swift-4.0-branch",
+                "swiftpm": "swift-4.0-branch",
                 "compiler-rt": "swift-4.0-branch",
-                "swift-corelibs-xctest": "master",
-                "swift-corelibs-foundation": "master",
-                "swift-corelibs-libdispatch": "master",
-                "swift-integration-tests": "master",
-                "swift-xcode-playground-support": "master",
+                "swift-corelibs-xctest": "swift-4.0-branch",
+                "swift-corelibs-foundation": "swift-4.0-branch",
+                "swift-corelibs-libdispatch": "swift-4.0-branch",
+                "swift-integration-tests": "swift-4.0-branch",
+                "swift-xcode-playground-support": "swift-4.0-branch",
                 "ninja": "release"
             }
         }
diff --git a/utils/update_checkout.py b/utils/update_checkout.py
index de2e570..fb9dc3f 100755
--- a/utils/update_checkout.py
+++ b/utils/update_checkout.py
@@ -292,12 +292,14 @@
     fmt = "{:<%r}{}" % (max_len + 5)
     for repo_name, repo_info in sorted(config['repos'].items(),
                                        key=lambda x: x[0]):
-        with shell.pushd(os.path.join(SWIFT_SOURCE_ROOT, repo_name),
-                         dry_run=False,
-                         echo=False):
-            h = shell.capture(["git", "log", "--oneline", "-n", "1"],
-                              echo=False).strip()
-            print(fmt.format(repo_name, h))
+        repo_path = os.path.join(SWIFT_SOURCE_ROOT, repo_name)
+        if os.path.isdir(repo_path):
+            with shell.pushd(repo_path, dry_run=False, echo=False):
+                h = shell.capture(["git", "log", "--oneline", "-n", "1"],
+                                  echo=False).strip()
+                print(fmt.format(repo_name, h))
+        else:
+            print(fmt.format(repo_name, "(not checked out)"))
 
 
 def dump_hashes_config(args, config):
diff --git a/utils/vim/swift-format.py b/utils/vim/swift-format.py
new file mode 100644
index 0000000..8f13c48
--- /dev/null
+++ b/utils/vim/swift-format.py
@@ -0,0 +1,95 @@
+# This file is a minimal swift-format vim-integration.  To install:
+# - Change 'binary' if swift-format is not on the path (see below).
+# - Add to your .vimrc:
+#
+#   map <C-I> :pyf <path-to-this-file>/swift-format.py<cr>
+#   imap <C-I> <c-o>:pyf <path-to-this-file>/swift-format.py<cr>
+#
+# The first line enables swift-format for NORMAL and VISUAL mode, the second
+# line adds support for INSERT mode.  Change "C-I" to another binding if you
+# need swift-format on a different key (C-I stands for Ctrl+i).
+#
+# With this integration you can press the bound key and swift-format will
+# format the current line in NORMAL and INSERT mode or the selected region in
+# VISUAL mode.  The line or region is extended to the next bigger syntactic
+# entity.
+#
+# You can also pass in the variable "l:lines" to choose the range for
+# formatting.  This variable can either contain "<start line>:<end line> or
+# "all" to format the full file.  So, to format the full file, write a function
+# like:
+#
+# :function FormatFile()
+# :  let l:lines="all"
+# :  pyf <path-to-this-file>/swift-format.py
+# :endfunction
+#
+# It operates on the current, potentially unsaved buffer and does not create or
+# save any files.  To revert a formatting, just undo.
+
+from __future__ import print_function
+
+import difflib
+import platform
+import subprocess
+import sys
+
+import vim
+
+binary = 'swift-format'
+if vim.eval('exists("g:swift_format_path")') == "1":
+    binary = vim.eval('g:swift_format_path')
+
+
+def get_buffer(encoding):
+    if platform.python_version_tuple()[0] == "3":
+        return vim.current.buffer
+    return [line.decode(encoding) for line in vim.current.buffer]
+
+
+def main(argc, argv):
+    encoding = vim.eval("&encoding")
+    buf = get_buffer(encoding)
+
+    if vim.eval('exists("l:lines")') == '1':
+        lines = vim.eval('l:lines')
+    else:
+        lines = '%s:%s' % (vim.current.range.start + 1,
+                           vim.current.range.end + 1)
+
+    cursor = int(vim.eval('line2byte(line(".")) + col(".")')) - 2
+    if cursor < 0:
+        print("Couldn't determine cursor position.  Is your file empty?")
+        return
+
+    # avoid the cmd prompt on windows
+    SI = None
+    if sys.platform.startswith('win32'):
+        SI = subprocess.STARTUPINFO()
+        SI.dwFlags |= subprocess.STARTF_USESHOWWINDOW
+        SI.wShowWindow = subprocess.SW_HIDE
+
+    command = [binary]
+    if lines != 'all':
+        command.extend(['-line-range', lines])
+
+    p = subprocess.Popen(command,
+                         stdout=subprocess.PIPE, stderr=subprocess.PIPE,
+                         stdin=subprocess.PIPE, startupinfo=SI)
+    stdout, stderr = p.communicate(input='\n'.join(buf).encode(encoding))
+
+    if stderr:
+        print(stderr)
+
+    if not stdout:
+        print('No output from swift-format (crashed?).')
+        return
+
+    lines = stdout.decode(encoding).split('\n')
+    sequence = difflib.SequenceMatcher(None, buf, lines)
+    for op in reversed(sequence.get_opcodes()):
+        if op[0] is not 'equal':
+            vim.current.buffer[op[1]:op[2]] = lines[op[3]:op[4]]
+
+if __name__ == '__main__':
+    main(len(sys.argv), sys.argv)
diff --git a/validation-test/BuildSystem/RuntimeBacktraces/object-files-do-not-reference-dladdr.test-sh b/validation-test/BuildSystem/RuntimeBacktraces/object-files-do-not-reference-dladdr.test-sh
new file mode 100755
index 0000000..db361fb
--- /dev/null
+++ b/validation-test/BuildSystem/RuntimeBacktraces/object-files-do-not-reference-dladdr.test-sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+
+# This test makes sure that our object files do not reference any of the black
+# listed symbols.
+
+set -e
+set -u
+
+# REQUIRES: OS=macosx
+# UNSUPPORTED: runtime-dladdr
+# RUN: %s %swift_obj_root
+
+BLACKLIST=( dladdr )
+
+FOUND_VIOLATION=0
+for f in $(find $1/stdlib -iname '*.o' -type f); do
+    for t in "${BLACKLIST[@]}"; do
+        if nm -u "${f}" | grep -q "${t}"; then
+            echo "${f} reference black listed symbol: ${t}!"
+            if [[ "${FOUND_VIOLATION}" -eq 0 ]]; then
+                FOUND_VIOLATION=1
+            fi
+        fi
+    done
+done
+
+if [[ "${FOUND_VIOLATION}" -eq 1 ]]; then
+    echo "Error!"
+    exit 1
+fi
+echo "Did not find any blacklisted symbols!"
+
+set +u
+set +e
diff --git a/validation-test/Driver/Dependencies/rdar25405605.swift b/validation-test/Driver/Dependencies/rdar25405605.swift
index 59e83a8..57ba4a7 100644
--- a/validation-test/Driver/Dependencies/rdar25405605.swift
+++ b/validation-test/Driver/Dependencies/rdar25405605.swift
@@ -58,7 +58,7 @@
 
 // RUN: cp %S/Inputs/rdar25405605/helper-3.swift %t/helper.swift
 // RUN: touch -t 201401240007 %t/helper.swift
-// RUN: cd %t && %target-build-swift -c -incremental -output-file-map %S/Inputs/rdar25405605/output.json -parse-as-library ./main.swift ./helper.swift -parseable-output -j1 -module-name main 2>&1 | %FileCheck -check-prefix=CHECK-3 %s
+// RUN: cd %t && not %target-build-swift -c -incremental -output-file-map %S/Inputs/rdar25405605/output.json -parse-as-library ./main.swift ./helper.swift -parseable-output -j1 -module-name main 2>&1 | %FileCheck -check-prefix=CHECK-3 %s
 
 // CHECK-3-NOT: warning
 // CHECK-3: {{^{$}}
diff --git a/validation-test/IDE/crashers_2/0010-reference-to-self-in-extension-init.swift b/validation-test/IDE/crashers_2/0010-reference-to-self-in-extension-init.swift
deleted file mode 100644
index a094ff2..0000000
--- a/validation-test/IDE/crashers_2/0010-reference-to-self-in-extension-init.swift
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: not --crash %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s
-// REQUIRES: asserts
-
-extension Integer { 
-#^A^#
-  extension {
-        var : Self   
diff --git a/validation-test/IDE/crashers_2/0013-unmapped-dependent-type-2.swift b/validation-test/IDE/crashers_2/0013-unmapped-dependent-type-2.swift
deleted file mode 100644
index c1cb67f..0000000
--- a/validation-test/IDE/crashers_2/0013-unmapped-dependent-type-2.swift
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: not --crash %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s
-// REQUIRES: asserts
-
-func a<b>(() -> b) -> b {
-  a {}#^A^#
-}
diff --git a/validation-test/IDE/crashers_2_fixed/0010-reference-to-self-in-extension-init.swift b/validation-test/IDE/crashers_2_fixed/0010-reference-to-self-in-extension-init.swift
new file mode 100644
index 0000000..63d01c7
--- /dev/null
+++ b/validation-test/IDE/crashers_2_fixed/0010-reference-to-self-in-extension-init.swift
@@ -0,0 +1,6 @@
+// RUN: %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s
+
+extension Integer { 
+#^A^#
+  extension {
+        var : Self   
diff --git a/validation-test/IDE/crashers_2_fixed/0013-unmapped-dependent-type-2.swift b/validation-test/IDE/crashers_2_fixed/0013-unmapped-dependent-type-2.swift
new file mode 100644
index 0000000..88474a7
--- /dev/null
+++ b/validation-test/IDE/crashers_2_fixed/0013-unmapped-dependent-type-2.swift
@@ -0,0 +1,5 @@
+// RUN: %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s
+
+func a<b>(() -> b) -> b {
+  a {}#^A^#
+}
diff --git a/validation-test/Reflection/reflect_existential.swift b/validation-test/Reflection/reflect_existential.swift
new file mode 100644
index 0000000..801e760
--- /dev/null
+++ b/validation-test/Reflection/reflect_existential.swift
@@ -0,0 +1,172 @@
+// RUN: rm -rf %t && mkdir -p %t
+// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/reflect_existential
+// RUN: %target-run %target-swift-reflection-test %t/reflect_existential 2>&1 | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
+// REQUIRES: objc_interop
+// REQUIRES: executable_test
+
+import SwiftReflectionTest
+
+class TestGeneric<T> {
+  var t: T
+
+  init(_ t: T) {
+    self.t = t
+  }
+}
+
+protocol P {}
+protocol CP : class {}
+class C : CP {}
+class D : C, P {}
+
+reflect(object: TestGeneric(D() as Any))
+
+// CHECK-64: Type reference:
+// CHECK-64: (bound_generic_class reflect_existential.TestGeneric
+// CHECK-64:   (protocol_composition))
+
+// CHECK-64: Type info:
+// CHECK-64: (class_instance size=48 alignment=8 stride=48 num_extra_inhabitants=0
+// CHECK-64:   (field name=t offset=16
+// CHECK-64:     (opaque_existential size=32 alignment=8 stride=32 num_extra_inhabitants=0
+// CHECK-64:       (field name=metadata offset=24
+// CHECK-64:         (builtin size=8 alignment=8 stride=8 num_extra_inhabitants=2147483647)))))
+
+// CHECK-32: Type reference:
+// CHECK-32: (bound_generic_class reflect_existential.TestGeneric
+// CHECK-32:   (protocol_composition))
+
+// CHECK-32: Type info:
+// CHECK-32: (class_instance size=28 alignment=4 stride=28 num_extra_inhabitants=0
+// CHECK-32:   (field name=t offset=12
+// CHECK-32:     (opaque_existential size=16 alignment=4 stride=16 num_extra_inhabitants=0
+// CHECK-32:       (field name=metadata offset=12
+// CHECK-32:         (builtin size=4 alignment=4 stride=4 num_extra_inhabitants=4096)))))
+
+reflect(object: TestGeneric(D() as P))
+
+// CHECK-64: Type reference:
+// CHECK-64: (bound_generic_class reflect_existential.TestGeneric
+// CHECK-64:   (protocol_composition
+// CHECK-64:     (protocol reflect_existential.P)))
+
+// CHECK-64: Type info:
+// CHECK-64: (class_instance size=56 alignment=8 stride=56 num_extra_inhabitants=0
+// CHECK-64:   (field name=t offset=16
+// CHECK-64:     (opaque_existential size=40 alignment=8 stride=40 num_extra_inhabitants=0
+// CHECK-64:       (field name=metadata offset=24
+// CHECK-64:         (builtin size=8 alignment=8 stride=8 num_extra_inhabitants=2147483647))
+// CHECK-64:       (field name=wtable offset=32
+// CHECK-64:         (builtin size=8 alignment=8 stride=8 num_extra_inhabitants=1)))))
+
+// CHECK-32: Type reference:
+// CHECK-32: (bound_generic_class reflect_existential.TestGeneric
+// CHECK-32:   (protocol_composition
+// CHECK-32:     (protocol reflect_existential.P)))
+
+// CHECK-32: Type info:
+// CHECK-32: (class_instance size=32 alignment=4 stride=32 num_extra_inhabitants=0
+// CHECK-32:   (field name=t offset=12
+// CHECK-32:     (opaque_existential size=20 alignment=4 stride=20 num_extra_inhabitants=0
+// CHECK-32:       (field name=metadata offset=12
+// CHECK-32:         (builtin size=4 alignment=4 stride=4 num_extra_inhabitants=4096))
+// CHECK-32:       (field name=wtable offset=16
+// CHECK-32:         (builtin size=4 alignment=4 stride=4 num_extra_inhabitants=1)))))
+
+reflect(object: TestGeneric(D() as (P & AnyObject)))
+
+// CHECK-64: Type reference:
+// CHECK-64: (bound_generic_class reflect_existential.TestGeneric
+// CHECK-64:   (protocol_composition any_object
+// CHECK-64:     (protocol reflect_existential.P)))
+
+// CHECK-64: Type info:
+// CHECK-64: (class_instance size=32 alignment=8 stride=32 num_extra_inhabitants=0
+// CHECK-64:   (field name=t offset=16
+// CHECK-64:     (class_existential size=16 alignment=8 stride=16 num_extra_inhabitants=2147483647
+// CHECK-64:       (field name=object offset=0
+// CHECK-64:         (reference kind=strong refcounting=unknown))
+// CHECK-64:       (field name=wtable offset=8
+// CHECK-64:         (builtin size=8 alignment=8 stride=8 num_extra_inhabitants=1)))))
+
+// CHECK-32: Type reference:
+// CHECK-32: (bound_generic_class reflect_existential.TestGeneric
+// CHECK-32:   (protocol_composition any_object
+// CHECK-32:     (protocol reflect_existential.P)))
+
+// CHECK-32: Type info:
+// CHECK-32: (class_instance size=20 alignment=4 stride=20 num_extra_inhabitants=0
+// CHECK-32:   (field name=t offset=12
+// CHECK-32:     (class_existential size=8 alignment=4 stride=8 num_extra_inhabitants=4096
+// CHECK-32:       (field name=object offset=0
+// CHECK-32:         (reference kind=strong refcounting=unknown))
+// CHECK-32:       (field name=wtable offset=4
+// CHECK-32:         (builtin size=4 alignment=4 stride=4 num_extra_inhabitants=1)))))
+
+reflect(object: TestGeneric(D() as CP))
+
+// CHECK-64: Type reference:
+// CHECK-64: (bound_generic_class reflect_existential.TestGeneric
+// CHECK-64:   (protocol_composition any_object
+// CHECK-64:     (protocol reflect_existential.CP)))
+
+// CHECK-64: Type info:
+// CHECK-64: (class_instance size=32 alignment=8 stride=32 num_extra_inhabitants=0
+// CHECK-64:   (field name=t offset=16
+// CHECK-64:     (class_existential size=16 alignment=8 stride=16 num_extra_inhabitants=2147483647
+// CHECK-64:       (field name=object offset=0
+// CHECK-64:         (reference kind=strong refcounting=unknown))
+// CHECK-64:       (field name=wtable offset=8
+// CHECK-64:         (builtin size=8 alignment=8 stride=8 num_extra_inhabitants=1)))))
+
+// CHECK-32: Type reference:
+// CHECK-32: (bound_generic_class reflect_existential.TestGeneric
+// CHECK-32:   (protocol_composition any_object
+// CHECK-32:     (protocol reflect_existential.CP)))
+
+// CHECK-32: Type info:
+// CHECK-32: (class_instance size=20 alignment=4 stride=20 num_extra_inhabitants=0
+// CHECK-32:   (field name=t offset=12
+// CHECK-32:     (class_existential size=8 alignment=4 stride=8 num_extra_inhabitants=4096
+// CHECK-32:       (field name=object offset=0
+// CHECK-32:         (reference kind=strong refcounting=unknown))
+// CHECK-32:       (field name=wtable offset=4
+// CHECK-32:         (builtin size=4 alignment=4 stride=4 num_extra_inhabitants=1)))))
+
+reflect(object: TestGeneric(D() as (C & P)))
+
+// CHECK-64: Type reference:
+// CHECK-64: (bound_generic_class reflect_existential.TestGeneric
+// CHECK-64:   (protocol_composition any_object
+// CHECK-64:     (class reflect_existential.C)
+// CHECK-64:     (protocol reflect_existential.P)))
+
+// CHECK-64: Type info:
+// CHECK-64: (class_instance size=32 alignment=8 stride=32 num_extra_inhabitants=0
+// CHECK-64:   (field name=t offset=16
+// CHECK-64:     (class_existential size=16 alignment=8 stride=16 num_extra_inhabitants=2147483647
+// CHECK-64:       (field name=object offset=0
+// CHECK-64:         (reference kind=strong refcounting=native))
+// CHECK-64:       (field name=wtable offset=8
+// CHECK-64:         (builtin size=8 alignment=8 stride=8 num_extra_inhabitants=1)))))
+
+// CHECK-32: Type reference:
+// CHECK-32: (bound_generic_class reflect_existential.TestGeneric
+// CHECK-32:   (protocol_composition any_object
+// CHECK-32:     (class reflect_existential.C)
+// CHECK-32:     (protocol reflect_existential.P)))
+
+// CHECK-32: Type info:
+// CHECK-32: (class_instance size=20 alignment=4 stride=20 num_extra_inhabitants=0
+// CHECK-32:   (field name=t offset=12
+// CHECK-32:     (class_existential size=8 alignment=4 stride=8 num_extra_inhabitants=4096
+// CHECK-32:       (field name=object offset=0
+// CHECK-32:         (reference kind=strong refcounting=native))
+// CHECK-32:       (field name=wtable offset=4
+// CHECK-32:         (builtin size=4 alignment=4 stride=4 num_extra_inhabitants=1)))))
+
+doneReflecting()
+
+// CHECK-64: Done.
+
+// CHECK-32: Done.
diff --git a/validation-test/SIL/crashers/014-swift-sildeclref-sildeclref.sil b/validation-test/SIL/crashers/014-swift-sildeclref-sildeclref.sil
deleted file mode 100644
index 5981ae9..0000000
--- a/validation-test/SIL/crashers/014-swift-sildeclref-sildeclref.sil
+++ /dev/null
@@ -1,3 +0,0 @@
-// RUN: not --crash %target-sil-opt %s
-// REQUIRES: asserts
-class C}sil_vtable C{#C
diff --git a/validation-test/SIL/crashers/020-swift-moduledecl-lookupconformance.sil b/validation-test/SIL/crashers/020-swift-moduledecl-lookupconformance.sil
deleted file mode 100644
index 2f7c40f..0000000
--- a/validation-test/SIL/crashers/020-swift-moduledecl-lookupconformance.sil
+++ /dev/null
@@ -1,3 +0,0 @@
-// RUN: not --crash %target-sil-opt %s
-// REQUIRES: asserts
-enum l<V>:V
diff --git a/validation-test/SIL/crashers_fixed/014-swift-sildeclref-sildeclref.sil b/validation-test/SIL/crashers_fixed/014-swift-sildeclref-sildeclref.sil
new file mode 100644
index 0000000..a44ac38
--- /dev/null
+++ b/validation-test/SIL/crashers_fixed/014-swift-sildeclref-sildeclref.sil
@@ -0,0 +1,2 @@
+// RUN: not %target-sil-opt %s
+class C}sil_vtable C{#C
diff --git a/validation-test/SIL/crashers_fixed/020-swift-moduledecl-lookupconformance.sil b/validation-test/SIL/crashers_fixed/020-swift-moduledecl-lookupconformance.sil
new file mode 100644
index 0000000..4c43b48
--- /dev/null
+++ b/validation-test/SIL/crashers_fixed/020-swift-moduledecl-lookupconformance.sil
@@ -0,0 +1,2 @@
+// RUN: not %target-sil-opt %s
+enum l<V>:V
diff --git a/validation-test/compiler_crashers/28723-unreachable-executed-at-swift-lib-sema-csdiag-cpp-4012.swift b/validation-test/compiler_crashers/28743-swift-typechecker-substmembertypewithbase-swift-moduledecl-swift-typedecl-swift-.swift
similarity index 87%
copy from validation-test/compiler_crashers/28723-unreachable-executed-at-swift-lib-sema-csdiag-cpp-4012.swift
copy to validation-test/compiler_crashers/28743-swift-typechecker-substmembertypewithbase-swift-moduledecl-swift-typedecl-swift-.swift
index b2e68c7..fd6d161 100644
--- a/validation-test/compiler_crashers/28723-unreachable-executed-at-swift-lib-sema-csdiag-cpp-4012.swift
+++ b/validation-test/compiler_crashers/28743-swift-typechecker-substmembertypewithbase-swift-moduledecl-swift-typedecl-swift-.swift
@@ -6,5 +6,4 @@
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
 // RUN: not --crash %target-swift-frontend %s -emit-ir
-func t(UInt=__FUNCTION__
-func&t(
+protocol P}extension P{typealias a:Self.a{}func a:Self.a
diff --git a/validation-test/compiler_crashers/28723-unreachable-executed-at-swift-lib-sema-csdiag-cpp-4012.swift b/validation-test/compiler_crashers/28744-swift-genericenvironment-maptypeoutofcontext-swift-genericenvironment-swift-type.swift
similarity index 85%
copy from validation-test/compiler_crashers/28723-unreachable-executed-at-swift-lib-sema-csdiag-cpp-4012.swift
copy to validation-test/compiler_crashers/28744-swift-genericenvironment-maptypeoutofcontext-swift-genericenvironment-swift-type.swift
index b2e68c7..7c2f4bc 100644
--- a/validation-test/compiler_crashers/28723-unreachable-executed-at-swift-lib-sema-csdiag-cpp-4012.swift
+++ b/validation-test/compiler_crashers/28744-swift-genericenvironment-maptypeoutofcontext-swift-genericenvironment-swift-type.swift
@@ -6,5 +6,4 @@
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
 // RUN: not --crash %target-swift-frontend %s -emit-ir
-func t(UInt=__FUNCTION__
-func&t(
+protocol P extension P{var f=A.a}extension P{struct A{func a:Self
diff --git a/validation-test/compiler_crashers/28614-args-size-fnref-getnumargumentsforfullapply-partial-application-was-throwing.swift b/validation-test/compiler_crashers/28745-ty-getnominalorboundgenericnominal-ty-is-dynamicselftype-ty-isexistentialtype-ty.swift
similarity index 93%
rename from validation-test/compiler_crashers/28614-args-size-fnref-getnumargumentsforfullapply-partial-application-was-throwing.swift
rename to validation-test/compiler_crashers/28745-ty-getnominalorboundgenericnominal-ty-is-dynamicselftype-ty-isexistentialtype-ty.swift
index f1574a4..7461adb 100644
--- a/validation-test/compiler_crashers/28614-args-size-fnref-getnumargumentsforfullapply-partial-application-was-throwing.swift
+++ b/validation-test/compiler_crashers/28745-ty-getnominalorboundgenericnominal-ty-is-dynamicselftype-ty-isexistentialtype-ty.swift
@@ -5,6 +5,6 @@
 // See https://swift.org/LICENSE.txt for license information
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
-// RUN: not --crash %target-swift-frontend %s -emit-ir
 // REQUIRES: asserts
-func a{guard let[]=(a||()A
+// RUN: not --crash %target-swift-frontend %s -emit-ir
+&{LazyFilterIndex{
diff --git a/validation-test/compiler_crashers/28614-args-size-fnref-getnumargumentsforfullapply-partial-application-was-throwing.swift b/validation-test/compiler_crashers/28746-second-missing-second-type.swift
similarity index 92%
copy from validation-test/compiler_crashers/28614-args-size-fnref-getnumargumentsforfullapply-partial-application-was-throwing.swift
copy to validation-test/compiler_crashers/28746-second-missing-second-type.swift
index f1574a4..83b566d 100644
--- a/validation-test/compiler_crashers/28614-args-size-fnref-getnumargumentsforfullapply-partial-application-was-throwing.swift
+++ b/validation-test/compiler_crashers/28746-second-missing-second-type.swift
@@ -5,6 +5,6 @@
 // See https://swift.org/LICENSE.txt for license information
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
-// RUN: not --crash %target-swift-frontend %s -emit-ir
 // REQUIRES: asserts
-func a{guard let[]=(a||()A
+// RUN: not --crash %target-swift-frontend %s -emit-ir
+ReversedRandomAccessIndex.init((
diff --git a/validation-test/compiler_crashers/28614-args-size-fnref-getnumargumentsforfullapply-partial-application-was-throwing.swift b/validation-test/compiler_crashers/28748-genericenv-nullptr-too-much-circularity.swift
similarity index 88%
copy from validation-test/compiler_crashers/28614-args-size-fnref-getnumargumentsforfullapply-partial-application-was-throwing.swift
copy to validation-test/compiler_crashers/28748-genericenv-nullptr-too-much-circularity.swift
index f1574a4..7dd56b9 100644
--- a/validation-test/compiler_crashers/28614-args-size-fnref-getnumargumentsforfullapply-partial-application-was-throwing.swift
+++ b/validation-test/compiler_crashers/28748-genericenv-nullptr-too-much-circularity.swift
@@ -5,6 +5,6 @@
 // See https://swift.org/LICENSE.txt for license information
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
-// RUN: not --crash %target-swift-frontend %s -emit-ir
 // REQUIRES: asserts
-func a{guard let[]=(a||()A
+// RUN: not --crash %target-swift-frontend %s -emit-ir
+protocol A:a{{}typealias e:a}{}class a:A{typealias e:b
diff --git a/validation-test/compiler_crashers_2/0091-rdar30168645.swift b/validation-test/compiler_crashers_2/0091-rdar30168645.swift
deleted file mode 100644
index b2f561f..0000000
--- a/validation-test/compiler_crashers_2/0091-rdar30168645.swift
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: not --crash %target-swift-frontend -emit-ir -primary-file %s
-
-class Base<T: AnyObject> {}
-
-class Derived: Base<Derived> {}
diff --git a/validation-test/compiler_crashers_2_fixed/0091-rdar30168645.swift b/validation-test/compiler_crashers_2_fixed/0091-rdar30168645.swift
new file mode 100644
index 0000000..f1b0c90
--- /dev/null
+++ b/validation-test/compiler_crashers_2_fixed/0091-rdar30168645.swift
@@ -0,0 +1,5 @@
+// RUN: %target-swift-frontend -emit-ir -primary-file %s
+
+class Base<T: AnyObject> {}
+
+class Derived: Base<Derived> {}
diff --git a/validation-test/compiler_crashers_2_fixed/0093-sr-4471.swift b/validation-test/compiler_crashers_2_fixed/0093-sr-4471.swift
new file mode 100644
index 0000000..d35a046
--- /dev/null
+++ b/validation-test/compiler_crashers_2_fixed/0093-sr-4471.swift
@@ -0,0 +1,40 @@
+// RUN: %target-swift-frontend -primary-file %s -emit-ir
+
+protocol P: AnyObject {}
+protocol Foo {
+    // The compiler crash goes away if you remove the P constraint on this associated type
+    associatedtype ObjectType: P
+}
+
+protocol UpcastHelper {
+    associatedtype Sub: Foo
+    associatedtype Super: Foo
+
+    // ObjectIdentifier(object) == ObjectIdentifier(Self.cast(object))
+    static func cast(_ object: Sub.ObjectType) -> Super.ObjectType
+}
+
+
+struct AnyFoo<Object: P>: Foo {
+
+    typealias ObjectType = Object
+
+    class Base {}
+
+    final class Derived<Helper: UpcastHelper>: Base where Helper.Super == AnyFoo<Object> {
+
+        init(_ foo: Helper.Sub) {
+            self.foo = foo
+        }
+
+        let foo: Helper.Sub
+    }
+
+    init<Helper: UpcastHelper>
+        (foo: Helper.Sub, helper: Helper.Type)
+        where Helper.Super == AnyFoo<Object> {
+
+            // This is the expression that causes the crash
+            _ = Derived<Helper>(foo)
+    }
+}
diff --git a/validation-test/compiler_crashers_2_fixed/0094-rdar30689883.swift b/validation-test/compiler_crashers_2_fixed/0094-rdar30689883.swift
new file mode 100644
index 0000000..4d55024
--- /dev/null
+++ b/validation-test/compiler_crashers_2_fixed/0094-rdar30689883.swift
@@ -0,0 +1,52 @@
+// RUN: not %target-swift-frontend %s -emit-ir
+
+public struct Trie<Key: Hashable, Value> {
+
+    internal var root: TrieNode<Key, Value>
+
+    public init() {
+        self.root = TrieNode<Key, Value>()
+    }
+
+    public mutating func removeValue<C: Collection>(forCollection collection: C) -> Value? where C.Iterator.Element == Key {
+        return self.root.removeValue(forIterator: collection.makeIterator())
+    }
+
+    public mutating func updateValue<C: Collection>(_ value: Value, forCollection collection: C) -> Value? where C.Iterator.Element == Key {
+        return self.root.updateValue(value, forIterator: collection.makeIterator())
+    }
+
+    public func value<C: Collection>(forCollection collection: C) -> Value? where C.Iterator.Element == Key {
+        return self.root.value(forIterator: collection.makeIterator())
+    }
+}
+
+internal struct TrieNode<Key: Hashable, Value> {
+
+    internal let children: Dictionary<Key, TrieNode<Key, Value>>
+
+    internal let value: Value?
+
+    internal init(value: Value?=nil) {
+        self.children = Dictionary<Key, TrieNode<Key, Value>>()
+        self.value = value
+    }
+
+    internal mutating func removeValue<I: IteratorProtocol>(forIterator iterator: inout I) -> Value? where I.Element == Key {
+        return nil
+    }
+
+    internal mutating func updateValue<I: IteratorProtocol>(_ value: Value, forIterator iterator: inout I) -> Value? where I.Element == Key {
+        return nil
+    }
+
+    internal func value<I: IteratorProtocol>(forIterator iterator: inout I) -> Value? where I.Element == Key {
+        guard let key = iterator.next() else {
+            return value
+        }
+
+        return self.children[key]?.value(forIterator: iterator)
+    }
+}
+
+
diff --git a/validation-test/compiler_crashers_2_fixed/0095-rdar30154791.swift b/validation-test/compiler_crashers_2_fixed/0095-rdar30154791.swift
new file mode 100644
index 0000000..aa413b8
--- /dev/null
+++ b/validation-test/compiler_crashers_2_fixed/0095-rdar30154791.swift
@@ -0,0 +1,35 @@
+// RUN: not %target-swift-frontend %s -typecheck
+
+struct X<T> {}
+struct Y<T> {}
+
+protocol P {
+  associatedtype T = X<U>
+  associatedtype U
+
+  func foo() -> T
+}
+
+protocol Q: P {
+  func bar() -> T
+  func bas() -> U
+}
+
+extension P {
+  func foo() -> X<U> { fatalError() }
+}
+
+extension Q {
+  func foo() -> Y<U> { fatalError() }
+  func bar() -> Y<U> { fatalError() }
+}
+
+struct S {}
+
+extension S {
+  func bas() -> Int {}
+}
+extension S: Q {}
+
+let x: Y = S().foo()
+
diff --git a/validation-test/compiler_crashers_fixed/28604-isinheritedprotocolsvalid.swift b/validation-test/compiler_crashers_fixed/28604-isinheritedprotocolsvalid.swift
index 6bb1bc0..393133b 100644
--- a/validation-test/compiler_crashers_fixed/28604-isinheritedprotocolsvalid.swift
+++ b/validation-test/compiler_crashers_fixed/28604-isinheritedprotocolsvalid.swift
@@ -6,6 +6,5 @@
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
 // RUN: not %target-swift-frontend %s -emit-ir
-// XFAIL: *
 protocol a:b
 protocol b:Range<a>
diff --git a/validation-test/compiler_crashers/28614-args-size-fnref-getnumargumentsforfullapply-partial-application-was-throwing.swift b/validation-test/compiler_crashers_fixed/28614-args-size-fnref-getnumargumentsforfullapply-partial-application-was-throwing.swift
similarity index 87%
copy from validation-test/compiler_crashers/28614-args-size-fnref-getnumargumentsforfullapply-partial-application-was-throwing.swift
copy to validation-test/compiler_crashers_fixed/28614-args-size-fnref-getnumargumentsforfullapply-partial-application-was-throwing.swift
index f1574a4..3226bf8 100644
--- a/validation-test/compiler_crashers/28614-args-size-fnref-getnumargumentsforfullapply-partial-application-was-throwing.swift
+++ b/validation-test/compiler_crashers_fixed/28614-args-size-fnref-getnumargumentsforfullapply-partial-application-was-throwing.swift
@@ -5,6 +5,6 @@
 // See https://swift.org/LICENSE.txt for license information
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
-// RUN: not --crash %target-swift-frontend %s -emit-ir
+// RUN: not %target-swift-frontend %s -emit-ir
 // REQUIRES: asserts
 func a{guard let[]=(a||()A
diff --git a/validation-test/compiler_crashers/28701-false-should-have-found-context-by-now.swift b/validation-test/compiler_crashers_fixed/28701-false-should-have-found-context-by-now.swift
similarity index 83%
rename from validation-test/compiler_crashers/28701-false-should-have-found-context-by-now.swift
rename to validation-test/compiler_crashers_fixed/28701-false-should-have-found-context-by-now.swift
index 2ffb089..82bf0e7 100644
--- a/validation-test/compiler_crashers/28701-false-should-have-found-context-by-now.swift
+++ b/validation-test/compiler_crashers_fixed/28701-false-should-have-found-context-by-now.swift
@@ -5,6 +5,5 @@
 // See https://swift.org/LICENSE.txt for license information
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
-// REQUIRES: asserts
-// RUN: not --crash %target-swift-frontend %s -emit-ir
+// RUN: not %target-swift-frontend %s -emit-ir
 protocol P{class a}class C:P{protocol A:a
diff --git a/validation-test/compiler_crashers/28723-unreachable-executed-at-swift-lib-sema-csdiag-cpp-4012.swift b/validation-test/compiler_crashers_fixed/28723-unreachable-executed-at-swift-lib-sema-csdiag-cpp-4012.swift
similarity index 87%
rename from validation-test/compiler_crashers/28723-unreachable-executed-at-swift-lib-sema-csdiag-cpp-4012.swift
rename to validation-test/compiler_crashers_fixed/28723-unreachable-executed-at-swift-lib-sema-csdiag-cpp-4012.swift
index b2e68c7..3443962 100644
--- a/validation-test/compiler_crashers/28723-unreachable-executed-at-swift-lib-sema-csdiag-cpp-4012.swift
+++ b/validation-test/compiler_crashers_fixed/28723-unreachable-executed-at-swift-lib-sema-csdiag-cpp-4012.swift
@@ -5,6 +5,6 @@
 // See https://swift.org/LICENSE.txt for license information
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
-// RUN: not --crash %target-swift-frontend %s -emit-ir
+// RUN: not %target-swift-frontend %s -emit-ir
 func t(UInt=__FUNCTION__
 func&t(
diff --git a/validation-test/compiler_crashers/28725-gpdecl-getdepth-generictypeparamdecl-invaliddepth-parameter-hasnt-been-validated.swift b/validation-test/compiler_crashers_fixed/28725-gpdecl-getdepth-generictypeparamdecl-invaliddepth-parameter-hasnt-been-validated.swift
similarity index 84%
rename from validation-test/compiler_crashers/28725-gpdecl-getdepth-generictypeparamdecl-invaliddepth-parameter-hasnt-been-validated.swift
rename to validation-test/compiler_crashers_fixed/28725-gpdecl-getdepth-generictypeparamdecl-invaliddepth-parameter-hasnt-been-validated.swift
index b5c2bc5..16a903e 100644
--- a/validation-test/compiler_crashers/28725-gpdecl-getdepth-generictypeparamdecl-invaliddepth-parameter-hasnt-been-validated.swift
+++ b/validation-test/compiler_crashers_fixed/28725-gpdecl-getdepth-generictypeparamdecl-invaliddepth-parameter-hasnt-been-validated.swift
@@ -5,6 +5,5 @@
 // See https://swift.org/LICENSE.txt for license information
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
-// REQUIRES: asserts
-// RUN: not --crash %target-swift-frontend %s -emit-ir
+// RUN: not %target-swift-frontend %s -emit-ir
 struct B{let f=a}protocol P{}extension P{extension{func&(U=
diff --git a/validation-test/compiler_crashers/28727-objectty-haserror-cannot-have-errortype-wrapped-inside-lvaluetype.swift b/validation-test/compiler_crashers_fixed/28727-objectty-haserror-cannot-have-errortype-wrapped-inside-lvaluetype.swift
similarity index 84%
rename from validation-test/compiler_crashers/28727-objectty-haserror-cannot-have-errortype-wrapped-inside-lvaluetype.swift
rename to validation-test/compiler_crashers_fixed/28727-objectty-haserror-cannot-have-errortype-wrapped-inside-lvaluetype.swift
index 0b01481..6b31f89 100644
--- a/validation-test/compiler_crashers/28727-objectty-haserror-cannot-have-errortype-wrapped-inside-lvaluetype.swift
+++ b/validation-test/compiler_crashers_fixed/28727-objectty-haserror-cannot-have-errortype-wrapped-inside-lvaluetype.swift
@@ -5,6 +5,5 @@
 // See https://swift.org/LICENSE.txt for license information
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
-// REQUIRES: asserts
-// RUN: not --crash %target-swift-frontend %s -emit-ir
+// RUN: not %target-swift-frontend %s -emit-ir
 protocol P}extension P{lazy var f={extension{var f=((self
diff --git a/validation-test/compiler_crashers/28729-archetype-bad-generic-context-nesting.swift b/validation-test/compiler_crashers_fixed/28729-archetype-bad-generic-context-nesting.swift
similarity index 84%
rename from validation-test/compiler_crashers/28729-archetype-bad-generic-context-nesting.swift
rename to validation-test/compiler_crashers_fixed/28729-archetype-bad-generic-context-nesting.swift
index 361b334..f1f88e2 100644
--- a/validation-test/compiler_crashers/28729-archetype-bad-generic-context-nesting.swift
+++ b/validation-test/compiler_crashers_fixed/28729-archetype-bad-generic-context-nesting.swift
@@ -5,8 +5,7 @@
 // See https://swift.org/LICENSE.txt for license information
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
-// REQUIRES: asserts
-// RUN: not --crash %target-swift-frontend %s -emit-ir
+// RUN: not %target-swift-frontend %s -emit-ir
 protocol P{
 protocol
 P{typealias a{}struct B{extension{protocol P{
diff --git a/validation-test/compiler_crashers/28734-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift b/validation-test/compiler_crashers_fixed/28734-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift
similarity index 84%
rename from validation-test/compiler_crashers/28734-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift
rename to validation-test/compiler_crashers_fixed/28734-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift
index 0d4aaf2..06dd557 100644
--- a/validation-test/compiler_crashers/28734-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift
+++ b/validation-test/compiler_crashers_fixed/28734-conformingreplacementtype-is-substitutabletype-conformingreplacementtype-is-depe.swift
@@ -5,8 +5,7 @@
 // See https://swift.org/LICENSE.txt for license information
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
-// REQUIRES: asserts
-// RUN: not --crash %target-swift-frontend %s -emit-ir
+// RUN: not %target-swift-frontend %s -emit-ir
 protocol P{typealias a
 struct A{{}func a:a
 {
diff --git a/validation-test/compiler_crashers/28735-reftype-hastypeparameter-cannot-have-a-dependent-type-here.swift b/validation-test/compiler_crashers_fixed/28735-reftype-hastypeparameter-cannot-have-a-dependent-type-here.swift
similarity index 83%
rename from validation-test/compiler_crashers/28735-reftype-hastypeparameter-cannot-have-a-dependent-type-here.swift
rename to validation-test/compiler_crashers_fixed/28735-reftype-hastypeparameter-cannot-have-a-dependent-type-here.swift
index 7c5167b..cefd744 100644
--- a/validation-test/compiler_crashers/28735-reftype-hastypeparameter-cannot-have-a-dependent-type-here.swift
+++ b/validation-test/compiler_crashers_fixed/28735-reftype-hastypeparameter-cannot-have-a-dependent-type-here.swift
@@ -5,6 +5,5 @@
 // See https://swift.org/LICENSE.txt for license information
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
-// REQUIRES: asserts
-// RUN: not --crash %target-swift-frontend %s -emit-ir
+// RUN: not %target-swift-frontend %s -emit-ir
 protocol A{protocol A:A{class a{let c=a}typealias a
diff --git a/validation-test/compiler_crashers/28736-anonymous-namespacesilverifier-require.swift b/validation-test/compiler_crashers_fixed/28736-anonymous-namespacesilverifier-require.swift
similarity index 84%
rename from validation-test/compiler_crashers/28736-anonymous-namespacesilverifier-require.swift
rename to validation-test/compiler_crashers_fixed/28736-anonymous-namespacesilverifier-require.swift
index 0836066..0aae5e3 100644
--- a/validation-test/compiler_crashers/28736-anonymous-namespacesilverifier-require.swift
+++ b/validation-test/compiler_crashers_fixed/28736-anonymous-namespacesilverifier-require.swift
@@ -4,7 +4,7 @@
 //
 // See https://swift.org/LICENSE.txt for license information
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
-// RUN: not --crash %target-swift-frontend -primary-file %s -emit-ir -O
+// RUN: %target-swift-frontend -primary-file %s -emit-ir -O
 // non-fuzz (@dusek)
 
 func f<T>(_ a:T)->Void{f(nil as[Any]?)}
diff --git a/validation-test/compiler_crashers/28737-genericenv-nullptr-too-much-circularity.swift b/validation-test/compiler_crashers_fixed/28737-genericenv-nullptr-too-much-circularity.swift
similarity index 83%
rename from validation-test/compiler_crashers/28737-genericenv-nullptr-too-much-circularity.swift
rename to validation-test/compiler_crashers_fixed/28737-genericenv-nullptr-too-much-circularity.swift
index e5f6419..ea0ddfd 100644
--- a/validation-test/compiler_crashers/28737-genericenv-nullptr-too-much-circularity.swift
+++ b/validation-test/compiler_crashers_fixed/28737-genericenv-nullptr-too-much-circularity.swift
@@ -5,6 +5,5 @@
 // See https://swift.org/LICENSE.txt for license information
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
-// REQUIRES: asserts
-// RUN: not --crash %target-swift-frontend %s -emit-ir
+// RUN: not %target-swift-frontend %s -emit-ir
 protocol A:a{typealias e}class a:A{typealias e:S
diff --git a/validation-test/compiler_crashers/28741-anonymous-namespace-verifier-walktodeclpost-swift-decl.swift b/validation-test/compiler_crashers_fixed/28741-anonymous-namespace-verifier-walktodeclpost-swift-decl.swift
similarity index 88%
rename from validation-test/compiler_crashers/28741-anonymous-namespace-verifier-walktodeclpost-swift-decl.swift
rename to validation-test/compiler_crashers_fixed/28741-anonymous-namespace-verifier-walktodeclpost-swift-decl.swift
index 0ce6466..fea6551 100644
--- a/validation-test/compiler_crashers/28741-anonymous-namespace-verifier-walktodeclpost-swift-decl.swift
+++ b/validation-test/compiler_crashers_fixed/28741-anonymous-namespace-verifier-walktodeclpost-swift-decl.swift
@@ -5,6 +5,6 @@
 // See https://swift.org/LICENSE.txt for license information
 // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
 
-// RUN: not --crash %target-swift-frontend %s -emit-ir
+// RUN: not %target-swift-frontend %s -emit-ir
 protocol A{{}struct A{typealias a:Self
 protocol P{extension{lazy var f=A.a
diff --git a/validation-test/lit.site.cfg.in b/validation-test/lit.site.cfg.in
index 89b60d2..e7cff56 100644
--- a/validation-test/lit.site.cfg.in
+++ b/validation-test/lit.site.cfg.in
@@ -83,6 +83,11 @@
 
 config.available_features.add("CMAKE_GENERATOR=@CMAKE_GENERATOR@")
 
+if "@SWIFT_RUNTIME_ENABLE_BACKTRACE_REPORTING@" == "TRUE":
+    config.available_features.add('runtime-dladdr-backtraces')
+if "@SWIFT_RUNTIME_DLADDR_ALLOWED@" == "TRUE":
+    config.available_features.add('runtime-dladdr')
+
 # Let the main config do the real work.
 config.test_exec_root = os.path.dirname(os.path.realpath(__file__))
 lit_config.load_config(config, "@SWIFT_SOURCE_DIR@/validation-test/lit.cfg")
diff --git a/validation-test/stdlib/AnyHashable.swift.gyb b/validation-test/stdlib/AnyHashable.swift.gyb
index 7df045e..4a5ee24 100644
--- a/validation-test/stdlib/AnyHashable.swift.gyb
+++ b/validation-test/stdlib/AnyHashable.swift.gyb
@@ -539,7 +539,7 @@
 #if _runtime(_ObjC)
 // There is no public way to define new CF types, so we are using
 // CFBitVector and CFMutableBitVector.
-extension CFBitVector : Hashable {
+extension CFBitVector {
   static func makeImmutable(from values: Array<UInt8>) -> CFBitVector {
     return CFBitVectorCreate(/*allocator:*/ nil, values, values.count * 8)
   }
@@ -551,13 +551,6 @@
       &result)
     return result
   }
-  public var hashValue: Int {
-    // This is a bad hash function, but acceptable for tests.
-    return 0
-  }
-  public static func == (lhs: CFBitVector, rhs: CFBitVector) -> Bool {
-    return lhs.asArray == rhs.asArray
-  }
 }
 
 extension CFMutableBitVector {
diff --git a/validation-test/stdlib/CollectionDiagnostics.swift b/validation-test/stdlib/CollectionDiagnostics.swift
index 775fcee..f83e8b4 100644
--- a/validation-test/stdlib/CollectionDiagnostics.swift
+++ b/validation-test/stdlib/CollectionDiagnostics.swift
@@ -23,7 +23,7 @@
     fatalError("unreachable")
   }
 
-  // expected-note@+3 {{possibly intended match 'CollectionWithBadSubSequence.SubSequence' (aka 'OpaqueValue<Int8>') does not conform to 'Sequence'}}
+  // expected-note@+3 {{possibly intended match}}
   // expected-note@+2 {{possibly intended match}}
   // expected-note@+1 {{possibly intended match}}
   typealias SubSequence = OpaqueValue<Int8>
diff --git a/validation-test/stdlib/Dictionary.swift b/validation-test/stdlib/Dictionary.swift
index a21beed..752514b 100644
--- a/validation-test/stdlib/Dictionary.swift
+++ b/validation-test/stdlib/Dictionary.swift
@@ -478,6 +478,190 @@
   }
 }
 
+DictionaryTestSuite.test("COW.Fast.MergeDoesNotReallocate") {
+  do {
+    var d1 = getCOWFastDictionary()
+    var identity1 = d1._rawIdentifier()
+
+    // Merge some new values.
+    d1.merge([(40, 2040), (50, 2050)]) { _, y in y }
+    assert(identity1 == d1._rawIdentifier())
+    assert(d1.count == 5)
+    assert(d1[50]! == 2050)
+
+    // Merge and overwrite some existing values.
+    d1.merge([(10, 2010), (60, 2060)]) { _, y in y }
+    assert(identity1 == d1._rawIdentifier())
+    assert(d1.count == 6)
+    assert(d1[10]! == 2010)
+    assert(d1[60]! == 2060)
+
+    // Merge, keeping existing values.
+    d1.merge([(30, 2030), (70, 2070)]) { x, _ in x }
+    assert(identity1 == d1._rawIdentifier())
+    assert(d1.count == 7)
+    assert(d1[30]! == 1030)
+    assert(d1[70]! == 2070)
+  }
+
+  do {
+    var d1 = getCOWFastDictionary()
+    var identity1 = d1._rawIdentifier()
+
+    var d2 = d1
+    assert(identity1 == d1._rawIdentifier())
+    assert(identity1 == d2._rawIdentifier())
+
+    // Merge some new values.
+    d2.merge([(40, 2040), (50, 2050)]) { _, y in y }
+    assert(identity1 == d1._rawIdentifier())
+    assert(identity1 != d2._rawIdentifier())
+
+    assert(d1.count == 3)
+    assert(d1[10]! == 1010)
+    assert(d1[20]! == 1020)
+    assert(d1[30]! == 1030)
+    assert(d1[40] == nil)
+
+    assert(d2.count == 5)
+    assert(d2[10]! == 1010)
+    assert(d2[20]! == 1020)
+    assert(d2[30]! == 1030)
+    assert(d2[40]! == 2040)
+    assert(d2[50]! == 2050)
+
+    // Keep variables alive.
+    _fixLifetime(d1)
+    _fixLifetime(d2)
+  }
+
+  do {
+    var d1 = getCOWFastDictionary()
+    var identity1 = d1._rawIdentifier()
+
+    var d2 = d1
+    assert(identity1 == d1._rawIdentifier())
+    assert(identity1 == d2._rawIdentifier())
+
+    // Merge and overwrite some existing values.
+    d2.merge([(10, 2010)]) { _, y in y }
+    assert(identity1 == d1._rawIdentifier())
+    assert(identity1 != d2._rawIdentifier())
+
+    assert(d1.count == 3)
+    assert(d1[10]! == 1010)
+    assert(d1[20]! == 1020)
+    assert(d1[30]! == 1030)
+
+    assert(d2.count == 3)
+    assert(d2[10]! == 2010)
+    assert(d2[20]! == 1020)
+    assert(d2[30]! == 1030)
+
+    // Keep variables alive.
+    _fixLifetime(d1)
+    _fixLifetime(d2)
+  }
+
+  do {
+    var d1 = getCOWFastDictionary()
+    var identity1 = d1._rawIdentifier()
+
+    var d2 = d1
+    assert(identity1 == d1._rawIdentifier())
+    assert(identity1 == d2._rawIdentifier())
+
+    // Merge, keeping existing values.
+    d2.merge([(10, 2010)]) { x, _ in x }
+    assert(identity1 == d1._rawIdentifier())
+    assert(identity1 != d2._rawIdentifier())
+
+    assert(d1.count == 3)
+    assert(d1[10]! == 1010)
+    assert(d1[20]! == 1020)
+    assert(d1[30]! == 1030)
+
+    assert(d2.count == 3)
+    assert(d2[10]! == 1010)
+    assert(d2[20]! == 1020)
+    assert(d2[30]! == 1030)
+
+    // Keep variables alive.
+    _fixLifetime(d1)
+    _fixLifetime(d2)
+  }
+}
+
+DictionaryTestSuite.test("COW.Fast.DefaultedSubscriptDoesNotReallocate") {
+  do {
+    var d1 = getCOWFastDictionary()
+    var identity1 = d1._rawIdentifier()
+
+    // No mutation on access.
+    assert(d1[10, default: 0] + 1 == 1011)
+    assert(d1[40, default: 0] + 1 == 1)
+    assert(identity1 == d1._rawIdentifier())
+    assert(d1[10]! == 1010)
+
+    // Increment existing in place.
+    d1[10, default: 0] += 1
+    assert(identity1 == d1._rawIdentifier())
+    assert(d1[10]! == 1011)
+
+    // Add incremented default value.
+    d1[40, default: 0] += 1
+    assert(identity1 == d1._rawIdentifier())
+    assert(d1[40]! == 1)
+  }
+
+  do {
+    var d1 = getCOWFastDictionary()
+    var identity1 = d1._rawIdentifier()
+
+    var d2 = d1
+    assert(identity1 == d1._rawIdentifier())
+    assert(identity1 == d2._rawIdentifier())
+
+    // No mutation on access.
+    assert(d2[10, default: 0] + 1 == 1011)
+    assert(d2[40, default: 0] + 1 == 1)
+    assert(identity1 == d1._rawIdentifier())
+    assert(identity1 == d2._rawIdentifier())
+
+    // Increment existing in place.
+    d2[10, default: 0] += 1
+    assert(identity1 == d1._rawIdentifier())
+    assert(identity1 != d2._rawIdentifier())
+
+    assert(d1[10]! == 1010)
+    assert(d2[10]! == 1011)
+
+    // Keep variables alive.
+    _fixLifetime(d1)
+    _fixLifetime(d2)
+  }
+
+  do {
+    var d1 = getCOWFastDictionary()
+    var identity1 = d1._rawIdentifier()
+
+    var d2 = d1
+    assert(identity1 == d1._rawIdentifier())
+    assert(identity1 == d2._rawIdentifier())
+
+    // Add incremented default value.
+    d2[40, default: 0] += 1
+    assert(identity1 == d1._rawIdentifier())
+    assert(identity1 != d2._rawIdentifier())
+
+    assert(d1[40] == nil)
+    assert(d2[40]! == 1)
+
+    // Keep variables alive.
+    _fixLifetime(d1)
+    _fixLifetime(d2)
+  }
+}
 
 DictionaryTestSuite.test("COW.Fast.IndexForKeyDoesNotReallocate") {
   var d = getCOWFastDictionary()
@@ -978,6 +1162,96 @@
   assert(identity2 == d2._rawIdentifier())
 }
 
+//===---
+// Keys and Values collection tests.
+//===---
+
+DictionaryTestSuite.test("COW.Fast.ValuesAccessDoesNotReallocate") {
+  var d1 = getCOWFastDictionary()
+  var identity1 = d1._rawIdentifier()
+  
+  assert([1010, 1020, 1030] == d1.values.sorted())
+  assert(identity1 == d1._rawIdentifier())
+  
+  var d2 = d1
+  assert(identity1 == d2._rawIdentifier())
+  
+  let i = d2.index(forKey: 10)!
+  assert(d1.values[i] == 1010)
+  assert(d1[i] == (10, 1010))
+  
+#if swift(>=4.0)
+  d2.values[i] += 1
+  assert(d2.values[i] == 1011)
+  assert(d2[10]! == 1011)
+  assert(identity1 != d2._rawIdentifier())
+#endif
+  
+  assert(d1[10]! == 1010)
+  assert(identity1 == d1._rawIdentifier())
+  
+  checkCollection(
+    Array(d1.values),
+    d1.values,
+    stackTrace: SourceLocStack())
+  { $0 == $1 }
+}
+
+DictionaryTestSuite.test("COW.Fast.KeysAccessDoesNotReallocate") {
+  var d1 = getCOWFastDictionary()
+  var identity1 = d1._rawIdentifier()
+  
+  assert([10, 20, 30] == d1.keys.sorted())
+
+  let i = d1.index(forKey: 10)!
+  assert(d1.keys[i] == 10)
+  assert(d1[i] == (10, 1010))
+  assert(identity1 == d1._rawIdentifier())
+
+  checkCollection(
+    Array(d1.keys),
+    d1.keys,
+    stackTrace: SourceLocStack())
+  { $0 == $1 }
+  
+  do {
+    var d2: [MinimalHashableValue : Int] = [
+      MinimalHashableValue(10): 1010,
+      MinimalHashableValue(20): 1020,
+      MinimalHashableValue(30): 1030,
+      MinimalHashableValue(40): 1040,
+      MinimalHashableValue(50): 1050,
+      MinimalHashableValue(60): 1060,
+      MinimalHashableValue(70): 1070,
+      MinimalHashableValue(80): 1080,
+      MinimalHashableValue(90): 1090,
+    ]
+    
+    // Find the last key in the dictionary
+    var lastKey: MinimalHashableValue = d2.first!.key
+    for i in d2.indices { lastKey = d2[i].key }
+
+    // index(where:) - linear search
+    MinimalHashableValue.timesEqualEqualWasCalled = 0
+    let j = d2.index(where: { (k, _) in k == lastKey })!
+    expectGE(MinimalHashableValue.timesEqualEqualWasCalled, 8)
+
+    // index(forKey:) - O(1) bucket + linear search
+    MinimalHashableValue.timesEqualEqualWasCalled = 0
+    let k = d2.index(forKey: lastKey)!
+    expectLE(MinimalHashableValue.timesEqualEqualWasCalled, 4)
+    
+    // keys.index(of:) - O(1) bucket + linear search
+    MinimalHashableValue.timesEqualEqualWasCalled = 0
+    let l = d2.keys.index(of: lastKey)!
+#if swift(>=4.0)
+    expectLE(MinimalHashableValue.timesEqualEqualWasCalled, 4)
+#endif
+
+    expectEqual(j, k)
+    expectEqual(k, l)
+  }
+}
 
 //===---
 // Native dictionary tests.
@@ -1165,6 +1439,146 @@
   }
 }
 
+DictionaryTestSuite.test("init(uniqueKeysWithValues:)") {
+  do {
+    var d = Dictionary(uniqueKeysWithValues: [(10, 1010), (20, 1020), (30, 1030)])
+    expectEqual(d.count, 3)
+    expectEqual(d[10]!, 1010)
+    expectEqual(d[20]!, 1020)
+    expectEqual(d[30]!, 1030)
+    expectNil(d[1111])
+  }
+  do {
+    var d = Dictionary<Int, Int>(uniqueKeysWithValues: EmptyCollection<(Int, Int)>())
+    expectEqual(d.count, 0)
+    expectNil(d[1111])
+  }
+  do {
+    expectCrashLater()
+    var d = Dictionary(uniqueKeysWithValues: [(10, 1010), (20, 1020), (10, 2010)])
+  }
+}
+
+DictionaryTestSuite.test("init(_:uniquingKeysWith:)") {
+  do {
+    var d = Dictionary(
+      [(10, 1010), (20, 1020), (30, 1030), (10, 2010)], uniquingKeysWith: min)
+    expectEqual(d.count, 3)
+    expectEqual(d[10]!, 1010)
+    expectEqual(d[20]!, 1020)
+    expectEqual(d[30]!, 1030)
+    expectNil(d[1111])
+  }
+  do {
+    var d = Dictionary(
+      [(10, 1010), (20, 1020), (30, 1030), (10, 2010)] as [(Int, Int)],
+      uniquingKeysWith: +)
+    expectEqual(d.count, 3)
+    expectEqual(d[10]!, 3020)
+    expectEqual(d[20]!, 1020)
+    expectEqual(d[30]!, 1030)
+    expectNil(d[1111])
+  }
+  do {
+    var d = Dictionary([(10, 1010), (20, 1020), (30, 1030), (10, 2010)]) {
+      (a, b) in Int("\(a)\(b)")!
+    }
+    expectEqual(d.count, 3)
+    expectEqual(d[10]!, 10102010)
+    expectEqual(d[20]!, 1020)
+    expectEqual(d[30]!, 1030)
+    expectNil(d[1111])
+  }
+  do {
+    var d = Dictionary([(10, 1010), (10, 2010), (10, 3010), (10, 4010)]) { $1 }
+    expectEqual(d.count, 1)
+    expectEqual(d[10]!, 4010)
+    expectNil(d[1111])
+  }
+  do {
+    var d = Dictionary(EmptyCollection<(Int, Int)>(), uniquingKeysWith: min)
+    expectEqual(d.count, 0)
+    expectNil(d[1111])
+  }
+
+  struct TE: Error {}
+  do {
+    // No duplicate keys, so no error thrown.
+    var d1 = try Dictionary([(10, 1), (20, 2), (30, 3)]) { _ in throw TE() }
+    expectEqual(d1.count, 3)
+    // Duplicate keys, should throw error.
+    var d2 = try Dictionary([(10, 1), (10, 2)]) { _ in throw TE() }
+    assertionFailure()
+  } catch {
+    assert(error is TE)
+  }
+}
+
+DictionaryTestSuite.test("init(grouping:by:)") {
+  let r = 0..<10
+
+  let d1 = Dictionary(grouping: r, by: { $0 % 3 })
+  expectEqual(3, d1.count)
+  expectEqual([0, 3, 6, 9], d1[0]!)
+  expectEqual([1, 4, 7], d1[1]!)
+  expectEqual([2, 5, 8], d1[2]!)
+
+  let d2 = Dictionary(grouping: r, by: { $0 })
+  expectEqual(10, d2.count)
+
+  let d3 = Dictionary(grouping: 0..<0, by: { $0 })
+  expectEqual(0, d3.count)
+}
+
+DictionaryTestSuite.test("mapValues(_:)") {
+  let d1 = [10: 1010, 20: 1020, 30: 1030]
+  let d2 = d1.mapValues(String.init)
+
+  expectEqual(d1.count, d2.count)
+  expectEqual(d1.keys.first, d2.keys.first)
+
+  for (key, value) in d1 {
+    expectEqual(String(d1[key]!), d2[key]!)
+  }
+
+  do {
+    var d3: [MinimalHashableValue : Int] = Dictionary(
+      uniqueKeysWithValues: d1.lazy.map { (MinimalHashableValue($0), $1) })
+    expectEqual(d3.count, 3)
+    MinimalHashableValue.timesEqualEqualWasCalled = 0
+    MinimalHashableValue.timesHashValueWasCalled = 0
+
+    // Calling mapValues shouldn't ever recalculate any hashes.
+    let d4 = d3.mapValues(String.init)
+    expectEqual(d4.count, d3.count)
+    expectEqual(0, MinimalHashableValue.timesEqualEqualWasCalled)
+    expectEqual(0, MinimalHashableValue.timesHashValueWasCalled)
+  }
+}
+
+DictionaryTestSuite.test("capacity/reserveCapacity(_:)") {
+  var d1 = [10: 1010, 20: 1020, 30: 1030]
+  expectEqual(3, d1.capacity)
+  d1[40] = 1040
+  expectEqual(6, d1.capacity)
+
+  // Reserving new capacity jumps up to next limit.
+  d1.reserveCapacity(7)
+  expectEqual(12, d1.capacity)
+
+  // Can reserve right up to a limit.
+  d1.reserveCapacity(24)
+  expectEqual(24, d1.capacity)
+
+  // Fill up to the limit, no reallocation.
+  d1.merge(stride(from: 50, through: 240, by: 10).lazy.map { ($0, 1000 + $0) },
+    uniquingKeysWith: { _ in fatalError() })
+  expectEqual(24, d1.count)
+  expectEqual(24, d1.capacity)
+  d1[250] = 1250
+  expectEqual(48, d1.capacity)
+}
+
 #if _runtime(_ObjC)
 //===---
 // NSDictionary -> Dictionary bridging tests.
diff --git a/validation-test/stdlib/HashedCollectionFilter3.swift b/validation-test/stdlib/HashedCollectionFilter3.swift
new file mode 100644
index 0000000..8084777
--- /dev/null
+++ b/validation-test/stdlib/HashedCollectionFilter3.swift
@@ -0,0 +1,37 @@
+// RUN: %target-run-stdlib-swift -swift-version 3
+// REQUIRES: executable_test
+
+import StdlibUnittest
+
+var FilterTestSuite = TestSuite("HashedCollectionFilter")
+
+FilterTestSuite.test("Dictionary.filter(_:) -> [(Key, Value)]") {
+  let d = [10: 1010, 20: 1020, 30: 1030, 40: 1040]
+  let f: Any = d.filter { (k, v) in k > 20 }
+  expectTrue(f is [(Int, Int)])
+}
+
+FilterTestSuite.test("Set.filter(_:) -> [Element]") {
+  let s: Set = [10, 20, 30, 40]
+  let f: Any = s.filter { $0 > 20 }
+  expectTrue(f is [Int])
+}
+
+FilterTestSuite.test("Dictionary.keys -> LazyMapCollection") {
+  let d = [10: 1010, 20: 1020, 30: 1030, 40: 1040]
+  // .keys should produce a LazyMapCollection in Swift 3
+  let f: Any = d.keys
+  let g = f as! LazyMapCollection<[Int: Int], Int>
+  expectEqual(4, g.count)
+}
+
+FilterTestSuite.test("Dictionary.values -> LazyMapCollection") {
+  let d = [10: 1010, 20: 1020, 30: 1030, 40: 1040]
+  // .values should produce a LazyMapCollection in Swift 3
+  let f: Any = d.values
+  let g = f as! LazyMapCollection<[Int: Int], Int>
+  expectEqual(4, g.count)
+}
+
+runAllTests()
+
diff --git a/validation-test/stdlib/HashedCollectionFilter4.swift b/validation-test/stdlib/HashedCollectionFilter4.swift
new file mode 100644
index 0000000..f455ebd
--- /dev/null
+++ b/validation-test/stdlib/HashedCollectionFilter4.swift
@@ -0,0 +1,59 @@
+// RUN: %target-run-stdlib-swift -swift-version 4
+// REQUIRES: executable_test
+
+import StdlibUnittest
+
+var FilterTestSuite = TestSuite("HashedCollectionFilter")
+
+FilterTestSuite.test("Dictionary.filter(_:) -> [Key: Value]")
+  .xfail(.always("Not actually running under Swift 4")).code
+{
+  let d = [10: 1010, 20: 1020, 30: 1030, 40: 1040]
+  // filter(_:) should produce a dictionary in Swift 4
+  let f: Any = d.filter { $0.key > 20 }
+  expectTrue(f is [Int: Int])
+}
+
+FilterTestSuite.test("Dictionary.filter(_:) -> [(Key, Value)] available") {
+  let d = [10: 1010, 20: 1020, 30: 1030, 40: 1040]
+  // The Array-returning version from Sequence should still be accessible
+  let f: [(Int, Int)] = d.filter { $0.key > 20 }
+  expectEqual(2, f.count)
+}
+
+FilterTestSuite.test("Set.filter(_:) -> Set<Element>")
+  .xfail(.always("Not actually running under Swift 4")).code
+{
+  let s: Set = [10, 20, 30, 40]
+  // filter(_:) should produce a set in Swift 4
+  let f: Any = s.filter { $0 > 20 }
+  expectTrue(f is Set<Int>)
+}
+
+FilterTestSuite.test("Set.filter(_:) -> [Element] available") {
+  let s: Set = [10, 20, 30, 40]
+  // The Array-returning version from Sequence should still be accessible
+  let f: [Int] = s.filter { $0 > 20 }
+  expectEqual(2, f.count)
+}
+
+FilterTestSuite.test("Dictionary.keys -> Keys")
+  .xfail(.always("Not actually running under Swift 4")).code
+{
+  let d = [10: 1010, 20: 1020, 30: 1030, 40: 1040]
+  // .keys should produce a Dictionary.Keys in Swift 4
+  let f: Any = d.keys
+  expectTrue(f is Dictionary<Int, Int>.Keys)
+}
+
+FilterTestSuite.test("Dictionary.values -> Values")
+  .xfail(.always("Not actually running under Swift 4")).code
+{
+  let d = [10: 1010, 20: 1020, 30: 1030, 40: 1040]
+  // .values should produce a Dictionary.Values in Swift 4
+  let f: Any = d.values
+  expectTrue(f is Dictionary<Int, Int>.Values)
+}
+
+runAllTests()
+
diff --git a/validation-test/stdlib/NSNumberBridging.swift.gyb b/validation-test/stdlib/NSNumberBridging.swift.gyb
deleted file mode 100644
index acd9f27..0000000
--- a/validation-test/stdlib/NSNumberBridging.swift.gyb
+++ /dev/null
@@ -1,304 +0,0 @@
-// RUN: %target-run-simple-swiftgyb
-// REQUIRES: executable_test
-// REQUIRES: objc_interop
-
-import Foundation
-import CoreGraphics
-import StdlibUnittest
-
-let NSNumberTests = TestSuite("NSNumber")
-
-extension Int {
-  static var _interestingValues: [Int] {
-    return [
-      Int.min,
-      Int.min + 1,
-      Int.max,
-      Int.max - 1,
-      0,
-      -1, 1,
-      -42, 42,
-    ]
-  }
-}
-
-extension UInt {
-  static var _interestingValues: [UInt] {
-    return [
-      UInt.min,
-      UInt.min + 1,
-      UInt.max,
-      UInt.max - 1,
-      42,
-    ]
-  }
-}
-
-% for Self in ['Float', 'Double', 'CGFloat']:
-extension ${Self} {
-  static var _interestingValues: [${Self}] {
-    return [
-      -${Self}.infinity,
-      -${Self}.greatestFiniteMagnitude,
-      -1.0,
-      -${Self}.ulpOfOne,
-      -${Self}.leastNormalMagnitude,
-      -0.0,
-      0.0,
-      ${Self}.leastNormalMagnitude,
-      ${Self}.ulpOfOne,
-      1.0,
-      ${Self}.greatestFiniteMagnitude,
-      ${Self}.infinity,
-      ${Self}.nan,
-    ]
-  }
-}
-% end
-
-extension Bool {
-  static var _interestingValues: [Bool] {
-    return [false, true]
-  }
-}
-
-% for Self in ['Int', 'UInt', 'Float', 'Double', 'CGFloat']:
-NSNumberTests.test("${Self}.init(_: NSNumber)")
-  .forEach(in: ${Self}._interestingValues) {
-  input in
-%   if Self in ['Float', 'Double']:
-  expectEqual(input.bitPattern, ${Self}(NSNumber(value: input)).bitPattern)
-%   elif Self == 'CGFloat':
-  expectEqual(input.bitPattern, ${Self}(NSNumber(value: input.native)).bitPattern)
-%   else:
-  expectEqual(input, ${Self}(NSNumber(value: input)))
-%   end
-}
-% end
-
-NSNumberTests.test("Bool.init(_: NSNumber)") {
-  expectFalse(Bool(NSNumber(value: false)))
-  expectTrue(Bool(NSNumber(value: true)))
-
-  expectFalse(Bool(NSNumber(value: 0)))
-  expectTrue(Bool(NSNumber(value: 1)))
-  expectTrue(Bool(NSNumber(value: 2)))
-  expectFailure {
-#if os(OSX)
-    // FIXME: failure due to rdar://problem/27514021.
-    expectTrue(Bool(NSNumber(value: Int.min)))
-#else
-    // The above does not consistently fail on all platforms.
-    expectTrue(false)
-#endif
-  }
-  expectTrue(Bool(NSNumber(value: Int.min + 1)))
-  expectTrue(Bool(NSNumber(value: Int.max)))
-}
-
-func isTypePreservingNSNumber(_ n: NSNumber) -> Bool {
-  let className = String(describing: type(of: n))
-  return className.range(of: "_SwiftTypePreservingNSNumber") != nil
-}
-
-NSNumberTests.test("isTypePreservingNSNumber(_:)") {
-  expectFalse(isTypePreservingNSNumber(NSNumber(value: 42)))
-  expectFalse(isTypePreservingNSNumber(NSNumber(value: false)))
-}
-
-NSNumberTests.test("_SwiftTypePreservingNSNumber.classForCoder") {
-  // Check that internal subclass is not archived.
-  let n: NSNumber = (42 as Int)._bridgeToObjectiveC()
-  expectTrue(isTypePreservingNSNumber(n))
-  expectEqual("NSNumber", String(describing: n.classForCoder))
-  expectEqual("NSNumber", String(describing: n.classForKeyedArchiver!))
-}
-
-NSNumberTests.test("_SwiftTypePreservingNSNumber.init(coder:)")
-  .crashOutputMatches("_SwiftTypePreservingNSNumber should not be archived.")
-  .code {
-  let n: NSNumber = (42 as Int)._bridgeToObjectiveC()
-  expectTrue(isTypePreservingNSNumber(n))
-  let _SwiftTypePreservingNSNumberType: NSNumber.Type = type(of: n)
-  let coder = NSKeyedUnarchiver(forReadingWith: Data([0]))
-  expectCrashLater()
-  _ = _SwiftTypePreservingNSNumberType.init(coder: coder)
-}
-
-NSNumberTests.test("_SwiftTypePreservingNSNumber.copy(zone:)") {
-  let n: NSNumber = (42 as Int)._bridgeToObjectiveC()
-  expectTrue(isTypePreservingNSNumber(n))
-  let copy = n.copy() as AnyObject
-  expectTrue(n === copy)
-}
-
-% for Self in ['Int', 'UInt']:
-extension ${Self} {
-  func toNSNumberByteArray() -> [UInt8] {
-    var v = self
-    var result: [UInt8] = []
-    for _ in 0 ..< MemoryLayout<${Self}>.size {
-      result.append(UInt8(v & 0xff))
-      v = v >> 8
-    }
-    return result
-  }
-}
-% end
-
-% for Self in ['Float', 'Double']:
-extension ${Self} {
-  func toNSNumberByteArray() -> [UInt8] {
-    var v = self.bitPattern
-    var result: [UInt8] = []
-    for _ in 0 ..< MemoryLayout.size(ofValue: v) {
-      result.append(UInt8(v & 0xff))
-      v = v >> 8
-    }
-    return result
-  }
-}
-% end
-
-extension CGFloat {
-  func toNSNumberByteArray() -> [UInt8] {
-    return native.toNSNumberByteArray()
-  }
-}
-
-extension Bool {
-  func toNSNumberByteArray() -> [UInt8] {
-    return self ? [1] : [0]
-  }
-}
-
-func testNSNumberGetValueAndObjCType(
-  instance n: NSNumber,
-  expectedBytes: [UInt8],
-  expectedObjCType: String
-) {
-  var a = [UInt8](repeating: 0xaa, count: 32)
-  var b = [UInt8](repeating: 0xbb, count: 32)
-  n.getValue(&a)
-  n.getValue(&b)
-  let ab = Array(zip(a, b))
-  let count = ab.index { $0.0 == 0xaa && $0.1 == 0xbb }!
-  // Check that `getValue` does not overwrite more bytes than needed.
-  expectEqual(expectedBytes.count, count)
-  expectEqualSequence(expectedBytes, a[0..<count])
-  expectEqualSequence(expectedBytes, b[0..<count])
-
-  let objCType = String(cString: n.objCType)
-  expectEqual(expectedObjCType, objCType)
-}
-
-% for Self in ['Int', 'UInt', 'Float', 'Double', 'CGFloat', 'Bool']:
-NSNumberTests.test("_SwiftTypePreservingNSNumber(${Self}).getValue(_:), objCType")
-  .forEach(in: ${Self}._interestingValues) {
-  input in
-  let bridgedNSNumber = input._bridgeToObjectiveC()
-%   if Self == 'Bool':
-  expectTrue(CFGetTypeID(bridgedNSNumber) == CFBooleanGetTypeID())
-%   else:
-  expectTrue(isTypePreservingNSNumber(bridgedNSNumber))
-%   end
-
-  let expectedObjCType: String
-%   if Self == 'Int':
-#if arch(i386) || arch(arm)
-  expectedObjCType = "i"
-#elseif arch(x86_64) || arch(arm64)
-  expectedObjCType = "q"
-#else
-  _UnknownArchError()
-#endif
-%   elif Self == 'UInt':
-#if arch(i386) || arch(arm)
-  expectedObjCType = "I"
-#elseif arch(x86_64) || arch(arm64)
-  expectedObjCType = "Q"
-#else
-  _UnknownArchError()
-#endif
-%   elif Self == 'Float':
-  expectedObjCType = "f"
-%   elif Self == 'Double':
-  expectedObjCType = "d"
-%   elif Self == 'CGFloat':
-#if arch(i386) || arch(arm)
-  expectedObjCType = "f"
-#elseif arch(x86_64) || arch(arm64)
-  expectedObjCType = "d"
-#else
-  _UnknownArchError()
-#endif
-%   elif Self == 'Bool':
-  // NSNumber always encodes booleans as 'signed char', even on platforms where
-  // ObjCBool is a true Bool. This is a very old compatibility concern.
-  expectedObjCType = "c"
-%   else:
-  _UnknownTypeError()
-%   end
-
-  testNSNumberGetValueAndObjCType(
-    instance: bridgedNSNumber,
-    expectedBytes: input.toNSNumberByteArray(),
-    expectedObjCType: expectedObjCType)
-}
-% end
-
-% for Self in ['Int', 'UInt', 'Float', 'Double', 'CGFloat', 'Bool']:
-NSNumberTests.test("${Self} bridges to NSNumber (actually _SwiftTypePreservingNSNumber) with a custom AnyHashable")
-  .forEach(in: ${Self}._interestingValues) {
-  input in
-  // Bridged NSNumbers preserve the Swift type when put into AnyHashable.
-  let bridgedNSNumber = input._bridgeToObjectiveC()
-%   if Self == 'Bool':
-  expectTrue(CFGetTypeID(bridgedNSNumber) == CFBooleanGetTypeID())
-%   else:
-  expectTrue(isTypePreservingNSNumber(bridgedNSNumber))
-%   end
-  expectNotNil(bridgedNSNumber._toCustomAnyHashable())
-
-  // Explicitly constructed NSNumbers don't have a special AnyHashable
-  // representation.
-%   if Self == 'CGFloat':
-  let explicitNSNumber = NSNumber(value: input.native)
-%   elif Self == 'Bool':
-  // Bool actually /is/ type-preserving for NSNumber. Use a dummy value instead.
-  let explicitNSNumber = NSNumber(value: (input ? 1 : 0) as Int8)
-%   else:
-  let explicitNSNumber = NSNumber(value: input)
-%   end
-  expectFalse(isTypePreservingNSNumber(explicitNSNumber))
-  expectNil(explicitNSNumber._toCustomAnyHashable())
-  expectTrue(
-    Set(["__NSCFNumber", "__NSCFBoolean"]).contains(
-      String(describing: type(of: AnyHashable(explicitNSNumber).base))))
-  expectEqual(AnyHashable(explicitNSNumber), AnyHashable(explicitNSNumber))
-
-  let ah = AnyHashable(bridgedNSNumber)
-  expectEqual(${Self}.self, type(of: ah.base))
-%   if Self in ['Float', 'Double', 'CGFloat']:
-  // FIXME: remove special cases for floating point when we fix their
-  // conformances to Equatable.
-  if !input.isNaN {
-    expectEqual(input, ah.base as! ${Self})
-    expectEqual(AnyHashable(input), ah)
-  } else {
-    expectNotEqual(input, ah.base as! ${Self})
-    expectNotEqual(AnyHashable(input), ah)
-  }
-%   else:
-  expectEqual(input, ah.base as! ${Self})
-  expectEqual(AnyHashable(input), ah)
-%   end
-
-  // Bridged and explicitly constructed NSNumbers have different AnyHashable
-  // representations.
-  expectNotEqual(AnyHashable(explicitNSNumber), ah)
-}
-% end
-
-runAllTests()
-
diff --git a/validation-test/stdlib/Set.swift b/validation-test/stdlib/Set.swift
index 59d4007..1e968eb 100644
--- a/validation-test/stdlib/Set.swift
+++ b/validation-test/stdlib/Set.swift
@@ -3491,6 +3491,28 @@
   expectNil(emptySet.first)
 }
 
+SetTestSuite.test("capacity/reserveCapacity(_:)") {
+  var s1: Set = [10, 20, 30]
+  expectEqual(3, s1.capacity)
+  s1.insert(40)
+  expectEqual(6, s1.capacity)
+
+  // Reserving new capacity jumps up to next limit.
+  s1.reserveCapacity(7)
+  expectEqual(12, s1.capacity)
+
+  // Can reserve right up to a limit.
+  s1.reserveCapacity(24)
+  expectEqual(24, s1.capacity)
+
+  // Fill up to the limit, no reallocation.
+  s1.formUnion(stride(from: 50, through: 240, by: 10))
+  expectEqual(24, s1.count)
+  expectEqual(24, s1.capacity)
+  s1.insert(250)
+  expectEqual(48, s1.capacity)
+}
+
 SetTestSuite.test("isEmpty") {
   let s1 = Set([1010, 2020, 3030])
   expectFalse(s1.isEmpty)
diff --git a/validation-test/stdlib/ValidationNSNumberBridging.swift b/validation-test/stdlib/ValidationNSNumberBridging.swift
new file mode 100644
index 0000000..07fdb85
--- /dev/null
+++ b/validation-test/stdlib/ValidationNSNumberBridging.swift
@@ -0,0 +1,838 @@
+//===--- NSNumberBridging.swift - Test bridging through NSNumber ----------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+// RUN: %target-run-simple-swift
+// REQUIRES: executable_test
+// REQUIRES: objc_interop
+
+
+import StdlibUnittest
+import Foundation
+import CoreGraphics
+
+var nsNumberBridging = TestSuite("NSNumberBridgingValidation")
+
+func testFloat(_ lhs: Float?, _ rhs: Float?, file: String = #file, line: UInt = #line) {
+    let message = "\(String(describing: lhs)) != \(String(describing: rhs)) Float"
+    if let lhsValue = lhs {
+        if let rhsValue = rhs {
+            if lhsValue.isNaN != rhsValue.isNaN {
+                expectUnreachable(message, file: file, line: line)
+            } else if lhsValue != rhsValue && !lhsValue.isNaN {
+                expectUnreachable(message, file: file, line: line)
+            }
+        } else {
+            expectUnreachable(message, file: file, line: line)
+        }
+    } else {
+        if rhs != nil {
+            expectUnreachable(message, file: file, line: line)
+        }
+    }
+}
+
+func testDouble(_ lhs: Double?, _ rhs: Double?, file: String = #file, line: UInt = #line) {
+    let message = "\(String(describing: lhs)) != \(String(describing: rhs)) Double"
+    if let lhsValue = lhs {
+        if let rhsValue = rhs {
+            if lhsValue.isNaN != rhsValue.isNaN {
+                expectUnreachable(message, file: file, line: line)
+            } else if lhsValue != rhsValue && !lhsValue.isNaN {
+                expectUnreachable(message, file: file, line: line)
+            }
+        } else {
+            expectUnreachable(message, file: file, line: line)
+        }
+    } else {
+        if rhs != nil {
+            expectUnreachable(message, file: file, line: line)
+        }
+    }
+}
+
+
+extension Int8 {
+    static var _interestingValues: [Int8] {
+        return [
+            Int8.min,
+            Int8.min + 1,
+            Int8.max,
+            Int8.max - 1,
+            0,
+            -1, 1,
+            -42, 42,
+        ]
+    }
+}
+
+extension UInt8 {
+    static var _interestingValues: [UInt8] {
+        return [
+            UInt8.min,
+            UInt8.min + 1,
+            UInt8.max,
+            UInt8.max - 1,
+            42,
+        ]
+    }
+}
+
+extension Int16 {
+    static var _interestingValues: [Int16] {
+        return [
+            Int16.min,
+            Int16.min + 1,
+            Int16.max,
+            Int16.max - 1,
+            0,
+            -1, 1,
+            -42, 42,
+        ]
+    }
+}
+
+extension UInt16 {
+    static var _interestingValues: [UInt16] {
+        return [
+            UInt16.min,
+            UInt16.min + 1,
+            UInt16.max,
+            UInt16.max - 1,
+            42,
+        ]
+    }
+}
+
+extension Int32 {
+    static var _interestingValues: [Int32] {
+        return [
+            Int32.min,
+            Int32.min + 1,
+            Int32.max,
+            Int32.max - 1,
+            0,
+            -1, 1,
+            -42, 42,
+        ]
+    }
+}
+
+extension UInt32 {
+    static var _interestingValues: [UInt32] {
+        return [
+            UInt32.min,
+            UInt32.min + 1,
+            UInt32.max,
+            UInt32.max - 1,
+            42,
+        ]
+    }
+}
+
+extension Int64 {
+    static var _interestingValues: [Int64] {
+        return [
+            Int64.min,
+            Int64.min + 1,
+            Int64.max,
+            Int64.max - 1,
+            0,
+            -1, 1,
+            -42, 42,
+        ]
+    }
+}
+
+extension UInt64 {
+    static var _interestingValues: [UInt64] {
+        return [
+            UInt64.min,
+            UInt64.min + 1,
+            UInt64.max,
+            UInt64.max - 1,
+            42,
+        ]
+    }
+}
+
+extension Int {
+    static var _interestingValues: [Int] {
+        return [
+            Int.min,
+            Int.min + 1,
+            Int.max,
+            Int.max - 1,
+            0,
+            -1, 1,
+            -42, 42,
+        ]
+    }
+}
+
+extension UInt {
+    static var _interestingValues: [UInt] {
+        return [
+            UInt.min,
+            UInt.min + 1,
+            UInt.max,
+            UInt.max - 1,
+            42,
+        ]
+    }
+}
+
+extension Float {
+    static var _interestingValues: [Float] {
+        return [
+            -Float.infinity,
+            -Float.greatestFiniteMagnitude,
+            -1.0,
+            -Float.ulpOfOne,
+            -Float.leastNormalMagnitude,
+            -0.0,
+            0.0,
+            Float.leastNormalMagnitude,
+            Float.ulpOfOne,
+            1.0,
+            Float.greatestFiniteMagnitude,
+            Float.infinity,
+            Float.nan,
+        ]
+    }
+}
+
+extension Double {
+    static var _interestingValues: [Double] {
+        return [
+            -Double.infinity,
+            -Double.greatestFiniteMagnitude,
+            -1.0,
+            -Double.ulpOfOne,
+            -Double.leastNormalMagnitude,
+            -0.0,
+            0.0,
+            Double.leastNormalMagnitude,
+            Double.ulpOfOne,
+            1.0,
+            Double.greatestFiniteMagnitude,
+            Double.infinity,
+            Double.nan,
+        ]
+    }
+}
+
+extension CGFloat {
+    static var _interestingValues: [CGFloat] {
+        return [
+            -CGFloat.infinity,
+            -CGFloat.greatestFiniteMagnitude,
+            -1.0,
+            -CGFloat.ulpOfOne,
+            -CGFloat.leastNormalMagnitude,
+            -0.0,
+            0.0,
+            CGFloat.leastNormalMagnitude,
+            CGFloat.ulpOfOne,
+            1.0,
+            CGFloat.greatestFiniteMagnitude,
+            CGFloat.infinity,
+            CGFloat.nan,
+        ]
+    }
+}
+
+extension Bool {
+    static var _interestingValues: [Bool] {
+        return [false, true]
+    }
+}
+
+func testNSNumberBridgeFromInt8() {
+    for interestingValue in Int8._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+            let float = (number!) as? Float
+            expectEqual(Float(interestingValue), float)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromUInt8() {
+    for interestingValue in UInt8._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+            let float = (number!) as? Float
+            expectEqual(Float(interestingValue), float)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromInt16() {
+    for interestingValue in Int16._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+            let float = (number!) as? Float
+            expectEqual(Float(interestingValue), float)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromUInt16() {
+    for interestingValue in UInt8._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+            let float = (number!) as? Float
+            expectEqual(Float(interestingValue), float)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromInt32() {
+    for interestingValue in Int32._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+            
+            let float = (number!) as? Float
+            let expectedFloat = Float(exactly: int32!)
+            // these are disabled because of https://bugs.swift.org/browse/SR-4634
+            if (int32! != Int32.min && int32! != Int32.max &&
+                int32! != Int32.min + 1 && int32! != Int32.max - 1) {
+                testFloat(expectedFloat, float)
+            }
+            
+            
+            let double = (number!) as? Double
+            let expectedDouble = Double(int32!)
+            testDouble(expectedDouble, double)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromUInt32() {
+    for interestingValue in UInt32._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+            
+            let float = (number!) as? Float
+            let expectedFloat = Float(uint32!)
+            // these are disabled because of https://bugs.swift.org/browse/SR-4634
+            if (uint32! != UInt32.max && uint32! != UInt32.max - 1) {
+                testFloat(expectedFloat, float)
+            }
+            
+            let double = (number!) as? Double
+            let expectedDouble = Double(uint32!)
+            testDouble(expectedDouble, double)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromInt64() {
+    for interestingValue in Int64._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromUInt64() {
+    for interestingValue in UInt64._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromInt() {
+    for interestingValue in Int._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromUInt() {
+    for interestingValue in UInt._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+
+            // these are disabled because of https://bugs.swift.org/browse/SR-4634
+            if uint! != UInt(UInt32.max) && uint! != UInt(UInt32.max - 1) {
+                let float = (number!) as? Float
+                let expectedFloat = Float(uint!)
+                testFloat(expectedFloat, float)
+            }
+            
+            
+            let double = (number!) as? Double
+            let expectedDouble = Double(uint!)
+            testDouble(expectedDouble, double)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromFloat() {
+    for interestingValue in Float._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+
+            let float = (number!) as? Float
+            let expectedFloat = Float(exactly: interestingValue)
+            testFloat(expectedFloat, float)
+            
+            let double = (number!) as? Double
+            let expectedDouble = Double(interestingValue)
+            testDouble(expectedDouble, double)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromDouble() {
+    for interestingValue in Double._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue), uint)
+
+            let float = (number!) as? Float
+            let expectedFloat = Float(exactly: interestingValue)
+            testFloat(expectedFloat, float)
+            
+            let double = (number!) as? Double
+            let expectedDouble = interestingValue
+            testDouble(expectedDouble, double)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue)
+        testNumber(created)
+    }
+}
+
+func testNSNumberBridgeFromCGFloat() {
+    for interestingValue in CGFloat._interestingValues {
+        func testNumber(_ number: NSNumber?) {
+            expectNotNil(number)
+            let int8 = (number!) as? Int8
+            expectEqual(Int8(exactly: interestingValue.native), int8)
+            let uint8 = (number!) as? UInt8
+            expectEqual(UInt8(exactly: interestingValue.native), uint8)
+            let int16 = (number!) as? Int16
+            expectEqual(Int16(exactly: interestingValue.native), int16)
+            let uint16 = (number!) as? UInt16
+            expectEqual(UInt16(exactly: interestingValue.native), uint16)
+            let int32 = (number!) as? Int32
+            expectEqual(Int32(exactly: interestingValue.native), int32)
+            let uint32 = (number!) as? UInt32
+            expectEqual(UInt32(exactly: interestingValue.native), uint32)
+            let int64 = (number!) as? Int64
+            expectEqual(Int64(exactly: interestingValue.native), int64)
+            let uint64 = (number!) as? UInt64
+            expectEqual(UInt64(exactly: interestingValue.native), uint64)
+            let int = (number!) as? Int
+            expectEqual(Int(exactly: interestingValue.native), int)
+            let uint = (number!) as? UInt
+            expectEqual(UInt(exactly: interestingValue.native), uint)
+            
+            let float = (number!) as? Float
+            let expectedFloat = Float(exactly: interestingValue.native)
+            testFloat(expectedFloat, float)
+            
+            let double = (number!) as? Double
+            let expectedDouble = Double(interestingValue)
+            testDouble(expectedDouble, double)
+        }
+        let bridged = interestingValue as NSNumber
+        testNumber(bridged)
+        let created = NSNumber(value: interestingValue.native)
+        testNumber(created)
+    }
+}
+
+func test_numericBitPatterns_to_floatingPointTypes() {
+    let signed_numbers: [NSNumber] = [
+        NSNumber(value: Int64(6)),
+        NSNumber(value: Int64(bitPattern: 1 << 56)),
+        NSNumber(value: Int64(bitPattern: 1 << 53)),
+        NSNumber(value: Int64(bitPattern: 1 << 52)),
+        NSNumber(value: Int64(bitPattern: 1 << 25)),
+        NSNumber(value: Int64(bitPattern: 1 << 24)),
+        NSNumber(value: Int64(bitPattern: 1 << 23)),
+        NSNumber(value: -Int64(bitPattern: 1 << 53)),
+        NSNumber(value: -Int64(bitPattern: 1 << 52)),
+        NSNumber(value: -Int64(6)),
+        NSNumber(value: -Int64(bitPattern: 1 << 56)),
+        NSNumber(value: -Int64(bitPattern: 1 << 25)),
+        NSNumber(value: -Int64(bitPattern: 1 << 24)),
+        NSNumber(value: -Int64(bitPattern: 1 << 23)),
+    ]
+
+    let signed_values: [Int64] = [
+        Int64(6),
+        Int64(bitPattern: 1 << 56),
+        Int64(bitPattern: 1 << 53),
+        Int64(bitPattern: 1 << 52),
+        Int64(bitPattern: 1 << 25),
+        Int64(bitPattern: 1 << 24),
+        Int64(bitPattern: 1 << 23),
+        -Int64(bitPattern: 1 << 53),
+        -Int64(bitPattern: 1 << 52),
+        -Int64(6),
+        -Int64(bitPattern: 1 << 56),
+        -Int64(bitPattern: 1 << 25),
+        -Int64(bitPattern: 1 << 24),
+        -Int64(bitPattern: 1 << 23),
+    ]
+
+    let unsigned_numbers: [NSNumber] = [
+        NSNumber(value: UInt64(bitPattern: 6)),
+        NSNumber(value: UInt64(bitPattern: 1 << 56)),
+        NSNumber(value: UInt64(bitPattern: 1 << 63)),
+        NSNumber(value: UInt64(bitPattern: 1 << 53)),
+        NSNumber(value: UInt64(bitPattern: 1 << 52)),
+        NSNumber(value: UInt64(bitPattern: 1 << 25)),
+        NSNumber(value: UInt64(bitPattern: 1 << 24)),
+        NSNumber(value: UInt64(bitPattern: 1 << 23)),
+    ]
+
+    let unsigned_values: [UInt64] = [
+        UInt64(bitPattern: 6),
+        UInt64(bitPattern: 1 << 56),
+        UInt64(bitPattern: 1 << 63),
+        UInt64(bitPattern: 1 << 53),
+        UInt64(bitPattern: 1 << 52),
+        UInt64(bitPattern: 1 << 25),
+        UInt64(bitPattern: 1 << 24),
+        UInt64(bitPattern: 1 << 23)
+    ]
+
+    for (number, value) in zip(signed_numbers, signed_values) {
+        let numberCast = Double(exactly: number)
+        let valueCast = Double(exactly: value)
+        expectEqual(numberCast, valueCast)
+    }
+
+    for (number, value) in zip(unsigned_numbers, unsigned_values) {
+        let numberCast = Double(exactly: number)
+        let valueCast = Double(exactly: value)
+        expectEqual(numberCast, valueCast)
+    }
+
+    for (number, value) in zip(signed_numbers, signed_values) {
+        let numberCast = Float(exactly: number)
+        let valueCast = Float(exactly: value)
+        expectEqual(numberCast, valueCast)
+    }
+
+    for (number, value) in zip(unsigned_numbers, unsigned_values) {
+        let numberCast = Float(exactly: number)
+        let valueCast = Float(exactly: value)
+        expectEqual(numberCast, valueCast)
+    }
+}
+
+nsNumberBridging.test("Bridge Int8") { testNSNumberBridgeFromInt8() }
+nsNumberBridging.test("Bridge UInt8") { testNSNumberBridgeFromUInt8() }
+nsNumberBridging.test("Bridge Int16") { testNSNumberBridgeFromInt16() }
+nsNumberBridging.test("Bridge UInt16") { testNSNumberBridgeFromUInt16() }
+nsNumberBridging.test("Bridge Int32") { testNSNumberBridgeFromInt32() }
+nsNumberBridging.test("Bridge UInt32") { testNSNumberBridgeFromUInt32() }
+nsNumberBridging.test("Bridge Int64") { testNSNumberBridgeFromInt64() }
+nsNumberBridging.test("Bridge UInt64") { testNSNumberBridgeFromUInt64() }
+nsNumberBridging.test("Bridge Int") { testNSNumberBridgeFromInt() }
+nsNumberBridging.test("Bridge UInt") { testNSNumberBridgeFromUInt() }
+nsNumberBridging.test("Bridge Float") { testNSNumberBridgeFromFloat() }
+nsNumberBridging.test("Bridge Double") { testNSNumberBridgeFromDouble() }
+nsNumberBridging.test("Bridge CGFloat") { testNSNumberBridgeFromCGFloat() }
+nsNumberBridging.test("bitPattern to exactly") { test_numericBitPatterns_to_floatingPointTypes() }
+runAllTests()