I've stumbled over a bug which is quite a showstopper for functor objects.
Apparently the LinkerBuilder has a problem when the same method of a class is
registered multiple times. Test case is attached. It works with llvm-jit, but
fails with llvm-native.
After digging through the IR code, I've found out that LLVM extends the symbol
names of functions that are registered more than once with numbers. This works
just fine with normal functions, but methods seem to be different. (see
Comment in the test case. Replacing the method with the global functions works
just fine, even with llvm-native).
Does anyone know what's going on here?
--
Arno Rehn
ar...@arnorehn.de
Just following up on this on the list for historical purposes, as we
discussed on IRC the specific solution for this problem is for us to
use getOrInsertFunction() when registering a function with LLVM. If a
symbol name is supplied, we probably would also want to verify that
the symbol name has the same pointer value as other values of that
symbol.
>
> --
> Arno Rehn
> ar...@arnorehn.de
>