19#ifndef IR_ANNOTATIONS_H_
20#define IR_ANNOTATIONS_H_
22#include <initializer_list>
25#include "lib/cstring.h"
30namespace Annotations {
32[[nodiscard]] Vector<Annotation> maybeAddNameAnnotation(
const Vector<Annotation> &annos,
35[[nodiscard]] Vector<Annotation> setNameAnnotation(
const Vector<Annotation> &annos, cstring name);
36[[nodiscard]] Vector<Annotation> withoutNameAnnotation(
const Vector<Annotation> &annos);
38void addIfNew(Vector<Annotation> &annotations, cstring name,
const Expression *expr,
39 bool structured =
false);
41void addIfNew(Vector<Annotation> &annotations, cstring name,
42 std::initializer_list<const Expression *> exprs,
bool structured =
false);
43void addIfNew(Vector<Annotation> &annotations,
const IR::Annotation *ann);
44void addOrReplace(Vector<Annotation> &annotations, cstring name,
const Expression *expr,
45 bool structured =
false);
46void addOrReplace(Vector<Annotation> &annotations, cstring name,
47 std::initializer_list<const Expression *> exprs,
bool structured =
false);
48void addOrReplace(Vector<Annotation> &annotations,
const IR::Annotation *ann);
Definition constantParsing.h:13