Skip to content

AstAttributeMechanism::replace

Insert a new value if the attribute already exists.

Synopsis

Declared in <src/midend/astProcessing/AstAttributeMechanism.h>

bool
replace(
    std::string const& name,
    AstAttribute* value);

Description

Tests whether the specified attribute exists, and if so, invokes set. See set for details about ownership of the old and new attributes. Returns true if an attribute with the specified name already existed. An uninserted value is deleted according to its ownership policy.

Parameters

Name Description
value Base class for all IR node attribute values.

Created with MrDocs