diff options
author | Chris Lattner <sabre@nondot.org> | 2008-03-02 05:46:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-03-02 05:46:57 +0000 |
commit | 9140fba6ad90bf8d4460705372d09f61dc9380f1 (patch) | |
tree | 4cab0a166badd651d5085be3fafa15f6254b245c /llvm/lib/Target/CBackend/CBackend.cpp | |
parent | 7295bc15a091dc6901fafe686e5fab7e7f17c684 (diff) | |
download | bcm5719-llvm-9140fba6ad90bf8d4460705372d09f61dc9380f1.tar.gz bcm5719-llvm-9140fba6ad90bf8d4460705372d09f61dc9380f1.zip |
Fix a bug I introduced in constant array and constant vector handling.
llvm-svn: 47816
Diffstat (limited to 'llvm/lib/Target/CBackend/CBackend.cpp')
-rw-r--r-- | llvm/lib/Target/CBackend/CBackend.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/CBackend/CBackend.cpp b/llvm/lib/Target/CBackend/CBackend.cpp index c13cdf5fda0..7fcc3dd51db 100644 --- a/llvm/lib/Target/CBackend/CBackend.cpp +++ b/llvm/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)); |