Commit Graph

3 Commits

Author SHA1 Message Date
Erik Eckstein
3bd7f027f8 Runtime: use SmallVector instead of std::vector to avoid memory allocations in most cases.
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
2019-03-06 14:37:03 -08:00
Saleem Abdulrasool
6072d9f5df runtime: adjust LLVMSupport for Windows
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.
2018-11-16 08:42:10 -08:00
Saleem Abdulrasool
736fbabf92 runtime: move the definition of report_bad_alloc_err
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.
2018-09-05 09:41:34 -07:00