mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
[IR] Use const_cast to reuse the const version of two BasicBlock methods that are duplicated for both const and non-const. NFC
Similar is already done for other methods in BasicBlock. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292753 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -113,10 +113,6 @@ void BasicBlock::moveAfter(BasicBlock *MovePos) {
|
||||
getIterator());
|
||||
}
|
||||
|
||||
const Module *BasicBlock::getModule() const {
|
||||
return getParent()->getParent();
|
||||
}
|
||||
|
||||
Module *BasicBlock::getModule() {
|
||||
return getParent()->getParent();
|
||||
}
|
||||
@@ -126,11 +122,6 @@ TerminatorInst *BasicBlock::getTerminator() {
|
||||
return dyn_cast<TerminatorInst>(&InstList.back());
|
||||
}
|
||||
|
||||
const TerminatorInst *BasicBlock::getTerminator() const {
|
||||
if (InstList.empty()) return nullptr;
|
||||
return dyn_cast<TerminatorInst>(&InstList.back());
|
||||
}
|
||||
|
||||
CallInst *BasicBlock::getTerminatingMustTailCall() {
|
||||
if (InstList.empty())
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user