diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2017-08-14 19:36:13 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2017-08-14 19:36:13 -0700 |
| commit | 1413253a41de87ce7da73f0733aa3f433b1f5a3b (patch) | |
| tree | 111cba46a53aaaa0733b6b8ba19aece25b6f8533 /src/librustc_trans | |
| parent | b045c201b2086073f43d76290b9cb2a5a8e16f89 (diff) | |
| parent | 56fe3b2ad0055bb28325f412395577e2b842719a (diff) | |
| download | rust-1413253a41de87ce7da73f0733aa3f433b1f5a3b.tar.gz rust-1413253a41de87ce7da73f0733aa3f433b1f5a3b.zip | |
Merge remote-tracking branch 'origin/master' into gen
Diffstat (limited to 'src/librustc_trans')
| -rw-r--r-- | src/librustc_trans/base.rs | 4 | ||||
| -rw-r--r-- | src/librustc_trans/debuginfo/type_names.rs | 2 | ||||
| -rw-r--r-- | src/librustc_trans/intrinsic.rs | 6 | ||||
| -rw-r--r-- | src/librustc_trans/mir/mod.rs | 2 |
4 files changed, 9 insertions, 5 deletions
diff --git a/src/librustc_trans/base.rs b/src/librustc_trans/base.rs index 8cbc5155dde..b4a2891f94c 100644 --- a/src/librustc_trans/base.rs +++ b/src/librustc_trans/base.rs @@ -191,7 +191,7 @@ pub fn compare_simd_types<'a, 'tcx>( /// adjustment. /// /// The `old_info` argument is a bit funny. It is intended for use -/// in an upcast, where the new vtable for an object will be drived +/// in an upcast, where the new vtable for an object will be derived /// from the old one. pub fn unsized_info<'ccx, 'tcx>(ccx: &CrateContext<'ccx, 'tcx>, source: Ty<'tcx>, @@ -488,7 +488,7 @@ impl Lifetime { // on), and `ptr` is nonzero-sized, then extracts the size of `ptr` // and the intrinsic for `lt` and passes them to `emit`, which is in // charge of generating code to call the passed intrinsic on whatever - // block of generated code is targetted for the intrinsic. + // block of generated code is targeted for the intrinsic. // // If LLVM lifetime intrinsic support is disabled (i.e. optimizations // off) or `ptr` is zero-sized, then no-op (does not call `emit`). diff --git a/src/librustc_trans/debuginfo/type_names.rs b/src/librustc_trans/debuginfo/type_names.rs index 826b4c09cc2..5dd1c15fd2d 100644 --- a/src/librustc_trans/debuginfo/type_names.rs +++ b/src/librustc_trans/debuginfo/type_names.rs @@ -36,7 +36,7 @@ pub fn push_debuginfo_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, t: Ty<'tcx>, qualified: bool, output: &mut String) { - // When targeting MSVC, emit C++ style type names for compatability with + // When targeting MSVC, emit C++ style type names for compatibility with // .natvis visualizers (and perhaps other existing native debuggers?) let cpp_like_names = cx.sess().target.target.options.is_like_msvc; diff --git a/src/librustc_trans/intrinsic.rs b/src/librustc_trans/intrinsic.rs index 9956c28e641..033ef988571 100644 --- a/src/librustc_trans/intrinsic.rs +++ b/src/librustc_trans/intrinsic.rs @@ -246,7 +246,11 @@ pub fn trans_intrinsic_call<'a, 'tcx>(bcx: &Builder<'a, 'tcx>, let val = if fn_ty.args[1].is_indirect() { bcx.load(llargs[1], None) } else { - from_immediate(bcx, llargs[1]) + if !type_is_zero_size(ccx, tp_ty) { + from_immediate(bcx, llargs[1]) + } else { + C_nil(ccx) + } }; let ptr = bcx.pointercast(llargs[0], val_ty(val).ptr_to()); let store = bcx.volatile_store(val, ptr); diff --git a/src/librustc_trans/mir/mod.rs b/src/librustc_trans/mir/mod.rs index 3c38619cf5d..3899295da40 100644 --- a/src/librustc_trans/mir/mod.rs +++ b/src/librustc_trans/mir/mod.rs @@ -135,7 +135,7 @@ impl<'a, 'tcx> MirContext<'a, 'tcx> { (scope, source_info.span) } else { // Walk up the macro expansion chain until we reach a non-expanded span. - // We also stop at the function body level because no line stepping can occurr + // We also stop at the function body level because no line stepping can occur // at the level above that. let mut span = source_info.span; while span.ctxt != NO_EXPANSION && span.ctxt != self.mir.span.ctxt { |
