llvm::parseAtomicScopeIRString

Parses a target syncscope string into its abstract scope.

Synopsis

Declared in <llvm/TargetParser/AtomicScope.h>

std::optional<std::pair<AtomicScope, bool>>
parseAtomicScopeIRString(
    Triple const& T,
    StringRef Name);

Description

This is the inverse of getAtomicScopeIRString. Returns the scope and whether it is the single address space variant.

Return Value

The abstract scope and whether it is the single-address-space variant, or std::nullopt if Name is unrecognized for T.

Parameters

NameDescription
TTarget triple that selects the syncscope spelling.
NameLLVM IR syncscope string to parse.