I will save before I commit.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 25 Jul 2011 23:10:23 +0000 (23:10 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 25 Jul 2011 23:10:23 +0000 (23:10 +0000)
I will save before I commit.
I will save before I commit.
I will save before I commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136007 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-objdump/MCFunction.h
tools/llvm-objdump/llvm-objdump.cpp

index 60f6429209256e467b627d17528b43e13fa36e87..f156e940118366f6ddfff7af19699987e781bbe6 100644 (file)
@@ -48,6 +48,8 @@ public:
   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); }
 };
index 99549266c24179027315487187f92eb8a82e6ffc..b1c74d298b3694cce30e630705bd2f380197d13d 100644 (file)
@@ -286,7 +286,7 @@ static void DisassembleInput(const StringRef &Filename) {
           // 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;
             }