top | up | prev | next

Metadata Class

Definition at line 100 of Metadata.hpp

Constructors

Metadata()
Metadata(const Metadata&) delete

Member Functions

void AddItem(MDItem* item)
MDBasicBlockRef* CreateMDBasicBlockRef(void* bb)
MDBool* CreateMDBool(bool value)
MDLong* CreateMDLong(int64_t value)
MDString* CreateMDString(const std::string& value)
MDStruct* CreateMDStruct()
MDStructRef* CreateMDStructRef(int id)
void Write(CodeFormatter& formatter)
Metadata& operator=(const Metadata&) delete

Member Variables

std::vector<std::unique_ptr<MDItem>> items
MDBool mdFalse
MDBool mdTrue
std::vector<std::unique_ptr<MDStruct>> structs

Constructor Details

Metadata Constructor

cmsxi::Metadata::Metadata()

Definition at line 110 of Metadata.cpp :
110 : mdTrue(true)mdFalse(false)
111 {
112 }


Declaration at line 103 of Metadata.hpp


Metadata Constructor

cmsxi::Metadata::Metadata(const Metadata &) delete

Definition at line 104 of Metadata.hpp


Member Function Details

AddItem Member Function

void cmsxi::Metadata::AddItem(MDItem * item)

Definition at line 140 of Metadata.cpp :
141 {
142     items.push_back(std::unique_ptr<MDItem>(item));;
143 }


Declaration at line 114 of Metadata.hpp

Called by: cmsxi::Metadata::CreateMDBasicBlockRef , cmsxi::Metadata::CreateMDLong , cmsxi::Metadata::CreateMDString , cmsxi::Metadata::CreateMDStructRef


CreateMDBasicBlockRef Member Function

MDBasicBlockRef * cmsxi::Metadata::CreateMDBasicBlockRef(void * bb)

Definition at line 159 of Metadata.cpp :
160 {
161     MDBasicBlockRef* item = new MDBasicBlockRef(bb);
162     AddItem(item);
163     return item;
164 }


Declaration at line 111 of Metadata.hpp

Calls: cmsxi::Metadata::AddItem

Called by: cmsxi::Context::CreateMDBasicBlockRef


CreateMDBool Member Function

MDBool * cmsxi::Metadata::CreateMDBool(bool value)

Definition at line 114 of Metadata.cpp :
115 {
116     if (value)
117     {
118         return &mdTrue;
119     }
120     else
121     {
122         return &mdFalse;
123     }
124 }


Declaration at line 106 of Metadata.hpp

Called by: cmsxi::Context::CreateMDBool


CreateMDLong Member Function

MDLong * cmsxi::Metadata::CreateMDLong(int64_t value)

Definition at line 126 of Metadata.cpp :
127 {
128     MDLong* item = new MDLong(value);
129     AddItem(item);
130     return item;
131 }


Declaration at line 107 of Metadata.hpp

Calls: cmsxi::Metadata::AddItem

Called by: cmsxi::Context::AddLineInfo , cmsxi::Context::CreateMDLong , cmsxi::Context::GetMDStructRefForSourceFile


CreateMDString Member Function

MDString * cmsxi::Metadata::CreateMDString(const std::string& value)

Definition at line 133 of Metadata.cpp :
134 {
135     MDString* item = new MDString(value);
136     AddItem(item);
137     return item;
138 }


Declaration at line 108 of Metadata.hpp

Calls: cmsxi::Metadata::AddItem

Called by: cmsxi::Context::CreateMDString , cmsxi::Context::GetMDStructRefForSourceFile


CreateMDStruct Member Function

MDStruct * cmsxi::Metadata::CreateMDStruct()

Definition at line 152 of Metadata.cpp :
153 {
154     MDStruct* item = new MDStruct(structs.size());
155     structs.push_back(std::unique_ptr<MDStruct>(item));
156     return item;
157 }


Declaration at line 110 of Metadata.hpp

Called by: cmsxi::Context::AddLineInfo , cmsxi::Context::CreateMDStruct , cmsxi::Context::GetMDStructRefForSourceFile


CreateMDStructRef Member Function

MDStructRef * cmsxi::Metadata::CreateMDStructRef(int id)

Definition at line 145 of Metadata.cpp :
146 {
147     MDStructRef* item = new MDStructRef(id);
148     AddItem(item);
149     return item;
150 }


Declaration at line 109 of Metadata.hpp

Calls: cmsxi::Metadata::AddItem

Called by: cmsxi::Context::AddLineInfo , cmsxi::Context::CreateMDStructRef , cmsxi::Context::GetMDStructRefForSourceFile


Write Member Function

void cmsxi::Metadata::Write(CodeFormatter& formatter)

Definition at line 166 of Metadata.cpp

Called by: cmsxi::CompileUnit::Write


operator= Member Function

Metadata & cmsxi::Metadata::operator=(const Metadata &) delete

Definition at line 105 of Metadata.hpp


top | up | prev | next