search for: compareaddr

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

2015 Jan 12
2
[LLVMdev] MCJIT handling of linkonce_odr
...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", (long)&StaticStuff<int>::s_data, (long)mcjit); return 1; } return 0; } #else i...
2015 Jan 13
2
[LLVMdev] MCJIT handling of linkonce_odr
...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", > (long)&StaticStuff<int>::s_data, (lo...
2016 Apr 29
3
(Orc)JIT and weak symbol resolution
...al. 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", (long)&StaticStuff<int>::s_data, (long)interp); // CHECK-NOT: W...