Move default inline asm dialect to Session

This commit is contained in:
asquared31415 2021-03-08 12:16:12 -05:00
parent 39dcd01bf5
commit 05ae66607f
2 changed files with 9 additions and 6 deletions

View file

@ -784,6 +784,13 @@ impl Session {
}
}
pub fn inline_asm_dialect(&self) -> rustc_ast::LlvmAsmDialect {
match self.asm_arch {
Some(InlineAsmArch::X86 | InlineAsmArch::X86_64) => rustc_ast::LlvmAsmDialect::Intel,
_ => rustc_ast::LlvmAsmDialect::Att,
}
}
pub fn relocation_model(&self) -> RelocModel {
self.opts.cg.relocation_model.unwrap_or(self.target.relocation_model)
}