From 939732afc20211a321e92cfa1095ad61e9ed9899 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 2 Mar 2008 05:46:57 +0000 Subject: [PATCH] Fix a bug I introduced in constant array and constant vector handling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47816 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/CBackend/CBackend.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index c13cdf5fda0..7fcc3dd51db 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(CPV)) { + if (ConstantArray *CA = dyn_cast(CPV)) { printConstantArray(CA); } else { assert(isa(CPV) || isa(CPV)); @@ -1005,7 +1005,7 @@ void CWriter::printConstant(Constant *CPV) { Out << "("; printType(Out, CPV->getType()); Out << ")"; - if (ConstantVector *CV = cast(CPV)) { + if (ConstantVector *CV = dyn_cast(CPV)) { printConstantVector(CV); } else { assert(isa(CPV) || isa(CPV));