banach-space / llvm-tutor

A collection of out-of-tree LLVM passes for teaching and learning
MIT License
2.95k stars 393 forks source link

Compiles with llvm 17. Solves #98. #99

Closed HFTrader closed 1 year ago

HFTrader commented 1 year ago

There is a single change in ABI that breaks compiling with clang-17: LLVMModule::getGlobalList() to LLVMModule::globals(). That was wrapped with an #if

A second change is to match any provided LLVM version in find_package() and use a second check to match major versions from 16 to 17. The reason for this is that even though we can provide a version range in find_package(), the LLVMConfigVersion.cmake installed with the llvm distribution will only match exactly the MAJOR.MINOR version.