summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-01-12 12:39:31 +0100
committerMichel Dänzer <daenzer@vmware.com>2009-01-12 12:39:31 +0100
commitf43e621e2207f819f756d9b9539b2a25b7b936fe (patch)
treeebebb0f19dc77ccb1356eea3024bbe632294a82b
parent359bbe7432babb328a313756b9d1e46e187914b8 (diff)
gallivm: Print error message from ParseBitcodeFile() in case it fails.
-rw-r--r--src/gallium/auxiliary/gallivm/instructionssoa.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/instructionssoa.cpp b/src/gallium/auxiliary/gallivm/instructionssoa.cpp
index ad57acbe1a..f93a31d54b 100644
--- a/src/gallium/auxiliary/gallivm/instructionssoa.cpp
+++ b/src/gallium/auxiliary/gallivm/instructionssoa.cpp
@@ -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();
}