mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-30 23:20:54 +00:00
Add an assert to check copy_to_buffer's precondition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78926 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0ba50bb056
commit
4e8e642eaa
@ -222,6 +222,8 @@ raw_ostream &raw_ostream::write(const char *Ptr, size_t Size) {
|
||||
}
|
||||
|
||||
void raw_ostream::copy_to_buffer(const char *Ptr, size_t Size) {
|
||||
assert(Size <= OutBufEnd - OutBufCur && "Buffer overrun!");
|
||||
|
||||
// Handle short strings specially, memcpy isn't very good at very short
|
||||
// strings.
|
||||
switch (Size) {
|
||||
|
Loading…
Reference in New Issue
Block a user