Skip to content
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

Replace deprecated VectorType::getNumElements with new APIs #41144

Merged
merged 2 commits into from
Jun 9, 2021
Merged

Replace deprecated VectorType::getNumElements with new APIs #41144

merged 2 commits into from
Jun 9, 2021

Conversation

TH3CHARLie
Copy link
Contributor

VectorType::getNumElements is first marked as deprecated (https://reviews.llvm.org/rG867de151a52b6d0750485ac1cf9b3bc012ee51fd) and is now deleted from LLVM's main branch (https://reviews.llvm.org/rG49a6502cd5c2361d9c6f49ae1ee36940afbdeb0a). So this PR replaces VectorType::getNumElements with newer APIs, following existing practice in cgutils.cpp:

julia/src/cgutils.cpp

Lines 1372 to 1377 in f442e42

#if JL_LLVM_VERSION >= 120000
ElementCount EC = VT->getElementCount();
num_elements = EC.getKnownMinValue();
#else
num_elements = VT->getNumElements();
#endif

@TH3CHARLie
Copy link
Contributor Author

cc @vtjnash @aviatesk

@aviatesk aviatesk requested a review from vtjnash June 9, 2021 08:32
@vtjnash vtjnash merged commit 47f9139 into JuliaLang:master Jun 9, 2021
@TH3CHARLie TH3CHARLie deleted the fix-vectortype-getnumelements branch June 9, 2021 14:35
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants