From af435e52c172edd9a88881a2fa747478cc716756 Mon Sep 17 00:00:00 2001 From: Pete Couperus Date: Tue, 21 Jun 2011 22:57:36 -0700 Subject: [PATCH] Minor mods to build on Fedora 15, LLVM 2.8 --- ctx.cpp | 4 ++-- main.cpp | 1 + module.cpp | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ctx.cpp b/ctx.cpp index eb2d4d81..27e2f0f4 100644 --- a/ctx.cpp +++ b/ctx.cpp @@ -1437,7 +1437,7 @@ FunctionEmitContext::addGSMetadata(llvm::Instruction *inst, SourcePos pos) { llvm::Value *line = LLVMInt32(pos.first_line); #ifdef LLVM_2_8 - md = llvm::MDNode::get(*g->ctx, &first_line, 1); + md = llvm::MDNode::get(*g->ctx, &line, 1); #else md = llvm::MDNode::get(*g->ctx, line); #endif @@ -1445,7 +1445,7 @@ FunctionEmitContext::addGSMetadata(llvm::Instruction *inst, SourcePos pos) { llvm::Value *column = LLVMInt32(pos.first_column); #ifdef LLVM_2_8 - md = llvm::MDNode::get(*g->ctx, &first_column, 1); + md = llvm::MDNode::get(*g->ctx, &column, 1); #else md = llvm::MDNode::get(*g->ctx, column); #endif diff --git a/main.cpp b/main.cpp index 09034828..2ec1f9a8 100644 --- a/main.cpp +++ b/main.cpp @@ -38,6 +38,7 @@ #include "ispc.h" #include "module.h" #include +#include #include #ifdef LLVM_2_8 #include diff --git a/module.cpp b/module.cpp index 8ad728b5..3bb18587 100644 --- a/module.cpp +++ b/module.cpp @@ -82,7 +82,9 @@ #ifndef LLVM_2_8 #include #include -#endif // !LLVM_2_8 +#else // !LLVM_2_8 +#include +#endif // LLVM_2_8 #include #include #include