aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/CBackend/CBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/CBackend/CBackend.cpp')
-rw-r--r--lib/Target/CBackend/CBackend.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index c13cdf5fda..7fcc3dd51d 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -981,7 +981,7 @@ void CWriter::printConstant(Constant *CPV) {
}
case Type::ArrayTyID:
- if (ConstantArray *CA = cast<ConstantArray>(CPV)) {
+ if (ConstantArray *CA = dyn_cast<ConstantArray>(CPV)) {
printConstantArray(CA);
} else {
assert(isa<ConstantAggregateZero>(CPV) || isa<UndefValue>(CPV));
@@ -1005,7 +1005,7 @@ void CWriter::printConstant(Constant *CPV) {
Out << "(";
printType(Out, CPV->getType());
Out << ")";
- if (ConstantVector *CV = cast<ConstantVector>(CPV)) {
+ if (ConstantVector *CV = dyn_cast<ConstantVector>(CPV)) {
printConstantVector(CV);
} else {
assert(isa<ConstantAggregateZero>(CPV) || isa<UndefValue>(CPV));