projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9152daf
)
fix printing of undef vectors, this fixes "simple" and "build" in UnitTests/Vector.
author
Chris Lattner
<sabre@nondot.org>
Sun, 2 Mar 2008 08:14:45 +0000
(08:14 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 2 Mar 2008 08:14:45 +0000
(08:14 +0000)
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
patch
|
blob
|
history
diff --git
a/lib/Target/CBackend/CBackend.cpp
b/lib/Target/CBackend/CBackend.cpp
index 12711c5ea3d70d8ac07b4be9f8430f92c513c0f6..ba3785a0d5e5c98a6638d9fcddba7327ac381c15 100644
(file)
--- a/
lib/Target/CBackend/CBackend.cpp
+++ b/
lib/Target/CBackend/CBackend.cpp
@@
-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;
}