diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp index 3f1f226d1fe4..0298e8dce50e 100644 --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/tools/llvm-readobj/ELFDumper.cpp @@ -7172,14 +7172,14 @@ void LLVMELFDumper::printHashHistogramStats(size_t NBucket, StringRef BucketName = IsGnu ? "Bucket" : "Chain"; StringRef ListName = IsGnu ? "Buckets" : "Chains"; DictScope Outer(W, HistName); - W.printNumber("TotalBuckets", NBucket); + W.printNumber("TotalBuckets", static_cast(NBucket)); ListScope Buckets(W, ListName); size_t CumulativeNonZero = 0; for (size_t I = 0; I < MaxChain; ++I) { CumulativeNonZero += Count[I] * I; DictScope Bucket(W, BucketName); - W.printNumber("Length", I); - W.printNumber("Count", Count[I]); + W.printNumber("Length", static_cast(I)); + W.printNumber("Count", static_cast(Count[I])); W.printNumber("Percentage", (float)(Count[I] * 100.0) / NBucket); W.printNumber("Coverage", (float)(CumulativeNonZero * 100.0) / TotalSyms); }