diff options
| author | asquared31415 <34665709+asquared31415@users.noreply.github.com> | 2021-03-08 12:16:12 -0500 |
|---|---|---|
| committer | asquared31415 <34665709+asquared31415@users.noreply.github.com> | 2021-03-08 12:16:12 -0500 |
| commit | 05ae66607fe2aaab786e6444f4b674499fd79319 (patch) | |
| tree | 1b093e8bb86e88b70c9ea81774255409b2ec2a40 /compiler/rustc_session/src | |
| parent | 39dcd01bf5e0c69c487f18903f44074f49ef205b (diff) | |
| download | rust-05ae66607fe2aaab786e6444f4b674499fd79319.tar.gz rust-05ae66607fe2aaab786e6444f4b674499fd79319.zip | |
Move default inline asm dialect to Session
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/session.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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) } |
