-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for LLVM 10 #60
Conversation
Hello, There are some additional changes still needed for clang 10.0 support. CompilerInvocation::setLangDefaults(*invocation->getLangOpts(), InputKind::C,
llvm::Triple(invocation->TargetOpts->Triple),
invocation->getPreprocessorOpts(),
LangStandard::lang_unspecified); with: CompilerInvocation::setLangDefaults(*invocation->getLangOpts(),
#if LLVM_VERSION_MAJOR >= 10
InputKind(clang::Language::C),
#else
InputKind::C,
#endif
llvm::Triple(invocation->TargetOpts->Triple),
invocation->getPreprocessorOpts(),
LangStandard::lang_unspecified); The following line needs to be added to llvm10_0.hpp: #include <clang/Basic/Builtins.h> There is still another issue that I have not been able to solve. I have some local changes which allow me to compile but I still don't know what are the differences with your PR.
|
Another change is required. Replace in llvm_base_model_library_processor_impl.hpp: ArrayRef<const char*> args {"-Wall", "-x", "c", "string-input"}; // -Wall or -v flag is required to avoid an error inside createInvocationFromCommandLine() with: std::vector<const char*> args {"-Wall", "-x", "c", "string-input"}; // -Wall or -v flag is required to avoid an error inside createInvocationFromCommandLine() Also, I think llvm-10 needs to compile with C++14. |
Ah yeah I was able to figure out the |
I was able to get it to link and run successfully. |
Sweet! Yeah I can put your patch on top of this PR. I'll give it a go later today. |
Co-authored-by: João Rui Leal <[email protected]>
@joaoleal sorry for taking some time, a couple busy days. I had to convert your patch to a patch I could use with the |
Resolves #59