Skip to content

Commit

Permalink
Change to a misleadingly similar function
Browse files Browse the repository at this point in the history
`setFlags` clears some flags, while `setFlag` only changes the specified
flag. This resolves an issue where instructions weren't checked as
target for both calls and branches.
  • Loading branch information
amstrnad committed Oct 7, 2019
1 parent 67ab73e commit 0842ce8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/Target/RISCV/ISPMetadataPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ static void setMIFlags(MachineInstr *MI) {
MI->setFlag(MachineInstr::FnEpilog);
}
else if ( MI->isCall() )
MI->setFlags(MachineInstr::IsCall);
MI->setFlag(MachineInstr::IsCall);
else if ( MI->isBranch() )
MI->setFlags(MachineInstr::IsBranch);
MI->setFlag(MachineInstr::IsBranch);

}

Expand Down

0 comments on commit 0842ce8

Please sign in to comment.