fix printing of undef vectors, this fixes "simple" and "build" in UnitTests/Vector.

Now they all pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47820 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-03-02 08:14:45 +00:00
parent 9152daf868
commit d9a706ecf9

View File

@ -913,7 +913,12 @@ void CWriter::printConstant(Constant *CPV) {
} else if (isa<UndefValue>(CPV) && CPV->getType()->isFirstClassType()) {
Out << "((";
printType(Out, CPV->getType()); // sign doesn't matter
Out << ")/*UNDEF*/0)";
Out << ")/*UNDEF*/";
if (!isa<VectorType>(CPV->getType())) {
Out << "0)";
} else {
Out << "{})";
}
return;
}