@@ -52,8 +52,6 @@ DbgMarker *BasicBlock::createMarker(InstListType::iterator It) {
5252}
5353
5454void BasicBlock::convertToNewDbgValues () {
55- IsNewDbgInfoFormat = true ;
56-
5755 // Iterate over all instructions in the instruction list, collecting debug
5856 // info intrinsics and converting them to DbgRecords. Once we find a "real"
5957 // instruction, attach all those DbgRecords to a DbgMarker in that
@@ -91,7 +89,6 @@ void BasicBlock::convertToNewDbgValues() {
9189
9290void BasicBlock::convertFromNewDbgValues () {
9391 invalidateOrders ();
94- IsNewDbgInfoFormat = false ;
9592
9693 // Iterate over the block, finding instructions annotated with DbgMarkers.
9794 // Convert any attached DbgRecords to debug intrinsics and insert ahead of the
@@ -126,16 +123,6 @@ void BasicBlock::dumpDbgValues() const {
126123}
127124#endif
128125
129- void BasicBlock::setIsNewDbgInfoFormat (bool NewFlag) {
130- if (NewFlag && !IsNewDbgInfoFormat)
131- convertToNewDbgValues ();
132- else if (!NewFlag && IsNewDbgInfoFormat)
133- convertFromNewDbgValues ();
134- }
135- void BasicBlock::setNewDbgInfoFormatFlag (bool NewFlag) {
136- IsNewDbgInfoFormat = NewFlag;
137- }
138-
139126ValueSymbolTable *BasicBlock::getValueSymbolTable () {
140127 if (Function *F = getParent ())
141128 return F->getValueSymbolTable ();
@@ -157,8 +144,7 @@ template class llvm::SymbolTableListTraits<
157144
158145BasicBlock::BasicBlock (LLVMContext &C, const Twine &Name, Function *NewParent,
159146 BasicBlock *InsertBefore)
160- : Value(Type::getLabelTy(C), Value::BasicBlockVal),
161- IsNewDbgInfoFormat(true ), Parent(nullptr ) {
147+ : Value(Type::getLabelTy(C), Value::BasicBlockVal), Parent(nullptr ) {
162148
163149 if (NewParent)
164150 insertInto (NewParent, InsertBefore);
@@ -168,8 +154,6 @@ BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent,
168154
169155 end ().getNodePtr ()->setParent (this );
170156 setName (Name);
171- if (NewParent)
172- setIsNewDbgInfoFormat (NewParent->IsNewDbgInfoFormat );
173157}
174158
175159void BasicBlock::insertInto (Function *NewParent, BasicBlock *InsertBefore) {
@@ -180,8 +164,6 @@ void BasicBlock::insertInto(Function *NewParent, BasicBlock *InsertBefore) {
180164 NewParent->insert (InsertBefore->getIterator (), this );
181165 else
182166 NewParent->insert (NewParent->end (), this );
183-
184- setIsNewDbgInfoFormat (NewParent->IsNewDbgInfoFormat );
185167}
186168
187169BasicBlock::~BasicBlock () {
@@ -725,10 +707,6 @@ void BasicBlock::flushTerminatorDbgRecords() {
725707 // check whether there's anything trailing at the end and move those
726708 // DbgRecords in front of the terminator.
727709
728- // Do nothing if we're not in new debug-info format.
729- if (!IsNewDbgInfoFormat)
730- return ;
731-
732710 // If there's no terminator, there's nothing to do.
733711 Instruction *Term = getTerminator ();
734712 if (!Term)
@@ -765,10 +743,6 @@ void BasicBlock::spliceDebugInfoEmptyBlock(BasicBlock::iterator Dest,
765743 // in the iterators whether there was the intention to transfer any debug
766744 // info.
767745
768- // If we're not in "new" debug-info format, do nothing.
769- if (!IsNewDbgInfoFormat)
770- return ;
771-
772746 assert (First == Last);
773747 bool InsertAtHead = Dest.getHeadBit ();
774748 bool ReadFromHead = First.getHeadBit ();
@@ -1029,8 +1003,6 @@ void BasicBlock::spliceDebugInfoImpl(BasicBlock::iterator Dest, BasicBlock *Src,
10291003
10301004void BasicBlock::splice (iterator Dest, BasicBlock *Src, iterator First,
10311005 iterator Last) {
1032- assert (Src->IsNewDbgInfoFormat == IsNewDbgInfoFormat);
1033-
10341006#ifdef EXPENSIVE_CHECKS
10351007 // Check that First is before Last.
10361008 auto FromBBEnd = Src->end ();
@@ -1045,9 +1017,7 @@ void BasicBlock::splice(iterator Dest, BasicBlock *Src, iterator First,
10451017 return ;
10461018 }
10471019
1048- // Handle non-instr debug-info specific juggling.
1049- if (IsNewDbgInfoFormat)
1050- spliceDebugInfo (Dest, Src, First, Last);
1020+ spliceDebugInfo (Dest, Src, First, Last);
10511021
10521022 // And move the instructions.
10531023 getInstList ().splice (Dest, Src->getInstList (), First, Last);
@@ -1056,7 +1026,6 @@ void BasicBlock::splice(iterator Dest, BasicBlock *Src, iterator First,
10561026}
10571027
10581028void BasicBlock::insertDbgRecordAfter (DbgRecord *DR, Instruction *I) {
1059- assert (IsNewDbgInfoFormat);
10601029 assert (I->getParent () == this );
10611030
10621031 iterator NextIt = std::next (I->getIterator ());
0 commit comments