Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

dwarf::isCPlusPlus fails with user language #44997

Open Quuxplusone opened 4 years ago

Quuxplusone commented 4 years ago
Bugzilla Link PR46027
Status NEW
Importance P normal
Reported by Juan Wajnerman (jwajnerman@manas.com.ar)
Reported on 2020-05-21 15:14:09 -0700
Last modified on 2020-06-08 07:01:41 -0700
Version 10.0
Hardware PC Linux
CC aprantl@apple.com, dblaikie@gmail.com, jdevlieghere@apple.com, jeremy.morse.llvm@gmail.com, keith.walker@arm.com, llvm-bugs@lists.llvm.org, paul_robinson@playstation.sony.com, vsk@apple.com
Fixed by commit(s)
Attachments 0001-Allow-user-languages-in-dwarf-isCPlusPlus.patch (771 bytes, application/mbox)
Blocks
Blocked by
See also
Created attachment 23513
Allow user languages in `dwarf::isCPlusPlus`

When the source language is not one of the DW_LANG_*, dwarf::isCPlusPlus fails
with a call to  llvm_unreachable. However, any language between DW_LANG_lo_user
and DW_LANG_hi_user should be accepted.

This is causing errors on some environments for Crystal language:
https://github.com/crystal-lang/crystal/issues/9148

I'm sending the patch with a possible solution.
Quuxplusone commented 4 years ago

Attached 0001-Allow-user-languages-in-dwarf-isCPlusPlus.patch (771 bytes, application/mbox): Allow user languages in dwarf::isCPlusPlus

Quuxplusone commented 4 years ago

Hi Juan,

The reasoning and patch looks good to me, although I'm not familiar with the reasoning behind why isCPlusPlus is written the strict way it is. Could you upload the patch to LLVM phabricator ( https://reviews.llvm.org ), adding the group "debug-info" as reviewers please. (I'll try and attract more DWARFy people to it from there).

Quuxplusone commented 4 years ago

Hi Jeremy,

I just send it for review as you requested: https://reviews.llvm.org/D81389

Thanks!