Value not in slotcalculator! error

Hello,

This is my first post to llvmdev (reading for about a month) so I apologize if I’m not following protocol.

I’m writing a Common Lisp compiler using LLVM with the C++ API and I’m experiencing a problem that I have not been able to solve by myself.

I’m getting a “Value not in slotcalculator” when I write out bitcode for a module that I generated.

It happens the second time that I compile the same source code - the first time everything works fine and the functions all verify fine.

Here’s what I know: when I dump the value that seems to be responsible for the error:

call V->dump()
declare void @_Unwind_Resume(i8*)

Now the funny thing is I don’t call this function, it gets inserted into my code when I generate a “resume” instruction using IRBuilder::CreateResume for exception handling. I’ve tried adding a declaration for _UnwindResume myself but that doesn’t do anything.

Any help would be appreciated.

Best,

Christian Schafmeister

Hi Christian,

This is my first post to llvmdev (reading for about a month) so I apologize if
I'm not following protocol.

I'm writing a Common Lisp compiler using LLVM with the C++ API and I'm
experiencing a problem that I have not been able to solve by myself.

I'm getting a "Value not in slotcalculator" when I write out bitcode for a
module that I generated.

try running under valgrind.

It happens the second time that I compile the same source code - the first time
everything works fine and the functions all verify fine.

Do they verify fine just before you write the bitcode? Both the first and the
second time?

Here's what I know: when I dump the value that seems to be responsible for the
error:

>> call V->dump()
>> declare void @_Unwind_Resume(i8*)

Now the funny thing is I don't call this function, it gets inserted into my code
when I generate a "resume" instruction using IRBuilder::CreateResume for
exception handling. I've tried adding a declaration for _UnwindResume myself
but that doesn't do anything.

This looks like the kind of change the code generators might make. Did you
run the code generators?

Ciao, Duncan.