Merge pull request #24 from petecoup/master

LLVM 2.8 mods
This commit is contained in:
Matt Pharr
2011-06-22 12:03:19 -07:00
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); llvm::Value *line = LLVMInt32(pos.first_line);
#ifdef LLVM_2_8 #ifdef LLVM_2_8
md = llvm::MDNode::get(*g->ctx, &first_line, 1); md = llvm::MDNode::get(*g->ctx, &line, 1);
#else #else
md = llvm::MDNode::get(*g->ctx, line); md = llvm::MDNode::get(*g->ctx, line);
#endif #endif
@@ -1445,7 +1445,7 @@ FunctionEmitContext::addGSMetadata(llvm::Instruction *inst, SourcePos pos) {
llvm::Value *column = LLVMInt32(pos.first_column); llvm::Value *column = LLVMInt32(pos.first_column);
#ifdef LLVM_2_8 #ifdef LLVM_2_8
md = llvm::MDNode::get(*g->ctx, &first_column, 1); md = llvm::MDNode::get(*g->ctx, &column, 1);
#else #else
md = llvm::MDNode::get(*g->ctx, column); md = llvm::MDNode::get(*g->ctx, column);
#endif #endif

View File

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

View File

@@ -82,7 +82,9 @@
#ifndef LLVM_2_8 #ifndef LLVM_2_8
#include <llvm/Support/ToolOutputFile.h> #include <llvm/Support/ToolOutputFile.h>
#include <llvm/Support/Host.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/Assembly/PrintModulePass.h>
#include <llvm/Support/raw_ostream.h> #include <llvm/Support/raw_ostream.h>
#include <llvm/Bitcode/ReaderWriter.h> #include <llvm/Bitcode/ReaderWriter.h>