Skip to content

Commit

Permalink
Fix some warnings, and make some more stuff work (#44)
Browse files Browse the repository at this point in the history
* Fix some warnings, and make some more stuff wokr

* Up the MSRV

* Update and prepare for release
  • Loading branch information
xd009642 authored Feb 14, 2025
1 parent 9508ae4 commit 6d10b77
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
version:
- 1.75.0
- 1.80.0
- stable
- beta
- nightly
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.7.1] 2025-02-14
### Changed
- `InstrumentationProfile::is_empty` now takes into account the symbol table
- Bump MSRV to 1.80.0
- Remove invalid assertion from `HashTable`

## [0.7.0] - 2024-08-05
### Added
- LLVM 19 support (ignores function entry coverage and some failing proftext files)
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "llvm_profparser"
version = "0.7.0"
version = "0.7.1"
authors = ["xd009642 <[email protected]>"]
description = "Parsing and interpretation of llvm coverage profiles and generated data"
repository = "https://github.com/xd009642/llvm-profparser"
Expand All @@ -11,6 +11,7 @@ categories = ["encoding"]
keywords = ["coverage", "llvm"]
exclude = ["tests/*", ".github/*", "benches/*"]
build = "build.rs"
rust-version = "1.80.0"

[features]
default = ["cli"]
Expand Down
3 changes: 3 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use std::{env, process::Command};

fn main() {
for i in 11..20 {
println!("cargo::rustc-check-cfg=cfg(llvm_{})", i)
}
let rustc = env::var("RUSTC").unwrap();

let output = Command::new(rustc).arg("-vV").output().unwrap();
Expand Down
1 change: 0 additions & 1 deletion src/hash_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ impl HashTable {
_offset: usize,
bucket_start: usize,
) -> ParseResult<'a, Self> {
assert!(bucket_start > 0);
let (bytes, num_buckets) = le_u64(&input[bucket_start..])?;
debug!("Number of hashtable buckets: {}", num_buckets);
let (_bytes, mut num_entries) = le_u64(bytes)?;
Expand Down
2 changes: 1 addition & 1 deletion src/instrumentation_profile/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ impl InstrumentationProfile {

/// Returns true if there are no instrumentation records associated with the profile
pub fn is_empty(&self) -> bool {
self.records.is_empty()
self.records.is_empty() && self.symtab.is_empty()
}
}

Expand Down

0 comments on commit 6d10b77

Please sign in to comment.