-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix latest LLVM 11 compatibility issues #35329
Conversation
|
8ce7fd8
to
4f8866e
Compare
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.
/Users/julia/buildbot/worker/package_macos64/build/src/llvm-late-gc-lowering.cpp:414:1: warning: control may reach end of non-void function [-Wreturn-type]
}
^
1 warning generated.
In file included from /Users/julia/buildbot/worker/package_macos64/build/src/codegen.cpp:853:
./cgutils.cpp:1349:28: warning: variable 'num_elements' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
else if (auto *VT = dyn_cast<VectorType>(T))
^~
./cgutils.cpp:1351:17: note: uninitialized use occurs here
if (num_elements == 0)
^~~~~~~~~~~~
./cgutils.cpp:1349:18: note: remove the 'if' if its condition is always true
else if (auto *VT = dyn_cast<VectorType>(T))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./cgutils.cpp:1346:34: note: initialize the variable 'num_elements' to silence this warning
uint64_t num_elements;
^
= 0
1 warning generated.
Need to fix the generated warnings, but otherwise lgtm
29232a0
to
5f08d9c
Compare
I've fixed the warnings, and addressed the following change in LLVM
by making |
|
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.
To use getNumElements, I'd have to explicitly cast T to StructType like in the following cases--do you suggest that I do this?
Probably want to use a dyn_cast
then.
I meant to say that using |
It looks like LLVM is removing all the convenience getters, and it is cheaper to do the |
Changes in LLVM: - `CompositeType` and `SequentialType` classes have been removed - `FileLineInfoSpecifier::Default` has been renamed to `RawValue` - `CreateMemCpy` now takes `MaybeAlign`s instead of `unsigned`s - deprecated overloads of `IRBuilder::CreateCall` and `CallInst::Create` have been removed - `CallSite` class has been removed
Ah, ok, changed to use |
CompositeType
class has been removedFileLineInfoSpecifier::Default
has been renamed toRawValue
@vchuravy