mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Debug Info: add an identifier field to DICompositeType.
DICompositeType will have an identifier field at position 14. For now, the field is set to null in DIBuilder. For DICompositeTypes where the template argument field (the 13th field) was optional, modify DIBuilder to make sure the template argument field is set. Now DICompositeType has 15 fields. Update DIBuilder to use NULL instead of "i32 0" for null value of a MDNode. Update verifier to check that DICompositeType has 15 fields and the last field is null or a MDString. Update testing cases to include an extra field for DICompositeType. The identifier field will be used by type uniquing so a front end can genearte a DICompositeType with a unique identifer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189282 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -617,7 +617,8 @@ DICompositeType DIBuilder::createClassType(DIDescriptor Context, StringRef Name,
|
||||
Elements,
|
||||
ConstantInt::get(Type::getInt32Ty(VMContext), 0),
|
||||
VTableHolder,
|
||||
TemplateParams
|
||||
TemplateParams,
|
||||
NULL // Type Identifer
|
||||
};
|
||||
DICompositeType R(MDNode::get(VMContext, Elts));
|
||||
assert(R.isCompositeType() &&
|
||||
@ -651,6 +652,7 @@ DICompositeType DIBuilder::createStructType(DIDescriptor Context,
|
||||
ConstantInt::get(Type::getInt32Ty(VMContext), RunTimeLang),
|
||||
VTableHolder,
|
||||
NULL,
|
||||
NULL // Type Identifer
|
||||
};
|
||||
DICompositeType R(MDNode::get(VMContext, Elts));
|
||||
assert(R.isCompositeType() &&
|
||||
@ -679,8 +681,9 @@ DICompositeType DIBuilder::createUnionType(DIDescriptor Scope, StringRef Name,
|
||||
NULL,
|
||||
Elements,
|
||||
ConstantInt::get(Type::getInt32Ty(VMContext), RunTimeLang),
|
||||
Constant::getNullValue(Type::getInt32Ty(VMContext)),
|
||||
NULL
|
||||
NULL,
|
||||
NULL,
|
||||
NULL // Type Identifer
|
||||
};
|
||||
return DICompositeType(MDNode::get(VMContext, Elts));
|
||||
}
|
||||
@ -702,7 +705,9 @@ DIBuilder::createSubroutineType(DIFile File, DIArray ParameterTypes) {
|
||||
NULL,
|
||||
ParameterTypes,
|
||||
ConstantInt::get(Type::getInt32Ty(VMContext), 0),
|
||||
Constant::getNullValue(Type::getInt32Ty(VMContext))
|
||||
NULL,
|
||||
NULL,
|
||||
NULL // Type Identifer
|
||||
};
|
||||
return DICompositeType(MDNode::get(VMContext, Elts));
|
||||
}
|
||||
@ -727,7 +732,9 @@ DICompositeType DIBuilder::createEnumerationType(
|
||||
UnderlyingType,
|
||||
Elements,
|
||||
ConstantInt::get(Type::getInt32Ty(VMContext), 0),
|
||||
Constant::getNullValue(Type::getInt32Ty(VMContext))
|
||||
NULL,
|
||||
NULL,
|
||||
NULL // Type Identifer
|
||||
};
|
||||
MDNode *Node = MDNode::get(VMContext, Elts);
|
||||
AllEnumTypes.push_back(Node);
|
||||
@ -751,7 +758,9 @@ DICompositeType DIBuilder::createArrayType(uint64_t Size, uint64_t AlignInBits,
|
||||
Ty,
|
||||
Subscripts,
|
||||
ConstantInt::get(Type::getInt32Ty(VMContext), 0),
|
||||
Constant::getNullValue(Type::getInt32Ty(VMContext))
|
||||
NULL,
|
||||
NULL,
|
||||
NULL // Type Identifer
|
||||
};
|
||||
return DICompositeType(MDNode::get(VMContext, Elts));
|
||||
}
|
||||
@ -773,7 +782,9 @@ DICompositeType DIBuilder::createVectorType(uint64_t Size, uint64_t AlignInBits,
|
||||
Ty,
|
||||
Subscripts,
|
||||
ConstantInt::get(Type::getInt32Ty(VMContext), 0),
|
||||
Constant::getNullValue(Type::getInt32Ty(VMContext))
|
||||
NULL,
|
||||
NULL,
|
||||
NULL // Type Identifer
|
||||
};
|
||||
return DICompositeType(MDNode::get(VMContext, Elts));
|
||||
}
|
||||
@ -864,7 +875,9 @@ DICompositeType DIBuilder::createForwardDecl(unsigned Tag, StringRef Name,
|
||||
NULL,
|
||||
DIArray(),
|
||||
ConstantInt::get(Type::getInt32Ty(VMContext), RuntimeLang),
|
||||
NULL
|
||||
NULL,
|
||||
NULL, //TemplateParams
|
||||
NULL // Type Identifer
|
||||
};
|
||||
MDNode *Node = MDNode::getTemporary(VMContext, Elts);
|
||||
DICompositeType RetTy(Node);
|
||||
|
Reference in New Issue
Block a user