[foreign] Supporting different versions of LLVM
jbvernee at xs4all.nl
Mon Apr 29 11:44:56 UTC 2019
Over the weekend I have been looking into a fix for:
The underlying problem is that the behaviour of one of the libclang
function, namely `clang_Cursor_isAnonymous`, was changed to do something
very different , and I haven't been able to find a good workaround
that covers all needed cases.
So, instead I've submitted a patch to clang to add a new function that
has the old behaviour , which is currently under review and seems to
be a-go for commit soon. With a small patch on our side we can make our
code work with the new function .
While I was at it I also submitted a patch for the incomplete array
problem I worked around before .
Hopefully these patches will make it into the next LLVM release. But, it
brings up the question of which LLVM versions should be supported by us.
Currently I'm locally using version 7.0.1 which works fine, and version
8.0.0 is definitely not supported due to the `clang_Cursor_isAnonymous`
change. Once a version is released that has , we can support that
version as well, and with a version that supports  we can also remove
the incomplete array problem workaround (which is pretty extensive).
Though the latter would mean dropping support for earlier LLVM versions
as well. I think as long as there's a binary distribution available this
will not be a problem. We can update the lib-clang autoconf script to
check the LLVM version, and warn about any that are not supported.
How does that sound?
 : https://reviews.llvm.org/D54996
 : https://reviews.llvm.org/D61232
 : https://reviews.llvm.org/D61239
More information about the panama-dev