@@ -153,21 +153,12 @@ class SILLocation {
153
153
// / code block.
154
154
AutoGeneratedBit = 5 ,
155
155
156
- // / Used to redefine the default source location used to
157
- // / represent this SILLocation. For example, when the host instruction
158
- // / is known to correspond to the beginning or the end of the source
159
- // / range of the ASTNode.
160
- PointsToStartBit = 6 ,
161
- PointsToEndBit = 7 ,
162
-
163
- // / Used to notify that this instruction belongs to the top-
164
- // / level (module) scope.
165
- // /
166
- // / FIXME: If Module becomes a Decl, this could be removed.
167
- IsInTopLevel = 8 ,
156
+ // / The location correspond to the end (instead of the beginning) of the
157
+ // / source range of the ASTNode.
158
+ PointsToEndBit = 6 ,
168
159
169
160
// / Marks this instruction as belonging to the function prologue.
170
- IsInPrologue = 9
161
+ IsInPrologue = 7
171
162
};
172
163
173
164
template <typename T>
@@ -314,21 +305,10 @@ class SILLocation {
314
305
return decodeDebugLoc (SM).Line == 0 ;
315
306
}
316
307
317
- // / Changes the default source location position to point to start of
318
- // / the AST node.
319
- void pointToStart () { KindData |= (1 << PointsToStartBit); }
320
-
321
308
// / Changes the default source location position to point to the end of
322
309
// / the AST node.
323
310
void pointToEnd () { KindData |= (1 << PointsToEndBit); }
324
311
325
- // / Mark this location as the location corresponding to the top-level
326
- // / (module-level) code.
327
- void markAsInTopLevel () { KindData |= (1 << IsInTopLevel); }
328
-
329
- // / Check is this location is associated with the top level/module.
330
- bool isInTopLevel () const { return KindData & (1 << IsInTopLevel); }
331
-
332
312
// / Mark this location as being part of the function
333
313
// / prologue, which means that it deals with setting up the stack
334
314
// / frame. The first breakpoint location in a function is at the end
@@ -360,10 +340,6 @@ class SILLocation {
360
340
setStorageKind (DebugInfoKind);
361
341
}
362
342
363
- // / Check if the corresponding source code location definitely points
364
- // / to the start of the AST node.
365
- bool alwaysPointsToStart () const { return KindData & (1 << PointsToStartBit);}
366
-
367
343
// / Check if the corresponding source code location definitely points
368
344
// / to the end of the AST node.
369
345
bool alwaysPointsToEnd () const { return KindData & (1 << PointsToEndBit); }
@@ -507,11 +483,7 @@ class RegularLocation : public SILLocation {
507
483
RegularLocation (DebugLoc L) : SILLocation(L, RegularKind) {}
508
484
509
485
// / Returns a location representing the module.
510
- static RegularLocation getModuleLocation () {
511
- RegularLocation Loc;
512
- Loc.markAsInTopLevel ();
513
- return Loc;
514
- }
486
+ static RegularLocation getModuleLocation () { return RegularLocation (); }
515
487
516
488
// / If the current value is of the specified AST unit type T,
517
489
// / return it, otherwise return null.
@@ -717,9 +689,7 @@ class CleanupLocation : public SILLocation {
717
689
718
690
// / Returns a location representing a cleanup on the module level.
719
691
static CleanupLocation getModuleCleanupLocation () {
720
- CleanupLocation Loc;
721
- Loc.markAsInTopLevel ();
722
- return Loc;
692
+ return CleanupLocation ();
723
693
}
724
694
725
695
private:
0 commit comments