From 776731910064cb6df03be19d788f7f13b2f7d2f1 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 4 Apr 2023 21:52:56 +0200 Subject: llvm-cbinding.cpp: adjust for llvm 16 --- src/ortho/llvm6/llvm-cbindings.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ortho/llvm6/llvm-cbindings.cpp b/src/ortho/llvm6/llvm-cbindings.cpp index f15da2b43..91a28a789 100644 --- a/src/ortho/llvm6/llvm-cbindings.cpp +++ b/src/ortho/llvm6/llvm-cbindings.cpp @@ -1040,8 +1040,13 @@ new_type_decl(OIdent Ident, OTnode Atype) OTnode Ptr = static_cast(Atype)->Acc; // Possibly still incomplete Atype->Dbg = DBuilder->createPointerType - (Ptr ? Ptr->Dbg : nullptr, - Atype->getBitSize(), 0, None, StringRef(Ident.cstr)); + (Ptr ? Ptr->Dbg : nullptr, Atype->getBitSize(), 0, +#if LLVM_VERSION_MAJOR >= 16 + std::nullopt, +#else + None, +#endif + StringRef(Ident.cstr)); break; } -- cgit v1.2.3