File tree Expand file tree Collapse file tree 2 files changed +19
-14
lines changed
Expand file tree Collapse file tree 2 files changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -396,20 +396,7 @@ class SILBuilder {
396396 llvm::Optional<SILDebugVariable>
397397 substituteAnonymousArgs (llvm::SmallString<4 > Name,
398398 llvm::Optional<SILDebugVariable> Var,
399- SILLocation Loc) {
400- if (Var && shouldDropVariable (*Var, Loc))
401- return {};
402- if (!Var || !Var->ArgNo || !Var->Name .empty ())
403- return Var;
404-
405- auto *VD = Loc.getAsASTNode <VarDecl>();
406- if (VD && !VD->getName ().empty ())
407- return Var;
408-
409- llvm::raw_svector_ostream (Name) << ' _' << (Var->ArgNo - 1 );
410- Var->Name = Name;
411- return Var;
412- }
399+ SILLocation Loc);
413400
414401 AllocStackInst *
415402 createAllocStack (SILLocation Loc, SILType elementType,
Original file line number Diff line number Diff line change @@ -254,6 +254,24 @@ SILBasicBlock *SILBuilder::splitBlockForFallthrough() {
254254 return NewBB;
255255}
256256
257+ llvm::Optional<SILDebugVariable>
258+ SILBuilder::substituteAnonymousArgs (llvm::SmallString<4 > Name,
259+ llvm::Optional<SILDebugVariable> Var,
260+ SILLocation Loc) {
261+ if (Var && shouldDropVariable (*Var, Loc))
262+ return {};
263+ if (!Var || !Var->ArgNo || !Var->Name .empty ())
264+ return Var;
265+
266+ auto *VD = Loc.getAsASTNode <VarDecl>();
267+ if (VD && !VD->getName ().empty ())
268+ return Var;
269+
270+ llvm::raw_svector_ostream (Name) << ' _' << (Var->ArgNo - 1 );
271+ Var->Name = Name;
272+ return Var;
273+ }
274+
257275static bool setAccessToDeinit (BeginAccessInst *beginAccess) {
258276 // It's possible that AllocBoxToStack could catch some cases that
259277 // AccessEnforcementSelection does not promote to [static]. Ultimately, this
You can’t perform that action at this time.
0 commit comments