Skip to content

Commit 09444da

Browse files
authored
Merge pull request #28547 from drodriguez/windows-xfail-cmo
[windows] Enable symbolic references in PE/COFF.
2 parents 310c56a + ada8217 commit 09444da

File tree

4 files changed

+3
-14
lines changed

4 files changed

+3
-14
lines changed

lib/IRGen/IRGenMangler.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -119,19 +119,6 @@ IRGenMangler::withSymbolicReferences(IRGenModule &IGM,
119119
}
120120
}
121121

122-
// TODO: ObjectMemoryReader for PE platforms still does not
123-
// implement symbol relocations. For now, on non-Mach-O platforms,
124-
// only symbolic reference things in the same module.
125-
if (IGM.TargetInfo.OutputObjectFormat != llvm::Triple::MachO
126-
&& IGM.TargetInfo.OutputObjectFormat != llvm::Triple::ELF) {
127-
auto formalAccessScope = type->getFormalAccessScope(nullptr, true);
128-
if ((formalAccessScope.isPublic() || formalAccessScope.isInternal()) &&
129-
(!IGM.CurSourceFile ||
130-
IGM.CurSourceFile != type->getParentSourceFile())) {
131-
return false;
132-
}
133-
}
134-
135122
return true;
136123
} else if (auto opaque = s.dyn_cast<const OpaqueTypeDecl *>()) {
137124
// Always symbolically reference opaque types.

test/Reflection/typeref_decoding_imported.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// XFAIL: OS=windows-msvc
2+
13
// RUN: %empty-directory(%t)
24

35
// RUN: %target-build-swift %S/Inputs/ImportedTypes.swift %S/Inputs/ImportedTypesOther.swift -parse-as-library -emit-module -emit-library -module-name TypesToReflect -o %t/%target-library-name(TypesToReflect) -I %S/Inputs

test/Reflection/typeref_lowering.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// REQUIRES: no_asan
2+
// XFAIL: OS=windows-msvc
23
// RUN: %empty-directory(%t)
34

45
// RUN: %target-build-swift -Xfrontend -disable-availability-checking %S/Inputs/TypeLowering.swift -parse-as-library -emit-module -emit-library -module-name TypeLowering -o %t/%target-library-name(TypesToReflect)

test/SILOptimizer/cross-module-optimization.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
// RUN: %target-build-swift -O -wmo -module-name=Main -I%t %s -Xllvm -sil-disable-pass=FunctionSignatureOpts -emit-sil | %FileCheck %s -check-prefix=CHECK-SIL
2121

22-
2322
import Test
2423

2524

0 commit comments

Comments
 (0)