mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 00:55:49 +03:00
Add support for LLVM 11
One major change is the removal of llvm::CallSite, which I've replaced by llvm::CallBase*.
This commit is contained in:
parent
9c42dfd9d0
commit
96b9cde428
33 changed files with 2562 additions and 229 deletions
|
@ -23,7 +23,9 @@
|
|||
#include "gen/logger.h"
|
||||
#include "gen/modules.h"
|
||||
#include "gen/runtime.h"
|
||||
#if LDC_LLVM_VER >= 900
|
||||
#if LDC_LLVM_VER >= 1100
|
||||
#include "llvm/IR/LLVMRemarkStreamer.h"
|
||||
#elif LDC_LLVM_VER >= 900
|
||||
#include "llvm/IR/RemarkStreamer.h"
|
||||
#endif
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
|
@ -52,8 +54,13 @@ createAndSetDiagnosticsOutputFile(IRState &irs, llvm::LLVMContext &ctx,
|
|||
const bool withHotness = opts::isUsingPGOProfile();
|
||||
|
||||
#if LDC_LLVM_VER >= 900
|
||||
auto remarksFileOrError = llvm::setupOptimizationRemarks(
|
||||
ctx, diagnosticsFilename, "", "", withHotness);
|
||||
auto remarksFileOrError =
|
||||
#if LDC_LLVM_VER >= 1100
|
||||
llvm::setupLLVMOptimizationRemarks(
|
||||
#else
|
||||
llvm::setupOptimizationRemarks(
|
||||
#endif
|
||||
ctx, diagnosticsFilename, "", "", withHotness);
|
||||
if (llvm::Error e = remarksFileOrError.takeError()) {
|
||||
irs.dmodule->error("Could not create file %s: %s",
|
||||
diagnosticsFilename.c_str(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue