From fb99fc96c9c373b7b43965a0acbb4a81f09b86c5 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 6 Jan 2015 05:55:56 +0000 Subject: [PATCH] Basic: fix compilation with MSVC MSVC doesn't like the instantiation of the structure in the initializer list. Initialize it in the constructor body to repair the build. TargetInfo.h(545) : error C2143: syntax error : missing ')' before '{' TargetInfo.h(545) : error C2143: syntax error : missing ';' before '}' TargetInfo.h(545) : error C2059: syntax error : ')' TargetInfo.h(545) : error C2059: syntax error : ',' TargetInfo.h(547) : error C2143: syntax error : missing ';' before '{' TargetInfo.h(547) : error C2447: '{' : missing function header (old-style formal list?) llvm-svn: 225247 --- clang/include/clang/Basic/TargetInfo.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clang/include/clang/Basic/TargetInfo.h b/clang/include/clang/Basic/TargetInfo.h index 0ebd9c8..a2ff7e2 100644 --- a/clang/include/clang/Basic/TargetInfo.h +++ b/clang/include/clang/Basic/TargetInfo.h @@ -543,8 +543,10 @@ public: std::string Name; // Operand name: [foo] with no []'s. public: ConstraintInfo(StringRef ConstraintStr, StringRef Name) - : Flags(0), TiedOperand(-1), ImmRange({0, 0}), - ConstraintStr(ConstraintStr.str()), Name(Name.str()) {} + : Flags(0), TiedOperand(-1), ConstraintStr(ConstraintStr.str()), + Name(Name.str()) { + ImmRange.Min = ImmRange.Max = 0; + } const std::string &getConstraintStr() const { return ConstraintStr; } const std::string &getName() const { return Name; } -- 2.7.4