Tweak rustllvm bindings to work on linux, where bool != LLVMBool.

This commit is contained in:
Graydon Hoare 2011-03-25 18:40:55 -07:00
parent 24a75eeccc
commit fb08ef44b4
2 changed files with 3 additions and 3 deletions

View File

@ -35,9 +35,9 @@ void LLVMDisposeSectionIterator(LLVMSectionIteratorRef SI) {
delete unwrap(SI); delete unwrap(SI);
} }
bool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile, LLVMBool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile,
LLVMSectionIteratorRef SI) { LLVMSectionIteratorRef SI) {
return *unwrap(SI) == unwrap(ObjectFile)->end_sections(); return (*unwrap(SI) == unwrap(ObjectFile)->end_sections()) ? 1 : 0;
} }
void LLVMMoveToNextSection(LLVMSectionIteratorRef SI) { void LLVMMoveToNextSection(LLVMSectionIteratorRef SI) {

View File

@ -38,7 +38,7 @@ void LLVMDisposeObjectFile(LLVMObjectFileRef ObjectFile);
LLVMSectionIteratorRef LLVMGetSections(LLVMObjectFileRef ObjectFile); LLVMSectionIteratorRef LLVMGetSections(LLVMObjectFileRef ObjectFile);
void LLVMDisposeSectionIterator(LLVMSectionIteratorRef SI); void LLVMDisposeSectionIterator(LLVMSectionIteratorRef SI);
bool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile, LLVMBool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile,
LLVMSectionIteratorRef SI); LLVMSectionIteratorRef SI);
void LLVMMoveToNextSection(LLVMSectionIteratorRef SI); void LLVMMoveToNextSection(LLVMSectionIteratorRef SI);
const char *LLVMGetSectionName(LLVMSectionIteratorRef SI); const char *LLVMGetSectionName(LLVMSectionIteratorRef SI);