mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-18 05:43:14 +01:00
Merge branch 'master' into merge-2.064
This commit is contained in:
@@ -333,7 +333,7 @@ if(GENERATE_OFFTI)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set(EXTRA_CXXFLAGS "/W0 /wd4996 /GF /GR- /RTC1")
|
||||
set(EXTRA_CXXFLAGS "/W0 /wd4996 /GF /GR-")
|
||||
else()
|
||||
set(EXTRA_CXXFLAGS "-fexceptions")
|
||||
endif()
|
||||
|
||||
@@ -26,7 +26,11 @@
|
||||
#endif
|
||||
#endif
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#if LDC_LLVM_VER >= 305
|
||||
#include "llvm/IR/Verifier.h"
|
||||
#else
|
||||
#include "llvm/Analysis/Verifier.h"
|
||||
#endif
|
||||
#include "llvm/Target/TargetLibraryInfo.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
|
||||
@@ -41,7 +41,11 @@
|
||||
#include "llvm/Support/CallSite.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Analysis/CallGraph.h"
|
||||
#if LDC_LLVM_VER >= 305
|
||||
#include "llvm/IR/Dominators.h"
|
||||
#else
|
||||
#include "llvm/Analysis/Dominators.h"
|
||||
#endif
|
||||
#include "llvm/Analysis/ValueTracking.h"
|
||||
#include "llvm/ADT/SmallSet.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
@@ -391,7 +395,11 @@ namespace {
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<DataLayout>();
|
||||
#if LDC_LLVM_VER >= 305
|
||||
AU.addRequired<DominatorTreeWrapperPass>();
|
||||
#else
|
||||
AU.addRequired<DominatorTree>();
|
||||
#endif
|
||||
|
||||
#if LDC_LLVM_VER >= 305
|
||||
AU.addPreserved<CallGraphWrapperPass>();
|
||||
@@ -455,7 +463,11 @@ bool GarbageCollect2Stack::runOnFunction(Function &F) {
|
||||
DEBUG(errs() << "\nRunning -dgc2stack on function " << F.getName() << '\n');
|
||||
|
||||
DataLayout& DL = getAnalysis<DataLayout>();
|
||||
#if LDC_LLVM_VER >= 305
|
||||
DominatorTree &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree();
|
||||
#else
|
||||
DominatorTree& DT = getAnalysis<DominatorTree>();
|
||||
#endif
|
||||
#if LDC_LLVM_VER >= 305
|
||||
CallGraphWrapperPass* CGPass = getAnalysisIfAvailable<CallGraphWrapperPass>();
|
||||
CallGraph* CG = CGPass ? &CGPass->getCallGraph() : 0;
|
||||
|
||||
Reference in New Issue
Block a user