This dramatically reduces the number of needed malloc calls.
Unfortunately I had to add the implementation of SmallVectorBase::grow_pod to the runtime, as we don't link LLVM. This is a bad hack, but better than re-inventing a new SmallVector implementation.
SR-10028
rdar://problem/48575729
Windows does not support weak linking. Use an undocumented linker
feature to provide a default implementation for report_bad_alloc_error
in the case that we are not linking against LLVMSupport.
Use the reserved spelling for the weak attribute. Move the definition into an
implementation file to avoid multiple definitions of the function from being
emitted. PE/COFF does not support weak symbols, however, the runtime will never
link against LLVMSupport, so provide a single, strong definition of the
function. Mark it as hidden visibility so that we do not expose it outside of
the runtime.