search for: staticstuff

Displaying 3 results from an estimated 3 matches for "staticstuff".

2015 Jan 12
2
[LLVMdev] MCJIT handling of linkonce_odr
Hi, I'm finally moving cling to MCJIT - and MCJIT is wonderful! So far I only ran into this issue: $ cat linkonceodr.cxx extern "C" int printf(const char*,...); template <class T> struct StaticStuff { static T s_data; }; template <class T> T StaticStuff<T>::s_data = 42; int compareAddr(int* mcjit); #ifdef BUILD_SHARED int compareAddr(int* mcjit) { if (mcjit != &StaticStuff<int>::s_data) { printf("Wrong address, %ld in shared lib, %ld in mcjit!\n",...
2016 Apr 29
3
(Orc)JIT and weak symbol resolution
...is a question on how to resolve weak symbols from the binary for symbols that are also llvm::Module-local. Currently, the JIT seems to favor resolving to module-local symbols over existing symbols: $ cat symbols.cxx extern "C" int printf(const char*,...); template <class T> struct StaticStuff { static T s_data; }; template <class T> T StaticStuff<T>::s_data = 42; int compareAddr(int* interp); #ifdef BUILD_SHARED int compareAddr(int* interp) { if (interp != &StaticStuff<int>::s_data) { printf("Wrong address, %ld in shared lib, %ld in interpreter!\n&quo...
2015 Jan 13
2
[LLVMdev] MCJIT handling of linkonce_odr
...gt;> wrote: > > Hi, > > I'm finally moving cling to MCJIT - and MCJIT is wonderful! So far I > only ran into this issue: > > $ cat linkonceodr.cxx > extern "C" int printf(const char*,...); > > template <class T> struct StaticStuff { > static T s_data; > }; > template <class T> T StaticStuff<T>::s_data = 42; > > int compareAddr(int* mcjit); > > #ifdef BUILD_SHARED > int compareAddr(int* mcjit) { > if (mcjit != &StaticStuff<int>::s_data) { >...