mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-13 14:35:54 +00:00
Add an assert to check copy_to_buffer's precondition.
llvm-svn: 78926
This commit is contained in:
parent
c692477e5e
commit
c91e786fa1
@ -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