[llvm] r355327 - [Subtarget] Follow up to r355167, add another set of curly braces to FeatureBitArray initialization to satisfy older versions of clang.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 11:23:37 PST 2019


Author: ctopper
Date: Mon Mar  4 11:23:37 2019
New Revision: 355327

URL: http://llvm.org/viewvc/llvm-project?rev=355327&view=rev
Log:
[Subtarget] Follow up to r355167, add another set of curly braces to FeatureBitArray initialization to satisfy older versions of clang.

Apparently older versions of clang like 3.6 require an extra set of curly braces around std::array initializations. I'm told the C++ language was changed regarding this by CWG 1270.

Modified:
    llvm/trunk/utils/TableGen/SubtargetEmitter.cpp

Modified: llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/SubtargetEmitter.cpp?rev=355327&r1=355326&r2=355327&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/SubtargetEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/SubtargetEmitter.cpp Mon Mar  4 11:23:37 2019
@@ -182,13 +182,13 @@ static void printFeatureMask(raw_ostream
     Mask[Bit / 64] |= 1ULL << (Bit % 64);
   }
 
-  OS << "{ { ";
+  OS << "{ { { ";
   for (unsigned i = 0; i != Mask.size(); ++i) {
     OS << "0x";
     OS.write_hex(Mask[i]);
     OS << "ULL, ";
   }
-  OS << "} }";
+  OS << "} } }";
 }
 
 //




More information about the llvm-commits mailing list