llvm::findStringMetadataForLoop

Find string metadata for loop

Synopsis

Declared in <llvm/Analysis/LoopInfo.h>

std::optional<MDOperand const*>
findStringMetadataForLoop(
    Loop const* TheLoop,
    StringRef Name);

Description

If it has a value (e.g. {"llvm.distribute", 1} return the value as an operand or null otherwise. If the string metadata is not found return Optional's not-a-value.

Return Value

The value operand when present, otherwise std::nullopt.

Parameters

NameDescription
TheLoopLoop whose metadata is searched.
NameString metadata name to look up.