clover/llvm: Use std::nullopt already with LLVM 16
authorMichel Dänzer <mdaenzer@redhat.com>
Wed, 26 Apr 2023 09:05:47 +0000 (11:05 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 1 May 2023 14:15:15 +0000 (14:15 +0000)
llvm::None is already deprecated and defined as std::nullopt in LLVM 16.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22718>

src/gallium/frontends/clover/llvm/codegen/native.cpp

index 9899bbe..869f8c6 100644 (file)
@@ -116,7 +116,7 @@ namespace {
 
       std::unique_ptr<TargetMachine> tm {
          t->createTargetMachine(target.triple, target.cpu, "", {},
-#if LLVM_VERSION_MAJOR >= 17
+#if LLVM_VERSION_MAJOR >= 16
                                 std::nullopt, std::nullopt,
 #else
                                 ::llvm::None, ::llvm::None,