Revision ac4b68fbf45853ba4b9e327cb42f93f42a8fa252 authored by Ellie Shin on 17 March 2023, 04:14:20 UTC, committed by Ellie Shin on 17 March 2023, 04:14:20 UTC
1 parent f2c68fb
Raw File
sugar.swift
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s

// Apart from typealiases, sugared types are just mangled as their desugared type.
//
// This test makes sure that we don't mess up type substitutions when mangling
// types containing sugared types by virtue of all manglings getting round-tripped
// through the remangler.

let o: (Int?, Optional<Int>) = (nil, nil)
let a: ([[Int]], [Array<Int>], Array<[Int]>, Array<Array<Int>>) = ([], [], [], [])
let d: ([Int : Float], Dictionary<Int, Float>) = ([:], [:])
let p: (((((Int)))), Int) = (0, 0)

// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "$sSiXSq_SiSgtD", {{.*}})
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "$sSiXSaXSa_SaySiGXSaSaySiXSaGSayAAGtD", {{.*}})
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "$sSiSfXSD_SDySiSfGtD", {{.*}})
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "$sSiXSpXSpXSpXSp_SitD", {{.*}})
back to top