[LLVMdev] ValueMapper question: no type mapping for GlobalValue?

Michael Muller mmuller at enduden.com
Wed Jan 11 04:50:53 PST 2012


Hi all, I was looking at the ValueMapper code this morning and I notice that
it doesn't do type mapping for GlobalValues.  Is this correct?

I ask because I am seeing a case where I'm failing type assertions from
ModuleLinker::linkGlobalInits() when an array initializer references an
external global.  It looks like the external global is being mapped directly
and this causes an element type check to fail in ConstantArray::get().
Curiously, this only happens when that external global is also referenced from
within a function in the same module.

=============================================================================
michaelMuller = mmuller at enduden.com | http://www.mindhog.net/~mmuller
-----------------------------------------------------------------------------
There is no concept that is more demeaning to the human spirit than the
notion that our freedom must be limited in the interests of our own
protection.
=============================================================================



More information about the llvm-dev mailing list