Fix for llvm 3.2 - TargetData -> DataLayout
This commit is contained in:
parent
e2e6221f25
commit
f3e9eb0b05
1 changed files with 6 additions and 5 deletions
|
|
@ -53,7 +53,7 @@
|
|||
#include "llvm/Support/MemoryBuffer.h"
|
||||
#include "llvm/Support/CallSite.h"
|
||||
#include "llvm/Support/FormattedStream.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
//#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/Support/TargetRegistry.h"
|
||||
#include "llvm/Support/TargetSelect.h"
|
||||
#include "llvm/Support/Host.h"
|
||||
|
|
@ -356,12 +356,12 @@ unsigned char* LLVMTargetMachineEmitFile(LLVMTargetMachineRef tmref,
|
|||
|
||||
PassManager pm;
|
||||
|
||||
if (!tm->getTargetData()){
|
||||
if (!tm->getDataLayout()){
|
||||
error = "No target data in target machine";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pm.add(new TargetData(*tm->getTargetData()));
|
||||
pm.add(new DataLayout(*tm->getDataLayout()));
|
||||
|
||||
bool failed;
|
||||
if( assembly ) {
|
||||
|
|
@ -427,7 +427,7 @@ void LLVMPrintRegisteredTargetsForVersion(){
|
|||
LLVMTargetDataRef LLVMTargetMachineGetTargetData(LLVMTargetMachineRef tm)
|
||||
{
|
||||
using namespace llvm;
|
||||
return wrap(new TargetData(*unwrap(tm)->getTargetData()));
|
||||
return wrap(new DataLayout(*unwrap(tm)->getDataLayout()));
|
||||
}
|
||||
|
||||
unsigned char* LLVMGetNativeCodeFromModule(LLVMModuleRef module, int assembly,
|
||||
|
|
@ -992,7 +992,8 @@ void LLVMSetDoesNotThrow(LLVMValueRef fn, int DoesNotThrow)
|
|||
llvm::Function *fnp = llvm::unwrap<llvm::Function>(fn);
|
||||
assert(fnp);
|
||||
|
||||
return fnp->setDoesNotThrow((bool)DoesNotThrow);
|
||||
if ((bool)DoesNotThrow)
|
||||
fnp->setDoesNotThrow();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue