|
1 |
| -use abi::{self, Abi, Align, FieldPlacement, Size}; |
2 |
| -use abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods}; |
3 |
| -use spec::HasTargetSpec; |
| 1 | +use crate::abi::{self, Abi, Align, FieldPlacement, Size}; |
| 2 | +use crate::abi::{HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods}; |
| 3 | +use crate::spec::{self, HasTargetSpec}; |
4 | 4 |
|
5 | 5 | mod aarch64;
|
6 | 6 | mod amdgpu;
|
@@ -42,13 +42,13 @@ pub enum PassMode {
|
42 | 42 |
|
43 | 43 | // Hack to disable non_upper_case_globals only for the bitflags! and not for the rest
|
44 | 44 | // of this module
|
45 |
| -pub use self::attr_impl::ArgAttribute; |
| 45 | +pub use attr_impl::ArgAttribute; |
46 | 46 |
|
47 | 47 | #[allow(non_upper_case_globals)]
|
48 | 48 | #[allow(unused)]
|
49 | 49 | mod attr_impl {
|
50 | 50 | // The subset of llvm::Attribute needed for arguments, packed into a bitfield.
|
51 |
| - bitflags! { |
| 51 | + bitflags::bitflags! { |
52 | 52 | #[derive(Default)]
|
53 | 53 | pub struct ArgAttribute: u16 {
|
54 | 54 | const ByVal = 1 << 0;
|
@@ -526,22 +526,22 @@ pub struct FnType<'a, Ty> {
|
526 | 526 | }
|
527 | 527 |
|
528 | 528 | impl<'a, Ty> FnType<'a, Ty> {
|
529 |
| - pub fn adjust_for_cabi<C>(&mut self, cx: &C, abi: ::spec::abi::Abi) -> Result<(), String> |
| 529 | + pub fn adjust_for_cabi<C>(&mut self, cx: &C, abi: spec::abi::Abi) -> Result<(), String> |
530 | 530 | where Ty: TyLayoutMethods<'a, C> + Copy,
|
531 | 531 | C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout + HasTargetSpec
|
532 | 532 | {
|
533 | 533 | match &cx.target_spec().arch[..] {
|
534 | 534 | "x86" => {
|
535 |
| - let flavor = if abi == ::spec::abi::Abi::Fastcall { |
| 535 | + let flavor = if abi == spec::abi::Abi::Fastcall { |
536 | 536 | x86::Flavor::Fastcall
|
537 | 537 | } else {
|
538 | 538 | x86::Flavor::General
|
539 | 539 | };
|
540 | 540 | x86::compute_abi_info(cx, self, flavor);
|
541 | 541 | },
|
542 |
| - "x86_64" => if abi == ::spec::abi::Abi::SysV64 { |
| 542 | + "x86_64" => if abi == spec::abi::Abi::SysV64 { |
543 | 543 | x86_64::compute_abi_info(cx, self);
|
544 |
| - } else if abi == ::spec::abi::Abi::Win64 || cx.target_spec().options.is_like_windows { |
| 544 | + } else if abi == spec::abi::Abi::Win64 || cx.target_spec().options.is_like_windows { |
545 | 545 | x86_win64::compute_abi_info(self);
|
546 | 546 | } else {
|
547 | 547 | x86_64::compute_abi_info(cx, self);
|
|
0 commit comments