1. 20 8月, 2020 2 次提交
  2. 19 8月, 2020 8 次提交
  3. 18 8月, 2020 9 次提交
  4. 17 8月, 2020 5 次提交
  5. 16 8月, 2020 3 次提交
  6. 15 8月, 2020 8 次提交
  7. 14 8月, 2020 5 次提交
    • R
      LLVM IR coverage encoding aligns closer to Clang's · ba189788
      Rich Kadel 提交于
      I found some areas for improvement while attempting to debug the
      SegFault issue when running rust programs compiled using MSVC, with
      coverage instrumentation.
      
      I discovered that LLVM's coverage writer was generating incomplete
      function name variable names (that's not a typo: the name of the
      variable that holds a function name).
      
      The existing implementation used one-up numbers to distinguish
      variables, and correcting the names did not fix the MSVC coverage bug,
      but the fix in this PR makes the names and resulting LLVM IR easier to
      follow and more consistent with Clang's implementation.
      
      I also changed the way the `-Zinstrument-coverage` option is supported
      in symbol_export.rs. The original implementation was incorrect, and the
      corrected version matches the handling for `-Zprofile-generate`, as it
      turns out.
      
      (An argument could be made that maybe `-Zinstrument-coverage` should
      automatically enable `-Cprofile-generate`. In fact, if
      `-Cprofile-generate` is analagous to Clang's `-fprofile-generate`, as
      some documentation implies, Clang always requires this flag for its
      implementation of source-based code coverage. This would require a
      little more validation, and if implemented, would probably require
      updating some of the user-facing messages related to
      `-Cprofile-generate` to not be so specific to the PGO use case.)
      
      None of these changes fixed the MSVC coverage problems, but they should
      still be welcome improvements.
      
      Lastly, I added some additional FIXME comments in instrument_coverage.rs
      describing issues I found with the generated LLVM IR that would be
      resolved if the coverage instrumentation is injected with a `Statement`
      instead of as a new `BasicBlock`. I describe seven advantages of this
      change, but it requires some discussion before making a change like
      this.
      ba189788
    • E
      Recover gracefully from `struct ` parse errors · 2e9b45e1
      Esteban Küber 提交于
      2e9b45e1
    • E
      Do not emit E0228 when it is implied by E0106 · b77c40e4
      Esteban Küber 提交于
      Emit E0288 (lifetime bound for trait object cannot be deduced) only on
      bare trait objects. When the trait object is in the form of
      `&dyn Trait`, E0106 (missing lifetime specifier) will have been emitted,
      making the former redundant.
      b77c40e4
    • K
      Add fix · fd740266
      kadmin 提交于
      This also explicitly checks that the types are `bool`. `try_eval_bool` also appears to just
      succeed for `u8`, so this ensures that it actually is a bool before casting.
      fd740266
    • E