================
@@ -69,6 +70,24 @@ std::string FormatExtensionFlags(uint64_t Flags) {
   return llvm::join(Features, ", ");
 }
 
+std::string SerializeExtensionFlags(Bitset<AArch64::AEK_EXTENTIONS_MAX> Flags) 
{
+  std::string SerializedFlags;
+  int HexaValue = 0;
+  for(unsigned int i = 0; i < AArch64::AEK_EXTENTIONS_MAX; i ++) {
+    HexaValue <<= 1;
+    HexaValue |= (int)Flags[i];
+    if ((i+1)%4 == 0) {
----------------
topperc wrote:

This assumes AArch64::AEK_EXTENTIONS_MAX is a multiple of 4 so there is no 
remainder after the loop. Probably should static_assert that.

https://github.com/llvm/llvm-project/pull/65423
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to