Have asm printers use formatted_raw_ostream directly to avoid a
dynamic_cast<>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75670 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp
index 42e6fda..23a756e 100644
--- a/lib/Support/raw_ostream.cpp
+++ b/lib/Support/raw_ostream.cpp
@@ -166,7 +166,7 @@
case 0: break;
default:
// Normally the string to emit is shorter than the buffer.
- if (Size <= unsigned(OutBufEnd-OutBufStart)) {
+ if (Size <= unsigned(OutBufEnd-OutBufCur)) {
memcpy(OutBufCur, Ptr, Size);
break;
}