top | up | prev | next

CompileUnit Class

Definition at line 14 of CompileUnit.hpp

Constructors

CompileUnit(const CompileUnit&) delete
CompileUnit(const std::string& filePath_)

Member Functions

Context* GetContext()
Function* GetOrInsertFunction(const std::string& name, FunctionType* type)
void SetId(const std::string& id_)
void SetSourceFilePath(const std::string& sourceFilePath_)
void Write()
CompileUnit& operator=(const CompileUnit&) delete

Member Variables

Context context
MDStructRef* cu
std::string filePath
std::unordered_map<std::string, Function*> functionMap
std::vector<std::unique_ptr<Function>> functions
std::string id
std::string sourceFilePath

Constructor Details

CompileUnit Constructor

cmsxi::CompileUnit::CompileUnit(const CompileUnit &) delete

Definition at line 18 of CompileUnit.hpp


CompileUnit Constructor

cmsxi::CompileUnit::CompileUnit(const std::string& filePath_)

Definition at line 12 of CompileUnit.cpp :
12 : filePath(filePath_)context()cu(nullptr)
13 {
14 }


Declaration at line 17 of CompileUnit.hpp


Member Function Details

GetContext Member Function

Context * cmsxi::CompileUnit::GetContext()

Definition at line 24 of CompileUnit.hpp :
24 { return &context; }


GetOrInsertFunction Member Function

Function * cmsxi::CompileUnit::GetOrInsertFunction(const std::string& name, FunctionType * type)

Definition at line 27 of CompileUnit.cpp
Declaration at line 20 of CompileUnit.hpp


SetId Member Function

void cmsxi::CompileUnit::SetId(const std::string& id_)

Definition at line 16 of CompileUnit.cpp :
17 {
18     id = id_;
19 }


Declaration at line 21 of CompileUnit.hpp


SetSourceFilePath Member Function

void cmsxi::CompileUnit::SetSourceFilePath(const std::string& sourceFilePath_)

Definition at line 21 of CompileUnit.cpp :
22 {
23     sourceFilePath = sourceFilePath_;
24     cu = context.GetMDStructRefForSourceFile(sourceFilePath);
25 }


Declaration at line 22 of CompileUnit.hpp

Calls: cmsxi::Context::GetMDStructRefForSourceFile


Write Member Function

void cmsxi::CompileUnit::Write()

Definition at line 43 of CompileUnit.cpp
Declaration at line 23 of CompileUnit.hpp

Calls: cmsxi::Context::GetDataRepository , cmsxi::Context::GetMetadata , cmsxi::Context::GetTypeRepository , cmsxi::DataRepository::Write , cmsxi::MDStructRef::Write , cmsxi::Metadata::Write , cmsxi::TypeRepository::Write


operator= Member Function

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

Definition at line 19 of CompileUnit.hpp


top | up | prev | next