Replace a temporary node with a permanent one.

Synopsis

Declared in <llvm/IR/Metadata.h>

template<class T>
static
T*
replaceWithPermanent(std::unique_ptr<T, TempMDNodeDeleter> N)
requires std::is_base_of<MDNode, T>::value;

Description

Try to create a uniqued version of N ‐‐ in place, if possible ‐‐ and return it. If N cannot be uniqued, return a distinct node instead.

Return Value

A permanent (uniqued or distinct) replacement for N.

Parameters

Name

Description

N

Temporary node to promote to permanent storage.

Created with MrDocs