Minor mods to build on Fedora 15, LLVM 2.8

This commit is contained in:
Pete Couperus
2011-06-21 22:57:36 -07:00
parent 8b7522e98b
commit af435e52c1
3 changed files with 6 additions and 3 deletions

View File

@@ -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

View File

@@ -38,6 +38,7 @@
#include "ispc.h"
#include "module.h"
#include <stdio.h>
#include <stdlib.h>
#include <llvm/Support/PrettyStackTrace.h>
#ifdef LLVM_2_8
#include <llvm/System/Signals.h>

View File

@@ -82,7 +82,9 @@
#ifndef LLVM_2_8
#include <llvm/Support/ToolOutputFile.h>
#include <llvm/Support/Host.h>
#endif // !LLVM_2_8
#else // !LLVM_2_8
#include <llvm/System/Host.h>
#endif // LLVM_2_8
#include <llvm/Assembly/PrintModulePass.h>
#include <llvm/Support/raw_ostream.h>
#include <llvm/Bitcode/ReaderWriter.h>