aboutsummaryrefslogtreecommitdiffstats
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
commit2172767491242a77866583baf8b777683c84b3c2 (patch)
tree7d5742aba6a11296108467a0b9f61bf7f0513938
parenta68512f68fc9adf8158955fc432973953f034e3d (diff)
downloadexternal_llvm-2172767491242a77866583baf8b777683c84b3c2.zip
external_llvm-2172767491242a77866583baf8b777683c84b3c2.tar.gz
external_llvm-2172767491242a77866583baf8b777683c84b3c2.tar.bz2
Style cleanup following David's review for r188876.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188924 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/MC/MCFunction.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/MC/MCFunction.cpp b/lib/MC/MCFunction.cpp
index 85e88e5..767e1e0 100644
--- a/lib/MC/MCFunction.cpp
+++ b/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