Allow Switch instruction to have extractProfTotalWeight called as it can terminate a basic block. (NFC)

llvm-svn: 283918
This commit is contained in:
Dehao Chen 2016-10-11 18:53:00 +00:00
parent c9fb1ff192
commit e9d075233a
1 changed files with 2 additions and 1 deletions

View File

@ -1298,7 +1298,8 @@ bool Instruction::extractProfTotalWeight(uint64_t &TotalVal) const {
assert((getOpcode() == Instruction::Br ||
getOpcode() == Instruction::Select ||
getOpcode() == Instruction::Call ||
getOpcode() == Instruction::Invoke) &&
getOpcode() == Instruction::Invoke ||
getOpcode() == Instruction::Switch) &&
"Looking for branch weights on something besides branch");
TotalVal = 0;