mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-07 11:26:02 +03:00
Work around llvm::PointerType::getElementType() being deprecated in LLVM 14
This commit is contained in:
parent
101ebce014
commit
8527b3f9c8
9 changed files with 10 additions and 11 deletions
|
@ -251,7 +251,7 @@ void setRtCompileVar(const Context &context, llvm::Module &module,
|
|||
assert(nullptr != init);
|
||||
auto var = module.getGlobalVariable(name);
|
||||
if (nullptr != var) {
|
||||
auto type = var->getType()->getElementType();
|
||||
auto type = var->getValueType();
|
||||
auto initializer =
|
||||
parseInitializer(module.getDataLayout(), *type, init,
|
||||
[&](const std::string &str) { fatal(context, str); });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue