Files
swift-mirror/test/SILOptimizer/dead_witness_module.swift
Roman Levenstein 8ad61d5cd6 Use function signatures for SILDeclRefs in witness_tables, vtables and witness_method instructions.
Textual SIL was sometimes ambiguous when SILDeclRefs were used, because the textual representation of SILDeclRefs was the same for functions that have the same name, but different signatures.
2017-01-27 12:16:14 -08:00

14 lines
665 B
Swift

// RUN: rm -rf %t && mkdir -p %t
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -Onone -parse-stdlib -parse-as-library -module-name TestModule -sil-serialize-all %S/Inputs/TestModule.swift -emit-module-path %t/TestModule.swiftmodule
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -O %s -I %t -emit-sil | %FileCheck %s
// DeadFunctionElimination may not remove a method from a witness table which
// is imported from another module.
import TestModule
testit(MyStruct())
// CHECK: sil_witness_table public_external [fragile] MyStruct: Proto module TestModule
// CHECK-NEXT: method #Proto.confx!1: {{.*}} : @_T0{{.*}}confx{{.*}}FTW