llvm::getEffectiveCodeModel

Return the effective code model, or Default when CM has no value.

Synopsis

Declared in <llvm/CodeGen/CodeGenTargetMachineImpl.h>

CodeModel::Model
getEffectiveCodeModel(
    std::optional<CodeModel::Model> CM,
    CodeModel::Model Default);

Description

The tiny and kernel models will produce an error, so targets that support them or require more complex codemodel selection logic should implement and call their own getEffectiveCodeModel.

Return Value

The selected code model.

Parameters

NameDescription
CMOptional requested code model.
DefaultCode model used when CM has no value.