]> granicus.if.org Git - clang/commitdiff
Make sure to initialize the ConstraintInfo to 0
authorAnders Carlsson <andersca@mac.com>
Mon, 12 Jan 2009 02:15:29 +0000 (02:15 +0000)
committerAnders Carlsson <andersca@mac.com>
Mon, 12 Jan 2009 02:15:29 +0000 (02:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62068 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/TargetInfo.cpp

index 44150821a8e10980801859567d030a676da6d982..05004b73053683298f8618ba70d6489ae4cc1ff1 100644 (file)
@@ -147,6 +147,8 @@ const char *TargetInfo::getNormalizedGCCRegisterName(const char *Name) const {
 bool TargetInfo::validateOutputConstraint(const char *Name, 
                                           ConstraintInfo &info) const
 {
+  info = CI_None;
+
   // An output constraint must start with '=' or '+'
   if (*Name != '=' && *Name != '+')
     return false;
@@ -188,6 +190,8 @@ bool TargetInfo::validateOutputConstraint(const char *Name,
 bool TargetInfo::validateInputConstraint(const char *Name,
                                          unsigned NumOutputs,
                                          ConstraintInfo &info) const {
+  info = CI_None;
+
   while (*Name) {
     switch (*Name) {
     default: