mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-27 09:03:15 +01:00
Work around an LLVM bug by not referring to globals from metadata. This was
only used for consistency checking anyway. For the LLVM bug, see http://llvm.org/PR4180 / http://llvm.org/PR4046
This commit is contained in:
@@ -295,7 +295,8 @@ void DtoResolveTypeInfo(TypeInfoDeclaration* tid)
|
||||
if (!meta && tid->tinfo->toBasetype()->ty < Terror) {
|
||||
// Construct the fields
|
||||
LLConstant* mdVals[TD_NumFields];
|
||||
mdVals[TD_Confirm] = llvm::cast<LLConstant>(irg->value);
|
||||
if (TD_Confirm >= 0)
|
||||
mdVals[TD_Confirm] = llvm::cast<LLConstant>(irg->value);
|
||||
mdVals[TD_Type] = llvm::UndefValue::get(DtoType(tid->tinfo));
|
||||
// Construct the metadata
|
||||
llvm::MDNode* metadata = llvm::MDNode::get(mdVals, TD_NumFields);
|
||||
|
||||
Reference in New Issue
Block a user