mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-28 22:21:31 +03:00
Adapt to latest LLVM 8 changes
This commit is contained in:
parent
704f774a8b
commit
306bda36fd
8 changed files with 21 additions and 19 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue