Skip to content

Commit 5d5dbd9

Browse files
Merge pull request #66077 from aschwaighofer/wip_enable_opaque_pointers
Enable usage of LLVM's opaque pointer
2 parents 19ad0c5 + 0d4dec1 commit 5d5dbd9

File tree

597 files changed

+1595
-844
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

597 files changed

+1595
-844
lines changed

lib/ClangImporter/ClangImporter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ importer::addCommonInvocationArguments(
845845
invocationArgStrs.push_back("-fansi-escape-codes");
846846

847847
invocationArgStrs.push_back("-Xclang");
848-
invocationArgStrs.push_back("-no-opaque-pointers");
848+
invocationArgStrs.push_back("-opaque-pointers");
849849

850850
if (importerOpts.ValidateModulesOnce) {
851851
invocationArgStrs.push_back("-fmodules-validate-once-per-build-session");

lib/IRGen/GenDecl.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -5190,7 +5190,8 @@ IRGenModule::getAddrOfTypeMetadata(CanType concreteType,
51905190
}
51915191

51925192
if (auto *GV = dyn_cast<llvm::GlobalVariable>(addr.getValue()))
5193-
GV->setComdat(nullptr);
5193+
if (GV->isDeclaration())
5194+
GV->setComdat(nullptr);
51945195

51955196
// FIXME: MC breaks when emitting alias references on some platforms
51965197
// (rdar://problem/22450593 ). Work around this by referring to the aliasee

lib/IRGen/IRGenDebugInfo.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2817,6 +2817,7 @@ void IRGenDebugInfoImpl::emitDbgIntrinsic(
28172817
llvm::DIExpression *Expr, unsigned Line, unsigned Col,
28182818
llvm::DILocalScope *Scope, const SILDebugScope *DS, bool InCoroContext,
28192819
AddrDbgInstrKind AddrDInstKind) {
2820+
Storage = Storage->stripPointerCasts();
28202821
// Set the location/scope of the intrinsic.
28212822
auto *InlinedAt = createInlinedAt(DS);
28222823
auto DL =

lib/IRGen/IRGenSIL.cpp

+29-16
Original file line numberDiff line numberDiff line change
@@ -981,17 +981,24 @@ class IRGenSILFunction :
981981
&& !isAnonymous;
982982
}
983983

984-
bool shouldShadowStorage(llvm::Value *Storage) {
985-
return !isa<llvm::AllocaInst>(Storage)
986-
&& !isa<llvm::UndefValue>(Storage)
987-
&& needsShadowCopy(Storage);
984+
bool shouldShadowStorage(llvm::Value *Storage,
985+
llvm::Type *StorageType) {
986+
Storage = Storage->stripPointerCasts();
987+
if (isa<llvm::UndefValue>(Storage))
988+
return false;
989+
if (auto *Alloca = dyn_cast<llvm::AllocaInst>(Storage);
990+
Alloca && Alloca->isStaticAlloca() &&
991+
Alloca->getAllocatedType() == StorageType)
992+
return false;
993+
return needsShadowCopy(Storage);
988994
}
989995

990996
/// At -Onone, emit a shadow copy of an Address in an alloca, so the
991997
/// register allocator doesn't elide the dbg.value intrinsic when
992998
/// register pressure is high. There is a trade-off to this: With
993999
/// shadow copies, we lose the precise lifetime.
9941000
llvm::Value *emitShadowCopyIfNeeded(llvm::Value *Storage,
1001+
llvm::Type *StorageType,
9951002
const SILDebugScope *Scope,
9961003
SILDebugVariable VarInfo,
9971004
bool IsAnonymous, bool WasMoved,
@@ -1011,7 +1018,7 @@ class IRGenSILFunction :
10111018
// This condition must be consistent with emitPoisonDebugValueInst to avoid
10121019
// generating extra shadow copies for debug_value [poison].
10131020
if (!shouldShadowVariable(VarInfo, IsAnonymous)
1014-
|| !shouldShadowStorage(Storage)) {
1021+
|| !shouldShadowStorage(Storage, StorageType)) {
10151022
return Storage;
10161023
}
10171024

@@ -1034,11 +1041,12 @@ class IRGenSILFunction :
10341041
/// Like \c emitShadowCopyIfNeeded() but takes an \c Address instead of an
10351042
/// \c llvm::Value.
10361043
llvm::Value *emitShadowCopyIfNeeded(Address Storage,
1044+
llvm::Type *StorageType,
10371045
const SILDebugScope *Scope,
10381046
SILDebugVariable VarInfo,
10391047
bool IsAnonymous, bool WasMoved) {
1040-
return emitShadowCopyIfNeeded(Storage.getAddress(), Scope, VarInfo,
1041-
IsAnonymous, WasMoved,
1048+
return emitShadowCopyIfNeeded(Storage.getAddress(), StorageType, Scope,
1049+
VarInfo, IsAnonymous, WasMoved,
10421050
Storage.getAlignment());
10431051
}
10441052

@@ -1072,7 +1080,9 @@ class IRGenSILFunction :
10721080
return;
10731081

10741082
if (e.size() == 1) {
1075-
copy.push_back(emitShadowCopyIfNeeded(e.claimNext(), Scope, VarInfo,
1083+
auto &ti = getTypeInfo(SILVal->getType());
1084+
copy.push_back(emitShadowCopyIfNeeded(e.claimNext(), ti.getStorageType(),
1085+
Scope, VarInfo,
10761086
IsAnonymous, WasMoved));
10771087
return;
10781088
}
@@ -1116,7 +1126,7 @@ class IRGenSILFunction :
11161126
llvm::raw_svector_ostream(Buf) << "$pack_count_" << Position;
11171127
auto Name = IGM.Context.getIdentifier(Buf.str());
11181128
SILDebugVariable Var(Name.str(), true, 0);
1119-
Shape = emitShadowCopyIfNeeded(Shape, getDebugScope(), Var, false,
1129+
Shape = emitShadowCopyIfNeeded(Shape, nullptr, getDebugScope(), Var, false,
11201130
false /*was move*/);
11211131
if (IGM.DebugInfo)
11221132
IGM.DebugInfo->emitPackCountParameter(*this, Shape, Var);
@@ -5061,7 +5071,7 @@ void IRGenSILFunction::emitErrorResultVar(CanSILFunctionType FnTy,
50615071
auto Var = DbgValue->getVarInfo();
50625072
assert(Var && "error result without debug info");
50635073
auto Storage =
5064-
emitShadowCopyIfNeeded(ErrorResultSlot.getAddress(), getDebugScope(),
5074+
emitShadowCopyIfNeeded(ErrorResultSlot.getAddress(), nullptr, getDebugScope(),
50655075
*Var, false, false /*was move*/);
50665076
if (!IGM.DebugInfo)
50675077
return;
@@ -5108,7 +5118,7 @@ void IRGenSILFunction::emitPoisonDebugValueInst(DebugValueInst *i) {
51085118
// copy--poison should never affect program behavior. Also filter everything
51095119
// not handled by emitShadowCopyIfNeeded to avoid extra shadow copies.
51105120
if (!shouldShadowVariable(*varInfo, isAnonymous)
5111-
|| !shouldShadowStorage(storage)) {
5121+
|| !shouldShadowStorage(storage, nullptr)) {
51125122
return;
51135123
}
51145124

@@ -5255,13 +5265,15 @@ void IRGenSILFunction::visitDebugValueInst(DebugValueInst *i) {
52555265

52565266
// Put the value into a shadow-copy stack slot at -Onone.
52575267
llvm::SmallVector<llvm::Value *, 8> Copy;
5258-
if (IsAddrVal)
5268+
if (IsAddrVal) {
5269+
auto &ti = getTypeInfo(SILVal->getType());
52595270
Copy.emplace_back(emitShadowCopyIfNeeded(
5260-
getLoweredAddress(SILVal).getAddress(), i->getDebugScope(), *VarInfo,
5271+
getLoweredAddress(SILVal).getAddress(), ti.getStorageType(), i->getDebugScope(), *VarInfo,
52615272
IsAnonymous, i->getUsesMoveableValueDebugInfo()));
5262-
else
5273+
} else {
52635274
emitShadowCopyIfNeeded(SILVal, i->getDebugScope(), *VarInfo, IsAnonymous,
52645275
i->getUsesMoveableValueDebugInfo(), Copy);
5276+
}
52655277

52665278
bindArchetypes(DbgTy.getType());
52675279
if (!IGM.DebugInfo)
@@ -5882,9 +5894,10 @@ void IRGenSILFunction::visitAllocBoxInst(swift::AllocBoxInst *i) {
58825894
auto VarInfo = i->getVarInfo();
58835895
if (!VarInfo)
58845896
return;
5885-
5897+
auto &ti = getTypeInfo(SILTy);
58865898
auto Storage =
5887-
emitShadowCopyIfNeeded(boxWithAddr.getAddress(), i->getDebugScope(),
5899+
emitShadowCopyIfNeeded(boxWithAddr.getAddress(), ti.getStorageType(),
5900+
i->getDebugScope(),
58885901
*VarInfo, IsAnonymous, false /*was moved*/);
58895902

58905903
if (!IGM.DebugInfo)

stdlib/cmake/modules/AddSwiftStdlib.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ function(_add_target_variant_c_compile_link_flags)
138138
if (_lto_flag_out)
139139
list(APPEND result "${_lto_flag_out}")
140140
# Disable opaque pointers in lto mode.
141-
list(APPEND result "-Xclang")
142-
list(APPEND result "-no-opaque-pointers")
141+
#list(APPEND result "-Xclang")
142+
#list(APPEND result "-no-opaque-pointers")
143143
endif()
144144

145145
set("${CFLAGS_RESULT_VAR_NAME}" "${result}" PARENT_SCOPE)

test/AutoDiff/IRGen/differentiable_function.sil

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
1+
// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s
2+
// RUN: %target-swift-frontend -emit-ir %s
23

34
sil_stage raw
45

test/AutoDiff/IRGen/runtime.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend -parse-stdlib %s -emit-ir | %FileCheck %s
1+
// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-stdlib %s -emit-ir | %FileCheck %s
2+
// RUN: %target-swift-frontend -parse-stdlib %s -emit-ir
23

34
import Swift
45
import _Differentiation

test/AutoDiff/IRGen/witness_table_differentiable_requirements.sil

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend -parse-sil %s -emit-ir | %FileCheck %s
1+
// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-sil %s -emit-ir | %FileCheck %s
2+
// RUN: %target-swift-frontend -parse-sil %s -emit-ir
23
// REQUIRES: CPU=x86_64
34

45
sil_stage canonical

test/AutoDiff/SIL/differentiability_witness_function_inst.sil

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
// IRGen test.
1717

18-
// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=Simplification -emit-ir %s | %FileCheck %s --check-prefix=IRGEN --check-prefix %target-cpu
18+
// RUN: %target-swift-frontend %use_no_opaque_pointers -Xllvm -sil-disable-pass=Simplification -emit-ir %s | %FileCheck %s --check-prefix=IRGEN --check-prefix %target-cpu
19+
// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=Simplification -emit-ir %s
1920
// NOTE: `%target-cpu`-specific FileCheck lines exist because lowered function types in LLVM IR differ between architectures.
2021

2122
// `shell` is required only to run `sed` as a

test/AutoDiff/SIL/differentiable_function_inst.sil

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
// IRGen test.
1717

18-
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=CHECK-IRGEN
18+
// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s --check-prefix=CHECK-IRGEN
19+
// RUN: %target-swift-frontend -emit-ir %s
1920

2021
// `shell` is required only to run `sed` as a
2122
// https://github.com/apple/swift/issues/54526 workaround.

test/AutoDiff/SIL/sil_differentiability_witness.sil

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
// IRGen test.
1717

18-
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck --check-prefix=IRGEN %s
18+
// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck --check-prefix=IRGEN %s
19+
// RUN: %target-swift-frontend -emit-ir %s
1920

2021
// `shell` is required only to run `sed` as a
2122
// https://github.com/apple/swift/issues/54526 workaround.

test/AutoDiff/compiler_crashers_fixed/issue-58123-invalid-debug-info.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend -emit-ir -O -g %s | %FileCheck %s
1+
// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -O -g %s | %FileCheck %s
2+
// RUN: %target-swift-frontend -emit-ir -O -g %s
23

34
// https://github.com/apple/swift/issues/58123
45
// Mutating functions with control flow can cause assertion failure for

test/ClangImporter/CoreGraphics_test.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend -module-name=cgtest -emit-ir -O %s | %FileCheck %s
1+
// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name=cgtest -emit-ir -O %s | %FileCheck %s
2+
// RUN: %target-swift-frontend -module-name=cgtest -emit-ir -O %s
23

34
// Test some imported CG APIs
45
import CoreGraphics

test/ClangImporter/MixedSource/forward-declarations.swift

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend -emit-ir -primary-file %s %S/Inputs/forward-declarations-other.swift -import-objc-header %S/Inputs/forward-declarations.h -enable-objc-interop -disable-objc-attr-requires-foundation-module -module-name main | %FileCheck %s
1+
// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -primary-file %s %S/Inputs/forward-declarations-other.swift -import-objc-header %S/Inputs/forward-declarations.h -enable-objc-interop -disable-objc-attr-requires-foundation-module -module-name main | %FileCheck %s
2+
// RUN: %target-swift-frontend -emit-ir -primary-file %s %S/Inputs/forward-declarations-other.swift -import-objc-header %S/Inputs/forward-declarations.h -enable-objc-interop -disable-objc-attr-requires-foundation-module -module-name main
23

34
class Sub: Base {
45
// CHECK-LABEL: define{{.*}} void @"$s4main3SubC4testyyF"
@@ -13,4 +14,4 @@ class Sub: Base {
1314
// CHECK: call void @swift_release(%swift.refcounted* {{%.+}})
1415
// CHECK: ret void
1516
}
16-
}
17+
}

test/ClangImporter/cxx_interop_ir.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swiftxx-frontend -module-name cxx_ir -I %S/Inputs/custom-modules -emit-ir -o - -primary-file %s -Xcc -fignore-exceptions | %FileCheck %s
1+
// RUN: %target-swiftxx-frontend %use_no_opaque_pointers -module-name cxx_ir -I %S/Inputs/custom-modules -emit-ir -o - -primary-file %s -Xcc -fignore-exceptions | %FileCheck %s
2+
// RUN: %target-swiftxx-frontend -module-name cxx_ir -I %S/Inputs/custom-modules -emit-ir -o - -primary-file %s -Xcc -fignore-exceptions
23

34
// https://github.com/apple/swift/issues/55575
45
// We can't yet call member functions correctly on Windows.

test/ClangImporter/enum-anon-sized.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend -emit-ir %s -enable-objc-interop -import-objc-header %S/Inputs/enum-anon.h | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-%target-runtime %s
1+
// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s -enable-objc-interop -import-objc-header %S/Inputs/enum-anon.h | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-%target-runtime %s
2+
// RUN: %target-swift-frontend -emit-ir %s -enable-objc-interop -import-objc-header %S/Inputs/enum-anon.h
23

34
func verifyIsInt(_: inout Int) { }
45
func verifyIsInt32(_: inout Int32) { }

test/ClangImporter/objc_ir.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

22
// RUN: %empty-directory(%t)
33
// RUN: %build-clang-importer-objc-overlays
4-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -module-name objc_ir -I %S/Inputs/custom-modules -emit-ir -g -o - -primary-file %s | %FileCheck %s
4+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) %use_no_opaque_pointers -module-name objc_ir -I %S/Inputs/custom-modules -emit-ir -g -o - -primary-file %s | %FileCheck %s
5+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -module-name objc_ir -I %S/Inputs/custom-modules -emit-ir -g -o - -primary-file %s
56

67
// REQUIRES: objc_interop
78
// REQUIRES: OS=macosx

test/Concurrency/Backdeploy/mangling.swift

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir -o %t/new.ir
2+
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir -o %t/new.ir
3+
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir
34
// RUN: %FileCheck %s --check-prefix=NEW < %t/new.ir
4-
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -o %t/old.ir -disable-availability-checking
5+
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -o %t/old.ir -disable-availability-checking
6+
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -disable-availability-checking
57
// RUN: %FileCheck %s --check-prefix=OLD < %t/old.ir
68

79
// Check that we add extra type metadata accessors for new kinds of functions

test/Concurrency/Backdeploy/weak_linking.swift

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
// RUN: %empty-directory(%t)
22

3-
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx13.0 -module-name main -emit-ir -o %t/new.ir
3+
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -target %target-cpu-apple-macosx13.0 -module-name main -emit-ir -o %t/new.ir
4+
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx13.0 -module-name main -emit-ir
45
// RUN: %FileCheck %s --check-prefix=NEW < %t/new.ir
56

6-
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir -o %t/backdeploy_56.ir
7+
// RUN: %target-swift-frontend %s %use_no_opaque_pointers -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir -o %t/backdeploy_56.ir
8+
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir
79
// RUN: %FileCheck %s --check-prefix=BACKDEPLOY56 < %t/backdeploy_56.ir
810

9-
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -o %t/backdeployed_concurrency.ir -disable-availability-checking
11+
// RUN: %target-swift-frontend %s %use_no_opaque_pointers -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -o %t/backdeployed_concurrency.ir -disable-availability-checking
12+
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -disable-availability-checking
1013
// RUN: %FileCheck %s --check-prefixes=BACKDEPLOY_CONCURRENCY,BACKDEPLOY56 < %t/backdeployed_concurrency.ir
1114

12-
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -O -module-name main -emit-ir -o %t/optimized.ir -disable-availability-checking
15+
// RUN: %target-swift-frontend %s %use_no_opaque_pointers -target %target-cpu-apple-macosx10.15 -O -module-name main -emit-ir -o %t/optimized.ir -disable-availability-checking
16+
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -O -module-name main -emit-ir -disable-availability-checking
1317
// RUN: %FileCheck %s --check-prefix=OPTIMIZED < %t/optimized.ir
1418

1519

test/DebugInfo/EagerTypeMetadata.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend %s -Onone -emit-ir -g -o - | %FileCheck %s
1+
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -Onone -emit-ir -g -o - | %FileCheck %s
2+
// RUN: %target-swift-frontend %s -Onone -emit-ir -g -o -
23

34
public class C<T>
45
{

test/DebugInfo/LoadableByAddress-allockstack.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
// Check we don't crash when verifying debug info.
22
// Ideally this should print the output after loadable by address runs
33
// but there's no way of doing this in SIL (for IRGen passes).
4-
// RUN: %target-swift-frontend -emit-sil %s -Onone \
4+
// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-sil %s -Onone \
55
// RUN: -sil-verify-all -Xllvm -verify-di-holes -emit-ir \
66
// RUN: -Xllvm -sil-print-debuginfo -g -o - | %FileCheck %s
77

8+
// RUN: %target-swift-frontend -emit-sil %s -Onone \
9+
// RUN: -sil-verify-all -Xllvm -verify-di-holes -emit-ir \
10+
// RUN: -Xllvm -sil-print-debuginfo -g -o -
11+
812
struct m {
913
let major: Int
1014
let minor: Int

test/DebugInfo/LoadableByAddress.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// RUN: %target-swift-frontend %s -module-name A -emit-ir -g -o - | %FileCheck %s
1+
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -module-name A -emit-ir -g -o - | %FileCheck %s
2+
// RUN: %target-swift-frontend %s -module-name A -emit-ir -g -o -
3+
24
// REQUIRES: CPU=x86_64
35
public struct Continuation<A> {
46
private let magicToken = "Hello World"

test/DebugInfo/ProtocolContainer.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
1+
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s
2+
// RUN: %target-swift-frontend %s -emit-ir -g -o -
23

34
func markUsed<T>(_ t: T) {}
45

test/DebugInfo/WeakCapture.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
1+
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s
2+
// RUN: %target-swift-frontend %s -emit-ir -g -o -
23
class A {
34
init(handler: (() -> ())) { }
45
}

test/DebugInfo/any.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
1+
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s
2+
// RUN: %target-swift-frontend %s -emit-ir -g -o -
23

34
func markUsed<T>(_ t: T) {}
45

test/DebugInfo/async-args.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
// RUN: %target-swift-frontend %s -emit-ir -g -o - \
1+
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - \
22
// RUN: -module-name M -disable-availability-checking \
33
// RUN: -parse-as-library | %FileCheck %s
4+
5+
// RUN: %target-swift-frontend %s -emit-ir -g -o - \
6+
// RUN: -module-name M -disable-availability-checking \
7+
// RUN: -parse-as-library
8+
49
// REQUIRES: concurrency
510

611
func use<T>(_ t: T) {}

test/DebugInfo/async-let-await.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
// RUN: %target-swift-frontend %s -emit-ir -g -o - \
1+
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - \
22
// RUN: -module-name M -disable-availability-checking \
33
// RUN: -parse-as-library | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
4+
5+
// RUN: %target-swift-frontend %s -emit-ir -g -o - \
6+
// RUN: -module-name M -disable-availability-checking \
7+
// RUN: -parse-as-library
8+
49
// REQUIRES: concurrency
510

611
public func getVegetables() async -> [String] {

test/DebugInfo/async-let.swift

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
// RUN: %target-swift-frontend %s -emit-ir -g -o - \
1+
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - \
22
// RUN: -module-name M -disable-availability-checking \
33
// RUN: -parse-as-library | %FileCheck %s --check-prefix=CHECK
4+
5+
// RUN: %target-swift-frontend %s -emit-ir -g -o - \
6+
// RUN: -module-name M -disable-availability-checking \
7+
// RUN: -parse-as-library
8+
49
// REQUIRES: concurrency
510

611
public actor Alice {

0 commit comments

Comments
 (0)