mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 23:20:40 +03:00
Fix the LLVM 3.5 build.
Some classes were moved into IR folder.
This commit is contained in:
parent
e69b1ebb28
commit
c14e065138
2 changed files with 16 additions and 0 deletions
|
@ -26,7 +26,11 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#include "llvm/ADT/Triple.h"
|
#include "llvm/ADT/Triple.h"
|
||||||
|
#if LDC_LLVM_VER >= 305
|
||||||
|
#include "llvm/IR/Verifier.h"
|
||||||
|
#else
|
||||||
#include "llvm/Analysis/Verifier.h"
|
#include "llvm/Analysis/Verifier.h"
|
||||||
|
#endif
|
||||||
#include "llvm/Target/TargetLibraryInfo.h"
|
#include "llvm/Target/TargetLibraryInfo.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
|
|
|
@ -41,7 +41,11 @@
|
||||||
#include "llvm/Support/CallSite.h"
|
#include "llvm/Support/CallSite.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/Analysis/CallGraph.h"
|
#include "llvm/Analysis/CallGraph.h"
|
||||||
|
#if LDC_LLVM_VER >= 305
|
||||||
|
#include "llvm/IR/Dominators.h"
|
||||||
|
#else
|
||||||
#include "llvm/Analysis/Dominators.h"
|
#include "llvm/Analysis/Dominators.h"
|
||||||
|
#endif
|
||||||
#include "llvm/Analysis/ValueTracking.h"
|
#include "llvm/Analysis/ValueTracking.h"
|
||||||
#include "llvm/ADT/SmallSet.h"
|
#include "llvm/ADT/SmallSet.h"
|
||||||
#include "llvm/ADT/SmallVector.h"
|
#include "llvm/ADT/SmallVector.h"
|
||||||
|
@ -391,7 +395,11 @@ namespace {
|
||||||
|
|
||||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||||
AU.addRequired<DataLayout>();
|
AU.addRequired<DataLayout>();
|
||||||
|
#if LDC_LLVM_VER >= 305
|
||||||
|
AU.addRequired<DominatorTreeWrapperPass>();
|
||||||
|
#else
|
||||||
AU.addRequired<DominatorTree>();
|
AU.addRequired<DominatorTree>();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if LDC_LLVM_VER >= 305
|
#if LDC_LLVM_VER >= 305
|
||||||
AU.addPreserved<CallGraphWrapperPass>();
|
AU.addPreserved<CallGraphWrapperPass>();
|
||||||
|
@ -455,7 +463,11 @@ bool GarbageCollect2Stack::runOnFunction(Function &F) {
|
||||||
DEBUG(errs() << "\nRunning -dgc2stack on function " << F.getName() << '\n');
|
DEBUG(errs() << "\nRunning -dgc2stack on function " << F.getName() << '\n');
|
||||||
|
|
||||||
DataLayout& DL = getAnalysis<DataLayout>();
|
DataLayout& DL = getAnalysis<DataLayout>();
|
||||||
|
#if LDC_LLVM_VER >= 305
|
||||||
|
DominatorTree &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree();
|
||||||
|
#else
|
||||||
DominatorTree& DT = getAnalysis<DominatorTree>();
|
DominatorTree& DT = getAnalysis<DominatorTree>();
|
||||||
|
#endif
|
||||||
#if LDC_LLVM_VER >= 305
|
#if LDC_LLVM_VER >= 305
|
||||||
CallGraphWrapperPass* CGPass = getAnalysisIfAvailable<CallGraphWrapperPass>();
|
CallGraphWrapperPass* CGPass = getAnalysisIfAvailable<CallGraphWrapperPass>();
|
||||||
CallGraph* CG = CGPass ? &CGPass->getCallGraph() : 0;
|
CallGraph* CG = CGPass ? &CGPass->getCallGraph() : 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue