mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-26 09:33:13 +01:00
Add changes for LLVM 3.2
- The Attributes class was changed again - TargetData was renamed to DataLayout Compiles again with LLVm 3.0, 3.1 and trunk(3.2).
This commit is contained in:
@@ -8,7 +8,11 @@
|
||||
#include "llvm/LinkAllPasses.h"
|
||||
#include "llvm/Analysis/LoopPass.h"
|
||||
#include "llvm/Analysis/Verifier.h"
|
||||
#if LDC_LLVM_VER >= 302
|
||||
#include "llvm/DataLayout.h"
|
||||
#else
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#endif
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/PassNameParser.h"
|
||||
#include "llvm/Transforms/IPO.h"
|
||||
@@ -274,7 +278,11 @@ bool ldc_optimize_module(llvm::Module* m)
|
||||
|
||||
if (verifyEach) pm.add(createVerifierPass());
|
||||
|
||||
#if LDC_LLVM_VER >= 302
|
||||
addPass(pm, new DataLayout(m));
|
||||
#else
|
||||
addPass(pm, new TargetData(m));
|
||||
#endif
|
||||
|
||||
bool optimize = optimizeLevel != 0 || doInline();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user