mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-07 11:26:02 +03:00
jit: refactor valueparser (#2744)
This commit is contained in:
parent
65337ed170
commit
d2c55491c4
3 changed files with 129 additions and 51 deletions
|
@ -159,7 +159,8 @@ void setRtCompileVar(const Context &context, llvm::Module &module,
|
|||
if (nullptr != var) {
|
||||
auto type = var->getType()->getElementType();
|
||||
auto initializer =
|
||||
parseInitializer(context, module.getDataLayout(), type, init);
|
||||
parseInitializer(module.getDataLayout(), *type, init,
|
||||
[&](const std::string &str) { fatal(context, str); });
|
||||
var->setConstant(true);
|
||||
var->setInitializer(initializer);
|
||||
var->setLinkage(llvm::GlobalValue::PrivateLinkage);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue