[LLVMdev] llvm-dis fails to parse bytecode emitted by clang

Duncan Sands baldrick at free.fr
Tue Oct 26 03:23:22 CDT 2010


Hi Lorenzo,

> I am trying to generate LLVM bytecode using CLANG and I ran into the
> following problem. If I run clang with the -emit-llvm option and then
> try to get a textual representation of the output using llvm-dis, the
> latter crashes because of a failed assertion in BitCodeReader.cpp,
> mentioning a "Type mismatch in value table" (the exact error message
> is appended at the end of this email). However, if I generate the
> bytecode from the same source using llvm-gcc instead of clang,
> llvm-dis works fine.

I've seen similar errors to this in the past, and they invariably meant that
LLVM and/or clang had been miscompiled by the system compiler.  Take a look at
http://llvm.org/docs/GettingStarted.html#brokengcc

Ciao,

Duncan.


More information about the LLVMdev mailing list