diff options
| author | 2018-04-06 14:26:03 +0000 | |
|---|---|---|
| committer | 2018-04-06 14:26:03 +0000 | |
| commit | bdabc2f19ffb9e20600dad6e8a300842a7bda50e (patch) | |
| tree | c50e7b2e5449b074651bb82a58517a8ebc4a8cf7 /gnu/llvm/lib/ProfileData/SampleProfWriter.cpp | |
| parent | Print a 'p' flag for file descriptors that were opened after pledge(2). (diff) | |
| download | wireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.tar.xz wireguard-openbsd-bdabc2f19ffb9e20600dad6e8a300842a7bda50e.zip | |
Import LLVM 6.0.1 release including clang, lld and lldb.
"where is the kaboom?" deraadt@
Diffstat (limited to 'gnu/llvm/lib/ProfileData/SampleProfWriter.cpp')
| -rw-r--r-- | gnu/llvm/lib/ProfileData/SampleProfWriter.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gnu/llvm/lib/ProfileData/SampleProfWriter.cpp b/gnu/llvm/lib/ProfileData/SampleProfWriter.cpp index b45026140c9..59c4885fcdb 100644 --- a/gnu/llvm/lib/ProfileData/SampleProfWriter.cpp +++ b/gnu/llvm/lib/ProfileData/SampleProfWriter.cpp @@ -222,7 +222,10 @@ std::error_code SampleProfileWriterBinary::writeBody(const FunctionSamples &S) { } // Recursively emit all the callsite samples. - encodeULEB128(S.getCallsiteSamples().size(), OS); + uint64_t NumCallsites = 0; + for (const auto &J : S.getCallsiteSamples()) + NumCallsites += J.second.size(); + encodeULEB128(NumCallsites, OS); for (const auto &J : S.getCallsiteSamples()) for (const auto &FS : J.second) { LineLocation Loc = J.first; @@ -248,8 +251,6 @@ std::error_code SampleProfileWriterBinary::write(const FunctionSamples &S) { /// /// \param Filename The file to create. /// -/// \param Writer The writer to instantiate according to the specified format. -/// /// \param Format Encoding format for the profile file. /// /// \returns an error code indicating the status of the created writer. @@ -271,8 +272,6 @@ SampleProfileWriter::create(StringRef Filename, SampleProfileFormat Format) { /// /// \param OS The output stream to store the profile data to. /// -/// \param Writer The writer to instantiate according to the specified format. -/// /// \param Format Encoding format for the profile file. /// /// \returns an error code indicating the status of the created writer. |
