Skip to content

Enable usage of LLVM's opaque pointer #66077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 15, 2023
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion lib/ClangImporter/ClangImporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ importer::addCommonInvocationArguments(
invocationArgStrs.push_back("-fansi-escape-codes");

invocationArgStrs.push_back("-Xclang");
invocationArgStrs.push_back("-no-opaque-pointers");
invocationArgStrs.push_back("-opaque-pointers");

if (importerOpts.ValidateModulesOnce) {
invocationArgStrs.push_back("-fmodules-validate-once-per-build-session");
Expand Down
3 changes: 2 additions & 1 deletion lib/IRGen/GenDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5190,7 +5190,8 @@ IRGenModule::getAddrOfTypeMetadata(CanType concreteType,
}

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

// FIXME: MC breaks when emitting alias references on some platforms
// (rdar://problem/22450593 ). Work around this by referring to the aliasee
Expand Down
1 change: 1 addition & 0 deletions lib/IRGen/IRGenDebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2817,6 +2817,7 @@ void IRGenDebugInfoImpl::emitDbgIntrinsic(
llvm::DIExpression *Expr, unsigned Line, unsigned Col,
llvm::DILocalScope *Scope, const SILDebugScope *DS, bool InCoroContext,
AddrDbgInstrKind AddrDInstKind) {
Storage = Storage->stripPointerCasts();
// Set the location/scope of the intrinsic.
auto *InlinedAt = createInlinedAt(DS);
auto DL =
Expand Down
45 changes: 29 additions & 16 deletions lib/IRGen/IRGenSIL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -981,17 +981,24 @@ class IRGenSILFunction :
&& !isAnonymous;
}

bool shouldShadowStorage(llvm::Value *Storage) {
return !isa<llvm::AllocaInst>(Storage)
&& !isa<llvm::UndefValue>(Storage)
&& needsShadowCopy(Storage);
bool shouldShadowStorage(llvm::Value *Storage,
llvm::Type *StorageType) {
Storage = Storage->stripPointerCasts();
if (isa<llvm::UndefValue>(Storage))
return false;
if (auto *Alloca = dyn_cast<llvm::AllocaInst>(Storage);
Alloca && Alloca->isStaticAlloca() &&
Alloca->getAllocatedType() == StorageType)
return false;
return needsShadowCopy(Storage);
}

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

Expand All @@ -1034,11 +1041,12 @@ class IRGenSILFunction :
/// Like \c emitShadowCopyIfNeeded() but takes an \c Address instead of an
/// \c llvm::Value.
llvm::Value *emitShadowCopyIfNeeded(Address Storage,
llvm::Type *StorageType,
const SILDebugScope *Scope,
SILDebugVariable VarInfo,
bool IsAnonymous, bool WasMoved) {
return emitShadowCopyIfNeeded(Storage.getAddress(), Scope, VarInfo,
IsAnonymous, WasMoved,
return emitShadowCopyIfNeeded(Storage.getAddress(), StorageType, Scope,
VarInfo, IsAnonymous, WasMoved,
Storage.getAlignment());
}

Expand Down Expand Up @@ -1072,7 +1080,9 @@ class IRGenSILFunction :
return;

if (e.size() == 1) {
copy.push_back(emitShadowCopyIfNeeded(e.claimNext(), Scope, VarInfo,
auto &ti = getTypeInfo(SILVal->getType());
copy.push_back(emitShadowCopyIfNeeded(e.claimNext(), ti.getStorageType(),
Scope, VarInfo,
IsAnonymous, WasMoved));
return;
}
Expand Down Expand Up @@ -1116,7 +1126,7 @@ class IRGenSILFunction :
llvm::raw_svector_ostream(Buf) << "$pack_count_" << Position;
auto Name = IGM.Context.getIdentifier(Buf.str());
SILDebugVariable Var(Name.str(), true, 0);
Shape = emitShadowCopyIfNeeded(Shape, getDebugScope(), Var, false,
Shape = emitShadowCopyIfNeeded(Shape, nullptr, getDebugScope(), Var, false,
false /*was move*/);
if (IGM.DebugInfo)
IGM.DebugInfo->emitPackCountParameter(*this, Shape, Var);
Expand Down Expand Up @@ -5061,7 +5071,7 @@ void IRGenSILFunction::emitErrorResultVar(CanSILFunctionType FnTy,
auto Var = DbgValue->getVarInfo();
assert(Var && "error result without debug info");
auto Storage =
emitShadowCopyIfNeeded(ErrorResultSlot.getAddress(), getDebugScope(),
emitShadowCopyIfNeeded(ErrorResultSlot.getAddress(), nullptr, getDebugScope(),
*Var, false, false /*was move*/);
if (!IGM.DebugInfo)
return;
Expand Down Expand Up @@ -5108,7 +5118,7 @@ void IRGenSILFunction::emitPoisonDebugValueInst(DebugValueInst *i) {
// copy--poison should never affect program behavior. Also filter everything
// not handled by emitShadowCopyIfNeeded to avoid extra shadow copies.
if (!shouldShadowVariable(*varInfo, isAnonymous)
|| !shouldShadowStorage(storage)) {
|| !shouldShadowStorage(storage, nullptr)) {
return;
}

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

// Put the value into a shadow-copy stack slot at -Onone.
llvm::SmallVector<llvm::Value *, 8> Copy;
if (IsAddrVal)
if (IsAddrVal) {
auto &ti = getTypeInfo(SILVal->getType());
Copy.emplace_back(emitShadowCopyIfNeeded(
getLoweredAddress(SILVal).getAddress(), i->getDebugScope(), *VarInfo,
getLoweredAddress(SILVal).getAddress(), ti.getStorageType(), i->getDebugScope(), *VarInfo,
IsAnonymous, i->getUsesMoveableValueDebugInfo()));
else
} else {
emitShadowCopyIfNeeded(SILVal, i->getDebugScope(), *VarInfo, IsAnonymous,
i->getUsesMoveableValueDebugInfo(), Copy);
}

bindArchetypes(DbgTy.getType());
if (!IGM.DebugInfo)
Expand Down Expand Up @@ -5882,9 +5894,10 @@ void IRGenSILFunction::visitAllocBoxInst(swift::AllocBoxInst *i) {
auto VarInfo = i->getVarInfo();
if (!VarInfo)
return;

auto &ti = getTypeInfo(SILTy);
auto Storage =
emitShadowCopyIfNeeded(boxWithAddr.getAddress(), i->getDebugScope(),
emitShadowCopyIfNeeded(boxWithAddr.getAddress(), ti.getStorageType(),
i->getDebugScope(),
*VarInfo, IsAnonymous, false /*was moved*/);

if (!IGM.DebugInfo)
Expand Down
4 changes: 2 additions & 2 deletions stdlib/cmake/modules/AddSwiftStdlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ function(_add_target_variant_c_compile_link_flags)
if (_lto_flag_out)
list(APPEND result "${_lto_flag_out}")
# Disable opaque pointers in lto mode.
list(APPEND result "-Xclang")
list(APPEND result "-no-opaque-pointers")
#list(APPEND result "-Xclang")
#list(APPEND result "-no-opaque-pointers")
endif()

set("${CFLAGS_RESULT_VAR_NAME}" "${result}" PARENT_SCOPE)
Expand Down
3 changes: 2 additions & 1 deletion test/AutoDiff/IRGen/differentiable_function.sil
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s
// RUN: %target-swift-frontend -emit-ir %s

sil_stage raw

Expand Down
3 changes: 2 additions & 1 deletion test/AutoDiff/IRGen/runtime.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// RUN: %target-swift-frontend -parse-stdlib %s -emit-ir | %FileCheck %s
// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-stdlib %s -emit-ir | %FileCheck %s
// RUN: %target-swift-frontend -parse-stdlib %s -emit-ir

import Swift
import _Differentiation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// RUN: %target-swift-frontend -parse-sil %s -emit-ir | %FileCheck %s
// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-sil %s -emit-ir | %FileCheck %s
// RUN: %target-swift-frontend -parse-sil %s -emit-ir
// REQUIRES: CPU=x86_64

sil_stage canonical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

// IRGen test.

// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=Simplification -emit-ir %s | %FileCheck %s --check-prefix=IRGEN --check-prefix %target-cpu
// 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
// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=Simplification -emit-ir %s
// NOTE: `%target-cpu`-specific FileCheck lines exist because lowered function types in LLVM IR differ between architectures.

// `shell` is required only to run `sed` as a
Expand Down
3 changes: 2 additions & 1 deletion test/AutoDiff/SIL/differentiable_function_inst.sil
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

// IRGen test.

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

// `shell` is required only to run `sed` as a
// https://github.com/apple/swift/issues/54526 workaround.
Expand Down
3 changes: 2 additions & 1 deletion test/AutoDiff/SIL/sil_differentiability_witness.sil
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

// IRGen test.

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

// `shell` is required only to run `sed` as a
// https://github.com/apple/swift/issues/54526 workaround.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// RUN: %target-swift-frontend -emit-ir -O -g %s | %FileCheck %s
// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -O -g %s | %FileCheck %s
// RUN: %target-swift-frontend -emit-ir -O -g %s

// https://github.com/apple/swift/issues/58123
// Mutating functions with control flow can cause assertion failure for
Expand Down
3 changes: 2 additions & 1 deletion test/ClangImporter/CoreGraphics_test.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// RUN: %target-swift-frontend -module-name=cgtest -emit-ir -O %s | %FileCheck %s
// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name=cgtest -emit-ir -O %s | %FileCheck %s
// RUN: %target-swift-frontend -module-name=cgtest -emit-ir -O %s

// Test some imported CG APIs
import CoreGraphics
Expand Down
5 changes: 3 additions & 2 deletions test/ClangImporter/MixedSource/forward-declarations.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// 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
// 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
// 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

class Sub: Base {
// CHECK-LABEL: define{{.*}} void @"$s4main3SubC4testyyF"
Expand All @@ -13,4 +14,4 @@ class Sub: Base {
// CHECK: call void @swift_release(%swift.refcounted* {{%.+}})
// CHECK: ret void
}
}
}
3 changes: 2 additions & 1 deletion test/ClangImporter/cxx_interop_ir.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// RUN: %target-swiftxx-frontend -module-name cxx_ir -I %S/Inputs/custom-modules -emit-ir -o - -primary-file %s -Xcc -fignore-exceptions | %FileCheck %s
// 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
// RUN: %target-swiftxx-frontend -module-name cxx_ir -I %S/Inputs/custom-modules -emit-ir -o - -primary-file %s -Xcc -fignore-exceptions

// https://github.com/apple/swift/issues/55575
// We can't yet call member functions correctly on Windows.
Expand Down
3 changes: 2 additions & 1 deletion test/ClangImporter/enum-anon-sized.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// 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
// 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
// RUN: %target-swift-frontend -emit-ir %s -enable-objc-interop -import-objc-header %S/Inputs/enum-anon.h

func verifyIsInt(_: inout Int) { }
func verifyIsInt32(_: inout Int32) { }
Expand Down
3 changes: 2 additions & 1 deletion test/ClangImporter/objc_ir.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

// RUN: %empty-directory(%t)
// RUN: %build-clang-importer-objc-overlays
// 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
// 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
// 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

// REQUIRES: objc_interop
// REQUIRES: OS=macosx
Expand Down
6 changes: 4 additions & 2 deletions test/Concurrency/Backdeploy/mangling.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir -o %t/new.ir
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir -o %t/new.ir
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir
// RUN: %FileCheck %s --check-prefix=NEW < %t/new.ir
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -o %t/old.ir -disable-availability-checking
// 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
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -disable-availability-checking
// RUN: %FileCheck %s --check-prefix=OLD < %t/old.ir

// Check that we add extra type metadata accessors for new kinds of functions
Expand Down
12 changes: 8 additions & 4 deletions test/Concurrency/Backdeploy/weak_linking.swift
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
// RUN: %empty-directory(%t)

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

// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir -o %t/backdeploy_56.ir
// 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
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir
// RUN: %FileCheck %s --check-prefix=BACKDEPLOY56 < %t/backdeploy_56.ir

// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -o %t/backdeployed_concurrency.ir -disable-availability-checking
// 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
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -disable-availability-checking
// RUN: %FileCheck %s --check-prefixes=BACKDEPLOY_CONCURRENCY,BACKDEPLOY56 < %t/backdeployed_concurrency.ir

// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -O -module-name main -emit-ir -o %t/optimized.ir -disable-availability-checking
// 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
// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -O -module-name main -emit-ir -disable-availability-checking
// RUN: %FileCheck %s --check-prefix=OPTIMIZED < %t/optimized.ir


Expand Down
3 changes: 2 additions & 1 deletion test/DebugInfo/EagerTypeMetadata.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// RUN: %target-swift-frontend %s -Onone -emit-ir -g -o - | %FileCheck %s
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -Onone -emit-ir -g -o - | %FileCheck %s
// RUN: %target-swift-frontend %s -Onone -emit-ir -g -o -

public class C<T>
{
Expand Down
6 changes: 5 additions & 1 deletion test/DebugInfo/LoadableByAddress-allockstack.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
// Check we don't crash when verifying debug info.
// Ideally this should print the output after loadable by address runs
// but there's no way of doing this in SIL (for IRGen passes).
// RUN: %target-swift-frontend -emit-sil %s -Onone \
// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-sil %s -Onone \
// RUN: -sil-verify-all -Xllvm -verify-di-holes -emit-ir \
// RUN: -Xllvm -sil-print-debuginfo -g -o - | %FileCheck %s

// RUN: %target-swift-frontend -emit-sil %s -Onone \
// RUN: -sil-verify-all -Xllvm -verify-di-holes -emit-ir \
// RUN: -Xllvm -sil-print-debuginfo -g -o -

struct m {
let major: Int
let minor: Int
Expand Down
4 changes: 3 additions & 1 deletion test/DebugInfo/LoadableByAddress.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// RUN: %target-swift-frontend %s -module-name A -emit-ir -g -o - | %FileCheck %s
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -module-name A -emit-ir -g -o - | %FileCheck %s
// RUN: %target-swift-frontend %s -module-name A -emit-ir -g -o -

// REQUIRES: CPU=x86_64
public struct Continuation<A> {
private let magicToken = "Hello World"
Expand Down
3 changes: 2 additions & 1 deletion test/DebugInfo/ProtocolContainer.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s
// RUN: %target-swift-frontend %s -emit-ir -g -o -

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

Expand Down
3 changes: 2 additions & 1 deletion test/DebugInfo/WeakCapture.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s
// RUN: %target-swift-frontend %s -emit-ir -g -o -
class A {
init(handler: (() -> ())) { }
}
Expand Down
3 changes: 2 additions & 1 deletion test/DebugInfo/any.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s
// RUN: %target-swift-frontend %s -emit-ir -g -o -

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

Expand Down
7 changes: 6 additions & 1 deletion test/DebugInfo/async-args.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// RUN: %target-swift-frontend %s -emit-ir -g -o - \
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - \
// RUN: -module-name M -disable-availability-checking \
// RUN: -parse-as-library | %FileCheck %s

// RUN: %target-swift-frontend %s -emit-ir -g -o - \
// RUN: -module-name M -disable-availability-checking \
// RUN: -parse-as-library

// REQUIRES: concurrency

func use<T>(_ t: T) {}
Expand Down
7 changes: 6 additions & 1 deletion test/DebugInfo/async-let-await.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// RUN: %target-swift-frontend %s -emit-ir -g -o - \
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - \
// RUN: -module-name M -disable-availability-checking \
// RUN: -parse-as-library | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize

// RUN: %target-swift-frontend %s -emit-ir -g -o - \
// RUN: -module-name M -disable-availability-checking \
// RUN: -parse-as-library

// REQUIRES: concurrency

public func getVegetables() async -> [String] {
Expand Down
7 changes: 6 additions & 1 deletion test/DebugInfo/async-let.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// RUN: %target-swift-frontend %s -emit-ir -g -o - \
// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - \
// RUN: -module-name M -disable-availability-checking \
// RUN: -parse-as-library | %FileCheck %s --check-prefix=CHECK

// RUN: %target-swift-frontend %s -emit-ir -g -o - \
// RUN: -module-name M -disable-availability-checking \
// RUN: -parse-as-library

// REQUIRES: concurrency

public actor Alice {
Expand Down
Loading