================
@@ -39,9 +39,16 @@ def _is_supported_linux(self, cmd_runner):
         if err.Fail() or retcode != 0:
             return output, False
 
-        # FIXME: simple substring match, e.g., test for 'sme' will be true if
-        # 'sme2' or 'smefa64' is present
-        return None, (self.cpu_info_flag in output)
+        # Assume that every processor presents the same features.
+        # Look for the first "Features: ...." line.
----------------
yln wrote:

Could use regex (we already `import re`) to make this more streamlined:
```
m = re.search(r"Features\s*: (.*)\n", cpuinfo)
feature_list = m.group(1).split()
```

This would also lend itself to future extension to include all processors 
features by using `re.findall()` and creating a union set of all processor 
feature lists.

https://github.com/llvm/llvm-project/pull/160675
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to