diff options
| author | est31 <MTest31@outlook.com> | 2020-10-15 11:44:00 +0200 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2020-10-15 12:02:24 +0200 |
| commit | 4fa55787745ac71793253c47c4d6cd5ffe96b741 (patch) | |
| tree | 46a7cad18bbfa0e1e87e39d1e80dcdfd04049f13 /compiler/rustc_codegen_llvm/src/allocator.rs | |
| parent | 0d1aa1e0346630189b779da0939e8138a8e6d668 (diff) | |
| download | rust-4fa55787745ac71793253c47c4d6cd5ffe96b741.tar.gz rust-4fa55787745ac71793253c47c4d6cd5ffe96b741.zip | |
Replace target.target with target and target.ptr_width with target.pointer_width
Preparation for a subsequent change that replaces
rustc_target::config::Config with its wrapped Target.
On its own, this commit breaks the build. I don't like making
build-breaking commits, but in this instance I believe that it
makes review easier, as the "real" changes of this PR can be
seen much more easily.
Result of running:
find compiler/ -type f -exec sed -i -e 's/target\.target\([)\.,; ]\)/target\1/g' {} \;
find compiler/ -type f -exec sed -i -e 's/target\.target$/target/g' {} \;
find compiler/ -type f -exec sed -i -e 's/target.ptr_width/target.pointer_width/g' {} \;
./x.py fmt
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/allocator.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/allocator.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/allocator.rs b/compiler/rustc_codegen_llvm/src/allocator.rs index 237ef688f88..d02bc41f4af 100644 --- a/compiler/rustc_codegen_llvm/src/allocator.rs +++ b/compiler/rustc_codegen_llvm/src/allocator.rs @@ -16,7 +16,7 @@ pub(crate) unsafe fn codegen( ) { let llcx = &*mods.llcx; let llmod = mods.llmod(); - let usize = match tcx.sess.target.target.pointer_width { + let usize = match tcx.sess.target.pointer_width { 16 => llvm::LLVMInt16TypeInContext(llcx), 32 => llvm::LLVMInt32TypeInContext(llcx), 64 => llvm::LLVMInt64TypeInContext(llcx), @@ -57,7 +57,7 @@ pub(crate) unsafe fn codegen( let name = format!("__rust_{}", method.name); let llfn = llvm::LLVMRustGetOrInsertFunction(llmod, name.as_ptr().cast(), name.len(), ty); - if tcx.sess.target.target.options.default_hidden_visibility { + if tcx.sess.target.options.default_hidden_visibility { llvm::LLVMRustSetVisibility(llfn, llvm::Visibility::Hidden); } if tcx.sess.must_emit_unwind_tables() { @@ -98,7 +98,7 @@ pub(crate) unsafe fn codegen( // -> ! DIFlagNoReturn llvm::Attribute::NoReturn.apply_llfn(llvm::AttributePlace::Function, llfn); - if tcx.sess.target.target.options.default_hidden_visibility { + if tcx.sess.target.options.default_hidden_visibility { llvm::LLVMRustSetVisibility(llfn, llvm::Visibility::Hidden); } if tcx.sess.must_emit_unwind_tables() { |
