From: Chris Lattner Date: Sun, 2 Mar 2008 08:14:45 +0000 (+0000) Subject: fix printing of undef vectors, this fixes "simple" and "build" in UnitTests/Vector. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d9a706ecf923b96259f9a708ec9830b047bda6c9;p=oota-llvm.git 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 --- diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 12711c5ea3d..ba3785a0d5e 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -913,7 +913,12 @@ void CWriter::printConstant(Constant *CPV) { } else if (isa(CPV) && CPV->getType()->isFirstClassType()) { Out << "(("; printType(Out, CPV->getType()); // sign doesn't matter - Out << ")/*UNDEF*/0)"; + Out << ")/*UNDEF*/"; + if (!isa(CPV->getType())) { + Out << "0)"; + } else { + Out << "{})"; + } return; }