Skip to content

Commit b3ba21c

Browse files
Initialize NumElements to 0.
1 parent 425d2a8 commit b3ba21c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/ProfileData/InstrProfWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ static Error writeMemProfV3(ProfOStream &OS,
774774

775775
uint64_t CallStackPayloadOffset = OS.tell();
776776
// The number of elements in the call stack array.
777-
unsigned NumElements;
777+
unsigned NumElements = 0;
778778
llvm::DenseMap<memprof::CallStackId, memprof::LinearCallStackId>
779779
MemProfCallStackIndexes =
780780
writeMemProfCallStackArray(OS, MemProfData.CallStacks,

0 commit comments

Comments
 (0)