aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/PatternMatch.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/PatternMatch.h')
-rw-r--r--include/llvm/Support/PatternMatch.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/Support/PatternMatch.h b/include/llvm/Support/PatternMatch.h
index 3d6a46110e..948ae5176e 100644
--- a/include/llvm/Support/PatternMatch.h
+++ b/include/llvm/Support/PatternMatch.h
@@ -81,7 +81,8 @@ struct apint_match {
return true;
}
if (ConstantVector *CV = dyn_cast<ConstantVector>(V))
- if (ConstantInt *CI = cast_or_null<ConstantInt>(CV->getSplatValue())) {
+ if (ConstantInt *CI =
+ dyn_cast_or_null<ConstantInt>(CV->getSplatValue())) {
Res = &CI->getValue();
return true;
}
@@ -126,7 +127,7 @@ struct cst_pred_ty : public Predicate {
if (const ConstantInt *CI = dyn_cast<ConstantInt>(V))
return this->isValue(CI->getValue());
if (const ConstantVector *CV = dyn_cast<ConstantVector>(V))
- if (ConstantInt *CI = cast_or_null<ConstantInt>(CV->getSplatValue()))
+ if (ConstantInt *CI = dyn_cast_or_null<ConstantInt>(CV->getSplatValue()))
return this->isValue(CI->getValue());
return false;
}
@@ -146,7 +147,7 @@ struct api_pred_ty : public Predicate {
return true;
}
if (const ConstantVector *CV = dyn_cast<ConstantVector>(V))
- if (ConstantInt *CI = cast_or_null<ConstantInt>(CV->getSplatValue()))
+ if (ConstantInt *CI = dyn_cast_or_null<ConstantInt>(CV->getSplatValue()))
if (this->isValue(CI->getValue())) {
Res = &CI->getValue();
return true;