plast-lab / cclyzer-souffle

CClyzer port to souffle lang
MIT License
18 stars 8 forks source link

Llvm 10 #4

Closed TheoKant closed 3 years ago

ktrianta commented 3 years ago

Theophile thank you for the pull request!

You can create a few commits in your branch to address the issues I am pointing out in this review. The pull request will be automatically updated as soon as you commit your changes.

LLVM 10 support is great but at the same time we would like to be compatible with older versions. One way to achieve that is use the C preprocessor to conditionally compile cclyzer according to the LLVM version targeted. You can get the idea of how this can be done by checking commit https://github.com/plast-lab/cclyzer-souffle/commit/e9b9f039364819d4d58eeb75bd332e0f8be9204e. Look at the changes for files tools/fact-generator/include/FactGenerator.hpp and tools/fact-generator/include/InstructionVisitor.hpp for example.

You have to take care of types llvm::TypedDINodeRef (DIType and DIScope) and DITypeRef. Find in which LLVM version these types got deprecated and add the appropriate preprocessor directives to support versions up to that but also newer ones. Then it would be great if you could perform some experiments using the versions in question to ensure that all of them are actually supported.