Use llvm_unreachable for unknown TargetCostKind.

TargetTransformInfo::getInstructionCost's switch covers all TargetCostKind cases so we shouldn't return for a default case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312888 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Simon Pilgrim 2017-09-10 18:42:23 +00:00
parent ae1a1a7f1b
commit 4c5a286d7b

View File

@ -142,8 +142,7 @@ public:
case TCK_CodeSize:
return getUserCost(I);
}
return 0;
llvm_unreachable("Unknown instruction cost kind");
}
/// \brief Underlying constants for 'cost' values in this interface.