[LLVMdev] Invalid bitcode signature
Fraser Cormack
frasercrmck at gmail.com
Fri Feb 3 13:47:41 PST 2012
I'm trying to link two modules together using the C++ API, one that's a sort
of library module and one that's being generated from the source language.
If I have something like this:
OwningPtr<MemoryBuffer> owning_ptr;
if (MemoryBuffer::getFile(StringRef("../hello.bc"), owning_ptr))
std::cout << "error opening file" << std::endl;
Module* Lib = ParseBitcodeFile(owning_ptr.get(), context, &error);
if (!Lib)
std::cout << error << std::endl;
When I run this (either on a bitcode file generated by llvm-gcc or by
createBitcodeWriterPass()) I get an error telling me: "invalid bitcode
signature".
I'm not sure where this error's coming from. Any help would be appreciated.
--
View this message in context: http://old.nabble.com/Invalid-bitcode-signature-tp33259763p33259763.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
More information about the llvm-dev
mailing list