mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 16:11:08 +03:00
Disable metadata for typeid(void).
This commit is contained in:
parent
652a4b39c0
commit
b7b671ce48
1 changed files with 18 additions and 15 deletions
|
@ -302,6 +302,8 @@ void DtoResolveTypeInfo(TypeInfoDeclaration* tid)
|
||||||
|
|
||||||
tid->ir.irGlobal = irg;
|
tid->ir.irGlobal = irg;
|
||||||
|
|
||||||
|
// don't do this for void or llvm will crash
|
||||||
|
if (tid->tinfo->ty != Tvoid) {
|
||||||
// Add some metadata for use by optimization passes.
|
// Add some metadata for use by optimization passes.
|
||||||
std::string metaname = std::string(TD_PREFIX) + mangle;
|
std::string metaname = std::string(TD_PREFIX) + mangle;
|
||||||
llvm::NamedMDNode* meta = gIR->module->getNamedMetadata(metaname);
|
llvm::NamedMDNode* meta = gIR->module->getNamedMetadata(metaname);
|
||||||
|
@ -318,6 +320,7 @@ void DtoResolveTypeInfo(TypeInfoDeclaration* tid)
|
||||||
// Insert it into the module
|
// Insert it into the module
|
||||||
llvm::NamedMDNode::Create(metaname, &metadata, 1, gIR->module);
|
llvm::NamedMDNode::Create(metaname, &metadata, 1, gIR->module);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
DtoDeclareTypeInfo(tid);
|
DtoDeclareTypeInfo(tid);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue