@@ -218,7 +218,7 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
218
218
219
219
// / Return the enclosing method, or null if none.
220
220
const Function *getParent () const { return Parent; }
221
- Function *getParent () { return Parent; }
221
+ Function *getParent () { return Parent; }
222
222
223
223
// / Return the module owning the function this basic block belongs to, or
224
224
// / nullptr if the function does not have a module.
@@ -227,7 +227,7 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
227
227
const Module *getModule () const ;
228
228
Module *getModule () {
229
229
return const_cast <Module *>(
230
- static_cast <const BasicBlock *>(this )->getModule ());
230
+ static_cast <const BasicBlock *>(this )->getModule ());
231
231
}
232
232
233
233
// / Get the data layout of the module this basic block belongs to.
@@ -253,16 +253,17 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
253
253
const CallInst *getTerminatingDeoptimizeCall () const ;
254
254
CallInst *getTerminatingDeoptimizeCall () {
255
255
return const_cast <CallInst *>(
256
- static_cast <const BasicBlock *>(this )->getTerminatingDeoptimizeCall ());
256
+ static_cast <const BasicBlock *>(this )->getTerminatingDeoptimizeCall ());
257
257
}
258
258
259
259
// / Returns the call instruction calling \@llvm.experimental.deoptimize
260
260
// / that is present either in current basic block or in block that is a unique
261
- // / successor to current block, if such call is present. Otherwise, returns null.
261
+ // / successor to current block, if such call is present. Otherwise, returns
262
+ // / null.
262
263
const CallInst *getPostdominatingDeoptimizeCall () const ;
263
264
CallInst *getPostdominatingDeoptimizeCall () {
264
- return const_cast <CallInst *>(
265
- static_cast < const BasicBlock *>( this ) ->getPostdominatingDeoptimizeCall ());
265
+ return const_cast <CallInst *>(static_cast < const BasicBlock *>( this )
266
+ ->getPostdominatingDeoptimizeCall ());
266
267
}
267
268
268
269
// / Returns the call instruction marked 'musttail' prior to the terminating
@@ -271,7 +272,7 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
271
272
const CallInst *getTerminatingMustTailCall () const ;
272
273
CallInst *getTerminatingMustTailCall () {
273
274
return const_cast <CallInst *>(
274
- static_cast <const BasicBlock *>(this )->getTerminatingMustTailCall ());
275
+ static_cast <const BasicBlock *>(this )->getTerminatingMustTailCall ());
275
276
}
276
277
277
278
// / Returns a pointer to the first instruction in this block that is not a
@@ -336,7 +337,8 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
336
337
const_iterator getFirstInsertionPt () const ;
337
338
iterator getFirstInsertionPt () {
338
339
return static_cast <const BasicBlock *>(this )
339
- ->getFirstInsertionPt ().getNonConst ();
340
+ ->getFirstInsertionPt ()
341
+ .getNonConst ();
340
342
}
341
343
342
344
// / Returns an iterator to the first instruction in this block that is
@@ -351,10 +353,10 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
351
353
// / Returns the first potential AsynchEH faulty instruction
352
354
// / currently it checks for loads/stores (which may dereference a null
353
355
// / pointer) and calls/invokes (which may propagate exceptions)
354
- const Instruction* getFirstMayFaultInst () const ;
355
- Instruction* getFirstMayFaultInst () {
356
- return const_cast <Instruction*>(
357
- static_cast <const BasicBlock*>(this )->getFirstMayFaultInst ());
356
+ const Instruction * getFirstMayFaultInst () const ;
357
+ Instruction * getFirstMayFaultInst () {
358
+ return const_cast <Instruction *>(
359
+ static_cast <const BasicBlock *>(this )->getFirstMayFaultInst ());
358
360
}
359
361
360
362
// / Return a const iterator range over the instructions in the block, skipping
@@ -408,7 +410,7 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
408
410
const BasicBlock *getSinglePredecessor () const ;
409
411
BasicBlock *getSinglePredecessor () {
410
412
return const_cast <BasicBlock *>(
411
- static_cast <const BasicBlock *>(this )->getSinglePredecessor ());
413
+ static_cast <const BasicBlock *>(this )->getSinglePredecessor ());
412
414
}
413
415
414
416
// / Return the predecessor of this block if it has a unique predecessor
@@ -420,7 +422,7 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
420
422
const BasicBlock *getUniquePredecessor () const ;
421
423
BasicBlock *getUniquePredecessor () {
422
424
return const_cast <BasicBlock *>(
423
- static_cast <const BasicBlock *>(this )->getUniquePredecessor ());
425
+ static_cast <const BasicBlock *>(this )->getUniquePredecessor ());
424
426
}
425
427
426
428
// / Return true if this block has exactly N predecessors.
@@ -436,7 +438,7 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
436
438
const BasicBlock *getSingleSuccessor () const ;
437
439
BasicBlock *getSingleSuccessor () {
438
440
return const_cast <BasicBlock *>(
439
- static_cast <const BasicBlock *>(this )->getSingleSuccessor ());
441
+ static_cast <const BasicBlock *>(this )->getSingleSuccessor ());
440
442
}
441
443
442
444
// / Return the successor of this block if it has a unique successor.
@@ -446,7 +448,7 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
446
448
const BasicBlock *getUniqueSuccessor () const ;
447
449
BasicBlock *getUniqueSuccessor () {
448
450
return const_cast <BasicBlock *>(
449
- static_cast <const BasicBlock *>(this )->getUniqueSuccessor ());
451
+ static_cast <const BasicBlock *>(this )->getUniqueSuccessor ());
450
452
}
451
453
452
454
// / Print the basic block to an output stream with an optional
@@ -471,20 +473,20 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
471
473
It.setHeadBit (true );
472
474
return It;
473
475
}
474
- inline iterator end () { return InstList.end (); }
475
- inline const_iterator end () const { return InstList.end (); }
476
+ inline iterator end () { return InstList.end (); }
477
+ inline const_iterator end () const { return InstList.end (); }
476
478
477
- inline reverse_iterator rbegin () { return InstList.rbegin (); }
478
- inline const_reverse_iterator rbegin () const { return InstList.rbegin (); }
479
- inline reverse_iterator rend () { return InstList.rend (); }
480
- inline const_reverse_iterator rend () const { return InstList.rend (); }
479
+ inline reverse_iterator rbegin () { return InstList.rbegin (); }
480
+ inline const_reverse_iterator rbegin () const { return InstList.rbegin (); }
481
+ inline reverse_iterator rend () { return InstList.rend (); }
482
+ inline const_reverse_iterator rend () const { return InstList.rend (); }
481
483
482
- inline size_t size () const { return InstList.size (); }
483
- inline bool empty () const { return InstList.empty (); }
484
- inline const Instruction &front () const { return InstList.front (); }
485
- inline Instruction &front () { return InstList.front (); }
486
- inline const Instruction &back () const { return InstList.back (); }
487
- inline Instruction &back () { return InstList.back (); }
484
+ inline size_t size () const { return InstList.size (); }
485
+ inline bool empty () const { return InstList.empty (); }
486
+ inline const Instruction &front () const { return InstList.front (); }
487
+ inline Instruction &front () { return InstList.front (); }
488
+ inline const Instruction &back () const { return InstList.back (); }
489
+ inline Instruction &back () { return InstList.back (); }
488
490
489
491
// / Iterator to walk just the phi nodes in the basic block.
490
492
template <typename PHINodeT = PHINode, typename BBIteratorT = iterator>
@@ -677,12 +679,12 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
677
679
// / Transfer a range of instructions that belong to \p FromBB from \p
678
680
// / FromBeginIt to \p FromEndIt, to this basic block at \p ToIt.
679
681
void splice (BasicBlock::iterator ToIt, BasicBlock *FromBB,
680
- BasicBlock::iterator FromBeginIt,
681
- BasicBlock::iterator FromEndIt);
682
+ BasicBlock::iterator FromBeginIt, BasicBlock::iterator FromEndIt);
682
683
683
684
// / Erases a range of instructions from \p FromIt to (not including) \p ToIt.
684
685
// / \Returns \p ToIt.
685
- BasicBlock::iterator erase (BasicBlock::iterator FromIt, BasicBlock::iterator ToIt);
686
+ BasicBlock::iterator erase (BasicBlock::iterator FromIt,
687
+ BasicBlock::iterator ToIt);
686
688
687
689
// / Returns true if there are any uses of this basic block other than
688
690
// / direct branches, switches, etc. to it.
@@ -715,7 +717,7 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
715
717
const LandingPadInst *getLandingPadInst () const ;
716
718
LandingPadInst *getLandingPadInst () {
717
719
return const_cast <LandingPadInst *>(
718
- static_cast <const BasicBlock *>(this )->getLandingPadInst ());
720
+ static_cast <const BasicBlock *>(this )->getLandingPadInst ());
719
721
}
720
722
721
723
// / Return true if it is legal to hoist instructions into this block.
0 commit comments