mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SIL] Serialize section name correctly and model it on global variables
Fixes rdar://162549960.
This commit is contained in:
18
test/SIL/Serialization/section.sil
Normal file
18
test/SIL/Serialization/section.sil
Normal file
@@ -0,0 +1,18 @@
|
||||
// First parse this and then emit a *.sib. Then read in the *.sib, then recreate
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-sil-opt -sil-print-types -enable-experimental-feature SymbolLinkageMarkers %s -emit-sib -o %t/tmp.sib -module-name borrow
|
||||
// RUN: %target-sil-opt -sil-print-types -enable-experimental-feature SymbolLinkageMarkers %t/tmp.sib -o %t/tmp.2.sib -module-name borrow
|
||||
// RUN: %target-sil-opt -sil-print-types -enable-experimental-feature SymbolLinkageMarkers %t/tmp.2.sib -module-name asmname -emit-sorted-sil | %FileCheck %s
|
||||
|
||||
// REQUIRES: swift_feature_SymbolLinkageMarkers
|
||||
|
||||
import Swift
|
||||
|
||||
// CHECK: sil_global [section "__DATA,__mysection"] @v1 : $Int
|
||||
sil_global [section "__DATA,__mysection"] @v1 : $Int
|
||||
|
||||
// CHECK: sil [section "__TEXT,__mysection"] @f : $@convention(thin) () -> ()
|
||||
sil [section "__TEXT,__mysection"] @f : $@convention(thin) () -> () {
|
||||
%0 = tuple ()
|
||||
return %0
|
||||
}
|
||||
Reference in New Issue
Block a user