From: Anders Carlsson Date: Mon, 12 Jan 2009 02:15:29 +0000 (+0000) Subject: Make sure to initialize the ConstraintInfo to 0 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e936db474731964e72c11a4b24dd75460457f8d;p=clang Make sure to initialize the ConstraintInfo to 0 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62068 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp index 44150821a8..05004b7305 100644 --- a/lib/Basic/TargetInfo.cpp +++ b/lib/Basic/TargetInfo.cpp @@ -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: