Skip to content

Commit e58985a

Browse files
committed
SampleProfWriter - fix uninitialized variable warnings. NFCI.
1 parent 10e0d64 commit e58985a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/include/llvm/ProfileData/SampleProfWriter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class SampleProfileWriter {
8080
void computeSummary(const StringMap<FunctionSamples> &ProfileMap);
8181

8282
/// Profile format.
83-
SampleProfileFormat Format;
83+
SampleProfileFormat Format = SPF_None;
8484
};
8585

8686
/// Sample-based profile writer (text format).
@@ -227,7 +227,7 @@ class SampleProfileWriterExtBinary : public SampleProfileWriterExtBinaryBase {
227227
// Save the start of SecLBRProfile so we can compute the offset to the
228228
// start of SecLBRProfile for each Function's Profile and will keep it
229229
// in FuncOffsetTable.
230-
uint64_t SecLBRProfileStart;
230+
uint64_t SecLBRProfileStart = 0;
231231
// FuncOffsetTable maps function name to its profile offset in SecLBRProfile
232232
// section. It is used to load function profile on demand.
233233
MapVector<StringRef, uint64_t> FuncOffsetTable;

0 commit comments

Comments
 (0)