Skip to content

Commit

Permalink
Rename lookup_variant to lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Sep 29, 2021
1 parent 4b6d20d commit 83a92c7
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions cranelift/codegen/src/isa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ use core::any::Any;
use core::fmt;
use core::fmt::{Debug, Formatter};
use core::hash::Hasher;
use target_lexicon::{triple, Architecture, OperatingSystem, PointerWidth, Triple};
use target_lexicon::{triple, Architecture, PointerWidth, Triple};

// This module is made public here for benchmarking purposes. No guarantees are
// made regarding API stability.
Expand Down Expand Up @@ -111,9 +111,9 @@ macro_rules! isa_builder {
}};
}

/// Look for an ISA for the given `triple`, selecting the backend variant given
/// by `variant` if available.
pub fn lookup_variant(triple: Triple) -> Result<Builder, LookupError> {
/// Look for an ISA for the given `triple`.
/// Return a builder that can create a corresponding `TargetIsa`.
pub fn lookup(triple: Triple) -> Result<Builder, LookupError> {
match triple.architecture {
Architecture::X86_64 => {
isa_builder!(x64, (feature = "x86"), triple)
Expand All @@ -125,12 +125,6 @@ pub fn lookup_variant(triple: Triple) -> Result<Builder, LookupError> {
}
}

/// Look for an ISA for the given `triple`.
/// Return a builder that can create a corresponding `TargetIsa`.
pub fn lookup(triple: Triple) -> Result<Builder, LookupError> {
lookup_variant(triple)
}

/// Look for a supported ISA with the given `name`.
/// Return a builder that can create a corresponding `TargetIsa`.
pub fn lookup_by_name(name: &str) -> Result<Builder, LookupError> {
Expand Down

0 comments on commit 83a92c7

Please sign in to comment.