Adapt to latest LLVM 8 changes

This commit is contained in:
Martin Kinkelin 2019-02-23 16:14:49 +01:00
parent 704f774a8b
commit 306bda36fd
8 changed files with 21 additions and 19 deletions

View file

@ -29,7 +29,7 @@
#include "llvm/Support/CommandLine.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/Instrumentation.h"
#if LDC_LLVM_VER >= 900
#if LDC_LLVM_VER >= 800
#include "llvm/Transforms/Instrumentation/MemorySanitizer.h"
#include "llvm/Transforms/Instrumentation/ThreadSanitizer.h"
#endif
@ -126,7 +126,7 @@ bool willCrossModuleInline() {
return enableCrossModuleInlining == llvm::cl::BOU_TRUE;
}
#if LDC_LLVM_VER >= 900
#if LDC_LLVM_VER >= 800
llvm::FramePointer::FP whichFramePointersToEmit() {
auto option = opts::framePointerUsage();
if (option)
@ -193,7 +193,7 @@ static void addAddressSanitizerPasses(const PassManagerBuilder &Builder,
static void addMemorySanitizerPass(const PassManagerBuilder &Builder,
PassManagerBase &PM) {
#if LDC_LLVM_VER >= 900
#if LDC_LLVM_VER >= 800
PM.add(createMemorySanitizerLegacyPassPass());
#else
PM.add(createMemorySanitizerPass());
@ -214,7 +214,7 @@ static void addMemorySanitizerPass(const PassManagerBuilder &Builder,
static void addThreadSanitizerPass(const PassManagerBuilder &Builder,
PassManagerBase &PM) {
#if LDC_LLVM_VER >= 900
#if LDC_LLVM_VER >= 800
PM.add(createThreadSanitizerLegacyPassPass());
#else
PM.add(createThreadSanitizerPass());