Fix undefined symbols in release build of libcoreclr on Linux
When building a release version of libcoreclr.so on Linux the LLVM toolchain makes optimizations that result in undefined symbols in libcoreclr.so which causes dlopen(“libcoreclr.so”) to fail at runtime. There were three problematic functions:
1. CQuickMemoryBase<SIZE, INCREMENT>::ReSizeNoThrow(SIZE_T iItems)
2. FixupDispatcherContext(...)
3. CodeGen::inst_set_SV_var(GenTreePtr tree); - this function is marked as inline and has the entire body under “#ifdef DEBUG”.
To fix the problem with ReSizeNoThrow I added the “__attribute__((used))” attribute to the declaration of the function. This attribute is enabled for the llvm toolchain only. For the other two functions I have simply removed ‘inline’ since these functions are not performance critical.
[tfs-changeset: 1412107]