forked from NUDT-compiler/nudt-compiler-cpp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
561 B
19 lines
561 B
// GlobalValue / GlobalVariable 实现。
|
|
|
|
#include "ir/IR.h"
|
|
|
|
namespace ir {
|
|
|
|
GlobalValue::GlobalValue(std::shared_ptr<Type> ty, std::string name)
|
|
: User(std::move(ty), std::move(name)) {}
|
|
|
|
GlobalVariable::GlobalVariable(std::string name, std::shared_ptr<Type> ptr_ty,
|
|
int init_val, int count,
|
|
std::vector<int> init_elems)
|
|
: GlobalValue(std::move(ptr_ty), std::move(name)),
|
|
init_val_(init_val),
|
|
count_(count),
|
|
init_elems_(std::move(init_elems)) {}
|
|
|
|
} // namespace ir
|