diff options
-rw-r--r-- | llvm/lib/IR/Metadata.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp index d4312c8b253..3e07b3a7c94 100644 --- a/llvm/lib/IR/Metadata.cpp +++ b/llvm/lib/IR/Metadata.cpp @@ -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; |