diff options
| author | Nagi5Yeq <wu@x-nagi.com> | 2020-05-30 18:27:16 +0800 |
|---|---|---|
| committer | Nagi5Yeq <wu@x-nagi.com> | 2020-05-30 18:27:16 +0800 |
| commit | fd21f31e654a97027799f0fdf3518fd639415121 (patch) | |
| tree | a88dd5a89899fd53909772795382c899b4ec014a /Type.cc | |
| parent | fb1fed0f275d1673cf6fb6c3887bc8919e1849d7 (diff) | |
add zeroinitializer for global variable
Diffstat (limited to 'Type.cc')
| -rw-r--r-- | Type.cc | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -25,6 +25,10 @@ const char* Type::GetCommonName() { return name_.c_str(); } llvm::Type* Type::GetLLVMType() { return LLVMType_; } +llvm::Constant* Type::GetZeroInitializer() { + return llvm::Constant::getNullValue(LLVMType_); +} + Value Type::NotAllowed(Value v, Context* context) { return nullptr; } Value Type::NotAllowed(Value v0, Value v1, Context* context) { return nullptr; } |
