@@ -106,16 +106,6 @@ class SILBuilder {
106106 // / are not auto-inserted.
107107 SILBasicBlock *BB;
108108 SILBasicBlock::iterator InsertPt;
109- #ifndef NDEBUG
110- // / Used in the di-hole verifier assertion.
111- // / \{
112- protected:
113- bool EnableDIHoleVerification = false ;
114-
115- private:
116- const SILDebugScope *PrevDebugScope = nullptr ;
117- // / \}
118- #endif
119109 const SILDebugScope *CurDebugScope = nullptr ;
120110 Optional<SILLocation> CurDebugLocOverride = None;
121111
@@ -125,8 +115,7 @@ class SILBuilder {
125115
126116 SILBuilder (SILFunction &F, SmallVectorImpl<SILInstruction *> *InsertedInstrs)
127117 : TempContext(F.getModule(), InsertedInstrs), C(TempContext), F(&F),
128- BB (nullptr ) {
129- }
118+ BB (nullptr ) {}
130119
131120 explicit SILBuilder (SILInstruction *I,
132121 SmallVectorImpl<SILInstruction *> *InsertedInstrs = 0 )
@@ -233,7 +222,7 @@ class SILBuilder {
233222 return getModule ().Types .getTypeLowering (T, expansion);
234223 }
235224
236- void setCurrentDebugScope (const SILDebugScope *DS);
225+ void setCurrentDebugScope (const SILDebugScope *DS) { CurDebugScope = DS; }
237226 const SILDebugScope *getCurrentDebugScope () const { return CurDebugScope; }
238227
239228 // / Apply a debug location override. If loc is None, the current override is
@@ -290,18 +279,10 @@ class SILBuilder {
290279
291280 // / clearInsertionPoint - Clear the insertion point: created instructions will
292281 // / not be inserted into a block.
293- void clearInsertionPoint () {
294- #ifndef NDEBUG
295- PrevDebugScope = nullptr ;
296- #endif
297- BB = nullptr ;
298- }
282+ void clearInsertionPoint () { BB = nullptr ; }
299283
300284 // / setInsertionPoint - Set the insertion point.
301285 void setInsertionPoint (SILBasicBlock *BB, SILBasicBlock::iterator insertPt) {
302- #ifndef NDEBUG
303- PrevDebugScope = nullptr ;
304- #endif
305286 this ->BB = BB;
306287 this ->InsertPt = insertPt;
307288 assert (insertPt == BB->end () || insertPt->getParent () == BB);
0 commit comments