[clang] [FMV][AIX] Implement target_clones (cpu-only) (PR #177428)
Alexandros Lamprineas via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 13 03:47:20 PDT 2026
================
@@ -3053,9 +3008,11 @@ bool CodeGenModule::GetCPUAndFeaturesAttributes(GlobalDecl GD,
// While we populated the feature map above, we still need to
// get and parse the target attribute so we can get the cpu for
// the function.
- if (TD) {
- ParsedTargetAttr ParsedAttr =
- Target.parseTargetAttr(TD->getFeaturesStr());
+ StringRef FeatureStr =
+ TD ? TD->getFeaturesStr()
+ : (TC ? TC->getFeatureStr(GD.getMultiVersionIndex()) : StringRef());
+ if (!FeatureStr.empty()) {
----------------
labrinea wrote:
This doesn't seem right. You are parsing the target_clones attribute using `parseTargetAttr` which may be fine for PPC but may not be the case for other targets which support the target_clones attribute, like AArch64.
https://github.com/llvm/llvm-project/pull/177428
More information about the cfe-commits
mailing list