-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73291 from augusto2112/6.0-mangle-abi-mod
Account for different module ABI name when reconstructing a type
- Loading branch information
Showing
4 changed files
with
50 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Tests that reconstructing a type from a mangled name whose type is defined | ||
// in a separate module which has a different ABI name compared to its regular | ||
// name works. | ||
|
||
// RUN: %empty-directory(%t) | ||
// RUN: split-file %s %t | ||
// RUN: cd %t | ||
|
||
// RUN: %target-build-swift -emit-library -emit-module -parse-as-library -module-abi-name Other -g %t/TheModule.swift | ||
// RUN: %target-build-swift -emit-executable -I %t -L %t -lTheModule %s -g -o %t/user -emit-module | ||
|
||
|
||
// RUN: sed -ne '/\/\/ *DEMANGLE-TYPE: /s/\/\/ *DEMANGLE-TYPE: *//p' < %s > %t/input | ||
// RUN: %lldb-moduleimport-test-with-sdk %t/user -qualify-types=1 -type-from-mangled=%t/input | %FileCheck %s --check-prefix=CHECK-TYPE | ||
|
||
//--- TheModule.swift | ||
public class Foo { | ||
let i = 42 | ||
public init() { | ||
} | ||
} | ||
|
||
//--- user.swift | ||
|
||
import TheModule | ||
|
||
let c = TheModule.Foo() | ||
|
||
// DEMANGLE-TYPE: $s5Other3FooCD | ||
// CHECK-TYPE: TheModule.Foo | ||
|