aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenDAGPatterns.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2011-02-04 17:01:53 +0000
committerDavid Greene <greened@obbligato.org>2011-02-04 17:01:53 +0000
commitc83e20375746c2910331ed29f5d976d80fe728e4 (patch)
tree2ab9e0e2f7f8a2d546055799f8c5667741f588e7 /utils/TableGen/CodeGenDAGPatterns.cpp
parentccacdc1952d022108d51b1c8270eb85b2b862c9d (diff)
Silence uninitialized value warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124869 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r--utils/TableGen/CodeGenDAGPatterns.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp
index 9244cf6ceb..aa60f871bf 100644
--- a/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -383,7 +383,7 @@ bool EEVT::TypeSet::EnforceSmallerThan(EEVT::TypeSet &Other, TreePattern &TP) {
// Okay, find the smallest type from the current set and remove it from the
// largest set.
- MVT::SimpleValueType SmallestInt;
+ MVT::SimpleValueType SmallestInt = MVT::LAST_VALUETYPE;
for (unsigned i = 0, e = TypeVec.size(); i != e; ++i)
if (isInteger(TypeVec[i])) {
SmallestInt = TypeVec[i];
@@ -393,7 +393,7 @@ bool EEVT::TypeSet::EnforceSmallerThan(EEVT::TypeSet &Other, TreePattern &TP) {
if (isInteger(TypeVec[i]) && TypeVec[i] < SmallestInt)
SmallestInt = TypeVec[i];
- MVT::SimpleValueType SmallestFP;
+ MVT::SimpleValueType SmallestFP = MVT::LAST_VALUETYPE;
for (unsigned i = 0, e = TypeVec.size(); i != e; ++i)
if (isFloatingPoint(TypeVec[i])) {
SmallestFP = TypeVec[i];
@@ -439,7 +439,7 @@ bool EEVT::TypeSet::EnforceSmallerThan(EEVT::TypeSet &Other, TreePattern &TP) {
// Okay, find the largest type in the Other set and remove it from the
// current set.
- MVT::SimpleValueType LargestInt = Other.TypeVec[0];
+ MVT::SimpleValueType LargestInt = MVT::Other;
for (unsigned i = 0, e = Other.TypeVec.size(); i != e; ++i)
if (isInteger(Other.TypeVec[i])) {
LargestInt = Other.TypeVec[i];
@@ -449,7 +449,7 @@ bool EEVT::TypeSet::EnforceSmallerThan(EEVT::TypeSet &Other, TreePattern &TP) {
if (isInteger(Other.TypeVec[i]) && Other.TypeVec[i] > LargestInt)
LargestInt = Other.TypeVec[i];
- MVT::SimpleValueType LargestFP;
+ MVT::SimpleValueType LargestFP = MVT::Other;
for (unsigned i = 0, e = Other.TypeVec.size(); i != e; ++i)
if (isFloatingPoint(Other.TypeVec[i])) {
LargestFP = Other.TypeVec[i];