[LLVMdev] Assertion: replaceAllUses of value with new value of different type! being thrown all of a sudden
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Jan 19 12:49:59 PST 2015
> On 2015-Jan-19, at 12:38, Frédéric Riss <friss at apple.com> wrote:
>
>
>> On Jan 19, 2015, at 12:04 PM, Christian Schafmeister <chris.schaf at verizon.net> wrote:
>>
>>
>> I forgot to mention this in my initial email.
>>
>> The build of LLVM that I was using was commit a0d5d7aed8e177cea381b3d054d80c212ece9f2c
>> The date on the commit is: Date: Fri Sep 26 12:34:06 2014
>>
>> Also:
>> Today I grabbed the ToT llvm/clang/clang-extra-tools and I’m working on getting my code to be compatible with it.
>>
>> I can switch back and forth between the current ToT llvm and the old one.
>
> Hmmm, I didn’t look closely enough and I thought you were hitting an assertions I added a few weeks after that commit in the Metadata RAUW method. But it is the equivalent assertion in Value::RAUW that you are hitting and that has been there forever. Looking at your exact revision, the assertion seems to trigger while executing:
>
> DIType(TempEnumTypes).replaceAllUsesWith(Enums);
>
> in DIBuilder::finalize(). Can you check if TempEnumTypes is null at this point? If that is the issue (which I’m not sure), then you need to call DIBuilder::createCompileUnit() at some point.
>
> Fred
I had a thought, too: are you using two different `LLVMContext`s? That
would cause the `metadata` type to compare unequal.
More information about the llvm-dev
mailing list