gallivm: Print error message from ParseBitcodeFile() in case it fails.
authorMichel Dänzer <daenzer@vmware.com>
Mon, 12 Jan 2009 11:39:31 +0000 (12:39 +0100)
committerMichel Dänzer <daenzer@vmware.com>
Mon, 12 Jan 2009 11:39:31 +0000 (12:39 +0100)
src/gallium/auxiliary/gallivm/instructionssoa.cpp

index ad57acbe1a08cb76e38cd826e28c752e0b332d6c..f93a31d54ba62bad230502fb94b919692864602c 100644 (file)
@@ -206,11 +206,12 @@ llvm::Module * InstructionsSoa::currentModule() const
 
 void InstructionsSoa::createBuiltins()
 {
+   std::string ErrMsg;
    MemoryBuffer *buffer = MemoryBuffer::getMemBuffer(
       (const char*)&soabuiltins_data[0],
       (const char*)&soabuiltins_data[Elements(soabuiltins_data)]);
-   m_builtins = ParseBitcodeFile(buffer);
-   std::cout<<"Builtins created at "<<m_builtins<<std::endl;
+   m_builtins = ParseBitcodeFile(buffer, &ErrMsg);
+   std::cout<<"Builtins created at "<<m_builtins<<" ("<<ErrMsg<<")"<<std::endl;
    assert(m_builtins);
    createDependencies();
 }