Skip to content

getFeatureTable() doesn't exist in LLVM 4.x #43555

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

Closed
ishitatsuyuki opened this issue Jul 30, 2017 · 3 comments
Closed

getFeatureTable() doesn't exist in LLVM 4.x #43555

ishitatsuyuki opened this issue Jul 30, 2017 · 3 comments
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@ishitatsuyuki
Copy link
Contributor

Blame: c471020
Arch Linux, LLVM 4.0.1-5 (using system llvm shared)

cargo:warning=../rustllvm/PassWrapper.cpp: In function ‘bool LLVMRustHasFeature(LLVMTargetMachineRef, const char*)’:
cargo:warning=../rustllvm/PassWrapper.cpp:185:58: error: ‘const class llvm::MCSubtargetInfo’ has no member named ‘getFeatureTable’; did you mean ‘getFeatureBits’?
cargo:warning=   const ArrayRef<SubtargetFeatureKV> FeatTable = MCInfo->getFeatureTable();
cargo:warning=                                                          ^~~~~~~~~~~~~~~
cargo:warning=                                                          getFeatureBits
@TimNN
Copy link
Contributor

TimNN commented Jul 30, 2017

The problem is likely that getFeatureTable() is provided by a custom patch to the rust LLVM fork: rust-lang/llvm@68e1e29

@TimNN TimNN added A-build A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 30, 2017
@alexcrichton
Copy link
Member

cc @lu-zero, mind taking a look here?

@lu-zero
Copy link
Contributor

lu-zero commented Aug 1, 2017

Sure, I misread the guards somehow and now I'm much sleepier so I guess I'll send PR with the correct guard in ~10 hours from now.

bors added a commit that referenced this issue Aug 2, 2017
Gate LLVMRustHasFeature on LLVM_RUSTLLVM

Commit c471020 in #43492 make `LLVMRustHasFeature` "more robust"
by using `getFeatureTable()`.  However, this function is specific to
Rust's own LLVM fork, not upstream LLVM-4.0, so we need to use
`#if LLVM_RUSTLLVM` to guard this call.

Closes #43555.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants