From d9a706ecf923b96259f9a708ec9830b047bda6c9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 2 Mar 2008 08:14:45 +0000 Subject: [PATCH] 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 --- lib/Target/CBackend/CBackend.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } -- 2.34.1