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.
nudt-compiler-cpp/src/ir/GlobalValue.cpp

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