diff options
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/allocator.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/allocator.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/allocator.rs b/compiler/rustc_codegen_llvm/src/allocator.rs index e028b2c2dc7..237ef688f88 100644 --- a/compiler/rustc_codegen_llvm/src/allocator.rs +++ b/compiler/rustc_codegen_llvm/src/allocator.rs @@ -16,10 +16,10 @@ pub(crate) unsafe fn codegen( ) { let llcx = &*mods.llcx; let llmod = mods.llmod(); - let usize = match &tcx.sess.target.target.target_pointer_width[..] { - "16" => llvm::LLVMInt16TypeInContext(llcx), - "32" => llvm::LLVMInt32TypeInContext(llcx), - "64" => llvm::LLVMInt64TypeInContext(llcx), + let usize = match tcx.sess.target.target.pointer_width { + 16 => llvm::LLVMInt16TypeInContext(llcx), + 32 => llvm::LLVMInt32TypeInContext(llcx), + 64 => llvm::LLVMInt64TypeInContext(llcx), tws => bug!("Unsupported target word size for int: {}", tws), }; let i8 = llvm::LLVMInt8TypeInContext(llcx); |
