Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 67645df

Browse files
committed
Use std::nullopt instead of llvm::None, which is deprecated
1 parent 628b592 commit 67645df

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

omniscidb/QueryEngine/Compiler/HelperFunctions.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@
1717
#include <llvm/Analysis/MemorySSA.h>
1818
#include <llvm/IR/IRPrintingPasses.h>
1919
#include <llvm/IR/Instructions.h>
20+
#include <llvm/IR/PassManager.h>
2021
#include <llvm/IR/Verifier.h>
2122
#include <llvm/Passes/PassBuilder.h>
23+
#include <llvm/Passes/StandardInstrumentations.h>
24+
#include <llvm/Support/Path.h>
2225
#include <llvm/Transforms/IPO.h>
2326
#include <llvm/Transforms/IPO/AlwaysInliner.h>
2427
#include <llvm/Transforms/IPO/GlobalOpt.h>
@@ -37,9 +40,8 @@
3740
#include <llvm/Transforms/Utils/BasicBlockUtils.h>
3841
#include <llvm/Transforms/Utils/Cloning.h>
3942
#include <llvm/Transforms/Utils/Mem2Reg.h>
40-
#include "llvm/IR/PassManager.h"
41-
#include "llvm/Passes/StandardInstrumentations.h"
42-
#include "llvm/Support/Path.h"
43+
44+
#include <optional>
4345

4446
#include "QueryEngine/Compiler/Exceptions.h"
4547
#include "QueryEngine/Optimization/AnnotateInternalFunctionsPass.h"
@@ -188,7 +190,11 @@ void optimize_ir(llvm::Function* query_func,
188190

189191
llvm::PassBuilder PB(nullptr,
190192
llvm::PipelineTuningOptions(),
193+
#if LLVM_VERSION_MAJOR > 15
194+
std::nullopt,
195+
#else
191196
llvm::None,
197+
#endif
192198
(co.dump_llvm_ir_after_each_pass == 2) ? &PIC : nullptr);
193199
llvm::LoopAnalysisManager LAM;
194200
llvm::FunctionAnalysisManager FAM;

0 commit comments

Comments
 (0)