1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

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

Now they all pass.

llvm-svn: 47820
This commit is contained in:
Chris Lattner 2008-03-02 08:14:45 +00:00
parent d8eeb6b1c8
commit 75c409057a

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;
}