[llvm] e58985a - SampleProfWriter - fix uninitialized variable warnings. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 7 06:19:19 PST 2019
Author: Simon Pilgrim
Date: 2019-11-07T14:18:44Z
New Revision: e58985a5ec355095b5fbdfb659de181efddef2fd
URL: https://github.com/llvm/llvm-project/commit/e58985a5ec355095b5fbdfb659de181efddef2fd
DIFF: https://github.com/llvm/llvm-project/commit/e58985a5ec355095b5fbdfb659de181efddef2fd.diff
LOG: SampleProfWriter - fix uninitialized variable warnings. NFCI.
Added:
Modified:
llvm/include/llvm/ProfileData/SampleProfWriter.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ProfileData/SampleProfWriter.h b/llvm/include/llvm/ProfileData/SampleProfWriter.h
index cc951594c9e2..5814f69fdcab 100644
--- a/llvm/include/llvm/ProfileData/SampleProfWriter.h
+++ b/llvm/include/llvm/ProfileData/SampleProfWriter.h
@@ -80,7 +80,7 @@ class SampleProfileWriter {
void computeSummary(const StringMap<FunctionSamples> &ProfileMap);
/// Profile format.
- SampleProfileFormat Format;
+ SampleProfileFormat Format = SPF_None;
};
/// Sample-based profile writer (text format).
@@ -227,7 +227,7 @@ class SampleProfileWriterExtBinary : public SampleProfileWriterExtBinaryBase {
// Save the start of SecLBRProfile so we can compute the offset to the
// start of SecLBRProfile for each Function's Profile and will keep it
// in FuncOffsetTable.
- uint64_t SecLBRProfileStart;
+ uint64_t SecLBRProfileStart = 0;
// FuncOffsetTable maps function name to its profile offset in SecLBRProfile
// section. It is used to load function profile on demand.
MapVector<StringRef, uint64_t> FuncOffsetTable;
More information about the llvm-commits
mailing list