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 | 8673e325959fa02ed285832cf99e462766ce3662 (patch) | |
tree | 6b817ac0d993edcff4c38bd0c55194e444179bb5 | |
parent | f858a04ae9d72c4d2bc31166b80439e83d2eb76b (diff) | |
download | external_llvm-8673e325959fa02ed285832cf99e462766ce3662.zip external_llvm-8673e325959fa02ed285832cf99e462766ce3662.tar.gz external_llvm-8673e325959fa02ed285832cf99e462766ce3662.tar.bz2 |
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
-rw-r--r-- | lib/Target/CBackend/CBackend.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index c13cdf5..7fcc3dd 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)); |