This is an archive of the discontinued LLVM Phabricator instance.

[LLVM-C] Use unwrapDI in LLVMDITypeGetName
ClosedPublic

Authored by tamird on Jul 6 2023, 10:58 AM.

Details

Summary

This function otherwise crashes. This behavior has been incorrect since
its introduction in 260b581498bed0b847e7e086852e0082d266711d (D46627).

Diff Detail

Event Timeline

tamird created this revision.Jul 6 2023, 10:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 6 2023, 10:58 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
tamird requested review of this revision.Jul 6 2023, 10:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 6 2023, 10:58 AM
tamird updated this revision to Diff 537808.Jul 6 2023, 11:16 AM

Add test.

tamird updated this revision to Diff 537812.Jul 6 2023, 11:19 AM

clang-format

tamird updated this revision to Diff 537823.Jul 6 2023, 11:55 AM

Separate test case

Could you split the NFC changes to naming/style from the functional fix to LLVMDITypeGetName and the new test?

llvm/tools/llvm-c-test/debuginfo.c
244

This seems redundant with llvm_get_di_tag, maybe it can be dropped?

tamird updated this revision to Diff 537900.Jul 6 2023, 3:24 PM

Split out NFC changes, remove redundant GetDINodeTag call

tamird marked an inline comment as done.Jul 6 2023, 3:27 PM

Could you split the NFC changes to naming/style from the functional fix to LLVMDITypeGetName and the new test?

Done in https://reviews.llvm.org/D154661.

scott.linder accepted this revision.Jul 6 2023, 3:40 PM
This revision is now accepted and ready to land.Jul 6 2023, 3:40 PM
This revision was landed with ongoing or failed builds.Jul 7 2023, 9:51 AM
This revision was automatically updated to reflect the committed changes.

Thank you again for the fix!