Support for building with LLVM 19#1099
Merged
AlexDenisov merged 6 commits intomull-project:mainfrom Sep 14, 2025
Merged
Conversation
Something would appear to have changed among clang's header inclusions between versions 18 and 19. I haven't dug too far into it but in at least clang 19.1.7, llvm::Module is incomplete when used in MutationPoint.cpp. Include the Module.h header to ensure the class is available.
llvm::StringRef's endswith has been deprecated since llvm commit 1b97645e56bf321b, part of llvm 17 and was removed in llvm 20. Users are now expected to use the ends_with function instead. Abide by this. Seeing as mull appears to still support several llvm versions predating 17, care is taken to use the older naming convention in these.
6c1dbd5359c4336d, part of llvm 20, removed the getName function in llvm::FileEntry. Use the namesake in llvm::FileEntryRef instead. N.B. I'm not entirely sure this does the right thing. I'd assume it does, especially judging by the pre-llvm18 code. If I'm mistaken, please let me know.
Seems StringRef::equals was temporarily removed in llvm 19. While it's back in 20, tags such as 19.1.7 does not include it. Use the equality operator instead. This appears to have been there forever and it seems unlikely it'd ever be removed
Mull doesn't compile with llvm 20 due to llvm_shutdown_obj not being being available. Include the required header.
Member
|
Thank you for the initiative @vengaer, I'll try to get to it soon-ish 🙇 |
AlexDenisov
approved these changes
Sep 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I ran into some trouble when wanting to use Mull with LLVM 19. Can't claim there is too much interesting in it the incompatibilities - mostly a few functions that have been either renamed or removed, and a few headers that now need to be included explicitly.
I won't claim that there changes include everything required for full LLVM 19 compatibility. I have, for example, made no effort to update the CI so this is definitely not on par with the work done when adding LLVM 18 support. Still, it ought to at least be a decent start. If you're interested in it, you're more than welcome to use it.