mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-05 01:20:51 +03:00
Add support for LLVM 17. (#4533)
This commit is contained in:
parent
fb637c408f
commit
91d306894e
36 changed files with 4309 additions and 73 deletions
|
@ -50,6 +50,9 @@
|
|||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
#include "llvm/Transforms/Utils/ModuleUtils.h"
|
||||
#if LDC_LLVM_VER >= 1700
|
||||
#include "llvm/Support/VirtualFileSystem.h"
|
||||
#endif
|
||||
|
||||
#if _AIX || __sun
|
||||
#include <alloca.h>
|
||||
|
@ -354,7 +357,12 @@ void loadInstrProfileData(IRState *irs) {
|
|||
global.params.datafileInstrProf);
|
||||
|
||||
auto readerOrErr =
|
||||
llvm::IndexedInstrProfReader::create(global.params.datafileInstrProf);
|
||||
llvm::IndexedInstrProfReader::create(global.params.datafileInstrProf
|
||||
#if LDC_LLVM_VER >= 1700
|
||||
,
|
||||
*llvm::vfs::getRealFileSystem()
|
||||
#endif
|
||||
);
|
||||
if (auto E = readerOrErr.takeError()) {
|
||||
handleAllErrors(std::move(E), [&](const llvm::ErrorInfoBase &EI) {
|
||||
error(irs->dmodule->loc, "Could not read profile file '%s': %s",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue