15#ifndef IR_ANNOTATIONS_H_
16#define IR_ANNOTATIONS_H_
19#include "lib/cstring.h"
24namespace Annotations {
26[[nodiscard]] Vector<Annotation> maybeAddNameAnnotation(
const Vector<Annotation> &annos,
29[[nodiscard]] Vector<Annotation> setNameAnnotation(
const Vector<Annotation> &annos, cstring name);
30[[nodiscard]] Vector<Annotation> withoutNameAnnotation(
const Vector<Annotation> &annos);
32void addIfNew(Vector<Annotation> &annotations, cstring name,
const Expression *expr,
33 bool structured =
false);
34void addIfNew(Vector<Annotation> &annotations,
const IR::Annotation *ann);
35void addOrReplace(Vector<Annotation> &annotations, cstring name,
const Expression *expr,
36 bool structured =
false);
37void addOrReplace(Vector<Annotation> &annotations,
const IR::Annotation *ann);