]> git.lizzy.rs Git - rust.git/commit
Enable target_feature on any LLVM 6+
authorJosh Stone <jistone@redhat.com>
Tue, 27 Mar 2018 19:27:45 +0000 (12:27 -0700)
committerJosh Stone <jistone@redhat.com>
Tue, 27 Mar 2018 19:27:45 +0000 (12:27 -0700)
commita93a4d259ae3670d748859f430aba94f065ea6df
tree255366011c8f4b7d758b6adadb9724190926658d
parent9c9424de51da41fd3d1077ac7810276f8dc746fa
Enable target_feature on any LLVM 6+

In `LLVMRustHasFeature()`, rather than using `MCInfo->getFeatureTable()`
that is specific to Rust's LLVM fork, we can use this in LLVM 6:

    /// Check whether the subtarget features are enabled/disabled as per
    /// the provided string, ignoring all other features.
    bool checkFeatures(StringRef FS) const;

Now rustc using external LLVM can also have `target_feature`.
src/rustllvm/PassWrapper.cpp
src/test/run-pass/sse2.rs