Add a function to return the pointer type for a given triple.
Also use a slightly tidier naming convention for such functions.
This commit is contained in:
@@ -21,7 +21,7 @@ pub enum CallConv {
|
||||
|
||||
impl CallConv {
|
||||
/// Return the default calling convention for the given target triple.
|
||||
pub fn default_for_triple(triple: &Triple) -> Self {
|
||||
pub fn triple_default(triple: &Triple) -> Self {
|
||||
match triple.default_calling_convention() {
|
||||
// Default to System V for unknown targets because most everything
|
||||
// uses System V.
|
||||
|
||||
@@ -208,7 +208,7 @@ pub trait TargetIsa: fmt::Display + Sync {
|
||||
|
||||
/// Get the default calling convention of this target.
|
||||
fn default_call_conv(&self) -> CallConv {
|
||||
CallConv::default_for_triple(self.triple())
|
||||
CallConv::triple_default(self.triple())
|
||||
}
|
||||
|
||||
/// Get the pointer type of this ISA.
|
||||
|
||||
Reference in New Issue
Block a user