summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCFunction.cpp
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2013-08-21 19:40:25 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2013-08-21 19:40:25 +0000
commit47c2a75e8d2cdcc0a37e2796686ea30e22bf8b6e (patch)
tree31e5f56b1eda141ea50008cc8b0e180c9b5c4f25 /llvm/lib/MC/MCFunction.cpp
parentcc5cbd316d625d44e94c6cb7edc342ca02303a1b (diff)
downloadbcm5719-llvm-47c2a75e8d2cdcc0a37e2796686ea30e22bf8b6e.tar.gz
bcm5719-llvm-47c2a75e8d2cdcc0a37e2796686ea30e22bf8b6e.zip
Style cleanup following David's review for r188876.
llvm-svn: 188924
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