[llvm-commits] [llvm] r47820 - /llvm/trunk/lib/Target/CBackend/CBackend.cpp
Chris Lattner
sabre at nondot.org
Sun Mar 2 00:14:46 PST 2008
Author: lattner
Date: Sun Mar 2 02:14:45 2008
New Revision: 47820
URL: http://llvm.org/viewvc/llvm-project?rev=47820&view=rev
Log:
fix printing of undef vectors, this fixes "simple" and "build" in UnitTests/Vector.
Now they all pass.
Modified:
llvm/trunk/lib/Target/CBackend/CBackend.cpp
Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CBackend.cpp?rev=47820&r1=47819&r2=47820&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CBackend/CBackend.cpp (original)
+++ llvm/trunk/lib/Target/CBackend/CBackend.cpp Sun Mar 2 02:14:45 2008
@@ -913,7 +913,12 @@
} 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;
}
More information about the llvm-commits
mailing list