[llvm-commits] [llvm] r136007 - in /llvm/trunk/tools/llvm-objdump: MCFunction.h llvm-objdump.cpp
Benjamin Kramer
benny.kra at googlemail.com
Mon Jul 25 16:10:23 PDT 2011
Author: d0k
Date: Mon Jul 25 18:10:23 2011
New Revision: 136007
URL: http://llvm.org/viewvc/llvm-project?rev=136007&view=rev
Log:
I will save before I commit.
I will save before I commit.
I will save before I commit.
I will save before I commit.
Modified:
llvm/trunk/tools/llvm-objdump/MCFunction.h
llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
Modified: llvm/trunk/tools/llvm-objdump/MCFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/MCFunction.h?rev=136007&r1=136006&r2=136007&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/MCFunction.h (original)
+++ llvm/trunk/tools/llvm-objdump/MCFunction.h Mon Jul 25 18:10:23 2011
@@ -48,6 +48,8 @@
succ_iterator succ_begin() const { return Succs.begin(); }
succ_iterator succ_end() const { return Succs.end(); }
+ bool contains(MCBasicBlock *BB) const { return Succs.count(BB); }
+
void addInst(const MCDecodedInst &Inst) { Insts.push_back(Inst); }
void addSucc(MCBasicBlock *BB) { Succs.insert(BB); }
};
Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=136007&r1=136006&r2=136007&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp Mon Jul 25 18:10:23 2011
@@ -286,7 +286,7 @@
// FIXME: Slow.
for (MCFunction::iterator pi = f.begin(), pe = f.end(); pi != pe;
++pi)
- for (pi->second->contains(&i->second)) {
+ if (pi->second.contains(&i->second)) {
hasPreds = true;
break;
}
More information about the llvm-commits
mailing list