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 {
396
396
llvm::Optional<SILDebugVariable>
397
397
substituteAnonymousArgs (llvm::SmallString<4 > Name,
398
398
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);
413
400
414
401
AllocStackInst *
415
402
createAllocStack (SILLocation Loc, SILType elementType,
Original file line number Diff line number Diff line change @@ -254,6 +254,24 @@ SILBasicBlock *SILBuilder::splitBlockForFallthrough() {
254
254
return NewBB;
255
255
}
256
256
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
+
257
275
static bool setAccessToDeinit (BeginAccessInst *beginAccess) {
258
276
// It's possible that AllocBoxToStack could catch some cases that
259
277
// AccessEnforcementSelection does not promote to [static]. Ultimately, this
You can’t perform that action at this time.
0 commit comments