summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCFunction.cpp')
-rw-r--r--llvm/lib/MC/MCFunction.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/MC/MCFunction.cpp b/llvm/lib/MC/MCFunction.cpp
index 85e88e5852d..767e1e0f470 100644
--- a/llvm/lib/MC/MCFunction.cpp
+++ b/llvm/lib/MC/MCFunction.cpp
@@ -31,16 +31,15 @@ MCBasicBlock &MCFunction::createBlock(const MCTextAtom &TA) {
return *MCBB;
}
-const MCBasicBlock *MCFunction::find(uint64_t StartAddr) const {
+MCBasicBlock *MCFunction::find(uint64_t StartAddr) {
for (const_iterator I = begin(), E = end(); I != E; ++I)
if ((*I)->getInsts()->getBeginAddr() == StartAddr)
- return (*I);
+ return *I;
return 0;
}
-MCBasicBlock *MCFunction::find(uint64_t StartAddr) {
- return const_cast<MCBasicBlock *>(
- const_cast<const MCFunction *>(this)->find(StartAddr));
+const MCBasicBlock *MCFunction::find(uint64_t StartAddr) const {
+ return const_cast<MCFunction *>(this)->find(StartAddr);
}
// MCBasicBlock
OpenPOWER on IntegriCloud