supporting LLVM trunk

This commit is contained in:
Ilia Filippov
2014-01-21 14:21:26 +04:00
parent 37e12045fb
commit aa31957d84
3 changed files with 33 additions and 6 deletions

View File

@@ -477,7 +477,11 @@ Function::GenerateIR() {
}
if (m->errorCount == 0) {
#if defined (LLVM_3_5)
if (llvm::verifyFunction(*function) == true) {
#else
if (llvm::verifyFunction(*function, llvm::ReturnStatusAction) == true) {
#endif
if (g->debugPrint)
function->dump();
FATAL("Function verificication failed");
@@ -523,8 +527,12 @@ Function::GenerateIR() {
emitCode(&ec, appFunction, firstStmtPos);
if (m->errorCount == 0) {
sym->exportedFunction = appFunction;
#if defined(LLVM_3_5)
if (llvm::verifyFunction(*appFunction) == true) {
#else
if (llvm::verifyFunction(*appFunction,
llvm::ReturnStatusAction) == true) {
#endif
if (g->debugPrint)
appFunction->dump();
FATAL("Function verificication failed");