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/SampleProfReader.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/SampleProfReader.cpp')
| -rw-r--r-- | gnu/llvm/lib/ProfileData/SampleProfReader.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gnu/llvm/lib/ProfileData/SampleProfReader.cpp b/gnu/llvm/lib/ProfileData/SampleProfReader.cpp index 234fe02ac8a..44547e3dffa 100644 --- a/gnu/llvm/lib/ProfileData/SampleProfReader.cpp +++ b/gnu/llvm/lib/ProfileData/SampleProfReader.cpp @@ -749,7 +749,7 @@ setupMemoryBuffer(const Twine &Filename) { auto Buffer = std::move(BufferOrErr.get()); // Sanity check the file. - if (Buffer->getBufferSize() > std::numeric_limits<uint32_t>::max()) + if (uint64_t(Buffer->getBufferSize()) > std::numeric_limits<uint32_t>::max()) return sampleprof_error::too_large; return std::move(Buffer); @@ -759,8 +759,6 @@ setupMemoryBuffer(const Twine &Filename) { /// /// \param Filename The file to open. /// -/// \param Reader The reader to instantiate according to \p Filename's format. -/// /// \param C The LLVM context to use to emit diagnostics. /// /// \returns an error code indicating the status of the created reader. @@ -776,8 +774,6 @@ SampleProfileReader::create(const Twine &Filename, LLVMContext &C) { /// /// \param B The memory buffer to create the reader from (assumes ownership). /// -/// \param Reader The reader to instantiate according to \p Filename's format. -/// /// \param C The LLVM context to use to emit diagnostics. /// /// \returns an error code indicating the status of the created reader. |
