-
Notifications
You must be signed in to change notification settings - Fork 253
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
Support llvm 17.0.0 #1041
Support llvm 17.0.0 #1041
Conversation
2930646
to
e64a33d
Compare
Also adds extremely limited support for ARMs scalable vector extension types such that Apple Silicon macs can run unit tests..
e64a33d
to
39f8ceb
Compare
#else | ||
#include <optional> | ||
std::optional<APSInt> getIntegerConstantExpr(const Expr &E, | ||
const ASTContext &Ctx) { | ||
return E.getIntegerConstantExpr(Ctx); | ||
} | ||
#endif // CLANG_VERSION_MAJOR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does std::optional
exist before this? Maybe it's better to keep this function signature always the same and do any conversions inside the function. That way we won't run into any issues at call sites where we use some API that's on std::optional
but not llvm::Optional
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that LLVM's Optional type got deprecated with the switch to C++ 17 (source). Therefore, the intent is to not use Optional
if we're on LLVM 17 or later; that's why the function signature is intentionally changing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, did LLVM just change to using C++ 17 for itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a suggestion about std::optional
if you think that's worth changing. Otherwise it all looks good. I also added a PR description to auto-link the issue.
This adds support for
llvm
/clang
17.0.0
, as well as just enough support for ARM SVE types so that things don't crash on Apple Silicon.