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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283918 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dehao Chen 2016-10-11 18:53:00 +00:00
parent ef587f51d8
commit 1d2f9bc411

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;