Skip to content

Commit

Permalink
Def here is an Instruction, so !isa<Instruction>(Def) is always false,
Browse files Browse the repository at this point in the history
as Eli noticed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154641 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Dan Gohman committed Apr 13, 2012
1 parent 558ece2 commit 0120f79
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/VMCore/Dominators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,9 @@ bool DominatorTree::dominates(const Instruction *Def,
const Use &U) const {
Instruction *UserInst = dyn_cast<Instruction>(U.getUser());

// All non-instructions conceptually dominate everything. Instructions do
// not dominate non-instructions.
// Instructions do not dominate non-instructions.
if (!UserInst)
return !isa<Instruction>(Def);
return false;

const BasicBlock *DefBB = Def->getParent();

Expand Down

0 comments on commit 0120f79

Please sign in to comment.