Addressed review comments

This commit is contained in:
YASHASVI KHATAVKAR 2022-01-27 09:50:52 -05:00
parent 43d421cda3
commit 2c5dfeed2f
2 changed files with 11 additions and 9 deletions

View File

@ -224,15 +224,17 @@ namespace llvm {
/// Create debugging information entry for Fortran
/// assumed length string type.
/// \param Name Type name.
/// \param stringLength Metadata refrencing string length.
DIStringType *createStringType(StringRef Name, Metadata *stringLength);
/// \param StringLength String length expressed either as Metadata * or DIVariable *.
/// \param StrLocationExp Optional memory location of the string.
DIStringType *createStringType(StringRef Name, PointerUnion<Metadata *, DIVariable *>StringLength, Metadata *StrLocationExp=nullptr);
/// Create debugging information entry for Fortran
/// assumed length string type.
/// \param Name Type name.
/// \param stringLength String length expressed in DIExpression form
/// \param StringLengthExp String length expressed in DIExpression form.
/// \param StrLocationExp Optional memory location of the string.
DIStringType *createStringTypeExp(StringRef Name,
DIExpression *stringLengthExp);
DIExpression *StringLengthExp, Metadata *StrLocationExp=nullptr);
/// Create debugging information entry for a qualified
/// type, e.g. 'const int'.

View File

@ -294,17 +294,17 @@ DIStringType *DIBuilder::createStringType(StringRef Name, uint64_t SizeInBits) {
}
DIStringType *DIBuilder::createStringType(StringRef Name,
Metadata *stringLength) {
PointerUnion<Metadata *, DIVariable *>StringLength, Metadata *StrLocationExp) {
assert(!Name.empty() && "Unable to create type without name");
return DIStringType::get(VMContext, dwarf::DW_TAG_string_type, Name,
stringLength, nullptr, 0, 0, 0);
StringLength, nullptr, StrLocationExp, 0, 0, 0);
}
DIStringType *DIBuilder::createStringTypeExp(StringRef Name,
DIExpression *stringLengthExp) {
DIExpression *StringLengthExp, Metadata *StrLocationExp) {
assert(!Name.empty() && "Unable to create type without name");
return DIStringType::get(VMContext, dwarf::DW_TAG_string_type, Name, nullptr,
stringLengthExp, 0, 0, 0);
StringLengthExp,StrLocationExp, 0, 0, 0);
}
DIDerivedType *DIBuilder::createQualifiedType(unsigned Tag, DIType *FromTy) {