Commit
c4710203c098b 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.
extern "C" bool LLVMRustHasFeature(LLVMTargetMachineRef TM,
const char *Feature) {
+#if LLVM_RUSTLLVM
TargetMachine *Target = unwrap(TM);
const MCSubtargetInfo *MCInfo = Target->getMCSubtargetInfo();
const FeatureBitset &Bits = MCInfo->getFeatureBits();
-#if LLVM_VERSION_GE(4, 0)
const ArrayRef<SubtargetFeatureKV> FeatTable = MCInfo->getFeatureTable();
for (auto &FeatureEntry : FeatTable)