Repository: JuliaLang/julia
File: src/processor_x86.cpp (C++)

Code before:
                break;
            }
        }
        for (auto fe: clone_simd) {
            if (!test_nbit(features0, fe) && test_nbit(t.en.features, fe)) {
                t.en.flags |= JL_TARGET_CLONE_SIMD;
                break;
            }
        }
        static constexpr uint32_t clone_fp16[] = {Feature::avx512fp16};
        for (auto fe: clone_fp16) {
            if (!test_nbit(features0, fe) && test_nbit(t.en.features, fe)) {
                t.en.flags |= JL_TARGET_CLONE_FLOAT16;
                break;
            }
        }
        static constexpr uint32_t clone_bf16[] = {Feature::avx512bf16};
        for (auto fe: clone_bf16) {
            if (!test_nbit(features0, fe) && test_nbit(t.en.features, fe)) {
                t.en.flags |= JL_TARGET_CLONE_BFLOAT16;
                break;
            }
        }
    }
    if (image_targets.empty())
        jl_error("No targets specifiec");
    llvm::SmallVector<jl_target_spec_t, 0> res;
    for (auto &target: image_targets) {
        auto features_en = target.en.features;
        auto features_dis = target.dis.features;
        for (auto &fename: feature_names) {
            if (fename.llvmver > JL_LLVM_VERSION) {
                unset_bits(features_en, fename.bit);
                unset_bits(features_dis, fename.bit);
            }
        }
        X86::disable_depends(features_en);
        jl_target_spec_t ele;
        std::tie(ele.cpu_name, ele.cpu_features) = get_llvm_target_str(target);
        ele.data = serialize_target_data(target.name, features_en, features_dis,
                                         target.ext_features);
        ele.flags = target.en.flags;
        ele.base = target.base;
        res.push_back(ele);
    }
    return res;
}
#endif

extern "C" int jl_test_cpu_feature(jl_cpu_feature_t feature)
{

Review comment (suggestion):
```suggestion
        jl_error("No targets specified");
```

Code after:
                break;
            }
        }
        for (auto fe: clone_simd) {
            if (!test_nbit(features0, fe) && test_nbit(t.en.features, fe)) {
                t.en.flags |= JL_TARGET_CLONE_SIMD;
                break;
            }
        }
        static constexpr uint32_t clone_fp16[] = {Feature::avx512fp16};
        for (auto fe: clone_fp16) {
            if (!test_nbit(features0, fe) && test_nbit(t.en.features, fe)) {
                t.en.flags |= JL_TARGET_CLONE_FLOAT16;
                break;
            }
        }
        static constexpr uint32_t clone_bf16[] = {Feature::avx512bf16};
        for (auto fe: clone_bf16) {
            if (!test_nbit(features0, fe) && test_nbit(t.en.features, fe)) {
                t.en.flags |= JL_TARGET_CLONE_BFLOAT16;
                break;
            }
        }
    }
    if (image_targets.empty())
        jl_error("No targets specified");
    llvm::SmallVector<jl_target_spec_t, 0> res;
    for (auto &target: image_targets) {
        auto features_en = target.en.features;
        auto features_dis = target.dis.features;
        for (auto &fename: feature_names) {
            if (fename.llvmver > JL_LLVM_VERSION) {
                unset_bits(features_en, fename.bit);
                unset_bits(features_dis, fename.bit);
            }
        }
        X86::disable_depends(features_en);
        jl_target_spec_t ele;
        std::tie(ele.cpu_name, ele.cpu_features) = get_llvm_target_str(target);
        ele.data = serialize_target_data(target.name, features_en, features_dis,
                                         target.ext_features);
        ele.flags = target.en.flags;
        ele.base = target.base;
        res.push_back(ele);
    }
    return res;
}
#endif

extern "C" int jl_test_cpu_feature(jl_cpu_feature_t feature)
{