mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #69163 from apple/rebranch
Merge `rebranch` into `main` to support `stable/20230725` llvm-project branch
This commit is contained in:
@@ -863,13 +863,13 @@ class DiagnosticPrunedLiveness : public SSAPrunedLiveness {
|
||||
/// A side array that stores any non lifetime ending uses we find in live out
|
||||
/// blocks. This is used to enable our callers to emit errors on non-lifetime
|
||||
/// ending uses that extend liveness into a loop body.
|
||||
SmallSetVector<SILInstruction *, 8> *nonLifetimeEndingUsesInLiveOut;
|
||||
llvm::SmallSetVector<SILInstruction *, 8> *nonLifetimeEndingUsesInLiveOut;
|
||||
|
||||
public:
|
||||
DiagnosticPrunedLiveness(
|
||||
SILFunction *function,
|
||||
SmallVectorImpl<SILBasicBlock *> *discoveredBlocks = nullptr,
|
||||
SmallSetVector<SILInstruction *, 8> *nonLifetimeEndingUsesInLiveOut =
|
||||
llvm::SmallSetVector<SILInstruction *, 8> *nonLifetimeEndingUsesInLiveOut =
|
||||
nullptr)
|
||||
: SSAPrunedLiveness(function, discoveredBlocks),
|
||||
nonLifetimeEndingUsesInLiveOut(nonLifetimeEndingUsesInLiveOut) {}
|
||||
|
||||
@@ -396,20 +396,7 @@ public:
|
||||
llvm::Optional<SILDebugVariable>
|
||||
substituteAnonymousArgs(llvm::SmallString<4> Name,
|
||||
llvm::Optional<SILDebugVariable> Var,
|
||||
SILLocation Loc) {
|
||||
if (Var && shouldDropVariable(*Var, Loc))
|
||||
return {};
|
||||
if (!Var || !Var->ArgNo || !Var->Name.empty())
|
||||
return Var;
|
||||
|
||||
auto *VD = Loc.getAsASTNode<VarDecl>();
|
||||
if (VD && !VD->getName().empty())
|
||||
return Var;
|
||||
|
||||
llvm::raw_svector_ostream(Name) << '_' << (Var->ArgNo - 1);
|
||||
Var->Name = Name;
|
||||
return Var;
|
||||
}
|
||||
SILLocation Loc);
|
||||
|
||||
AllocStackInst *
|
||||
createAllocStack(SILLocation Loc, SILType elementType,
|
||||
|
||||
@@ -870,6 +870,10 @@ public:
|
||||
/// current SILModule.
|
||||
bool isPossiblyUsedExternally() const;
|
||||
|
||||
/// Helper method which returns whether this function should be preserved so
|
||||
/// it can potentially be used in the debugger.
|
||||
bool shouldBePreservedForDebugger() const;
|
||||
|
||||
/// In addition to isPossiblyUsedExternally() it returns also true if this
|
||||
/// is a (private or internal) vtable method which can be referenced by
|
||||
/// vtables of derived classes outside the compilation unit.
|
||||
|
||||
Reference in New Issue
Block a user