mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2026-02-19 08:43:01 +00:00
Add global variables
This commit is contained in:
@@ -62,6 +62,13 @@ class Module {
|
||||
*/
|
||||
Ref Emit(Ref op);
|
||||
|
||||
/**
|
||||
* Adds a global variable
|
||||
* @param variable Global variable to add.
|
||||
* @return Returns variable.
|
||||
*/
|
||||
Ref AddGlobalVariable(Ref variable);
|
||||
|
||||
// Types
|
||||
|
||||
/// Returns type void.
|
||||
@@ -233,6 +240,8 @@ class Module {
|
||||
|
||||
std::vector<std::unique_ptr<Op>> declarations;
|
||||
|
||||
std::vector<Ref> global_variables;
|
||||
|
||||
std::vector<Ref> code;
|
||||
|
||||
std::vector<std::unique_ptr<Op>> code_store;
|
||||
|
||||
Reference in New Issue
Block a user