From 05ae66607fe2aaab786e6444f4b674499fd79319 Mon Sep 17 00:00:00 2001 From: asquared31415 <34665709+asquared31415@users.noreply.github.com> Date: Mon, 8 Mar 2021 12:16:12 -0500 Subject: Move default inline asm dialect to Session --- compiler/rustc_session/src/session.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compiler/rustc_session/src') diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index a7ceb9e06a5..83ab066c7c3 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -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) } -- cgit 1.4.1-3-g733a5